sdlc-framework 1.0.2 → 2.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.
@@ -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>
@@ -1,169 +0,0 @@
1
- <purpose>Create new milestones or complete existing ones. Milestones are the highest-level organizational unit — they contain phases, which contain plans. This workflow manages the milestone lifecycle.</purpose>
2
- <when_to_use>Run to create a new milestone (/sdlc:milestone create) or complete an existing one (/sdlc:milestone complete). Also triggered automatically by transition-phase when the last phase in a milestone completes.</when_to_use>
3
- <required_reading>.sdlc/STATE.md, .sdlc/ROADMAP.md, .sdlc/PROJECT.md</required_reading>
4
- <loop_context>
5
- expected_phase: MILESTONE (meta-workflow, operates above the loop)
6
- prior_phase: varies
7
- next_phase: SPEC (for new milestone) or none (project complete)
8
- </loop_context>
9
- <process>
10
-
11
- <step name="determine_operation" priority="first">
12
- Determine whether the user wants to CREATE or COMPLETE a milestone.
13
-
14
- IF explicitly specified (e.g., "/sdlc:milestone create" or "/sdlc:milestone complete"):
15
- Use the specified operation.
16
-
17
- IF not specified:
18
- Read .sdlc/ROADMAP.md.
19
- - If the current milestone has incomplete phases → likely COMPLETE is premature
20
- - If the current milestone is done or no milestone is active → likely CREATE
21
-
22
- Ask: "Do you want to:
23
- A. Create a new milestone
24
- B. Complete the current milestone ({name})
25
- ?"
26
-
27
- WHY: The two operations are very different. Creating sets up future work. Completing archives past work. Mixing them up would corrupt the state.
28
- </step>
29
-
30
- <step name="create_milestone" priority="second">
31
- ONLY IF operation = CREATE.
32
-
33
- A. GATHER MILESTONE INFO:
34
-
35
- Question 1: "What is the milestone name? (e.g., 'MVP', 'Auth System', 'v2.0')"
36
-
37
- Question 2: "What is the goal of this milestone? What will be true when it is done?"
38
- - This becomes the milestone completion criteria
39
- - Be specific: "Users can register, log in, and reset passwords" not "Auth works"
40
-
41
- Question 3: "What phases make up this milestone? List 2-5 phases in order."
42
- - Provide guidance: "Each phase should be a cohesive group of related work"
43
- - Example: "Phase 01: Database Schema, Phase 02: API Endpoints, Phase 03: Frontend Forms"
44
-
45
- Question 4: "Any dependencies on prior milestones? (e.g., requires 'MVP' milestone to be complete)"
46
- - If yes: verify the dependency milestone is complete
47
-
48
- Question 5: "Any rough timeline or priority? (optional)"
49
-
50
- B. CALCULATE MILESTONE NUMBER:
51
- Read ROADMAP.md. Count existing milestones. New milestone = max + 1, zero-padded to 2 digits.
52
-
53
- C. CREATE PHASE DIRECTORIES:
54
- For each phase in the new milestone:
55
- mkdir -p .sdlc/phases/{phase-number}-{phase-name}
56
-
57
- D. UPDATE ROADMAP.MD:
58
- Add the new milestone section:
59
- ```markdown
60
- ## Milestone {number}: {name}
61
- **Goal**: {goal}
62
- **Status**: NOT STARTED
63
- **Dependencies**: {list or "None"}
64
-
65
- ### Phases
66
- | Phase | Name | Status | Plans |
67
- |-------|------|--------|-------|
68
- | {NN} | {name} | NOT STARTED | 0 |
69
- | {NN} | {name} | NOT STARTED | 0 |
70
- ```
71
-
72
- E. UPDATE STATE.MD:
73
- - If no active milestone: set this as the current milestone
74
- - Add history entry: "{timestamp} | milestone | Created milestone {number}: {name} with {N} phases"
75
-
76
- Display:
77
- ```
78
- Milestone created: {number} — {name}
79
-
80
- Phases:
81
- 1. {phase-name}
82
- 2. {phase-name}
83
- ...
84
-
85
- Directories created: .sdlc/phases/{phase-dirs}
86
-
87
- NEXT ACTION REQUIRED: /sdlc:spec
88
- Start the first phase with /sdlc:spec.
89
- ```
90
-
91
- WHY: Milestones provide the big-picture structure. Without them, phases are disconnected chunks of work with no clear endpoint.
92
- </step>
93
-
94
- <step name="complete_milestone" priority="third">
95
- ONLY IF operation = COMPLETE.
96
-
97
- A. VERIFY ALL PHASES ARE DONE:
98
- Read ROADMAP.md. For the current milestone:
99
- - List all phases
100
- - Check each phase status: must be COMPLETE
101
- - Check each phase directory: must have at least one SUMMARY.md
102
-
103
- IF ANY PHASE IS INCOMPLETE:
104
- STOP. Display: "Cannot complete milestone. Phase {N} ({name}) is not complete. Status: {status}."
105
- List incomplete phases with their current status.
106
-
107
- B. VERIFY STATE CONSISTENCY:
108
- Cross-check:
109
- - STATE.md milestone number matches ROADMAP.md current milestone
110
- - STATE.md loop_position is CLOSE ✓ or ready for new spec
111
- - No active plan is in progress
112
-
113
- IF INCONSISTENCY FOUND:
114
- Display: "State inconsistency detected: {details}. Run /sdlc:resume to reconcile."
115
-
116
- C. GENERATE MILESTONE SUMMARY:
117
- Read all SUMMARY.md files across all phases in this milestone.
118
- Compile a milestone-level summary:
119
-
120
- ```
121
- Milestone {number}: {name}
122
-
123
- Completed: {date}
124
- Duration: {first spec date} to {last close date}
125
- Phases: {count}
126
- Plans executed: {total across all phases}
127
- Hotfixes: {count, if any}
128
-
129
- Deliverables:
130
- - {consolidated list from all summaries}
131
-
132
- Key decisions:
133
- - {consolidated from all summaries}
134
-
135
- Technical debt introduced:
136
- - {from hotfixes and review warnings}
137
- ```
138
-
139
- D. ARCHIVE:
140
- The milestone's phase directories remain in place (they are the historical record).
141
- No files are moved or deleted.
142
-
143
- E. GIT TAG (if git repository):
144
- Ask user: "Create a git tag for this milestone? (recommended)"
145
- If yes:
146
- git tag -a "milestone-{number}-{name}" -m "Milestone {number}: {name} complete"
147
- Display the tag name.
148
-
149
- F. UPDATE ROADMAP.MD:
150
- Set milestone status to COMPLETE with completion date.
151
-
152
- G. UPDATE STATE.MD:
153
- - Clear current milestone
154
- - Add history entry: "{timestamp} | milestone | Completed milestone {number}: {name}. {N} phases, {N} plans."
155
-
156
- H. DETERMINE NEXT MILESTONE:
157
- Check ROADMAP.md for the next NOT STARTED milestone.
158
-
159
- IF NEXT MILESTONE EXISTS:
160
- Set it as current in STATE.md.
161
- Display: "Milestone {number} complete. Next milestone: {next-number} — {next-name}. Run /sdlc:spec to begin."
162
-
163
- IF NO NEXT MILESTONE:
164
- Display: "Milestone {number} complete. No further milestones planned. Run /sdlc:milestone create to plan the next one, or the project may be complete."
165
-
166
- WHY: Milestone completion is a significant checkpoint. The git tag marks a stable point. The summary captures institutional knowledge. Without completion, milestones just fade out with no clear ending.
167
- </step>
168
-
169
- </process>
@@ -1,153 +0,0 @@
1
- <purpose>Save the current session state so work can be resumed later without context loss. Creates a HANDOFF.md that captures everything the next session needs to continue seamlessly.</purpose>
2
- <when_to_use>Run when ending a work session, switching context, or before a break. Can be run at any point in the loop — the state is preserved exactly as-is.</when_to_use>
3
- <required_reading>.sdlc/STATE.md</required_reading>
4
- <loop_context>
5
- expected_phase: any (pause works at any loop position)
6
- prior_phase: current position is preserved
7
- next_phase: RESUME (the next session must run /sdlc:resume)
8
- </loop_context>
9
- <process>
10
-
11
- <step name="read_current_state" priority="first">
12
- Read .sdlc/STATE.md. Capture:
13
- - Current milestone, phase, plan
14
- - Loop position (e.g., "IMPL ✓", "VERIFY in progress")
15
- - Next required action
16
- - Last history entry
17
-
18
- WHY: The state machine is the primary context. Without it, the resume workflow does not know where to continue.
19
- </step>
20
-
21
- <step name="gather_session_context" priority="second">
22
- Collect all relevant context from the current session:
23
-
24
- A. WORK COMPLETED THIS SESSION:
25
- - Read STATE.md history entries from today/this session
26
- - Summarize what was done (e.g., "Completed spec for auth module, started implementation")
27
-
28
- B. DECISIONS MADE:
29
- - Scan recent SPEC.md, REVIEW.md, or SUMMARY.md files for decisions
30
- - List any verbal decisions or trade-offs discussed but not yet written down
31
-
32
- C. IN-PROGRESS WORK:
33
- - If mid-implementation: which tasks are done, which are pending?
34
- - If mid-verification: which ACs passed, which remain?
35
- - If mid-review: which files reviewed, which remain?
36
-
37
- D. BLOCKERS AND OPEN QUESTIONS:
38
- - Any unresolved issues?
39
- - Any questions that need user input?
40
- - Any external dependencies (waiting on API, waiting on design)?
41
-
42
- E. IMPORTANT CONTEXT NOT IN FILES:
43
- Ask the user: "Is there anything I should remember for next session that is not already written down? (decisions, context, concerns)"
44
- If yes: record their response verbatim.
45
-
46
- WHY: Session context is ephemeral — it lives in conversation history, not in files. The handoff captures it before it is lost.
47
- </step>
48
-
49
- <step name="check_uncommitted_changes" priority="third">
50
- Run: git status (if the project is a git repository)
51
-
52
- IF UNCOMMITTED CHANGES EXIST:
53
- Display the list of modified/untracked files.
54
-
55
- Ask the user:
56
- "You have uncommitted changes:
57
- {file list}
58
-
59
- Options:
60
- A. Create a WIP commit now (recommended — prevents accidental loss)
61
- B. Leave changes uncommitted (they will persist in the working directory)
62
- C. Stash changes (saves them without committing)"
63
-
64
- IF user chooses A:
65
- Stage relevant files (not .env or secret files)
66
- Create commit with message: "wip({phase}): {brief description of current work}"
67
- Note the commit hash in the handoff
68
-
69
- IF user chooses B:
70
- Note in handoff: "WARNING: uncommitted changes exist. Do not run git clean or git checkout."
71
-
72
- IF user chooses C:
73
- Run: git stash push -m "sdlc-pause-{timestamp}"
74
- Note the stash reference in the handoff
75
-
76
- IF NO UNCOMMITTED CHANGES:
77
- Note: "Working directory clean. No uncommitted changes."
78
-
79
- WHY: Uncommitted changes can be lost (accidental git clean, system crash, someone else working on the branch). A WIP commit is the safest option.
80
- </step>
81
-
82
- <step name="create_handoff" priority="fourth">
83
- Create .sdlc/HANDOFF.md (overwrite if exists — only one active handoff at a time):
84
-
85
- ```markdown
86
- # Session Handoff
87
-
88
- ## Session Info
89
- - **Paused at**: {ISO timestamp}
90
- - **Loop position**: {from STATE.md}
91
- - **Next required action**: {from STATE.md}
92
-
93
- ## What Was Done This Session
94
- {Bulleted list of work completed}
95
-
96
- ## Current State
97
- - **Phase**: {phase name and number}
98
- - **Plan**: {plan number and title, or "no active plan"}
99
- - **Loop step**: {SPEC|IMPL|VERIFY|REVIEW|CLOSE} — {status}
100
-
101
- ## In-Progress Work
102
- {What is partially done — specific tasks, files, ACs}
103
- - Task X: COMPLETE
104
- - Task Y: IN PROGRESS — {what remains}
105
- - Task Z: NOT STARTED
106
-
107
- ## Decisions Made
108
- {List of decisions with rationale}
109
-
110
- ## Blockers / Open Questions
111
- {List of blockers or questions that need resolution}
112
-
113
- ## User Context
114
- {Verbatim notes from the user, if any}
115
-
116
- ## Git State
117
- - **Branch**: {current branch}
118
- - **Commit**: {latest commit hash and message}
119
- - **Uncommitted changes**: {yes/no — details}
120
- - **Stash**: {stash reference, if applicable}
121
-
122
- ## Resume Instructions
123
- Run /sdlc:resume to continue. The resume workflow will:
124
- 1. Read this handoff
125
- 2. Restore context
126
- 3. Tell you exactly what to do next
127
- ```
128
-
129
- WHY: HANDOFF.md is the bridge between sessions. Without it, resuming requires re-reading all files and reconstructing context manually — slow and error-prone.
130
- </step>
131
-
132
- <step name="update_state" priority="fifth">
133
- Update .sdlc/STATE.md:
134
- - Add session field: paused_at = {timestamp}
135
- - Add history entry: "{timestamp} | pause | Session paused at {loop_position}. Handoff created."
136
- - Do NOT change loop_position or next_required_action — those are preserved for resume
137
-
138
- Display:
139
- ```
140
- Session saved.
141
-
142
- Handoff: .sdlc/HANDOFF.md
143
- State: {loop_position}
144
- Next action (on resume): {next_required_action}
145
- Git: {clean | WIP committed | stashed | uncommitted changes}
146
-
147
- When you return, run /sdlc:resume to continue exactly where you left off.
148
- ```
149
-
150
- WHY: The explicit "run /sdlc:resume" instruction ensures the next session starts correctly. Without it, the user might try to pick up manually and skip steps.
151
- </step>
152
-
153
- </process>