feat: a work breakdown structure with a computed timeline (iteration 10)
Some checks failed
validation / verify (push) Failing after 10s
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:
@@ -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.
|
||||
|
||||
@@ -46,6 +46,7 @@ from app.workflows.chain import (
|
||||
validation_outcome,
|
||||
)
|
||||
from app.workflows.deliverables import DEPENDENCY_GRAPH, DeliverableKind, PhaseId
|
||||
from app.workflows.work_breakdown import summary as plan_summary
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -761,6 +762,12 @@ def approval_facts(phase: PhaseId, view: TurnView, r: Readings) -> dict[str, Any
|
||||
],
|
||||
"unknown": [item.get("field") for item in agreed.get("to_ask", [])],
|
||||
}
|
||||
plan = view.deliverables.get(DeliverableKind.WORK_BREAKDOWN.value)
|
||||
if plan and phase is PhaseId.PACKAGING:
|
||||
# How long the build is planned to take, and whether that fits.
|
||||
facts["delivery_plan"] = plan_summary(
|
||||
plan.get("attachments", {}), view.deliverables
|
||||
)
|
||||
graph = read_graph(view.deliverables)
|
||||
if graph is not None:
|
||||
facts["target_architecture"] = graph.summary()
|
||||
@@ -796,6 +803,21 @@ def assembled_summary(phase: PhaseId, facts: Mapping[str, Any]) -> str:
|
||||
lines.append(
|
||||
", ".join(f"{count} {name}" for name, count in counts.items()) + "."
|
||||
)
|
||||
plan = facts.get("delivery_plan")
|
||||
if plan:
|
||||
fits = plan.get("within_window")
|
||||
lines.append(
|
||||
f"Delivery plan: {plan['activities']} activities in "
|
||||
f"{plan['work_packages']} work packages, {plan['weeks']} weeks with a "
|
||||
f"team of {plan['team_size']}"
|
||||
+ (
|
||||
""
|
||||
if fits is None
|
||||
else f", {'inside' if fits else 'over'} the "
|
||||
f"{plan['window_weeks']}-week window"
|
||||
)
|
||||
+ "."
|
||||
)
|
||||
scope = facts.get("scope")
|
||||
if scope:
|
||||
lines.append(
|
||||
|
||||
Reference in New Issue
Block a user