sdlc-framework 1.0.0 → 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.
@@ -1,118 +1,84 @@
1
1
  ---
2
2
  name: sdlc:status
3
- description: "Show loop position and forced next action"
4
- allowed-tools: [Read, Glob, Grep]
3
+ description: "Show loop position, pause/resume sessions, and force next action"
4
+ argument-hint: "[pause [reason] | resume [handoff-path]]"
5
+ allowed-tools: [Read, Write, Bash, Glob, Grep, AskUserQuestion]
5
6
  ---
6
7
 
7
8
  <objective>
8
- Show exactly where you are in the SDLC loop and what you must do next. Visual progress, current state, and forced next action. Designed for junior developers who need clear guidance.
9
+ Show exactly where you are in the SDLC loop. Optionally pause (save context) or resume (restore context). One command for all session awareness.
9
10
 
10
- **When to use:** You are lost. You do not know what to do next. You want to see progress. Run this anytime.
11
+ **When to use:**
12
+ - No argument: see loop position, progress, and forced next action.
13
+ - `pause`: save session context before a break. Creates HANDOFF.md.
14
+ - `resume`: restore session context after a break. Reads HANDOFF.md.
11
15
 
12
16
  **What it does:**
13
- 1. Read STATE.md for current position.
14
- 2. Display milestone, phase, plan, and loop position with a visual diagram.
15
- 3. Show progress bar and any blockers.
16
- 4. Force exactly ONE next action with an explanation of what it does and why.
17
+ - **No argument:** Read STATE.md, display visual loop diagram, progress bar, blockers, and force ONE next action.
18
+ - **pause:** Gather session context, create HANDOFF.md, optionally WIP commit. Tell user to run `/sdlc:status resume` when they return.
19
+ - **resume:** Read HANDOFF.md, display restored context, verify git state, archive handoff, force ONE next action.
17
20
 
18
- **What happens next:** The forced next action. No choices.
21
+ **What happens next:** The forced next action. No choices — the state machine decides.
19
22
  </objective>
20
23
 
21
24
  <execution_context>
25
+ @~/.claude/sdlc-framework/workflows/status-session.md
22
26
  @.sdlc/STATE.md
23
27
  @.sdlc/ROADMAP.md
24
28
  </execution_context>
25
29
 
26
30
  <context>
27
- No arguments required.
31
+ $ARGUMENTS empty, "pause [reason]", or "resume [handoff-path]".
28
32
 
29
- Read .sdlc/STATE.md for current loop position, milestone, phase, plan.
30
- Read .sdlc/ROADMAP.md for milestone completion data.
33
+ Read .sdlc/STATE.md for current loop position.
34
+ Read .sdlc/ROADMAP.md for milestone progress.
31
35
  </context>
32
36
 
33
37
  <process>
38
+ Follow workflow: @~/.claude/sdlc-framework/workflows/status-session.md
39
+
34
40
  Step-by-step:
35
41
 
