sdlc-framework 2.1.1 → 3.1.0

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.
@@ -78,16 +78,18 @@ Step-by-step:
78
78
  - Option C (do nothing / defer): description, risk of deferring.
79
79
  Ask the user to choose before proceeding.
80
80
 
81
- 5. **Define acceptance criteria in BDD format**
82
- Write Given/When/Then scenarios for each user-facing behavior:
81
+ 5. **Define acceptance criteria in BDD format with verification type**
82
+ Write Given/When/Then scenarios for each user-facing behavior. Every AC MUST include a `Type` field that declares how the verify phase will test it:
83
83
  ```
84
84
  AC-1: [Short title]
85
+ Type: [UI_INTERACTION | API_ENDPOINT | CLI_BEHAVIOR | BUSINESS_LOGIC | DATA_INTEGRITY]
85
86
  Given [precondition]
86
87
  When [action]
87
88
  Then [expected outcome]
88
89
  ```
90
+ The Type field is mandatory — it tells `/sdlc:verify` whether to use Playwright MCP, curl, Bash, the test runner, or DB queries. Without it, the AC will be skipped during verification.
89
91
  Include happy path, error cases, and edge cases.
90
- Present acceptance criteria to the user and ask: "Do these cover all cases? Anything to add or change?"
92
+ Present acceptance criteria with their types to the user and ask: "Do these cover all cases? Are the verification types correct?"
91
93
 
92
94
  6. **Break into tasks with dependency analysis**
93
95
  - List every discrete task needed to implement the spec.
@@ -106,7 +108,16 @@ Step-by-step:
106
108
  - What is OUT of scope.
107
109
  - What is DEFERRED to a future plan.
108
110
 
109
- 8. **Write SPEC.md**
111
+ 8. **Codebase gap analysis — MANDATORY**
112
+ Read every file listed in the task breakdown. Review existing code for:
113
+ - Missing error handling that the spec should cover.
114
+ - Untested code paths that need new ACs.
115
+ - Edge cases the existing code handles but the spec does not mention.
116
+ - Integration risks (callers of modified functions, shared state, exports).
117
+ - Validation gaps at system boundaries.
118
+ Present a gap report to the user. Add new ACs (with verification_type) and update tasks for every gap found.
119
+
120
+ 9. **Write SPEC.md**
110
121
  Create .sdlc/specs/SPEC-<plan-id>.md with:
111
122
  ```
112
123
  # Spec: <title>
@@ -123,45 +134,51 @@ Step-by-step:
123
134
  ## Engineering Constraints (from LAWS.md)
124
135
  ```
125
136
 
