sdlc-framework 1.0.0 → 1.0.1
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 +89 -46
- package/bin/install.js +4 -4
- package/package.json +2 -2
- package/src/commands/close.md +50 -25
- package/src/commands/debug.md +5 -5
- package/src/commands/discuss.md +90 -0
- package/src/commands/fast.md +49 -13
- package/src/commands/fix.md +18 -18
- package/src/commands/help.md +26 -21
- package/src/commands/impl.md +11 -10
- package/src/commands/init.md +23 -7
- package/src/commands/spec.md +42 -22
- package/src/commands/status.md +57 -91
- package/src/commands/verify.md +81 -120
- package/src/references/loop-phases.md +24 -30
- package/src/references/prompt-detection.md +7 -7
- package/src/rules/commands.md +2 -2
- package/src/rules/style.md +3 -4
- package/src/rules/workflows.md +3 -4
- package/src/templates/HANDOFF.md +1 -1
- package/src/templates/LAWS.md +2 -2
- package/src/templates/PRD.md +89 -0
- package/src/templates/ROADMAP.md +2 -3
- package/src/templates/STATE.md +15 -5
- package/src/templates/SUMMARY.md +2 -2
- package/src/workflows/close-phase.md +117 -37
- package/src/workflows/debug-flow.md +16 -5
- package/src/workflows/discuss-phase.md +395 -0
- package/src/workflows/fast-forward.md +103 -15
- package/src/workflows/fix-findings.md +42 -19
- package/src/workflows/impl-phase.md +130 -17
- package/src/workflows/init-project.md +19 -8
- package/src/workflows/spec-phase.md +305 -41
- package/src/workflows/status-session.md +229 -0
- package/src/workflows/verify-phase.md +300 -112
- package/src/commands/hotfix.md +0 -99
- package/src/commands/milestone.md +0 -136
- package/src/commands/pause.md +0 -115
- package/src/commands/research.md +0 -136
- package/src/commands/resume.md +0 -103
- package/src/commands/review.md +0 -195
- package/src/templates/REVIEW.md +0 -145
- package/src/workflows/hotfix-flow.md +0 -190
- package/src/workflows/milestone-management.md +0 -169
- package/src/workflows/pause-work.md +0 -153
- package/src/workflows/research.md +0 -219
- package/src/workflows/resume-project.md +0 -159
- package/src/workflows/review-phase.md +0 -337
- package/src/workflows/transition-phase.md +0 -203
package/src/commands/fast.md
CHANGED
|
@@ -11,14 +11,14 @@ 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,
|
|
14
|
+
1. Classify the work type (feature, bug, refactor, test, docs, critical).
|
|
15
15
|
2. Estimate complexity (files, lines, dependencies).
|
|
16
16
|
3. Route based on classification and complexity:
|
|
17
|
-
- Simple work (≤3 files, ≤100 lines): execute full loop inline (spec→impl→verify→
|
|
17
|
+
- Simple work (≤3 files, ≤100 lines): execute full loop inline (spec→impl→verify→close).
|
|
18
18
|
- Complex feature: route to /sdlc:spec with pre-filled context.
|
|
19
19
|
- Bug: route to /sdlc:debug with reproduction context.
|
|
20
|
-
-
|
|
21
|
-
- Critical production issue:
|
|
20
|
+
- Brainstorming or research: route to /sdlc:discuss with topic.
|
|
21
|
+
- Critical production issue: execute hotfix inline (minimal spec→fix→full verify).
|
|
22
22
|
4. For inline execution: run compressed loop with full engineering law enforcement.
|
|
23
23
|
|
|
24
24
|
**What happens next:** Depends on routing — either the task is complete, or you are directed to the appropriate specialized command.
|
|
@@ -58,9 +58,9 @@ Step-by-step:
|
|
|
58
58
|
|
|
59
59
|
| Type | Indicators | Route |
|
|
60
60
|
|------|-----------|-------|
|
|
61
|
+
| CRITICAL | "urgent", "production", "down", "outage", "critical", "P0", "hotfix" | inline hotfix |
|
|
61
62
|
| BUG | "fix", "bug", "error", "broken", "crash", "fails", "wrong", "regression" | /sdlc:debug |
|
|
62
|
-
|
|
|
63
|
-
| RESEARCH | "explore", "investigate", "research", "compare", "evaluate", "options" | /sdlc:research |
|
|
63
|
+
| DISCUSS | "brainstorm", "discuss", "idea", "what if", "think about", "concept", "should we", "could we", "explore", "investigate", "research", "compare", "evaluate", "options" | /sdlc:discuss |
|
|
64
64
|
| FEATURE | "add", "create", "build", "implement", "new", "introduce" | complexity-dependent |
|
|
65
65
|
| REFACTOR | "refactor", "clean", "rename", "extract", "move", "simplify" | complexity-dependent |
|
|
66
66
|
| TEST | "test", "coverage", "spec", "assertion" | complexity-dependent |
|
|
@@ -69,9 +69,9 @@ Step-by-step:
|
|
|
69
69
|
Display: "Classified as: {type}"
|
|
70
70
|
|
|
71
71
|
3. **Immediate routing** (for specialized types)
|
|
72
|
-
- BUG → Display: "Bug detected.
|
|
73
|
-
-
|
|
74
|
-
-
|
|
72
|
+
- BUG → Display: "Bug detected." End with auto-advance directive to /sdlc:debug — STOP.
|
|
73
|
+
- DISCUSS → Display: "Brainstorming or research topic." End with auto-advance directive to /sdlc:discuss — STOP.
|
|
74
|
+
- CRITICAL → proceed to inline hotfix (step 10).
|
|
75
75
|
|
|
76
76
|
4. **Complexity estimation** (for feature/refactor/test/docs)
|
|
77
77
|
- Scan codebase for files related to the description.
|
|
@@ -90,10 +90,10 @@ Step-by-step:
|
|
|
90
90
|
Task exceeds inline threshold ({N} files, ~{N} lines).
|
|
91
91
|
Routing to full spec for proper task decomposition and parallel sub-agent execution.
|
|
92
92
|
|
|
93
|
-
NEXT ACTION REQUIRED: /sdlc:spec
|
|
94
93
|
Context pre-loaded: {task description, identified files, estimated scope}
|
|
95
94
|
```
|
|
96
95
|
Write pre-filled context to .sdlc/STATE.md fast_context field so /sdlc:spec picks it up.
|
|
96
|
+
End with auto-advance directive to /sdlc:spec.
|
|
97
97
|
STOP.
|
|
98
98
|
|
|
99
99
|
5. **Inline execution — Mini-SPEC**
|
|
@@ -121,7 +121,7 @@ Step-by-step:
|
|
|
121
121
|
- Check each AC: PASS or FAIL.
|
|
122
122
|
- If ANY FAIL: display failures, suggest fixes. User must fix and re-run.
|
|
123
123
|
|
|
124
|
-
8. **Inline execution — Mini-
|
|
124
|
+
8. **Inline execution — Mini-review (engineering laws check)**
|
|
125
125
|
- Quick engineering laws check on changed files only.
|
|
126
126
|
- Function length, params, nesting, DRY, security, error handling, tests.
|
|
127
127
|
- If BLOCKERS: fix inline (do not route to /sdlc:fix for fast tasks).
|
|
@@ -132,15 +132,51 @@ Step-by-step:
|
|
|
132
132
|
- Update STATE.md history.
|
|
133
133
|
- Restore prior state (fast does not advance the phase).
|
|
134
134
|
- Display completion summary.
|
|
135
|
+
|
|
136
|
+
10. **Inline hotfix** (CRITICAL type only)
|
|
137
|
+
Emergency fix with minimal ceremony, maximum verification.
|
|
138
|
+
|
|
139
|
+
a. **Triage:** Ask 3 questions:
|
|
140
|
+
- "What is broken? (specific symptom)"
|
|
141
|
+
- "What is the impact? (who is affected)"
|
|
142
|
+
- "When did it start? (recent deploy, config change)"
|
|
143
|
+
Classify severity: P0 (system down), P1 (data risk), P2 (major feature broken).
|
|
144
|
+
If not P0/P1: suggest /sdlc:debug instead. Let user override.
|
|
145
|
+
|
|
146
|
+
b. **3-line inline spec:**
|
|
147
|
+
- Line 1: WHAT is broken (from $ARGUMENTS + triage).
|
|
148
|
+
- Line 2: WHERE is the likely location (quick Grep search).
|
|
149
|
+
- Line 3: WHAT the fix should achieve (expected behavior).
|
|
150
|
+
Display inline spec. Do NOT wait for approval — speed matters in emergencies.
|
|
151
|
+
|
|
152
|
+
c. **Fix directly:**
|
|
153
|
+
- Single-threaded. No sub-agents.
|
|
154
|
+
- Apply MINIMAL fix — change as few lines as possible.
|
|
155
|
+
- Engineering laws still apply. No empty catch blocks. No hardcoded secrets.
|
|
156
|
+
- Add a regression test for the specific failure.
|
|
157
|
+
- Mark technical debt with TODO(hotfix-{date}).
|
|
158
|
+
|
|
159
|
+
d. **Full verification:**
|
|
160
|
+
- Run FULL test suite (not just affected tests).
|
|
161
|
+
- For UI: Playwright verification.
|
|
162
|
+
- If any fail: fix before proceeding.
|
|
163
|
+
|
|
164
|
+
e. **Record:**
|
|
165
|
+
- Determine hotfix number: {phase}.{count+1} (e.g., 02.1).
|
|
166
|
+
- Create .sdlc/phases/{phase}/HOTFIX-{number}-SUMMARY.md.
|
|
167
|
+
- Update STATE.md: restore prior state, add history entry.
|
|
168
|
+
- Update ROADMAP.md: note hotfix under current phase.
|
|
169
|
+
- Display: "Hotfix {number} applied and verified. State restored."
|
|
135
170
|
</process>
|
|
136
171
|
|
|
137
172
|
<success_criteria>
|
|
138
173
|
- [ ] Work classified correctly from natural language description
|
|
139
174
|
- [ ] Bugs routed to /sdlc:debug — never processed inline
|
|
140
|
-
- [ ] Critical issues
|
|
141
|
-
- [ ]
|
|
175
|
+
- [ ] Critical issues handled as inline hotfix with full verify (ACs + laws review)
|
|
176
|
+
- [ ] Brainstorming and research topics routed to /sdlc:discuss
|
|
142
177
|
- [ ] Complex work (>3 files or >100 lines) routed to /sdlc:spec with pre-filled context
|
|
143
178
|
- [ ] Simple work executed inline through full compressed loop
|
|
179
|
+
- [ ] Hotfix: minimal fix, full test suite, engineering laws enforced
|
|
144
180
|
- [ ] All code changes comply with engineering laws
|
|
145
181
|
- [ ] Tests run and pass
|
|
146
182
|
- [ ] STATE.md updated appropriately
|
package/src/commands/fix.md
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sdlc:fix
|
|
3
3
|
description: Fix review findings and re-verify compliance
|
|
4
|
-
argument-hint: "[
|
|
4
|
+
argument-hint: "[verify-path]"
|
|
5
5
|
allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList, AskUserQuestion]
|
|
6
6
|
---
|
|
7
7
|
|
|
8
8
|
<objective>
|
|
9
|
-
Systematically fix all blocker findings from /sdlc:
|
|
9
|
+
Systematically fix all blocker findings from /sdlc:verify. Read the VERIFY.md review section, fix each violation, then re-run verify to confirm compliance.
|
|
10
10
|
|
|
11
|
-
**When to use:** After /sdlc:
|
|
11
|
+
**When to use:** After /sdlc:verify reports code quality blockers that must be fixed before /sdlc:close.
|
|
12
12
|
|
|
13
13
|
**What it does:**
|
|
14
|
-
1. Read the
|
|
14
|
+
1. Read the VERIFY.md Phase 2 section to load all findings.
|
|
15
15
|
2. Separate blockers (must fix) from warnings (should fix) and info (consider).
|
|
16
16
|
3. Analyze dependencies between findings (fixing one may resolve others).
|
|
17
17
|
4. For independent fixes: spawn parallel sub-agents per file.
|
|
18
18
|
5. For dependent fixes: apply sequentially.
|
|
19
|
-
6. After all blockers fixed: automatically re-run /sdlc:
|
|
19
|
+
6. After all blockers fixed: automatically re-run /sdlc:verify to confirm compliance.
|
|
20
20
|
7. If warnings exist: present to user and ask which to fix (optional).
|
|
21
21
|
|
|
22
|
-
**What happens next:** Re-runs /sdlc:
|
|
22
|
+
**What happens next:** Re-runs /sdlc:verify automatically. If verify passes, routes to /sdlc:close.
|
|
23
23
|
|
|
24
24
|
**Critical rule:** Fixes MUST follow the same engineering laws. A fix that introduces a new violation is not a fix.
|
|
25
25
|
</objective>
|
|
@@ -30,13 +30,13 @@ Systematically fix all blocker findings from /sdlc:review. Read the REVIEW.md, f
|
|
|
30
30
|
</execution_context>
|
|
31
31
|
|
|
32
32
|
<context>
|
|
33
|
-
$ARGUMENTS — optional path to
|
|
33
|
+
$ARGUMENTS — optional path to VERIFY.md. If not provided, finds the most recent verify file.
|
|
34
34
|
|
|
35
35
|
Read these files:
|
|
36
36
|
- .sdlc/STATE.md — current loop position and plan reference.
|
|
37
|
-
- The current
|
|
37
|
+
- The current VERIFY.md (Phase 2 section) — review findings to fix.
|
|
38
38
|
- .sdlc/LAWS.md — engineering laws for context on each violation.
|
|
39
|
-
- All files listed in
|
|
39
|
+
- All files listed in VERIFY.md findings.
|
|
40
40
|
</context>
|
|
41
41
|
|
|
42
42
|
<process>
|
|
@@ -45,7 +45,7 @@ Follow workflow: @~/.claude/sdlc-framework/workflows/fix-findings.md
|
|
|
45
45
|
Step-by-step:
|
|
46
46
|
|
|
47
47
|
1. **Load review findings**
|
|
48
|
-
- Read
|
|
48
|
+
- Read VERIFY.md from .sdlc/phases/{phase}/{plan}-VERIFY.md (Phase 2 section)
|
|
49
49
|
- Parse all findings: file, line, law, severity, description, suggested fix
|
|
50
50
|
- Count: blockers, warnings, info
|
|
51
51
|
|
|
@@ -82,23 +82,23 @@ Step-by-step:
|
|
|
82
82
|
5. **Fix approved warnings** (after blockers are done)
|
|
83
83
|
- Same process for user-approved warnings
|
|
84
84
|
|
|
85
|
-
6. **Re-run
|
|
86
|
-
- After all fixes applied, automatically trigger /sdlc:
|
|
87
|
-
- Display: "Fixes applied. Re-running
|
|
85
|
+
6. **Re-run verify**
|
|
86
|
+
- After all fixes applied, automatically trigger /sdlc:verify
|
|
87
|
+
- Display: "Fixes applied. Re-running verify to confirm compliance..."
|
|
88
88
|
|
|
89
|
-
7. **Handle re-
|
|
89
|
+
7. **Handle re-verify results**
|
|
90
90
|
- If new blockers found (fix introduced new violations): report and loop
|
|
91
91
|
- If clean: route to /sdlc:close
|
|
92
92
|
</process>
|
|
93
93
|
|
|
94
94
|
<success_criteria>
|
|
95
|
-
- [ ] All blocker findings from
|
|
95
|
+
- [ ] All blocker findings from VERIFY.md addressed
|
|
96
96
|
- [ ] Fixes follow engineering laws (no new violations introduced)
|
|
97
97
|
- [ ] Findings grouped by file for efficient parallel fixing
|
|
98
98
|
- [ ] Fix dependencies identified and ordered correctly
|
|
99
99
|
- [ ] User approved the fix plan before execution
|
|
100
100
|
- [ ] Sub-agents spawned for independent file fixes
|
|
101
|
-
- [ ] /sdlc:
|
|
102
|
-
- [ ] If
|
|
103
|
-
- [ ] If
|
|
101
|
+
- [ ] /sdlc:verify automatically re-runs after fixes
|
|
102
|
+
- [ ] If verify passes: output ends with auto-advance directive to /sdlc:close
|
|
103
|
+
- [ ] If verify fails again: output ends with auto-advance directive to /sdlc:fix
|
|
104
104
|
</success_criteria>
|
package/src/commands/help.md
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: sdlc:help
|
|
3
3
|
description: "Show SDLC framework command reference"
|
|
4
|
+
argument-hint: "[command]"
|
|
4
5
|
allowed-tools: [Read]
|
|
5
6
|
---
|
|
6
7
|
|
|
@@ -31,9 +32,9 @@ Display the following reference document:
|
|
|
31
32
|
THE CORE LOOP
|
|
32
33
|
─────────────
|
|
33
34
|
|
|
34
|
-
SPEC ──→ IMPLEMENT ──→ VERIFY ──→
|
|
35
|
-
│
|
|
36
|
-
|
|
35
|
+
SPEC ──→ IMPLEMENT ──→ VERIFY ──→ CLOSE
|
|
36
|
+
│ │
|
|
37
|
+
└──────────── next cycle ←──────────┘
|
|
37
38
|
|
|
38
39
|
Every unit of work flows through this loop. No exceptions.
|
|
39
40
|
The framework forces the next action at every step.
|
|
@@ -44,9 +45,8 @@ COMMANDS — Core Loop
|
|
|
44
45
|
|
|
45
46
|
/sdlc:spec Define a unit of work. Produces a plan with acceptance criteria.
|
|
46
47
|
/sdlc:impl Implement the plan. Spawns subagents to write code.
|
|
47
|
-
/sdlc:verify
|
|
48
|
-
/sdlc:
|
|
49
|
-
/sdlc:close Archive the plan. Update STATE.md. Advance to next cycle.
|
|
48
|
+
/sdlc:verify Two-phase: test ACs (Playwright MCP, curl, tests) + engineering laws review.
|
|
49
|
+
/sdlc:close Close the loop. Handles phase transitions and milestone completion inline.
|
|
50
50
|
|
|
51
51
|
|
|
52
52
|
COMMANDS — Quick Entry
|
|
@@ -54,30 +54,28 @@ 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
|
|
57
|
+
Bugs route to /sdlc:debug. Critical issues run as inline hotfix.
|
|
58
58
|
|
|
59
59
|
COMMANDS — Fix & Debug
|
|
60
60
|
──────────────────────
|
|
61
61
|
|
|
62
|
-
/sdlc:fix Fix
|
|
62
|
+
/sdlc:fix Fix code quality blockers systematically, then auto re-verify.
|
|
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
|
|
68
|
-
|
|
66
|
+
COMMANDS — Session & Status
|
|
67
|
+
───────────────────────────
|
|
69
68
|
|
|
70
|
-
/sdlc:
|
|
71
|
-
/sdlc:
|
|
72
|
-
/sdlc:status
|
|
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
|
-
COMMANDS — Planning &
|
|
76
|
-
|
|
74
|
+
COMMANDS — Planning & Discovery
|
|
75
|
+
───────────────────────────────
|
|
77
76
|
|
|
78
|
-
/sdlc:
|
|
79
|
-
/sdlc:
|
|
80
|
-
/sdlc:init Initialize the framework in a project. Run once.
|
|
77
|
+
/sdlc:discuss Brainstorm an idea into a PRD. Spawns research subagents when unknowns are detected.
|
|
78
|
+
/sdlc:init Initialize framework or add milestones. Run once.
|
|
81
79
|
/sdlc:help Show this reference.
|
|
82
80
|
|
|
83
81
|
|
|
@@ -110,10 +108,17 @@ FOR BUGS
|
|
|
110
108
|
Example: /sdlc:debug login form submits twice on slow connections
|
|
111
109
|
|
|
112
110
|
|
|
111
|
+
AUTO-ADVANCE
|
|
112
|
+
─────────────
|
|
113
|
+
Steps chain automatically with a 10-second delay.
|
|
114
|
+
Reply during the delay to intervene.
|
|
115
|
+
Disable: set auto_advance: false in .sdlc/STATE.md
|
|
116
|
+
|
|
117
|
+
|
|
113
118
|
ENGINEERING LAWS (summary)
|
|
114
119
|
──────────────────────────
|
|
115
120
|
|
|
116
|
-
These laws are enforced during
|
|
121
|
+
These laws are enforced during VERIFY (Phase 2). Violations block CLOSE.
|
|
117
122
|
|
|
118
123
|
DRY Search before writing. Reuse existing patterns.
|
|
119
124
|
Named Types No inline object shapes with 2+ properties.
|
|
@@ -134,7 +139,7 @@ If .sdlc/LAWS.md exists, read it and append any project-specific law customizati
|
|
|
134
139
|
|
|
135
140
|
<success_criteria>
|
|
136
141
|
- [ ] Core loop diagram displayed
|
|
137
|
-
- [ ] All
|
|
142
|
+
- [ ] All 11 commands listed with one-line descriptions
|
|
138
143
|
- [ ] Commands grouped by purpose (core loop, shortcuts, session, planning)
|
|
139
144
|
- [ ] Quick start guide shown (3 steps)
|
|
140
145
|
- [ ] Small tasks shortcut mentioned (/sdlc:fast)
|
package/src/commands/impl.md
CHANGED
|
@@ -20,11 +20,11 @@ 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>
|
|
27
|
-
@~/.claude/sdlc-framework/workflows/
|
|
27
|
+
@~/.claude/sdlc-framework/workflows/impl-phase.md
|
|
28
28
|
@.sdlc/STATE.md
|
|
29
29
|
@.sdlc/LAWS.md
|
|
30
30
|
The SPEC.md path is read from STATE.md or provided via $ARGUMENTS.
|
|
@@ -40,7 +40,7 @@ Read these files:
|
|
|
40
40
|
</context>
|
|
41
41
|
|
|
42
42
|
<process>
|
|
43
|
-
Follow workflow: @~/.claude/sdlc-framework/workflows/
|
|
43
|
+
Follow workflow: @~/.claude/sdlc-framework/workflows/impl-phase.md
|
|
44
44
|
|
|
45
45
|
Step-by-step:
|
|
46
46
|
|
|
@@ -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:
|
|
@@ -124,7 +125,7 @@ Step-by-step:
|
|
|
124
125
|
|
|
125
126
|
10. **Output confirmation**
|
|
126
127
|
- Print implementation summary: tasks completed, files modified, build status.
|
|
127
|
-
- End with
|
|
128
|
+
- End with auto-advance directive to /sdlc:verify.
|
|
128
129
|
</process>
|
|
129
130
|
|
|
130
131
|
<success_criteria>
|
|
@@ -138,5 +139,5 @@ Step-by-step:
|
|
|
138
139
|
- [ ] IMPL-<plan-id>.md created with completion summary
|
|
139
140
|
- [ ] STATE.md updated with loop_position: IMPL_COMPLETE
|
|
140
141
|
- [ ] No files modified outside spec boundaries
|
|
141
|
-
- [ ] Output ends with
|
|
142
|
+
- [ ] Output ends with auto-advance directive to /sdlc:verify
|
|
142
143
|
</success_criteria>
|
package/src/commands/init.md
CHANGED
|
@@ -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
|
|
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.
|
|
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
|
|
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
|
|
|
@@ -79,7 +82,20 @@ Step-by-step:
|
|
|
79
82
|
8. **Output confirmation**
|
|
80
83
|
- Print summary of created files.
|
|
81
84
|
- Print the first milestone and phase.
|
|
82
|
-
- End with
|
|
85
|
+
- End with auto-advance directive to /sdlc:spec.
|
|
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." End with auto-advance directive to /sdlc:spec.
|
|
83
99
|
</process>
|
|
84
100
|
|
|
85
101
|
<success_criteria>
|
|
@@ -89,5 +105,5 @@ Step-by-step:
|
|
|
89
105
|
- [ ] ROADMAP.md has at least one milestone with at least one phase
|
|
90
106
|
- [ ] LAWS.md contains engineering laws with severity levels configured for the project type
|
|
91
107
|
- [ ] No guessing — all project context gathered via clarification questions
|
|
92
|
-
- [ ] Output ends with
|
|
108
|
+
- [ ] Output ends with auto-advance directive to /sdlc:spec
|
|
93
109
|
</success_criteria>
|
package/src/commands/spec.md
CHANGED
|
@@ -26,7 +26,7 @@ Define a complete specification for one unit of work (a "plan"). Produce a SPEC.
|
|
|
26
26
|
</objective>
|
|
27
27
|
|
|
28
28
|
<execution_context>
|
|
29
|
-
@~/.claude/sdlc-framework/workflows/
|
|
29
|
+
@~/.claude/sdlc-framework/workflows/spec-phase.md
|
|
30
30
|
@.sdlc/STATE.md
|
|
31
31
|
@.sdlc/PROJECT.md
|
|
32
32
|
@.sdlc/ROADMAP.md
|
|
@@ -46,7 +46,7 @@ Scan the codebase to understand existing structure, patterns, and conventions.
|
|
|
46
46
|
</context>
|
|
47
47
|
|
|
48
48
|
<process>
|
|
49
|
-
Follow workflow: @~/.claude/sdlc-framework/workflows/
|
|
49
|
+
Follow workflow: @~/.claude/sdlc-framework/workflows/spec-phase.md
|
|
50
50
|
|
|
51
51
|
Step-by-step:
|
|
52
52
|
|
|
@@ -78,16 +78,18 @@ Step-by-step:
|
|
|
78
78
|
- Option C (do nothing / defer): description, risk of deferring.
|
|
79
79
|
Ask the user to choose before proceeding.
|
|
80
80
|
|
|
81
|
-
5. **Define acceptance criteria in BDD format**
|
|
82
|
-
Write Given/When/Then scenarios for each user-facing behavior:
|
|
81
|
+
5. **Define acceptance criteria in BDD format with verification type**
|
|
82
|
+
Write Given/When/Then scenarios for each user-facing behavior. Every AC MUST include a `Type` field that declares how the verify phase will test it:
|
|
83
83
|
```
|
|
84
84
|
AC-1: [Short title]
|
|
85
|
+
Type: [UI_INTERACTION | API_ENDPOINT | CLI_BEHAVIOR | BUSINESS_LOGIC | DATA_INTEGRITY]
|
|
85
86
|
Given [precondition]
|
|
86
87
|
When [action]
|
|
87
88
|
Then [expected outcome]
|
|
88
89
|
```
|
|
90
|
+
The Type field is mandatory — it tells `/sdlc:verify` whether to use Playwright MCP, curl, Bash, the test runner, or DB queries. Without it, the AC will be skipped during verification.
|
|
89
91
|
Include happy path, error cases, and edge cases.
|
|
90
|
-
Present acceptance criteria to the user and ask: "Do these cover all cases?
|
|
92
|
+
Present acceptance criteria with their types to the user and ask: "Do these cover all cases? Are the verification types correct?"
|
|
91
93
|
|
|
92
94
|
6. **Break into tasks with dependency analysis**
|
|
93
95
|
- List every discrete task needed to implement the spec.
|
|
@@ -106,7 +108,16 @@ Step-by-step:
|
|
|
106
108
|
- What is OUT of scope.
|
|
107
109
|
- What is DEFERRED to a future plan.
|
|
108
110
|
|
|
109
|
-
8. **
|
|
111
|
+
8. **Codebase gap analysis — MANDATORY**
|
|
112
|
+
Read every file listed in the task breakdown. Review existing code for:
|
|
113
|
+
- Missing error handling that the spec should cover.
|
|
114
|
+
- Untested code paths that need new ACs.
|
|
115
|
+
- Edge cases the existing code handles but the spec does not mention.
|
|
116
|
+
- Integration risks (callers of modified functions, shared state, exports).
|
|
117
|
+
- Validation gaps at system boundaries.
|
|
118
|
+
Present a gap report to the user. Add new ACs (with verification_type) and update tasks for every gap found.
|
|
119
|
+
|
|
120
|
+
9. **Write SPEC.md**
|
|
110
121
|
Create .sdlc/specs/SPEC-<plan-id>.md with:
|
|
111
122
|
```
|
|
112
123
|
# Spec: <title>
|
|
@@ -123,42 +134,51 @@ Step-by-step:
|
|
|
123
134
|
## Engineering Constraints (from LAWS.md)
|
|
124
135
|
```
|
|
125
136
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
-
|
|
137
|
+
10. **Spec integrity review — MANDATORY, DO NOT SKIP**
|
|
138
|
+
You MUST print a full integrity review table with ✓/✗ for EACH check:
|
|
139
|
+
- CHECK 1 — COMPLETENESS: every task has name, action, files, verification, done criteria, complexity. Every AC has numbered Type/GIVEN/WHEN/THEN with specific values.
|
|
140
|
+
- 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.
|
|
141
|
+
- 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.
|
|
142
|
+
- CHECK 4 — FEASIBILITY: task count 2-5, estimated change under ~300 lines, all referenced files exist.
|
|
143
|
+
- CHECK 5 — DEPENDENCY GRAPH: every task in exactly one wave, ordering matches dependencies, independent tasks parallelized, dependent tasks sequenced.
|
|
144
|
+
- CHECK 6 — VERIFICATION TYPES: every AC has a valid Type field (UI_INTERACTION, API_ENDPOINT, CLI_BEHAVIOR, BUSINESS_LOGIC, DATA_INTEGRITY). Type matches AC content.
|
|
145
|
+
- CHECK 7 — GAP ANALYSIS: codebase gap analysis was performed, gaps were reported, and findings were incorporated into ACs/tasks.
|
|
146
|
+
- Print the full review table with all results. Fix any failures before proceeding.
|
|
147
|
+
|
|
148
|
+
11. **User approval gate** (BLOCKING — cannot proceed without approval)
|
|
149
|
+
- Present full spec summary AND integrity review results to user
|
|
134
150
|
- User options: APPROVE (proceed), REVISE (change and re-review), REJECT (discard)
|
|
135
|
-
- If REVISE: apply changes, re-run integrity
|
|
151
|
+
- If REVISE: apply changes, re-run ALL integrity checks, re-present
|
|
136
152
|
- If REJECT: delete spec, stop
|
|
137
153
|
- If APPROVE: proceed to update state
|
|
138
154
|
|
|
139
|
-
|
|
155
|
+
12. **Update STATE.md**
|
|
140
156
|
- Set `current_plan: <plan-id>`
|
|
141
157
|
- Set `spec_path: .sdlc/phases/{phase}/{plan}-SPEC.md`
|
|
142
158
|
- Set `loop_position: SPEC ✓`
|
|
143
159
|
- Set `next_required_action: /sdlc:impl`
|
|
144
160
|
|
|
145
|
-
|
|
146
|
-
- Print spec summary: objective, number of ACs, number of tasks, execution waves.
|
|
147
|
-
- End with
|
|
161
|
+
13. **Output confirmation**
|
|
162
|
+
- Print spec summary: objective, number of ACs (with verification type breakdown), number of tasks, execution waves.
|
|
163
|
+
- End with auto-advance directive to /sdlc:impl
|
|
148
164
|
</process>
|
|
149
165
|
|
|
150
166
|
<success_criteria>
|
|
151
167
|
- [ ] At least 2 clarification questions asked before writing the spec
|
|
152
168
|
- [ ] Every design decision presented with trade-offs and user confirmation
|
|
153
|
-
- [ ] Acceptance criteria written in BDD format (Given/When/Then)
|
|
169
|
+
- [ ] Acceptance criteria written in BDD format (Given/When/Then) with mandatory Type field
|
|
170
|
+
- [ ] Every AC has a verification_type: UI_INTERACTION, API_ENDPOINT, CLI_BEHAVIOR, BUSINESS_LOGIC, or DATA_INTEGRITY
|
|
171
|
+
- [ ] Verification types match AC content (UI ACs test browser state, API ACs test endpoints, etc.)
|
|
154
172
|
- [ ] Acceptance criteria cover happy path, error cases, and edge cases
|
|
155
173
|
- [ ] Tasks broken into dependency graph with execution waves
|
|
156
174
|
- [ ] Each task identifies files to create/modify and complexity
|
|
157
175
|
- [ ] Boundaries section explicitly states in-scope, out-of-scope, and deferred items
|
|
158
|
-
- [ ]
|
|
176
|
+
- [ ] Codebase gap analysis performed — existing code reviewed for missing logic, edge cases, and integration risks
|
|
177
|
+
- [ ] Gap analysis findings incorporated into ACs and tasks (no silent gaps)
|
|
178
|
+
- [ ] Spec integrity review passed (completeness, consistency, feasibility, verification types, gap analysis)
|
|
159
179
|
- [ ] User explicitly approved the spec (APPROVE response received)
|
|
160
180
|
- [ ] SPEC.md created at .sdlc/phases/{phase}/{plan}-SPEC.md
|
|
161
181
|
- [ ] STATE.md updated with current_plan, spec_path, loop_position: SPEC ✓
|
|
162
182
|
- [ ] No assumptions made — every ambiguity resolved via clarification
|
|
163
|
-
- [ ] Output ends with
|
|
183
|
+
- [ ] Output ends with auto-advance directive to /sdlc:impl
|
|
164
184
|
</success_criteria>
|