feat(autoplan): eng review always runs last — the gate reviews the final amended plan

Reorder the pipeline to CEO -> Design (if UI scope) -> DX (if developer-facing
scope) -> Eng. The old order (CEO -> Design -> Eng -> DX) let DX findings land
AFTER the required gate signed off, so eng validated a stale plan.

Accept-all semantics made explicit: every AskUserQuestion resolves to the
recommended option; premises no longer pause the pipeline mid-run (clearly-wrong
ones queue as User-Challenge items at the single Final Approval Gate). Eng's
Codex voice now sees the DX consensus summary. New free static test pins the
order; the chain E2E gains DX-between and Eng-terminal assertions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Garry Tan
2026-08-28 01:41:29 +00:00
co-authored by Claude Fable 5
parent 394db326f2
commit 848973007c
11 changed files with 216 additions and 104 deletions
+8 -5
View File
@@ -5,9 +5,11 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
**Override rules:**
- Mode selection: SELECTIVE EXPANSION
- Premises: accept reasonable ones (P6), challenge only clearly wrong ones
- **GATE: Present premises to user for confirmation** — this is the ONE AskUserQuestion
that is NOT auto-decided. Premises require human judgment.
- Premises: accept reasonable ones (P6). Clearly-wrong or challenged premises are
NOT a mid-run stop — queue each as a User-Challenge-shaped item for the Final
Approval Gate (Phase 4): what the plan assumes, why it looks wrong, and the cost
of proceeding anyway. Premises still require human judgment — the human exercises
it at the gate, exactly once, not mid-pipeline.
- Alternatives: pick highest completeness (P1). If tied, pick simplest (P5).
If top 2 are close → mark TASTE DECISION.
- Scope expansion: in blast radius + <1d CC → approve (P2). Outside → defer to TODOS.md (P3).
@@ -112,5 +114,6 @@ Sections 1-10 — for EACH section, run the evaluation criteria from the loaded
> Consensus: [X/6 confirmed, Y disagreements → surfaced at gate].
> Passing to Phase 2.
Do NOT begin Phase 2 until all Phase 1 outputs are written to the plan file
and the premise gate has been passed.
Do NOT begin Phase 2 until all Phase 1 outputs are written to the plan file,
including the premise assessment (queued premise challenges travel to the
Final Gate — they never pause the pipeline here).
+8 -5
View File
@@ -3,9 +3,11 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
**Override rules:**
- Mode selection: SELECTIVE EXPANSION
- Premises: accept reasonable ones (P6), challenge only clearly wrong ones
- **GATE: Present premises to user for confirmation** — this is the ONE AskUserQuestion
that is NOT auto-decided. Premises require human judgment.
- Premises: accept reasonable ones (P6). Clearly-wrong or challenged premises are
NOT a mid-run stop — queue each as a User-Challenge-shaped item for the Final
Approval Gate (Phase 4): what the plan assumes, why it looks wrong, and the cost
of proceeding anyway. Premises still require human judgment — the human exercises
it at the gate, exactly once, not mid-pipeline.
- Alternatives: pick highest completeness (P1). If tied, pick simplest (P5).
If top 2 are close → mark TASTE DECISION.
- Scope expansion: in blast radius + <1d CC → approve (P2). Outside → defer to TODOS.md (P3).
@@ -110,5 +112,6 @@ Sections 1-10 — for EACH section, run the evaluation criteria from the loaded
> Consensus: [X/6 confirmed, Y disagreements → surfaced at gate].
> Passing to Phase 2.
Do NOT begin Phase 2 until all Phase 1 outputs are written to the plan file
and the premise gate has been passed.
Do NOT begin Phase 2 until all Phase 1 outputs are written to the plan file,
including the premise assessment (queued premise challenges travel to the
Final Gate — they never pause the pipeline here).
+4 -4
View File
@@ -87,15 +87,15 @@ Missing voice = N/A (not CONFIRMED). Single critical finding from one voice = fl
4. DX Scorecard: Produce the full scorecard with all 8 dimensions scored.
**Mandatory outputs from Phase 3.5:**
**Mandatory outputs from Phase 2.5:**
- Developer journey map (9-stage table)
- Developer empathy narrative (first-person perspective)
- DX Scorecard with all 8 dimension scores
- DX Implementation Checklist
- TTHW assessment with target
**PHASE 3.5 COMPLETE.** Emit phase-transition summary:
> **Phase 3.5 complete.** DX overall: [N]/10. TTHW: [N] min → [target] min.
**PHASE 2.5 COMPLETE.** Emit phase-transition summary:
> **Phase 2.5 complete.** DX overall: [N]/10. TTHW: [N] min → [target] min.
> Codex: [N concerns]. Claude subagent: [N issues].
> Consensus: [X/6 confirmed, Y disagreements → surfaced at gate].
> Passing to Phase 4 (Final Gate).
> Passing to Phase 3 (Eng Review — the required gate reviews the final amended plan).
+4 -4
View File
@@ -85,15 +85,15 @@ Missing voice = N/A (not CONFIRMED). Single critical finding from one voice = fl
4. DX Scorecard: Produce the full scorecard with all 8 dimensions scored.
**Mandatory outputs from Phase 3.5:**
**Mandatory outputs from Phase 2.5:**
- Developer journey map (9-stage table)
- Developer empathy narrative (first-person perspective)
- DX Scorecard with all 8 dimension scores
- DX Implementation Checklist
- TTHW assessment with target
**PHASE 3.5 COMPLETE.** Emit phase-transition summary:
> **Phase 3.5 complete.** DX overall: [N]/10. TTHW: [N] min → [target] min.
**PHASE 2.5 COMPLETE.** Emit phase-transition summary:
> **Phase 2.5 complete.** DX overall: [N]/10. TTHW: [N] min → [target] min.
> Codex: [N concerns]. Claude subagent: [N issues].
> Consensus: [X/6 confirmed, Y disagreements → surfaced at gate].
> Passing to Phase 4 (Final Gate).
> Passing to Phase 3 (Eng Review — the required gate reviews the final amended plan).
+3 -2
View File
@@ -18,6 +18,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
Also consider these findings from prior review phases:
CEO: <insert CEO consensus table summary — key concerns, DISAGREEs>
Design: <insert Design consensus table summary, or 'skipped, no UI scope'>
DX: <insert DX consensus table summary, or 'skipped, no developer-facing scope'>
File: <plan_path>" -C "$_REPO_ROOT" -s read-only -c 'web_search="cached"' < /dev/null
_CODEX_EXIT=$?
@@ -45,7 +46,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
- Architecture choices: explicit over clever (P5). If codex disagrees with valid reason → TASTE DECISION. Scope changes both models agree on → USER CHALLENGE.
- Evals: always include all relevant suites (P1)
- Test plan: generate artifact at `~/.gstack/projects/$SLUG/{user}-{branch}-test-plan-{datetime}.md`
- TODOS.md: collect all deferred scope expansions from Phase 1, auto-write
- TODOS.md: collect all deferred scope expansions from every prior phase (Eng runs last), auto-write
**Required execution checklist (Eng):**
@@ -105,4 +106,4 @@ Missing voice = N/A (not CONFIRMED). Single critical finding from one voice = fl
**PHASE 3 COMPLETE.** Emit phase-transition summary:
> **Phase 3 complete.** Codex: [N concerns]. Claude subagent: [N issues].
> Consensus: [X/6 confirmed, Y disagreements → surfaced at gate].
> Passing to Phase 3.5 (DX Review) or Phase 4 (Final Gate).
> Passing to Phase 4 (Final Gate).
+3 -2
View File
@@ -16,6 +16,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
Also consider these findings from prior review phases:
CEO: <insert CEO consensus table summary — key concerns, DISAGREEs>
Design: <insert Design consensus table summary, or 'skipped, no UI scope'>
DX: <insert DX consensus table summary, or 'skipped, no developer-facing scope'>
File: <plan_path>" -C "$_REPO_ROOT" -s read-only {{CODEX_WEB_SEARCH_FLAG}} < /dev/null
_CODEX_EXIT=$?
@@ -43,7 +44,7 @@ Override: every AskUserQuestion → auto-decide using the 6 principles.
- Architecture choices: explicit over clever (P5). If codex disagrees with valid reason → TASTE DECISION. Scope changes both models agree on → USER CHALLENGE.
- Evals: always include all relevant suites (P1)
- Test plan: generate artifact at `~/.gstack/projects/$SLUG/{user}-{branch}-test-plan-{datetime}.md`
- TODOS.md: collect all deferred scope expansions from Phase 1, auto-write
- TODOS.md: collect all deferred scope expansions from every prior phase (Eng runs last), auto-write
**Required execution checklist (Eng):**
@@ -103,4 +104,4 @@ Missing voice = N/A (not CONFIRMED). Single critical finding from one voice = fl
**PHASE 3 COMPLETE.** Emit phase-transition summary:
> **Phase 3 complete.** Codex: [N concerns]. Claude subagent: [N issues].
> Consensus: [X/6 confirmed, Y disagreements → surfaced at gate].
> Passing to Phase 3.5 (DX Review) or Phase 4 (Final Gate).
> Passing to Phase 4 (Final Gate).
+3 -3
View File
@@ -2,7 +2,7 @@
"$schema": "https://gstack.dev/schemas/section-manifest.json",
"skill": "autoplan",
"version": 1,
"note": "PASSIVE registry (v2 plan T9 / CM2). Fields are IDs, file paths, human titles, and human-readable trigger text ONLY. The skeleton's phase sequencing (Sequential Execution + the Phase 0 UI/DX scope detection) is the ONLY place that decides WHEN to read a section — Phase 2 and Phase 3.5 are conditional and their sections must NOT be read when their scope is absent; required-reads live in the E2E fixtures. No machine predicate here — see docs/designs/v2_PLAN.md:663.",
"note": "PASSIVE registry (v2 plan T9 / CM2). Fields are IDs, file paths, human titles, and human-readable trigger text ONLY. The skeleton's phase sequencing (Sequential Execution + the Phase 0 UI/DX scope detection) is the ONLY place that decides WHEN to read a section — Phase 2 and Phase 2.5 are conditional and their sections must NOT be read when their scope is absent; required-reads live in the E2E fixtures. No machine predicate here — see docs/designs/v2_PLAN.md:663.",
"sections": [
{
"id": "ceo-phase",
@@ -25,8 +25,8 @@
{
"id": "dx-phase",
"file": "dx-phase.md",
"title": "Phase 3.5: DX review — override rules, dual voices, 8-dimension scorecard",
"trigger": "starting Phase 3.5 (DX review — ONLY if developer-facing scope was detected in Phase 0; skip the read entirely otherwise)"
"title": "Phase 2.5: DX review — override rules, dual voices, 8-dimension scorecard",
"trigger": "starting Phase 2.5 (DX review — ONLY if developer-facing scope was detected in Phase 0; skip the read entirely otherwise)"
},
{
"id": "tasks-aggregator",