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.
- package/.claude/_templates/blueprint.md +70 -0
- package/.claude/_templates/brief.md +55 -0
- package/.claude/_templates/e2e-checklist.md +32 -0
- package/.claude/_templates/feature.md +25 -0
- package/.claude/commands/feature/blueprint.md +117 -0
- package/.claude/commands/feature/finish.md +177 -0
- package/.claude/commands/feature/implement.md +166 -0
- package/.claude/commands/feature/review.md +107 -0
- package/.claude/commands/feature/start.md +126 -0
- package/.claude/commands/feature/status.md +76 -0
- package/.claude/commands/feature/test.md +144 -0
- package/.claude/commands/project-init.md +1 -0
- package/.claude/commands/task.md +64 -0
- package/.claude/hooks/post-edit.sh +23 -0
- package/.claude/hooks/post-write.sh +9 -0
- package/.claude/settings.json +24 -0
- package/.claude/skills/project-init.md +104 -0
- package/README.md +100 -0
- package/bin/index.js +69 -0
- package/package.json +27 -0
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review a feature in its current state and take the appropriate next action
|
|
3
|
+
argument-hint: "<MM.DD-slug>"
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Review a feature and take the next appropriate action based on its current state. Either Claude or the user can set `[?]` on any stage to flag it for review.
|
|
8
|
+
|
|
9
|
+
**Arguments:** $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Progress Checkbox Format
|
|
12
|
+
|
|
13
|
+
- `[ ]` not started · `[?]` needs attention · `[o]` in progress · `[x]` complete · `[!]` blocked
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Mode Detection
|
|
18
|
+
|
|
19
|
+
- If empty or blank → **BROWSE MODE**
|
|
20
|
+
- Otherwise → **REVIEW MODE**
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## BROWSE MODE
|
|
25
|
+
|
|
26
|
+
### Step 1: Find flagged features
|
|
27
|
+
|
|
28
|
+
Use Glob to find all `.claude/_features/*/1-feature.md`. Read each one and collect features that have any `[?]` checkbox.
|
|
29
|
+
|
|
30
|
+
If none:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
No features are flagged for review.
|
|
34
|
+
|
|
35
|
+
To flag a feature: set any checkbox to [?] in its 1-feature.md,
|
|
36
|
+
or run /feature:start <idea> to create a new one.
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Then stop.
|
|
40
|
+
|
|
41
|
+
### Step 2: Display numbered list
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Features needing review:
|
|
45
|
+
|
|
46
|
+
1. <feature-title> (<MM.DD-slug>) — [?] <stage>
|
|
47
|
+
2. <feature-title> (<MM.DD-slug>) — [?] <stage>
|
|
48
|
+
|
|
49
|
+
Run /feature:review <MM.DD-slug> to review one.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then stop.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## REVIEW MODE
|
|
57
|
+
|
|
58
|
+
### Step 1: Read feature state
|
|
59
|
+
|
|
60
|
+
Read `.claude/_features/$ARGUMENTS/1-feature.md`.
|
|
61
|
+
|
|
62
|
+
If the folder doesn't exist:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
No feature found: $ARGUMENTS
|
|
66
|
+
Run /feature:start <idea> to create one.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
Then stop.
|
|
70
|
+
|
|
71
|
+
### Step 2: Determine active state and act
|
|
72
|
+
|
|
73
|
+
Find which checkbox has `[?]` and act accordingly:
|
|
74
|
+
|
|
75
|
+
**`[?] Brief`:**
|
|
76
|
+
1. Read `.claude/_features/$ARGUMENTS/2-brief.md`
|
|
77
|
+
2. Answer any unanswered "Questions from User" using codebase research
|
|
78
|
+
3. Review "Questions from Claude" — if the user has answered them, incorporate those answers into the relevant brief sections (Overview, Goals, Requirements, etc.)
|
|
79
|
+
4. Identify any remaining gaps — if the brief is still incomplete, add new questions and keep `[?] Brief`
|
|
80
|
+
5. If the brief is complete (no unanswered Questions from Claude remain), update `1-feature.md`:
|
|
81
|
+
- Change `- [?] Brief` to `- [x] Brief`
|
|
82
|
+
6. **State update:** Always update `1-feature.md` after taking action.
|
|
83
|
+
7. Output what changed and what the next step is.
|
|
84
|
+
|
|
85
|
+
**`[?] Blueprint`:**
|
|
86
|
+
1. Read `.claude/_features/$ARGUMENTS/2-brief.md` and `.claude/_features/$ARGUMENTS/3-blueprint.md`
|
|
87
|
+
2. Review the blueprint for completeness, gaps, or errors
|
|
88
|
+
3. Update `3-blueprint.md` with corrections or additions
|
|
89
|
+
4. If complete, change `- [?] Blueprint` to `- [x] Blueprint` in `1-feature.md`
|
|
90
|
+
5. **State update:** Always update `1-feature.md` after taking action.
|
|
91
|
+
|
|
92
|
+
**`[?] Implement`:**
|
|
93
|
+
1. Read `.claude/_features/$ARGUMENTS/1-feature.md` and relevant implementation files
|
|
94
|
+
2. Surface any issues found — summarize what needs attention
|
|
95
|
+
3. Suggest next action to the user
|
|
96
|
+
|
|
97
|
+
**Any other `[?]` state:**
|
|
98
|
+
1. Read the relevant artifact for that stage
|
|
99
|
+
2. Surface what needs attention
|
|
100
|
+
3. Suggest next action
|
|
101
|
+
|
|
102
|
+
**No `[?]` found:**
|
|
103
|
+
Summarize the feature's current state and suggest the logical next command:
|
|
104
|
+
- `[x] Brief` + no blueprint → suggest `/feature:blueprint $ARGUMENTS`
|
|
105
|
+
- `[x] Blueprint` + no implement → suggest `/feature:implement $ARGUMENTS`
|
|
106
|
+
- `[x] Implement` → suggest running the e2e checklist
|
|
107
|
+
- `[x] Done` → feature is complete, nothing to do
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Start a feature — create folder, 2-brief.md, and 1-feature.md from a backlog task
|
|
3
|
+
argument-hint: "<idea or task number>"
|
|
4
|
+
allowed-tools: Read, Write, Edit, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Turn a backlog task into a feature folder with `1-feature.md` and `2-brief.md`.
|
|
8
|
+
|
|
9
|
+
**Arguments:** $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Mode Detection
|
|
12
|
+
|
|
13
|
+
- If empty or blank → **BROWSE MODE**
|
|
14
|
+
- Otherwise → **CREATE MODE**
|
|
15
|
+
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## BROWSE MODE
|
|
19
|
+
|
|
20
|
+
### Step 1: Read the backlog
|
|
21
|
+
|
|
22
|
+
Read `.claude/tasks.md`.
|
|
23
|
+
|
|
24
|
+
If no items exist:
|
|
25
|
+
|
|
26
|
+
```
|
|
27
|
+
No backlog tasks found.
|
|
28
|
+
|
|
29
|
+
Add ideas to .claude/tasks.md or run /feature:start <idea> directly.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Then stop.
|
|
33
|
+
|
|
34
|
+
### Step 2: Display numbered options
|
|
35
|
+
|
|
36
|
+
```
|
|
37
|
+
Backlog tasks (pick one to start):
|
|
38
|
+
|
|
39
|
+
1. <task>
|
|
40
|
+
2. <task>
|
|
41
|
+
...
|
|
42
|
+
|
|
43
|
+
Run /feature:start <number> to create a feature, or /feature:start <new idea> to start fresh.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Then stop.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## CREATE MODE
|
|
51
|
+
|
|
52
|
+
### Step 1: Resolve the idea
|
|
53
|
+
|
|
54
|
+
If `$ARGUMENTS` is a number, read `.claude/tasks.md` and use the item at that position as the idea.
|
|
55
|
+
Otherwise use `$ARGUMENTS` directly as the idea.
|
|
56
|
+
|
|
57
|
+
### Step 2: Derive names
|
|
58
|
+
|
|
59
|
+
From the idea, derive:
|
|
60
|
+
- `feature_title` — short, Title Case, human readable
|
|
61
|
+
- `feature_slug` — lowercase kebab-case, only `a-z 0-9 -`, max 40 chars
|
|
62
|
+
- `branch_name` — `feature/<feature_slug>`
|
|
63
|
+
- `folder_name` — `MM.DD-<feature_slug>` using today's date (e.g. `02.22-my-feature`)
|
|
64
|
+
|
|
65
|
+
If you cannot infer a clear title and slug, ask the user to clarify.
|
|
66
|
+
|
|
67
|
+
### Step 3: Create the feature folder
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
mkdir -p .claude/_features/<folder_name>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
### Step 4: Write 1-feature.md
|
|
74
|
+
|
|
75
|
+
Create `.claude/_features/<folder_name>/1-feature.md` using `.claude/_templates/feature.md` as the structure.
|
|
76
|
+
|
|
77
|
+
Fill in:
|
|
78
|
+
- Title, slug set to `<folder_name>`, branch name
|
|
79
|
+
- A 2-3 sentence description based on the idea
|
|
80
|
+
- 2-3 key points
|
|
81
|
+
|
|
82
|
+
Set Progress to:
|
|
83
|
+
|
|
84
|
+
```
|
|
85
|
+
- [?] Brief
|
|
86
|
+
- [ ] Blueprint
|
|
87
|
+
- [ ] Implement
|
|
88
|
+
- [ ] Review
|
|
89
|
+
- [ ] Done
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
**State update:** Setting `[?] Brief` signals that Claude has written the brief and it needs review.
|
|
93
|
+
|
|
94
|
+
### Step 5: Write 2-brief.md
|
|
95
|
+
|
|
96
|
+
Create `.claude/_features/<folder_name>/2-brief.md` using `.claude/_templates/brief.md` as the structure.
|
|
97
|
+
|
|
98
|
+
Fill in:
|
|
99
|
+
- Overview based on the idea
|
|
100
|
+
- Goals inferred from the idea
|
|
101
|
+
- Draft Requirements (must-have only — keep it lean)
|
|
102
|
+
- Placeholder User Experience
|
|
103
|
+
- 2-3 likely Edge Cases
|
|
104
|
+
- Out of Scope (anything clearly not included)
|
|
105
|
+
- Draft Success Criteria
|
|
106
|
+
- 2-4 Questions from Claude (things you genuinely need answered to finalize the brief)
|
|
107
|
+
|
|
108
|
+
### Step 6: Remove from backlog
|
|
109
|
+
|
|
110
|
+
If this idea came from a numbered item in `.claude/tasks.md`, remove that line using the Edit tool.
|
|
111
|
+
|
|
112
|
+
### Step 7: Output
|
|
113
|
+
|
|
114
|
+
```
|
|
115
|
+
Feature created: <feature_title>
|
|
116
|
+
Folder: .claude/_features/<folder_name>/
|
|
117
|
+
Branch (not created yet): <branch_name>
|
|
118
|
+
|
|
119
|
+
Progress: [?] Brief [ ] Blueprint [ ] Implement [ ] Review [ ] Done
|
|
120
|
+
|
|
121
|
+
Files:
|
|
122
|
+
- 1-feature.md (state + description)
|
|
123
|
+
- 2-brief.md (non-technical goals + questions)
|
|
124
|
+
|
|
125
|
+
Next: answer the questions in 2-brief.md, then run /feature:review <folder_name>.
|
|
126
|
+
```
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: List all features and their current states
|
|
3
|
+
allowed-tools: Glob, Read
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
List all features in `.claude/_features/` with their current progress.
|
|
7
|
+
|
|
8
|
+
## Step 1: Find all feature folders
|
|
9
|
+
|
|
10
|
+
Glob all `.claude/_features/*/1-feature.md`.
|
|
11
|
+
|
|
12
|
+
If none:
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
No features found.
|
|
16
|
+
|
|
17
|
+
Run /feature:start <idea> to create one, or /task to browse the backlog.
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Then stop.
|
|
21
|
+
|
|
22
|
+
## Step 2: Read each 1-feature.md
|
|
23
|
+
|
|
24
|
+
For each, extract:
|
|
25
|
+
- Feature title (first `#` heading)
|
|
26
|
+
- Folder name (the directory name from the path, e.g. `02.22-my-feature`)
|
|
27
|
+
- Branch (from `**Branch:**` line)
|
|
28
|
+
- Progress checkboxes (Brief, Blueprint, Implement, Review, Done lines)
|
|
29
|
+
|
|
30
|
+
## Step 3: Determine active stage
|
|
31
|
+
|
|
32
|
+
For each feature:
|
|
33
|
+
- Active stage = checkbox marked `[o]`, `[?]`, or `[!]`
|
|
34
|
+
- If all `[x]` → Done
|
|
35
|
+
- If all `[ ]` → Not started
|
|
36
|
+
|
|
37
|
+
## Step 4: Output
|
|
38
|
+
|
|
39
|
+
Group by active stage in lifecycle order. Omit empty groups.
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
Feature Status
|
|
43
|
+
──────────────────────────────────────────────────
|
|
44
|
+
|
|
45
|
+
[?] Brief — needs your attention
|
|
46
|
+
1. <feature-title> (<MM.DD-slug>)
|
|
47
|
+
[?]Brief [ ]Blueprint [ ]Implement [ ]Review [ ]Done
|
|
48
|
+
|
|
49
|
+
[x] Brief — ready to blueprint
|
|
50
|
+
2. <feature-title> (<MM.DD-slug>)
|
|
51
|
+
[x]Brief [ ]Blueprint [ ]Implement [ ]Review [ ]Done
|
|
52
|
+
|
|
53
|
+
[o] Blueprint
|
|
54
|
+
3. <feature-title> (<MM.DD-slug>)
|
|
55
|
+
[x]Brief [o]Blueprint [ ]Implement [ ]Review [ ]Done
|
|
56
|
+
|
|
57
|
+
[x] Blueprint — ready to implement
|
|
58
|
+
...
|
|
59
|
+
|
|
60
|
+
[o] Implement
|
|
61
|
+
...
|
|
62
|
+
|
|
63
|
+
[o] Review
|
|
64
|
+
...
|
|
65
|
+
|
|
66
|
+
Done
|
|
67
|
+
...
|
|
68
|
+
|
|
69
|
+
Blocked
|
|
70
|
+
<feature-title> (<MM.DD-slug>) — blocked at <stage>
|
|
71
|
+
|
|
72
|
+
──────────────────────────────────────────────────
|
|
73
|
+
<N> features total
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Show folder names (e.g. `02.22-my-feature`) in parentheses — that is what the user passes to all other commands.
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run through the e2e checklist for a completed feature
|
|
3
|
+
argument-hint: "<MM.DD-slug>"
|
|
4
|
+
allowed-tools: Read, Edit, Glob, Bash
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Walk through the e2e checklist for a feature interactively. The feature must be marked `[x] Done` before testing is allowed.
|
|
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 test** when: `- [x] Done`
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Mode Detection
|
|
20
|
+
|
|
21
|
+
- If empty or blank → **BROWSE MODE**
|
|
22
|
+
- Otherwise → **TEST MODE**
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## BROWSE MODE
|
|
27
|
+
|
|
28
|
+
### Step 1: Find done features
|
|
29
|
+
|
|
30
|
+
Glob all `.claude/_features/*/1-feature.md`. Collect features where Progress shows `- [x] Done`.
|
|
31
|
+
|
|
32
|
+
If none:
|
|
33
|
+
```
|
|
34
|
+
No features are marked Done.
|
|
35
|
+
|
|
36
|
+
Only completed features can be e2e tested.
|
|
37
|
+
Run /feature:finish <MM.DD-slug> to complete a feature first.
|
|
38
|
+
```
|
|
39
|
+
Then stop.
|
|
40
|
+
|
|
41
|
+
### Step 2: Display numbered list
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
Features ready for e2e testing:
|
|
45
|
+
|
|
46
|
+
1. <feature-title> (<MM.DD-slug>)
|
|
47
|
+
2. <feature-title> (<MM.DD-slug>)
|
|
48
|
+
|
|
49
|
+
Run /feature:test <MM.DD-slug> to run through the checklist.
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Then stop.
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## TEST MODE
|
|
57
|
+
|
|
58
|
+
### Step 1: Read feature, checklist, and testing instructions
|
|
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
|
+
**Progress check:**
|
|
69
|
+
- `[x] Done` — proceed
|
|
70
|
+
- Anything else — stop and output:
|
|
71
|
+
```
|
|
72
|
+
Feature is not marked Done yet.
|
|
73
|
+
|
|
74
|
+
Only completed features can be e2e tested.
|
|
75
|
+
Current state: <active stage>
|
|
76
|
+
|
|
77
|
+
Run /feature:finish $ARGUMENTS to complete the feature first.
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Read `.claude/_features/$ARGUMENTS/4-e2e-checklist.md`.
|
|
81
|
+
|
|
82
|
+
If the checklist doesn't exist:
|
|
83
|
+
```
|
|
84
|
+
No e2e checklist found for: $ARGUMENTS
|
|
85
|
+
|
|
86
|
+
The checklist is generated by /feature:implement. If it's missing, re-run /feature:implement $ARGUMENTS.
|
|
87
|
+
```
|
|
88
|
+
Then stop.
|
|
89
|
+
|
|
90
|
+
**Read shared testing instructions:** Check if `.claude/testing.md` exists. If it does, read it and use it throughout — it contains app-specific context like how to start the app, base URLs, test accounts, browser/device preferences, and any other setup needed to run scenarios correctly.
|
|
91
|
+
|
|
92
|
+
### Step 2: Present the checklist and run scenarios
|
|
93
|
+
|
|
94
|
+
Output a summary of what you're about to test:
|
|
95
|
+
```
|
|
96
|
+
E2E Testing: <feature-title>
|
|
97
|
+
Checklist: .claude/_features/$ARGUMENTS/4-e2e-checklist.md
|
|
98
|
+
|
|
99
|
+
Working through each scenario. Confirm pass or fail as you go.
|
|
100
|
+
──────────────────────────────────────────────────
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Then work through each section of the checklist in order:
|
|
104
|
+
|
|
105
|
+
For each unchecked scenario (`- [ ]`):
|
|
106
|
+
1. Present the scenario clearly — what to do and what to expect
|
|
107
|
+
2. For any scenario involving CLI commands or scripts, run them using Bash and report the result
|
|
108
|
+
3. For UI or manual scenarios, describe exactly what to check and ask the user to confirm: `Pass or fail?`
|
|
109
|
+
4. If the user confirms pass: mark the item `- [x]` in `e2e-checklist.md` using the Edit tool
|
|
110
|
+
5. If the user says fail: mark the item `- [!]` in `e2e-checklist.md`, note what failed, and continue to the next scenario
|
|
111
|
+
|
|
112
|
+
Skip scenarios already marked `[x]` (previously passed) — report them as already passing.
|
|
113
|
+
|
|
114
|
+
### Step 3: Output results
|
|
115
|
+
|
|
116
|
+
After all scenarios:
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
E2E Test Results: <feature-title>
|
|
120
|
+
──────────────────────────────────────────────────
|
|
121
|
+
Passed: <N>
|
|
122
|
+
Failed: <N>
|
|
123
|
+
Skipped: <N>
|
|
124
|
+
──────────────────────────────────────────────────
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
If all passed:
|
|
128
|
+
|
|
129
|
+
Update `1-feature.md`: set `**Last Tested:**` to today's date in `MM.DD.YYYY` format.
|
|
130
|
+
|
|
131
|
+
```
|
|
132
|
+
✓ All scenarios passed. Feature fully validated.
|
|
133
|
+
Last Tested updated in 1-feature.md.
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
If any failed:
|
|
137
|
+
```
|
|
138
|
+
✗ <N> scenario(s) failed. Review the failures in:
|
|
139
|
+
.claude/_features/$ARGUMENTS/4-e2e-checklist.md
|
|
140
|
+
|
|
141
|
+
Failed items are marked [!]. Fix the issues and re-run /feature:test $ARGUMENTS.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Note:** This command does not change the feature's Done state — it only updates the checklist file.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
Use the Skill tool to invoke the skill named "project-init" with any arguments provided by the user: $ARGUMENTS
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: List backlog tasks, or add a new idea to the backlog
|
|
3
|
+
argument-hint: "[add] <idea>"
|
|
4
|
+
allowed-tools: Read, Edit, Write
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
Manage the task backlog in `.claude/tasks.md`.
|
|
8
|
+
|
|
9
|
+
**Arguments:** $ARGUMENTS
|
|
10
|
+
|
|
11
|
+
## Mode Detection
|
|
12
|
+
|
|
13
|
+
- If empty or blank → **LIST MODE**
|
|
14
|
+
- If starts with `add ` (case-insensitive) → **ADD MODE** (strip the `add ` prefix, use the rest as the idea)
|
|
15
|
+
- Otherwise → **ADD MODE** (use `$ARGUMENTS` as the idea directly)
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## LIST MODE
|
|
20
|
+
|
|
21
|
+
### Step 1: Read the backlog
|
|
22
|
+
|
|
23
|
+
Read `.claude/tasks.md`.
|
|
24
|
+
|
|
25
|
+
If it doesn't exist or has no items, output:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
No backlog items found.
|
|
29
|
+
|
|
30
|
+
Edit .claude/tasks.md to add ideas — one per line.
|
|
31
|
+
Or run /feature:start <idea> to create a feature directly.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Then stop.
|
|
35
|
+
|
|
36
|
+
### Step 2: Display numbered list
|
|
37
|
+
|
|
38
|
+
```
|
|
39
|
+
Backlog tasks:
|
|
40
|
+
|
|
41
|
+
1. <task>
|
|
42
|
+
2. <task>
|
|
43
|
+
...
|
|
44
|
+
|
|
45
|
+
Run /feature:start <number or idea> to turn one into a feature.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Then stop.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## ADD MODE
|
|
53
|
+
|
|
54
|
+
### Step 1: Append to backlog
|
|
55
|
+
|
|
56
|
+
Extract the idea: if `$ARGUMENTS` starts with `add ` (case-insensitive), strip that prefix. Otherwise use `$ARGUMENTS` as-is. Add the idea as a new line item to `.claude/tasks.md`.
|
|
57
|
+
|
|
58
|
+
### Step 2: Output confirmation
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
Added to backlog: <idea>
|
|
62
|
+
|
|
63
|
+
Run /task to see the full backlog.
|
|
64
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# post-edit.sh
|
|
3
|
+
# Auto-commits file edits to git with a sized commit message.
|
|
4
|
+
|
|
5
|
+
if git rev-parse --git-dir >/dev/null 2>&1 && [[ -n "$CLAUDE_TOOL_FILE_PATH" ]]; then
|
|
6
|
+
git add "$CLAUDE_TOOL_FILE_PATH" 2>/dev/null
|
|
7
|
+
|
|
8
|
+
CHANGED_LINES=$(git diff --cached --numstat "$CLAUDE_TOOL_FILE_PATH" 2>/dev/null | awk '{print $1+$2}')
|
|
9
|
+
|
|
10
|
+
if [[ $CHANGED_LINES -gt 0 ]]; then
|
|
11
|
+
FILENAME=$(basename "$CLAUDE_TOOL_FILE_PATH")
|
|
12
|
+
|
|
13
|
+
if [[ $CHANGED_LINES -lt 10 ]]; then
|
|
14
|
+
SIZE="minor"
|
|
15
|
+
elif [[ $CHANGED_LINES -lt 50 ]]; then
|
|
16
|
+
SIZE="moderate"
|
|
17
|
+
else
|
|
18
|
+
SIZE="major"
|
|
19
|
+
fi
|
|
20
|
+
|
|
21
|
+
git commit -m "Update $FILENAME: $SIZE changes ($CHANGED_LINES lines)" "$CLAUDE_TOOL_FILE_PATH" 2>/dev/null || true
|
|
22
|
+
fi
|
|
23
|
+
fi
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# post-write.sh
|
|
3
|
+
# Auto-commits newly written files to git.
|
|
4
|
+
|
|
5
|
+
if git rev-parse --git-dir >/dev/null 2>&1 && [[ -n "$CLAUDE_TOOL_FILE_PATH" ]]; then
|
|
6
|
+
git add "$CLAUDE_TOOL_FILE_PATH" 2>/dev/null
|
|
7
|
+
FILENAME=$(basename "$CLAUDE_TOOL_FILE_PATH")
|
|
8
|
+
git commit -m "Add new file: $FILENAME" "$CLAUDE_TOOL_FILE_PATH" 2>/dev/null || true
|
|
9
|
+
fi
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"hooks": {
|
|
3
|
+
"PostToolUse": [
|
|
4
|
+
{
|
|
5
|
+
"matcher": "Edit",
|
|
6
|
+
"hooks": [
|
|
7
|
+
{
|
|
8
|
+
"type": "command",
|
|
9
|
+
"command": "bash .claude/hooks/post-edit.sh"
|
|
10
|
+
}
|
|
11
|
+
]
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
"matcher": "Write",
|
|
15
|
+
"hooks": [
|
|
16
|
+
{
|
|
17
|
+
"type": "command",
|
|
18
|
+
"command": "bash .claude/hooks/post-write.sh"
|
|
19
|
+
}
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: project-init
|
|
3
|
+
description: Initialize a new project. Creates CLAUDE.md via /init, gathers context through dialogue, and seeds the task backlog.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Project Init
|
|
7
|
+
|
|
8
|
+
Bootstrap a new project with context and an initial backlog.
|
|
9
|
+
|
|
10
|
+
## Steps
|
|
11
|
+
|
|
12
|
+
### 1. Run /init
|
|
13
|
+
|
|
14
|
+
Call the built-in `/init` command to scan the codebase and generate `CLAUDE.md` in the project root.
|
|
15
|
+
|
|
16
|
+
### 2. Ask brainstorming questions — one at a time
|
|
17
|
+
|
|
18
|
+
Ask questions one at a time to understand the project. Do not send multiple questions in one message.
|
|
19
|
+
|
|
20
|
+
Cover (skip if already clear from `/init` output):
|
|
21
|
+
- What is this project and what problem does it solve?
|
|
22
|
+
- Who are the users?
|
|
23
|
+
- What does a successful first version look like?
|
|
24
|
+
- Any technical constraints or integration points?
|
|
25
|
+
- What should NOT be in scope right now?
|
|
26
|
+
|
|
27
|
+
Also confirm from the codebase (check package.json, Makefile, README, etc.):
|
|
28
|
+
- Test command (e.g. `bun test`, `pytest`, `npm test`)
|
|
29
|
+
- Run/dev command
|
|
30
|
+
- Commit message convention (e.g. conventional commits, plain English)
|
|
31
|
+
|
|
32
|
+
Ask one question about manual/e2e testing setup:
|
|
33
|
+
- How do you manually test this app? (e.g. local dev server URL, staging URL, mobile device)
|
|
34
|
+
- Are there test accounts or credentials needed?
|
|
35
|
+
- Any browser or device requirements?
|
|
36
|
+
- Anything else needed to run through features manually?
|
|
37
|
+
|
|
38
|
+
### 3. Update CLAUDE.md
|
|
39
|
+
|
|
40
|
+
Append a `## Project Context` section to `CLAUDE.md` with a summary of what you learned:
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
## Project Context
|
|
44
|
+
|
|
45
|
+
**Goal:** <one sentence>
|
|
46
|
+
**Users:** <who uses this>
|
|
47
|
+
**Stack:** <key tech>
|
|
48
|
+
**Constraints:** <anything important>
|
|
49
|
+
**Out of scope:** <what to avoid>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### 4. Write `.claude/testing.md`
|
|
53
|
+
|
|
54
|
+
Write `.claude/testing.md` with the manual testing setup gathered in Step 2. This file is read by `/feature:test` to inform how e2e scenarios are run.
|
|
55
|
+
|
|
56
|
+
```markdown
|
|
57
|
+
# Testing
|
|
58
|
+
|
|
59
|
+
## How to start the app
|
|
60
|
+
<dev server command and URL, or staging URL>
|
|
61
|
+
|
|
62
|
+
## Test accounts
|
|
63
|
+
<credentials or "none required">
|
|
64
|
+
|
|
65
|
+
## Browser / device
|
|
66
|
+
<any requirements, or "any">
|
|
67
|
+
|
|
68
|
+
## Other notes
|
|
69
|
+
<anything else needed to test manually>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Only include sections that are relevant. Omit or mark "none" for anything that doesn't apply.
|
|
73
|
+
|
|
74
|
+
### 5. Clear the README
|
|
75
|
+
|
|
76
|
+
Overwrite `README.md` with a minimal stub so the generic starter content is gone:
|
|
77
|
+
|
|
78
|
+
```markdown
|
|
79
|
+
# <project name>
|
|
80
|
+
|
|
81
|
+
<one sentence description>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 6. Seed `.claude/tasks.md`
|
|
85
|
+
|
|
86
|
+
Write the first few backlog items based on the conversation — one idea per line, plain text, no checkboxes:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
<first task>
|
|
90
|
+
<second task>
|
|
91
|
+
<third task>
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Keep it short and actionable. These should be the next real steps, not a full roadmap.
|
|
95
|
+
|
|
96
|
+
### 7. Output
|
|
97
|
+
|
|
98
|
+
```
|
|
99
|
+
CLAUDE.md updated with project context.
|
|
100
|
+
Testing instructions written: .claude/testing.md
|
|
101
|
+
Backlog seeded: .claude/tasks.md
|
|
102
|
+
|
|
103
|
+
Next: /feature:start <idea> to turn a backlog item into a feature.
|
|
104
|
+
```
|