get-shit-done-cc 1.3.19 → 1.3.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -2
- package/commands/gsd/execute-plan.md +25 -7
- package/get-shit-done/references/git-integration.md +154 -26
- package/get-shit-done/references/principles.md +23 -0
- package/get-shit-done/references/scope-estimation.md +4 -2
- package/get-shit-done/references/tdd.md +27 -8
- package/get-shit-done/templates/summary.md +15 -3
- package/get-shit-done/workflows/execute-phase.md +164 -30
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -171,9 +171,24 @@ GSD prevents this. Each plan is maximum 3 tasks. Each plan runs in a fresh subag
|
|
|
171
171
|
|
|
172
172
|
No degradation. Walk away, come back to completed work.
|
|
173
173
|
|
|
174
|
-
###
|
|
174
|
+
### Atomic Git Commits
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
Each task gets its own commit immediately after completion. Plans produce 2-4 commits total:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
abc123f docs(08-02): complete user registration plan
|
|
180
|
+
def456g feat(08-02): add email confirmation flow
|
|
181
|
+
hij789k feat(08-02): implement password hashing
|
|
182
|
+
lmn012o feat(08-02): create registration endpoint
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
**Benefits:**
|
|
186
|
+
- Git bisect finds exact failing task
|
|
187
|
+
- Each task independently revertable
|
|
188
|
+
- Clear history for Claude in future sessions
|
|
189
|
+
- Better observability in AI-automated workflow
|
|
190
|
+
|
|
191
|
+
Every commit is surgical, traceable, and meaningful.
|
|
177
192
|
|
|
178
193
|
### Modular by Design
|
|
179
194
|
|
|
@@ -14,10 +14,13 @@ allowed-tools:
|
|
|
14
14
|
---
|
|
15
15
|
|
|
16
16
|
<objective>
|
|
17
|
-
Execute a PLAN.md file, create SUMMARY.md, update project state
|
|
17
|
+
Execute a PLAN.md file with per-task atomic commits, create SUMMARY.md, update project state.
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Commit strategy:
|
|
20
|
+
- Each task → 1 commit immediately after completion (feat/fix/test/refactor)
|
|
21
|
+
- Plan completion → 1 metadata commit (docs: SUMMARY + STATE + ROADMAP)
|
|
20
22
|
|
|
23
|
+
Uses intelligent segmentation:
|
|
21
24
|
- Plans without checkpoints → spawn subagent for full autonomous execution
|
|
22
25
|
- Plans with verify checkpoints → segment execution, pause at checkpoints
|
|
23
26
|
- Plans with decision checkpoints → execute in main context
|
|
@@ -88,23 +91,38 @@ Only rule 4 requires user intervention.
|
|
|
88
91
|
</deviation_rules>
|
|
89
92
|
|
|
90
93
|
<commit_rules>
|
|
91
|
-
**
|
|
94
|
+
**Per-Task Commits:**
|
|
95
|
+
|
|
96
|
+
After each task completes:
|
|
97
|
+
1. Stage only files modified by that task
|
|
98
|
+
2. Commit with format: `{type}({phase}-{plan}): {task-name}`
|
|
99
|
+
3. Types: feat, fix, test, refactor, perf, chore
|
|
100
|
+
4. Record commit hash for SUMMARY.md
|
|
92
101
|
|
|
93
|
-
|
|
102
|
+
**Plan Metadata Commit:**
|
|
94
103
|
|
|
104
|
+
After all tasks complete:
|
|
105
|
+
1. Stage planning artifacts only: PLAN.md, SUMMARY.md, STATE.md, ROADMAP.md
|
|
106
|
+
2. Commit with format: `docs({phase}-{plan}): complete [plan-name] plan`
|
|
107
|
+
3. NO code files (already committed per-task)
|
|
108
|
+
|
|
109
|
+
**NEVER use:**
|
|
95
110
|
- `git add .`
|
|
96
111
|
- `git add -A`
|
|
97
112
|
- `git add src/` or any broad directory
|
|
98
113
|
|
|
99
|
-
|
|
114
|
+
**Always stage files individually.**
|
|
115
|
+
|
|
116
|
+
See ~/.claude/get-shit-done/references/git-integration.md for full commit strategy.
|
|
100
117
|
</commit_rules>
|
|
101
118
|
|
|
102
119
|
<success_criteria>
|
|
103
120
|
|
|
104
121
|
- [ ] All tasks executed
|
|
105
|
-
- [ ]
|
|
122
|
+
- [ ] Each task committed individually (feat/fix/test/refactor)
|
|
123
|
+
- [ ] SUMMARY.md created with substantive content and commit hashes
|
|
106
124
|
- [ ] STATE.md updated (position, decisions, issues, session)
|
|
107
125
|
- [ ] ROADMAP updated (plan count, phase status)
|
|
108
|
-
- [ ]
|
|
126
|
+
- [ ] Metadata committed with docs({phase}-{plan}): complete [plan-name] plan
|
|
109
127
|
- [ ] User informed of next steps
|
|
110
128
|
</success_criteria>
|
|
@@ -11,14 +11,15 @@ The git log should read like a changelog of what shipped, not a diary of plannin
|
|
|
11
11
|
|
|
12
12
|
<commit_points>
|
|
13
13
|
|
|
14
|
-
| Event | Commit? | Why
|
|
15
|
-
| ----------------------- | ------- |
|
|
16
|
-
| BRIEF + ROADMAP created | YES | Project initialization
|
|
17
|
-
| PLAN.md created | NO | Intermediate - commit with completion
|
|
18
|
-
| RESEARCH.md created | NO | Intermediate
|
|
19
|
-
| DISCOVERY.md created | NO | Intermediate
|
|
20
|
-
| **
|
|
21
|
-
|
|
|
14
|
+
| Event | Commit? | Why |
|
|
15
|
+
| ----------------------- | ------- | ------------------------------------------------ |
|
|
16
|
+
| BRIEF + ROADMAP created | YES | Project initialization |
|
|
17
|
+
| PLAN.md created | NO | Intermediate - commit with plan completion |
|
|
18
|
+
| RESEARCH.md created | NO | Intermediate |
|
|
19
|
+
| DISCOVERY.md created | NO | Intermediate |
|
|
20
|
+
| **Task completed** | YES | Atomic unit of work (1 commit per task) |
|
|
21
|
+
| **Plan completed** | YES | Metadata commit (SUMMARY + STATE + ROADMAP) |
|
|
22
|
+
| Handoff created | YES | WIP state preserved |
|
|
22
23
|
|
|
23
24
|
</commit_points>
|
|
24
25
|
|
|
@@ -56,30 +57,88 @@ git commit
|
|
|
56
57
|
|
|
57
58
|
</format>
|
|
58
59
|
|
|
59
|
-
<format name="
|
|
60
|
-
##
|
|
60
|
+
<format name="task-completion">
|
|
61
|
+
## Task Completion (During Plan Execution)
|
|
61
62
|
|
|
63
|
+
Each task gets its own commit immediately after completion.
|
|
64
|
+
|
|
65
|
+
```
|
|
66
|
+
{type}({phase}-{plan}): {task-name}
|
|
67
|
+
|
|
68
|
+
- [Key change 1]
|
|
69
|
+
- [Key change 2]
|
|
70
|
+
- [Key change 3]
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Commit types:**
|
|
74
|
+
- `feat` - New feature/functionality
|
|
75
|
+
- `fix` - Bug fix
|
|
76
|
+
- `test` - Test-only (TDD RED phase)
|
|
77
|
+
- `refactor` - Code cleanup (TDD REFACTOR phase)
|
|
78
|
+
- `perf` - Performance improvement
|
|
79
|
+
- `chore` - Dependencies, config, tooling
|
|
80
|
+
|
|
81
|
+
**Examples:**
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
# Standard task
|
|
85
|
+
git add src/api/auth.ts src/types/user.ts
|
|
86
|
+
git commit -m "feat(08-02): create user registration endpoint
|
|
87
|
+
|
|
88
|
+
- POST /auth/register validates email and password
|
|
89
|
+
- Checks for duplicate users
|
|
90
|
+
- Returns JWT token on success
|
|
91
|
+
"
|
|
92
|
+
|
|
93
|
+
# TDD task - RED phase
|
|
94
|
+
git add src/__tests__/jwt.test.ts
|
|
95
|
+
git commit -m "test(07-02): add failing test for JWT generation
|
|
96
|
+
|
|
97
|
+
- Tests token contains user ID claim
|
|
98
|
+
- Tests token expires in 1 hour
|
|
99
|
+
- Tests signature verification
|
|
100
|
+
"
|
|
101
|
+
|
|
102
|
+
# TDD task - GREEN phase
|
|
103
|
+
git add src/utils/jwt.ts
|
|
104
|
+
git commit -m "feat(07-02): implement JWT generation
|
|
105
|
+
|
|
106
|
+
- Uses jose library for signing
|
|
107
|
+
- Includes user ID and expiry claims
|
|
108
|
+
- Signs with HS256 algorithm
|
|
109
|
+
"
|
|
62
110
|
```
|
|
63
|
-
feat([domain]): [one-liner from SUMMARY.md]
|
|
64
111
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
112
|
+
</format>
|
|
113
|
+
|
|
114
|
+
<format name="plan-completion">
|
|
115
|
+
## Plan Completion (After All Tasks Done)
|
|
116
|
+
|
|
117
|
+
After all tasks committed, one final metadata commit captures plan completion.
|
|
68
118
|
|
|
69
|
-
[If issues encountered:]
|
|
70
|
-
Note: [issue and resolution]
|
|
71
119
|
```
|
|
120
|
+
docs({phase}-{plan}): complete [plan-name] plan
|
|
72
121
|
|
|
73
|
-
|
|
122
|
+
Tasks completed: [N]/[N]
|
|
123
|
+
- [Task 1 name]
|
|
124
|
+
- [Task 2 name]
|
|
125
|
+
- [Task 3 name]
|
|
126
|
+
|
|
127
|
+
SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
128
|
+
```
|
|
74
129
|
|
|
75
130
|
What to commit:
|
|
76
131
|
|
|
77
132
|
```bash
|
|
78
|
-
git add .planning/phases/XX-name/
|
|
79
|
-
git add
|
|
133
|
+
git add .planning/phases/XX-name/{phase}-{plan}-PLAN.md
|
|
134
|
+
git add .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
135
|
+
git add .planning/STATE.md
|
|
136
|
+
git add .planning/ROADMAP.md
|
|
80
137
|
git commit
|
|
81
138
|
```
|
|
82
139
|
|
|
140
|
+
**Note:** Code files NOT included - already committed per-task.
|
|
141
|
+
|
|
83
142
|
</format>
|
|
84
143
|
|
|
85
144
|
<format name="handoff">
|
|
@@ -104,23 +163,92 @@ git commit
|
|
|
104
163
|
|
|
105
164
|
<example_log>
|
|
106
165
|
|
|
166
|
+
**Old approach (per-plan commits):**
|
|
107
167
|
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
168
|
+
a7f2d1 feat(checkout): Stripe payments with webhook verification
|
|
169
|
+
3e9c4b feat(products): catalog with search, filters, and pagination
|
|
170
|
+
8a1b2c feat(auth): JWT with refresh rotation using jose
|
|
171
|
+
5c3d7e feat(foundation): Next.js 15 + Prisma + Tailwind scaffold
|
|
172
|
+
2f4a8d docs: initialize ecommerce-app (5 phases)
|
|
113
173
|
```
|
|
114
174
|
|
|
175
|
+
**New approach (per-task commits):**
|
|
176
|
+
```
|
|
177
|
+
# Phase 04 - Checkout
|
|
178
|
+
1a2b3c docs(04-01): complete checkout flow plan
|
|
179
|
+
4d5e6f feat(04-01): add webhook signature verification
|
|
180
|
+
7g8h9i feat(04-01): implement payment session creation
|
|
181
|
+
0j1k2l feat(04-01): create checkout page component
|
|
182
|
+
|
|
183
|
+
# Phase 03 - Products
|
|
184
|
+
3m4n5o docs(03-02): complete product listing plan
|
|
185
|
+
6p7q8r feat(03-02): add pagination controls
|
|
186
|
+
9s0t1u feat(03-02): implement search and filters
|
|
187
|
+
2v3w4x feat(03-01): create product catalog schema
|
|
188
|
+
|
|
189
|
+
# Phase 02 - Auth
|
|
190
|
+
5y6z7a docs(02-02): complete token refresh plan
|
|
191
|
+
8b9c0d feat(02-02): implement refresh token rotation
|
|
192
|
+
1e2f3g test(02-02): add failing test for token refresh
|
|
193
|
+
4h5i6j docs(02-01): complete JWT setup plan
|
|
194
|
+
7k8l9m feat(02-01): add JWT generation and validation
|
|
195
|
+
0n1o2p chore(02-01): install jose library
|
|
196
|
+
|
|
197
|
+
# Phase 01 - Foundation
|
|
198
|
+
3q4r5s docs(01-01): complete scaffold plan
|
|
199
|
+
6t7u8v feat(01-01): configure Tailwind and globals
|
|
200
|
+
9w0x1y feat(01-01): set up Prisma with database
|
|
201
|
+
2z3a4b feat(01-01): create Next.js 15 project
|
|
202
|
+
|
|
203
|
+
# Initialization
|
|
204
|
+
5c6d7e docs: initialize ecommerce-app (5 phases)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
|
|
208
|
+
|
|
115
209
|
</example_log>
|
|
116
210
|
|
|
117
211
|
<anti_patterns>
|
|
118
212
|
|
|
119
|
-
|
|
213
|
+
**Still don't commit (intermediate artifacts):**
|
|
214
|
+
- PLAN.md creation (commit with plan completion)
|
|
120
215
|
- RESEARCH.md (intermediate)
|
|
121
216
|
- DISCOVERY.md (intermediate)
|
|
122
217
|
- Minor planning tweaks
|
|
123
218
|
- "Fixed typo in roadmap"
|
|
124
219
|
|
|
125
|
-
|
|
220
|
+
**Do commit (outcomes):**
|
|
221
|
+
- Each task completion (feat/fix/test/refactor)
|
|
222
|
+
- Plan completion metadata (docs)
|
|
223
|
+
- Project initialization (docs)
|
|
224
|
+
|
|
225
|
+
**Key principle:** Commit working code and shipped outcomes, not planning process.
|
|
226
|
+
|
|
126
227
|
</anti_patterns>
|
|
228
|
+
|
|
229
|
+
<commit_strategy_rationale>
|
|
230
|
+
|
|
231
|
+
## Why Per-Task Commits?
|
|
232
|
+
|
|
233
|
+
**Context engineering for AI:**
|
|
234
|
+
- Git history becomes primary context source for future Claude sessions
|
|
235
|
+
- `git log --grep="{phase}-{plan}"` shows all work for a plan
|
|
236
|
+
- `git diff <hash>^..<hash>` shows exact changes per task
|
|
237
|
+
- Less reliance on parsing SUMMARY.md = more context for actual work
|
|
238
|
+
|
|
239
|
+
**Failure recovery:**
|
|
240
|
+
- Task 1 committed ✅, Task 2 failed ❌
|
|
241
|
+
- Claude in next session: sees task 1 complete, can retry task 2
|
|
242
|
+
- Can `git reset --hard` to last successful task
|
|
243
|
+
|
|
244
|
+
**Debugging:**
|
|
245
|
+
- `git bisect` finds exact failing task, not just failing plan
|
|
246
|
+
- `git blame` traces line to specific task context
|
|
247
|
+
- Each commit is independently revertable
|
|
248
|
+
|
|
249
|
+
**Observability:**
|
|
250
|
+
- Solo developer + Claude workflow benefits from granular attribution
|
|
251
|
+
- Atomic commits are git best practice
|
|
252
|
+
- "Commit noise" irrelevant when consumer is Claude, not humans
|
|
253
|
+
|
|
254
|
+
</commit_strategy_rationale>
|
|
@@ -115,6 +115,29 @@ Plan → Execute → Ship → Learn → Repeat
|
|
|
115
115
|
Milestones mark shipped versions (v1.0 → v1.1 → v2.0).
|
|
116
116
|
</ship_fast>
|
|
117
117
|
|
|
118
|
+
<atomic_commits>
|
|
119
|
+
|
|
120
|
+
**Git commits = context engineering for Claude.**
|
|
121
|
+
|
|
122
|
+
Each task gets its own commit immediately after completion:
|
|
123
|
+
- Format: `{type}({phase}-{plan}): {task-description}`
|
|
124
|
+
- Types: feat, fix, test, refactor, perf, chore, docs
|
|
125
|
+
- One final metadata commit per plan: `docs({phase}-{plan}): complete [plan-name]`
|
|
126
|
+
|
|
127
|
+
**Why per-task commits:**
|
|
128
|
+
- Git history becomes primary context source for future Claude sessions
|
|
129
|
+
- `git bisect` finds exact failing task, not just failing plan
|
|
130
|
+
- Each task independently revertable
|
|
131
|
+
- Better failure recovery (task 1 committed ✅, retry task 2)
|
|
132
|
+
- Observability optimized for AI workflow, not human browsing
|
|
133
|
+
|
|
134
|
+
**Plans produce 3-4 commits total:**
|
|
135
|
+
- 2-3 task commits (working code)
|
|
136
|
+
- 1 metadata commit (SUMMARY + STATE + ROADMAP)
|
|
137
|
+
|
|
138
|
+
See `~/.claude/get-shit-done/references/git-integration.md` for complete strategy.
|
|
139
|
+
</atomic_commits>
|
|
140
|
+
|
|
118
141
|
<anti_enterprise>
|
|
119
142
|
|
|
120
143
|
NEVER include:
|
|
@@ -80,7 +80,7 @@ Plan 1: "Auth Database Models" (2 tasks)
|
|
|
80
80
|
Plan 2: "Auth API Core" (3 tasks)
|
|
81
81
|
Plan 3: "Auth API Protection" (2 tasks)
|
|
82
82
|
Plan 4: "Auth UI Components" (2 tasks)
|
|
83
|
-
Each: 30-40% context, peak quality,
|
|
83
|
+
Each: 30-40% context, peak quality, atomic commits (2-3 task commits + 1 metadata commit)
|
|
84
84
|
```
|
|
85
85
|
</anti_patterns>
|
|
86
86
|
|
|
@@ -137,7 +137,7 @@ Each plan: fresh context, peak quality. More plans = more thoroughness, same qua
|
|
|
137
137
|
<summary>
|
|
138
138
|
**2-3 tasks, 50% context target:**
|
|
139
139
|
- All tasks: Peak quality
|
|
140
|
-
- Git: Atomic,
|
|
140
|
+
- Git: Atomic per-task commits (each task = 1 commit, plan = 1 metadata commit)
|
|
141
141
|
- Autonomous plans: Subagent execution (fresh context)
|
|
142
142
|
|
|
143
143
|
**The principle:** Aggressive atomicity. More plans, smaller scope, consistent quality.
|
|
@@ -145,5 +145,7 @@ Each plan: fresh context, peak quality. More plans = more thoroughness, same qua
|
|
|
145
145
|
**The rule:** If in doubt, split. Quality over consolidation. Always.
|
|
146
146
|
|
|
147
147
|
**Depth rule:** Depth increases plan COUNT, never plan SIZE.
|
|
148
|
+
|
|
149
|
+
**Commit rule:** Each plan produces 3-4 commits total (2-3 task commits + 1 docs commit). More granular history = better observability for Claude.
|
|
148
150
|
</summary>
|
|
149
151
|
</scope_estimation>
|
|
@@ -151,18 +151,37 @@ Follow project conventions for test location:
|
|
|
151
151
|
<commit_pattern>
|
|
152
152
|
## Commit Pattern for TDD Tasks
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
TDD tasks produce 2-3 atomic commits (one per TDD phase):
|
|
155
155
|
|
|
156
156
|
```
|
|
157
|
-
test: add failing test for email validation
|
|
157
|
+
test({phase}-{plan}): add failing test for email validation
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
- Tests valid email formats accepted
|
|
160
|
+
- Tests invalid formats rejected
|
|
161
|
+
- Tests empty input handling
|
|
160
162
|
|
|
161
|
-
|
|
163
|
+
feat({phase}-{plan}): implement email validation
|
|
164
|
+
|
|
165
|
+
- Regex pattern matches RFC 5322
|
|
166
|
+
- Returns boolean for validity
|
|
167
|
+
- Handles edge cases (empty, null)
|
|
168
|
+
|
|
169
|
+
refactor({phase}-{plan}): extract regex to constant (optional)
|
|
170
|
+
|
|
171
|
+
- Moved pattern to EMAIL_REGEX constant
|
|
172
|
+
- No behavior changes
|
|
173
|
+
- Tests still pass
|
|
162
174
|
```
|
|
163
175
|
|
|
164
|
-
This pattern
|
|
165
|
-
-
|
|
166
|
-
-
|
|
167
|
-
|
|
176
|
+
**This aligns with the standard task commit pattern:**
|
|
177
|
+
- Non-TDD tasks: 1 commit per task (feat/fix)
|
|
178
|
+
- TDD tasks: 2-3 commits per task (test/feat/refactor)
|
|
179
|
+
|
|
180
|
+
Both follow same format: `{type}({phase}-{plan}): {description}`
|
|
181
|
+
|
|
182
|
+
**Benefits:**
|
|
183
|
+
- Each commit independently revertable
|
|
184
|
+
- Git bisect works at commit level (not just task level)
|
|
185
|
+
- Clear history showing TDD discipline
|
|
186
|
+
- Consistent with overall commit strategy
|
|
168
187
|
</commit_pattern>
|
|
@@ -62,6 +62,18 @@ completed: YYYY-MM-DD
|
|
|
62
62
|
- [Second key accomplishment]
|
|
63
63
|
- [Third if applicable]
|
|
64
64
|
|
|
65
|
+
## Task Commits
|
|
66
|
+
|
|
67
|
+
Each task was committed atomically:
|
|
68
|
+
|
|
69
|
+
1. **Task 1: [task name]** - `abc123f` (feat/fix/test/refactor)
|
|
70
|
+
2. **Task 2: [task name]** - `def456g` (feat/fix/test/refactor)
|
|
71
|
+
3. **Task 3: [task name]** - `hij789k` (feat/fix/test/refactor)
|
|
72
|
+
|
|
73
|
+
**Plan metadata:** `lmn012o` (docs: complete plan)
|
|
74
|
+
|
|
75
|
+
_Note: TDD tasks may have multiple commits (test → feat → refactor)_
|
|
76
|
+
|
|
65
77
|
## Files Created/Modified
|
|
66
78
|
- `path/to/file.ts` - What it does
|
|
67
79
|
- `path/to/another.ts` - What it does
|
|
@@ -83,7 +95,7 @@ completed: YYYY-MM-DD
|
|
|
83
95
|
- **Fix:** [What was done]
|
|
84
96
|
- **Files modified:** [file paths]
|
|
85
97
|
- **Verification:** [How it was verified]
|
|
86
|
-
- **
|
|
98
|
+
- **Committed in:** [hash] (part of task commit)
|
|
87
99
|
|
|
88
100
|
[... repeat for each auto-fix ...]
|
|
89
101
|
|
|
@@ -189,7 +201,7 @@ The one-liner should tell someone what actually shipped.
|
|
|
189
201
|
- **Fix:** Added bcrypt hashing on registration, comparison on login with salt rounds 10
|
|
190
202
|
- **Files modified:** src/app/api/auth/login/route.ts, src/lib/auth.ts
|
|
191
203
|
- **Verification:** Password hash test passes, plaintext never stored
|
|
192
|
-
- **
|
|
204
|
+
- **Committed in:** abc123f (Task 2 commit)
|
|
193
205
|
|
|
194
206
|
**2. [Rule 3 - Blocking] Installed missing jose dependency**
|
|
195
207
|
- **Found during:** Task 4 (JWT token generation)
|
|
@@ -197,7 +209,7 @@ The one-liner should tell someone what actually shipped.
|
|
|
197
209
|
- **Fix:** Ran `npm install jose`
|
|
198
210
|
- **Files modified:** package.json, package-lock.json
|
|
199
211
|
- **Verification:** Import succeeds, build passes
|
|
200
|
-
- **
|
|
212
|
+
- **Committed in:** def456g (Task 4 commit)
|
|
201
213
|
|
|
202
214
|
### Deferred Enhancements
|
|
203
215
|
|
|
@@ -440,8 +440,8 @@ Execute each task in the prompt. **Deviations are normal** - handle them automat
|
|
|
440
440
|
**If `type="auto"`:**
|
|
441
441
|
|
|
442
442
|
**Before executing:** Check if task has `tdd="true"` attribute:
|
|
443
|
-
- If yes: Follow TDD execution flow (see `<tdd_execution>`) - RED → GREEN → REFACTOR cycle with
|
|
444
|
-
- If no: Standard implementation
|
|
443
|
+
- If yes: Follow TDD execution flow (see `<tdd_execution>`) - RED → GREEN → REFACTOR cycle with atomic commits per stage
|
|
444
|
+
- If no: Standard implementation
|
|
445
445
|
|
|
446
446
|
- Work toward task completion
|
|
447
447
|
- **If CLI/API returns authentication error:** Handle as authentication gate (see below)
|
|
@@ -449,7 +449,8 @@ Execute each task in the prompt. **Deviations are normal** - handle them automat
|
|
|
449
449
|
- Continue implementing, applying rules as needed
|
|
450
450
|
- Run the verification
|
|
451
451
|
- Confirm done criteria met
|
|
452
|
-
-
|
|
452
|
+
- **Commit the task** (see `<task_commit>` below)
|
|
453
|
+
- Track task completion and commit hash for Summary documentation
|
|
453
454
|
- Continue to next task
|
|
454
455
|
|
|
455
456
|
**If `type="checkpoint:*"`:**
|
|
@@ -860,8 +861,118 @@ After TDD task completion, ensure:
|
|
|
860
861
|
- All tests pass
|
|
861
862
|
- Test coverage for the new behavior exists
|
|
862
863
|
- No unrelated tests broken
|
|
864
|
+
|
|
865
|
+
**Note:** TDD tasks produce 2-3 commits (test/feat/refactor). Non-TDD tasks produce 1 commit after task completion.
|
|
863
866
|
</tdd_execution>
|
|
864
867
|
|
|
868
|
+
<task_commit>
|
|
869
|
+
## Task Commit Protocol
|
|
870
|
+
|
|
871
|
+
After each task completes (verification passed, done criteria met), commit immediately:
|
|
872
|
+
|
|
873
|
+
**1. Identify modified files:**
|
|
874
|
+
|
|
875
|
+
Track files changed during this specific task (not the entire plan):
|
|
876
|
+
|
|
877
|
+
```bash
|
|
878
|
+
git status --short
|
|
879
|
+
```
|
|
880
|
+
|
|
881
|
+
**2. Stage only task-related files:**
|
|
882
|
+
|
|
883
|
+
Stage each file individually (NEVER use `git add .` or `git add -A`):
|
|
884
|
+
|
|
885
|
+
```bash
|
|
886
|
+
# Example - adjust to actual files modified by this task
|
|
887
|
+
git add src/api/auth.ts
|
|
888
|
+
git add src/types/user.ts
|
|
889
|
+
```
|
|
890
|
+
|
|
891
|
+
**3. Determine commit type:**
|
|
892
|
+
|
|
893
|
+
| Type | When to Use | Example |
|
|
894
|
+
|------|-------------|---------|
|
|
895
|
+
| `feat` | New feature, endpoint, component, functionality | feat(08-02): create user registration endpoint |
|
|
896
|
+
| `fix` | Bug fix, error correction | fix(08-02): correct email validation regex |
|
|
897
|
+
| `test` | Test-only changes (TDD RED phase) | test(08-02): add failing test for password hashing |
|
|
898
|
+
| `refactor` | Code cleanup, no behavior change (TDD REFACTOR phase) | refactor(08-02): extract validation to helper |
|
|
899
|
+
| `perf` | Performance improvement | perf(08-02): add database index for user lookups |
|
|
900
|
+
| `docs` | Documentation changes | docs(08-02): add API endpoint documentation |
|
|
901
|
+
| `style` | Formatting, linting fixes | style(08-02): format auth module |
|
|
902
|
+
| `chore` | Config, tooling, dependencies | chore(08-02): add bcrypt dependency |
|
|
903
|
+
|
|
904
|
+
**4. Craft commit message:**
|
|
905
|
+
|
|
906
|
+
Format: `{type}({phase}-{plan}): {task-name-or-description}`
|
|
907
|
+
|
|
908
|
+
```bash
|
|
909
|
+
git commit -m "{type}({phase}-{plan}): {concise task description}
|
|
910
|
+
|
|
911
|
+
- {key change 1}
|
|
912
|
+
- {key change 2}
|
|
913
|
+
- {key change 3}
|
|
914
|
+
"
|
|
915
|
+
```
|
|
916
|
+
|
|
917
|
+
**Examples:**
|
|
918
|
+
|
|
919
|
+
```bash
|
|
920
|
+
# Non-TDD task
|
|
921
|
+
git commit -m "feat(08-02): create user registration endpoint
|
|
922
|
+
|
|
923
|
+
- POST /auth/register validates email and password
|
|
924
|
+
- Checks for duplicate users
|
|
925
|
+
- Returns JWT token on success
|
|
926
|
+
"
|
|
927
|
+
|
|
928
|
+
# TDD task - RED phase
|
|
929
|
+
git commit -m "test(07-02): add failing test for JWT generation
|
|
930
|
+
|
|
931
|
+
- Tests token contains user ID claim
|
|
932
|
+
- Tests token expires in 1 hour
|
|
933
|
+
- Tests signature verification
|
|
934
|
+
"
|
|
935
|
+
|
|
936
|
+
# TDD task - GREEN phase
|
|
937
|
+
git commit -m "feat(07-02): implement JWT generation
|
|
938
|
+
|
|
939
|
+
- Uses jose library for signing
|
|
940
|
+
- Includes user ID and expiry claims
|
|
941
|
+
- Signs with HS256 algorithm
|
|
942
|
+
"
|
|
943
|
+
|
|
944
|
+
# TDD task - REFACTOR phase
|
|
945
|
+
git commit -m "refactor(07-02): extract JWT config to constants
|
|
946
|
+
|
|
947
|
+
- Moved expiry time to constant
|
|
948
|
+
- Centralized algorithm selection
|
|
949
|
+
- No behavior changes
|
|
950
|
+
"
|
|
951
|
+
```
|
|
952
|
+
|
|
953
|
+
**5. Record commit hash:**
|
|
954
|
+
|
|
955
|
+
After committing, capture hash for SUMMARY.md:
|
|
956
|
+
|
|
957
|
+
```bash
|
|
958
|
+
TASK_COMMIT=$(git rev-parse --short HEAD)
|
|
959
|
+
echo "Task ${TASK_NUM} committed: ${TASK_COMMIT}"
|
|
960
|
+
```
|
|
961
|
+
|
|
962
|
+
Store in array or list for SUMMARY generation:
|
|
963
|
+
```bash
|
|
964
|
+
TASK_COMMITS+=("Task ${TASK_NUM}: ${TASK_COMMIT}")
|
|
965
|
+
```
|
|
966
|
+
|
|
967
|
+
**Atomic commit benefits:**
|
|
968
|
+
- Each task independently revertable
|
|
969
|
+
- Git bisect finds exact failing task
|
|
970
|
+
- Git blame traces line to specific task context
|
|
971
|
+
- Clear history for Claude in future sessions
|
|
972
|
+
- Better observability for AI-automated workflow
|
|
973
|
+
|
|
974
|
+
</task_commit>
|
|
975
|
+
|
|
865
976
|
<step name="checkpoint_protocol">
|
|
866
977
|
When encountering `type="checkpoint:*"`:
|
|
867
978
|
|
|
@@ -1181,16 +1292,11 @@ ROADMAP_FILE=".planning/ROADMAP.md"
|
|
|
1181
1292
|
- Add completion date
|
|
1182
1293
|
</step>
|
|
1183
1294
|
|
|
1184
|
-
<step name="
|
|
1185
|
-
Commit plan
|
|
1186
|
-
|
|
1187
|
-
**Critical: Stage only files this plan actually modified.**
|
|
1295
|
+
<step name="git_commit_metadata">
|
|
1296
|
+
Commit plan metadata (SUMMARY + STATE + ROADMAP):
|
|
1188
1297
|
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
- `git add .`
|
|
1192
|
-
- `git add -A`
|
|
1193
|
-
- `git add src/` or any broad directory add
|
|
1298
|
+
**Note:** All task code has already been committed during execution (one commit per task).
|
|
1299
|
+
This final commit captures plan completion metadata only.
|
|
1194
1300
|
|
|
1195
1301
|
**1. Stage planning artifacts:**
|
|
1196
1302
|
|
|
@@ -1203,45 +1309,73 @@ git add .planning/STATE.md
|
|
|
1203
1309
|
**2. Stage roadmap file:**
|
|
1204
1310
|
|
|
1205
1311
|
```bash
|
|
1206
|
-
|
|
1207
|
-
git add .planning/ROADMAP.md
|
|
1208
|
-
else
|
|
1209
|
-
git add .planning/ROADMAP.md
|
|
1210
|
-
fi
|
|
1312
|
+
git add .planning/ROADMAP.md
|
|
1211
1313
|
```
|
|
1212
1314
|
|
|
1213
|
-
**3.
|
|
1214
|
-
|
|
1215
|
-
**4. Verify staging before commit:**
|
|
1315
|
+
**3. Verify staging:**
|
|
1216
1316
|
|
|
1217
1317
|
```bash
|
|
1218
1318
|
git status
|
|
1219
|
-
#
|
|
1319
|
+
# Should show only planning artifacts, no code files
|
|
1220
1320
|
```
|
|
1221
1321
|
|
|
1222
|
-
**
|
|
1322
|
+
**4. Commit metadata:**
|
|
1223
1323
|
|
|
1224
1324
|
```bash
|
|
1225
1325
|
git commit -m "$(cat <<'EOF'
|
|
1226
|
-
|
|
1326
|
+
docs({phase}-{plan}): complete [plan-name] plan
|
|
1227
1327
|
|
|
1228
|
-
|
|
1229
|
-
- [
|
|
1230
|
-
- [
|
|
1328
|
+
Tasks completed: [N]/[N]
|
|
1329
|
+
- [Task 1 name]
|
|
1330
|
+
- [Task 2 name]
|
|
1331
|
+
- [Task 3 name]
|
|
1332
|
+
|
|
1333
|
+
SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
1334
|
+
EOF
|
|
1335
|
+
)"
|
|
1336
|
+
```
|
|
1337
|
+
|
|
1338
|
+
**Example:**
|
|
1339
|
+
|
|
1340
|
+
```bash
|
|
1341
|
+
git commit -m "$(cat <<'EOF'
|
|
1342
|
+
docs(08-02): complete user registration plan
|
|
1343
|
+
|
|
1344
|
+
Tasks completed: 3/3
|
|
1345
|
+
- User registration endpoint
|
|
1346
|
+
- Password hashing with bcrypt
|
|
1347
|
+
- Email confirmation flow
|
|
1348
|
+
|
|
1349
|
+
SUMMARY: .planning/phases/08-user-auth/08-02-registration-SUMMARY.md
|
|
1231
1350
|
EOF
|
|
1232
1351
|
)"
|
|
1233
1352
|
```
|
|
1234
1353
|
|
|
1235
|
-
|
|
1354
|
+
**Git log after plan execution:**
|
|
1355
|
+
|
|
1356
|
+
```
|
|
1357
|
+
abc123f docs(08-02): complete user registration plan
|
|
1358
|
+
def456g feat(08-02): add email confirmation flow
|
|
1359
|
+
hij789k feat(08-02): implement password hashing with bcrypt
|
|
1360
|
+
lmn012o feat(08-02): create user registration endpoint
|
|
1361
|
+
```
|
|
1362
|
+
|
|
1363
|
+
Each task has its own commit, followed by one metadata commit documenting plan completion.
|
|
1364
|
+
|
|
1365
|
+
For commit message conventions, see ~/.claude/get-shit-done/references/git-integration.md
|
|
1236
1366
|
</step>
|
|
1237
1367
|
|
|
1238
1368
|
<step name="update_codebase_map">
|
|
1239
1369
|
**If .planning/codebase/ exists:**
|
|
1240
1370
|
|
|
1241
|
-
Check what changed in this plan:
|
|
1371
|
+
Check what changed across all task commits in this plan:
|
|
1242
1372
|
|
|
1243
1373
|
```bash
|
|
1244
|
-
|
|
1374
|
+
# Find first task commit (right after previous plan's docs commit)
|
|
1375
|
+
FIRST_TASK=$(git log --oneline --grep="feat({phase}-{plan}):" --grep="fix({phase}-{plan}):" --grep="test({phase}-{plan}):" --reverse | head -1 | cut -d' ' -f1)
|
|
1376
|
+
|
|
1377
|
+
# Get all changes from first task through now
|
|
1378
|
+
git diff --name-only ${FIRST_TASK}^..HEAD 2>/dev/null
|
|
1245
1379
|
```
|
|
1246
1380
|
|
|
1247
1381
|
**Update only if structural changes occurred:**
|
|
@@ -1265,7 +1399,7 @@ Make single targeted edits - add a bullet point, update a path, or remove a stal
|
|
|
1265
1399
|
|
|
1266
1400
|
```bash
|
|
1267
1401
|
git add .planning/codebase/*.md
|
|
1268
|
-
git commit --amend --no-edit # Include in
|
|
1402
|
+
git commit --amend --no-edit # Include in metadata commit
|
|
1269
1403
|
```
|
|
1270
1404
|
|
|
1271
1405
|
**If .planning/codebase/ doesn't exist:**
|
package/package.json
CHANGED