sdlc-framework 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,21 @@
1
- <purpose>Execute the specification through sub-agent driven parallel implementation. Each task from the spec becomes an independent agent with full context, engineering laws, and boundaries. Tasks run in dependency-ordered waves.</purpose>
1
+ <purpose>Execute the specification through sub-agent driven parallel implementation. Each task from the spec becomes an independent agent with full context, engineering laws, and boundaries. Tasks run in dependency-ordered waves.
2
+
3
+ ╔══════════════════════════════════════════════════════════════════════╗
4
+ ║ MANDATORY: You MUST use the Agent tool to spawn sub-agents. ║
5
+ ║ You MUST NOT implement tasks yourself in the main session. ║
6
+ ║ Every task in the spec MUST be executed by a spawned Agent. ║
7
+ ║ Use run_in_background: true for parallel wave execution. ║
8
+ ║ Use TaskCreate/TaskUpdate to track each task's progress. ║
9
+ ║ This is NON-NEGOTIABLE. Implementing inline violates the SDLC. ║
10
+ ╚══════════════════════════════════════════════════════════════════════╝
11
+ </purpose>
12
+ <display_rule>
13
+ MANDATORY: Display ALL progress in the chat window. The developer monitors via chat, not files.
14
+ - Before spawning agents: display the full todo list with all tasks and their wave assignments.
15
+ - After each wave: display updated progress with ✅/🔄/⬚ status per task.
16
+ - After all waves: display final summary with files modified per task.
17
+ Keep displays compact (~15-30 lines). The developer sees progress without opening any files.
18
+ </display_rule>
2
19
  <when_to_use>Run after /sdlc:spec completes. STATE.md must show loop_position = SPEC ✓ and next_required_action = /sdlc:impl.</when_to_use>
3
20
  <required_reading>.sdlc/STATE.md, the current SPEC.md, .sdlc/LAWS.md, .sdlc/PROJECT.md</required_reading>
4
21
  <loop_context>
@@ -93,10 +110,35 @@
93
110
  </step>
94
111
 
95
112
  <step name="execute_wave" priority="fifth">
113
+ ╔══════════════════════════════════════════════════════════════════════╗
114
+ ║ YOU MUST CALL THE Agent TOOL HERE. THIS IS NOT OPTIONAL. ║
115
+ ║ DO NOT write code yourself. DO NOT skip agent spawning. ║
116
+ ║ Every task = one Agent tool call with run_in_background: true. ║
117
+ ║ All agents in the same wave MUST be spawned in ONE message. ║
118
+ ╚══════════════════════════════════════════════════════════════════════╝
119
+
96
120
  FOR EACH WAVE (starting with Wave 1):
97
121
 
98
- A. SPAWN AGENTS FOR ALL TASKS IN THIS WAVE:
99
- For each task in the wave, spawn an agent with run_in_background: true.
122
+ A. CREATE TRACKABLE TODO LIST:
123
+ ╔══════════════════════════════════════════════════════════════════╗
124
+ ║ YOU MUST call TaskCreate for EVERY task. This creates a ║
125
+ ║ visible, trackable todo list in the chat. The developer ║
126
+ ║ monitors progress through this list. DO NOT SKIP. ║
127
+ ╚══════════════════════════════════════════════════════════════════╝
128
+ For EACH task in the spec (ALL tasks, not just this wave):
129
+ - Call TaskCreate with: description = "Task {N}: {task-name} — {short action}"
130
+ This creates the full todo list upfront. The developer sees ALL tasks at once.
131
+
132
+ Then for each task in THIS WAVE, call TaskUpdate to set status = "in_progress".
133
+
134
+ B. SPAWN AGENTS FOR ALL TASKS IN THIS WAVE:
135
+ For each task in the wave, call the Agent tool with:
136
+ - description: "Implement: {task-name}" (short)
137
+ - run_in_background: true
138
+ - prompt: the full agent instruction below
139
+
140
+ CRITICAL: Spawn ALL agents for a wave in ONE single message.
141
+ Example for a 3-task wave — your message contains 3 Agent tool calls.
100
142
 
