spec-starter 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.
@@ -0,0 +1,70 @@
1
+ # <feature_title> — Blueprint
2
+
3
+ **Brief:** `.claude/_features/<feature_slug>/2-brief.md`
4
+ **Date:** <YYYY-MM-DD>
5
+
6
+ **Goal:** <One sentence — what this builds>
7
+
8
+ **Architecture:** <2-3 sentences on approach: layers, data flow, key abstractions>
9
+
10
+ **Tech Stack:** <Key technologies, libraries, frameworks>
11
+
12
+ ---
13
+
14
+ ## Prerequisites
15
+
16
+ - [ ] <Branch setup, env vars, or config needed before starting>
17
+ - [ ] <Dependencies to install>
18
+
19
+ ---
20
+
21
+ ## Task 1: <Component or Layer Name>
22
+
23
+ **What:** <One sentence — what this task delivers>
24
+
25
+ **Files:**
26
+ - `<exact/path/to/file>`
27
+ - `<exact/path/to/test>`
28
+
29
+ **Steps:**
30
+ 1. Write failing test
31
+ 2. Run test — confirm FAIL
32
+ 3. Write minimal implementation
33
+ 4. Run test — confirm PASS
34
+ 5. Commit: `<commit message>`
35
+
36
+ ---
37
+
38
+ ## Task 2: <Next Component>
39
+
40
+ **What:** <One sentence>
41
+
42
+ **Files:**
43
+ - `<path>`
44
+
45
+ **Steps:**
46
+ 1. Write failing test
47
+ 2. Run test — confirm FAIL
48
+ 3. Write minimal implementation
49
+ 4. Run test — confirm PASS
50
+ 5. Commit: `<commit message>`
51
+
52
+ ---
53
+
54
+ ## Final: Integration
55
+
56
+ **Test:** `<full test suite command>`
57
+
58
+ **Commit:** `<final commit message>`
59
+
60
+ ---
61
+
62
+ ## Key Decisions
63
+
64
+ | Decision | Choice | Reason |
65
+ |---|---|---|
66
+ | <trade-off> | <chosen approach> | <why> |
67
+
68
+ ## Out of Scope
69
+
70
+ - <What was explicitly not planned here>
@@ -0,0 +1,55 @@
1
+ # <feature_title> — Brief
2
+
3
+ ## Overview
4
+
5
+ <What is this feature and why does it matter? 2-3 sentences, no technical details.>
6
+
7
+ ## Goals
8
+
9
+ - <What outcome are we trying to achieve?>
10
+ - <What user problem does this solve?>
11
+
12
+ ## Requirements
13
+
14
+ ### Must Have
15
+
16
+ - <Core requirement 1>
17
+ - <Core requirement 2>
18
+
19
+ ### Nice to Have
20
+
21
+ - <Optional requirement 1>
22
+
23
+ ## User Experience
24
+
25
+ <Describe what the user sees, does, and gets — from their perspective only. No implementation details.>
26
+
27
+ ## Edge Cases
28
+
29
+ - <What happens when X is missing?>
30
+ - <What happens when Y fails?>
31
+
32
+ ## Out of Scope
33
+
34
+ - <Explicitly not included>
35
+
36
+ ## Success Criteria
37
+
38
+ - <How do we know this is done? Verifiable, user-facing outcomes.>
39
+ - <Criterion 2>
40
+
41
+ ---
42
+
43
+ ## Questions from Claude
44
+
45
+ _Claude needs answers to these to finalize the brief. Set feature to `[?] Brief` when answered._
46
+
47
+ - <Question 1>
48
+ - Answer:
49
+
50
+ ## Questions from User
51
+
52
+ _User questions for Claude to research and answer._
53
+
54
+ - <Question 1>
55
+ - Answer:
@@ -0,0 +1,32 @@
1
+ # <feature_title> — E2E Checklist
2
+
3
+ Generated after implementation. Work through each scenario manually.
4
+
5
+ ---
6
+
7
+ ## Happy Path
8
+
9
+ - [ ] <Scenario 1: exact steps to follow, expected outcome>
10
+ - [ ] <Scenario 2>
11
+
12
+ ## Edge Cases
13
+
14
+ - [ ] <Edge case 1: what to do, what should happen>
15
+ - [ ] <Edge case 2>
16
+
17
+ ## Error States
18
+
19
+ - [ ] <Error scenario: how to trigger, what the user should see>
20
+
21
+ ## Integration Points
22
+
23
+ - [ ] <Cross-feature or external dependency check>
24
+
25
+ ---
26
+
27
+ ## Sign-off
28
+
29
+ - [ ] All scenarios above pass
30
+ - [ ] No regressions in adjacent features
31
+
32
+ Update `1-feature.md`: change `- [o] Review` to `- [x] Review` when complete.
@@ -0,0 +1,25 @@
1
+ # <feature_title>
2
+
3
+ **Slug:** `<MM.DD-feature_slug>`
4
+ **Branch:** `<branch_name>`
5
+ **Last Tested:** —
6
+
7
+ ## Progress
8
+
9
+ - [ ] Brief
10
+ - [ ] Blueprint
11
+ - [ ] Implement
12
+ - [ ] Review
13
+ - [ ] Done
14
+
15
+ > `[ ]` not started · `[?]` needs attention · `[o]` in progress · `[x]` complete · `[!]` blocked
16
+
17
+ ## Description
18
+
19
+ <A 2-3 sentence summary of what this feature does and why it's needed>
20
+
21
+ ## Key Points
22
+
23
+ - <Key point 1>
24
+ - <Key point 2>
25
+ - <Key point 3>
@@ -0,0 +1,117 @@
1
+ ---
2
+ description: Generate a technical blueprint from a completed brief
3
+ argument-hint: "<MM.DD-slug>"
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
+ model: claude-opus-4-6
6
+ ---
7
+
8
+ Generate `3-blueprint.md` — a detailed technical implementation plan — from a completed `2-brief.md`. Write the file and stop. Do not implement anything.
9
+
10
+ **Arguments:** $ARGUMENTS
11
+
12
+ ## Progress Checkbox Format
13
+
14
+ - `[ ]` not started · `[?]` needs attention · `[o]` in progress · `[x]` complete · `[!]` blocked
15
+
16
+ A feature is **ready for blueprint** when: `- [x] Brief`
17
+
18
+ ---
19
+
20
+ ## Mode Detection
21
+
22
+ - If empty or blank → **BROWSE MODE**
23
+ - Otherwise → **GENERATE MODE**
24
+
25
+ ---
26
+
27
+ ## BROWSE MODE
28
+
29
+ ### Step 1: Find ready features
30
+
31
+ Glob all `.claude/_features/*/1-feature.md`. Collect features where Progress shows `- [x] Brief` and `- [ ] Blueprint`.
32
+
33
+ If none:
34
+
35
+ ```
36
+ No features are ready for blueprint.
37
+
38
+ Features need Brief complete before blueprinting.
39
+ Run /feature:review <slug> to complete a brief.
40
+ ```
41
+
42
+ Then stop.
43
+
44
+ ### Step 2: Display numbered list
45
+
46
+ ```
47
+ Features ready for blueprint:
48
+
49
+ 1. <feature-title> (<MM.DD-slug>)
50
+ 2. <feature-title> (<MM.DD-slug>)
51
+
52
+ Run /feature:blueprint <MM.DD-slug> to generate a blueprint.
53
+ ```
54
+
55
+ Then stop.
56
+
57
+ ---
58
+
59
+ ## GENERATE MODE
60
+
61
+ ### Step 1: Read feature and brief
62
+
63
+ Read `.claude/_features/$ARGUMENTS/1-feature.md` and `.claude/_features/$ARGUMENTS/2-brief.md`.
64
+
65
+ If folder or brief doesn't exist, tell the user and stop.
66
+
67
+ **Progress check:**
68
+ - `[x] Brief` + `[ ] Blueprint` — proceed
69
+ - `[?] Brief` — warn: _"Brief still needs review. Run /feature:review $ARGUMENTS first."_ Stop.
70
+ - `[o] Brief` — warn: _"Brief still in progress."_ Stop.
71
+ - `[ ] Brief` — warn: _"Brief not started."_ Stop.
72
+ - `[x] Blueprint` — warn: _"Blueprint already exists. Re-running will overwrite 3-blueprint.md."_ Continue.
73
+
74
+ ### Step 2: Update Blueprint to `[o]`
75
+
76
+ In `1-feature.md`, change `- [ ] Blueprint` to `- [o] Blueprint`.
77
+
78
+ **State update:** Always do this before starting work.
79
+
80
+ ### Step 3: Explore the codebase
81
+
82
+ Before writing the blueprint, understand the existing codebase:
83
+ 1. Root structure and folder layout
84
+ 2. Existing patterns similar to this feature
85
+ 3. Entry points this feature hooks into
86
+ 4. Available dependencies (package.json, etc.)
87
+ 5. Test setup — read one existing test file for framework/conventions
88
+
89
+ Take notes on exact file paths — the blueprint must reference them precisely.
90
+
91
+ ### Step 4: Write blueprint.md
92
+
93
+ Write `.claude/_features/$ARGUMENTS/3-blueprint.md` using `.claude/_templates/blueprint.md` as structure.
94
+
95
+ The blueprint must be:
96
+ - **Precise** — exact file paths, not "create a file for X"
97
+ - **Complete** — every task includes failing test, implementation, and commit
98
+ - **Ordered** — tasks build on each other sequentially
99
+ - **TDD throughout** — Red → Green → Commit for every functional task
100
+ - **Codebase-aware** — match existing naming, import styles, test patterns
101
+ - **Self-contained** — a fresh Claude session with only this file should be able to implement the feature
102
+
103
+ ### Step 5: Update Blueprint to `[x]`
104
+
105
+ In `1-feature.md`, change `- [o] Blueprint` to `- [x] Blueprint`.
106
+
107
+ **State update:** Do this immediately after blueprint.md is written.
108
+
109
+ Output:
110
+
111
+ ```
112
+ Blueprint written: .claude/_features/$ARGUMENTS/3-blueprint.md
113
+
114
+ Progress: [x] Brief [x] Blueprint [ ] Implement [ ] Review [ ] Done
115
+ ```
116
+
117
+ **STOP. Do not implement the feature. Do not suggest next steps. Do not take any further action.**
@@ -0,0 +1,177 @@
1
+ ---
2
+ description: Finish a reviewed feature — create PR into dev, optionally merge, mark Done
3
+ argument-hint: "<MM.DD-slug>"
4
+ allowed-tools: Read, Edit, Glob, Bash
5
+ ---
6
+
7
+ Finish a feature that has been manually reviewed. Creates a PR into `dev`, asks whether to merge, and marks the feature complete.
8
+
9
+ **Arguments:** $ARGUMENTS
10
+
11
+ ## Progress Checkbox Format
12
+
13
+ - `[ ]` not started · `[?]` needs attention · `[o]` in progress · `[x]` complete · `[!]` blocked
14
+
15
+ A feature is **ready to finish** when: `- [o] Review`
16
+
17
+ ---
18
+
19
+ ## Mode Detection
20
+
21
+ - If empty or blank → **BROWSE MODE**
22
+ - Otherwise → **FINISH MODE**
23
+
24
+ ---
25
+
26
+ ## BROWSE MODE
27
+
28
+ ### Step 1: Find features in review
29
+
30
+ Glob all `.claude/_features/*/1-feature.md`. Collect features where Progress shows `- [o] Review`.
31
+
32
+ If none:
33
+ ```
34
+ No features are in review.
35
+
36
+ Features must be implemented before finishing.
37
+ Run /feature:implement <slug> to implement one, or /feature:status to see all features.
38
+ ```
39
+ Then stop.
40
+
41
+ ### Step 2: Display numbered list
42
+
43
+ ```
44
+ Features ready to finish:
45
+
46
+ 1. <feature-title> (<MM.DD-slug>)
47
+ 2. <feature-title> (<MM.DD-slug>)
48
+
49
+ Run /feature:finish <MM.DD-slug> to create a PR and mark complete.
50
+ ```
51
+
52
+ Then stop.
53
+
54
+ ---
55
+
56
+ ## FINISH MODE
57
+
58
+ ### Step 1: Read feature
59
+
60
+ Read `.claude/_features/$ARGUMENTS/1-feature.md`.
61
+
62
+ If the folder doesn't exist:
63
+ ```
64
+ No feature found: $ARGUMENTS
65
+ ```
66
+ Then stop.
67
+
68
+ Extract:
69
+ - `branch_name` from the `**Branch:**` line
70
+ - `feature_title` from the `#` heading
71
+
72
+ **Progress check:**
73
+ - `[o] Review` — proceed
74
+ - `[ ] Review` or `[ ] Implement` — warn: _"Feature hasn't been implemented yet. Run /feature:implement $ARGUMENTS first."_ Stop.
75
+ - `[x] Done` — warn: _"Feature is already marked Done."_ Stop.
76
+ - `[x] Review` — warn: _"Review already marked complete but feature isn't Done. Continuing."_ Continue.
77
+
78
+ ### Step 2: Push the branch
79
+
80
+ Push the feature branch to remote:
81
+
82
+ ```bash
83
+ git push -u origin <branch_name>
84
+ ```
85
+
86
+ If the push fails (e.g. no remote configured), warn the user and stop.
87
+
88
+ ### Step 3: Create the PR
89
+
90
+ Create a PR from `<branch_name>` into `dev` using the `gh` CLI:
91
+
92
+ ```bash
93
+ gh pr create --base dev --head <branch_name> --title "<feature_title>" --body "$(cat <<'EOF'
94
+ ## Summary
95
+
96
+ Implements: <feature_title>
97
+
98
+ Feature folder: `.claude/_features/$ARGUMENTS/`
99
+
100
+ ## Review checklist
101
+
102
+ See `.claude/_features/$ARGUMENTS/4-e2e-checklist.md` for manual testing scenarios.
103
+ EOF
104
+ )"
105
+ ```
106
+
107
+ If a PR already exists for this branch, retrieve its URL instead:
108
+
109
+ ```bash
110
+ gh pr view <branch_name> --json url --jq '.url'
111
+ ```
112
+
113
+ Output the PR URL to the user.
114
+
115
+ ### Step 4: Ask whether to merge
116
+
117
+ Ask the user:
118
+ ```
119
+ PR created: <pr-url>
120
+
121
+ Merge this PR into dev now? (yes/no)
122
+ ```
123
+
124
+ Wait for the user's response.
125
+
126
+ ### Step 5a: Merge if yes
127
+
128
+ If the user says yes (or y):
129
+
130
+ ```bash
131
+ gh pr merge <branch_name> --squash --delete-branch
132
+ ```
133
+
134
+ Then switch to `dev` and fetch:
135
+
136
+ ```bash
137
+ git checkout dev
138
+ git fetch origin
139
+ git pull origin dev
140
+ ```
141
+
142
+ Output:
143
+ ```
144
+ Merged and branch deleted. Switched to dev and pulled latest.
145
+ ```
146
+
147
+ Then continue to Step 6.
148
+
149
+ ### Step 5b: Skip merge if no
150
+
151
+ If the user says no:
152
+
153
+ Output:
154
+ ```
155
+ PR left open. Merge manually when ready.
156
+ ```
157
+
158
+ Then continue to Step 6.
159
+
160
+ ### Step 6: Mark feature complete
161
+
162
+ In `.claude/_features/$ARGUMENTS/1-feature.md`:
163
+ - Change `- [o] Review` to `- [x] Review` (if not already `[x]`)
164
+ - Change `- [ ] Done` to `- [x] Done`
165
+
166
+ **State update:** Always update 1-feature.md regardless of whether the PR was merged.
167
+
168
+ ### Step 7: Output summary
169
+
170
+ ```
171
+ Feature complete: <feature_title>
172
+
173
+ Progress: [x] Brief [x] Blueprint [x] Implement [x] Review [x] Done
174
+
175
+ PR: <pr-url>
176
+ Branch: <merged/open>
177
+ ```
@@ -0,0 +1,166 @@
1
+ ---
2
+ description: Implement a feature from its blueprint, then generate e2e-checklist.md
3
+ argument-hint: "<MM.DD-slug>"
4
+ allowed-tools: Read, Write, Edit, Glob, Grep, Bash
5
+ ---
6
+
7
+ Implement a feature task-by-task using the blueprint, then generate the e2e checklist.
8
+
9
+ **Arguments:** $ARGUMENTS
10
+
11
+ ## Progress Checkbox Format
12
+
13
+ - `[ ]` not started · `[?]` needs attention · `[o]` in progress · `[x]` complete · `[!]` blocked
14
+
15
+ A feature is **ready to implement** when: `- [x] Blueprint`
16
+
17
+ ---
18
+
19
+ ## Mode Detection
20
+
21
+ - If empty or blank → **BROWSE MODE**
22
+ - Otherwise → **IMPLEMENT MODE**
23
+
24
+ ---
25
+
26
+ ## BROWSE MODE
27
+
28
+ ### Step 1: Find ready features
29
+
30
+ Glob all `.claude/_features/*/1-feature.md`. Collect features where Progress shows `- [x] Blueprint` and `- [ ] Implement`.
31
+
32
+ If none:
33
+
34
+ ```
35
+ No features are ready to implement.
36
+
37
+ Features need Blueprint complete before implementing.
38
+ Run /feature:blueprint <slug> to generate a blueprint first.
39
+ ```
40
+
41
+ Then stop.
42
+
43
+ ### Step 2: Display numbered list
44
+
45
+ ```
46
+ Features ready to implement:
47
+
48
+ 1. <feature-title> (<MM.DD-slug>)
49
+ 2. <feature-title> (<MM.DD-slug>)
50
+
51
+ Run /feature:implement <MM.DD-slug> to implement one.
52
+ ```
53
+
54
+ Then stop.
55
+
56
+ ---
57
+
58
+ ## IMPLEMENT MODE
59
+
60
+ ### Step 1: Read feature and blueprint
61
+
62
+ Read `.claude/_features/$ARGUMENTS/1-feature.md` and `.claude/_features/$ARGUMENTS/3-blueprint.md`.
63
+
64
+ If folder or blueprint doesn't exist, inform the user and stop.
65
+
66
+ **Progress check:**
67
+ - `[x] Blueprint` + `[ ] Implement` — proceed
68
+ - `[?] Blueprint` — warn: _"Blueprint needs review. Run /feature:review $ARGUMENTS first."_ Stop.
69
+ - `[ ] Blueprint` or `[o] Blueprint` — warn: _"No complete blueprint. Run /feature:blueprint $ARGUMENTS first."_ Stop.
70
+ - `[o] Implement` — warn: _"Already implementing. Resuming from current progress."_ Continue.
71
+ - `[x] Implement` — warn: _"Already implemented. Proceeding will regenerate the e2e checklist."_ Continue.
72
+ - `[!] <stage>` — warn: _"Feature is blocked at <stage>."_ Stop.
73
+
74
+ ### Step 2: Update Implement to `[o]`
75
+
76
+ In `1-feature.md`, change `- [ ] Implement` to `- [o] Implement`.
77
+
78
+ **State update:** Do this before starting any implementation work.
79
+
80
+ ### Step 3: Create the feature branch
81
+
82
+ Check if this is a git repo:
83
+
84
+ ```bash
85
+ git status
86
+ ```
87
+
88
+ If it is, create the branch from `1-feature.md`'s `**Branch:**` value:
89
+
90
+ ```bash
91
+ git checkout -b <branch_name>
92
+ ```
93
+
94
+ If the branch already exists: `git checkout <branch_name>`.
95
+ If not a git repo, skip and note it.
96
+
97
+ ### Step 4: Implement the blueprint
98
+
99
+ Read each task in `3-blueprint.md` in order. For each task:
100
+
101
+ 1. Dispatch a fresh subagent (via the Task tool) to implement that task
102
+ 2. The subagent must follow strict TDD: write the failing test first, confirm it fails, write minimal implementation, confirm it passes, then commit
103
+ 3. Review the subagent's output before moving to the next task — if it failed or skipped TDD, do not proceed
104
+ 4. Do not batch multiple tasks into one subagent
105
+
106
+ ### Step 5: Update Implement to `[x]`
107
+
108
+ Once all tasks are complete:
109
+ - Change `- [o] Implement` to `- [x] Implement` in `1-feature.md`
110
+ - Change `- [ ] Review` to `- [o] Review` in `1-feature.md`
111
+
112
+ **State update:** Do this immediately after all tasks pass.
113
+
114
+ ### Step 6: Write 5-implementation-decisions.md
115
+
116
+ Create `.claude/_features/$ARGUMENTS/5-implementation-decisions.md`.
117
+
118
+ Reflect on the session — patterns chosen, trade-offs made — and write 3-5 key decisions.
119
+
120
+ ```markdown
121
+ # Implementation Decisions: $ARGUMENTS
122
+
123
+ Key technical decisions made during implementation.
124
+
125
+ ---
126
+
127
+ ## <Short title> — YYYY-MM-DD
128
+ - **Decision:** what was built or decided
129
+ - **Reasoning:** why this approach
130
+ - **Alternatives:** what was considered but not used
131
+
132
+ ---
133
+ ```
134
+
135
+ If the file already exists (resuming), append new entries.
136
+
137
+ ### Step 7: Generate 4-e2e-checklist.md
138
+
139
+ Create `.claude/_features/$ARGUMENTS/4-e2e-checklist.md` using `.claude/_templates/e2e-checklist.md` as structure.
140
+
141
+ Populate it from:
142
+ - The **User Experience** section of `2-brief.md`
143
+ - The **Success Criteria** section of `2-brief.md`
144
+ - The **Edge Cases** section of `2-brief.md`
145
+ - Integration points from `3-blueprint.md`
146
+
147
+ Every scenario must be specific enough to follow without reading the brief — include exact UI labels, URLs, endpoints, or CLI commands as appropriate.
148
+
149
+ **State update:** After writing the checklist, confirm `1-feature.md` shows `[x] Implement` and `[o] Review`.
150
+
151
+ ### Step 8: Output summary
152
+
153
+ ```
154
+ Implementation complete: $ARGUMENTS
155
+
156
+ Progress: [x] Brief [x] Blueprint [x] Implement [o] Review [ ] Done
157
+
158
+ Branch: <branch_name>
159
+ Tasks completed: <N>
160
+
161
+ Files created:
162
+ - .claude/_features/$ARGUMENTS/5-implementation-decisions.md
163
+ - .claude/_features/$ARGUMENTS/4-e2e-checklist.md
164
+
165
+ Next: work through the e2e checklist manually, then mark [x] Review in 1-feature.md.
166
+ ```