sdlc-framework 1.0.2 → 2.0.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.
@@ -10,7 +10,7 @@ When a developer types `/sdlc:fast "add a login page"`, the framework must deter
10
10
 
11
11
  1. **What type of work is this?** (feature, bug, critical, research, 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:hotfix, /sdlc:research)
13
+ 3. **Where should it route?** (inline execution, /sdlc:spec, /sdlc:debug, /sdlc:research, /sdlc:discuss, or inline hotfix)
14
14
 
15
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).
16
16
 
@@ -0,0 +1,89 @@
1
+ # PRD: {title}
2
+
3
+ ## Meta
4
+
5
+ | Field | Value |
6
+ |-------|-------|
7
+ | Created | {date} |
8
+ | Status | DRAFT / APPROVED |
9
+ | Author | {user} + AI |
10
+ | Source | /sdlc:discuss |
11
+
12
+ ## Problem Statement
13
+
14
+ {2-3 sentences describing the problem being solved. Focus on the pain, not the solution.}
15
+
16
+ ### Who Has This Problem
17
+
18
+ - **Primary user:** {role/persona} — {how they encounter the problem}
19
+ - **Secondary user:** {role/persona} — {how they are affected}
20
+
21
+ ### Current Workarounds
22
+
23
+ - {How users solve this today, and why it is insufficient}
24
+
25
+ ### Impact
26
+
27
+ - {What happens if this problem is not solved}
28
+ - {Quantifiable impact if available: time wasted, errors caused, revenue lost}
29
+
30
+ ## Proposed Solution
31
+
32
+ {2-3 sentences describing the solution at a high level. What changes for the user.}
33
+
34
+ ### Approach
35
+
36
+ {Technical approach chosen during discussion, with rationale for why this approach over alternatives.}
37
+
38
+ ### Alternatives Considered
39
+
40
+ | Approach | Pros | Cons | Why Not |
41
+ |----------|------|------|---------|
42
+ | {alternative 1} | {pros} | {cons} | {reason rejected} |
43
+ | {alternative 2} | {pros} | {cons} | {reason rejected} |
44
+
45
+ ## Requirements
46
+
47
+ ### Functional Requirements
48
+
49
+ - **FR-1:** {requirement} — Priority: {must/should/could}
50
+ - **FR-2:** {requirement} — Priority: {must/should/could}
51
+
52
+ ### Non-Functional Requirements
53
+
54
+ - **NFR-1:** {performance, security, scalability, accessibility requirement}
55
+
56
+ ### User Flows
57
+
58
+ #### Flow 1: {flow name}
59
+
60
+ 1. User {action}
61
+ 2. System {response}
62
+ 3. User {action}
63
+ 4. System {response}
64
+
65
+ ## Constraints
66
+
67
+ - **Technical:** {tech stack limitations, existing architecture constraints}
68
+ - **Timeline:** {deadline or time budget}
69
+ - **Scope:** {explicit boundaries — what is NOT included}
70
+
71
+ ## Edge Cases
72
+
73
+ - {edge case 1} — Expected behavior: {behavior}
74
+ - {edge case 2} — Expected behavior: {behavior}
75
+
76
+ ## Success Metrics
77
+
78
+ - {How to measure whether this solution works}
79
+ - {Concrete, measurable criteria}
80
+
81
+ ## Open Questions
82
+
83
+ - {Unresolved questions deferred to spec phase}
84
+
85
+ ## Decisions Log
86
+
87
+ | # | Question | Decision | Rationale |
88
+ |---|----------|----------|-----------|
89
+ | 1 | {question asked during discussion} | {answer} | {why} |
@@ -188,7 +188,7 @@
188
188
  Phase {phase} COMPLETE.
189
189
  MILESTONE {milestone} COMPLETE.
190
190
 
