create-issflow 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/README.md +56 -41
  2. package/bin/cli.js +259 -96
  3. package/package.json +28 -23
  4. package/template/.claude/agents/debugger.md +47 -47
  5. package/template/.claude/agents/e2e-runner.md +66 -56
  6. package/template/.claude/agents/implementer.md +75 -75
  7. package/template/.claude/agents/planner.md +71 -65
  8. package/template/.claude/agents/researcher.md +103 -103
  9. package/template/.claude/agents/synthesizer.md +72 -72
  10. package/template/.claude/agents/test-author.md +70 -70
  11. package/template/.claude/commands/log-decision.md +33 -33
  12. package/template/.claude/commands/log-issue.md +28 -28
  13. package/template/.claude/commands/overview.md +99 -98
  14. package/template/.claude/commands/phase.md +202 -191
  15. package/template/.claude/commands/quick.md +30 -30
  16. package/template/.claude/commands/replan.md +63 -63
  17. package/template/.claude/commands/store-wisdom.md +195 -194
  18. package/template/.claude/commands/synthesize.md +26 -26
  19. package/template/.claude/commands/unstuck.md +40 -40
  20. package/template/.claude/hooks/pre-compact.sh +25 -25
  21. package/template/.claude/hooks/session-start.sh +120 -120
  22. package/template/.claude/hooks/subagent-stop.sh +11 -11
  23. package/template/.claude/istartsoft-flow/METHODOLOGY.md +229 -214
  24. package/template/.claude/skills/caveman/SKILL.md +39 -39
  25. package/template/.claude/skills/grill-me/SKILL.md +10 -10
  26. package/template/.claude/skills/karpathy-guidelines/SKILL.md +34 -34
  27. package/template/.claude/skills/ux-design/SKILL.md +99 -0
  28. package/template/.claude/skills/ux-design/wireframe-template.md +95 -0
