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.
package/README.md CHANGED
@@ -76,13 +76,16 @@ Choose global (all projects) or local (current project only). Verify with `/sdlc
76
76
  # 1. Initialize the framework
77
77
  /sdlc:init
78
78
 
79
- # 2. Define what to build (asks clarification questions)
79
+ # 2. (Optional) Brainstorm AI asks questions, produces a PRD
80
+ /sdlc:discuss add user notifications
81
+
82
+ # 3. Define what to build (asks clarification questions)
80
83
  /sdlc:spec
81
84
 
82
- # 3. Build it (spawns parallel sub-agents)
85
+ # 4. Build it (spawns parallel sub-agents)
83
86
  /sdlc:impl
84
87
 
85
- # 4. The framework forces verify → review → close automatically
88
+ # 5. The framework forces verify → review → close automatically
86
89
  # Just follow the NEXT ACTION REQUIRED prompts
87
90
  ```
88
91
 
@@ -120,6 +123,14 @@ Follows: reproduce → isolate → root-cause → fix → verify.
120
123
  └──────────────────────────────────────────────────────────┘
121
124
  ```
122
125
 
126
+ ### DISCUSS — Explore the idea (optional, pre-loop)
127
+
128
+ - AI-driven brainstorming — you describe an idea, AI asks structured questions
129
+ - 4 rounds max: problem space → scope → approach validation → requirements detail
130
+ - Every question includes a recommendation with concrete trade-offs
131
+ - Produces a PRD document at `.sdlc/discuss/{topic}-PRD.md`
132
+ - **User approval gate** — PRD must be approved before routing to `/sdlc:spec`
133
+
123
134
  ### SPEC — Define the work
124
135
 
125
136
  - Asks clarification questions (no guessing)
@@ -163,7 +174,7 @@ Follows: reproduce → isolate → root-cause → fix → verify.
163
174
 
164
175
  ## Commands
165
176
 
166
- 15 commands, grouped by purpose. Run `/sdlc:help` for the full reference.
177
+ 13 commands, grouped by purpose. Run `/sdlc:help` for the full reference.
167
178
 
168
179
  ### Core Loop
169
180
 
@@ -187,23 +198,27 @@ Follows: reproduce → isolate → root-cause → fix → verify.
187
198
  |---------|-------------|
188
199
  | `/sdlc:fix` | Fix review blockers systematically, auto re-review |
189
200
  | `/sdlc:debug <issue>` | Structured debugging: reproduce → isolate → fix → verify |
190
- | `/sdlc:hotfix <issue>` | Emergency fix with minimal ceremony |
191
201
 
192
- ### Session
202
+ ### Session & Status
203
+
204
+ | Command | What it does |
205
+ |---------|-------------|
206
+ | `/sdlc:status` | Show loop position, progress, forced next action |
207
+ | `/sdlc:status pause` | Save context for break, create HANDOFF.md |
208
+ | `/sdlc:status resume` | Restore context, ONE next action |
209
+
210
+ ### Planning & Research
193
211
 
194
212
  | Command | What it does |
195
213
  |---------|-------------|
196
- | `/sdlc:pause` | Save context for break |
197
- | `/sdlc:resume` | Restore context, ONE next action |
198
- | `/sdlc:status` | Show position + forced next action |
214
+ | `/sdlc:discuss [idea]` | Brainstorm an idea AI asks questions, produces a PRD |
215
+ | `/sdlc:research <topic>` | Deploy research sub-agents |
199
216
 
200
217
  ### Setup
201
218
 
202
219
  | Command | What it does |
203
220
  |---------|-------------|
204
- | `/sdlc:init` | Initialize framework in project |
205
- | `/sdlc:milestone` | Create or complete milestones |
206
- | `/sdlc:research` | Deploy research sub-agents |
221
+ | `/sdlc:init` | Initialize framework or add milestones |
207
222
  | `/sdlc:help` | Show command reference |
208
223
 
209
224
  ---
@@ -243,6 +258,7 @@ Severity is configurable per project in `.sdlc/LAWS.md`:
243
258
  │ ├── 01-01-SPEC.md
244
259
  │ ├── 01-01-REVIEW.md
245
260
  │ └── 01-01-SUMMARY.md
261
+ ├── discuss/ # PRD documents from /sdlc:discuss
246
262
  └── research/ # Sub-agent research output
247
263
  ```
