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.
- package/LICENSE +21 -0
- package/README.md +321 -0
- package/bin/install.js +193 -0
- package/package.json +39 -0
- package/src/commands/close.md +200 -0
- package/src/commands/debug.md +124 -0
- package/src/commands/fast.md +149 -0
- package/src/commands/fix.md +104 -0
- package/src/commands/help.md +144 -0
- package/src/commands/hotfix.md +99 -0
- package/src/commands/impl.md +142 -0
- package/src/commands/init.md +93 -0
- package/src/commands/milestone.md +136 -0
- package/src/commands/pause.md +115 -0
- package/src/commands/research.md +136 -0
- package/src/commands/resume.md +103 -0
- package/src/commands/review.md +195 -0
- package/src/commands/spec.md +164 -0
- package/src/commands/status.md +118 -0
- package/src/commands/verify.md +153 -0
- package/src/references/clarification-strategy.md +352 -0
- package/src/references/engineering-laws.md +374 -0
- package/src/references/loop-phases.md +331 -0
- package/src/references/playwright-testing.md +298 -0
- package/src/references/prompt-detection.md +264 -0
- package/src/references/sub-agent-strategy.md +260 -0
- package/src/rules/commands.md +180 -0
- package/src/rules/style.md +354 -0
- package/src/rules/templates.md +238 -0
- package/src/rules/workflows.md +314 -0
- package/src/templates/HANDOFF.md +121 -0
- package/src/templates/LAWS.md +521 -0
- package/src/templates/PROJECT.md +112 -0
- package/src/templates/REVIEW.md +145 -0
- package/src/templates/ROADMAP.md +101 -0
- package/src/templates/SPEC.md +231 -0
- package/src/templates/STATE.md +106 -0
- package/src/templates/SUMMARY.md +126 -0
- package/src/workflows/close-phase.md +189 -0
- package/src/workflows/debug-flow.md +302 -0
- package/src/workflows/fast-forward.md +340 -0
- package/src/workflows/fix-findings.md +235 -0
- package/src/workflows/hotfix-flow.md +190 -0
- package/src/workflows/impl-phase.md +229 -0
- package/src/workflows/init-project.md +249 -0
- package/src/workflows/milestone-management.md +169 -0
- package/src/workflows/pause-work.md +153 -0
- package/src/workflows/research.md +219 -0
- package/src/workflows/resume-project.md +159 -0
- package/src/workflows/review-phase.md +337 -0
- package/src/workflows/spec-phase.md +379 -0
- package/src/workflows/transition-phase.md +203 -0
- package/src/workflows/verify-phase.md +280 -0
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
# Code Review Findings Template
|
|
2
|
+
|
|
3
|
+
This template defines the review document produced during `/sdlc:review`. It is stored at `.sdlc/milestones/M{{N}}/phases/P{{N}}/reviews/REVIEW-{{NNN}}.md`. The review evaluates all code changes against the engineering laws defined in `.sdlc/LAWS.md`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Code Review: {{SPEC_TITLE}}
|
|
9
|
+
|
|
10
|
+
**Spec:** {{SPEC_FILE_PATH}}
|
|
11
|
+
**Reviewer:** SDLC Framework (automated)
|
|
12
|
+
**Date:** {{DATE}}
|
|
13
|
+
|
|
14
|
+
## Files Reviewed
|
|
15
|
+
|
|
16
|
+
| File | Lines Changed | Type |
|
|
17
|
+
|------|---------------|------|
|
|
18
|
+
| {{FILE_PATH}} | {{LINES_ADDED}}/{{LINES_REMOVED}} | {{created/modified}} |
|
|
19
|
+
|
|
20
|
+
**Total files reviewed:** {{COUNT}}
|
|
21
|
+
**Total lines changed:** {{TOTAL_ADDED}} added, {{TOTAL_REMOVED}} removed
|
|
22
|
+
|
|
23
|
+
## Summary
|
|
24
|
+
|
|
25
|
+
| Severity | Count |
|
|
26
|
+
|----------|-------|
|
|
27
|
+
| error (blocks closure) | {{COUNT}} |
|
|
28
|
+
| warning (reported) | {{COUNT}} |
|
|
29
|
+
| info (noted) | {{COUNT}} |
|
|
30
|
+
|
|
31
|
+
**Overall status:** {{PASS — no errors / BLOCKED — errors found}}
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Findings
|
|
36
|
+
|
|
37
|
+
### {{FILE_PATH}}
|
|
38
|
+
|
|
39
|
+
#### Finding F-{{NNN}}
|
|
40
|
+
|
|
41
|
+
- **Lines:** {{START_LINE}}–{{END_LINE}}
|
|
42
|
+
- **Law:** {{LAW_NAME}} ({{SOLID/DRY/YAGNI/CLEAN_CODE/SECURITY/TESTING/NAMING/ERROR_HANDLING}})
|
|
43
|
+
- **Severity:** {{error/warning/info}}
|
|
44
|
+
- **Description:** {{WHAT_IS_WRONG — specific, concrete, no hand-waving}}
|
|
45
|
+
- **Code:**
|
|
46
|
+
```{{language}}
|
|
47
|
+
{{THE_PROBLEMATIC_CODE}}
|
|
48
|
+
```
|
|
49
|
+
- **Suggested Fix:**
|
|
50
|
+
```{{language}}
|
|
51
|
+
{{HOW_TO_FIX_IT}}
|
|
52
|
+
```
|
|
53
|
+
- **Why:** {{WHY_THIS_MATTERS — real consequence, not theoretical}}
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
#### Finding F-{{NNN}}
|
|
58
|
+
|
|
59
|
+
- **Lines:** {{START_LINE}}–{{END_LINE}}
|
|
60
|
+
- **Law:** {{LAW_NAME}}
|
|
61
|
+
- **Severity:** {{error/warning/info}}
|
|
62
|
+
- **Description:** {{WHAT_IS_WRONG}}
|
|
63
|
+
- **Code:**
|
|
64
|
+
```{{language}}
|
|
65
|
+
{{THE_PROBLEMATIC_CODE}}
|
|
66
|
+
```
|
|
67
|
+
- **Suggested Fix:**
|
|
68
|
+
```{{language}}
|
|
69
|
+
{{HOW_TO_FIX_IT}}
|
|
70
|
+
```
|
|
71
|
+
- **Why:** {{WHY_THIS_MATTERS}}
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
### {{NEXT_FILE_PATH}}
|
|
76
|
+
|
|
77
|
+
#### Finding F-{{NNN}}
|
|
78
|
+
|
|
79
|
+
(Same structure as above, repeated for each finding in each file)
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Law Summary
|
|
84
|
+
|
|
85
|
+
| Law | Findings | Errors | Warnings | Info |
|
|
86
|
+
|-----|----------|--------|----------|------|
|
|
87
|
+
| SOLID | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
88
|
+
| DRY | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
89
|
+
| YAGNI | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
90
|
+
| CLEAN_CODE | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
91
|
+
| SECURITY | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
92
|
+
| TESTING | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
93
|
+
| NAMING | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
94
|
+
| ERROR_HANDLING | {{COUNT}} | {{COUNT}} | {{COUNT}} | {{COUNT}} |
|
|
95
|
+
| **Total** | **{{COUNT}}** | **{{COUNT}}** | **{{COUNT}}** | **{{COUNT}}** |
|
|
96
|
+
|
|
97
|
+
## Overall Assessment
|
|
98
|
+
|
|
99
|
+
{{FREE_TEXT_ASSESSMENT — 2-3 sentences summarizing code quality, notable positives, and primary concerns}}
|
|
100
|
+
|
|
101
|
+
### Blocking Issues
|
|
102
|
+
|
|
103
|
+
{{LIST_OF_ERROR_SEVERITY_FINDINGS_THAT_MUST_BE_FIXED or "No blocking issues found."}}
|
|
104
|
+
|
|
105
|
+
### Recommendations
|
|
106
|
+
|
|
107
|
+
{{NON_BLOCKING_SUGGESTIONS_FOR_IMPROVEMENT or "No additional recommendations."}}
|
|
108
|
+
|
|
109
|
+
### Resolution Required
|
|
110
|
+
|
|
111
|
+
{{IF_BLOCKED: what specifically must be fixed and in which files}}
|
|
112
|
+
{{IF_PASS: "No resolution required. Code review passed."}}
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Field Documentation
|
|
118
|
+
|
|
119
|
+
### Files Reviewed
|
|
120
|
+
Every file that was created or modified by the implementation. Lines changed gives a sense of scope — large changes get more scrutiny.
|
|
121
|
+
|
|
122
|
+
### Summary
|
|
123
|
+
Quick overview. The three severity counts tell you instantly whether the review blocks closure. If `error` count is 0, the review passes.
|
|
124
|
+
|
|
125
|
+
### Findings
|
|
126
|
+
The core of the review. Each finding is specific and actionable:
|
|
127
|
+
- **Lines** — Exact location so the developer can jump to the code
|
|
128
|
+
- **Law** — Which engineering law is violated
|
|
129
|
+
- **Severity** — Whether this blocks closure
|
|
130
|
+
- **Description** — What is wrong in plain English
|
|
131
|
+
- **Code** — The actual problematic code (not a paraphrase)
|
|
132
|
+
- **Suggested Fix** — How to fix it (working code, not hand-waving)
|
|
133
|
+
- **Why** — Real-world consequence to motivate the fix
|
|
134
|
+
|
|
135
|
+
### Finding IDs
|
|
136
|
+
Findings are numbered sequentially (F-001, F-002, etc.) across the entire review, not per file. This makes them easy to reference in discussions and in the summary.
|
|
137
|
+
|
|
138
|
+
### Law Summary
|
|
139
|
+
Table showing which laws had findings and at what severity. Useful for spotting patterns — if DRY has 5 findings, there may be a systemic issue with code reuse.
|
|
140
|
+
|
|
141
|
+
### Overall Assessment
|
|
142
|
+
Human-readable summary. Not a repeat of the findings table — a narrative assessment of code quality. Mention positives as well as negatives.
|
|
143
|
+
|
|
144
|
+
### Resolution Required
|
|
145
|
+
If the review is blocked, this section lists exactly what must be fixed. When the developer fixes the issues, they re-run `/sdlc:review` and a new review is generated.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# Roadmap Template
|
|
2
|
+
|
|
3
|
+
This template defines the phase breakdown and milestone tracker stored at `.sdlc/ROADMAP.md`. It is created during `/sdlc:init` and updated as milestones and phases complete. The roadmap is the high-level plan; individual specs contain the low-level details.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# Roadmap: {{PROJECT_NAME}}
|
|
9
|
+
|
|
10
|
+
## Version Overview
|
|
11
|
+
|
|
12
|
+
| Version | Milestone | Status | Phases | Target |
|
|
13
|
+
|---------|-----------|--------|--------|--------|
|
|
14
|
+
| {{VERSION}} | {{MILESTONE_NAME}} | {{planned/active/complete}} | {{PHASE_COUNT}} | {{TARGET_DATE or "TBD"}} |
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Milestone {{MILESTONE_NUMBER}}: {{MILESTONE_NAME}}
|
|
19
|
+
|
|
20
|
+
**Goal:** {{ONE_SENTENCE_GOAL}}
|
|
21
|
+
**Status:** {{planned/active/complete}}
|
|
22
|
+
**Started:** {{DATE or "Not started"}}
|
|
23
|
+
**Completed:** {{DATE or "In progress"}}
|
|
24
|
+
|
|
25
|
+
### Phase {{PHASE_NUMBER}}: {{PHASE_NAME}}
|
|
26
|
+
|
|
27
|
+
**Description:** {{WHAT_THIS_PHASE_DELIVERS}}
|
|
28
|
+
**Status:** {{planned/active/complete}}
|
|
29
|
+
|
|
30
|
+
| Plan | Description | Status | Spec | Summary |
|
|
31
|
+
|------|-------------|--------|------|---------|
|
|
32
|
+
| {{PLAN_NUMBER}} | {{PLAN_DESCRIPTION}} | {{planned/spec/implement/verify/review/close/complete}} | {{SPEC_PATH or "—"}} | {{SUMMARY_PATH or "—"}} |
|
|
33
|
+
|
|
34
|
+
#### Phase Dependencies
|
|
35
|
+
|
|
36
|
+
- **Requires:** {{PREVIOUS_PHASE or "None"}}
|
|
37
|
+
- **Enables:** {{NEXT_PHASE or "None"}}
|
|
38
|
+
- **External:** {{EXTERNAL_DEPENDENCIES or "None"}}
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Progress Tracking
|
|
43
|
+
|
|
44
|
+
### Completed
|
|
45
|
+
|
|
46
|
+
| Milestone | Phase | Plan | Completed | Summary |
|
|
47
|
+
|-----------|-------|------|-----------|---------|
|
|
48
|
+
| {{MILESTONE}} | {{PHASE}} | {{PLAN}} | {{DATE}} | {{SUMMARY_PATH}} |
|
|
49
|
+
|
|
50
|
+
### In Progress
|
|
51
|
+
|
|
52
|
+
| Milestone | Phase | Plan | Started | Current Step |
|
|
53
|
+
|-----------|-------|------|---------|--------------|
|
|
54
|
+
| {{MILESTONE}} | {{PHASE}} | {{PLAN}} | {{DATE}} | {{LOOP_STEP}} |
|
|
55
|
+
|
|
56
|
+
### Upcoming
|
|
57
|
+
|
|
58
|
+
| Milestone | Phase | Plan | Blocked By |
|
|
59
|
+
|-----------|-------|------|------------|
|
|
60
|
+
| {{MILESTONE}} | {{PHASE}} | {{PLAN}} | {{DEPENDENCY or "Ready"}} |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Change Log
|
|
65
|
+
|
|
66
|
+
| Date | Change | Reason |
|
|
67
|
+
|------|--------|--------|
|
|
68
|
+
| {{DATE}} | {{WHAT_CHANGED}} | {{WHY}} |
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Field Documentation
|
|
74
|
+
|
|
75
|
+
### Version Overview
|
|
76
|
+
High-level view of all milestones. Each milestone represents a significant deliverable — something you could demo or release.
|
|
77
|
+
|
|
78
|
+
### Milestone Sections
|
|
79
|
+
Each milestone gets its own section with phases listed in execution order. Phases within a milestone are sequential — Phase 2 starts after Phase 1 completes. Plans within a phase may have their own dependency graph defined in the spec.
|
|
80
|
+
|
|
81
|
+
### Plan Status Values
|
|
82
|
+
Plans move through these statuses in order:
|
|
83
|
+
- **planned** — Not yet started
|
|
84
|
+
- **spec** — Specification is being written or reviewed
|
|
85
|
+
- **implement** — Code is being written
|
|
86
|
+
- **verify** — Acceptance criteria are being tested
|
|
87
|
+
- **review** — Engineering laws are being checked
|
|
88
|
+
- **close** — Loop is being closed, summary being written
|
|
89
|
+
- **complete** — Loop closed, summary written, done
|
|
90
|
+
|
|
91
|
+
### Phase Dependencies
|
|
92
|
+
Explicit dependency tracking prevents starting work that depends on incomplete prerequisites. "External" captures things outside the project's control (API access, design assets, stakeholder decisions).
|
|
93
|
+
|
|
94
|
+
### Progress Tracking
|
|
95
|
+
Three tables provide instant status:
|
|
96
|
+
- **Completed** — Done work with links to summaries for reference
|
|
97
|
+
- **In Progress** — Current work with loop position
|
|
98
|
+
- **Upcoming** — Future work with dependency information
|
|
99
|
+
|
|
100
|
+
### Change Log
|
|
101
|
+
Roadmaps change. When they do, record what changed and why. This prevents "I thought we were building X" confusion.
|
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Specification Template
|
|
2
|
+
|
|
3
|
+
This template defines the structure for individual specs stored at `.sdlc/milestones/M{{N}}/phases/P{{N}}/specs/SPEC-{{NNN}}.md`. Each spec represents one iteration of the SDLC loop. It is produced during `/sdlc:spec` and consumed by `/sdlc:implement`.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
---
|
|
9
|
+
phase: {{PHASE_NAME}}
|
|
10
|
+
plan: {{PLAN_NUMBER}}
|
|
11
|
+
type: {{feature/bugfix/refactor/test/docs}}
|
|
12
|
+
autonomous: {{true/false}}
|
|
13
|
+
task_graph:
|
|
14
|
+
parallel_groups:
|
|
15
|
+
- group: 1
|
|
16
|
+
tasks: [T-001, T-002]
|
|
17
|
+
- group: 2
|
|
18
|
+
tasks: [T-003]
|
|
19
|
+
depends_on: [1]
|
|
20
|
+
- group: 3
|
|
21
|
+
tasks: [T-004, T-005]
|
|
22
|
+
depends_on: [2]
|
|
23
|
+
dependencies:
|
|
24
|
+
T-003: [T-001, T-002]
|
|
25
|
+
T-004: [T-003]
|
|
26
|
+
T-005: [T-003]
|
|
27
|
+
files_modified:
|
|
28
|
+
- {{src/path/to/file.ts}}
|
|
29
|
+
- {{src/path/to/another-file.ts}}
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
# Spec: {{SPEC_TITLE}}
|
|
33
|
+
|
|
34
|
+
<objective>
|
|
35
|
+
|
|
36
|
+
## Goal
|
|
37
|
+
|
|
38
|
+
{{ONE_SENTENCE_GOAL}}
|
|
39
|
+
|
|
40
|
+
## Purpose
|
|
41
|
+
|
|
42
|
+
{{WHY_THIS_WORK_MATTERS — what problem does it solve, what value does it deliver}}
|
|
43
|
+
|
|
44
|
+
## Output
|
|
45
|
+
|
|
46
|
+
{{CONCRETE_DELIVERABLE — what exists after this spec is implemented that did not exist before}}
|
|
47
|
+
|
|
48
|
+
</objective>
|
|
49
|
+
|
|
50
|
+
<context>
|
|
51
|
+
|
|
52
|
+
## Relevant Files
|
|
53
|
+
|
|
54
|
+
- @{{src/path/to/existing-file.ts}} — {{WHY_THIS_FILE_IS_RELEVANT}}
|
|
55
|
+
- @{{src/path/to/related-file.ts}} — {{HOW_IT_CONNECTS_TO_THIS_SPEC}}
|
|
56
|
+
- @{{.sdlc/PROJECT.md}} — Project context and constraints
|
|
57
|
+
- @{{.sdlc/LAWS.md}} — Engineering laws to follow
|
|
58
|
+
|
|
59
|
+
## Background
|
|
60
|
+
|
|
61
|
+
{{ADDITIONAL_CONTEXT — prior decisions, related specs, domain knowledge needed to understand this work}}
|
|
62
|
+
|
|
63
|
+
</context>
|
|
64
|
+
|
|
65
|
+
<clarifications>
|
|
66
|
+
|
|
67
|
+
## Questions and Answers
|
|
68
|
+
|
|
69
|
+
These clarifications were gathered during the spec phase. They form the audit trail of decisions made before implementation began.
|
|
70
|
+
|
|
71
|
+
| # | Question | Answer | Date |
|
|
72
|
+
|---|----------|--------|------|
|
|
73
|
+
| Q-001 | {{QUESTION_ASKED}} | {{ANSWER_RECEIVED}} | {{DATE}} |
|
|
74
|
+
| Q-002 | {{QUESTION_ASKED}} | {{ANSWER_RECEIVED}} | {{DATE}} |
|
|
75
|
+
|
|
76
|
+
## Recommendations Given
|
|
77
|
+
|
|
78
|
+
| # | Topic | Options Presented | Recommendation | Decision |
|
|
79
|
+
|---|-------|-------------------|----------------|----------|
|
|
80
|
+
| R-001 | {{TOPIC}} | {{A, B, C}} | {{RECOMMENDED_OPTION_AND_WHY}} | {{CHOSEN_OPTION}} |
|
|
81
|
+
|
|
82
|
+
</clarifications>
|
|
83
|
+
|
|
84
|
+
<acceptance_criteria>
|
|
85
|
+
|
|
86
|
+
## Acceptance Criteria
|
|
87
|
+
|
|
88
|
+
Each criterion uses BDD format. These are the contract between the spec and the verification phase. If all criteria pass, the implementation is correct.
|
|
89
|
+
|
|
90
|
+
### AC-1: {{CRITERION_NAME}}
|
|
91
|
+
|
|
92
|
+
**Given** {{PRECONDITION — system state before the action}}
|
|
93
|
+
**When** {{ACTION — what the user or system does}}
|
|
94
|
+
**Then** {{OUTCOME — observable result that proves it works}}
|
|
95
|
+
|
|
96
|
+
### AC-2: {{CRITERION_NAME}}
|
|
97
|
+
|
|
98
|
+
**Given** {{PRECONDITION}}
|
|
99
|
+
**When** {{ACTION}}
|
|
100
|
+
**Then** {{OUTCOME}}
|
|
101
|
+
|
|
102
|
+
### AC-3: {{CRITERION_NAME}}
|
|
103
|
+
|
|
104
|
+
**Given** {{PRECONDITION}}
|
|
105
|
+
**When** {{ACTION}}
|
|
106
|
+
**Then** {{OUTCOME}}
|
|
107
|
+
|
|
108
|
+
</acceptance_criteria>
|
|
109
|
+
|
|
110
|
+
<tasks>
|
|
111
|
+
|
|
112
|
+
## Task List
|
|
113
|
+
|
|
114
|
+
Each task is a discrete unit of work. Tasks are assigned to sub-agents during implementation. A task should be completable independently (given its dependencies are met).
|
|
115
|
+
|
|
116
|
+
### T-001: {{TASK_NAME}}
|
|
117
|
+
|
|
118
|
+
- **Files:** {{src/path/to/file.ts}}
|
|
119
|
+
- **Action:** {{WHAT_TO_DO — specific, concrete, unambiguous}}
|
|
120
|
+
- **Verify:** {{HOW_TO_CONFIRM_THIS_TASK_IS_DONE}}
|
|
121
|
+
- **Done:** [ ]
|
|
122
|
+
- **Dependencies:** none
|
|
123
|
+
|
|
124
|
+
### T-002: {{TASK_NAME}}
|
|
125
|
+
|
|
126
|
+
- **Files:** {{src/path/to/file.ts}}, {{src/path/to/other-file.ts}}
|
|
127
|
+
- **Action:** {{WHAT_TO_DO}}
|
|
128
|
+
- **Verify:** {{HOW_TO_CONFIRM}}
|
|
129
|
+
- **Done:** [ ]
|
|
130
|
+
- **Dependencies:** none
|
|
131
|
+
|
|
132
|
+
### T-003: {{TASK_NAME}}
|
|
133
|
+
|
|
134
|
+
- **Files:** {{src/path/to/file.ts}}
|
|
135
|
+
- **Action:** {{WHAT_TO_DO}}
|
|
136
|
+
- **Verify:** {{HOW_TO_CONFIRM}}
|
|
137
|
+
- **Done:** [ ]
|
|
138
|
+
- **Dependencies:** T-001, T-002
|
|
139
|
+
|
|
140
|
+
### T-004: {{TASK_NAME}}
|
|
141
|
+
|
|
142
|
+
- **Files:** {{src/path/to/file.ts}}
|
|
143
|
+
- **Action:** {{WHAT_TO_DO}}
|
|
144
|
+
- **Verify:** {{HOW_TO_CONFIRM}}
|
|
145
|
+
- **Done:** [ ]
|
|
146
|
+
- **Dependencies:** T-003
|
|
147
|
+
|
|
148
|
+
### T-005: {{TASK_NAME}}
|
|
149
|
+
|
|
150
|
+
- **Files:** {{tests/path/to/test-file.test.ts}}
|
|
151
|
+
- **Action:** {{WHAT_TO_DO}}
|
|
152
|
+
- **Verify:** {{HOW_TO_CONFIRM}}
|
|
153
|
+
- **Done:** [ ]
|
|
154
|
+
- **Dependencies:** T-003
|
|
155
|
+
|
|
156
|
+
</tasks>
|
|
157
|
+
|
|
158
|
+
<task_dependency_graph>
|
|
159
|
+
|
|
160
|
+
## Task Dependency Graph
|
|
161
|
+
|
|
162
|
+
```
|
|
163
|
+
Group 1 (parallel): T-001 ─┐
|
|
164
|
+
T-002 ─┤
|
|
165
|
+
│
|
|
166
|
+
Group 2 (sequential): T-003 ◀┘
|
|
167
|
+
│
|
|
168
|
+
Group 3 (parallel): T-004 ◀┤
|
|
169
|
+
T-005 ◀┘
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
**Execution order:**
|
|
173
|
+
1. T-001 and T-002 run in parallel (no dependencies)
|
|
174
|
+
2. T-003 runs after both T-001 and T-002 complete
|
|
175
|
+
3. T-004 and T-005 run in parallel after T-003 completes
|
|
176
|
+
|
|
177
|
+
</task_dependency_graph>
|
|
178
|
+
|
|
179
|
+
<boundaries>
|
|
180
|
+
|
|
181
|
+
## DO NOT CHANGE
|
|
182
|
+
|
|
183
|
+
These files and behaviors are explicitly out of scope. Do not modify them, do not refactor them, do not "improve" them. They are boundaries.
|
|
184
|
+
|
|
185
|
+
- **{{src/path/to/untouchable-file.ts}}** — {{REASON_IT_IS_OFF_LIMITS}}
|
|
186
|
+
- **{{DATABASE_SCHEMA}}** — {{REASON}}
|
|
187
|
+
- **{{BEHAVIOR}}** — {{REASON}}
|
|
188
|
+
|
|
189
|
+
If a task seems to require changing something listed here, STOP and escalate. Do not proceed.
|
|
190
|
+
|
|
191
|
+
</boundaries>
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
---
|
|
195
|
+
|
|
196
|
+
## Field Documentation
|
|
197
|
+
|
|
198
|
+
### YAML Frontmatter
|
|
199
|
+
|
|
200
|
+
**phase** — Which phase this spec belongs to. Must match a phase in ROADMAP.md.
|
|
201
|
+
|
|
202
|
+
**plan** — Sequential plan number within the phase. Used for ordering and state tracking.
|
|
203
|
+
|
|
204
|
+
**type** — Classification of the work:
|
|
205
|
+
- `feature` — New functionality that did not exist before
|
|
206
|
+
- `bugfix` — Fixing incorrect behavior in existing code
|
|
207
|
+
- `refactor` — Restructuring code without changing behavior
|
|
208
|
+
- `test` — Adding or improving tests without changing production code
|
|
209
|
+
- `docs` — Documentation changes only
|
|
210
|
+
|
|
211
|
+
**autonomous** — Whether `/sdlc:implement` can complete this spec without human intervention. Set to `false` if the spec requires human decisions during implementation.
|
|
212
|
+
|
|
213
|
+
**task_graph** — Defines which tasks can run in parallel and which must wait for others. This drives sub-agent spawning in the implementation phase. Each `parallel_group` runs its tasks simultaneously. Groups with `depends_on` wait for the specified groups to complete first.
|
|
214
|
+
|
|
215
|
+
**files_modified** — Complete list of files this spec will create or modify. Used for conflict detection when multiple specs might touch the same files.
|
|
216
|
+
|
|
217
|
+
### Sections
|
|
218
|
+
|
|
219
|
+
**objective** — The "elevator pitch" for this spec. Should be understandable by a non-developer. Goal is one sentence. Purpose explains why. Output describes the concrete deliverable.
|
|
220
|
+
|
|
221
|
+
**context** — Everything a developer needs to understand before implementing. File references use `@` prefix to enable IDE/tool integration. Background fills in domain knowledge that is not obvious from the code.
|
|
222
|
+
|
|
223
|
+
**clarifications** — Audit trail of the clarification-first approach. Every question asked and every recommendation given during spec creation is recorded here. This prevents the same questions from being re-asked if the spec is revisited.
|
|
224
|
+
|
|
225
|
+
**acceptance_criteria** — The contract. BDD format (Given/When/Then) makes criteria testable and unambiguous. Each criterion gets a unique ID (AC-1, AC-2, etc.) for reference in verification results.
|
|
226
|
+
|
|
227
|
+
**tasks** — Atomic units of work. Each task specifies exactly which files to touch, what to do, and how to verify the task is complete. Tasks are the unit of sub-agent assignment.
|
|
228
|
+
|
|
229
|
+
**task_dependency_graph** — Visual representation of the task execution order. Makes it immediately clear which tasks can run in parallel and which must wait.
|
|
230
|
+
|
|
231
|
+
**boundaries** — Explicit "do not touch" list. Prevents well-intentioned but out-of-scope changes. Anything not listed here is implicitly in scope if a task requires it.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# State Tracking Template
|
|
2
|
+
|
|
3
|
+
This template defines the loop position tracker stored at `.sdlc/STATE.md`. It is the single source of truth for where the project is in the SDLC loop. Every command reads it. Every phase transition updates it. If this file is missing or corrupted, the loop cannot continue.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
```markdown
|
|
8
|
+
# SDLC State
|
|
9
|
+
|
|
10
|
+
## Project Reference
|
|
11
|
+
|
|
12
|
+
- **Project:** {{PROJECT_NAME}}
|
|
13
|
+
- **Project file:** .sdlc/PROJECT.md
|
|
14
|
+
- **Laws file:** .sdlc/LAWS.md
|
|
15
|
+
- **Roadmap file:** .sdlc/ROADMAP.md
|
|
16
|
+
|
|
17
|
+
## Current Position
|
|
18
|
+
|
|
19
|
+
- **Milestone:** {{MILESTONE_NAME}} ({{MILESTONE_NUMBER}}/{{TOTAL_MILESTONES}})
|
|
20
|
+
- **Phase:** {{PHASE_NAME}} (e.g., "Phase 1: Core Authentication")
|
|
21
|
+
- **Plan:** {{PLAN_NUMBER}}/{{TOTAL_PLANS}} — {{PLAN_DESCRIPTION}}
|
|
22
|
+
- **Status:** {{spec/implement/verify/review/close/blocked}}
|
|
23
|
+
|
|
24
|
+
## Loop Position
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
SPEC ──▶ IMPL ──▶ VERIFY ──▶ REVIEW ──▶ CLOSE
|
|
28
|
+
{{S}} {{I}} {{V}} {{R}} {{C}}
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Legend: [x] = completed this loop | [ ] = not yet reached | [>] = currently here
|
|
32
|
+
|
|
33
|
+
Example (currently implementing):
|
|
34
|
+
```
|
|
35
|
+
SPEC ──▶ IMPL ──▶ VERIFY ──▶ REVIEW ──▶ CLOSE
|
|
36
|
+
[x] [>] [ ] [ ] [ ]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Next Required Action
|
|
40
|
+
|
|
41
|
+
> **CRITICAL: This field must ALWAYS be populated. An empty next action means the loop is broken.**
|
|
42
|
+
|
|
43
|
+
**Action:** {{NEXT_ACTION}}
|
|
44
|
+
**Command:** `{{SDLC_COMMAND}}`
|
|
45
|
+
**Details:** {{WHAT_TO_DO_AND_WHY}}
|
|
46
|
+
|
|
47
|
+
## Accumulated Context
|
|
48
|
+
|
|
49
|
+
### Decisions Made
|
|
50
|
+
|
|
51
|
+
| # | Decision | Rationale | Date | Phase |
|
|
52
|
+
|---|----------|-----------|------|-------|
|
|
53
|
+
| D-001 | {{DECISION}} | {{WHY}} | {{DATE}} | {{PHASE}} |
|
|
54
|
+
|
|
55
|
+
### Deferred Issues
|
|
56
|
+
|
|
57
|
+
| # | Issue | Reason Deferred | Revisit At |
|
|
58
|
+
|---|-------|-----------------|------------|
|
|
59
|
+
| DF-001 | {{ISSUE}} | {{WHY_NOT_NOW}} | {{MILESTONE_OR_PHASE}} |
|
|
60
|
+
|
|
61
|
+
### Blockers
|
|
62
|
+
|
|
63
|
+
| # | Blocker | Owner | Status | Since |
|
|
64
|
+
|---|---------|-------|--------|-------|
|
|
65
|
+
| B-001 | {{BLOCKER}} | {{WHO_CAN_RESOLVE}} | {{active/resolved}} | {{DATE}} |
|
|
66
|
+
|
|
67
|
+
## Session Continuity
|
|
68
|
+
|
|
69
|
+
- **Last session:** {{DATE_AND_TIME}}
|
|
70
|
+
- **Stopped at:** {{WHAT_WAS_HAPPENING}}
|
|
71
|
+
- **Next action:** {{SAME_AS_NEXT_REQUIRED_ACTION}}
|
|
72
|
+
- **Resume file:** {{PATH_TO_HANDOFF_MD or "None"}}
|
|
73
|
+
- **Handoff notes:** {{BRIEF_CONTEXT_FOR_NEXT_SESSION}}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Field Documentation
|
|
79
|
+
|
|
80
|
+
### Current Position
|
|
81
|
+
The exact coordinates of where the project is. Think of it as GPS for the development loop:
|
|
82
|
+
- **Milestone** — The big goal (e.g., "MVP", "v1.0 Release")
|
|
83
|
+
- **Phase** — A group of related work within a milestone
|
|
84
|
+
- **Plan** — A single unit of work within a phase (one loop iteration)
|
|
85
|
+
- **Status** — Which step of the loop this plan is in
|
|
86
|
+
|
|
87
|
+
### Loop Position
|
|
88
|
+
Visual indicator using checkmarks. There are exactly 5 states:
|
|
89
|
+
- `[ ]` — Not reached yet
|
|
90
|
+
- `[>]` — Currently here (only one at a time)
|
|
91
|
+
- `[x]` — Completed for this loop iteration
|
|
92
|
+
|
|
93
|
+
When a loop closes (CLOSE is `[x]`), all positions reset to `[ ]` for the next plan.
|
|
94
|
+
|
|
95
|
+
### Next Required Action
|
|
96
|
+
This is the most important field in the entire SDLC. It tells the developer (or the AI) exactly what to do next. Rules:
|
|
97
|
+
- Must be a concrete, executable action ("Run /sdlc:implement", "Ask user about auth strategy")
|
|
98
|
+
- Must include the command to run
|
|
99
|
+
- Must never be empty, vague, or aspirational
|
|
100
|
+
- If blocked, the action is "Resolve blocker B-XXX"
|
|
101
|
+
|
|
102
|
+
### Accumulated Context
|
|
103
|
+
Decisions, deferred issues, and blockers survive across loop iterations. They are the project's institutional memory. Without them, the same questions get asked repeatedly and the same mistakes get made.
|
|
104
|
+
|
|
105
|
+
### Session Continuity
|
|
106
|
+
When a developer stops working (end of day, context switch), this section captures exactly where to resume. The handoff file (HANDOFF.md) contains detailed notes; this section contains the summary.
|