101
143
  Each agent instruction MUST include ALL of the following (no shortcuts):
102
144
 
@@ -138,14 +180,29 @@
138
180
  B. WAIT FOR ALL AGENTS IN THIS WAVE TO COMPLETE.
139
181
  Do NOT proceed to the next wave until every agent in the current wave has returned.
140
182
 
141
- C. REVIEW WAVE RESULTS:
183
+ C. REVIEW WAVE RESULTS AND UPDATE TODO LIST:
142
184
  For each agent result:
143
185
  - Did it complete successfully?
144
186
  - Did it list modified files?
145
187
  - Did it report any issues or blockers?
146
188
 
189
+ For EACH completed task, call TaskUpdate to set status = "completed".
190
+ For EACH failed task, call TaskUpdate to set status = "failed".
191
+
192
+ DISPLAY the todo list progress in chat after EVERY wave:
193
+ ```
194
+ ── Implementation Progress ──────────────
195
+ ✅ Task 1: {name} — DONE ({N} files)
196
+ ✅ Task 2: {name} — DONE ({N} files)
197
+ 🔄 Task 3: {name} — IN PROGRESS (wave 2)
198
+ ⬚ Task 4: {name} — PENDING (wave 3)
199
+ ──────────────────────────────────────────
200
+ Wave {N}/{total} complete. {N}/{total} tasks done.
201
+ ```
202
+
147
203
  IF ANY AGENT FAILED:
148
- - Display: "Agent for task '{task-name}' failed: {error}"
204
+ - Call TaskUpdate to set failed task status = "failed"
205
+ - Display: "❌ Agent for task '{task-name}' failed: {error}"
149
206
  - Display the failure details
150
207
  - STOP. Do NOT proceed to next wave.
151
208
  - Ask user: "How do you want to proceed? Options:
@@ -152,7 +152,7 @@
152
152
  | ... | ... | ... | ... |
153
153
 
154
154
  ## Future Milestones