248
264
 
@@ -254,7 +270,7 @@ Severity is configurable per project in `.sdlc/LAWS.md`:
254
270
 
255
271
  | Aspect | PAUL | SDLC |
256
272
  |--------|------|------|
257
- | Commands | 26 (cognitive overload) | 15 (focused) |
273
+ | Commands | 26 (cognitive overload) | 13 (focused) |
258
274
  | Testing | Manual UAT | Automated (Playwright MCP) |
259
275
  | Code review | None | Engineering Laws enforcement |
260
276
  | Implementation | In-session | Sub-agent parallel waves |
@@ -304,7 +320,7 @@ npx sdlc-framework@latest
304
320
  - Check `.sdlc/STATE.md` directly
305
321
 
306
322
  **Resuming after a break?**
307
- - Run `/sdlc:resume` — it reads state and handoffs automatically
323
+ - Run `/sdlc:status resume` — it reads state and handoffs automatically
308
324
 
309
325
  ---
310
326
 
package/bin/install.js CHANGED
@@ -144,11 +144,12 @@ function install(isGlobal) {
144
144
 
145
145
  ${yellow}Quick start:${reset}
146
146
  ${dim}1.${reset} /sdlc:init ${dim}— Initialize project${reset}
147
- ${dim}2.${reset} /sdlc:spec ${dim}— Define what to build${reset}
148
- ${dim}3.${reset} /sdlc:impl ${dim}— Build it (sub-agent parallel)${reset}
149
- ${dim}4.${reset} /sdlc:verify ${dim}— Playwright auto-test${reset}
150
- ${dim}5.${reset} /sdlc:review ${dim}— Engineering laws check${reset}
151
- ${dim}6.${reset} /sdlc:close ${dim}— Close the loop${reset}
147
+ ${dim}2.${reset} /sdlc:discuss ${dim}— Brainstorm idea into PRD (optional)${reset}
148
+ ${dim}3.${reset} /sdlc:spec ${dim}— Define what to build${reset}
149
+ ${dim}4.${reset} /sdlc:impl ${dim}— Build it (sub-agent parallel)${reset}
150
+ ${dim}5.${reset} /sdlc:verify ${dim}— Playwright auto-test${reset}
151
+ ${dim}6.${reset} /sdlc:review ${dim}— Engineering laws check${reset}
152
+ ${dim}7.${reset} /sdlc:close ${dim}— Close the loop${reset}
152
153
 
153
154
  ${dim}Or for small tasks:${reset} /sdlc:fast "add logout button"
154
155
  `)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sdlc-framework",
3
- "version": "1.0.2",
3
+ "version": "2.0.0",
4
4
  "description": "Structured Development Lifecycle - A closed-loop AI-assisted development framework for Claude Code",
5
5
  "bin": {
6
6
  "sdlc-framework": "bin/install.js"
@@ -19,7 +19,8 @@ Close the current SDLC loop by reconciling what was planned (SPEC.md) against wh
19
19
 
20
20
  **What happens next:**
21
21
  - More plans in the current phase: Framework directs you to /sdlc:spec for the next plan.
22
- - Phase complete (all plans done): Framework directs you to the next milestone/phase.
22
+ - Phase complete (all plans done): Framework advances to the next phase and directs to /sdlc:spec.
23
+ - Milestone complete (all phases done): Framework generates milestone summary, creates git tag, and advances to next milestone or marks project complete.
23
24
  - All milestones complete: Project is done.
24
25
 
25
26
  **Critical rule:** No loop closes without reconciliation. Every deviation from the spec is documented with a reason. Lessons learned feed into the next loop.
@@ -175,12 +176,24 @@ Step-by-step:
175
176
  - If phase is complete but more phases exist:
176
177
  - Output: "Phase <phase-name> complete. Next phase: <next-phase-name>."
177
178
  - End with: NEXT ACTION REQUIRED: /sdlc:spec
178
- - If milestone is complete but more milestones exist:
179
- - Output: "Milestone <milestone-name> complete. Next milestone: <next-milestone-name>."
180
- - End with: NEXT ACTION REQUIRED: /sdlc:spec
179
+ - If milestone is complete: run milestone completion (step 10).
181
180
  - If all milestones are complete:
182
181
  - Output: "All milestones complete. Project roadmap fulfilled."
183
- - End with: "Project complete. Run /sdlc:init to start a new project or update ROADMAP.md with new milestones."
182
+ - End with: "Project complete. Run /sdlc:init milestone <name> to plan the next milestone."
183
+
184
+ 10. **Milestone completion** (when all phases in current milestone are done)
185
+ a. Verify all phases in current milestone are marked complete in ROADMAP.md.
186
+ b. Generate milestone summary by reading all SUMMARY.md files across phases:
187
+ - Total phases, plans executed, hotfixes applied.
188
+ - Consolidated deliverables, key decisions, technical debt.
189
+ c. Create git tag (ask user first):
190
+ - `git tag -a "milestone-{number}-{name}" -m "Milestone {number}: {name} complete"`
191
+ d. Mark milestone as COMPLETE in ROADMAP.md with completion date.
192
+ e. Check for next milestone in ROADMAP.md:
193
+ - If exists: set as current in STATE.md.
194
+ Output: "Milestone complete. Next: {name}. NEXT ACTION REQUIRED: /sdlc:spec"
195
+ - If none: clear current_milestone.
196
+ Output: "Milestone complete. No further milestones. Run /sdlc:init milestone <name> to plan the next."
184
197
  </process>
185
198
 
186
199
  <success_criteria>
@@ -196,5 +209,6 @@ Step-by-step:
196
209
  - [ ] STATE.md updated: loop_position reset to SPEC, current plan advanced
197
210
  - [ ] ROADMAP.md updated: completed plan/phase/milestone marked as done
198
211
  - [ ] Correct next action determined based on roadmap position
212
+ - [ ] Milestone completion: summary generated, git tag created, ROADMAP.md updated (when applicable)
199
213
  - [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:spec (or project complete message)
200
214
  </success_criteria>
@@ -0,0 +1,81 @@
1
+ ---
2
+ name: sdlc:discuss
3
+ description: Brainstorm and shape an idea into a complete PRD through AI-driven questioning
4
+ argument-hint: "[idea or topic]"
5
+ allowed-tools: [Read, Write, Glob, Grep, AskUserQuestion]
6
+ ---
7
+
8
+ <objective>
9
+ Drive a structured brainstorming session to help the user explore, clarify, and validate an idea. Produce a complete PRD document through targeted AI-driven questions across problem, scope, approach, and requirements.
10
+
11
+ **When to use:** Before /sdlc:spec when the idea is raw, vague, or needs exploration. This is the DISCOVERY phase — upstream of the SDLC loop.
12
+
13
+ **What it does:**
14
+ 1. Accept a raw idea or topic from the user.
15
+ 2. Ask structured questions in rounds: problem, scope, approach, requirements.
16
+ 3. Validate ideas and offer recommendations with concrete trade-offs.
17
+ 4. Compile all decisions into a PRD document.
18
+ 5. Boot up the SDLC loop by routing to /sdlc:spec with the PRD as input.
19
+
20
+ **What happens next:** After user approves the PRD, framework directs to /sdlc:spec to formalize it into a specification.
21
+
22
+ **Critical rule:** AI drives the conversation. Ask questions — do not assume answers. Every question includes a recommendation. Maximum 4 rounds of 2-4 questions each.
23
+ </objective>
24
+
25
+ <execution_context>
26
+ @~/.claude/sdlc-framework/workflows/discuss-phase.md
27
+ @~/.claude/sdlc-framework/templates/PRD.md
28
+ @~/.claude/sdlc-framework/references/clarification-strategy.md
29
+ @.sdlc/STATE.md
30
+ @.sdlc/PROJECT.md
31
+ </execution_context>
32
+
33
+ <context>
34
+ $ARGUMENTS — optional idea description or topic to explore.
35
+
36
+ Read these files if they exist:
37
+ - .sdlc/STATE.md — current loop position (discuss can run at any point).
38
+ - .sdlc/PROJECT.md — project context, tech stack, existing architecture.
39
+ - .sdlc/ROADMAP.md — milestones and phases for context.
40
+
41
+ Scan the codebase to understand existing patterns and constraints.
42
+ </context>
43
+
44
+ <process>
45
+ Follow workflow: @~/.claude/sdlc-framework/workflows/discuss-phase.md
46
+
47
+ Step-by-step:
48
+
49
+ 1. **Seed the idea**
50
+ - If $ARGUMENTS provided, acknowledge the idea and restate it.
51
+ - If no arguments, ask: "What idea or problem do you want to explore?"
52
+
53
+ 2. **Run question rounds** (max 4 rounds, 2-4 questions per round)
54
+ - Round 1: Problem space — who, what, why, current workarounds.
55
+ - Round 2: Scope and constraints — in/out, MVP, timeline, tech.
56
+ - Round 3: Approach validation — present options with trade-offs, ask user to choose.
57
+ - Round 4: Requirements detail — user flows, edge cases, integrations.
58
+ - Each question includes a recommendation. Stop early if clarity is sufficient.
59
+
60
+ 3. **Compile PRD**
61
+ - Assemble all answers into .sdlc/discuss/{topic}-PRD.md using @templates/PRD.md.
62
+ - Include decisions log with every question asked and answer received.
63
+
64
+ 4. **Present and approve**
65
+ - Display PRD summary. User options: APPROVE, REVISE, REJECT.
66
+ - If APPROVE: route to /sdlc:spec.
67
+
68
+ 5. **Update STATE.md and output**
69
+ - Record discussion reference. Set next_required_action: /sdlc:spec.
70
+ - End with NEXT ACTION REQUIRED: /sdlc:spec
71
+ </process>
72
+
73
+ <success_criteria>
74
+ - [ ] Idea explored through at least 2 rounds of structured questions
75
+ - [ ] Every question included a recommendation with trade-offs
76
+ - [ ] PRD created at .sdlc/discuss/{topic}-PRD.md with all required sections
77
+ - [ ] PRD includes decisions log mapping questions to answers
78
+ - [ ] User explicitly approved the PRD (APPROVE response received)
79
+ - [ ] STATE.md updated with discussion reference
80
+ - [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:spec
81
+ </success_criteria>
@@ -11,14 +11,15 @@ The primary entry point for getting work done. Describe what you need in plain l
11
11
  **When to use:** Anytime. This is the default command for starting work. Use it instead of figuring out which specific command to run.
12
12
 
13
13
  **What it does:**
14
- 1. Classify the work type (feature, bug, refactor, test, docs, research).
14
+ 1. Classify the work type (feature, bug, refactor, test, docs, research, critical).
15
15
  2. Estimate complexity (files, lines, dependencies).
16
16
  3. Route based on classification and complexity:
17
17
  - Simple work (≤3 files, ≤100 lines): execute full loop inline (spec→impl→verify→review→close).
18
18
  - Complex feature: route to /sdlc:spec with pre-filled context.
19
19
  - Bug: route to /sdlc:debug with reproduction context.
20
20
  - Research question: route to /sdlc:research with topic.
21
- - Critical production issue: route to /sdlc:hotfix with context.
21
+ - Brainstorming: route to /sdlc:discuss with topic.
22
+ - Critical production issue: execute hotfix inline (minimal spec→fix→full verify→full review).
22
23
  4. For inline execution: run compressed loop with full engineering law enforcement.
23
24
 
24
25
  **What happens next:** Depends on routing — either the task is complete, or you are directed to the appropriate specialized command.
@@ -58,9 +59,10 @@ Step-by-step:
58
59
 
59
60
  | Type | Indicators | Route |
60
61
  |------|-----------|-------|
62
+ | CRITICAL | "urgent", "production", "down", "outage", "critical", "P0", "hotfix" | inline hotfix |
61
63
  | BUG | "fix", "bug", "error", "broken", "crash", "fails", "wrong", "regression" | /sdlc:debug |
62
- | CRITICAL | "urgent", "production", "down", "outage", "critical", "P0", "hotfix" | /sdlc:hotfix |
63
64
  | RESEARCH | "explore", "investigate", "research", "compare", "evaluate", "options" | /sdlc:research |
65
+ | DISCUSS | "brainstorm", "discuss", "idea", "what if", "think about", "concept", "should we", "could we" | /sdlc:discuss |
64
66
  | FEATURE | "add", "create", "build", "implement", "new", "introduce" | complexity-dependent |
65
67
  | REFACTOR | "refactor", "clean", "rename", "extract", "move", "simplify" | complexity-dependent |
66
68
  | TEST | "test", "coverage", "spec", "assertion" | complexity-dependent |
@@ -70,8 +72,9 @@ Step-by-step:
70
72
 
71
73
  3. **Immediate routing** (for specialized types)
72
74
  - BUG → Display: "Bug detected. NEXT ACTION REQUIRED: /sdlc:debug {original description}" — STOP.
73
- - CRITICAL → Display: "Critical issue. NEXT ACTION REQUIRED: /sdlc:hotfix {original description}" — STOP.
74
75
  - RESEARCH → Display: "Research task. NEXT ACTION REQUIRED: /sdlc:research {original description}" — STOP.
76
+ - DISCUSS → Display: "Brainstorming topic. NEXT ACTION REQUIRED: /sdlc:discuss {original description}" — STOP.
77
+ - CRITICAL → proceed to inline hotfix (step 10).
75
78
 
76
79
  4. **Complexity estimation** (for feature/refactor/test/docs)
77
80
  - Scan codebase for files related to the description.
@@ -132,15 +135,57 @@ Step-by-step:
132
135
  - Update STATE.md history.
133
136
  - Restore prior state (fast does not advance the phase).
134
137
  - Display completion summary.
138
+
139
+ 10. **Inline hotfix** (CRITICAL type only)
140
+ Emergency fix with minimal ceremony, maximum verification.
141
+
142
+ a. **Triage:** Ask 3 questions:
143
+ - "What is broken? (specific symptom)"
144
+ - "What is the impact? (who is affected)"
145
+ - "When did it start? (recent deploy, config change)"
146
+ Classify severity: P0 (system down), P1 (data risk), P2 (major feature broken).
147
+ If not P0/P1: suggest /sdlc:debug instead. Let user override.
148
+
149
+ b. **3-line inline spec:**
150
+ - Line 1: WHAT is broken (from $ARGUMENTS + triage).
151
+ - Line 2: WHERE is the likely location (quick Grep search).
152
+ - Line 3: WHAT the fix should achieve (expected behavior).
153
+ Display inline spec. Do NOT wait for approval — speed matters in emergencies.
154
+
155
+ c. **Fix directly:**
156
+ - Single-threaded. No sub-agents.
157
+ - Apply MINIMAL fix — change as few lines as possible.
158
+ - Engineering laws still apply. No empty catch blocks. No hardcoded secrets.
159
+ - Add a regression test for the specific failure.
160
+ - Mark technical debt with TODO(hotfix-{date}).
161
+
162
+ d. **Full verification:**
163
+ - Run FULL test suite (not just affected tests).
164
+ - For UI: Playwright verification.
165
+ - If any fail: fix before proceeding.
166
+
167
+ e. **Full review:**
168
+ - Check all modified files against engineering laws.
169
+ - Blockers (security, error handling) still block even in emergencies.
170
+ - Warnings are acceptable for hotfixes.
171
+
172
+ f. **Record:**
173
+ - Determine hotfix number: {phase}.{count+1} (e.g., 02.1).
174
+ - Create .sdlc/phases/{phase}/HOTFIX-{number}-SUMMARY.md.
175
+ - Update STATE.md: restore prior state, add history entry.
176
+ - Update ROADMAP.md: note hotfix under current phase.
177
+ - Display: "Hotfix {number} applied and verified. State restored."
135
178
  </process>
136
179
 
137
180
  <success_criteria>
138
181
  - [ ] Work classified correctly from natural language description
139
182
  - [ ] Bugs routed to /sdlc:debug — never processed inline
140
- - [ ] Critical issues routed to /sdlc:hotfix
183
+ - [ ] Critical issues handled as inline hotfix with full verify + review
141
184
  - [ ] Research tasks routed to /sdlc:research
185
+ - [ ] Brainstorming routed to /sdlc:discuss
142
186
  - [ ] Complex work (>3 files or >100 lines) routed to /sdlc:spec with pre-filled context
143
187
  - [ ] Simple work executed inline through full compressed loop
188
+ - [ ] Hotfix: minimal fix, full test suite, engineering laws enforced
144
189
  - [ ] All code changes comply with engineering laws
145
190
  - [ ] Tests run and pass
146
191
  - [ ] STATE.md updated appropriately
@@ -54,30 +54,29 @@ COMMANDS — Quick Entry
54
54
 
55
55
  /sdlc:fast THE DEFAULT. Describe work, framework routes + executes.
56
56
  Simple work runs inline. Complex work routes to /sdlc:spec.
57
- Bugs route to /sdlc:debug. Critical issues to /sdlc:hotfix.
57
+ Bugs route to /sdlc:debug. Critical issues run as inline hotfix.
58
58
 
59
59
  COMMANDS — Fix & Debug
60
60
  ──────────────────────
61
61
 
62
62
  /sdlc:fix Fix review blockers systematically, then auto re-review.
63
63
  /sdlc:debug Structured debugging: reproduce → isolate → root-cause → fix → verify.
64
- /sdlc:hotfix Emergency fix. Minimal ceremony, maximum verification.
65
64
 
66
65
 
67
- COMMANDS — Session Management
68
- ─────────────────────────────
66
+ COMMANDS — Session & Status
67
+ ───────────────────────────
69
68
 
70
- /sdlc:pause Save context for a break. Creates HANDOFF.md.
71
- /sdlc:resume Restore context. Determines ONE next action.
72
- /sdlc:status Show current loop position, progress, and forced next action.
69
+ /sdlc:status Show loop position, progress, forced next action.
70
+ /sdlc:status pause Save context for a break. Creates HANDOFF.md.
71
+ /sdlc:status resume Restore context. Determines ONE next action.
73
72
 
74
73
 
75
74
  COMMANDS — Planning & Research
76
75
  ──────────────────────────────
77
76
 
78
- /sdlc:milestone Create or complete project milestones.
77
+ /sdlc:discuss Brainstorm an idea. AI asks questions, produces a PRD.
79
78
  /sdlc:research Deploy subagents for codebase or web research.
80
- /sdlc:init Initialize the framework in a project. Run once.
79
+ /sdlc:init Initialize framework or add milestones. Run once.
81
80
  /sdlc:help Show this reference.
82
81
 
83
82
 
@@ -134,7 +133,7 @@ If .sdlc/LAWS.md exists, read it and append any project-specific law customizati
134
133
 
135
134
  <success_criteria>
136
135
  - [ ] Core loop diagram displayed
137
- - [ ] All 15 commands listed with one-line descriptions
136
+ - [ ] All 13 commands listed with one-line descriptions
138
137
  - [ ] Commands grouped by purpose (core loop, shortcuts, session, planning)
139
138
  - [ ] Quick start guide shown (3 steps)
140
139
  - [ ] Small tasks shortcut mentioned (/sdlc:fast)
@@ -6,15 +6,16 @@ allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, AskUserQuestion]
6
6
  ---
7
7
 
8
8
  <objective>
9
- Initialize the SDLC framework for a project. Create the .sdlc/ directory with four core files: PROJECT.md, STATE.md, ROADMAP.md, and LAWS.md.
9
+ Initialize the SDLC framework for a project. Create the .sdlc/ directory with core files: PROJECT.md, STATE.md, ROADMAP.md, and LAWS.md. Define the first milestone with phases.
10
10
 
11
- **When to use:** First time setting up SDLC in a project. Run this once per repository.
11
+ **When to use:** First time setting up SDLC in a project. Run this once per repository. Also use to create additional milestones: `/sdlc:init milestone <name>`.
12
12
 
13
13
  **What it does:**
14
14
  1. Scan the current directory to understand project structure (language, framework, existing config).
15
15
  2. Ask clarification questions about project goals, team conventions, and quality thresholds.
16
16
  3. Create .sdlc/ directory with populated templates.
17
- 4. Set the loop position to SPEC (the first phase of the development cycle).
17
+ 4. Define the first milestone with phases (or add a new milestone if already initialized).
18
+ 5. Set the loop position to SPEC (the first phase of the development cycle).
18
19
 
19
20
  **What happens next:** Framework directs you to /sdlc:spec to define your first unit of work.
20
21
  </objective>
@@ -28,10 +29,12 @@ Initialize the SDLC framework for a project. Create the .sdlc/ directory with fo
28
29
  </execution_context>
29
30
 
30
31
  <context>
31
- $ARGUMENTS
32
+ $ARGUMENTS — optional project name, or "milestone <name>" to create an additional milestone.
32
33
 
33
34
  Current directory contents (run ls to inspect).
34
- Check if .sdlc/ already exists — if it does, warn the user and ask whether to reinitialize or abort.
35
+ Check if .sdlc/ already exists:
36
+ - If "milestone <name>" in $ARGUMENTS: add a new milestone (skip project setup).
37
+ - Otherwise: warn the user and ask whether to reinitialize or abort.
35
38
  Read any existing package.json, Cargo.toml, pyproject.toml, go.mod, or similar to detect project type.
36
39
  </context>
37
40
 
@@ -80,6 +83,19 @@ Step-by-step:
80
83
  - Print summary of created files.
81
84
  - Print the first milestone and phase.
82
85
  - End with NEXT ACTION REQUIRED.
86
+
87
+ ### If "milestone <name>" in $ARGUMENTS: ADD MILESTONE
88
+
89
+ 1. Verify .sdlc/ exists. If not: "Run /sdlc:init first (without 'milestone')."
90
+ 2. Read .sdlc/ROADMAP.md. Calculate next milestone number.
91
+ 3. Ask clarification questions:
92
+ - "What is the goal of this milestone? What will be true when it is done?"
93
+ - "What phases make up this milestone? (2-5 phases in order)"
94
+ - "Any dependencies on prior milestones?"
95
+ 4. Create phase directories: mkdir -p .sdlc/phases/{phase-number}-{phase-name}
96
+ 5. Update ROADMAP.md with new milestone section, phases, and status.
97
+ 6. Update STATE.md: set current_milestone if none active. Add history entry.
98
+ 7. Output: "Milestone created. NEXT ACTION REQUIRED: /sdlc:spec"
83
99
  </process>
84
100
 
85
101
  <success_criteria>
@@ -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>