@@ -1,191 +1,202 @@
1
- ---
2
- description: Run one phase end-to-end. TDD phases run SCAFFOLD -> RED -> GREEN; non-TDD phases run IMPLEMENT -> TEST. Both with the debug circuit breaker and the regression guard at CLOSE.
3
- argument-hint: [phase number]
4
- ---
5
-
6
- Caveman ULTRA mode. You are the ORCHESTRATOR. Route work to subagents —
7
- you do NOT implement or debug yourself.
8
-
9
- Note: subagents cannot talk to the user. Only YOU can.
10
-
11
- Target phase: $ARGUMENTS (default: the phase marked pending in docs/PLAN.md)
12
-
13
- ---
14
-
15
- ## 0. PRE-FLIGHT
16
-
17
- a. INFRA CHECK (phases > 0):
18
-
19
- b. PHASE STATE CHECK: Read docs/STATE.md and docs/PLAN.md.
20
- - No phase in progress, requested is next pending -> START at step 1.
21
- - Same phase in-progress -> RESUME from STATE.md "next action".
22
- - Different phase in-progress -> STOP. Tell me which phase is open.
23
- - Out of dependency order -> STOP. Warn, proceed only if I confirm.
24
- - Phase not in PLAN.md -> STOP. Suggest /overview or /replan.
25
-
26
- c. FINAL PHASE CHECK: Read docs/PLAN.md. Is this the last phase (no further
27
- pending phases after this one)? Record this as IS_FINAL_PHASE=true/false.
28
-
29
-
30
- ---
31
-
32
- ## 1. RESEARCH + TDD APPLICABILITY
33
-
34
- Dispatch `researcher` in IMPL mode scoped to this phase.
35
- Returns terse summary + path. Read the file only if needed.
36
- Unknowns block the phase -> re-dispatch narrowed. No guessing.
37
-
38
- Then classify the phase:
39
-
40
- `TDD_PHASE` = the phase adds or changes a PUBLIC CALLABLE SURFACE (endpoint,
41
- exported function/class, CLI command, message contract) assertable from the
42
- acceptance spec. Size is NOT the criterion.
43
-
44
- - Clear public surface -> `TDD_PHASE=true` -> run the TDD path (§2 → §3a → §3b).
45
- - Pure infra/config/doc, no public surface -> `TDD_PHASE=false` -> run the
46
- non-TDD path (§2N → §3N).
47
- - AMBIGUOUS -> default `TDD_PHASE=true`, but STATE the classification + the reason
48
- to me, so I can override to non-TDD BEFORE SCAFFOLD fires. (Hard rule 11: never
49
- downgrade a TDD phase just to dodge the RED gate.)
50
-
51
- =====================================================================
52
- ## TDD PATH (TDD_PHASE=true)
53
- =====================================================================
54
-
55
- ## 2. SCAFFOLD
56
-
57
- Dispatch `implementer` in SCAFFOLD mode: interface stubs only (signatures +
58
- types; bodies raise NotImplementedError / return 501); NO logic, NO tests.
59
- Returns the stub files + the interface surface.
60
-
61
- ## 3a. RED
62
-
63
- Dispatch `test-author` to write the REAL API suite (+ mock) BLIND against the
64
- stubs + acceptance. Place contract/ENDPOINTS tests in `tests/regression/`,
65
- phase-local tests in `tests/phase-<n>/`. Run the suite.
66
-
67
- RED GATE = every acceptance test COLLECTS cleanly AND FAILS (assertion /
68
- NotImplemented).
69
- - Any test PASSES on stubs -> STOP (spec trivial or test wrong); show me.
70
- - Collection / import / syntax error -> stub mismatch; re-dispatch SCAFFOLD to
71
- fix SIGNATURES (not logic); re-run.
72
- - UNDERSPEC -> STOP; ask me to sharpen the acceptance spec.
73
-
74
- ## 3b. GREEN
75
-
76
- Dispatch `implementer` in FILL mode with the phase spec + research + the test
77
- file paths (it MAY read the tests — frozen before logic, no overfit — but must
78
- NOT edit them). Fill to green. Budget 3, WARN@2, STUCK@3.
79
-
80
- `scripts/e2e-stack.sh up` / Playwright / `down`).
81
-
82
- PHASE GATE (rule 5) -> go to §4/§5/§6 (see GATE below).
83
-
84
- =====================================================================
85
- ## NON-TDD PATH (TDD_PHASE=false)
86
- =====================================================================
87
-
88
- ## 2N. IMPLEMENT
89
-
90
- Dispatch `implementer` (legacy mode) with phase spec + research summary.
91
- Returns STUCK -> go to ESCALATE.
92
- If IS_FINAL_PHASE: phase spec includes the deploy task; confirm the return
93
- includes "deployed URL" before proceeding.
94
-
95
- ## 3N. TEST (blind)
96
-
97
- Dispatch `test-author`. It writes MOCK + REAL API suites from the acceptance
98
- spec — never reads the logic. (e2e-runner only if frontend.)
99
-
100
- =====================================================================
101
-
102
- ## GATE (both paths)
103
-
104
- PHASE GATE = current-phase REAL API suite passes AND (if frontend) E2E passes AND
105
- the accumulated mock regression corpus stays green AND every docs/ENDPOINTS.md
106
- entry has a regression test (checked at CLOSE).
107
- - GATE PASS -> go to CLOSE.
108
- - GATE FAIL (LOGIC FAIL) -> go to FIX.
109
-
110
- ---
111
-
112
- ## 4. FIX
113
-
114
- Dispatch `debugger` (isolated context) on the specific failure.
115
- - FIXED -> re-run TEST (and the regression corpus).
116
- - WARN (2 attempts failed) -> relay immediately, then let debugger finish attempt 3.
117
- - STUCK -> go to ESCALATE.
118
-
119
- ---
120
-
121
- ## 5. ESCALATE — circuit breaker. Mode B.
122
-
123
- FIRST STUCK: STOP. Present to me: the problem, 3 failed hypotheses, the
124
- debugger's recommendation, the debug file path. Ask what to do. Wait. Options:
125
- (a) "re-research" -> /unstuck
126
- (b) hint -> re-dispatch debugger with hint, budget 3
127
- (c) "skip" / "re-slice" -> mark blocked, dispatch planner
128
-
129
- SECOND STUCK: STOP completely. Full summary — every hypothesis, current state,
130
- what to try next. Hand control to me.
131
-
132
- ---
133
-
134
- ## 6. CLOSE
135
-
136
- REGRESSION GATE (before closing Feature 3):
137
- - Run `scripts/regression.sh` (mock corpus). A failure BLOCKS close -> route to FIX.
138
- - ENDPOINTS COVERAGE: every `docs/ENDPOINTS.md` entry MUST have >=1 test in
139
- `tests/regression/`. Zero coverage -> FAIL HARD; do not close.
140
- - IF IS_FINAL_PHASE: additionally run `scripts/regression.sh --real` (full real
141
- corpus). A failure blocks close.
142
-
143
- Mark phase `done` in docs/PLAN.md.
144
-
145
- ARCHITECTURE SELF-CHECK: did this phase add/remove/rename an agent, hook, or
146
- command, or change a workflow rule? YES -> run `/log-decision`. NO -> state why not.
147
-
148
- IF IS_FINAL_PHASE FINAL CLOSE sequence:
149
-
150
- a. Run `/synthesize` pass the signal that this is the final phase so the
151
- synthesizer runs the extended pass (OVERVIEW.md + README.md update).
152
-
153
- b. Read docs/ENDPOINTS.md. Surface a "READY TO USE" summary to me:
154
- ```
155
- ✅ PROJECT COMPLETE
156
-
157
-
158
- ## Endpoints
159
- <paste the full docs/ENDPOINTS.md table>
160
-
161
- ## Quick start
162
- - Base URL: <URL>
163
- - Auth: <Bearer token / API key / none — from ENDPOINTS.md>
164
- - Health check: GET <base URL>/health
165
-
166
- ## Docs
167
- - Full endpoint catalogue: docs/ENDPOINTS.md
168
- - Project history: docs/HISTORY.md
169
- ```
170
- Tell me the project is complete and ready to use.
171
-
172
- ELSE (not final phase):
173
-
174
- Run `/synthesize`.
175
- Tell me phase done + the next phase. Recommend `/clear` then `/phase` next.
176
-
177
- ---
178
-
179
- ## STATE CHECKPOINTING
180
-
181
- After each step, update docs/STATE.md:
182
- ```
183
-
184
- phase: <n> (in progress)
185
- tdd: <true|false>
186
- completed: <steps done so far>
187
- next: <exact next step>
188
- blocker: <none or open issue>
189
-
190
- ```
191
- Keep STATE.md small — overwrite, do not append.
1
+ ---
2
+ description: Run one phase end-to-end. TDD phases run SCAFFOLD -> RED -> GREEN; non-TDD phases run IMPLEMENT -> TEST. Both with the debug circuit breaker and the regression guard at CLOSE.
3
+ argument-hint: [phase number]
4
+ ---
5
+
6
+ Caveman ULTRA mode. You are the ORCHESTRATOR. Route work to subagents —
7
+ you do NOT implement or debug yourself.
8
+
9
+ Note: subagents cannot talk to the user. Only YOU can.
10
+
11
+ Target phase: $ARGUMENTS (default: the phase marked pending in docs/PLAN.md)
12
+
13
+ ---
14
+
15
+ ## 0. PRE-FLIGHT
16
+
17
+ a. INFRA CHECK (phases > 0): Read the declared infra in docs/OVERVIEW.md.
18
+ - Managed infra -> confirm it is reachable; no provisioning step is needed.
19
+ - Self-managed infra -> confirm Phase 0 (infra) ran and is healthy.
20
+ Surface infra + auth status before any work. Blocked infra -> STOP.
21
+
22
+ b. PHASE STATE CHECK: Read docs/STATE.md and docs/PLAN.md.
23
+ - No phase in progress, requested is next pending -> START at step 1.
24
+ - Same phase in-progress -> RESUME from STATE.md "next action".
25
+ - Different phase in-progress -> STOP. Tell me which phase is open.
26
+ - Out of dependency order -> STOP. Warn, proceed only if I confirm.
27
+ - Phase not in PLAN.md -> STOP. Suggest /overview or /replan.
28
+
29
+ c. FINAL PHASE CHECK: Read docs/PLAN.md. Is this the last phase (no further
30
+ pending phases after this one)? Record this as IS_FINAL_PHASE=true/false.
31
+
32
+
33
+ ---
34
+
35
+ ## 1. RESEARCH + TDD APPLICABILITY
36
+
37
+ Dispatch `researcher` in IMPL mode scoped to this phase.
38
+ Returns terse summary + path. Read the file only if needed.
39
+ Unknowns block the phase -> re-dispatch narrowed. No guessing.
40
+
41
+ Then classify the phase:
42
+
43
+ `TDD_PHASE` = the phase adds or changes a PUBLIC CALLABLE SURFACE (endpoint,
44
+ exported function/class, CLI command, message contract) assertable from the
45
+ acceptance spec. Size is NOT the criterion.
46
+
47
+ - Clear public surface -> `TDD_PHASE=true` -> run the TDD path (§2 → §3a → §3b).
48
+ - Pure infra/config/doc, no public surface -> `TDD_PHASE=false` -> run the
49
+ non-TDD path (§2N §3N).
50
+ - AMBIGUOUS -> default `TDD_PHASE=true`, but STATE the classification + the reason
51
+ to me, so I can override to non-TDD BEFORE SCAFFOLD fires. (Hard rule 11: never
52
+ downgrade a TDD phase just to dodge the RED gate.)
53
+
54
+ =====================================================================
55
+ ## TDD PATH (TDD_PHASE=true)
56
+ =====================================================================
57
+
58
+ ## 2. SCAFFOLD
59
+
60
+ Dispatch `implementer` in SCAFFOLD mode: interface stubs only (signatures +
61
+ types; bodies raise NotImplementedError / return 501); NO logic, NO tests.
62
+ Returns the stub files + the interface surface.
63
+
64
+ ## 3a. RED
65
+
66
+ Dispatch `test-author` to write the REAL API suite (+ mock) BLIND against the
67
+ stubs + acceptance. Place contract/ENDPOINTS tests in `tests/regression/`,
68
+ phase-local tests in `tests/phase-<n>/`. Run the suite.
69
+
70
+ RED GATE = every acceptance test COLLECTS cleanly AND FAILS (assertion /
71
+ NotImplemented).
72
+ - Any test PASSES on stubs -> STOP (spec trivial or test wrong); show me.
73
+ - Collection / import / syntax error -> stub mismatch; re-dispatch SCAFFOLD to
74
+ fix SIGNATURES (not logic); re-run.
75
+ - UNDERSPEC -> STOP; ask me to sharpen the acceptance spec.
76
+
77
+ ## 3b. GREEN
78
+
79
+ Dispatch `implementer` in FILL mode with the phase spec + research + the test
80
+ file paths (it MAY read the tests — frozen before logic, no overfit — but must
81
+ NOT edit them). Fill to green. Budget 3, WARN@2, STUCK@3.
82
+
83
+ ## 3c. TEST (e2e) — FRONTEND phases only
84
+
85
+ If this phase ships UI: dispatch `e2e-runner` (BLIND) to write + run browser E2E
86
+ for the slice using the declared E2E runner (it brings the test stack up/down
87
+ itself). Then run the `ux-design` cookbook + wireframe check on the new UI
88
+ (hard rule 9): the UI must match the wireframe frame and pass the cookbook
89
+ (tokens, a11y/WCAG AA, states, breakpoints). A `ux-design` BLOCK is a GATE FAIL.
90
+ Non-frontend phase -> skip §3c.
91
+
92
+ PHASE GATE (rule 5) -> go to §4/§5/§6 (see GATE below).
93
+
94
+ =====================================================================
95
+ ## NON-TDD PATH (TDD_PHASE=false)
96
+ =====================================================================
97
+
98
+ ## 2N. IMPLEMENT
99
+
100
+ Dispatch `implementer` (legacy mode) with phase spec + research summary.
101
+ Returns STUCK -> go to ESCALATE.
102
+ If IS_FINAL_PHASE: phase spec includes the deploy task; confirm the return
103
+ includes "deployed URL" before proceeding.
104
+
105
+ ## 3N. TEST (blind)
106
+
107
+ Dispatch `test-author`. It writes MOCK + REAL API suites from the acceptance
108
+ spec never reads the logic. (e2e-runner only if frontend.)
109
+
110
+ =====================================================================
111
+
112
+ ## GATE (both paths)
113
+
114
+ PHASE GATE = current-phase REAL API suite passes AND (if frontend) E2E passes AND
115
+ (if frontend) the `ux-design` cookbook + wireframe check passes AND the
116
+ accumulated mock regression corpus stays green AND every docs/ENDPOINTS.md
117
+ entry has a regression test (checked at CLOSE).
118
+ - GATE PASS -> go to CLOSE.
119
+ - GATE FAIL (LOGIC FAIL) -> go to FIX.
120
+
121
+ ---
122
+
123
+ ## 4. FIX
124
+
125
+ Dispatch `debugger` (isolated context) on the specific failure.
126
+ - FIXED -> re-run TEST (and the regression corpus).
127
+ - WARN (2 attempts failed) -> relay immediately, then let debugger finish attempt 3.
128
+ - STUCK -> go to ESCALATE.
129
+
130
+ ---
131
+
132
+ ## 5. ESCALATE — circuit breaker. Mode B.
133
+
134
+ FIRST STUCK: STOP. Present to me: the problem, 3 failed hypotheses, the
135
+ debugger's recommendation, the debug file path. Ask what to do. Wait. Options:
136
+ (a) "re-research" -> /unstuck
137
+ (b) hint -> re-dispatch debugger with hint, budget 3
138
+ (c) "skip" / "re-slice" -> mark blocked, dispatch planner
139
+
140
+ SECOND STUCK: STOP completely. Full summary — every hypothesis, current state,
141
+ what to try next. Hand control to me.
142
+
143
+ ---
144
+
145
+ ## 6. CLOSE
146
+
147
+ REGRESSION GATE (before closing — Feature 3):
148
+ - Run `scripts/regression.sh` (mock corpus). A failure BLOCKS close -> route to FIX.
149
+ - ENDPOINTS COVERAGE: every `docs/ENDPOINTS.md` entry MUST have >=1 test in
150
+ `tests/regression/`. Zero coverage -> FAIL HARD; do not close.
151
+ - IF IS_FINAL_PHASE: additionally run `scripts/regression.sh --real` (full real
152
+ corpus). A failure blocks close.
153
+
154
+ Mark phase `done` in docs/PLAN.md.
155
+
156
+ ARCHITECTURE SELF-CHECK: did this phase add/remove/rename an agent, hook, or
157
+ command, or change a workflow rule? YES -> run `/log-decision`. NO -> state why not.
158
+
159
+ IF IS_FINAL_PHASE FINAL CLOSE sequence:
160
+
161
+ a. Run `/synthesize` — pass the signal that this is the final phase so the
162
+ synthesizer runs the extended pass (OVERVIEW.md + README.md update).
163
+
164
+ b. Read docs/ENDPOINTS.md. Surface a "READY TO USE" summary to me:
165
+ ```
166
+ PROJECT COMPLETE
167
+
168
+
169
+ ## Endpoints
170
+ <paste the full docs/ENDPOINTS.md table>
171
+
172
+ ## Quick start
173
+ - Base URL: <URL>
174
+ - Auth: <Bearer token / API key / none — from ENDPOINTS.md>
175
+ - Health check: GET <base URL>/health
176
+
177
+ ## Docs
178
+ - Full endpoint catalogue: docs/ENDPOINTS.md
179
+ - Project history: docs/HISTORY.md
180
+ ```
181
+ Tell me the project is complete and ready to use.
182
+
183
+ ELSE (not final phase):
184
+
185
+ Run `/synthesize`.
186
+ Tell me phase done + the next phase. Recommend `/clear` then `/phase` next.
187
+
188
+ ---
189
+
190
+ ## STATE CHECKPOINTING
191
+
192
+ After each step, update docs/STATE.md:
193
+ ```
194
+
195
+ phase: <n> (in progress)
196
+ tdd: <true|false>
197
+ completed: <steps done so far>
198
+ next: <exact next step>
199
+ blocker: <none or open issue>
200
+
201
+ ```
202
+ Keep STATE.md small — overwrite, do not append.
@@ -1,30 +1,30 @@
1
- ---
2
- description: Make a small, obvious change directly — no agent chain, no phase overhead.
3
- argument-hint: [what to change]
4
- ---
5
-
6
- Caveman ULTRA mode. Apply `karpathy-guidelines` skill.
7
-
8
- Purpose: skip the orchestration tax for a 5-line fix.
9
-
10
- Use `/quick` when ALL hold:
11
- - change is small (under 30 lines) and obvious
12
- - no new vertical slice
13
- - no external service contract change
14
- - not mid-phase
15
-
16
- If any fail -> STOP, tell me, recommend `/phase`.
17
- (Hard rule 11: never route phase-worthy work through `/quick` to dodge the RED gate.)
18
-
19
- Steps:
20
- 1. grep docs/ISSUES.md for anything related.
21
- 2. Make the change. Smallest diff that works.
22
- 3. Run it — lint/typecheck/smoke. Show me result.
23
- 4. REGRESSION GUARD: run `scripts/regression.sh` (mock corpus). A break BLOCKS the
24
- `/quick` — surface it to me and stop. No agent chain is added.
25
- 5. Error you cannot fix in 2 tries -> STOP. Recommend `/phase`.
26
- 6. Change revealed a bug -> `/log-issue`.
27
- 7. ARCHITECTURE SELF-CHECK: touched an agent, hook, command, or workflow rule?
28
- YES -> `/log-decision`.
29
-
30
- No STATE.md rewrite, no synthesize, no /clear needed.
1
+ ---
2
+ description: Make a small, obvious change directly — no agent chain, no phase overhead.
3
+ argument-hint: [what to change]
4
+ ---
5
+
6
+ Caveman ULTRA mode. Apply `karpathy-guidelines` skill.
7
+
8
+ Purpose: skip the orchestration tax for a 5-line fix.
9
+
10
+ Use `/quick` when ALL hold:
11
+ - change is small (under 30 lines) and obvious
12
+ - no new vertical slice
13
+ - no external service contract change
14
+ - not mid-phase
15
+
16
+ If any fail -> STOP, tell me, recommend `/phase`.
17
+ (Hard rule 11: never route phase-worthy work through `/quick` to dodge the RED gate.)
18
+
19
+ Steps:
20
+ 1. grep docs/ISSUES.md for anything related.
21
+ 2. Make the change. Smallest diff that works.
22
+ 3. Run it — lint/typecheck/smoke. Show me result.
23
+ 4. REGRESSION GUARD: run `scripts/regression.sh` (mock corpus). A break BLOCKS the
24
+ `/quick` — surface it to me and stop. No agent chain is added.
25
+ 5. Error you cannot fix in 2 tries -> STOP. Recommend `/phase`.
26
+ 6. Change revealed a bug -> `/log-issue`.
27
+ 7. ARCHITECTURE SELF-CHECK: touched an agent, hook, command, or workflow rule?
28
+ YES -> `/log-decision`.
29
+
30
+ No STATE.md rewrite, no synthesize, no /clear needed.
@@ -1,63 +1,63 @@
1
- ---
2
- description: Revise docs/PLAN.md when it no longer matches reality — add, cut, split, merge, or reorder phases.
3
- argument-hint: [what changed about the plan]
4
- ---
5
-
6
- Caveman ULTRA mode.
7
-
8
- Recommended: run from plan mode (Shift+Tab). Optional; the command stops for
9
- your approval regardless.
10
-
11
- Use when PLAN.md no longer matches reality. Change: $ARGUMENTS
12
-
13
- ---
14
-
15
- ## Steps
16
-
17
- 1. PRE-FLIGHT. Read docs/STATE.md and docs/PLAN.md.
18
- - Phase in progress -> tell me which. Ask: revise around it, or is it the
19
- thing being changed? Do not silently rewrite a mid-execution phase.
20
- - Done phases are FROZEN. /replan never edits or reorders done phases.
21
- - Phase 0 (infra) is ALWAYS frozen once done.
22
-
23
- 2. DESIGN RESEARCH CHECK. Scan $ARGUMENTS for signals that design research
24
- is warranted before re-planning:
25
- - The change involves architecture (a new integration pattern, auth change, etc.)
26
- - A service tier or quota change is implied
27
-
28
- If ANY of these signals are present: dispatch `researcher` in DESIGN mode
29
- with the specific new service/pattern as the DESIGN TOPICS list. Show me the
30
- key findings before proceeding to step 3.
31
-
32
- If none: proceed directly to step 3 (impl-research may still be dispatched
33
- in step 3 for non-trivial changes per the original logic).
34
-
35
- 3. IMPL RESEARCH if needed. If the change is non-trivial but design research
36
- was not needed, dispatch `researcher` in IMPL mode to ground the re-plan
37
- in facts.
38
-
39
- 4. RE-PLAN. Dispatch `planner` with the change + current PLAN.md. It must:
40
- - Keep done phases untouched.
41
- - Insert / cut / split / merge / reorder only PENDING phases.
42
- - Place new phases in correct DEPENDENCY order.
43
- - Keep every phase a vertical slice with its own acceptance spec.
44
- - Ensure the LAST pending phase still contains the deploy task block.
45
- - Renumber pending phases if needed; update STATE.md `phase:` pointer.
46
-
47
- 5. RECONCILE THE REGRESSION CORPUS (scoped to `tests/regression/`):
48
- - A CUT phase -> retire its regression tests.
49
- - A MERGE -> consolidate the merged phases' regression tests.
50
- - A REORDER -> keep the tests as-is (contracts are phase-independent).
51
- Do NOT touch phase-local `tests/phase-<n>/` here beyond renumbering dirs.
52
- After reconciling, run `scripts/regression.sh --real` to confirm the
53
- reconciled corpus still passes against live services. A failure -> surface it
54
- and stop before approval.
55
-
56
- 6. SHOW ME the revised phase list + the regression-corpus changes, and STOP for
57
- approval.
58
-
59
- 7. ARCHITECTURE SELF-CHECK: re-planning is not normally a kit-architecture
60
- change. Only run /log-decision if the workflow itself changed (rare).
61
-
62
- Report what changed: phases added / cut / split / reordered, and regression
63
- tests retired / consolidated.
1
+ ---
2
+ description: Revise docs/PLAN.md when it no longer matches reality — add, cut, split, merge, or reorder phases.
3
+ argument-hint: [what changed about the plan]
4
+ ---
5
+
6
+ Caveman ULTRA mode.
7
+
8
+ Recommended: run from plan mode (Shift+Tab). Optional; the command stops for
9
+ your approval regardless.
10
+
11
+ Use when PLAN.md no longer matches reality. Change: $ARGUMENTS
12
+
13
+ ---
14
+
15
+ ## Steps
16
+
17
+ 1. PRE-FLIGHT. Read docs/STATE.md and docs/PLAN.md.
18
+ - Phase in progress -> tell me which. Ask: revise around it, or is it the
19
+ thing being changed? Do not silently rewrite a mid-execution phase.
20
+ - Done phases are FROZEN. /replan never edits or reorders done phases.
21
+ - Phase 0 (infra), if present, is frozen once done.
22
+
23
+ 2. DESIGN RESEARCH CHECK. Scan $ARGUMENTS for signals that design research
24
+ is warranted before re-planning:
25
+ - The change involves architecture (a new integration pattern, auth change, etc.)
26
+ - A service tier or quota change is implied
27
+
28
+ If ANY of these signals are present: dispatch `researcher` in DESIGN mode
29
+ with the specific new service/pattern as the DESIGN TOPICS list. Show me the
30
+ key findings before proceeding to step 3.
31
+
32
+ If none: proceed directly to step 3 (impl-research may still be dispatched
33
+ in step 3 for non-trivial changes per the original logic).
34
+
35
+ 3. IMPL RESEARCH if needed. If the change is non-trivial but design research
36
+ was not needed, dispatch `researcher` in IMPL mode to ground the re-plan
37
+ in facts.
38
+
39
+ 4. RE-PLAN. Dispatch `planner` with the change + current PLAN.md. It must:
40
+ - Keep done phases untouched.
41
+ - Insert / cut / split / merge / reorder only PENDING phases.
42
+ - Place new phases in correct DEPENDENCY order.
43
+ - Keep every phase a vertical slice with its own acceptance spec.
44
+ - Ensure the LAST pending phase still contains the deploy task block.
45
+ - Renumber pending phases if needed; update STATE.md `phase:` pointer.
46
+
47
+ 5. RECONCILE THE REGRESSION CORPUS (scoped to `tests/regression/`):
48
+ - A CUT phase -> retire its regression tests.
49
+ - A MERGE -> consolidate the merged phases' regression tests.
50
+ - A REORDER -> keep the tests as-is (contracts are phase-independent).
51
+ Do NOT touch phase-local `tests/phase-<n>/` here beyond renumbering dirs.
52
+ After reconciling, run `scripts/regression.sh --real` to confirm the
53
+ reconciled corpus still passes against live services. A failure -> surface it
54
+ and stop before approval.
55
+
56
+ 6. SHOW ME the revised phase list + the regression-corpus changes, and STOP for
57
+ approval.
58
+
59
+ 7. ARCHITECTURE SELF-CHECK: re-planning is not normally a kit-architecture
60
+ change. Only run /log-decision if the workflow itself changed (rare).
61
+
62
+ Report what changed: phases added / cut / split / reordered, and regression
63
+ tests retired / consolidated.