Mission Run Overview
Mission Run: Enable plan mission runtime support on 2.x
View and track all artifacts for this mission run.
Team: spec-kitty Priority: P0 Scope: 2.x ONLY (no mainline, no doctrine migration/refactor) Branch policy: - Work only on branch line `2.x`. - Do not port/rename assets to doctrine paths. - Do not introduce unrelated PR146 changes. Problem: `plan` mission can be selected, but `spec-kitty next --feature ... --agent ... --json` blocks for `mission=plan`. Observed behavior: 1) `spec-kitty specify "plan adoption feature" --mission plan --json` succeeds. 2) `spec-kitty next --feature <slug> --agent codex --json` returns blocked with: "Failed to start/load runtime run: Mission 'plan' not found ..." 3) Command/template resolution for mission=plan fails because plan mission has only: - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/missions/plan/mission.yaml` - empty `/command-templates/.gitkeep` - empty `/templates/.gitkeep` Root cause: The runtime bridge expects runtime-compatible mission template + mission-scoped command templates. Relevant code: - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/next/runtime_bridge.py` around lines 214, 244, 302. Goal: Make `plan` mission work end-to-end in the `next` runtime loop on 2.x. Required changes (minimal, 2.x-safe): 1) Add runtime template for `plan` mission: - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/missions/plan/mission-runtime.yaml` - Use runtime schema (`mission.key`, `steps`, `depends_on`, `prompt_template`). - Keep semantics aligned with existing plan mission phases (goals/research/structure/draft/review). 2) Add mission-scoped command templates for `plan`: - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/missions/plan/command-templates/specify.md` - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/missions/plan/command-templates/research.md` - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/missions/plan/command-templates/plan.md` - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/missions/plan/command-templates/review.md` - Keep template references in these files 2.x-consistent (no doctrine path assumptions). 3) Add mission-scoped content templates needed by the above command templates (only if referenced): - `/Users/robert/ClaudeCowork/Spec-Kitty-Cowork/spec-kitty/src/specify_cli/missions/plan/templates/...` 4) Tests: - Add/extend integration test proving: a) create feature with `mission=plan` b) `next` no longer returns blocked "Mission 'plan' not found" - Add/extend resolver test proving `resolve_command(..., mission="plan")` resolves required plan command templates. - Keep tests deterministic and runnable in CI without external auth/services. Acceptance criteria: 1) On 2.x, in clean temp project: - `spec-kitty specify "<name>" --mission plan --json` succeeds. - `spec-kitty next --feature <slug> --agent codex --json` returns non-blocked (`step` / `decision_required` / `terminal`), and does not fail mission discovery. 2) `mission=plan` command-template resolution succeeds for the expected loop steps. 3) No behavior regressions for `software-dev` and `research` mission loops. 4) No changes outside 2.x scope. Out of scope: - No doctrine migration. - No SaaS/API changes. - No telemetry schema redesign.