version: 1 goal_summary: "Implement a structured three-persona planning pipeline for new task creation and wire it into quality gates that prevent spaghetti-like outcomes." steps[6]: - id: "step-1" title: "Map current goal-planning execution path" purpose: "Identify where new tasks are created and where planner output is generated, stored, and consumed." notes: This is required to avoid adding persona logic in the wrong layer and breaking existing task creation contracts. inputs[1]: "Current new-task creation flow" outputs[1]: Execution map of planner entry/egress points dependencies[0]: verification[1]: - label: Baseline understanding commands[3]: Trace task creation path from command/API input to persisted task goal,"Locate planner modules, serializers, and validation hooks",Document current persona/prompt hooks (if any) cleanup_requirements[0]: status: done attempts: 1 - id: "step-2" title: Reset stale active state purpose: "Re-run finalization of three-persona planner sequencing before execution resumes" notes: "Recovered stale active step state required step-2 to be retried before proceeding." inputs[0]: outputs[0]: dependencies[0]: verification[0]: cleanup_requirements[0]: status: done attempts: 1 - id: "step-3" title: Implement sequential persona pipeline in goal planner purpose: "Apply PO -> Senior Engineer -> Future Engineer transformations and merge outputs into a single maintainability-first goal artifact." notes: Recovery shows planner execution was reset; this step is now the active unblocked execution path. Controller recovered this step from stale active state and returned it to todo. inputs[1]: Persona contract and config outputs[2]: Updated planner pipeline implementation,Deterministic merged goal artifact dependencies[1]: "step-2" verification[1]: - label: Determinism commands[3]: Add unit tests asserting fixed output ordering and stable merge for same input seed/state,Add tests for conflict resolution and fallback behavior,... 1 more omitted cleanup_requirements[1]{label,description}: Safe integration,Remove inline prompt branching that bypasses the new pipeline. status: done attempts: 1 - id: "step-4" title: "Reopen step-4 implementation" purpose: Complete remaining implementation work before downstream validation/rollout tasks. notes: "Recovery flagged step-4 as stale-active; it must be treated as unfinished to keep planner gating chain valid." inputs[0]: outputs[0]: dependencies[0]: verification[0]: cleanup_requirements[0]: status: done attempts: 1 - id: "step-5" title: Add regression tests and rollout docs purpose: "Validate the three-stage PO→Senior Engineer→Architect flow with deterministic templates, explicit constraints, and maintenance-focused rejection/annotation behavior before proceeding." notes: "Keep this step as the first blocker: lock in behavioral contracts and anti-bypass coverage, then add concise docs so future work cannot drift into one-off prompts. Controller recovered this step from stale active state and returned it to todo." inputs[2]: Implemented pipeline and gates,"Three-stage persona templates and merge rules" outputs[3]: Regression tests for staged transformations,"Tests for downgrade/reject/delta-capture logic that flags maintenance-risk solutions",Developer docs for staged goal generation and constraints dependencies[1]: "step-4" verification[1]: - label: Regression safety commands[3]: "Run new-task planner unit/integration test set for all 3 passes","Run decision-path tests for reject/downgrade/annotate outcomes","Run existing task-creation and verifier-loop regression tests" cleanup_requirements[1]{label,description}: Documentation clarity,"Delete stale references to old single-pass planning behavior." status: done attempts: 1 - id: "step-6" title: "Enable three-stage persona telemetry and rollout guardrails" purpose: "Add immutable planner instrumentation and hard enforcement for product-owner, senior-engineer, senior-maintainer stage transitions before execution." notes: "Implement stage event emission (`Persona stage`, `stage-1`, `stage-2`, `stage-3`) with deterministic persona-pass metadata; block single-pass/bypass paths so every new-task goal goes through all three stages; keep this guardrail work separate from doc/test-generation output paths." inputs[0]: outputs[0]: dependencies[1]: "step-4" verification[2]: - label: Stage telemetry contract commands[2]: "Emit planner session events for every pass including persona template version, constraints, risks, architectural context, and acceptance criteria","Emit explicit `Persona stage` and `stage-1/2/3` transitions from the same approved pipeline path for all new-task goals" - label: Guardrail enforcement commands[2]: "Reject execution when single-pass planning or stage skipping is detected","Add rollout counters for rejected/annotated goals by failure type and stage, and alert on threshold breaches" cleanup_requirements[1]{label,description}: Operational overhead,"Disable debug-level per-task instrumentation in non-debug environments once the new telemetry/guards are stable." status: done attempts: 1