gsd-codex-cli 1.20.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/.codex/prompts/gsd-add-phase.md +44 -0
- package/.codex/prompts/gsd-add-todo.md +43 -0
- package/.codex/prompts/gsd-audit-milestone.md +43 -0
- package/.codex/prompts/gsd-check-todos.md +43 -0
- package/.codex/prompts/gsd-complete-milestone.md +43 -0
- package/.codex/prompts/gsd-debug.md +46 -0
- package/.codex/prompts/gsd-discuss-phase.md +43 -0
- package/.codex/prompts/gsd-execute-phase.md +43 -0
- package/.codex/prompts/gsd-help.md +43 -0
- package/.codex/prompts/gsd-insert-phase.md +43 -0
- package/.codex/prompts/gsd-list-phase-assumptions.md +43 -0
- package/.codex/prompts/gsd-map-codebase.md +43 -0
- package/.codex/prompts/gsd-new-milestone.md +43 -0
- package/.codex/prompts/gsd-new-project.md +43 -0
- package/.codex/prompts/gsd-pause-work.md +43 -0
- package/.codex/prompts/gsd-plan-milestone-gaps.md +43 -0
- package/.codex/prompts/gsd-plan-phase.md +43 -0
- package/.codex/prompts/gsd-progress.md +43 -0
- package/.codex/prompts/gsd-quick.md +43 -0
- package/.codex/prompts/gsd-remove-phase.md +43 -0
- package/.codex/prompts/gsd-research-phase.md +43 -0
- package/.codex/prompts/gsd-resume-work.md +43 -0
- package/.codex/prompts/gsd-set-profile.md +43 -0
- package/.codex/prompts/gsd-settings.md +43 -0
- package/.codex/prompts/gsd-update.md +43 -0
- package/.codex/prompts/gsd-verify-work.md +43 -0
- package/.codex/skills/get-shit-done-codex/SKILL.md +65 -0
- package/.codex/skills/get-shit-done-codex/references/compat.md +32 -0
- package/.codex/skills/get-shit-done-codex/references/windows.md +23 -0
- package/CHANGELOG.md +1434 -0
- package/LICENSE +21 -0
- package/README.md +690 -0
- package/agents/gsd-codebase-mapper.md +761 -0
- package/agents/gsd-debugger.md +1198 -0
- package/agents/gsd-executor.md +419 -0
- package/agents/gsd-integration-checker.md +423 -0
- package/agents/gsd-phase-researcher.md +469 -0
- package/agents/gsd-plan-checker.md +622 -0
- package/agents/gsd-planner.md +1159 -0
- package/agents/gsd-project-researcher.md +618 -0
- package/agents/gsd-research-synthesizer.md +236 -0
- package/agents/gsd-roadmapper.md +639 -0
- package/agents/gsd-verifier.md +541 -0
- package/bin/install-codex.js +100 -0
- package/bin/install.js +1806 -0
- package/commands/gsd/add-phase.md +39 -0
- package/commands/gsd/add-todo.md +42 -0
- package/commands/gsd/audit-milestone.md +42 -0
- package/commands/gsd/check-todos.md +41 -0
- package/commands/gsd/cleanup.md +18 -0
- package/commands/gsd/complete-milestone.md +136 -0
- package/commands/gsd/debug.md +162 -0
- package/commands/gsd/discuss-phase.md +87 -0
- package/commands/gsd/execute-phase.md +42 -0
- package/commands/gsd/health.md +22 -0
- package/commands/gsd/help.md +22 -0
- package/commands/gsd/insert-phase.md +33 -0
- package/commands/gsd/join-discord.md +18 -0
- package/commands/gsd/list-phase-assumptions.md +50 -0
- package/commands/gsd/map-codebase.md +71 -0
- package/commands/gsd/new-milestone.md +51 -0
- package/commands/gsd/new-project.md +42 -0
- package/commands/gsd/pause-work.md +35 -0
- package/commands/gsd/plan-milestone-gaps.md +40 -0
- package/commands/gsd/plan-phase.md +44 -0
- package/commands/gsd/progress.md +24 -0
- package/commands/gsd/quick.md +40 -0
- package/commands/gsd/reapply-patches.md +110 -0
- package/commands/gsd/remove-phase.md +32 -0
- package/commands/gsd/research-phase.md +187 -0
- package/commands/gsd/resume-work.md +40 -0
- package/commands/gsd/set-profile.md +34 -0
- package/commands/gsd/settings.md +36 -0
- package/commands/gsd/update.md +37 -0
- package/commands/gsd/verify-work.md +39 -0
- package/get-shit-done/bin/gsd-tools.cjs +5243 -0
- package/get-shit-done/bin/gsd-tools.test.cjs +2273 -0
- package/get-shit-done/references/checkpoints.md +775 -0
- package/get-shit-done/references/continuation-format.md +249 -0
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +248 -0
- package/get-shit-done/references/git-planning-commit.md +38 -0
- package/get-shit-done/references/model-profile-resolution.md +34 -0
- package/get-shit-done/references/model-profiles.md +92 -0
- package/get-shit-done/references/phase-argument-parsing.md +61 -0
- package/get-shit-done/references/planning-config.md +196 -0
- package/get-shit-done/references/questioning.md +145 -0
- package/get-shit-done/references/tdd.md +263 -0
- package/get-shit-done/references/ui-brand.md +160 -0
- package/get-shit-done/references/verification-patterns.md +612 -0
- package/get-shit-done/templates/DEBUG.md +159 -0
- package/get-shit-done/templates/UAT.md +247 -0
- package/get-shit-done/templates/codebase/architecture.md +255 -0
- package/get-shit-done/templates/codebase/concerns.md +310 -0
- package/get-shit-done/templates/codebase/conventions.md +307 -0
- package/get-shit-done/templates/codebase/integrations.md +280 -0
- package/get-shit-done/templates/codebase/stack.md +186 -0
- package/get-shit-done/templates/codebase/structure.md +285 -0
- package/get-shit-done/templates/codebase/testing.md +480 -0
- package/get-shit-done/templates/config.json +36 -0
- package/get-shit-done/templates/context.md +283 -0
- package/get-shit-done/templates/continue-here.md +78 -0
- package/get-shit-done/templates/debug-subagent-prompt.md +91 -0
- package/get-shit-done/templates/discovery.md +146 -0
- package/get-shit-done/templates/milestone-archive.md +123 -0
- package/get-shit-done/templates/milestone.md +115 -0
- package/get-shit-done/templates/phase-prompt.md +567 -0
- package/get-shit-done/templates/planner-subagent-prompt.md +117 -0
- package/get-shit-done/templates/project.md +184 -0
- package/get-shit-done/templates/requirements.md +231 -0
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/get-shit-done/templates/research-project/FEATURES.md +147 -0
- package/get-shit-done/templates/research-project/PITFALLS.md +200 -0
- package/get-shit-done/templates/research-project/STACK.md +120 -0
- package/get-shit-done/templates/research-project/SUMMARY.md +170 -0
- package/get-shit-done/templates/research.md +552 -0
- package/get-shit-done/templates/roadmap.md +202 -0
- package/get-shit-done/templates/state.md +176 -0
- package/get-shit-done/templates/summary-complex.md +59 -0
- package/get-shit-done/templates/summary-minimal.md +41 -0
- package/get-shit-done/templates/summary-standard.md +48 -0
- package/get-shit-done/templates/summary.md +246 -0
- package/get-shit-done/templates/user-setup.md +311 -0
- package/get-shit-done/templates/verification-report.md +322 -0
- package/get-shit-done/workflows/add-phase.md +111 -0
- package/get-shit-done/workflows/add-todo.md +157 -0
- package/get-shit-done/workflows/audit-milestone.md +242 -0
- package/get-shit-done/workflows/check-todos.md +176 -0
- package/get-shit-done/workflows/cleanup.md +152 -0
- package/get-shit-done/workflows/complete-milestone.md +674 -0
- package/get-shit-done/workflows/diagnose-issues.md +219 -0
- package/get-shit-done/workflows/discovery-phase.md +289 -0
- package/get-shit-done/workflows/discuss-phase.md +485 -0
- package/get-shit-done/workflows/execute-phase.md +408 -0
- package/get-shit-done/workflows/execute-plan.md +441 -0
- package/get-shit-done/workflows/health.md +156 -0
- package/get-shit-done/workflows/help.md +486 -0
- package/get-shit-done/workflows/insert-phase.md +129 -0
- package/get-shit-done/workflows/list-phase-assumptions.md +178 -0
- package/get-shit-done/workflows/map-codebase.md +327 -0
- package/get-shit-done/workflows/new-milestone.md +373 -0
- package/get-shit-done/workflows/new-project.md +1113 -0
- package/get-shit-done/workflows/pause-work.md +122 -0
- package/get-shit-done/workflows/plan-milestone-gaps.md +256 -0
- package/get-shit-done/workflows/plan-phase.md +448 -0
- package/get-shit-done/workflows/progress.md +393 -0
- package/get-shit-done/workflows/quick.md +444 -0
- package/get-shit-done/workflows/remove-phase.md +154 -0
- package/get-shit-done/workflows/research-phase.md +74 -0
- package/get-shit-done/workflows/resume-project.md +306 -0
- package/get-shit-done/workflows/set-profile.md +80 -0
- package/get-shit-done/workflows/settings.md +200 -0
- package/get-shit-done/workflows/transition.md +539 -0
- package/get-shit-done/workflows/update.md +214 -0
- package/get-shit-done/workflows/verify-phase.md +242 -0
- package/get-shit-done/workflows/verify-work.md +570 -0
- package/hooks/dist/gsd-check-update.js +62 -0
- package/hooks/dist/gsd-statusline.js +91 -0
- package/package.json +54 -0
- package/scripts/build-hooks.js +42 -0
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# Debug Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/debug/[slug].md` — active debug session tracking.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
status: gathering | investigating | fixing | verifying | resolved
|
|
12
|
+
trigger: "[verbatim user input]"
|
|
13
|
+
created: [ISO timestamp]
|
|
14
|
+
updated: [ISO timestamp]
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Current Focus
|
|
18
|
+
<!-- OVERWRITE on each update - always reflects NOW -->
|
|
19
|
+
|
|
20
|
+
hypothesis: [current theory being tested]
|
|
21
|
+
test: [how testing it]
|
|
22
|
+
expecting: [what result means if true/false]
|
|
23
|
+
next_action: [immediate next step]
|
|
24
|
+
|
|
25
|
+
## Symptoms
|
|
26
|
+
<!-- Written during gathering, then immutable -->
|
|
27
|
+
|
|
28
|
+
expected: [what should happen]
|
|
29
|
+
actual: [what actually happens]
|
|
30
|
+
errors: [error messages if any]
|
|
31
|
+
reproduction: [how to trigger]
|
|
32
|
+
started: [when it broke / always broken]
|
|
33
|
+
|
|
34
|
+
## Eliminated
|
|
35
|
+
<!-- APPEND only - prevents re-investigating after /clear -->
|
|
36
|
+
|
|
37
|
+
- hypothesis: [theory that was wrong]
|
|
38
|
+
evidence: [what disproved it]
|
|
39
|
+
timestamp: [when eliminated]
|
|
40
|
+
|
|
41
|
+
## Evidence
|
|
42
|
+
<!-- APPEND only - facts discovered during investigation -->
|
|
43
|
+
|
|
44
|
+
- timestamp: [when found]
|
|
45
|
+
checked: [what was examined]
|
|
46
|
+
found: [what was observed]
|
|
47
|
+
implication: [what this means]
|
|
48
|
+
|
|
49
|
+
## Resolution
|
|
50
|
+
<!-- OVERWRITE as understanding evolves -->
|
|
51
|
+
|
|
52
|
+
root_cause: [empty until found]
|
|
53
|
+
fix: [empty until applied]
|
|
54
|
+
verification: [empty until verified]
|
|
55
|
+
files_changed: []
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
<section_rules>
|
|
61
|
+
|
|
62
|
+
**Frontmatter (status, trigger, timestamps):**
|
|
63
|
+
- `status`: OVERWRITE - reflects current phase
|
|
64
|
+
- `trigger`: IMMUTABLE - verbatim user input, never changes
|
|
65
|
+
- `created`: IMMUTABLE - set once
|
|
66
|
+
- `updated`: OVERWRITE - update on every change
|
|
67
|
+
|
|
68
|
+
**Current Focus:**
|
|
69
|
+
- OVERWRITE entirely on each update
|
|
70
|
+
- Always reflects what Claude is doing RIGHT NOW
|
|
71
|
+
- If Claude reads this after /clear, it knows exactly where to resume
|
|
72
|
+
- Fields: hypothesis, test, expecting, next_action
|
|
73
|
+
|
|
74
|
+
**Symptoms:**
|
|
75
|
+
- Written during initial gathering phase
|
|
76
|
+
- IMMUTABLE after gathering complete
|
|
77
|
+
- Reference point for what we're trying to fix
|
|
78
|
+
- Fields: expected, actual, errors, reproduction, started
|
|
79
|
+
|
|
80
|
+
**Eliminated:**
|
|
81
|
+
- APPEND only - never remove entries
|
|
82
|
+
- Prevents re-investigating dead ends after context reset
|
|
83
|
+
- Each entry: hypothesis, evidence that disproved it, timestamp
|
|
84
|
+
- Critical for efficiency across /clear boundaries
|
|
85
|
+
|
|
86
|
+
**Evidence:**
|
|
87
|
+
- APPEND only - never remove entries
|
|
88
|
+
- Facts discovered during investigation
|
|
89
|
+
- Each entry: timestamp, what checked, what found, implication
|
|
90
|
+
- Builds the case for root cause
|
|
91
|
+
|
|
92
|
+
**Resolution:**
|
|
93
|
+
- OVERWRITE as understanding evolves
|
|
94
|
+
- May update multiple times as fixes are tried
|
|
95
|
+
- Final state shows confirmed root cause and verified fix
|
|
96
|
+
- Fields: root_cause, fix, verification, files_changed
|
|
97
|
+
|
|
98
|
+
</section_rules>
|
|
99
|
+
|
|
100
|
+
<lifecycle>
|
|
101
|
+
|
|
102
|
+
**Creation:** Immediately when /gsd:debug is called
|
|
103
|
+
- Create file with trigger from user input
|
|
104
|
+
- Set status to "gathering"
|
|
105
|
+
- Current Focus: next_action = "gather symptoms"
|
|
106
|
+
- Symptoms: empty, to be filled
|
|
107
|
+
|
|
108
|
+
**During symptom gathering:**
|
|
109
|
+
- Update Symptoms section as user answers questions
|
|
110
|
+
- Update Current Focus with each question
|
|
111
|
+
- When complete: status → "investigating"
|
|
112
|
+
|
|
113
|
+
**During investigation:**
|
|
114
|
+
- OVERWRITE Current Focus with each hypothesis
|
|
115
|
+
- APPEND to Evidence with each finding
|
|
116
|
+
- APPEND to Eliminated when hypothesis disproved
|
|
117
|
+
- Update timestamp in frontmatter
|
|
118
|
+
|
|
119
|
+
**During fixing:**
|
|
120
|
+
- status → "fixing"
|
|
121
|
+
- Update Resolution.root_cause when confirmed
|
|
122
|
+
- Update Resolution.fix when applied
|
|
123
|
+
- Update Resolution.files_changed
|
|
124
|
+
|
|
125
|
+
**During verification:**
|
|
126
|
+
- status → "verifying"
|
|
127
|
+
- Update Resolution.verification with results
|
|
128
|
+
- If verification fails: status → "investigating", try again
|
|
129
|
+
|
|
130
|
+
**On resolution:**
|
|
131
|
+
- status → "resolved"
|
|
132
|
+
- Move file to .planning/debug/resolved/
|
|
133
|
+
|
|
134
|
+
</lifecycle>
|
|
135
|
+
|
|
136
|
+
<resume_behavior>
|
|
137
|
+
|
|
138
|
+
When Claude reads this file after /clear:
|
|
139
|
+
|
|
140
|
+
1. Parse frontmatter → know status
|
|
141
|
+
2. Read Current Focus → know exactly what was happening
|
|
142
|
+
3. Read Eliminated → know what NOT to retry
|
|
143
|
+
4. Read Evidence → know what's been learned
|
|
144
|
+
5. Continue from next_action
|
|
145
|
+
|
|
146
|
+
The file IS the debugging brain. Claude should be able to resume perfectly from any interruption point.
|
|
147
|
+
|
|
148
|
+
</resume_behavior>
|
|
149
|
+
|
|
150
|
+
<size_constraint>
|
|
151
|
+
|
|
152
|
+
Keep debug files focused:
|
|
153
|
+
- Evidence entries: 1-2 lines each, just the facts
|
|
154
|
+
- Eliminated: brief - hypothesis + why it failed
|
|
155
|
+
- No narrative prose - structured data only
|
|
156
|
+
|
|
157
|
+
If evidence grows very large (10+ entries), consider whether you're going in circles. Check Eliminated to ensure you're not re-treading.
|
|
158
|
+
|
|
159
|
+
</size_constraint>
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
# UAT Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/phases/XX-name/{phase_num}-UAT.md` — persistent UAT session tracking.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## File Template
|
|
8
|
+
|
|
9
|
+
```markdown
|
|
10
|
+
---
|
|
11
|
+
status: testing | complete | diagnosed
|
|
12
|
+
phase: XX-name
|
|
13
|
+
source: [list of SUMMARY.md files tested]
|
|
14
|
+
started: [ISO timestamp]
|
|
15
|
+
updated: [ISO timestamp]
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
## Current Test
|
|
19
|
+
<!-- OVERWRITE each test - shows where we are -->
|
|
20
|
+
|
|
21
|
+
number: [N]
|
|
22
|
+
name: [test name]
|
|
23
|
+
expected: |
|
|
24
|
+
[what user should observe]
|
|
25
|
+
awaiting: user response
|
|
26
|
+
|
|
27
|
+
## Tests
|
|
28
|
+
|
|
29
|
+
### 1. [Test Name]
|
|
30
|
+
expected: [observable behavior - what user should see]
|
|
31
|
+
result: [pending]
|
|
32
|
+
|
|
33
|
+
### 2. [Test Name]
|
|
34
|
+
expected: [observable behavior]
|
|
35
|
+
result: pass
|
|
36
|
+
|
|
37
|
+
### 3. [Test Name]
|
|
38
|
+
expected: [observable behavior]
|
|
39
|
+
result: issue
|
|
40
|
+
reported: "[verbatim user response]"
|
|
41
|
+
severity: major
|
|
42
|
+
|
|
43
|
+
### 4. [Test Name]
|
|
44
|
+
expected: [observable behavior]
|
|
45
|
+
result: skipped
|
|
46
|
+
reason: [why skipped]
|
|
47
|
+
|
|
48
|
+
...
|
|
49
|
+
|
|
50
|
+
## Summary
|
|
51
|
+
|
|
52
|
+
total: [N]
|
|
53
|
+
passed: [N]
|
|
54
|
+
issues: [N]
|
|
55
|
+
pending: [N]
|
|
56
|
+
skipped: [N]
|
|
57
|
+
|
|
58
|
+
## Gaps
|
|
59
|
+
|
|
60
|
+
<!-- YAML format for plan-phase --gaps consumption -->
|
|
61
|
+
- truth: "[expected behavior from test]"
|
|
62
|
+
status: failed
|
|
63
|
+
reason: "User reported: [verbatim response]"
|
|
64
|
+
severity: blocker | major | minor | cosmetic
|
|
65
|
+
test: [N]
|
|
66
|
+
root_cause: "" # Filled by diagnosis
|
|
67
|
+
artifacts: [] # Filled by diagnosis
|
|
68
|
+
missing: [] # Filled by diagnosis
|
|
69
|
+
debug_session: "" # Filled by diagnosis
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
<section_rules>
|
|
75
|
+
|
|
76
|
+
**Frontmatter:**
|
|
77
|
+
- `status`: OVERWRITE - "testing" or "complete"
|
|
78
|
+
- `phase`: IMMUTABLE - set on creation
|
|
79
|
+
- `source`: IMMUTABLE - SUMMARY files being tested
|
|
80
|
+
- `started`: IMMUTABLE - set on creation
|
|
81
|
+
- `updated`: OVERWRITE - update on every change
|
|
82
|
+
|
|
83
|
+
**Current Test:**
|
|
84
|
+
- OVERWRITE entirely on each test transition
|
|
85
|
+
- Shows which test is active and what's awaited
|
|
86
|
+
- On completion: "[testing complete]"
|
|
87
|
+
|
|
88
|
+
**Tests:**
|
|
89
|
+
- Each test: OVERWRITE result field when user responds
|
|
90
|
+
- `result` values: [pending], pass, issue, skipped
|
|
91
|
+
- If issue: add `reported` (verbatim) and `severity` (inferred)
|
|
92
|
+
- If skipped: add `reason` if provided
|
|
93
|
+
|
|
94
|
+
**Summary:**
|
|
95
|
+
- OVERWRITE counts after each response
|
|
96
|
+
- Tracks: total, passed, issues, pending, skipped
|
|
97
|
+
|
|
98
|
+
**Gaps:**
|
|
99
|
+
- APPEND only when issue found (YAML format)
|
|
100
|
+
- After diagnosis: fill `root_cause`, `artifacts`, `missing`, `debug_session`
|
|
101
|
+
- This section feeds directly into /gsd:plan-phase --gaps
|
|
102
|
+
|
|
103
|
+
</section_rules>
|
|
104
|
+
|
|
105
|
+
<diagnosis_lifecycle>
|
|
106
|
+
|
|
107
|
+
**After testing complete (status: complete), if gaps exist:**
|
|
108
|
+
|
|
109
|
+
1. User runs diagnosis (from verify-work offer or manually)
|
|
110
|
+
2. diagnose-issues workflow spawns parallel debug agents
|
|
111
|
+
3. Each agent investigates one gap, returns root cause
|
|
112
|
+
4. UAT.md Gaps section updated with diagnosis:
|
|
113
|
+
- Each gap gets `root_cause`, `artifacts`, `missing`, `debug_session` filled
|
|
114
|
+
5. status → "diagnosed"
|
|
115
|
+
6. Ready for /gsd:plan-phase --gaps with root causes
|
|
116
|
+
|
|
117
|
+
**After diagnosis:**
|
|
118
|
+
```yaml
|
|
119
|
+
## Gaps
|
|
120
|
+
|
|
121
|
+
- truth: "Comment appears immediately after submission"
|
|
122
|
+
status: failed
|
|
123
|
+
reason: "User reported: works but doesn't show until I refresh the page"
|
|
124
|
+
severity: major
|
|
125
|
+
test: 2
|
|
126
|
+
root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
|
|
127
|
+
artifacts:
|
|
128
|
+
- path: "src/components/CommentList.tsx"
|
|
129
|
+
issue: "useEffect missing dependency"
|
|
130
|
+
missing:
|
|
131
|
+
- "Add commentCount to useEffect dependency array"
|
|
132
|
+
debug_session: ".planning/debug/comment-not-refreshing.md"
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
</diagnosis_lifecycle>
|
|
136
|
+
|
|
137
|
+
<lifecycle>
|
|
138
|
+
|
|
139
|
+
**Creation:** When /gsd:verify-work starts new session
|
|
140
|
+
- Extract tests from SUMMARY.md files
|
|
141
|
+
- Set status to "testing"
|
|
142
|
+
- Current Test points to test 1
|
|
143
|
+
- All tests have result: [pending]
|
|
144
|
+
|
|
145
|
+
**During testing:**
|
|
146
|
+
- Present test from Current Test section
|
|
147
|
+
- User responds with pass confirmation or issue description
|
|
148
|
+
- Update test result (pass/issue/skipped)
|
|
149
|
+
- Update Summary counts
|
|
150
|
+
- If issue: append to Gaps section (YAML format), infer severity
|
|
151
|
+
- Move Current Test to next pending test
|
|
152
|
+
|
|
153
|
+
**On completion:**
|
|
154
|
+
- status → "complete"
|
|
155
|
+
- Current Test → "[testing complete]"
|
|
156
|
+
- Commit file
|
|
157
|
+
- Present summary with next steps
|
|
158
|
+
|
|
159
|
+
**Resume after /clear:**
|
|
160
|
+
1. Read frontmatter → know phase and status
|
|
161
|
+
2. Read Current Test → know where we are
|
|
162
|
+
3. Find first [pending] result → continue from there
|
|
163
|
+
4. Summary shows progress so far
|
|
164
|
+
|
|
165
|
+
</lifecycle>
|
|
166
|
+
|
|
167
|
+
<severity_guide>
|
|
168
|
+
|
|
169
|
+
Severity is INFERRED from user's natural language, never asked.
|
|
170
|
+
|
|
171
|
+
| User describes | Infer |
|
|
172
|
+
|----------------|-------|
|
|
173
|
+
| Crash, error, exception, fails completely, unusable | blocker |
|
|
174
|
+
| Doesn't work, nothing happens, wrong behavior, missing | major |
|
|
175
|
+
| Works but..., slow, weird, minor, small issue | minor |
|
|
176
|
+
| Color, font, spacing, alignment, visual, looks off | cosmetic |
|
|
177
|
+
|
|
178
|
+
Default: **major** (safe default, user can clarify if wrong)
|
|
179
|
+
|
|
180
|
+
</severity_guide>
|
|
181
|
+
|
|
182
|
+
<good_example>
|
|
183
|
+
```markdown
|
|
184
|
+
---
|
|
185
|
+
status: diagnosed
|
|
186
|
+
phase: 04-comments
|
|
187
|
+
source: 04-01-SUMMARY.md, 04-02-SUMMARY.md
|
|
188
|
+
started: 2025-01-15T10:30:00Z
|
|
189
|
+
updated: 2025-01-15T10:45:00Z
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Current Test
|
|
193
|
+
|
|
194
|
+
[testing complete]
|
|
195
|
+
|
|
196
|
+
## Tests
|
|
197
|
+
|
|
198
|
+
### 1. View Comments on Post
|
|
199
|
+
expected: Comments section expands, shows count and comment list
|
|
200
|
+
result: pass
|
|
201
|
+
|
|
202
|
+
### 2. Create Top-Level Comment
|
|
203
|
+
expected: Submit comment via rich text editor, appears in list with author info
|
|
204
|
+
result: issue
|
|
205
|
+
reported: "works but doesn't show until I refresh the page"
|
|
206
|
+
severity: major
|
|
207
|
+
|
|
208
|
+
### 3. Reply to a Comment
|
|
209
|
+
expected: Click Reply, inline composer appears, submit shows nested reply
|
|
210
|
+
result: pass
|
|
211
|
+
|
|
212
|
+
### 4. Visual Nesting
|
|
213
|
+
expected: 3+ level thread shows indentation, left borders, caps at reasonable depth
|
|
214
|
+
result: pass
|
|
215
|
+
|
|
216
|
+
### 5. Delete Own Comment
|
|
217
|
+
expected: Click delete on own comment, removed or shows [deleted] if has replies
|
|
218
|
+
result: pass
|
|
219
|
+
|
|
220
|
+
### 6. Comment Count
|
|
221
|
+
expected: Post shows accurate count, increments when adding comment
|
|
222
|
+
result: pass
|
|
223
|
+
|
|
224
|
+
## Summary
|
|
225
|
+
|
|
226
|
+
total: 6
|
|
227
|
+
passed: 5
|
|
228
|
+
issues: 1
|
|
229
|
+
pending: 0
|
|
230
|
+
skipped: 0
|
|
231
|
+
|
|
232
|
+
## Gaps
|
|
233
|
+
|
|
234
|
+
- truth: "Comment appears immediately after submission in list"
|
|
235
|
+
status: failed
|
|
236
|
+
reason: "User reported: works but doesn't show until I refresh the page"
|
|
237
|
+
severity: major
|
|
238
|
+
test: 2
|
|
239
|
+
root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
|
|
240
|
+
artifacts:
|
|
241
|
+
- path: "src/components/CommentList.tsx"
|
|
242
|
+
issue: "useEffect missing dependency"
|
|
243
|
+
missing:
|
|
244
|
+
- "Add commentCount to useEffect dependency array"
|
|
245
|
+
debug_session: ".planning/debug/comment-not-refreshing.md"
|
|
246
|
+
```
|
|
247
|
+
</good_example>
|
|
@@ -0,0 +1,255 @@
|
|
|
1
|
+
# Architecture Template
|
|
2
|
+
|
|
3
|
+
Template for `.planning/codebase/ARCHITECTURE.md` - captures conceptual code organization.
|
|
4
|
+
|
|
5
|
+
**Purpose:** Document how the code is organized at a conceptual level. Complements STRUCTURE.md (which shows physical file locations).
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## File Template
|
|
10
|
+
|
|
11
|
+
```markdown
|
|
12
|
+
# Architecture
|
|
13
|
+
|
|
14
|
+
**Analysis Date:** [YYYY-MM-DD]
|
|
15
|
+
|
|
16
|
+
## Pattern Overview
|
|
17
|
+
|
|
18
|
+
**Overall:** [Pattern name: e.g., "Monolithic CLI", "Serverless API", "Full-stack MVC"]
|
|
19
|
+
|
|
20
|
+
**Key Characteristics:**
|
|
21
|
+
- [Characteristic 1: e.g., "Single executable"]
|
|
22
|
+
- [Characteristic 2: e.g., "Stateless request handling"]
|
|
23
|
+
- [Characteristic 3: e.g., "Event-driven"]
|
|
24
|
+
|
|
25
|
+
## Layers
|
|
26
|
+
|
|
27
|
+
[Describe the conceptual layers and their responsibilities]
|
|
28
|
+
|
|
29
|
+
**[Layer Name]:**
|
|
30
|
+
- Purpose: [What this layer does]
|
|
31
|
+
- Contains: [Types of code: e.g., "route handlers", "business logic"]
|
|
32
|
+
- Depends on: [What it uses: e.g., "data layer only"]
|
|
33
|
+
- Used by: [What uses it: e.g., "API routes"]
|
|
34
|
+
|
|
35
|
+
**[Layer Name]:**
|
|
36
|
+
- Purpose: [What this layer does]
|
|
37
|
+
- Contains: [Types of code]
|
|
38
|
+
- Depends on: [What it uses]
|
|
39
|
+
- Used by: [What uses it]
|
|
40
|
+
|
|
41
|
+
## Data Flow
|
|
42
|
+
|
|
43
|
+
[Describe the typical request/execution lifecycle]
|
|
44
|
+
|
|
45
|
+
**[Flow Name] (e.g., "HTTP Request", "CLI Command", "Event Processing"):**
|
|
46
|
+
|
|
47
|
+
1. [Entry point: e.g., "User runs command"]
|
|
48
|
+
2. [Processing step: e.g., "Router matches path"]
|
|
49
|
+
3. [Processing step: e.g., "Controller validates input"]
|
|
50
|
+
4. [Processing step: e.g., "Service executes logic"]
|
|
51
|
+
5. [Output: e.g., "Response returned"]
|
|
52
|
+
|
|
53
|
+
**State Management:**
|
|
54
|
+
- [How state is handled: e.g., "Stateless - no persistent state", "Database per request", "In-memory cache"]
|
|
55
|
+
|
|
56
|
+
## Key Abstractions
|
|
57
|
+
|
|
58
|
+
[Core concepts/patterns used throughout the codebase]
|
|
59
|
+
|
|
60
|
+
**[Abstraction Name]:**
|
|
61
|
+
- Purpose: [What it represents]
|
|
62
|
+
- Examples: [e.g., "UserService, ProjectService"]
|
|
63
|
+
- Pattern: [e.g., "Singleton", "Factory", "Repository"]
|
|
64
|
+
|
|
65
|
+
**[Abstraction Name]:**
|
|
66
|
+
- Purpose: [What it represents]
|
|
67
|
+
- Examples: [Concrete examples]
|
|
68
|
+
- Pattern: [Pattern used]
|
|
69
|
+
|
|
70
|
+
## Entry Points
|
|
71
|
+
|
|
72
|
+
[Where execution begins]
|
|
73
|
+
|
|
74
|
+
**[Entry Point]:**
|
|
75
|
+
- Location: [Brief: e.g., "src/index.ts", "API Gateway triggers"]
|
|
76
|
+
- Triggers: [What invokes it: e.g., "CLI invocation", "HTTP request"]
|
|
77
|
+
- Responsibilities: [What it does: e.g., "Parse args, route to command"]
|
|
78
|
+
|
|
79
|
+
## Error Handling
|
|
80
|
+
|
|
81
|
+
**Strategy:** [How errors are handled: e.g., "Exception bubbling to top-level handler", "Per-route error middleware"]
|
|
82
|
+
|
|
83
|
+
**Patterns:**
|
|
84
|
+
- [Pattern: e.g., "try/catch at controller level"]
|
|
85
|
+
- [Pattern: e.g., "Error codes returned to user"]
|
|
86
|
+
|
|
87
|
+
## Cross-Cutting Concerns
|
|
88
|
+
|
|
89
|
+
[Aspects that affect multiple layers]
|
|
90
|
+
|
|
91
|
+
**Logging:**
|
|
92
|
+
- [Approach: e.g., "Winston logger, injected per-request"]
|
|
93
|
+
|
|
94
|
+
**Validation:**
|
|
95
|
+
- [Approach: e.g., "Zod schemas at API boundary"]
|
|
96
|
+
|
|
97
|
+
**Authentication:**
|
|
98
|
+
- [Approach: e.g., "JWT middleware on protected routes"]
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
*Architecture analysis: [date]*
|
|
103
|
+
*Update when major patterns change*
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
<good_examples>
|
|
107
|
+
```markdown
|
|
108
|
+
# Architecture
|
|
109
|
+
|
|
110
|
+
**Analysis Date:** 2025-01-20
|
|
111
|
+
|
|
112
|
+
## Pattern Overview
|
|
113
|
+
|
|
114
|
+
**Overall:** CLI Application with Plugin System
|
|
115
|
+
|
|
116
|
+
**Key Characteristics:**
|
|
117
|
+
- Single executable with subcommands
|
|
118
|
+
- Plugin-based extensibility
|
|
119
|
+
- File-based state (no database)
|
|
120
|
+
- Synchronous execution model
|
|
121
|
+
|
|
122
|
+
## Layers
|
|
123
|
+
|
|
124
|
+
**Command Layer:**
|
|
125
|
+
- Purpose: Parse user input and route to appropriate handler
|
|
126
|
+
- Contains: Command definitions, argument parsing, help text
|
|
127
|
+
- Location: `src/commands/*.ts`
|
|
128
|
+
- Depends on: Service layer for business logic
|
|
129
|
+
- Used by: CLI entry point (`src/index.ts`)
|
|
130
|
+
|
|
131
|
+
**Service Layer:**
|
|
132
|
+
- Purpose: Core business logic
|
|
133
|
+
- Contains: FileService, TemplateService, InstallService
|
|
134
|
+
- Location: `src/services/*.ts`
|
|
135
|
+
- Depends on: File system utilities, external tools
|
|
136
|
+
- Used by: Command handlers
|
|
137
|
+
|
|
138
|
+
**Utility Layer:**
|
|
139
|
+
- Purpose: Shared helpers and abstractions
|
|
140
|
+
- Contains: File I/O wrappers, path resolution, string formatting
|
|
141
|
+
- Location: `src/utils/*.ts`
|
|
142
|
+
- Depends on: Node.js built-ins only
|
|
143
|
+
- Used by: Service layer
|
|
144
|
+
|
|
145
|
+
## Data Flow
|
|
146
|
+
|
|
147
|
+
**CLI Command Execution:**
|
|
148
|
+
|
|
149
|
+
1. User runs: `gsd new-project`
|
|
150
|
+
2. Commander parses args and flags
|
|
151
|
+
3. Command handler invoked (`src/commands/new-project.ts`)
|
|
152
|
+
4. Handler calls service methods (`src/services/project.ts` → `create()`)
|
|
153
|
+
5. Service reads templates, processes files, writes output
|
|
154
|
+
6. Results logged to console
|
|
155
|
+
7. Process exits with status code
|
|
156
|
+
|
|
157
|
+
**State Management:**
|
|
158
|
+
- File-based: All state lives in `.planning/` directory
|
|
159
|
+
- No persistent in-memory state
|
|
160
|
+
- Each command execution is independent
|
|
161
|
+
|
|
162
|
+
## Key Abstractions
|
|
163
|
+
|
|
164
|
+
**Service:**
|
|
165
|
+
- Purpose: Encapsulate business logic for a domain
|
|
166
|
+
- Examples: `src/services/file.ts`, `src/services/template.ts`, `src/services/project.ts`
|
|
167
|
+
- Pattern: Singleton-like (imported as modules, not instantiated)
|
|
168
|
+
|
|
169
|
+
**Command:**
|
|
170
|
+
- Purpose: CLI command definition
|
|
171
|
+
- Examples: `src/commands/new-project.ts`, `src/commands/plan-phase.ts`
|
|
172
|
+
- Pattern: Commander.js command registration
|
|
173
|
+
|
|
174
|
+
**Template:**
|
|
175
|
+
- Purpose: Reusable document structures
|
|
176
|
+
- Examples: PROJECT.md, PLAN.md templates
|
|
177
|
+
- Pattern: Markdown files with substitution variables
|
|
178
|
+
|
|
179
|
+
## Entry Points
|
|
180
|
+
|
|
181
|
+
**CLI Entry:**
|
|
182
|
+
- Location: `src/index.ts`
|
|
183
|
+
- Triggers: User runs `gsd <command>`
|
|
184
|
+
- Responsibilities: Register commands, parse args, display help
|
|
185
|
+
|
|
186
|
+
**Commands:**
|
|
187
|
+
- Location: `src/commands/*.ts`
|
|
188
|
+
- Triggers: Matched command from CLI
|
|
189
|
+
- Responsibilities: Validate input, call services, format output
|
|
190
|
+
|
|
191
|
+
## Error Handling
|
|
192
|
+
|
|
193
|
+
**Strategy:** Throw exceptions, catch at command level, log and exit
|
|
194
|
+
|
|
195
|
+
**Patterns:**
|
|
196
|
+
- Services throw Error with descriptive messages
|
|
197
|
+
- Command handlers catch, log error to stderr, exit(1)
|
|
198
|
+
- Validation errors shown before execution (fail fast)
|
|
199
|
+
|
|
200
|
+
## Cross-Cutting Concerns
|
|
201
|
+
|
|
202
|
+
**Logging:**
|
|
203
|
+
- Console.log for normal output
|
|
204
|
+
- Console.error for errors
|
|
205
|
+
- Chalk for colored output
|
|
206
|
+
|
|
207
|
+
**Validation:**
|
|
208
|
+
- Zod schemas for config file parsing
|
|
209
|
+
- Manual validation in command handlers
|
|
210
|
+
- Fail fast on invalid input
|
|
211
|
+
|
|
212
|
+
**File Operations:**
|
|
213
|
+
- FileService abstraction over fs-extra
|
|
214
|
+
- All paths validated before operations
|
|
215
|
+
- Atomic writes (temp file + rename)
|
|
216
|
+
|
|
217
|
+
---
|
|
218
|
+
|
|
219
|
+
*Architecture analysis: 2025-01-20*
|
|
220
|
+
*Update when major patterns change*
|
|
221
|
+
```
|
|
222
|
+
</good_examples>
|
|
223
|
+
|
|
224
|
+
<guidelines>
|
|
225
|
+
**What belongs in ARCHITECTURE.md:**
|
|
226
|
+
- Overall architectural pattern (monolith, microservices, layered, etc.)
|
|
227
|
+
- Conceptual layers and their relationships
|
|
228
|
+
- Data flow / request lifecycle
|
|
229
|
+
- Key abstractions and patterns
|
|
230
|
+
- Entry points
|
|
231
|
+
- Error handling strategy
|
|
232
|
+
- Cross-cutting concerns (logging, auth, validation)
|
|
233
|
+
|
|
234
|
+
**What does NOT belong here:**
|
|
235
|
+
- Exhaustive file listings (that's STRUCTURE.md)
|
|
236
|
+
- Technology choices (that's STACK.md)
|
|
237
|
+
- Line-by-line code walkthrough (defer to code reading)
|
|
238
|
+
- Implementation details of specific features
|
|
239
|
+
|
|
240
|
+
**File paths ARE welcome:**
|
|
241
|
+
Include file paths as concrete examples of abstractions. Use backtick formatting: `src/services/user.ts`. This makes the architecture document actionable for Claude when planning.
|
|
242
|
+
|
|
243
|
+
**When filling this template:**
|
|
244
|
+
- Read main entry points (index, server, main)
|
|
245
|
+
- Identify layers by reading imports/dependencies
|
|
246
|
+
- Trace a typical request/command execution
|
|
247
|
+
- Note recurring patterns (services, controllers, repositories)
|
|
248
|
+
- Keep descriptions conceptual, not mechanical
|
|
249
|
+
|
|
250
|
+
**Useful for phase planning when:**
|
|
251
|
+
- Adding new features (where does it fit in the layers?)
|
|
252
|
+
- Refactoring (understanding current patterns)
|
|
253
|
+
- Identifying where to add code (which layer handles X?)
|
|
254
|
+
- Understanding dependencies between components
|
|
255
|
+
</guidelines>
|