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.
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.0",
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)
@@ -20,7 +20,7 @@ Execute an approved specification by spawning parallel sub-agents for independen
20
20
 
21
21
  **What happens next:** Framework directs you to /sdlc:verify to validate the implementation against acceptance criteria.
22
22
 
23
- **Critical rule:** Sub-agents do the work. This command orchestrates. Each sub-agent operates within strict boundaries defined by the spec.
23
+ **CRITICAL MANDATORY RULE:** You MUST use the Agent tool to spawn sub-agents for EVERY task. DO NOT implement tasks yourself in the main session. DO NOT skip agent spawning. DO NOT write code directly. This command ORCHESTRATES — the Agent tool EXECUTES. Each sub-agent gets its task, files, laws, and boundaries. All agents in the same wave are spawned in ONE message with run_in_background: true. Use TaskCreate to track every task. This is NON-NEGOTIABLE.
24
24
  </objective>
25
25
 
26
26
  <execution_context>
@@ -80,12 +80,13 @@ Step-by-step:
80
80
  - Report what you created, modified, and tested.
81
81
  ```
82
82
 
83
- 4. **Execute wave 1 (independent tasks)**
83
+ 4. **Execute wave 1 (independent tasks) — MUST USE Agent TOOL**
84
84
  - Identify all tasks with no dependencies (wave 1).
85
- - Spawn one Agent per task with `run_in_background: true`.
86
- - Spawn ALL wave 1 agents in a single message.
87
- - Update each task status to "in_progress" via TaskUpdate.
88
- - Wait for all wave 1 agents to complete.
85
+ - Call TaskCreate for each task (ALL in one message).
86
+ - Call the Agent tool for EACH task with run_in_background: true.
87
+ - ALL Agent calls for this wave MUST be in a SINGLE message (parallel spawn).
88
+ - DO NOT write any implementation code yourself — agents do ALL the work.
89
+ - Wait for all wave 1 agents to complete (you will be notified).
89
90
 
90
91
  5. **Process wave results**
91
92
  - When a wave completes, review each agent's output:
@@ -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>
@@ -123,16 +123,19 @@ Step-by-step:
123
123
  ## Engineering Constraints (from LAWS.md)
124
124
  ```
125
125
 
126
- 9. **Spec integrity review**
127
- - CHECK completeness: all tasks have required fields, all ACs have Given/When/Then
128
- - CHECK consistency: every task links to an AC, no boundary violations, no cycles in DAG
129
- - CHECK feasibility: task count 2-5, estimated change under ~300 lines
130
- - Fix any issues found before presenting for approval
126
+ 9. **Spec integrity review — MANDATORY, DO NOT SKIP**
127
+ You MUST print a full integrity review table with ✓/✗ for EACH check:
128
+ - CHECK 1 — COMPLETENESS: every task has name, action, files, verification, done criteria, complexity. Every AC has numbered GIVEN/WHEN/THEN with specific values.
129
+ - CHECK 2 — CONSISTENCY: no orphan tasks (every task AC), no orphan ACs (every AC → task), no boundary violations, no DAG cycles, no shared-file parallel writes.
130
+ - CHECK 3 CONTRADICTIONS: no conflicting ACs for same input, no conflicting task actions on same function, no task contradicting boundary, no AC contradicting PROJECT.md constraints.
131
+ - CHECK 4 — FEASIBILITY: task count 2-5, estimated change under ~300 lines, all referenced files exist.
132
+ - CHECK 5 — DEPENDENCY GRAPH: every task in exactly one wave, ordering matches dependencies, independent tasks parallelized, dependent tasks sequenced.
133
+ - Print the full review table with all results. Fix any failures before proceeding.
131
134
 
132
135
  10. **User approval gate** (BLOCKING — cannot proceed without approval)
133
- - Present full spec summary to user
136
+ - Present full spec summary AND integrity review results to user
134
137
  - User options: APPROVE (proceed), REVISE (change and re-review), REJECT (discard)
135
- - If REVISE: apply changes, re-run integrity review, re-present
138
+ - If REVISE: apply changes, re-run ALL integrity checks, re-present
136
139
  - If REJECT: delete spec, stop
137
140
  - If APPROVE: proceed to update state
138
141