sdlc-framework 1.0.0 → 1.0.2
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/package.json +1 -1
- package/src/commands/impl.md +7 -6
- package/src/commands/spec.md +10 -7
- package/src/workflows/close-phase.md +8 -0
- package/src/workflows/impl-phase.md +62 -5
- package/src/workflows/review-phase.md +6 -0
- package/src/workflows/spec-phase.md +90 -28
- package/src/workflows/verify-phase.md +19 -1
package/package.json
CHANGED
package/src/commands/impl.md
CHANGED
|
@@ -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
|
-
**
|
|
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
|
-
-
|
|
86
|
-
-
|
|
87
|
-
-
|
|
88
|
-
-
|
|
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:
|
package/src/commands/spec.md
CHANGED
|
@@ -123,16 +123,19 @@ Step-by-step:
|
|
|
123
123
|
## Engineering Constraints (from LAWS.md)
|
|
124
124
|
```
|
|
125
125
|
|
|
126
|
-
9. **Spec integrity review**
|
|
127
|
-
|
|
128
|
-
- CHECK
|
|
129
|
-
- CHECK
|
|
130
|
-
-
|
|
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
|
|
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
|
|
|
@@ -6,6 +6,14 @@
|
|
|
6
6
|
prior_phase: REVIEW ✓
|
|
7
7
|
next_phase: SPEC (next loop) or transition-phase (if last plan)
|
|
8
8
|
</loop_context>
|
|
9
|
+
<display_rule>
|
|
10
|
+
MANDATORY: Display the loop closure summary in the chat window. Show:
|
|
11
|
+
- What was built (deliverables, 2-3 lines)
|
|
12
|
+
- AC results table (AC | Status)
|
|
13
|
+
- Deviations (if any, 1 line each)
|
|
14
|
+
- Next action
|
|
15
|
+
Keep it compact (~15-25 lines). Full SUMMARY.md is in the file for audit.
|
|
16
|
+
</display_rule>
|
|
9
17
|
<process>
|
|
10
18
|
|
|
11
19
|
<step name="validate_state" priority="first">
|
|
@@ -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
|
|
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.
|
|
99
|
-
|
|
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
|
-
-
|
|
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:
|
|
@@ -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
|
-
|
|
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
|
-
|
|
263
|
-
-
|
|
264
|
-
-
|
|
265
|
-
-
|
|
266
|
-
-
|
|
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
|
|
270
|
-
- Every AC is
|
|
271
|
-
-
|
|
272
|
-
-
|
|
273
|
-
-
|
|
274
|
-
|
|
275
|
-
CHECK 3 —
|
|
276
|
-
|
|
277
|
-
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
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
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
{
|
|
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
|
|
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">
|
|
@@ -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
|
-
|
|
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">
|