feat: a work breakdown structure with a computed timeline (iteration 10)
Some checks failed
validation / verify (push) Failing after 10s

A new Deliverable in the packaging Phase, produced by a delivery planner
after validation.

- The planner writes the plan as data: work packages that name the Elements
  they deliver, and activities with days, what each follows, and whether the
  team or the customer owns it.
- Code checks the plan against the design: every Element belongs to a work
  package, and the activities can be scheduled.
- Code computes the schedule, with no more of the team's activities at once
  than the team has people, and the critical path.
- Code writes the WBS dictionary (a work package is done when the Checks on
  its Elements pass), the activity sequence and a timeline on a relative axis
  from Day 0.
- The plan is checked against the delivery window from the agreed scope; over
  it, the Deliverable says by how much and names the critical path.
- With a start date it also gives calendar dates and a Mermaid Gantt chart.
- The timeline is added to the solution guide, and the plan's length is in
  execution.json and the packaging Approval.

Not run with real models.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-11 19:54:17 +01:00
parent 0f80cb642f
commit f54af24169
21 changed files with 1108 additions and 12 deletions

View File

@@ -88,6 +88,7 @@ from app.workflows.deliverables import (
dependencies_for,
)
from app.workflows.target_architecture import GRAPH_ATTACHMENT
from app.workflows.work_breakdown import summary as plan_summary
logger = logging.getLogger(__name__)
@@ -1413,6 +1414,23 @@ def _write_outputs(
indent=2,
ensure_ascii=False,
)
plan = deliverables.get(DeliverableKind.WORK_BREAKDOWN.value)
plan_record: dict[str, Any] | None = None
if plan:
plan_record = plan_summary(plan.get("attachments", {}), deliverables) or None
timeline = str(plan.get("content", "")).partition("\n## Timeline\n")[2]
if guide and timeline:
# The guide and the plan are written side by side, so neither holds the
# other. The plan's timeline is added to the guide here, from the plan.
appendix = (
"\n\n## Delivery plan\n\n"
f"From the work breakdown structure (`deliverables/"
f"{DeliverableKind.WORK_BREAKDOWN.value}.md`), which has the work "
"packages and the full activity sequence.\n\n" + timeline.strip() + "\n"
)
files[GUIDE_FILENAME] = files[GUIDE_FILENAME].rstrip() + appendix
guide_document = f"deliverables/{DeliverableKind.SOLUTION_GUIDE.value}.md"
files[guide_document] = files[guide_document].rstrip() + appendix
scope_record: dict[str, Any] | None = None
if SCOPE_FILE in files:
# The completed scope spec says where it stands, here and beside the Intent.
@@ -1453,6 +1471,8 @@ def _write_outputs(
"terraform_modules": bool(state.get("terraform_modules")),
# Where the agreed scope stands and how much of it the customer stated.
"scope": scope_record,
# The plan in a few numbers: its length, and whether it fits the window.
"delivery_plan": plan_record,
"status": status,
"warnings": list(state.get("warnings", [])),
# Flags a person should look at; nothing was done about them.