sdlc-framework 1.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.
Files changed (53) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +321 -0
  3. package/bin/install.js +193 -0
  4. package/package.json +39 -0
  5. package/src/commands/close.md +200 -0
  6. package/src/commands/debug.md +124 -0
  7. package/src/commands/fast.md +149 -0
  8. package/src/commands/fix.md +104 -0
  9. package/src/commands/help.md +144 -0
  10. package/src/commands/hotfix.md +99 -0
  11. package/src/commands/impl.md +142 -0
  12. package/src/commands/init.md +93 -0
  13. package/src/commands/milestone.md +136 -0
  14. package/src/commands/pause.md +115 -0
  15. package/src/commands/research.md +136 -0
  16. package/src/commands/resume.md +103 -0
  17. package/src/commands/review.md +195 -0
  18. package/src/commands/spec.md +164 -0
  19. package/src/commands/status.md +118 -0
  20. package/src/commands/verify.md +153 -0
  21. package/src/references/clarification-strategy.md +352 -0
  22. package/src/references/engineering-laws.md +374 -0
  23. package/src/references/loop-phases.md +331 -0
  24. package/src/references/playwright-testing.md +298 -0
  25. package/src/references/prompt-detection.md +264 -0
  26. package/src/references/sub-agent-strategy.md +260 -0
  27. package/src/rules/commands.md +180 -0
  28. package/src/rules/style.md +354 -0
  29. package/src/rules/templates.md +238 -0
  30. package/src/rules/workflows.md +314 -0
  31. package/src/templates/HANDOFF.md +121 -0
  32. package/src/templates/LAWS.md +521 -0
  33. package/src/templates/PROJECT.md +112 -0
  34. package/src/templates/REVIEW.md +145 -0
  35. package/src/templates/ROADMAP.md +101 -0
  36. package/src/templates/SPEC.md +231 -0
  37. package/src/templates/STATE.md +106 -0
  38. package/src/templates/SUMMARY.md +126 -0
  39. package/src/workflows/close-phase.md +189 -0
  40. package/src/workflows/debug-flow.md +302 -0
  41. package/src/workflows/fast-forward.md +340 -0
  42. package/src/workflows/fix-findings.md +235 -0
  43. package/src/workflows/hotfix-flow.md +190 -0
  44. package/src/workflows/impl-phase.md +229 -0
  45. package/src/workflows/init-project.md +249 -0
  46. package/src/workflows/milestone-management.md +169 -0
  47. package/src/workflows/pause-work.md +153 -0
  48. package/src/workflows/research.md +219 -0
  49. package/src/workflows/resume-project.md +159 -0
  50. package/src/workflows/review-phase.md +337 -0
  51. package/src/workflows/spec-phase.md +379 -0
  52. package/src/workflows/transition-phase.md +203 -0
  53. package/src/workflows/verify-phase.md +280 -0