155
- {Leave blank — added via /sdlc:milestone}
155
+ {Leave blank — added via /sdlc:init milestone <name>}
156
156
  ```
157
157
 
158
158
  WHY: The roadmap gives structure to the work. Without it, specs are disconnected tasks with no arc. The phase structure ensures work builds on itself in a logical order.
@@ -6,6 +6,12 @@
6
6
  prior_phase: VERIFY ✓
7
7
  next_phase: CLOSE
8
8
  </loop_context>
9
+ <display_rule>
10
+ MANDATORY: Display the review findings in the chat window. The developer reads findings
11
+ in chat, not by opening REVIEW.md. Show: per-file findings table (file, line, law, severity,
12
+ description), blocker count, warning count, and the verdict (PASS/FAIL).
13
+ Keep it compact (~20-40 lines). Full details are in REVIEW.md for reference.
14
+ </display_rule>
9
15
  <process>
10
16
 
11
17
  <step name="validate_state" priority="first">
@@ -6,6 +6,18 @@
6
6
  prior_phase: CLOSE (or INIT for first spec)
7
7
  next_phase: IMPL
8
8
  </loop_context>
9
+ <display_rule>
10
+ MANDATORY: After writing ANY artifact (SPEC.md, REVIEW.md, SUMMARY.md), you MUST
11
+ display a COMPACT summary of the artifact in the chat window. The developer does NOT
12
+ have time to open files and read them. They monitor progress in the chat.
13
+
14
+ COMPACT means: key sections with content, NOT just section headers.
15
+ Show: objective (2 lines), tasks (numbered list with files), ACs (numbered Given/When/Then),
16
+ dependency graph (wave diagram), boundaries (list).
17
+
18
+ DO NOT dump the entire file verbatim — that bloats context. Show the substance in ~30-50 lines.
19
+ The full artifact is in the file for reference; the chat shows the actionable summary.
20
+ </display_rule>
9
21
  <process>
10
22
 
11
23
  <step name="validate_state" priority="first">
@@ -256,41 +268,91 @@
256
268
  </step>
257
269
 
258
270
  <step name="spec_integrity_review" priority="eighth">
259
- BEFORE updating state, perform a self-review of the spec for completeness and correctness.
271
+ ╔══════════════════════════════════════════════════════════════════════╗
272
+ ║ THIS STEP IS MANDATORY. DO NOT SKIP. DO NOT ABBREVIATE. ║
273
+ ║ You MUST print the full integrity review table before proceeding. ║
274
+ ╚══════════════════════════════════════════════════════════════════════╝
275
+
276
+ Re-read the SPEC.md file you just wrote. Perform ALL FIVE checks below.
277
+ For EACH check item, print ✓ (pass) or ✗ (fail) with explanation.
260
278
 
261
279
  CHECK 1 — COMPLETENESS:
262
- - Every task has: name, action, files, verification, done criteria, complexity or
263
- - Every AC has: GIVEN, WHEN, THEN with specific values (not vague) ✓ or ✗
264
- - Dependency graph accounts for all tasks or
265
- - Boundaries section is non-empty or
266
- - Required patterns section references actual existing files or
280
+ For each task, verify it has ALL of these fields (print each):
281
+ - [ ] name (descriptive, kebab-case)
282
+ - [ ] action (imperative, specific not vague like "implement the feature")
283
+ - [ ] files to modify (specific file paths, not "relevant files")
284
+ - [ ] verification (how to confirm a command, a test, an observable outcome)
285
+ - [ ] done criteria (links to AC-N)
286
+ - [ ] complexity (LOW/MEDIUM/HIGH)
287
+ For each AC, verify it has ALL of these (print each):
288
+ - [ ] AC number (AC-1, AC-2, etc.)
289
+ - [ ] GIVEN with specific precondition (not "given the system is running")
290
+ - [ ] WHEN with specific action (not "when the user does something")
291
+ - [ ] THEN with specific observable outcome (not "then it works correctly")
267
292
 
268
293
  CHECK 2 — CONSISTENCY:
269
- - Every task links to at least one AC (no orphan tasks)
270
- - Every AC is covered by at least one task (no orphan ACs)
271
- - File lists in tasks do not overlap with boundaries (no protected file modification)
272
- - Task dependency graph has no cycles
273
- - Parallel groups contain only truly independent tasks (no shared file writes)
274
-
275
- CHECK 3 — FEASIBILITY:
276
- - No single task exceeds HIGH complexity (60+ lines) — if so, suggest splitting
277
- - Total task count is 2-5 per spec if more, suggest splitting into multiple plans
278
- - Estimated total change stays under ~300 lines if more, warn user
279
-
280
- IF ANY CHECK FAILS: Fix the spec before presenting for approval. Do not present a broken spec.
281
-
282
- Present the integrity review results:
294
+ - [ ] Every task references at least one AC in its done criteria (no orphan tasks)
295
+ - [ ] Every AC is satisfied by at least one task (no orphan ACs)
296
+ - [ ] No task modifies a file listed in Boundaries/DO NOT CHANGE
297
+ - [ ] Dependency graph has no cycles (A→B→A)
298
+ - [ ] Tasks in the same parallel group do NOT write to the same file
299
+
300
+ CHECK 3 — CONTRADICTION DETECTION:
301
+ Compare every AC pair and every task pair for contradictions:
302
+ - [ ] No two ACs define conflicting behavior for the same input/state
303
+ Example contradiction: AC-1 says "return 404" but AC-3 says "return empty array" for missing resource
304
+ - [ ] No two tasks modify the same function/method with conflicting changes
305
+ Example contradiction: Task-1 adds validation to createUser, Task-2 removes validation from createUser
306
+ - [ ] No task action contradicts a boundary
307
+ Example contradiction: Boundary says "do not change auth logic" but Task-3 says "update auth middleware"
308
+ - [ ] No AC contradicts project constraints from PROJECT.md
309
+ Example contradiction: PROJECT.md says "REST API only" but AC-2 tests a GraphQL endpoint
310
+ - [ ] The acceptance criteria as a whole describe a coherent feature (not fragments that don't connect)
311
+
312
+ CHECK 4 — FEASIBILITY:
313
+ - [ ] No single task exceeds HIGH complexity (60+ lines) — if so, split it
314
+ - [ ] Total task count is 2-5 — if more, split into multiple plans
315
+ - [ ] Estimated total change under ~300 lines — if more, warn user
316
+ - [ ] All referenced files in tasks actually exist (or are marked as "create")
317
+
318
+ CHECK 5 — DEPENDENCY GRAPH VALIDITY:
319
+ - [ ] Every task appears in exactly one parallel group
320
+ - [ ] Wave ordering matches dependencies (no task in Wave 1 that depends on another task)
321
+ - [ ] Independent tasks (no shared files, no shared types) are correctly parallelized
322
+ - [ ] Dependent tasks (shared files, shared types/interfaces) are correctly sequenced
323
+
324
+ IF ANY CHECK ITEM FAILS:
325
+ 1. List all failures with specific descriptions
326
+ 2. Propose a fix for each failure
327
+ 3. Apply all fixes to the SPEC.md
328
+ 4. Re-run ALL five checks on the updated spec
329
+ 5. Repeat until all checks pass
330
+
331
+ PRINT the full integrity review report:
283
332
  ```