191
- Run /sdlc:milestone to finalize and start next milestone.
191
+ Milestone completion is handled automatically by /sdlc:close.
192
192
  ```
193
193
 
194
194
  WHY: The display tells the user exactly where they are in the bigger picture. Completing a phase or milestone is a significant moment — acknowledge it.
@@ -0,0 +1,195 @@
1
+ <purpose>Drive AI-led brainstorming to transform a raw idea into a structured PRD. The discuss phase sits upstream of spec — it explores the problem space, validates approaches, and builds requirements through targeted questioning. Without this phase, specs are built on assumptions instead of explored decisions.</purpose>
2
+ <when_to_use>Run when the user has an idea but has not yet defined what to build. This is pre-loop discovery — it feeds into /sdlc:spec. Can run at any point: before init, between loops, or when pivoting direction.</when_to_use>
3
+ <required_reading>.sdlc/PROJECT.md (if exists), .sdlc/ROADMAP.md (if exists), codebase structure for technical context</required_reading>
4
+ <loop_context>
5
+ expected_phase: DISCUSS (pre-loop activity)
6
+ prior_phase: any (entry point or between loops)
7
+ next_phase: SPEC (discuss always leads to spec)
8
+ </loop_context>
9
+ <process>
10
+
11
+ <step name="seed_idea" priority="first">
12
+ The discussion needs a starting point — without one, questions are unfocused.
13
+
14
+ IF $ARGUMENTS provided:
15
+ Restate the idea in one sentence to confirm understanding.
16
+ Ask: "Is this what you want to explore, or should I adjust the framing?"
17
+
18
+ IF $ARGUMENTS empty:
19
+ Ask: "What idea, feature, or problem do you want to explore?"
20
+ Wait for response before proceeding.
21
+
22
+ IF .sdlc/PROJECT.md exists:
23
+ Read it. Note the tech stack, architecture, and constraints.
24
+ These inform all downstream questions — do not ask about things the project context already answers.
25
+
26
+ Record the seed idea for the decisions log.
27
+ </step>
28
+
29
+ <step name="explore_problem" priority="second">
30
+ Understanding the problem prevents building solutions to the wrong thing. Most failed features solve real problems badly because the problem was never properly defined.
31
+
32
+ Ask 2-4 questions from this category. Include a recommendation with each. Use AskUserQuestion.
33
+
34
+ PROBLEM QUESTIONS (pick the most relevant):
35
+ - "What specific problem does this solve? Who encounters it and how often?"
36
+ Recommendation: Frame the problem from the user's perspective, not the system's.
37
+ - "How do users solve this today? What makes current workarounds insufficient?"
38
+ Recommendation: Based on codebase scan, suggest what exists and what gaps you see.
39
+ - "What happens if this is not built? What is the cost of inaction?"
40
+ Recommendation: Assess severity based on what you know about the project.
41
+ - "Is this a new capability, an improvement to something existing, or a fix?"
42
+ Recommendation: Based on codebase, state whether related functionality already exists.
43
+
44
+ DO NOT ask questions whose answers are already in PROJECT.md or the codebase.
45
+ DO NOT ask questions that do not affect the technical solution.
46
+
47
+ Record all answers in the decisions log.
48
+ </step>
49
+
50
+ <step name="define_scope" priority="third">
51
+ Scope prevents building too much or too little. Without explicit scope, features creep and deadlines slip.
52
+
53
+ Ask 2-4 questions from this category. Include a recommendation with each.
54
+
55
+ SCOPE QUESTIONS (pick the most relevant):
56
+ - "What is the smallest version of this that delivers value? What is the full vision?"
57
+ Recommendation: Propose an MVP scope based on the problem definition.
58
+ - "What is explicitly NOT included? What should be deferred to later?"
59
+ Recommendation: Suggest boundaries based on complexity and dependencies.
60
+ - "Are there timeline or resource constraints that affect scope?"
61
+ Recommendation: If constraints exist, suggest what to cut first.
62
+ - "Does this interact with existing features? Which ones?"
63
+ Recommendation: Based on codebase scan, identify integration points.
64
+
65
+ After this round, you should be able to state the scope in one sentence.
66
+ Display: "Scope summary: {one sentence}. Does this match your intent?"
67
+
68
+ Record all answers in the decisions log.
69
+ </step>
70
+
71
+ <step name="validate_approach" priority="fourth">
72
+ Choosing the wrong approach is the most expensive mistake — it compounds through every downstream phase. Presenting options with trade-offs prevents blind commitment to the first idea.
73
+
74
+ Based on the problem and scope, identify 2-3 viable technical approaches.
75
+
76
+ Present each approach:
77
+ ```
78
+ Approach A (recommended): {description}
79
+ - Effort: {low/medium/high}
80
+ - Risk: {what could go wrong}
81
+ - Maintenance: {ongoing burden}
82
+ - Fits existing patterns: {yes/no — reference specific codebase patterns}
83
+
84
+ Approach B: {description}
85
+ - Effort: {low/medium/high}
86
+ - Risk: {what could go wrong}
87
+ - Maintenance: {ongoing burden}
88
+ - Fits existing patterns: {yes/no}
89
+
90
+ Approach C (do nothing / defer): {description}
91
+ - Risk of deferring: {what happens}
92
+ ```
93
+
94
+ Ask: "Which approach do you prefer? I recommend Approach A because {concrete reason}."
95
+
96
+ IF the user picks a non-recommended approach:
97
+ Acknowledge the choice. Do not argue. Record the rationale.
98
+
99
+ IF the user is unsure:
100
+ Ask one targeted follow-up to resolve the uncertainty.
101
+
102
+ Record the chosen approach and rationale in the decisions log.
103
+ </step>
104
+
105
+ <step name="detail_requirements" priority="fifth">
106
+ Requirements bridge the gap between "what to build" and "how to spec it." Missing requirements surface as bugs during implementation.
107
+
108
+ Ask 2-4 questions from this category. Include a recommendation with each.
109
+
110
+ REQUIREMENTS QUESTIONS (pick the most relevant):
111
+ - "Walk me through the primary user flow. What does the user do step by step?"
112
+ Recommendation: Propose a flow based on the chosen approach.
113
+ - "What are the edge cases? What happens when {unlikely but possible scenario}?"
114
+ Recommendation: List 2-3 edge cases you identified and propose handling.
115
+ - "Are there security, performance, or accessibility requirements?"
116
+ Recommendation: Based on project context, suggest relevant NFRs.
117
+ - "How will you know this works? What does success look like?"
118
+ Recommendation: Propose measurable success criteria.
119
+ - "What data does this feature need? New models, fields, or API endpoints?"
120
+ Recommendation: Based on codebase, suggest data model approach.
121
+
122
+ STOP ASKING SIGNAL:
123
+ - You can write functional requirements for the core flow.
124
+ - You can list at least 3 edge cases with expected behavior.
125
+ - You know the primary user flow end to end.
126
+ - Remaining unknowns are implementation details, not requirements.
127
+
128
+ IF clarity is sufficient after round 2 or 3, skip this round and proceed to compile.
129
+
130
+ Record all answers in the decisions log.
131
+ </step>
132
+
133
+ <step name="compile_prd" priority="sixth">
134
+ The PRD is the deliverable — it captures every decision made during discussion. Without it, the discussion is just a conversation that evaporates.
135
+
136
+ Create .sdlc/discuss/ directory if it does not exist.
137
+
138
+ Generate a topic slug from the seed idea: lowercase, hyphens, no special characters, max 40 chars.
139
+
140
+ Write .sdlc/discuss/{topic-slug}-PRD.md using the PRD template structure:
141
+ - Problem Statement: from explore_problem answers
142
+ - Proposed Solution: from validate_approach chosen approach
143
+ - Alternatives Considered: from validate_approach rejected approaches
144
+ - Requirements: from detail_requirements answers
145
+ - Constraints: from define_scope answers
146
+ - Edge Cases: from detail_requirements answers
147
+ - Success Metrics: from detail_requirements answers
148
+ - Decisions Log: every question asked and answer received, numbered
149
+
150
+ Display a compact summary of the PRD (30-50 lines):
151
+ - Problem (2 lines)
152
+ - Solution (2 lines)
153
+ - Requirements (numbered list)
154
+ - Constraints (list)
155
+ - Edge cases (list)
156
+ - Open questions (list)
157
+ </step>
158
+
159
+ <step name="approve_and_route" priority="seventh">
160
+ The user must approve the PRD before it feeds into spec. An unapproved PRD is just notes.
161
+
162
+ Ask: "PRD complete. Review the summary above."
163
+ Present options:
164
+ - APPROVE: Lock the PRD and proceed to /sdlc:spec
165
+ - REVISE: Tell me what to change (re-compile after changes)
166
+ - REJECT: Discard the PRD and stop
167
+
168
+ IF APPROVE:
169
+ Set PRD status to APPROVED.
170
+ Update .sdlc/STATE.md:
171
+ - Add history entry: "{timestamp} | discuss | Topic: {topic}. PRD saved."
172
+ - Set next_required_action: /sdlc:spec
173
+ - Add prd_path: .sdlc/discuss/{topic-slug}-PRD.md
174
+
175
+ Display:
176
+ ```
177
+ PRD approved.
178
+
179
+ Saved: .sdlc/discuss/{topic-slug}-PRD.md
180
+
181
+ The spec phase will use this PRD to create a detailed specification with
182
+ acceptance criteria and task dependencies.
183
+
184
+ NEXT ACTION REQUIRED: /sdlc:spec
185
+ Run /sdlc:spec to formalize this PRD into an implementation-ready specification.
186
+ ```
187
+
188
+ IF REVISE:
189
+ Apply changes. Re-display summary. Re-ask for approval.
190
+
191
+ IF REJECT:
192
+ Delete the PRD file. Display: "PRD discarded." Stop.
193
+ </step>
194
+
195
+ </process>
@@ -1,10 +1,10 @@
1
- <purpose>The universal entry point workflow. Accept a plain language description, classify the work, estimate complexity, and either execute inline (simple work) or route to the appropriate specialized command (complex work, bugs, research, hotfixes). This is the "just tell me what to do" workflow.</purpose>
1
+ <purpose>The universal entry point workflow. Accept a plain language description, classify the work, estimate complexity, and either execute inline (simple work), handle critical issues as inline hotfixes, or route to the appropriate specialized command. This is the "just tell me what to do" workflow.</purpose>
2
2
  <when_to_use>Use anytime. This is the default way to start work. The user describes what they need, and this workflow figures out the rest. No prior knowledge of SDLC commands required.</when_to_use>
3
3
  <required_reading>.sdlc/STATE.md, .sdlc/PROJECT.md, .sdlc/LAWS.md</required_reading>
4
4
  <loop_context>
5
- expected_phase: FAST (compressed loop or routing)
5
+ expected_phase: FAST (compressed loop, inline hotfix, or routing)
6
6
  prior_phase: any (fast can be used between loops or as the first action)
7
- next_phase: depends on routing — SPEC, DEBUG, HOTFIX, RESEARCH, or self-contained
7
+ next_phase: depends on routing — SPEC, DEBUG, RESEARCH, DISCUSS, or self-contained
8
8
  </loop_context>
9
9
  <references>
10
10
  @~/.claude/sdlc-framework/references/prompt-detection.md
@@ -49,10 +49,9 @@
49
49
 
50
50
  1. CRITICAL — urgent production issues
51
51
  Indicators: "urgent", "production", "down", "outage", "critical", "P0", "hotfix", "emergency", "ASAP"
52
- Route: /sdlc:hotfix
53
- Display: "Critical issue detected. Routing to /sdlc:hotfix for emergency handling."
54
- Write to STATE.md: fast_context = {original description}
55
- STOP this workflow.
52
+ Route: inline hotfix (skip to inline_hotfix step)
53
+ Display: "Critical issue detected. Running inline hotfix minimal spec, full verification."
54
+ Do NOT stop proceed to inline_hotfix step.
56
55
 
57
56
  2. BUG — something broken that needs debugging
58
57
  Indicators: "fix bug", "broken", "crash", "error when", "fails to", "wrong output", "regression", "not working", "throws", "exception"
@@ -337,4 +336,56 @@
337
336
  WHY: Fast is a side-quest. It records what happened (audit trail) but does not disrupt the main loop state.
338
337
  </step>
339
338
 
339
+ <step name="inline_hotfix" priority="tenth">
340
+ ONLY IF classification = CRITICAL. Emergency fix with minimal ceremony, maximum verification.
341
+
342
+ A. TRIAGE:
343
+ Ask 3 questions:
344
+ - "What is broken? (specific symptom)"
345
+ - "What is the impact? (who is affected)"
346
+ - "When did it start? (recent deploy, config change)"
347
+
348
+ Classify severity:
349
+ - P0: system down, critical path unavailable
350
+ - P1: data corruption, security breach, data loss
351
+ - P2: major feature broken but system is up
352
+
353
+ If not P0/P1: Display "This may not be critical. Consider /sdlc:debug instead." Let user override.
354
+
355
+ Save current STATE.md position — hotfix restores it when done.
356
+
357
+ B. 3-LINE INLINE SPEC:
358
+ - Line 1: WHAT is broken (from triage)
359
+ - Line 2: WHERE is the likely location (quick Grep search)
360
+ - Line 3: WHAT the fix should achieve (expected behavior)
361
+ Display but do NOT wait for approval — speed matters.
362
+ Boundary: fix ONLY the critical issue. No refactoring. No cleanup.
363
+
364
+ C. FIX DIRECTLY:
365
+ - Single-threaded, no sub-agents
366
+ - Read relevant files, apply MINIMAL fix
367
+ - Engineering laws still apply (no empty catch, no hardcoded secrets)
368
+ - Add regression test for the specific failure
369
+ - Mark debt with TODO(hotfix-{date})
370
+
371
+ D. FULL VERIFICATION:
372
+ - Run FULL test suite (all tests, not just affected)
373
+ - For UI: Playwright verification
374
+ - If any fail: fix before proceeding
375
+
376
+ E. FULL REVIEW:
377
+ - Check all modified files against engineering laws
378
+ - Security blockers still block even in emergencies
379
+ - Warnings acceptable for hotfixes
380
+
381
+ F. RECORD:
382
+ - Hotfix number = {phase}.{count+1} (e.g., 02.1, 02.2)
383
+ - Create .sdlc/phases/{phase}/HOTFIX-{number}-SUMMARY.md
384
+ - Update STATE.md: restore prior state, add history entry
385
+ - Update ROADMAP.md: note hotfix under current phase
386
+ - Display completion summary with verification results
387
+
388
+ WHY: Hotfixes trade planning ceremony for speed, but never trade verification or review. The inline approach avoids command-switching overhead during emergencies while maintaining quality gates.
389
+ </step>
390
+
340
391
  </process>
@@ -152,7 +152,7 @@
152
152
  | ... | ... | ... | ... |
153
153
 
154
154
  ## Future Milestones
155
- {Leave blank — added via /sdlc:milestone}
155
+ {Leave blank — added via /sdlc:init milestone <name>}
156
156
  ```
