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.
@@ -1,99 +0,0 @@
1
- ---
2
- name: sdlc:hotfix
3
- description: "Emergency fix with minimal ceremony, maximum verification"
4
- argument-hint: "<critical-issue>"
5
- allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, mcp__plugin_playwright_playwright__browser_navigate, mcp__plugin_playwright_playwright__browser_snapshot, mcp__plugin_playwright_playwright__browser_click, mcp__plugin_playwright_playwright__browser_fill_form, mcp__plugin_playwright_playwright__browser_take_screenshot, mcp__plugin_playwright_playwright__browser_evaluate, mcp__plugin_playwright_playwright__browser_console_messages, mcp__plugin_playwright_playwright__browser_close, AskUserQuestion]
6
- ---
7
-
8
- <objective>
9
- Emergency fix for critical issues. Minimal ceremony getting to the fix. Maximum verification after the fix. No corners cut on quality — only on planning overhead.
10
-
11
- **When to use:** Production is broken. A critical path is failing. Security vulnerability discovered. Something that cannot wait for a full SPEC cycle.
12
-
13
- **What it does:**
14
- 1. Skip full spec — create a lightweight inline spec (3 lines).
15
- 2. Fix the issue directly.
16
- 3. Run FULL verification (tests + Playwright).
17
- 4. Run FULL review (engineering laws compliance).
18
- 5. Record as a hotfix with decimal phase numbering (2.1, 2.2, etc.).
19
-
20
- **What happens next:** /sdlc:verify to run the full verification suite.
21
- </objective>
22
-
23
- <execution_context>
24
- @~/.claude/sdlc-framework/workflows/hotfix.md
25
- @.sdlc/STATE.md
26
- @.sdlc/LAWS.md
27
- </execution_context>
28
-
29
- <context>
30
- $ARGUMENTS
31
-
32
- Read .sdlc/STATE.md to get current milestone and phase.
33
- Read .sdlc/LAWS.md — hotfixes are NOT exempt from engineering laws.
34
- </context>
35
-
36
- <process>
37
- Follow workflow: @~/.claude/sdlc-framework/workflows/hotfix.md
38
-
39
- Step-by-step:
40
-
41
- 1. **Pre-flight check**
42
- - Verify .sdlc/ exists. If not, tell the user to run /sdlc:init first.
43
- - Read .sdlc/STATE.md to get current phase number (e.g., phase 2).
44
- - Assign hotfix number: current phase + decimal increment (2.1, 2.2, etc.).
45
- - Update STATE.md: set loop_position to HOTFIX, record hotfix number.
46
-
47
- 2. **Lightweight inline spec (3 lines)**
48
- - Line 1: WHAT is broken. (From $ARGUMENTS.)
49
- - Line 2: WHERE is the likely location. (Quick search with Grep.)
50
- - Line 3: WHAT the fix should achieve. (Expected behavior.)
51
- - Record this inline spec in STATE.md under the hotfix entry.
52
-
53
- 3. **Fix the issue**
54
- - Search for the affected code using Grep and Read.
55
- - Apply the fix. Follow engineering laws:
56
- - DRY: use existing patterns.
57
- - Handle edge cases.
58
- - Named types for complex objects.
59
- - No lint suppression. No non-null assertions.
60
- - Max 40 lines per function.
61
- - Keep the change surface as small as possible. Fix the issue, nothing more.
62
-
63
- 4. **Full verification**
64
- - Run the entire test suite. Not just affected tests — ALL tests.
65
- - For UI-related hotfixes:
66
- - Use Playwright to navigate to affected pages.
67
- - Verify the fix visually with screenshots.
68
- - Check console for errors.
69
- - Test the happy path AND edge cases.
70
- - If tests fail: fix the test failures before proceeding. Do not skip.
71
-
72
- 5. **Full review against engineering laws**
73
- - Read .sdlc/LAWS.md.
74
- - Check every changed line against every applicable law.
75
- - Verify: no dead code introduced, no unused imports, no inline complex types.
76
- - If any law is violated: fix it. Hotfixes are not exempt.
77
-
78
- 6. **Record in STATE.md**
79
- - Update .sdlc/STATE.md:
80
- - Record hotfix number (decimal: 2.1, 2.2, etc.).
81
- - Record: issue description, files changed, tests run, verification status.
82
- - Set loop_position back to current phase position.
83
- - Create .sdlc/hotfixes/HOTFIX-{number}-{timestamp}.md with full details.
84
-
85
- 7. **Force next action**
86
- - Output: "NEXT ACTION REQUIRED: /sdlc:verify — run full verification suite to confirm no regressions."
87
- </process>
88
-
89
- <success_criteria>
90
- - [ ] Inline spec created (3 lines: what, where, expected behavior)
91
- - [ ] Fix applied following engineering laws — no exceptions for hotfixes
92
- - [ ] Full test suite runs and passes
93
- - [ ] Playwright verification completed for UI-related hotfixes
94
- - [ ] Engineering laws review passed on all changed code
95
- - [ ] Hotfix recorded in STATE.md with decimal phase numbering
96
- - [ ] Hotfix detail file created in .sdlc/hotfixes/
97
- - [ ] Change surface is minimal — only the fix, nothing extra
98
- - [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:verify
99
- </success_criteria>
@@ -1,136 +0,0 @@
1
- ---
2
- name: sdlc:milestone
3
- description: "Create or complete project milestones"
4
- argument-hint: "[create <name> | complete]"
5
- allowed-tools: [Read, Write, Bash, Glob, Grep, AskUserQuestion]
6
- ---
7
-
8
- <objective>
9
- Manage project milestones. Create new milestones with scope definition. Complete milestones with verification, archival, and tagging.
10
-
11
- **When to use:**
12
- - Starting a new body of work: `/sdlc:milestone create <name>`
13
- - Finishing a milestone: `/sdlc:milestone complete`
14
- - Checking milestone status: `/sdlc:milestone` (no argument)
15
-
16
- **What it does:**
17
- - **No argument:** Show current milestone status, phases, and progress.
18
- - **create:** Ask clarification questions about scope, then create milestone with phases.
19
- - **complete:** Verify all phases done, archive, update ROADMAP.md, create git tag.
20
-
21
- **What happens next:**
22
- - After create: /sdlc:spec to define the first unit of work.
23
- - After complete: Completion summary displayed.
24
- </objective>
25
-
26
- <execution_context>
27
- @~/.claude/sdlc-framework/workflows/milestone.md
28
- @.sdlc/STATE.md
29
- @.sdlc/ROADMAP.md
30
- </execution_context>
31
-
32
- <context>
33
- $ARGUMENTS — one of: empty, "create <name>", or "complete".
34
-
35
- Read .sdlc/STATE.md for current milestone.
36
- Read .sdlc/ROADMAP.md for milestone definitions and progress.
37
- </context>
38
-
39
- <process>
40
- Follow workflow: @~/.claude/sdlc-framework/workflows/milestone.md
41
-
42
- Step-by-step:
43
-
44
- ### If no argument: SHOW STATUS
45
-
46
- 1. Read .sdlc/ROADMAP.md.
47
- 2. Read .sdlc/STATE.md for current milestone.
48
- 3. Display:
49
- ```
50
- Current Milestone: {name}
51
- Status: {in-progress | blocked}
52
-
53
- Phases:
54
- [x] Phase 1: {name} — completed
55
- [x] Phase 2: {name} — completed
56
- [ ] Phase 3: {name} — in progress (3/5 plans done)
57
- [ ] Phase 4: {name} — not started
58
-
59
- Progress: [████████████░░░░░░░░] 60%
60
- ```
61
- 4. Show the next required action based on current loop position.
62
-
63
- ### If "create <name>": CREATE MILESTONE
64
-
65
- 1. Parse the milestone name from $ARGUMENTS.
66
- 2. Ask clarification questions via AskUserQuestion:
67
- - "What is the objective of this milestone? (1-2 sentences)"
68
- - "What are the key deliverables? (list 3-5)"
69
- - "What does 'done' look like? (acceptance criteria)"
70
- - "Estimated number of phases? (suggest based on deliverables)"
71
- 3. Create the milestone in .sdlc/ROADMAP.md:
72
- ```
73
- ## Milestone: {name}
74
- Objective: {from answer}
75
- Status: in-progress
76
-
77
- ### Phases
78
- - Phase 1: {derived from deliverables}
79
- - Phase 2: {derived from deliverables}
80
- ...
81
-
82
- ### Acceptance Criteria
83
- - {from answer}
84
- ```
85
- 4. Update .sdlc/STATE.md:
86
- - Set current_milestone to the new milestone name.
87
- - Set current_phase to Phase 1.
88
- - Set loop_position to SPEC.
89
- 5. Output: "NEXT ACTION REQUIRED: /sdlc:spec — define the first unit of work for Phase 1."
90
-
91
- ### If "complete": COMPLETE MILESTONE
92
-
93
- 1. Read .sdlc/STATE.md and .sdlc/ROADMAP.md.
94
- 2. Verify ALL phases in the current milestone are marked complete.
95
- - If any phase is incomplete, output: "Cannot complete milestone. Phase {N}: {name} is not done. Complete it first." Then stop.
96
- 3. Archive the milestone:
97
- - Create .sdlc/archive/MILESTONE-{name}-{timestamp}.md with full milestone data.
98
- - Mark the milestone as `completed` in ROADMAP.md with completion timestamp.
99
- 4. Update ROADMAP.md:
100
- - Set milestone status to `completed`.
101
- - If there is a next milestone, note it.
102
- 5. Create a git tag:
103
- - Run `git tag -a milestone/{name} -m "Milestone completed: {name}"`.
104
- - If git is not initialized or tag fails, warn but continue.
105
- 6. Update STATE.md:
106
- - Clear current_milestone if no next milestone.
107
- - Or set current_milestone to the next milestone and loop_position to SPEC.
108
- 7. Output completion summary:
109
- ```
110
- Milestone Complete: {name}
111
-
112
- Phases completed: {N}
113
- Plans executed: {N}
114
- Hotfixes applied: {N}
115
- Git tag: milestone/{name}
116
-
117
- {If next milestone exists}
118
- Next milestone: {name}
119
- Run /sdlc:spec to begin.
120
-
121
- {If no next milestone}
122
- All milestones complete. Define new milestones with /sdlc:milestone create <name>.
123
- ```
124
- </process>
125
-
126
- <success_criteria>
127
- - [ ] No argument: milestone status displayed with phase progress
128
- - [ ] Create: clarification questions asked, milestone added to ROADMAP.md, STATE.md updated
129
- - [ ] Create: output ends with NEXT ACTION REQUIRED: /sdlc:spec
130
- - [ ] Complete: all phases verified as done before completing
131
- - [ ] Complete: milestone archived to .sdlc/archive/
132
- - [ ] Complete: ROADMAP.md updated with completion status
133
- - [ ] Complete: git tag created
134
- - [ ] Complete: STATE.md updated for next milestone (or cleared)
135
- - [ ] No guessing — all scope gathered via clarification questions
136
- </success_criteria>
@@ -1,115 +0,0 @@
1
- ---
2
- name: sdlc:pause
3
- description: "Save context for session break"
4
- argument-hint: "[reason]"
5
- allowed-tools: [Read, Write, Bash, Glob, Grep, AskUserQuestion]
6
- ---
7
-
8
- <objective>
9
- Save complete session context so you can walk away and pick up exactly where you left off. Creates a HANDOFF.md that captures everything the next session needs.
10
-
11
- **When to use:** You need to take a break, switch tasks, or end your session. Run this before closing your terminal.
12
-
13
- **What it does:**
14
- 1. Detect current loop position from STATE.md.
15
- 2. Gather all context: work done, decisions made, blockers, in-progress tasks.
16
- 3. Create HANDOFF.md with everything needed to resume.
17
- 4. Optionally create a WIP git commit.
18
- 5. Tell you exactly how to resume.
19
-
20
- **What happens next:** When you return, run /sdlc:resume.
21
- </objective>
22
-
23
- <execution_context>
24
- @~/.claude/sdlc-framework/workflows/pause-resume.md
25
- @.sdlc/STATE.md
26
- </execution_context>
27
-
28
- <context>
29
- $ARGUMENTS — optional reason for pausing (e.g., "end of day", "switching to urgent task").
30
-
31
- Read .sdlc/STATE.md to detect current loop position and active work.
32
- </context>
33
-
34
- <process>
35
- Follow workflow: @~/.claude/sdlc-framework/workflows/pause-resume.md
36
-
37
- Step-by-step:
38
-
39
- 1. **Read current state**
40
- - Read .sdlc/STATE.md to get:
41
- - Current loop_position (SPEC, IMPLEMENT, VERIFY, REVIEW, CLOSE, DEBUG, HOTFIX).
42
- - Current milestone and phase.
43
- - Current plan (if any).
44
- - Any recorded blockers.
45
-
46
- 2. **Gather session context**
47
- - Check git status for uncommitted changes (`git status --short`).
48
- - Check git log for recent commits in this session (`git log --oneline -5`).
49
- - Read any in-progress spec, plan, or task files referenced in STATE.md.
50
- - Scan .sdlc/ for recently modified files (`find .sdlc -mmin -120 -type f`).
51
-
52
- 3. **Create HANDOFF.md**
53
- - Save to .sdlc/handoffs/HANDOFF-{timestamp}.md with:
54
-
55
- ```
56
- # Session Handoff — {timestamp}
57
-
58
- ## Loop Position
59
- {current loop_position} in {milestone} / {phase}
60
-
61
- ## Work Completed This Session
62
- - {list of completed tasks, commits, files changed}
63
-
64
- ## Work In Progress
65
- - {what was being worked on when paused}
66
- - {current state of that work}
67
-
68
- ## Decisions Made
69
- - {any architectural or design decisions}
70
-
71
- ## Blockers
72
- - {anything preventing progress}
73
-
74
- ## Uncommitted Changes
75
- - {list of modified/untracked files from git status}
76
-
77
- ## Resume Instructions
78
- Run /sdlc:resume to continue.
79
- The framework will pick up at: {loop_position}
80
- Next action will be: {determined next action}
81
- ```
82
-
83
- 4. **Update STATE.md**
84
- - Add session continuity section:
85
- - `paused_at: {timestamp}`
86
- - `pause_reason: {from $ARGUMENTS or "manual pause"}`
87
- - `handoff_file: .sdlc/handoffs/HANDOFF-{timestamp}.md`
88
- - Do NOT change loop_position — it stays where it was.
89
-
90
- 5. **Offer WIP commit**
91
- - Check if there are uncommitted changes.
92
- - If yes, ask the user via AskUserQuestion:
93
- "You have uncommitted changes. Create a WIP commit? (yes/no)"
94
- - If yes: stage all changes and commit with message "WIP: {current task} [sdlc:pause]".
95
- - If no: note in HANDOFF.md that uncommitted changes exist.
96
-
97
- 6. **Output resume instructions**
98
- - Print:
99
- ```
100
- Session paused. Context saved to .sdlc/handoffs/HANDOFF-{timestamp}.md
101
-
102
- When you return, run: /sdlc:resume
103
- ```
104
- - Do not suggest any other actions. The only valid next step is /sdlc:resume.
105
- </process>
106
-
107
- <success_criteria>
108
- - [ ] Current loop position detected from STATE.md
109
- - [ ] All session context gathered (commits, changes, decisions, blockers)
110
- - [ ] HANDOFF.md created in .sdlc/handoffs/ with complete context
111
- - [ ] STATE.md updated with session continuity section
112
- - [ ] WIP commit offered if uncommitted changes exist
113
- - [ ] Output clearly states: "When you return, run /sdlc:resume"
114
- - [ ] No ambiguity — exactly one path forward
115
- </success_criteria>
@@ -1,103 +0,0 @@
1
- ---
2
- name: sdlc:resume
3
- description: "Restore context and continue with ONE next action"
4
- argument-hint: "[handoff-path]"
5
- allowed-tools: [Read, Write, Bash, Glob, Grep]
6
- ---
7
-
8
- <objective>
9
- Restore session context after a break and determine exactly ONE next action. No menus. No options. The framework decides what happens next.
10
-
11
- **When to use:** After running /sdlc:pause and returning to work. The framework picks up exactly where you left off.
12
-
13
- **What it does:**
14
- 1. Read STATE.md and the most recent HANDOFF.md.
15
- 2. Display: where you stopped, what was in progress, any blockers.
16
- 3. Determine and force exactly ONE next action.
17
- 4. Archive the consumed handoff.
18
-
19
- **What happens next:** The determined action. You do not choose — the framework routes you.
20
- </objective>
21
-
22
- <execution_context>
23
- @~/.claude/sdlc-framework/workflows/pause-resume.md
24
- @.sdlc/STATE.md
25
- </execution_context>
26
-
27
- <context>
28
- $ARGUMENTS — optional path to a specific handoff file. If not provided, use the most recent one.
29
-
30
- Read .sdlc/STATE.md for loop position and session continuity data.
31
- </context>
32
-
33
- <process>
34
- Follow workflow: @~/.claude/sdlc-framework/workflows/pause-resume.md
35
-
36
- Step-by-step:
37
-
38
- 1. **Locate the handoff file**
39
- - If $ARGUMENTS contains a path, use that file.
40
- - Otherwise, read .sdlc/STATE.md for the `handoff_file` field.
41
- - If no handoff_file in STATE.md, scan .sdlc/handoffs/ for the most recently modified file.
42
- - If no handoff exists at all, output: "No handoff found. Check .sdlc/STATE.md for current position and run /sdlc:status." Then stop.
43
-
44
- 2. **Read and display context**
45
- - Read the handoff file.
46
- - Read .sdlc/STATE.md.
47
- - Display to the user:
48
-
49
- ```
50
- ## Session Restored
51
-
52
- **Where you stopped:** {loop_position} in {milestone} / {phase}
53
- **Paused at:** {timestamp}
54
- **Reason:** {pause_reason}
55
-
56
- ### Work In Progress
57
- {from handoff}
58
-
59
- ### Blockers
60
- {from handoff, or "None"}
61
-
62
- ### Uncommitted Changes
63
- {from handoff — verify against current git status}
64
- ```
65
-
66
- 3. **Verify current state**
67
- - Run `git status --short` to check if uncommitted changes match the handoff.
68
- - If they do not match, warn: "Git state has changed since pause. Review before proceeding."
69
- - Check if any WIP commit exists from the pause (`git log --oneline -3`).
70
-
71
- 4. **Determine the ONE next action**
72
- - Use the loop_position from STATE.md to determine the next action:
73
- - `SPEC` → "NEXT ACTION REQUIRED: /sdlc:spec"
74
- - `IMPLEMENT` → "NEXT ACTION REQUIRED: /sdlc:impl"
75
- - `VERIFY` → "NEXT ACTION REQUIRED: /sdlc:verify"
76
- - `REVIEW` → "NEXT ACTION REQUIRED: /sdlc:review"
77
- - `CLOSE` → "NEXT ACTION REQUIRED: /sdlc:close"
78
- - `DEBUG` → "NEXT ACTION REQUIRED: /sdlc:debug"
79
- - `HOTFIX` → "NEXT ACTION REQUIRED: /sdlc:hotfix"
80
- - If blockers exist, prepend: "BLOCKER: {blocker}. Resolve before proceeding."
81
- - Output exactly ONE action. No alternatives. No menus.
82
-
83
- 5. **Archive the consumed handoff**
84
- - Move the handoff file to .sdlc/handoffs/archive/:
85
- `mkdir -p .sdlc/handoffs/archive && mv {handoff_file} .sdlc/handoffs/archive/`
86
- - Remove the `handoff_file` field from STATE.md session continuity section.
87
- - Remove the `paused_at` and `pause_reason` fields.
88
-
89
- 6. **Force the next action**
90
- - Output the determined next action as the final line.
91
- - Do not offer choices. The loop position dictates the action.
92
- </process>
93
-
94
- <success_criteria>
95
- - [ ] Handoff file located (from argument, STATE.md, or most recent)
96
- - [ ] Context displayed: loop position, work in progress, blockers
97
- - [ ] Git state verified against handoff (warn if mismatch)
98
- - [ ] Exactly ONE next action determined from loop_position
99
- - [ ] Handoff file archived to .sdlc/handoffs/archive/
100
- - [ ] STATE.md session continuity fields cleaned up
101
- - [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:{action}
102
- - [ ] No menus, no options, no choices — one path forward
103
- </success_criteria>
@@ -1,190 +0,0 @@
1
- <purpose>Emergency fix workflow for critical production issues. Skips spec ceremony but enforces full verification and review. Tracked as a decimal sub-phase (e.g., 02.1) to maintain audit trail without disrupting the main phase sequence.</purpose>
2
- <when_to_use>Use ONLY for critical issues: production down, data corruption, security vulnerability, blocking bug affecting users NOW. For non-critical bugs, use /sdlc:debug instead.</when_to_use>
3
- <required_reading>.sdlc/STATE.md, .sdlc/PROJECT.md, .sdlc/LAWS.md</required_reading>
4
- <loop_context>
5
- expected_phase: HOTFIX (emergency, interrupts main loop)
6
- prior_phase: any (hotfix can interrupt at any point)
7
- next_phase: VERIFY (hotfix still goes through verify and review)
8
- </loop_context>
9
- <process>
10
-
11
- <step name="accept_critical_issue" priority="first">
12
- Receive the critical issue description.
13
-
14
- Ask the user:
15
- Question 1: "What is broken? (specific symptom)"
16
- Question 2: "What is the impact? (who is affected, how badly)"
17
- Question 3: "When did it start? (recent deploy, config change, external event)"
18
-
19
- CLASSIFY SEVERITY:
20
- - P0 (system down): entire service or critical path is unavailable
21
- - P1 (data risk): data corruption, security breach, or data loss occurring
22
- - P2 (major feature broken): core feature broken but system is up
23
-
24
- IF severity is not P0 or P1: Display: "This does not appear critical. Consider using /sdlc:debug for structured debugging or /sdlc:fast for a quick fix."
25
- Let the user override if they insist.
26
-
27
- Save the current STATE.md position — hotfix must restore it when done.
28
-
29
- WHY: Hotfix workflow trades ceremony for speed. That trade-off is only justified for critical issues. Overusing hotfix leads to unreviewed, untested changes accumulating.
30
- </step>
31
-
32
- <step name="create_inline_spec" priority="second">
33
- Create a lightweight inline spec (no file — kept in memory for speed).
34
-
35
- Inline spec:
36
- ```
37
- Hotfix: {title}
38
- Severity: {P0|P1|P2}
39
- Symptom: {what is broken}
40
- Expected: {what should happen}
41
- Files likely affected: {from initial analysis}
42
- Acceptance criteria:
43
- AC-1: GIVEN the fix is deployed WHEN {trigger action} THEN {correct behavior}
44
- AC-2: GIVEN the fix is deployed WHEN regression tests run THEN all pass
45
- Boundary: fix ONLY the critical issue. No refactoring. No cleanup. No "while I am here" changes.
46
- ```
47
-
48
- Display the inline spec to the user. Do NOT wait for approval — in an emergency, speed matters. But DO display it so the user can object if the scope is wrong.
49
-
50
- WHY: Even emergencies get a spec — just a minimal one. Without it, the fix scope creeps and the hotfix becomes a feature.
51
- </step>
52
-
53
- <step name="fix_directly" priority="third">
54
- Fix the issue directly. No sub-agents — hotfix is single-threaded for speed and control.
55
-
56
- PROCESS:
57
- 1. Read the relevant files identified in the inline spec
58
- 2. If root cause is not immediately obvious, use binary search isolation (same as debug-flow)
59
- 3. Apply the MINIMAL fix — change as few lines as possible
60
- 4. Do NOT refactor. Do NOT clean up. Do NOT improve. Fix the bug ONLY.
61
- 5. Add a regression test for the specific failure scenario
62
- 6. Run the regression test — it must pass
63
-
64
- RULES FOR HOTFIX CODE:
65
- - Engineering laws still apply (no empty catch blocks, no hardcoded secrets)
66
- - But scope is strictly limited to the fix
67
- - Mark any technical debt created by the minimal fix with a TODO comment:
68
- "TODO(hotfix-{date}): Clean up in next regular loop"
69
- - These TODOs become tasks in the next spec
70
-
71
- Record:
72
- ```
73
- Files modified: {list}
74
- Lines changed: {count}
75
- Root cause: {brief explanation}
76
- Technical debt introduced: {yes/no — if yes, describe}
77
- ```
78
-
79
- WHY: Hotfixes are surgical. Minimal changes minimize risk of introducing new bugs. The TODO ensures debt is tracked and addressed, not forgotten.
80
- </step>
81
-
82
- <step name="full_verification" priority="fourth">
83
- Run the SAME verification as verify-phase. No shortcuts.
84
-
85
- FOR EACH AC in the inline spec:
86
- 1. Execute the verification (Playwright for UI, curl for API, test suite for logic)
87
- 2. Record PASS or FAIL with evidence
88
-
89
- Additionally:
90
- - Run the FULL test suite (not just related tests)
91
- - A hotfix that breaks something else is worse than the original bug
92
-
93
- IF ANY VERIFICATION FAILS:
94
- Display: "Hotfix verification failed: {details}. The fix is incomplete or introduced a regression."
95
- Return to fix step.
96
-
97
- IF ALL PASS:
98
- Proceed to review.
99
-
100
- WHY: Hotfixes are the riskiest changes — rushed, minimal context, high pressure. Full verification is non-negotiable precisely because the process is compressed.
101
- </step>
102
-
103
- <step name="full_review" priority="fifth">
104
- Run the SAME review as review-phase. No shortcuts.
105
-
106
- Check all modified files against engineering laws.
107
-
108
- The review is likely to find:
109
- - WARN: minimal fix may not follow ideal patterns (acceptable for hotfix)
110
- - INFO: TODO comments for technical debt (expected)
111
-
112
- BUT BLOCKERS STILL BLOCK:
113
- - Hardcoded secrets: BLOCKER (no exceptions, not even in emergencies)
114
- - Empty catch blocks: BLOCKER
115
- - SQL injection: BLOCKER
116
-
117
- IF BLOCKERS: Fix them. Even in an emergency, security and error handling are non-negotiable.
118
- IF CLEAN or WARNINGS ONLY: Proceed.
119
-
120
- WHY: Security violations in hotfixes are especially dangerous because hotfixes often get deployed without the usual deployment review.
121
- </step>
122
-
123
- <step name="record_and_update_state" priority="sixth">
124
- Create the hotfix record.
125
-
126
- Determine the hotfix number:
127
- - Read current phase number (e.g., "02")
128
- - Count existing hotfixes: look for HOTFIX-*.md in the phase directory
129
- - Hotfix number = {phase}.{hotfix-count + 1} (e.g., "02.1", "02.2")
130
-
131
- Create .sdlc/phases/{current_phase}/HOTFIX-{number}-SUMMARY.md:
132
- ```markdown
133
- # Hotfix {number}: {title}
134
-
135
- ## Issue
136
- - **Severity**: {P0|P1|P2}
137
- - **Symptom**: {what was broken}
138
- - **Impact**: {who was affected}
139
- - **Duration**: {how long the issue lasted, if known}
140
-
141
- ## Root Cause
142
- {Brief explanation}
143
-
144
- ## Fix
145
- - **Files modified**: {list}
146
- - **Approach**: {what was changed}
147
- - **Lines changed**: {count}
148
-
149
- ## Verification
150
- | AC | Status | Evidence |
151
- |----|--------|----------|
152
- | AC-1 | PASS | {evidence} |
153
- | AC-2 | PASS | {evidence} |
154
-
155
- ## Technical Debt
156
- - {TODO items introduced by the minimal fix}
157
- - These should be addressed in the next regular /sdlc:spec loop
158
-
159
- ## Review
160
- - Blockers: 0
161
- - Warnings: {count}
162
- ```
163
-
164
- Update .sdlc/STATE.md:
165
- - RESTORE the prior state (hotfix does not advance the main loop)
166
- - Add history entry: "{timestamp} | hotfix | {severity}: {title}. {N} files modified. Debt: {yes/no}."
167
-
168
- Update .sdlc/ROADMAP.md:
169
- - Add a note under the current phase: "Hotfix {number}: {title} ({date})"
170
-
171
- Display:
172
- ```
173
- Hotfix applied and verified.
174
-
175
- Hotfix: {number}
176
- Severity: {severity}
177
- Files modified: {N}
178
- Verification: PASSED
179
- Review: PASSED ({N} warnings)
180
- Technical debt: {description or "none"}
181
-
182
- Record: .sdlc/phases/{phase}/HOTFIX-{number}-SUMMARY.md
183
-
184
- State restored. Continue with: {prior next_required_action}
185
- ```
186
-
187
- WHY: Hotfixes are recorded separately from regular plans so they do not disrupt the plan numbering. The decimal notation (02.1) makes it clear this was an emergency intervention, not planned work.
188
- </step>
189
-
190
- </process>