284
- Spec Integrity Review:
285
- Completeness: All {N} tasks fully defined, {N} ACs with Given/When/Then
286
- ✓ Consistency: All tasks linked to ACs, no boundary violations, no cycles
287
- ✓ Feasibility: {N} tasks across {N} waves, estimated ~{N} lines of change
288
-
289
- Issues found: {count}
290
- {list any issues with suggested fixes}
333
+ ══════════════════════════════════════════════
334
+ SPEC INTEGRITY REVIEW
335
+ ══════════════════════════════════════════════
336
+ Completeness: { or } {details}
337
+ Consistency: {✓ or ✗} — {details}
338
+ Contradictions: {✓ or ✗} — {details or "none found"}
339
+ Feasibility: { or ✗} {details}
340
+ Dependency Graph: {✓ or ✗} — {details}
341
+
342
+ Tasks: {N} fully defined
343
+ ACs: {N} with specific Given/When/Then
344
+ Waves: {N} parallel execution groups
345
+ Estimated scope: ~{N} lines across {N} files
346
+
347
+ Contradictions found: {N}
348
+ {if any: list each contradiction and how it was resolved}
349
+
350
+ Issues found and fixed: {N}
351
+ {if any: list each issue and the fix applied}
352
+ ══════════════════════════════════════════════
291
353
  ```
292
354
 
293
- WHY: A broken spec cascades failures through every downstream step. Catching spec issues here is 10x cheaper than catching them in review. This is the cheapest point to fix problems.
355
+ WHY: A spec with contradictions produces agents that build conflicting code. A spec with orphan ACs means untested features. A spec with invalid dependencies means agents wait forever or overwrite each other. This review catches all of these. It costs 30 seconds now and saves hours of debugging later.
294
356
  </step>
295
357
 
296
358
  <step name="user_approval_gate" priority="ninth">
@@ -0,0 +1,206 @@
1
+ <purpose>Show loop position, save session context (pause), or restore session context (resume). Consolidates status, pause, and resume into a single workflow. The state machine always knows the next action — this workflow surfaces it.</purpose>
2
+ <when_to_use>Run anytime. No-arg for status. "pause" before a break. "resume" when returning. Can run at any loop position.</when_to_use>
3
+ <required_reading>.sdlc/STATE.md, .sdlc/ROADMAP.md</required_reading>
4
+ <loop_context>
5
+ expected_phase: any (status/pause/resume work at any loop position)
6
+ prior_phase: current position is preserved
7
+ next_phase: determined by STATE.md
8
+ </loop_context>
9
+ <process>
10
+
11
+ <step name="determine_mode" priority="first">
12
+ Parse $ARGUMENTS to determine the mode.
13
+
14
+ IF $ARGUMENTS is empty or not "pause"/"resume": MODE = STATUS
15
+ IF $ARGUMENTS starts with "pause": MODE = PAUSE. Extract optional reason.
16
+ IF $ARGUMENTS starts with "resume": MODE = RESUME. Extract optional handoff path.
17
+
18
+ Read .sdlc/STATE.md.
19
+
20
+ IF .sdlc/ does not exist:
21
+ Display: "Framework not initialized. Run /sdlc:init first."
22
+ STOP.
23
+
24
+ Extract: loop_position, current_milestone, current_phase, current_plan, next_required_action, blockers, deferred_issues.
25
+
26
+ WHY: One entry point with three modes eliminates the need for three separate commands. The state file is the single source of truth regardless of mode.
27
+ </step>
28
+
29
+ <step name="show_status" priority="second">
30
+ ONLY IF MODE = STATUS.
31
+
32
+ Read .sdlc/ROADMAP.md for milestone progress data.
33
+
34
+ Display the core loop with current position highlighted:
35
+ ```
36
+ SDLC Loop Position:
37
+
38
+ SPEC ──→ IMPLEMENT ──→ VERIFY ──→ REVIEW ──→ CLOSE
39
+ │ │
40
+ └──────────────── next cycle ←─────────────────┘
41
+
42
+ Current: [IMPLEMENT] ◄── YOU ARE HERE
43
+ ```
44
+
45
+ Use `[PHASE]` brackets around the current position.
46
+ If in DEBUG, show as a side branch off IMPLEMENT.
47
+
48
+ Display project context:
49
+ ```
50
+ Milestone: {name} ({completed_phases}/{total_phases} phases)
51
+ Phase: {name}
52
+ Plan: {name or "none — run /sdlc:spec"}
53
+ ```
54
+
55
+ Calculate and display progress bar from ROADMAP.md:
56
+ ```
57
+ Progress: [████████░░░░░░░░░░░░] 40% (4/10 plans completed)
58
+ ```
59
+
60
+ Show blockers and deferred issues (or "No blockers. No deferred issues.").
61
+
62
+ Force ONE next action from loop_position with explanation:
63
+ ```
64
+ NEXT ACTION REQUIRED: /sdlc:impl
65
+
66
+ What it does: Implements the current plan by writing code with subagent workers.
67
+ Why it is next: The spec phase is complete. The plan has been approved.
68
+ ```
69
+
70
+ WHY: Status is the "where am I" command. Junior developers need the visual. Senior developers need the forced next action. Both get what they need.
71
+ </step>
72
+
73
+ <step name="pause_gather_context" priority="third">
74
+ ONLY IF MODE = PAUSE.
75
+
76
+ Gather session context:
77
+
78
+ A. GIT STATE:
79
+ Run: git status --short (if git repo)
80
+ Run: git log --oneline -5
81
+
82
+ B. WORK COMPLETED THIS SESSION:
83
+ Read STATE.md history entries. Summarize recent work.
84
+
85
+ C. IN-PROGRESS WORK:
86
+ Read any active spec, review, or summary files referenced in STATE.md.
87
+ Determine: which tasks done, which pending, which ACs verified.
88
+
89
+ D. DECISIONS AND BLOCKERS:
90
+ Scan recent .sdlc/ files for recorded decisions.
91
+ Note any blockers from STATE.md.
92
+
93
+ E. USER CONTEXT:
94
+ Ask: "Anything to remember for next session not already in files? (or press enter to skip)"
95
+ Record response if provided.
96
+
97
+ WHY: Session context is ephemeral — conversation history may not survive. The handoff captures it before it is lost.
98
+ </step>
99
+
100
+ <step name="pause_save" priority="fourth">
101
+ ONLY IF MODE = PAUSE.
102
+
103
+ Create .sdlc/HANDOFF.md (overwrite if exists):
104
+ ```markdown
105
+ # Session Handoff
106
+
107
+ ## Session Info
108
+ - **Paused at**: {ISO timestamp}
109
+ - **Reason**: {from arguments or "manual pause"}
110
+ - **Loop position**: {from STATE.md}
111
+ - **Next required action**: {from STATE.md}
112
+
113
+ ## What Was Done This Session
114
+ {Bulleted list of work completed}
115
+
116
+ ## Current State
117
+ - **Phase**: {phase name and number}
118
+ - **Plan**: {plan number and title, or "no active plan"}
119
+ - **Loop step**: {position} — {status}
120
+
121
+ ## In-Progress Work
122
+ {What is partially done — specific tasks, files, ACs}
123
+
124
+ ## Decisions Made
125
+ {List of decisions with rationale}
126
+
127
+ ## Blockers / Open Questions
128
+ {List or "None"}
129
+
130
+ ## User Context
131
+ {Verbatim notes from the user, if any}
132
+
133
+ ## Git State
134
+ - **Branch**: {current branch}
135
+ - **Commit**: {latest commit hash and message}
136
+ - **Uncommitted changes**: {yes/no — details}
137
+ ```
138
+
139
+ IF UNCOMMITTED CHANGES EXIST:
140
+ Ask: "You have uncommitted changes. Create a WIP commit? (yes/no)"
141
+ If yes: stage relevant files (not .env), commit "wip({phase}): {brief description}"
142
+ If no: note in handoff that uncommitted changes exist.
143
+
144
+ Update STATE.md: add paused_at timestamp, history entry. Do NOT change loop_position.
145
+
146
+ Display:
147
+ ```
148
+ Session saved.
149
+
150
+ Handoff: .sdlc/HANDOFF.md
151
+ State: {loop_position}
152
+ Next action (on resume): {next_required_action}
153
+
154
+ When you return, run /sdlc:status resume
155
+ ```
156
+
157
+ WHY: HANDOFF.md bridges sessions. The explicit resume instruction ensures the next session starts correctly.
158
+ </step>
159
+
160
+ <step name="resume_restore" priority="fifth">
161
+ ONLY IF MODE = RESUME.
162
+
163
+ A. LOCATE HANDOFF:
164
+ If path in $ARGUMENTS: use that file.
165
+ Else if .sdlc/HANDOFF.md exists: use it.
166
+ Else: display "No handoff found. Resuming from STATE.md." Skip to next-action determination.
167
+
168
+ B. READ AND DISPLAY CONTEXT:
169
+ Read handoff. Calculate time since pause.
170
+ ```
171
+ === SESSION RESUMED ===
172
+
173
+ Last session: {time} ago
174
+ Loop position: {position}
175
+
176
+ Work in progress:
177
+ - {from handoff}
178
+
179
+ Decisions:
180
+ - {from handoff}
181
+
182
+ Blockers:
183
+ - {from handoff, or "None"}
184
+ ```
185
+
186
+ If blockers: ask "These blockers were noted. Are they resolved?"
187
+
188
+ C. VERIFY GIT STATE:
189
+ Run: git status
190
+ Compare branch and uncommitted changes to handoff.
191
+ If branch changed: warn.
192
+ If new commits since pause: display them.
193
+
194
+ D. ARCHIVE HANDOFF:
195
+ Rename .sdlc/HANDOFF.md to .sdlc/HANDOFF-{timestamp}.md.archived
196
+ Remove paused_at from STATE.md.
197
+ Add history entry: "{timestamp} | resume | Resumed from {loop_position}."
198
+
199
+ E. FORCE NEXT ACTION:
200
+ Determine from STATE.md next_required_action.
201
+ Display: "NEXT ACTION REQUIRED: {action}"
202
+
203
+ WHY: Exactly ONE next action. The state machine has already decided. The user just executes it.
204
+ </step>
205
+
206
+ </process>
@@ -113,7 +113,7 @@
113
113
  IF NO NEXT PHASE (this was the last phase in the milestone):
114
114
  Update .sdlc/STATE.md:
115
115
  - loop_position: TRANSITION ✓
116
- - next_required_action: /sdlc:milestone complete
116
+ - next_required_action: /sdlc:close (milestone completion handled inline)
117
117
  - Add history entry: "{timestamp} | transition | Phase {current} complete. Last phase in milestone. Trigger milestone completion."
118
118
 
119
119
  Update .sdlc/ROADMAP.md:
@@ -193,8 +193,8 @@
193
193
  Completed: Phase {number} — {name} (LAST PHASE)
194
194
  Milestone {milestone-number} — {milestone-name}: ALL PHASES COMPLETE
195
195
 
196
- NEXT ACTION REQUIRED: /sdlc:milestone complete
197
- Run /sdlc:milestone complete to finalize the milestone.
196
+ NEXT ACTION REQUIRED: /sdlc:close
197
+ Run /sdlc:close to finalize the milestone.
198
198
  ```