@@ -0,0 +1,144 @@
1
+ ---
2
+ name: sdlc:help
3
+ description: "Show SDLC framework command reference"
4
+ allowed-tools: [Read]
5
+ ---
6
+
7
+ <objective>
8
+ Display the complete SDLC framework command reference. Core loop, all commands, quick start, and engineering laws summary. Everything a developer needs to start using the framework.
9
+
10
+ **When to use:** First time using the framework. Forgot a command. Need a refresher.
11
+
12
+ **What it does:** Displays the full reference. No side effects. No state changes.
13
+ </objective>
14
+
15
+ <execution_context>
16
+ @.sdlc/LAWS.md
17
+ </execution_context>
18
+
19
+ <context>
20
+ No arguments. Read .sdlc/LAWS.md if it exists (for the engineering laws summary section).
21
+ </context>
22
+
23
+ <process>
24
+ Display the following reference document:
25
+
26
+ ```
27
+ ╔══════════════════════════════════════════════════════════╗
28
+ ║ SDLC Framework Reference ║
29
+ ╚══════════════════════════════════════════════════════════╝
30
+
31
+ THE CORE LOOP
32
+ ─────────────
33
+
34
+ SPEC ──→ IMPLEMENT ──→ VERIFY ──→ REVIEW ──→ CLOSE
35
+ │ │
36
+ └──────────────── next cycle ←─────────────────┘
37
+
38
+ Every unit of work flows through this loop. No exceptions.
39
+ The framework forces the next action at every step.
40
+
41
+
42
+ COMMANDS — Core Loop
43
+ ────────────────────
44
+
45
+ /sdlc:spec Define a unit of work. Produces a plan with acceptance criteria.
46
+ /sdlc:impl Implement the plan. Spawns subagents to write code.
47
+ /sdlc:verify Run tests and Playwright checks. Confirm acceptance criteria met.
48
+ /sdlc:review Review code against engineering laws. Flag violations.
49
+ /sdlc:close Archive the plan. Update STATE.md. Advance to next cycle.
50
+
51
+
52
+ COMMANDS — Quick Entry
53
+ ──────────────────────
54
+
55
+ /sdlc:fast THE DEFAULT. Describe work, framework routes + executes.
56
+ Simple work runs inline. Complex work routes to /sdlc:spec.
57
+ Bugs route to /sdlc:debug. Critical issues to /sdlc:hotfix.
58
+
59
+ COMMANDS — Fix & Debug
60
+ ──────────────────────
61
+
62
+ /sdlc:fix Fix review blockers systematically, then auto re-review.
63
+ /sdlc:debug Structured debugging: reproduce → isolate → root-cause → fix → verify.
64
+ /sdlc:hotfix Emergency fix. Minimal ceremony, maximum verification.
65
+
66
+
67
+ COMMANDS — Session Management
68
+ ─────────────────────────────
69
+
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.
73
+
74
+
75
+ COMMANDS — Planning & Research
76
+ ──────────────────────────────
77
+
78
+ /sdlc:milestone Create or complete project milestones.
79
+ /sdlc:research Deploy subagents for codebase or web research.
80
+ /sdlc:init Initialize the framework in a project. Run once.
81
+ /sdlc:help Show this reference.
82
+
83
+
84
+ QUICK START (3 steps)
85
+ ─────────────────────
86
+
87
+ 1. /sdlc:init Set up the framework and define your first milestone.
88
+ 2. /sdlc:spec Define your first unit of work.
89
+ 3. /sdlc:impl Implement it. The framework handles the rest.
90
+
91
+ The framework tells you what to do next at every step.
92
+ If you are lost, run /sdlc:status.
93
+
94
+
95
+ JUST TELL IT WHAT TO DO
96
+ ───────────────────────
97
+
98
+ /sdlc:fast is the default entry point. Describe your work:
99
+ Example: /sdlc:fast add a loading spinner to the submit button
100
+ Example: /sdlc:fast the login form crashes on empty password
101
+ Example: /sdlc:fast refactor the auth module to use dependency injection
102
+
103
+ Simple work runs inline. Complex work routes to /sdlc:spec automatically.
104
+
105
+
106
+ FOR BUGS
107
+ ────────
108
+
109
+ Use /sdlc:debug — it follows a structured debugging flow.
110
+ Example: /sdlc:debug login form submits twice on slow connections
111
+
112
+
113
+ ENGINEERING LAWS (summary)
114
+ ──────────────────────────
115
+
116
+ These laws are enforced during REVIEW. Violations block CLOSE.
117
+
118
+ DRY Search before writing. Reuse existing patterns.
119
+ Named Types No inline object shapes with 2+ properties.
120
+ Clean Arch Presentation → Domain → Infrastructure. No leaking.
121
+ Explicit No magic. Guard clauses over nesting.
122
+ Single Resp One function, one job. One service, one domain.
123
+ Tested Every behavior has a test. Changed behavior = updated test.
124
+ Edge Cases Handle null, empty, concurrent, partial failure.
125
+ 40-Line Max Functions over 40 lines must be split.
126
+ 3-Param Max More than 3 parameters = use a named interface.
127
+ No Suppress No lint/type suppression in production code.
128
+
129
+ Full laws: .sdlc/LAWS.md
130
+ ```
131
+
132
+ If .sdlc/LAWS.md exists, read it and append any project-specific law customizations to the summary.
133
+ </process>
134
+
135
+ <success_criteria>
136
+ - [ ] Core loop diagram displayed
137
+ - [ ] All 15 commands listed with one-line descriptions
138
+ - [ ] Commands grouped by purpose (core loop, shortcuts, session, planning)
139
+ - [ ] Quick start guide shown (3 steps)
140
+ - [ ] Small tasks shortcut mentioned (/sdlc:fast)
141
+ - [ ] Bug shortcut mentioned (/sdlc:debug)
142
+ - [ ] Engineering laws summary displayed
143
+ - [ ] No state changes made
144
+ </success_criteria>
@@ -0,0 +1,99 @@
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>
@@ -0,0 +1,142 @@
1
+ ---
2
+ name: sdlc:impl
3
+ description: Execute spec via parallel sub-agent development
4
+ argument-hint: "[spec-path]"
5
+ allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, Agent, TaskCreate, TaskUpdate, TaskGet, TaskList]
6
+ ---
7
+
8
+ <objective>
9
+ Execute an approved specification by spawning parallel sub-agents for independent tasks. Track progress through the task dependency graph until all tasks are complete.
10
+
11
+ **When to use:** After /sdlc:spec produces an approved SPEC.md. This is the BUILD phase of the SDLC loop.
12
+
13
+ **What it does:**
14
+ 1. Read the approved SPEC.md and extract the task dependency graph.
15
+ 2. Create tracked tasks for each item in the spec.
16
+ 3. Spawn sub-agents for wave 1 (independent tasks) in parallel.
17
+ 4. When wave 1 completes, spawn wave 2 (tasks that depended on wave 1), and so on.
18
+ 5. Each sub-agent receives: its specific task, relevant file context, engineering laws, and boundaries.
19
+ 6. Track task completion and update progress.
20
+
21
+ **What happens next:** Framework directs you to /sdlc:verify to validate the implementation against acceptance criteria.
22
+
23
+ **Critical rule:** Sub-agents do the work. This command orchestrates. Each sub-agent operates within strict boundaries defined by the spec.
24
+ </objective>
25
+
26
+ <execution_context>
27
+ @~/.claude/sdlc-framework/workflows/execute-impl.md
28
+ @.sdlc/STATE.md
29
+ @.sdlc/LAWS.md
30
+ The SPEC.md path is read from STATE.md or provided via $ARGUMENTS.
31
+ </execution_context>
32
+
33
+ <context>
34
+ $ARGUMENTS — optional path to SPEC.md. If not provided, read from .sdlc/STATE.md spec_path field.
35
+
36
+ Read these files:
37
+ - .sdlc/STATE.md — current plan and spec path.
38
+ - The SPEC.md file — tasks, dependency graph, execution waves, boundaries, acceptance criteria.
39
+ - .sdlc/LAWS.md — engineering constraints every sub-agent must follow.
40
+ </context>
41
+
42
+ <process>
43
+ Follow workflow: @~/.claude/sdlc-framework/workflows/execute-impl.md
44
+
45
+ Step-by-step:
46
+
47
+ 1. **Load spec and validate state**
48
+ - Read .sdlc/STATE.md. Confirm loop_position is SPEC_COMPLETE. If not, warn: "Spec not complete. Run /sdlc:spec first."
49
+ - Resolve spec path from $ARGUMENTS or STATE.md spec_path field.
50
+ - Read the SPEC.md file. Extract:
51
+ - Task list with IDs, descriptions, file targets, dependencies, complexity.
52
+ - Execution waves (groups of parallelizable tasks).
53
+ - Boundaries (in-scope, out-of-scope).
54
+ - Acceptance criteria (for sub-agent awareness).
55
+ - Read .sdlc/LAWS.md for engineering constraints.
56
+
57
+ 2. **Create tracked tasks**
58
+ - For each task in the spec, call TaskCreate with:
59
+ - Title: task description.
60
+ - Status: pending.
61
+ - Metadata: wave number, dependencies, file targets, complexity.
62
+ - Call TaskCreate for ALL tasks in a single batch.
63
+
64
+ 3. **Build sub-agent instruction template**
65
+ Each sub-agent receives these instructions:
66
+ ```
67
+ TASK: <task description>
68
+ FILES TO MODIFY: <list of files>
69
+ FILES TO READ FIRST: <list of context files>
70
+ ACCEPTANCE CRITERIA: <relevant ACs for this task>
71
+ BOUNDARIES: Do NOT modify files outside your task scope.
72
+ ENGINEERING LAWS: <laws from LAWS.md>
73
+
74
+ RULES:
75
+ - Read every file before editing it.
76
+ - Follow existing code patterns and conventions.
77
+ - Write tests for new logic.
78
+ - Handle edge cases explicitly.
79
+ - Do not guess — if something is unclear, err on the side of simplicity.
80
+ - Report what you created, modified, and tested.
81
+ ```
82
+
83
+ 4. **Execute wave 1 (independent tasks)**
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.
89
+
90
+ 5. **Process wave results**
91
+ - When a wave completes, review each agent's output:
92
+ - Verify the agent completed its task.
93
+ - Check for reported errors or blockers.
94
+ - Update task status to "complete" or "failed" via TaskUpdate.
95
+ - If any task failed:
96
+ - Log the failure reason.
97
+ - Determine if dependent tasks can still proceed.
98
+ - If the failure blocks downstream tasks, report to the user and ask for guidance.
99
+
100
+ 6. **Execute subsequent waves**
101
+ - For each subsequent wave (wave 2, 3, ...):
102
+ - Confirm all dependency tasks are complete.
103
+ - Spawn agents for the wave's tasks in parallel.
104
+ - Process results as in step 5.
105
+ - Repeat until all waves are complete.
106
+
107
+ 7. **Integration check**
108
+ - After all waves complete, run a quick integration check:
109
+ - Run `npm run build` or equivalent to verify the project compiles.
110
+ - Run existing tests to verify no regressions.
111
+ - If build fails or tests break, identify the issue and fix it.
112
+
113
+ 8. **Record implementation results**
114
+ - Create .sdlc/impl/IMPL-<plan-id>.md with:
115
+ - Task completion summary (passed/failed/skipped per task).
116
+ - Files created and modified (full list).
117
+ - Build status.
118
+ - Test results.
119
+ - Issues encountered and resolutions.
120
+
121
+ 9. **Update STATE.md**
122
+ - Set `loop_position: IMPL_COMPLETE`
123
+ - Set `impl_path: .sdlc/impl/IMPL-<plan-id>.md`
124
+
125
+ 10. **Output confirmation**
126
+ - Print implementation summary: tasks completed, files modified, build status.
127
+ - End with NEXT ACTION REQUIRED.
128
+ </process>
129
+
130
+ <success_criteria>
131
+ - [ ] SPEC.md read and task dependency graph extracted
132
+ - [ ] All tasks created via TaskCreate with correct metadata
133
+ - [ ] Wave 1 (independent) tasks spawned in parallel via Agent with run_in_background: true
134
+ - [ ] Each sub-agent received: task description, file targets, engineering laws, boundaries
135
+ - [ ] Subsequent waves executed in order, respecting dependencies
136
+ - [ ] Failed tasks logged with reasons and user notified
137
+ - [ ] Integration check passed (build compiles, existing tests pass)
138
+ - [ ] IMPL-<plan-id>.md created with completion summary
139
+ - [ ] STATE.md updated with loop_position: IMPL_COMPLETE
140
+ - [ ] No files modified outside spec boundaries
141
+ - [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:verify
142
+ </success_criteria>
@@ -0,0 +1,93 @@
1
+ ---
2
+ name: sdlc:init
3
+ description: Initialize SDLC framework in a project
4
+ argument-hint: "[project-name]"
5
+ allowed-tools: [Read, Write, Bash, Glob, Grep, Edit, AskUserQuestion]
6
+ ---
7
+
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.
10
+
11
+ **When to use:** First time setting up SDLC in a project. Run this once per repository.
12
+
13
+ **What it does:**
14
+ 1. Scan the current directory to understand project structure (language, framework, existing config).
15
+ 2. Ask clarification questions about project goals, team conventions, and quality thresholds.
16
+ 3. Create .sdlc/ directory with populated templates.
17
+ 4. Set the loop position to SPEC (the first phase of the development cycle).
18
+
19
+ **What happens next:** Framework directs you to /sdlc:spec to define your first unit of work.
20
+ </objective>
21
+
22
+ <execution_context>
23
+ @~/.claude/sdlc-framework/workflows/init-project.md
24
+ @~/.claude/sdlc-framework/templates/PROJECT.md
25
+ @~/.claude/sdlc-framework/templates/STATE.md
26
+ @~/.claude/sdlc-framework/templates/ROADMAP.md
27
+ @~/.claude/sdlc-framework/templates/LAWS.md
28
+ </execution_context>
29
+
30
+ <context>
31
+ $ARGUMENTS
32
+
33
+ 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
+ Read any existing package.json, Cargo.toml, pyproject.toml, go.mod, or similar to detect project type.
36
+ </context>
37
+
38
+ <process>
39
+ Follow workflow: @~/.claude/sdlc-framework/workflows/init-project.md
40
+
41
+ Step-by-step:
42
+
43
+ 1. **Pre-flight check**
44
+ - Run `ls -la` to inspect the current directory.
45
+ - Check if `.sdlc/` already exists. If yes, ask the user: "SDLC is already initialized. Reinitialize (overwrites existing state) or abort?"
46
+ - Detect project type from manifest files (package.json, Cargo.toml, etc.).
47
+
48
+ 2. **Gather project context** (use AskUserQuestion)
49
+ - Ask for project name if not provided via $ARGUMENTS.
50
+ - Ask: "Describe the project in 1-2 sentences. What problem does it solve?"
51
+ - Ask: "What are your top 3 quality priorities? (e.g., test coverage, performance, security, accessibility)"
52
+ - Ask: "What is the first milestone you want to reach?"
53
+
54
+ 3. **Create .sdlc/ directory structure**
55
+ - `mkdir -p .sdlc`
56
+
57
+ 4. **Populate PROJECT.md**
58
+ - Write project name, description, detected tech stack, quality priorities.
59
+ - Include directory structure overview.
60
+
61
+ 5. **Populate STATE.md**
62
+ - Set `loop_position: SPEC`
63
+ - Set `current_phase: null` (no phase until roadmap is defined)
64
+ - Set `current_plan: null`
65
+ - Set `initialized_at: <timestamp>`
66
+
67
+ 6. **Populate ROADMAP.md**
68
+ - Create at least one milestone from the user's answer.
69
+ - Break the milestone into at least one phase.
70
+ - Each phase has a name, objective, and empty plans list.
71
+
72
+ 7. **Populate LAWS.md**
73
+ - Copy engineering laws template.
74
+ - Configure severity levels based on project type:
75
+ - Library projects: stricter on API design, naming, documentation.
76
+ - Application projects: stricter on error handling, security, input validation.
77
+ - CLI projects: stricter on argument validation, help text, exit codes.
78
+
79
+ 8. **Output confirmation**
80
+ - Print summary of created files.
81
+ - Print the first milestone and phase.
82
+ - End with NEXT ACTION REQUIRED.
83
+ </process>
84
+
85
+ <success_criteria>
86
+ - [ ] .sdlc/ directory created with PROJECT.md, STATE.md, ROADMAP.md, LAWS.md
87
+ - [ ] PROJECT.md populated with project name, description, tech stack, quality priorities
88
+ - [ ] STATE.md initialized with loop_position set to SPEC
89
+ - [ ] ROADMAP.md has at least one milestone with at least one phase
90
+ - [ ] LAWS.md contains engineering laws with severity levels configured for the project type
91
+ - [ ] No guessing — all project context gathered via clarification questions
92
+ - [ ] Output ends with NEXT ACTION REQUIRED: /sdlc:spec
93
+ </success_criteria>
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: sdlc:milestone
3
+ description: "Create or complete project milestones"
4
+ argument-hint: "[create <name> | complete]"
5
+ allowed-tools: [Read, Write, Bash, Glob, Grep, AskUserQuestion]
6
+ ---
7
+
8
+ <objective>
9
+ Manage project milestones. Create new milestones with scope definition. Complete milestones with verification, archival, and tagging.
10
+
11
+ **When to use:**
12
+ - Starting a new body of work: `/sdlc:milestone create <name>`
13
+ - Finishing a milestone: `/sdlc:milestone complete`
14
+ - Checking milestone status: `/sdlc:milestone` (no argument)
15
+
16
+ **What it does:**
17
+ - **No argument:** Show current milestone status, phases, and progress.
18
+ - **create:** Ask clarification questions about scope, then create milestone with phases.
19
+ - **complete:** Verify all phases done, archive, update ROADMAP.md, create git tag.
20
+
21
+ **What happens next:**
22
+ - After create: /sdlc:spec to define the first unit of work.
23
+ - After complete: Completion summary displayed.
24
+ </objective>
25
+
26
+ <execution_context>
27
+ @~/.claude/sdlc-framework/workflows/milestone.md
28
+ @.sdlc/STATE.md
29
+ @.sdlc/ROADMAP.md
30
+ </execution_context>
31
+
32
+ <context>
33
+ $ARGUMENTS — one of: empty, "create <name>", or "complete".
34
+
35
+ Read .sdlc/STATE.md for current milestone.
36
+ Read .sdlc/ROADMAP.md for milestone definitions and progress.
37
+ </context>
38
+
39
+ <process>
40
+ Follow workflow: @~/.claude/sdlc-framework/workflows/milestone.md
41
+
42
+ Step-by-step:
43
+
44
+ ### If no argument: SHOW STATUS
45
+
46
+ 1. Read .sdlc/ROADMAP.md.
47
+ 2. Read .sdlc/STATE.md for current milestone.
48
+ 3. Display:
49
+ ```
50
+ Current Milestone: {name}
51
+ Status: {in-progress | blocked}
52
+
53
+ Phases:
54
+ [x] Phase 1: {name} — completed
55
+ [x] Phase 2: {name} — completed
56
+ [ ] Phase 3: {name} — in progress (3/5 plans done)
57
+ [ ] Phase 4: {name} — not started
58
+
59
+ Progress: [████████████░░░░░░░░] 60%
60
+ ```
61
+ 4. Show the next required action based on current loop position.
62
+
63
+ ### If "create <name>": CREATE MILESTONE
64
+
65
+ 1. Parse the milestone name from $ARGUMENTS.
66
+ 2. Ask clarification questions via AskUserQuestion:
67
+ - "What is the objective of this milestone? (1-2 sentences)"
68
+ - "What are the key deliverables? (list 3-5)"
69
+ - "What does 'done' look like? (acceptance criteria)"
70
+ - "Estimated number of phases? (suggest based on deliverables)"
71
+ 3. Create the milestone in .sdlc/ROADMAP.md:
72
+ ```
73
+ ## Milestone: {name}
74
+ Objective: {from answer}
75
+ Status: in-progress
76
+
77
+ ### Phases
78
+ - Phase 1: {derived from deliverables}
79
+ - Phase 2: {derived from deliverables}
80
+ ...
81
+
82
+ ### Acceptance Criteria
83
+ - {from answer}
84
+ ```
85
+ 4. Update .sdlc/STATE.md:
86
+ - Set current_milestone to the new milestone name.
87
+ - Set current_phase to Phase 1.
88
+ - Set loop_position to SPEC.
89
+ 5. Output: "NEXT ACTION REQUIRED: /sdlc:spec — define the first unit of work for Phase 1."
90
+
91
+ ### If "complete": COMPLETE MILESTONE
92
+
93
+ 1. Read .sdlc/STATE.md and .sdlc/ROADMAP.md.
94
+ 2. Verify ALL phases in the current milestone are marked complete.
95
+ - If any phase is incomplete, output: "Cannot complete milestone. Phase {N}: {name} is not done. Complete it first." Then stop.
96
+ 3. Archive the milestone:
97
+ - Create .sdlc/archive/MILESTONE-{name}-{timestamp}.md with full milestone data.
98
+ - Mark the milestone as `completed` in ROADMAP.md with completion timestamp.
99
+ 4. Update ROADMAP.md:
100
+ - Set milestone status to `completed`.
101
+ - If there is a next milestone, note it.
102
+ 5. Create a git tag:
103
+ - Run `git tag -a milestone/{name} -m "Milestone completed: {name}"`.
104
+ - If git is not initialized or tag fails, warn but continue.
105
+ 6. Update STATE.md:
106
+ - Clear current_milestone if no next milestone.
107
+ - Or set current_milestone to the next milestone and loop_position to SPEC.
108
+ 7. Output completion summary:
109
+ ```
110
+ Milestone Complete: {name}
111
+
112
+ Phases completed: {N}
113
+ Plans executed: {N}
114
+ Hotfixes applied: {N}
115
+ Git tag: milestone/{name}
116
+
117
+ {If next milestone exists}
118
+ Next milestone: {name}
119
+ Run /sdlc:spec to begin.
120
+
121
+ {If no next milestone}
122
+ All milestones complete. Define new milestones with /sdlc:milestone create <name>.
123
+ ```
124
+ </process>
125
+
126
+ <success_criteria>
127
+ - [ ] No argument: milestone status displayed with phase progress
128
+ - [ ] Create: clarification questions asked, milestone added to ROADMAP.md, STATE.md updated
129
+ - [ ] Create: output ends with NEXT ACTION REQUIRED: /sdlc:spec
130
+ - [ ] Complete: all phases verified as done before completing
131
+ - [ ] Complete: milestone archived to .sdlc/archive/
132
+ - [ ] Complete: ROADMAP.md updated with completion status
133
+ - [ ] Complete: git tag created
134
+ - [ ] Complete: STATE.md updated for next milestone (or cleared)
135
+ - [ ] No guessing — all scope gathered via clarification questions
136
+ </success_criteria>