157
157
 
158
158
  WHY: The roadmap gives structure to the work. Without it, specs are disconnected tasks with no arc. The phase structure ensures work builds on itself in a logical order.
@@ -0,0 +1,206 @@
1
+ <purpose>Show loop position, save session context (pause), or restore session context (resume). Consolidates status, pause, and resume into a single workflow. The state machine always knows the next action — this workflow surfaces it.</purpose>
2
+ <when_to_use>Run anytime. No-arg for status. "pause" before a break. "resume" when returning. Can run at any loop position.</when_to_use>
3
+ <required_reading>.sdlc/STATE.md, .sdlc/ROADMAP.md</required_reading>
4
+ <loop_context>
5
+ expected_phase: any (status/pause/resume work at any loop position)
6
+ prior_phase: current position is preserved
7
+ next_phase: determined by STATE.md
8
+ </loop_context>
9
+ <process>
10
+
11
+ <step name="determine_mode" priority="first">
12
+ Parse $ARGUMENTS to determine the mode.
13
+
14
+ IF $ARGUMENTS is empty or not "pause"/"resume": MODE = STATUS
15
+ IF $ARGUMENTS starts with "pause": MODE = PAUSE. Extract optional reason.
16
+ IF $ARGUMENTS starts with "resume": MODE = RESUME. Extract optional handoff path.
17
+
18
+ Read .sdlc/STATE.md.
19
+
20
+ IF .sdlc/ does not exist:
21
+ Display: "Framework not initialized. Run /sdlc:init first."
22
+ STOP.
23
+
24
+ Extract: loop_position, current_milestone, current_phase, current_plan, next_required_action, blockers, deferred_issues.
25
+
26
+ WHY: One entry point with three modes eliminates the need for three separate commands. The state file is the single source of truth regardless of mode.
27
+ </step>
28
+
29
+ <step name="show_status" priority="second">
30
+ ONLY IF MODE = STATUS.
31
+
32
+ Read .sdlc/ROADMAP.md for milestone progress data.
33
+
34
+ Display the core loop with current position highlighted:
35
+ ```
36
+ SDLC Loop Position:
37
+
38
+ SPEC ──→ IMPLEMENT ──→ VERIFY ──→ REVIEW ──→ CLOSE
39
+ │ │
40
+ └──────────────── next cycle ←─────────────────┘
41
+
42
+ Current: [IMPLEMENT] ◄── YOU ARE HERE
43
+ ```
44
+
45
+ Use `[PHASE]` brackets around the current position.
46
+ If in DEBUG, show as a side branch off IMPLEMENT.
47
+
48
+ Display project context:
49
+ ```
50
+ Milestone: {name} ({completed_phases}/{total_phases} phases)
51
+ Phase: {name}
52
+ Plan: {name or "none — run /sdlc:spec"}
53
+ ```
54
+
55
+ Calculate and display progress bar from ROADMAP.md:
56
+ ```
57
+ Progress: [████████░░░░░░░░░░░░] 40% (4/10 plans completed)
58
+ ```
59
+
60
+ Show blockers and deferred issues (or "No blockers. No deferred issues.").
61
+
62
+ Force ONE next action from loop_position with explanation:
63
+ ```
64
+ NEXT ACTION REQUIRED: /sdlc:impl
65
+
66
+ What it does: Implements the current plan by writing code with subagent workers.
67
+ Why it is next: The spec phase is complete. The plan has been approved.
68
+ ```
69
+
70
+ WHY: Status is the "where am I" command. Junior developers need the visual. Senior developers need the forced next action. Both get what they need.
71
+ </step>
72
+
73
+ <step name="pause_gather_context" priority="third">
74
+ ONLY IF MODE = PAUSE.
75
+
76
+ Gather session context:
77
+
78
+ A. GIT STATE:
79
+ Run: git status --short (if git repo)
80
+ Run: git log --oneline -5
81
+
82
+ B. WORK COMPLETED THIS SESSION:
83
+ Read STATE.md history entries. Summarize recent work.
84
+
85
+ C. IN-PROGRESS WORK:
86
+ Read any active spec, review, or summary files referenced in STATE.md.
87
+ Determine: which tasks done, which pending, which ACs verified.
88
+
89
+ D. DECISIONS AND BLOCKERS:
90
+ Scan recent .sdlc/ files for recorded decisions.
91
+ Note any blockers from STATE.md.
92
+
93
+ E. USER CONTEXT:
94
+ Ask: "Anything to remember for next session not already in files? (or press enter to skip)"
95
+ Record response if provided.
96
+
97
+ WHY: Session context is ephemeral — conversation history may not survive. The handoff captures it before it is lost.
98
+ </step>
99
+
100
+ <step name="pause_save" priority="fourth">
101
+ ONLY IF MODE = PAUSE.
102
+
103
+ Create .sdlc/HANDOFF.md (overwrite if exists):
104
+ ```markdown
105
+ # Session Handoff
106
+
107
+ ## Session Info
108
+ - **Paused at**: {ISO timestamp}
109
+ - **Reason**: {from arguments or "manual pause"}
110
+ - **Loop position**: {from STATE.md}
111
+ - **Next required action**: {from STATE.md}
112
+
113
+ ## What Was Done This Session
114
+ {Bulleted list of work completed}
115
+
116
+ ## Current State
117
+ - **Phase**: {phase name and number}
118
+ - **Plan**: {plan number and title, or "no active plan"}
119
+ - **Loop step**: {position} — {status}
120
+
121
+ ## In-Progress Work
122
+ {What is partially done — specific tasks, files, ACs}
123
+
124
+ ## Decisions Made
125
+ {List of decisions with rationale}
126
+
127
+ ## Blockers / Open Questions
128
+ {List or "None"}
129
+
130
+ ## User Context
131
+ {Verbatim notes from the user, if any}
132
+
133
+ ## Git State
134
+ - **Branch**: {current branch}
135
+ - **Commit**: {latest commit hash and message}
136
+ - **Uncommitted changes**: {yes/no — details}
137
+ ```
138
+
139
+ IF UNCOMMITTED CHANGES EXIST:
140
+ Ask: "You have uncommitted changes. Create a WIP commit? (yes/no)"
141
+ If yes: stage relevant files (not .env), commit "wip({phase}): {brief description}"
142
+ If no: note in handoff that uncommitted changes exist.
143
+
144
+ Update STATE.md: add paused_at timestamp, history entry. Do NOT change loop_position.
145
+
146
+ Display:
147
+ ```
148
+ Session saved.
149
+
150
+ Handoff: .sdlc/HANDOFF.md
151
+ State: {loop_position}
152
+ Next action (on resume): {next_required_action}
153
+
154
+ When you return, run /sdlc:status resume
155
+ ```
156
+
157
+ WHY: HANDOFF.md bridges sessions. The explicit resume instruction ensures the next session starts correctly.
158
+ </step>
159
+
160
+ <step name="resume_restore" priority="fifth">
161
+ ONLY IF MODE = RESUME.
162
+
163
+ A. LOCATE HANDOFF:
164
+ If path in $ARGUMENTS: use that file.
165
+ Else if .sdlc/HANDOFF.md exists: use it.
166
+ Else: display "No handoff found. Resuming from STATE.md." Skip to next-action determination.
167
+
168
+ B. READ AND DISPLAY CONTEXT:
169
+ Read handoff. Calculate time since pause.
170
+ ```
171
+ === SESSION RESUMED ===
172
+
173
+ Last session: {time} ago
174
+ Loop position: {position}
175
+
176
+ Work in progress:
177
+ - {from handoff}
178
+
179
+ Decisions:
180
+ - {from handoff}
181
+
182
+ Blockers:
183
+ - {from handoff, or "None"}
184
+ ```
185
+
186
+ If blockers: ask "These blockers were noted. Are they resolved?"
187
+
188
+ C. VERIFY GIT STATE:
189
+ Run: git status
190
+ Compare branch and uncommitted changes to handoff.
191
+ If branch changed: warn.
192
+ If new commits since pause: display them.
193
+
194
+ D. ARCHIVE HANDOFF:
195
+ Rename .sdlc/HANDOFF.md to .sdlc/HANDOFF-{timestamp}.md.archived
196
+ Remove paused_at from STATE.md.
197
+ Add history entry: "{timestamp} | resume | Resumed from {loop_position}."
198
+
199
+ E. FORCE NEXT ACTION:
200
+ Determine from STATE.md next_required_action.
201
+ Display: "NEXT ACTION REQUIRED: {action}"
202
+
203
+ WHY: Exactly ONE next action. The state machine has already decided. The user just executes it.
204
+ </step>
205
+
206
+ </process>
@@ -113,7 +113,7 @@
113
113
  IF NO NEXT PHASE (this was the last phase in the milestone):
114
114
  Update .sdlc/STATE.md:
115
115
  - loop_position: TRANSITION ✓
116
- - next_required_action: /sdlc:milestone complete
116
+ - next_required_action: /sdlc:close (milestone completion handled inline)
117
117
  - Add history entry: "{timestamp} | transition | Phase {current} complete. Last phase in milestone. Trigger milestone completion."
118
118
 
119
119
  Update .sdlc/ROADMAP.md:
@@ -193,8 +193,8 @@
193
193
  Completed: Phase {number} — {name} (LAST PHASE)
194
194
  Milestone {milestone-number} — {milestone-name}: ALL PHASES COMPLETE
195
195
 
196
- NEXT ACTION REQUIRED: /sdlc:milestone complete
197
- Run /sdlc:milestone complete to finalize the milestone.
196
+ NEXT ACTION REQUIRED: /sdlc:close
197
+ Run /sdlc:close to finalize the milestone.
198
198
  ```
199
199
 
200
200
  WHY: The display makes the transition visible. Moving to a new phase is a significant moment — the user should know where they are in the broader plan.