199
199
 
200
200
  WHY: The display makes the transition visible. Moving to a new phase is a significant moment — the user should know where they are in the broader plan.
@@ -6,6 +6,13 @@
6
6
  prior_phase: IMPL ✓
7
7
  next_phase: REVIEW
8
8
  </loop_context>
9
+ <display_rule>
10
+ MANDATORY: Display verification results in the chat window as a table. The developer
11
+ monitors pass/fail per AC in chat, not by opening files. Show:
12
+ | AC | Description | Type | Status | Evidence (1 line) |
13
+ Keep it compact. If Playwright screenshots were taken, mention the screenshot but
14
+ do not embed images — just note "screenshot captured."
15
+ </display_rule>
9
16
  <process>
10
17
 
11
18
  <step name="validate_state" priority="first">
@@ -116,7 +123,18 @@
116
123
  - Include console errors in the evidence
117
124
  - Continue to next AC (do not stop on first failure)
118
125
 
119
- WHY: Playwright MCP replaces manual UAT. Every UI acceptance criterion gets tested programmatically with screenshot evidence, making verification reproducible and auditable.
126
+ ╔══════════════════════════════════════════════════════════════════════╗
127
+ ║ YOU MUST USE THE PLAYWRIGHT MCP TOOLS FOR UI VERIFICATION. ║
128
+ ║ DO NOT ask the user to manually test UI. DO NOT skip UI ACs. ║
129
+ ║ Call: mcp__plugin_playwright_playwright__browser_navigate ║
130
+ ║ Call: mcp__plugin_playwright_playwright__browser_snapshot ║
131
+ ║ Call: mcp__plugin_playwright_playwright__browser_click ║
132
+ ║ Call: mcp__plugin_playwright_playwright__browser_fill_form ║
133
+ ║ Call: mcp__plugin_playwright_playwright__browser_take_screenshot ║
134
+ ║ These are the ACTUAL tool names you must invoke. ║
135
+ ╚══════════════════════════════════════════════════════════════════════╝
136
+
137
+ WHY: Playwright MCP replaces manual UAT. Every UI acceptance criterion gets tested programmatically with screenshot evidence, making verification reproducible and auditable. NEVER fall back to "please test this manually."
120
138
  </step>
121
139
 
122
140
  <step name="verify_api_endpoints" priority="fifth">
@@ -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>