Work Packages: design-phase-orchestrator-api-01M1HE6M

_Generated by finalize-tasks from wps.yaml. Do not edit directly._


⚠️ Mission-level notes (carried forward from plan.md — read before review)

1. Single-PR review-order recommendation (plan.md § (l)). This mission ships as ONE PR per spec constraint C-004 (binding — "Closes #3837" must land in the PR body; this is not a scope override the tasks/implement phases are authorized to relitigate). The plan-phase author assessed the resulting single PR as "at the edge of reviewable-in-one-sitting" and recorded a review-ORDER recommendation (not a scope recommendation, and not self-authorized as a PR split): if review bandwidth allows, the reviewing squad should read the PR in this order rather than linearly top-to-bottom — 1. WP02 and WP08 FIRST AND IN ISOLATION — the seam extraction (touches the live next --answer control-loop code every invocation in this repo runs through, and the one part of this mission under the enforced src/runtime/next/* diff-coverage gate) and the answer-decision verb that depends on it (the mission's highest-STAKES WP — SPEC-FRESH2-001's event/lifecycle-parity requirement, easy to get silently wrong in a way that still "looks" correct). 2. WP03–WP07 (the additive verb WPs + the contract-version bump) second — individually low-risk, but land as a large combined diff in orchestrator_api/commands.py because five WPs (WP03/04/05/06/08) additively touch that one file. 3. WP09 (docs) last — it documents landed, not planned, behavior.

This is carried forward from plan.md verbatim in spirit; nothing here overrides C-004. If, in the reviewing squad's or operator's own judgment, the single-PR shape proves genuinely unreviewable in practice, that is a flag for the orchestrator/operator to weigh explicitly — plan.md explicitly declined to make that call unilaterally at plan time, and tasks-authoring does not make it either.

2. __all__ (charter C-007) does not apply to this mission (plan.md § (i)). No WP in this mission touches a file under src/charter/ or src/kernel/ as a Python module — the one src/charter/ path in scope, host-boundary-rules.md (WP09), is a markdown skill-reference doc, not a module, so the __all__ symbol-export convention does not bind it. Stated here once, explicitly, so a reviewer does not have to re-derive it per WP.

3. Same-file write-scope overlap is real and intentional, not an oversight (plan.md § "Parallel Work Analysis"). WP03, WP04, WP05, WP06, and WP08 all additively touch src/specify_cli/orchestrator_api/commands.py (non-overlapping functions) and are mutually independent in the dependency graph below (each depends only on WP01, except WP08 which depends only on WP02) — this mission's declared "5 concurrent lanes" design. All five are marked scope: codebase-wide in their WP frontmatter so the CLI's ownership-overlap validator (which only exempts a dependency-ordered pair or a codebase-wide WP) does not hard-block finalize-tasks. Live-CLI-verified discrepancy from the plan's stated parallelism, worth flagging explicitly: finalize-tasks's own lane computation (specify_cli.lanes.compute) unions ANY WPs with overlapping owned_files into the SAME lane regardless of the dependency graph — this mission's actual computed lane assignment (lanes.json, 3 lanes total) collapses WP01, WP02, WP03, WP04, WP05, WP06, and WP08 into ONE shared lane (lane-a), with WP07 alone in lane-b and WP09 (docs) in the planning lane. In practice, the CLI will run this mission's code WPs through ONE shared worktree/lane, sequenced by its own lane ordering, NOT across 5 genuinely concurrent worktrees as plan.md's "Parallel Work Analysis" section describes. This does not violate anything — the dependency graph itself is exactly as plan.md specified, and the lane mechanism is precisely how this repo's ownership-map-leeway standing order ("no-overlap is the real guard, not strict file exclusivity") gets enforced safely in practice — but the orchestrator should not expect 5 parallel implementation lanes when scheduling this mission's work.

Additionally, orchestrator_api/commands.py has a real, same-file overlap with PR #3826 (pr/3131-merge-retention, touched commands.py's merge-mission area and mission_create.py) — different functions from what this mission's WPs add, but the same physical file. PR #3826 merged into main on 2026-09-02, and this mission's own branch has since merged that commit in (0753bbffa) — an implementer picking up any affected WP should be aware commands.py's merge-mission area and mission_create.py already carry #3826's changes on this branch. WP03 also calls into agent_feature.create_mission (touched directly by #3826) and agent_feature.setup_plan (mission_setup_plan.py, edited directly by PR #3836, fix/custom-mission-type-second-class-3830, still open) — a behavioural (not file-ownership) rebase risk on top of the file-level one; WP03's create_mission/setup_plan wrapper assumptions should be re-verified against main's current state at implementation time, not deferred as a future "if it lands" hypothetical. See each affected WP's own "Write-Scope / Adjacent Open PRs" section for the per-WP detail.


Work Package WP01: Campsite-clean + baseline-red snapshot

Dependencies: None Requirement Refs: NFR-003 Owned Files: src/specify_cli/cli/commands/next_cmd.py Subtasks: T001, T002, T003 Prompt: tasks/WP01-campsite-clean-baseline-red.md


Work Package WP02: FR-014 — extract next_invocation_lifecycle seam

Dependencies: WP01 Requirement Refs: FR-014, NFR-001, C-005 Owned Files: src/runtime/next/next_invocation_lifecycle.py, src/specify_cli/cli/commands/next_cmd.py, tests/specify_cli/next/test_next_invocation_lifecycle_seam.py Subtasks: T004, T005, T006, T007, T008 Prompt: tasks/WP02-fr014-seam-extraction.md


Work Package WP03: specify/plan/tasks orchestrator-api verbs

Dependencies: WP01 Requirement Refs: FR-001, FR-002, FR-003, NFR-001, NFR-002, NFR-005, C-001 Owned Files: src/specify_cli/orchestrator_api/commands.py, tests/specify_cli/orchestrator_api/test_specify_plan_tasks_verbs.py, tests/specify_cli/orchestrator_api/test_commands_fail_closed.py, tests/specify_cli/orchestrator_api/test_typed_error_fail_closed.py Subtasks: T009, T010, T011, T012, T013, T014 Prompt: tasks/WP03-specify-plan-tasks-verbs.md


Work Package WP04: check-prerequisites / record-analysis orchestrator-api verbs

Dependencies: WP01 Requirement Refs: FR-004, FR-005, NFR-001, NFR-002, NFR-004, NFR-005, C-001, C-002 Owned Files: src/specify_cli/orchestrator_api/commands.py, tests/specify_cli/orchestrator_api/test_check_prerequisites_record_analysis.py, tests/specify_cli/orchestrator_api/test_commands_fail_closed.py, tests/specify_cli/orchestrator_api/test_typed_error_fail_closed.py Subtasks: T015, T016, T017, T018, T019, T020, T021 Prompt: tasks/WP04-check-prerequisites-record-analysis.md


Work Package WP05: OriginFlow decision-ledger verbs (open/resolve/defer/cancel)

Dependencies: WP01 Requirement Refs: FR-006, FR-007, FR-008, FR-009, FR-012, NFR-001, NFR-002, NFR-005, C-001, C-003 Owned Files: src/specify_cli/orchestrator_api/commands.py, tests/specify_cli/orchestrator_api/test_decision_verbs.py, tests/specify_cli/orchestrator_api/test_commands_fail_closed.py, tests/specify_cli/orchestrator_api/test_typed_error_fail_closed.py Subtasks: T022, T023, T024, T025, T026, T027 Prompt: tasks/WP05-decision-ledger-verbs.md


Work Package WP06: design-status read-only query verb

Dependencies: WP01 Requirement Refs: FR-010, NFR-001, NFR-002, NFR-005 Owned Files: src/specify_cli/orchestrator_api/commands.py, tests/specify_cli/orchestrator_api/test_design_status.py, tests/specify_cli/orchestrator_api/test_commands_fail_closed.py, tests/specify_cli/orchestrator_api/test_typed_error_fail_closed.py Subtasks: T028, T029, T030, T031, T032 Prompt: tasks/WP06-design-status-verb.md


Work Package WP07: CONTRACT_VERSION bump to 1.4.0

Dependencies: WP03, WP04, WP05, WP06, WP08 Requirement Refs: FR-011, NFR-001 Owned Files: src/specify_cli/orchestrator_api/envelope.py, tests/specify_cli/orchestrator_api/test_contract_version.py Subtasks: T033, T034, T035 Prompt: tasks/WP07-contract-version-bump.md


Work Package WP08: answer-decision verb (Mechanism B, full event/lifecycle parity)

Dependencies: WP02 Requirement Refs: FR-013, NFR-001, NFR-002, NFR-005, C-005 Owned Files: src/specify_cli/orchestrator_api/commands.py, tests/specify_cli/orchestrator_api/test_answer_decision.py, tests/specify_cli/next/test_next_invocation_lifecycle_seam.py, tests/specify_cli/orchestrator_api/test_commands_fail_closed.py, tests/specify_cli/orchestrator_api/test_typed_error_fail_closed.py Subtasks: T036, T037, T038, T039, T040, T041 Prompt: tasks/WP08-answer-decision-verb.md


Work Package WP09: Docs — orchestrator-api.md, host-boundary-rules.md, CHANGELOG.md

Dependencies: WP03, WP04, WP05, WP06, WP07, WP08 Requirement Refs: FR-001, FR-002, FR-003, FR-004, FR-005, FR-006, FR-007, FR-008, FR-009, FR-010, FR-011, FR-012, FR-013, FR-014 Owned Files: docs/api/orchestrator-api.md, src/charter/offering/skills/spec-kitty-orchestrator-api-operator/references/host-boundary-rules.md, docs/changelog/CHANGELOG.md Subtasks: T042, T043, T044, T045, T046 Prompt: tasks/WP09-docs.md