126
- 9. **Spec integrity review — MANDATORY, DO NOT SKIP**
127
- You MUST print a full integrity review table with ✓/✗ for EACH check:
128
- - CHECK 1 — COMPLETENESS: every task has name, action, files, verification, done criteria, complexity. Every AC has numbered GIVEN/WHEN/THEN with specific values.
129
- - CHECK 2 — CONSISTENCY: no orphan tasks (every task → AC), no orphan ACs (every AC → task), no boundary violations, no DAG cycles, no shared-file parallel writes.
130
- - CHECK 3 — CONTRADICTIONS: no conflicting ACs for same input, no conflicting task actions on same function, no task contradicting boundary, no AC contradicting PROJECT.md constraints.
131
- - CHECK 4 — FEASIBILITY: task count 2-5, estimated change under ~300 lines, all referenced files exist.
132
- - CHECK 5 — DEPENDENCY GRAPH: every task in exactly one wave, ordering matches dependencies, independent tasks parallelized, dependent tasks sequenced.
133
- - Print the full review table with all results. Fix any failures before proceeding.
134
-
135
- 10. **User approval gate** (BLOCKING cannot proceed without approval)
137
+ 10. **Spec integrity review — MANDATORY, DO NOT SKIP**
138
+ You MUST print a full integrity review table with ✓/✗ for EACH check:
139
+ - CHECK 1 — COMPLETENESS: every task has name, action, files, verification, done criteria, complexity. Every AC has numbered Type/GIVEN/WHEN/THEN with specific values.
140
+ - CHECK 2 — CONSISTENCY: no orphan tasks (every task → AC), no orphan ACs (every AC → task), no boundary violations, no DAG cycles, no shared-file parallel writes.
141
+ - CHECK 3 — CONTRADICTIONS: no conflicting ACs for same input, no conflicting task actions on same function, no task contradicting boundary, no AC contradicting PROJECT.md constraints.
142
+ - CHECK 4 — FEASIBILITY: task count 2-5, estimated change under ~300 lines, all referenced files exist.
143
+ - CHECK 5 — DEPENDENCY GRAPH: every task in exactly one wave, ordering matches dependencies, independent tasks parallelized, dependent tasks sequenced.
144
+ - CHECK 6 VERIFICATION TYPES: every AC has a valid Type field (UI_INTERACTION, API_ENDPOINT, CLI_BEHAVIOR, BUSINESS_LOGIC, DATA_INTEGRITY). Type matches AC content.
145
+ - CHECK 7 — GAP ANALYSIS: codebase gap analysis was performed, gaps were reported, and findings were incorporated into ACs/tasks.
146
+ - Print the full review table with all results. Fix any failures before proceeding.
147
+
148
+ 11. **User approval gate** (BLOCKING — cannot proceed without approval)
136
149
  - Present full spec summary AND integrity review results to user
137
150
  - User options: APPROVE (proceed), REVISE (change and re-review), REJECT (discard)
138
151
  - If REVISE: apply changes, re-run ALL integrity checks, re-present
139
152
  - If REJECT: delete spec, stop
140
153
  - If APPROVE: proceed to update state
141
154
 
142
- 11. **Update STATE.md**
155
+ 12. **Update STATE.md**
143
156
  - Set `current_plan: <plan-id>`
144
157
  - Set `spec_path: .sdlc/phases/{phase}/{plan}-SPEC.md`
145
158
  - Set `loop_position: SPEC ✓`
146
159
  - Set `next_required_action: /sdlc:impl`
147
160
 
148
- 12. **Output confirmation**
149
- - Print spec summary: objective, number of ACs, number of tasks, execution waves.
150
- - End with NEXT ACTION REQUIRED: /sdlc:impl
161
+ 13. **Output confirmation**
162
+ - Print spec summary: objective, number of ACs (with verification type breakdown), number of tasks, execution waves.
163
+ - End with auto-advance directive to /sdlc:impl
151
164
  </process>
152
165
 
153
166
  <success_criteria>
154
167
  - [ ] At least 2 clarification questions asked before writing the spec
155
168
  - [ ] Every design decision presented with trade-offs and user confirmation
156
- - [ ] Acceptance criteria written in BDD format (Given/When/Then)
169
+ - [ ] Acceptance criteria written in BDD format (Given/When/Then) with mandatory Type field
170
+ - [ ] Every AC has a verification_type: UI_INTERACTION, API_ENDPOINT, CLI_BEHAVIOR, BUSINESS_LOGIC, or DATA_INTEGRITY
171
+ - [ ] Verification types match AC content (UI ACs test browser state, API ACs test endpoints, etc.)
157
172
  - [ ] Acceptance criteria cover happy path, error cases, and edge cases
158
173
  - [ ] Tasks broken into dependency graph with execution waves
159
174
  - [ ] Each task identifies files to create/modify and complexity
160
175
  - [ ] Boundaries section explicitly states in-scope, out-of-scope, and deferred items
161
- - [ ] Spec integrity review passed (completeness, consistency, feasibility)
176
+ - [ ] Codebase gap analysis performed — existing code reviewed for missing logic, edge cases, and integration risks
177
+ - [ ] Gap analysis findings incorporated into ACs and tasks (no silent gaps)
178
+ - [ ] Spec integrity review passed (completeness, consistency, feasibility, verification types, gap analysis)
162
179
  - [ ] User explicitly approved the spec (APPROVE response received)