36
- 1. **Read state**
37
- - Read .sdlc/STATE.md. If it does not exist, output: "Framework not initialized. Run /sdlc:init first." Then stop.
38
- - Extract: loop_position, current_milestone, current_phase, current_plan, blockers, deferred_issues.
39
- - Read .sdlc/ROADMAP.md for milestone progress data.
40
-
41
- 2. **Display loop position (visual)**
42
- - Show the core loop with the current position highlighted:
43
-
44
- ```
45
- SDLC Loop Position:
46
-
47
- SPEC ──→ IMPLEMENT ──→ VERIFY ──→ REVIEW ──→ CLOSE
48
- │ │
49
- └──────────────── next cycle ←─────────────────┘
50
-
51
- Current: [IMPLEMENT] ◄── YOU ARE HERE
52
- ```
53
-
54
- - Use `[PHASE]` brackets around the current position.
55
- - If in DEBUG or HOTFIX, show those as side branches:
56
-
57
- ```
58
- SPEC ──→ IMPLEMENT ──→ VERIFY ──→ REVIEW ──→ CLOSE
59
-
60
- ├──→ [DEBUG] ◄── YOU ARE HERE
61
- └──→ HOTFIX
62
- ```
63
-
64
- 3. **Display project context**
65
- - Show:
66
- ```
67
- Milestone: {name} ({completed_phases}/{total_phases} phases)
68
- Phase: {name}
69
- Plan: {name or "none — run /sdlc:spec"}
70
- ```
71
-
72
- 4. **Show progress bar**
73
- - Calculate completion percentage from ROADMAP.md.
74
- - Display:
75
- ```
76
- Progress: [████████░░░░░░░░░░░░] 40% (4/10 plans completed)
77
- ```
78
-
79
- 5. **Show blockers and deferred issues**
80
- - If blockers exist in STATE.md:
81
- ```
82
- BLOCKERS:
83
- - {blocker 1}
84
- - {blocker 2}
85
- ```
86
- - If deferred issues exist:
87
- ```
88
- DEFERRED:
89
- - {issue 1}
90
- - {issue 2}
91
- ```
92
- - If none: "No blockers. No deferred issues."
93
-
94
- 6. **Force ONE next action with explanation**
95
- - Determine the next action from loop_position (same logic as /sdlc:resume).
96
- - Explain what that action DOES and WHY it is next:
97
-
98
- ```
99
- NEXT ACTION REQUIRED: /sdlc:impl
100
-
101
- What it does: Implements the current plan by writing code with subagent workers.
102
- Why it is next: The spec phase is complete. The plan has been approved.
103
- Your implementation will be verified in the next step.
104
- ```
105
-
106
- - Junior-friendly: use plain language. Assume the reader has never used the framework.
42
+ ### If no argument: SHOW STATUS
43
+
44
+ 1. Read .sdlc/STATE.md. If missing: "Run /sdlc:init first." Stop.
45
+ 2. Display visual loop diagram with current position highlighted using `[PHASE]` brackets.
46
+ 3. Display project context: milestone, phase, plan, progress bar.
47
+ 4. Display blockers and deferred issues (or "None").
48
+ 5. Force ONE next action from loop_position with plain-language explanation.
49
+
50
+ ### If "pause": SAVE SESSION
51
+
52
+ 1. Read .sdlc/STATE.md to get current loop position and active work.
53
+ 2. Gather session context: git status, recent commits, in-progress tasks, decisions, blockers.
54
+ 3. Ask user: "Anything to remember for next session not already in files?"
55
+ 4. Create .sdlc/HANDOFF.md with full session context.
56
+ 5. Offer WIP commit if uncommitted changes exist.
57
+ 6. Update STATE.md: add paused_at timestamp, history entry. Do NOT change loop_position.
58
+ 7. Output: "Session saved. Run /sdlc:status resume when you return."
59
+
60
+ ### If "resume": RESTORE SESSION
61
+
62
+ 1. Locate handoff: from $ARGUMENTS path, STATE.md handoff_file field, or .sdlc/HANDOFF.md.
63
+ 2. If no handoff: fall back to STATE.md only. Display: "No handoff found. Resuming from state."
64
+ 3. Display restored context: loop position, work in progress, decisions, blockers.
65
+ 4. Verify git state matches handoff (warn on mismatch). Pop stash if applicable.
66
+ 5. Archive consumed handoff to .sdlc/HANDOFF-{timestamp}.md.archived.
67
+ 6. Clean up STATE.md session fields (remove paused_at).
68
+ 7. Force ONE next action. Output ends with NEXT ACTION REQUIRED.
107
69
  </process>
108
70
 
109
71
  <success_criteria>
110
- - [ ] STATE.md read successfully
111
- - [ ] Visual loop diagram displayed with current position highlighted
112
- - [ ] Milestone, phase, and plan shown
113
- - [ ] Progress bar calculated and displayed
114
- - [ ] Blockers and deferred issues shown (or "none")
115
- - [ ] Exactly ONE next action forced
116
- - [ ] Next action includes plain-language explanation of what it does and why
117
- - [ ] No choices, no menus one clear path forward
72
+ - [ ] No-arg: visual loop diagram displayed with current position
73
+ - [ ] No-arg: progress bar and blockers shown
74
+ - [ ] No-arg: exactly ONE next action forced with explanation
75
+ - [ ] Pause: session context gathered (git, tasks, decisions, blockers)
76
+ - [ ] Pause: HANDOFF.md created with complete context
77
+ - [ ] Pause: WIP commit offered if uncommitted changes exist
78
+ - [ ] Pause: output states "Run /sdlc:status resume when you return"
79
+ - [ ] Resume: handoff located and context restored
80
+ - [ ] Resume: git state verified against handoff
81
+ - [ ] Resume: handoff archived after consumption
82
+ - [ ] Resume: output ends with NEXT ACTION REQUIRED: /sdlc:{action}
83
+ - [ ] No menus, no options — one clear path forward
118
84
  </success_criteria>
@@ -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} |
@@ -6,6 +6,14 @@
6
6
  prior_phase: REVIEW ✓
7
7
  next_phase: SPEC (next loop) or transition-phase (if last plan)
8
8
  </loop_context>
9
+ <display_rule>
10
+ MANDATORY: Display the loop closure summary in the chat window. Show:
11
+ - What was built (deliverables, 2-3 lines)
12
+ - AC results table (AC | Status)
13
+ - Deviations (if any, 1 line each)
14
+ - Next action
15
+ Keep it compact (~15-25 lines). Full SUMMARY.md is in the file for audit.
16
+ </display_rule>
9
17
  <process>
10
18
 
11
19
  <step name="validate_state" priority="first">
@@ -180,7 +188,7 @@
180
188
  Phase {phase} COMPLETE.
181
189
  MILESTONE {milestone} COMPLETE.
182
190
 
183
- Run /sdlc:milestone to finalize and start next milestone.
191
+ Milestone completion is handled automatically by /sdlc:close.
184
192
  ```
185
193
 
186
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>