feat: 3 person review

This commit is contained in:
eric
2026-04-04 13:12:17 +02:00
parent d360a2b23c
commit 32147d4552
50 changed files with 2398 additions and 660 deletions

View File

@@ -0,0 +1,4 @@
## Goal
- Improve the new-task goal planner so every newly created task is processed through a consistent three-stage personality chain: Product Owner, Senior Engineer, and Senior Maintainer.
- Use this chain to strengthen requirement clarity, implementation quality, and long-term iterability before a task enters the execution/verifier loop.
- Enforce planning outputs that bias maintainable design over short-term fixes, reducing the risk of test-passing but brittle implementations.

View File

@@ -0,0 +1,82 @@
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

View File

@@ -0,0 +1,10 @@
## Standards
- Preserve and improve maintainability by requiring architecture-aware task goals, explicit constraints, and explicit iteration context.
- Keep persona behavior deterministic with versioned templates, ordered composition, and stable merge rules.
- Reject, downgrade, or flag goals that optimize correctness only and create high future maintenance cost.
- Avoid one-off hacks and ad-hoc prompt bypasses; route all goal generation through the same approved planner flow.
- Add lightweight observability for each persona transformation and keep existing verification and tests green.
- Stage goal generation must follow the exact order: product-owner, senior-engineer, senior-maintainer.
- Emit all stage transitions as planner session events (`Persona stage`, `stage-1..3`) and include persona pass metadata.
- Enforce persona-pass contracts with explicit constraints, risks, and architecture-aware acceptance criteria in every stage.
- Keep one-pass behavior removed from rollout docs: single-pass planning is no longer an accepted path for new tasks.

View File

@@ -0,0 +1,49 @@
version: 1
phase: done
stop_reason: null
goal_status: done
goal_revision: 1
current_step_id: null
iteration: 8
replan_required: true
completed_steps[8]: "step-1","step-2","step-2","step-3","step-4","step-4","step-5","step-6"
blocked_steps[0]:
last_verification:
passed: true
summary: No commands requested
commands[0]:
output[0]:
last_cleanup_summary:
passed: true
summary: "Cleanup accepted for step-6"
commands[0]:
output[5]: Did not run verification or tests per your execution constraints.,"Single-pass legacy schema outputs are still parsed for compatibility but are rejected by the new pipeline contract check before acceptance.","If you want, next step is to add targeted tests for the new counter/threshold paths in forwarder.","",next_step_not_required
last_full_test_summary:
passed: true
summary: No commands requested
commands[0]:
output[0]:
history[8]{timestamp,kind,detail}:
"1775299756","step-complete","Completed step-1"
"1775299853","step-complete","Completed step-2"
"1775299897","step-complete","Completed step-2"
"1775300068","step-complete","Completed step-3"
"1775300173","step-complete","Completed step-4"
"1775300488","step-complete","Completed step-4"
"1775300610","step-complete","Completed step-5"
"1775300806","step-complete","Completed step-6"
notes[4]: "Recovered stale active step state for longview-planner. Reset step-2 to todo.","Recovered stale active step state for longview-planner. Reset step-3 to todo.","Recovered stale active step state for longview-planner. Reset step-4 to todo.","Recovered stale active step state for longview-planner. Reset step-5 to todo."
planning_session:
pending_question: null
transcript[2]{role,content}:
user,"Improve the goal planner when creating a new task. It should pass through a PO personality, a senior engineer personality, a engineer who works on the codebase in 2 years. This is to improve code and prevent the loop from writing spaghetti code that passes verification and tests barely, but is unable to be iterated upon"
assistant,Planning completed
started_at: "1775299715"
last_usage_refresh_at: "1775300358"
last_usage_input_tokens: null
last_usage_output_tokens: null
last_usage_primary_window: null
last_usage_secondary_window: null
run_model: "gpt-5.3-codex-spark"
fast_mode: true
allow_branching: false