163
180
  - [ ] SPEC.md created at .sdlc/phases/{phase}/{plan}-SPEC.md
164
181
  - [ ] STATE.md updated with current_plan, spec_path, loop_position: SPEC ✓
165
182
  - [ ] No assumptions made — every ambiguity resolved via clarification
166
- - [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:impl
183
+ - [ ] Output ends with auto-advance directive to /sdlc:impl
167
184
  </success_criteria>
@@ -65,7 +65,7 @@ Step-by-step:
65
65
  4. Verify git state matches handoff (warn on mismatch). Pop stash if applicable.
66
66
  5. Archive consumed handoff to .sdlc/HANDOFF-{timestamp}.md.archived.
67
67
  6. Clean up STATE.md session fields (remove paused_at).
68
- 7. Force ONE next action. Output ends with NEXT ACTION REQUIRED.
68
+ 7. Force ONE next action. End with auto-advance directive to the forced next action.
69
69
  </process>
70
70
 
71
71
  <success_criteria>
@@ -79,6 +79,6 @@ Step-by-step:
79
79
  - [ ] Resume: handoff located and context restored
80
80
  - [ ] Resume: git state verified against handoff
81
81
  - [ ] Resume: handoff archived after consumption
82
- - [ ] Resume: output ends with NEXT ACTION REQUIRED: /sdlc:{action}
82
+ - [ ] Resume: output ends with auto-advance directive to /sdlc:{action}
83
83
  - [ ] No menus, no options — one clear path forward
84
84
  </success_criteria>
@@ -49,18 +49,18 @@ Step-by-step:
49
49
  - Read SPEC.md. Extract all acceptance criteria (AC-1, AC-2, ...).
50
50
  - Read IMPL.md for the list of modified files and build status.
51
51
 
52
- 2. **Classify each acceptance criterion by verification type**
53
- For each AC, determine the appropriate test strategy:
54
-
55
- | Work Type | Verification Method | Tools Used |
56
- |-----------|-------------------|------------|
57
- | UI/Frontend | Playwright MCP browser automation | browser_navigate, browser_click, browser_snapshot, browser_fill_form |
58
- | REST API | HTTP requests via curl or fetch | Bash (curl commands) |
59
- | GraphQL API | GraphQL queries via HTTP | Bash (curl commands) |
60
- | CLI tool | Shell command execution | Bash |
61
- | Business logic | Test runner (jest, vitest, pytest, etc.) | Bash (npm test, etc.) |
62
- | Database | Query verification | Bash (database CLI tools) |
63
- | File output | File content inspection | Read, Grep |
52
+ 2. **Read verification types from SPEC.md DO NOT GUESS**
53
+ Each AC in the SPEC.md has a declared `Type` field. Read it directly. Do NOT infer or guess the type from keywords.
54
+
55
+ | AC Type (from SPEC.md) | Verification Tool | Actions |
56
+ |------------------------|------------------|---------|
57
+ | UI_INTERACTION | Playwright MCP | browser_navigate, browser_snapshot, browser_click, browser_fill_form, browser_take_screenshot |
58
+ | API_ENDPOINT | Bash curl | HTTP requests, response parsing |
59
+ | CLI_BEHAVIOR | Bash | Shell commands, stdout/stderr/exit code capture |
60
+ | BUSINESS_LOGIC | Test runner | bun test, npm test, vitest, jest, pytest |
61
+ | DATA_INTEGRITY | DB CLI | Database queries via Bash |
62
+
63
+ If any AC is missing its Type field, mark it FAIL immediately — do not skip it or guess.
64
64
 
65
65
  3. **Execute UI verifications (Playwright MCP)**
66
66
  For each UI acceptance criterion:
@@ -132,22 +132,28 @@ Step-by-step:
132
132
  - If ALL acceptance criteria pass:
133
133
  - Update STATE.md: set `loop_position: VERIFY_COMPLETE`
134
134
  - Set `verify_path: .sdlc/verify/VERIFY-<plan-id>.md`
135
- - Output ends with: NEXT ACTION REQUIRED: /sdlc:review
135
+ - End with auto-advance directive to /sdlc:review
136
136
  - If ANY acceptance criteria fail:
137
137
  - Update STATE.md: set `loop_position: VERIFY_FAILED`
138
138
  - Output the failure details with suggested fixes.
139
139
  - Output ends with: "Fix the failures above, then re-run /sdlc:verify"
140
+ - Do NOT auto-advance on failure — the user must fix issues first.
140
141
  </process>
141
142
 
142
143
  <success_criteria>
143
144
  - [ ] Every acceptance criterion from SPEC.md has a corresponding verification
144
- - [ ] Correct verification type selected per AC (UI uses Playwright, API uses curl, etc.)
145
- - [ ] UI tests use Playwright MCP tools (navigate, snapshot, click, fill_form, screenshot)
145
+ - [ ] Verification type READ from each AC's Type field not guessed from keywords
146
+ - [ ] ACs with Type: UI_INTERACTION verified using Playwright MCP tools (navigate, snapshot, click, fill_form, screenshot)
147
+ - [ ] ACs with Type: API_ENDPOINT verified using curl commands
148
+ - [ ] ACs with Type: CLI_BEHAVIOR verified using Bash command execution
149
+ - [ ] ACs with Type: BUSINESS_LOGIC verified using the project test runner
150
+ - [ ] ACs with Type: DATA_INTEGRITY verified using database queries
151
+ - [ ] ACs missing a Type field marked FAIL — not skipped, not guessed
146
152
  - [ ] Each verification produces concrete evidence (screenshots, response bodies, test output)
147
153
  - [ ] VERIFY-<plan-id>.md created with per-AC pass/fail results
148
154
  - [ ] Failed ACs include: expected vs actual, root cause analysis, suggested fix, files to modify
149
155
  - [ ] STATE.md updated with loop_position (VERIFY_COMPLETE or VERIFY_FAILED)
150
- - [ ] If all pass: output ends with NEXT ACTION REQUIRED: /sdlc:review
156
+ - [ ] If all pass: output ends with auto-advance directive to /sdlc:review
151
157
  - [ ] If any fail: output ends with "Fix the failures above, then re-run /sdlc:verify"
152
158
  - [ ] No criteria skipped without documented reason
153
159
  </success_criteria>
@@ -8,11 +8,11 @@ This document explains how the `/sdlc:fast` command classifies task types from n
8
8
 
9
9
  When a developer types `/sdlc:fast "add a login page"`, the framework must determine:
10
10
 
11
- 1. **What type of work is this?** (feature, bug, critical, research, test, refactor, docs)
11
+ 1. **What type of work is this?** (feature, bug, critical, test, refactor, docs)
12
12
  2. **How complex is it?** (simple, medium, complex)
13
- 3. **Where should it route?** (inline execution, /sdlc:spec, /sdlc:debug, /sdlc:research, /sdlc:discuss, or inline hotfix)
13
+ 3. **Where should it route?** (inline execution, /sdlc:spec, /sdlc:debug, /sdlc:discuss, or inline hotfix)
14
14
 
15
- `/sdlc:fast` is the **default entry point** for all work — not just small tasks. It is a universal router that classifies intent and complexity, then either handles work inline (simple) or routes to the appropriate specialized command (complex, bugs, research, emergencies).
15
+ `/sdlc:fast` is the **default entry point** for all work — not just small tasks. It is a universal router that classifies intent and complexity, then either handles work inline (simple) or routes to the appropriate specialized command (complex, bugs, brainstorming/research, emergencies).
16
16
 
17
17
  This classification happens automatically. The developer can override it with flags if the automatic classification is wrong.
18
18
 
@@ -14,6 +14,11 @@ This template defines the loop position tracker stored at `.sdlc/STATE.md`. It i
14
14
  - **Laws file:** .sdlc/LAWS.md
15
15
  - **Roadmap file:** .sdlc/ROADMAP.md
16
16
 
17
+ ## Settings
18
+
19
+ - **auto_advance:** true
20
+ - **advance_delay_seconds:** 10
21
+
17
22
  ## Current Position
18
23
 
19
24
  - **Milestone:** {{MILESTONE_NAME}} ({{MILESTONE_NUMBER}}/{{TOTAL_MILESTONES}})
@@ -102,5 +107,10 @@ This is the most important field in the entire SDLC. It tells the developer (or
102
107
  ### Accumulated Context
103
108
  Decisions, deferred issues, and blockers survive across loop iterations. They are the project's institutional memory. Without them, the same questions get asked repeatedly and the same mistakes get made.
104
109
 
110
+ ### Settings
111
+ Configuration for framework behavior:
112
+ - **auto_advance** — When true, the framework automatically runs the next required action after a brief delay. Set to false for manual step-by-step control where the user must explicitly run each command.
113
+ - **advance_delay_seconds** — Seconds to wait before auto-advancing to the next command. Gives the user time to review output and intervene by sending a message. Default: 10.
114
+
105
115
  ### Session Continuity
106
116
  When a developer stops working (end of day, context switch), this section captures exactly where to resume. The handoff file (HANDOFF.md) contains detailed notes; this section contains the summary.
@@ -1,10 +1,10 @@
1
- <purpose>Close the current SPEC-IMPL-VERIFY-REVIEW loop by reconciling planned work against actual outcomes, creating a SUMMARY.md, and advancing the state machine to the next spec or phase transition.</purpose>
1
+ <purpose>Close the current SPEC-IMPL-VERIFY-REVIEW loop by reconciling planned work against actual outcomes, creating a SUMMARY.md, and advancing the state machine to the next spec. When the last plan in a phase completes, execute the phase transition inline — verify completeness, update PROJECT.md, advance the roadmap, and commit the phase boundary.</purpose>
2
2
  <when_to_use>Run after /sdlc:review passes with zero blockers. STATE.md must show loop_position = REVIEW ✓ and next_required_action = /sdlc:close.</when_to_use>
3
- <required_reading>.sdlc/STATE.md, the current SPEC.md, REVIEW.md, VERIFY.md</required_reading>
3
+ <required_reading>.sdlc/STATE.md, .sdlc/ROADMAP.md, .sdlc/PROJECT.md, the current SPEC.md, REVIEW.md, VERIFY.md</required_reading>
4
4
  <loop_context>
5
5
  expected_phase: CLOSE (active)
6
6
  prior_phase: REVIEW ✓
7
- next_phase: SPEC (next loop) or transition-phase (if last plan)
7
+ next_phase: SPEC (next loop) phase transition handled inline when last plan completes
8
8
  </loop_context>
9
9
  <display_rule>
10
10
  MANDATORY: Display the loop closure summary in the chat window. Show:
@@ -135,22 +135,66 @@
135
135
  OPTION A — More plans in this phase:
136
136
  - Check ROADMAP.md: is this the last planned plan for the current phase?
137
137
  - If there are more plans (or the phase is open-ended): set next to /sdlc:spec
138
+ - Update .sdlc/STATE.md:
139
+ - loop_position: CLOSE ✓
140
+ - current_plan: cleared (no active plan)
141
+ - next_required_action: /sdlc:spec
142
+ - Add history entry: "{timestamp} | close | Plan {N} closed. {N} ACs passed. {N} deviations."
143
+ - Update .sdlc/ROADMAP.md:
144
+ - Increment completed plan count for current phase
145
+
146
+ OPTION B — Last plan in phase (execute phase transition inline):
147
+
148
+ B1. Verify phase completeness:
149
+ - List all SPEC and SUMMARY files in .sdlc/phases/{current_phase}/.
150
+ - Every SPEC must have a corresponding SUMMARY. If a SPEC exists without a SUMMARY: STOP. Display: "Phase transition blocked. Plan {N} has a spec but no summary. Complete it first."
151
+ - Every SUMMARY must show all ACs passed. If any AC is FAIL: STOP. Display: "Phase transition blocked. Plan {N} has failing ACs."
152
+ - Display completeness check: plans created, plans completed, hotfixes, all ACs passed.
153
+
154
+ B2. Cross-check STATE.md, PROJECT.md, ROADMAP.md consistency:
155
+ - STATE.md current_milestone must match ROADMAP.md in-progress milestone.
156
+ - STATE.md current_phase must match the phase being completed.
157
+ - Prior phases in this milestone must all be COMPLETE.
158
+ - If inconsistency found: display details, offer to auto-fix, ask for user confirmation before applying.
159
+
160
+ B3. Update PROJECT.md:
161
+ - Read all SUMMARY.md files from the completing phase.
162
+ - For each requirement in PROJECT.md:
163
+ - If addressed in this phase: mark as IMPLEMENTED with reference to plan number.
164
+ - If contradicted or superseded by implementation: mark as SUPERSEDED with explanation.
165
+ - Leave unaddressed requirements as-is (future phase responsibility).
166
+ - Add newly discovered requirements (from decisions and lessons learned) as NOT STARTED.
167
+ - Display proposed changes and ask user to confirm before writing.
168
+
169
+ B4. Update ROADMAP.md with phase completion details:
170
+ - Mark completed phase as COMPLETE with date.
171
+ - Add phase summary note:
172
+ ```
173
+ #### Phase {number} Summary
174
+ - Plans executed: {N}
175
+ - Hotfixes: {N}
176
+ - Key deliverables: {from summaries}
177
+ - Duration: {first spec date} to {completion date}
178
+ ```
138
179
 
139
- OPTION B Last plan in phase:
140
- - If this was the last plan: trigger transition-phase workflow
141
- - Set next to /sdlc:transition (which handles phase advancement)
142
-
143
- Update .sdlc/STATE.md:
144
- - loop_position: CLOSE
145
- - current_plan: cleared (no active plan)
146
- - next_required_action: /sdlc:spec OR /sdlc:transition
147
- - Add history entry: "{timestamp} | close | Plan {N} closed. {N} ACs passed. {N} deviations."
148
-
149
- Update .sdlc/ROADMAP.md:
150
- - Increment completed plan count for current phase
151
- - If phase is complete: mark phase status as COMPLETE
152
-
153
- WHY: The state machine must always have a clear next action. Ambiguity in state leads to confusion about what to do next.
180
+ B5. Advance state to next phase:
181
+ - IF next phase exists in ROADMAP.md:
182
+ - Update STATE.md: current_phase to next phase, clear current_plan, set loop_position to SPEC, set next_required_action to /sdlc:spec.
183
+ - Update ROADMAP.md: set next phase status to IN PROGRESS.
184
+ - Add history entry: "{timestamp} | close | Plan {N} closed. Phase {phase} complete. Transitioning to phase {next-phase}."
185
+ - IF no next phase (last phase in milestone):
186
+ - Do not advance to a new phase. The milestone completion logic in the display_result step handles this.
187
+ - Add history entry: "{timestamp} | close | Plan {N} closed. Phase {phase} complete. Last phase in milestone."
188
+
189
+ B6. Create git commit (if in a git repo):
190
+ - Check git status for uncommitted changes.
191
+ - If uncommitted changes exist:
192
+ - Stage .sdlc/ files and source files from the phase.
193
+ - Commit: `feat({phase-name}): complete phase {number}`
194
+ - Display: "Git commit created: {hash}"
195
+ - If no uncommitted changes: Display: "No uncommitted changes to commit."
196
+
197
+ WHY: The state machine must always have a clear next action. Phase transitions are executed inline to keep the close command as the single point of state advancement. No separate transition command needed.
154
198
  </step>
155
199
 
156
200
  <step name="display_result" priority="sixth">
@@ -165,22 +209,52 @@
165
209
  ACs passed: {count}/{count}
166
210
  Deviations: {count}
167
211
 
168
- NEXT ACTION REQUIRED: /sdlc:spec
169
- Run /sdlc:spec to create the next specification.
212
+ NEXT: /sdlc:spec
170
213
  ```
171
214
 
172
- IF phase complete:
215
+ <auto_advance>
216
+ Read .sdlc/STATE.md auto_advance setting.
217
+ IF auto_advance is true:
218
+ Display: "Auto-advancing to /sdlc:spec in {advance_delay_seconds}s — reply to intervene."
219
+ Sleep for {advance_delay_seconds} seconds using Bash sleep command.
220
+ If no user message received during sleep: automatically execute /sdlc:spec.
221
+ If user sends a message: cancel auto-advance, process user input, then resume.
222
+ IF auto_advance is false:
223
+ Display: "NEXT ACTION REQUIRED: /sdlc:spec"
224
+ Wait for user to manually run the command.
225
+ </auto_advance>
226
+
227
+ IF phase complete (transition executed inline) AND next phase exists:
173
228
  Display:
174
229
  ```
175
230
  Loop closed: Plan {N} complete.
176
- Phase {phase} COMPLETE — all plans finished.
231
+
232
+ Phase transition complete.
233
+ ─────────────────────────
234
+ Completed: Phase {old-number} — {old-name}
235
+ Plans executed: {N}
236
+ Hotfixes: {N}
237
+ Duration: {first spec date} to {completion date}
238
+
239
+ Starting: Phase {new-number} — {new-name}
177
240
 
178
241
  Summary: .sdlc/phases/{phase}/{plan}-SUMMARY.md
179
242
 
180
- Transitioning to next phase...
181
- NEXT ACTION REQUIRED: /sdlc:transition
243
+ NEXT: /sdlc:spec
182
244
  ```
183
245
 
246
+ <auto_advance>
247
+ Read .sdlc/STATE.md auto_advance setting.
248
+ IF auto_advance is true:
249
+ Display: "Auto-advancing to /sdlc:spec in {advance_delay_seconds}s — reply to intervene."
250
+ Sleep for {advance_delay_seconds} seconds using Bash sleep command.
251
+ If no user message received during sleep: automatically execute /sdlc:spec.
252
+ If user sends a message: cancel auto-advance, process user input, then resume.
253
+ IF auto_advance is false:
254
+ Display: "NEXT ACTION REQUIRED: /sdlc:spec"
255
+ Wait for user to manually run the command.
256
+ </auto_advance>
257
+
184
258
  IF milestone complete (last phase, last plan):
185
259
  Display:
186
260
  ```
@@ -292,10 +292,21 @@
292
292
 
293
293
  Debug record: .sdlc/phases/{phase}/DEBUG-{slug}.md
294
294
 
295
- NEXT ACTION REQUIRED: /sdlc:review
296
- Run /sdlc:review to check the fix against engineering laws.
295
+ NEXT: /sdlc:review
297
296
  ```
298
297
 
298
+ <auto_advance>
299
+ Read .sdlc/STATE.md auto_advance setting.
300
+ IF auto_advance is true:
301
+ Display: "Auto-advancing to /sdlc:review in {advance_delay_seconds}s — reply to intervene."
302
+ Sleep for {advance_delay_seconds} seconds using Bash sleep command.
303
+ If no user message received during sleep: automatically execute /sdlc:review.
304
+ If user sends a message: cancel auto-advance, process user input, then resume.
305
+ IF auto_advance is false:
306
+ Display: "NEXT ACTION REQUIRED: /sdlc:review"
307
+ Wait for user to manually run the command.
308
+ </auto_advance>
309
+
299
310
  WHY: Debug fixes still go through review. A hurried fix might violate engineering laws — empty catch blocks, missing types, function too long. The review catches that.
300
311
  </step>
301
312