@undeemed/get-shit-done-codex 1.6.12 → 1.20.3
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 +40 -7
- 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.js +108 -102
- package/commands/gsd/add-phase.md +17 -185
- package/commands/gsd/add-todo.md +23 -163
- package/commands/gsd/audit-milestone.md +3 -219
- package/commands/gsd/check-todos.md +20 -196
- package/commands/gsd/cleanup.md +18 -0
- package/commands/gsd/complete-milestone.md +2 -2
- package/commands/gsd/debug.md +13 -0
- package/commands/gsd/discuss-phase.md +13 -6
- package/commands/gsd/execute-phase.md +4 -266
- package/commands/gsd/health.md +22 -0
- package/commands/gsd/help.md +8 -369
- package/commands/gsd/insert-phase.md +9 -203
- package/commands/gsd/join-discord.md +18 -0
- package/commands/gsd/list-phase-assumptions.md +4 -4
- package/commands/gsd/map-codebase.md +1 -1
- package/commands/gsd/new-milestone.md +16 -682
- package/commands/gsd/new-project.md +12 -866
- package/commands/gsd/new-project.md.bak +1041 -0
- package/commands/gsd/pause-work.md +17 -105
- package/commands/gsd/plan-milestone-gaps.md +3 -247
- package/commands/gsd/plan-phase.md +13 -444
- package/commands/gsd/progress.md +5 -337
- package/commands/gsd/quick.md +40 -0
- package/commands/gsd/reapply-patches.md +110 -0
- package/commands/gsd/remove-phase.md +9 -315
- package/commands/gsd/research-phase.md +27 -20
- package/commands/gsd/resume-work.md +2 -2
- package/commands/gsd/set-profile.md +34 -0
- package/commands/gsd/settings.md +36 -0
- package/commands/gsd/update.md +25 -160
- package/commands/gsd/verify-work.md +6 -186
- 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 +270 -283
- package/get-shit-done/references/decimal-phase-calculation.md +65 -0
- package/get-shit-done/references/git-integration.md +7 -13
- 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 +5 -1
- package/get-shit-done/references/verification-patterns.md +17 -0
- package/get-shit-done/templates/DEBUG.md +4 -4
- package/get-shit-done/templates/UAT.md +1 -1
- package/get-shit-done/templates/codebase/architecture.md +1 -1
- package/get-shit-done/templates/codebase/concerns.md +1 -1
- package/get-shit-done/templates/codebase/conventions.md +1 -1
- package/get-shit-done/templates/codebase/structure.md +9 -9
- package/get-shit-done/templates/config.json +10 -0
- package/get-shit-done/templates/context.md +7 -15
- package/get-shit-done/templates/continue-here.md +1 -1
- package/get-shit-done/templates/phase-prompt.md +32 -41
- package/get-shit-done/templates/planner-subagent-prompt.md +4 -4
- package/get-shit-done/templates/project.md +1 -1
- package/get-shit-done/templates/research-project/ARCHITECTURE.md +1 -1
- package/get-shit-done/templates/research.md +27 -4
- package/get-shit-done/templates/state.md +1 -31
- 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 +5 -28
- package/get-shit-done/templates/user-setup.md +8 -20
- package/get-shit-done/templates/verification-report.md +3 -3
- 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 +225 -301
- package/get-shit-done/workflows/diagnose-issues.md +3 -17
- package/get-shit-done/workflows/discovery-phase.md +11 -15
- package/get-shit-done/workflows/discuss-phase.md +105 -42
- package/get-shit-done/workflows/execute-phase.md +205 -349
- package/get-shit-done/workflows/execute-plan.md +179 -1569
- 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 +9 -9
- package/get-shit-done/workflows/map-codebase.md +56 -18
- 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 +18 -23
- 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 +78 -103
- package/get-shit-done/workflows/update.md +214 -0
- package/get-shit-done/workflows/verify-phase.md +109 -496
- package/get-shit-done/workflows/verify-work.md +22 -15
- package/hooks/dist/gsd-check-update.js +66 -0
- package/hooks/dist/gsd-statusline.js +91 -0
- package/package.json +19 -3
- package/scripts/build-hooks.js +42 -0
- package/commands/gsd/whats-new.md +0 -124
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Decimal Phase Calculation
|
|
2
|
+
|
|
3
|
+
Calculate the next decimal phase number for urgent insertions.
|
|
4
|
+
|
|
5
|
+
## Using gsd-tools
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Get next decimal phase after phase 6
|
|
9
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs phase next-decimal 6
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Output:
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"found": true,
|
|
16
|
+
"base_phase": "06",
|
|
17
|
+
"next": "06.1",
|
|
18
|
+
"existing": []
|
|
19
|
+
}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
With existing decimals:
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"found": true,
|
|
26
|
+
"base_phase": "06",
|
|
27
|
+
"next": "06.3",
|
|
28
|
+
"existing": ["06.1", "06.2"]
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Extract Values
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
DECIMAL_INFO=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs phase next-decimal "${AFTER_PHASE}")
|
|
36
|
+
DECIMAL_PHASE=$(echo "$DECIMAL_INFO" | jq -r '.next')
|
|
37
|
+
BASE_PHASE=$(echo "$DECIMAL_INFO" | jq -r '.base_phase')
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Or with --raw flag:
|
|
41
|
+
```bash
|
|
42
|
+
DECIMAL_PHASE=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs phase next-decimal "${AFTER_PHASE}" --raw)
|
|
43
|
+
# Returns just: 06.1
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Examples
|
|
47
|
+
|
|
48
|
+
| Existing Phases | Next Phase |
|
|
49
|
+
|-----------------|------------|
|
|
50
|
+
| 06 only | 06.1 |
|
|
51
|
+
| 06, 06.1 | 06.2 |
|
|
52
|
+
| 06, 06.1, 06.2 | 06.3 |
|
|
53
|
+
| 06, 06.1, 06.3 (gap) | 06.4 |
|
|
54
|
+
|
|
55
|
+
## Directory Naming
|
|
56
|
+
|
|
57
|
+
Decimal phase directories use the full decimal number:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
SLUG=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs generate-slug "$DESCRIPTION" --raw)
|
|
61
|
+
PHASE_DIR=".planning/phases/${DECIMAL_PHASE}-${SLUG}"
|
|
62
|
+
mkdir -p "$PHASE_DIR"
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Example: `.planning/phases/06.1-fix-critical-auth-bug/`
|
|
@@ -51,8 +51,7 @@ Phases:
|
|
|
51
51
|
What to commit:
|
|
52
52
|
|
|
53
53
|
```bash
|
|
54
|
-
|
|
55
|
-
git commit
|
|
54
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs: initialize [project-name] ([N] phases)" --files .planning/
|
|
56
55
|
```
|
|
57
56
|
|
|
58
57
|
</format>
|
|
@@ -130,11 +129,7 @@ SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
|
130
129
|
What to commit:
|
|
131
130
|
|
|
132
131
|
```bash
|
|
133
|
-
|
|
134
|
-
git add .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
|
|
135
|
-
git add .planning/STATE.md
|
|
136
|
-
git add .planning/ROADMAP.md
|
|
137
|
-
git commit
|
|
132
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs({phase}-{plan}): complete [plan-name] plan" --files .planning/phases/XX-name/{phase}-{plan}-PLAN.md .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
|
|
138
133
|
```
|
|
139
134
|
|
|
140
135
|
**Note:** Code files NOT included - already committed per-task.
|
|
@@ -154,8 +149,7 @@ Current: [task name]
|
|
|
154
149
|
What to commit:
|
|
155
150
|
|
|
156
151
|
```bash
|
|
157
|
-
|
|
158
|
-
git commit
|
|
152
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/
|
|
159
153
|
```
|
|
160
154
|
|
|
161
155
|
</format>
|
|
@@ -231,14 +225,14 @@ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
|
|
|
231
225
|
## Why Per-Task Commits?
|
|
232
226
|
|
|
233
227
|
**Context engineering for AI:**
|
|
234
|
-
- Git history becomes primary context source for future
|
|
228
|
+
- Git history becomes primary context source for future Codex sessions
|
|
235
229
|
- `git log --grep="{phase}-{plan}"` shows all work for a plan
|
|
236
230
|
- `git diff <hash>^..<hash>` shows exact changes per task
|
|
237
231
|
- Less reliance on parsing SUMMARY.md = more context for actual work
|
|
238
232
|
|
|
239
233
|
**Failure recovery:**
|
|
240
234
|
- Task 1 committed ✅, Task 2 failed ❌
|
|
241
|
-
-
|
|
235
|
+
- Codex in next session: sees task 1 complete, can retry task 2
|
|
242
236
|
- Can `git reset --hard` to last successful task
|
|
243
237
|
|
|
244
238
|
**Debugging:**
|
|
@@ -247,8 +241,8 @@ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
|
|
|
247
241
|
- Each commit is independently revertable
|
|
248
242
|
|
|
249
243
|
**Observability:**
|
|
250
|
-
- Solo developer +
|
|
244
|
+
- Solo developer + Codex workflow benefits from granular attribution
|
|
251
245
|
- Atomic commits are git best practice
|
|
252
|
-
- "Commit noise" irrelevant when consumer is
|
|
246
|
+
- "Commit noise" irrelevant when consumer is Codex, not humans
|
|
253
247
|
|
|
254
248
|
</commit_strategy_rationale>
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Git Planning Commit
|
|
2
|
+
|
|
3
|
+
Commit planning artifacts using the gsd-tools CLI, which automatically checks `commit_docs` config and gitignore status.
|
|
4
|
+
|
|
5
|
+
## Commit via CLI
|
|
6
|
+
|
|
7
|
+
Always use `gsd-tools.cjs commit` for `.planning/` files — it handles `commit_docs` and gitignore checks automatically:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs({scope}): {description}" --files .planning/STATE.md .planning/ROADMAP.md
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
The CLI will return `skipped` (with reason) if `commit_docs` is `false` or `.planning/` is gitignored. No manual conditional checks needed.
|
|
14
|
+
|
|
15
|
+
## Amend previous commit
|
|
16
|
+
|
|
17
|
+
To fold `.planning/` file changes into the previous commit:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "" --files .planning/codebase/*.md --amend
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Commit Message Patterns
|
|
24
|
+
|
|
25
|
+
| Command | Scope | Example |
|
|
26
|
+
|---------|-------|---------|
|
|
27
|
+
| plan-phase | phase | `docs(phase-03): create authentication plans` |
|
|
28
|
+
| execute-phase | phase | `docs(phase-03): complete authentication phase` |
|
|
29
|
+
| new-milestone | milestone | `docs: start milestone v1.1` |
|
|
30
|
+
| remove-phase | chore | `chore: remove phase 17 (dashboard)` |
|
|
31
|
+
| insert-phase | phase | `docs: insert phase 16.1 (critical fix)` |
|
|
32
|
+
| add-phase | phase | `docs: add phase 07 (settings page)` |
|
|
33
|
+
|
|
34
|
+
## When to Skip
|
|
35
|
+
|
|
36
|
+
- `commit_docs: false` in config
|
|
37
|
+
- `.planning/` is gitignored
|
|
38
|
+
- No changes to commit (check with `git status --porcelain .planning/`)
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Model Profile Resolution
|
|
2
|
+
|
|
3
|
+
Resolve model profile once at the start of orchestration, then use it for all Task spawns.
|
|
4
|
+
|
|
5
|
+
## Resolution Pattern
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Default: `balanced` if not set or config missing.
|
|
12
|
+
|
|
13
|
+
## Lookup Table
|
|
14
|
+
|
|
15
|
+
@~/.codex/get-shit-done/references/model-profiles.md
|
|
16
|
+
|
|
17
|
+
Look up the agent in the table for the resolved profile. Pass the model parameter to Task calls:
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
Task(
|
|
21
|
+
prompt="...",
|
|
22
|
+
subagent_type="gsd-planner",
|
|
23
|
+
model="{resolved_model}" # "inherit", "sonnet", or "haiku"
|
|
24
|
+
)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Note:** Opus-tier agents resolve to `"inherit"` (not `"opus"`). This causes the agent to use the parent session's model, avoiding conflicts with organization policies that may block specific opus versions.
|
|
28
|
+
|
|
29
|
+
## Usage
|
|
30
|
+
|
|
31
|
+
1. Resolve once at orchestration start
|
|
32
|
+
2. Store the profile value
|
|
33
|
+
3. Look up each agent's model from the table when spawning
|
|
34
|
+
4. Pass model parameter to each Task call (values: `"inherit"`, `"sonnet"`, `"haiku"`)
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# Model Profiles
|
|
2
|
+
|
|
3
|
+
Model profiles control which Codex model each GSD agent uses. This allows balancing quality vs token spend.
|
|
4
|
+
|
|
5
|
+
## Profile Definitions
|
|
6
|
+
|
|
7
|
+
| Agent | `quality` | `balanced` | `budget` |
|
|
8
|
+
|-------|-----------|------------|----------|
|
|
9
|
+
| gsd-planner | opus | opus | sonnet |
|
|
10
|
+
| gsd-roadmapper | opus | sonnet | sonnet |
|
|
11
|
+
| gsd-executor | opus | sonnet | sonnet |
|
|
12
|
+
| gsd-phase-researcher | opus | sonnet | haiku |
|
|
13
|
+
| gsd-project-researcher | opus | sonnet | haiku |
|
|
14
|
+
| gsd-research-synthesizer | sonnet | sonnet | haiku |
|
|
15
|
+
| gsd-debugger | opus | sonnet | sonnet |
|
|
16
|
+
| gsd-codebase-mapper | sonnet | haiku | haiku |
|
|
17
|
+
| gsd-verifier | sonnet | sonnet | haiku |
|
|
18
|
+
| gsd-plan-checker | sonnet | sonnet | haiku |
|
|
19
|
+
| gsd-integration-checker | sonnet | sonnet | haiku |
|
|
20
|
+
|
|
21
|
+
## Profile Philosophy
|
|
22
|
+
|
|
23
|
+
**quality** - Maximum reasoning power
|
|
24
|
+
- Opus for all decision-making agents
|
|
25
|
+
- Sonnet for read-only verification
|
|
26
|
+
- Use when: quota available, critical architecture work
|
|
27
|
+
|
|
28
|
+
**balanced** (default) - Smart allocation
|
|
29
|
+
- Opus only for planning (where architecture decisions happen)
|
|
30
|
+
- Sonnet for execution and research (follows explicit instructions)
|
|
31
|
+
- Sonnet for verification (needs reasoning, not just pattern matching)
|
|
32
|
+
- Use when: normal development, good balance of quality and cost
|
|
33
|
+
|
|
34
|
+
**budget** - Minimal Opus usage
|
|
35
|
+
- Sonnet for anything that writes code
|
|
36
|
+
- Haiku for research and verification
|
|
37
|
+
- Use when: conserving quota, high-volume work, less critical phases
|
|
38
|
+
|
|
39
|
+
## Resolution Logic
|
|
40
|
+
|
|
41
|
+
Orchestrators resolve model before spawning:
|
|
42
|
+
|
|
43
|
+
```
|
|
44
|
+
1. Read .planning/config.json
|
|
45
|
+
2. Check model_overrides for agent-specific override
|
|
46
|
+
3. If no override, look up agent in profile table
|
|
47
|
+
4. Pass model parameter to Task call
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Per-Agent Overrides
|
|
51
|
+
|
|
52
|
+
Override specific agents without changing the entire profile:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"model_profile": "balanced",
|
|
57
|
+
"model_overrides": {
|
|
58
|
+
"gsd-executor": "opus",
|
|
59
|
+
"gsd-planner": "haiku"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Overrides take precedence over the profile. Valid values: `opus`, `sonnet`, `haiku`.
|
|
65
|
+
|
|
66
|
+
## Switching Profiles
|
|
67
|
+
|
|
68
|
+
Runtime: `/gsd:set-profile <profile>`
|
|
69
|
+
|
|
70
|
+
Per-project default: Set in `.planning/config.json`:
|
|
71
|
+
```json
|
|
72
|
+
{
|
|
73
|
+
"model_profile": "balanced"
|
|
74
|
+
}
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Design Rationale
|
|
78
|
+
|
|
79
|
+
**Why Opus for gsd-planner?**
|
|
80
|
+
Planning involves architecture decisions, goal decomposition, and task design. This is where model quality has the highest impact.
|
|
81
|
+
|
|
82
|
+
**Why Sonnet for gsd-executor?**
|
|
83
|
+
Executors follow explicit PLAN.md instructions. The plan already contains the reasoning; execution is implementation.
|
|
84
|
+
|
|
85
|
+
**Why Sonnet (not Haiku) for verifiers in balanced?**
|
|
86
|
+
Verification requires goal-backward reasoning - checking if code *delivers* what the phase promised, not just pattern matching. Sonnet handles this well; Haiku may miss subtle gaps.
|
|
87
|
+
|
|
88
|
+
**Why Haiku for gsd-codebase-mapper?**
|
|
89
|
+
Read-only exploration and pattern extraction. No reasoning required, just structured output from file contents.
|
|
90
|
+
|
|
91
|
+
**Why `inherit` instead of passing `opus` directly?**
|
|
92
|
+
Codex CLI's `"opus"` alias maps to a specific model version. Organizations may block older opus versions while allowing newer ones. GSD returns `"inherit"` for opus-tier agents, causing them to use whatever opus version the user has configured in their session. This avoids version conflicts and silent fallbacks to Sonnet.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# Phase Argument Parsing
|
|
2
|
+
|
|
3
|
+
Parse and normalize phase arguments for commands that operate on phases.
|
|
4
|
+
|
|
5
|
+
## Extraction
|
|
6
|
+
|
|
7
|
+
From `$ARGUMENTS`:
|
|
8
|
+
- Extract phase number (first numeric argument)
|
|
9
|
+
- Extract flags (prefixed with `--`)
|
|
10
|
+
- Remaining text is description (for insert/add commands)
|
|
11
|
+
|
|
12
|
+
## Using gsd-tools
|
|
13
|
+
|
|
14
|
+
The `find-phase` command handles normalization and validation in one step:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
PHASE_INFO=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs find-phase "${PHASE}")
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Returns JSON with:
|
|
21
|
+
- `found`: true/false
|
|
22
|
+
- `directory`: Full path to phase directory
|
|
23
|
+
- `phase_number`: Normalized number (e.g., "06", "06.1")
|
|
24
|
+
- `phase_name`: Name portion (e.g., "foundation")
|
|
25
|
+
- `plans`: Array of PLAN.md files
|
|
26
|
+
- `summaries`: Array of SUMMARY.md files
|
|
27
|
+
|
|
28
|
+
## Manual Normalization (Legacy)
|
|
29
|
+
|
|
30
|
+
Zero-pad integer phases to 2 digits. Preserve decimal suffixes.
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
# Normalize phase number
|
|
34
|
+
if [[ "$PHASE" =~ ^[0-9]+$ ]]; then
|
|
35
|
+
# Integer: 8 → 08
|
|
36
|
+
PHASE=$(printf "%02d" "$PHASE")
|
|
37
|
+
elif [[ "$PHASE" =~ ^([0-9]+)\.([0-9]+)$ ]]; then
|
|
38
|
+
# Decimal: 2.1 → 02.1
|
|
39
|
+
PHASE=$(printf "%02d.%s" "${BASH_REMATCH[1]}" "${BASH_REMATCH[2]}")
|
|
40
|
+
fi
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Validation
|
|
44
|
+
|
|
45
|
+
Use `roadmap get-phase` to validate phase exists:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
PHASE_CHECK=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs roadmap get-phase "${PHASE}")
|
|
49
|
+
if [ "$(echo "$PHASE_CHECK" | jq -r '.found')" = "false" ]; then
|
|
50
|
+
echo "ERROR: Phase ${PHASE} not found in roadmap"
|
|
51
|
+
exit 1
|
|
52
|
+
fi
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## Directory Lookup
|
|
56
|
+
|
|
57
|
+
Use `find-phase` for directory lookup:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
PHASE_DIR=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs find-phase "${PHASE}" --raw)
|
|
61
|
+
```
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
<planning_config>
|
|
2
|
+
|
|
3
|
+
Configuration options for `.planning/` directory behavior.
|
|
4
|
+
|
|
5
|
+
<config_schema>
|
|
6
|
+
```json
|
|
7
|
+
"planning": {
|
|
8
|
+
"commit_docs": true,
|
|
9
|
+
"search_gitignored": false
|
|
10
|
+
},
|
|
11
|
+
"git": {
|
|
12
|
+
"branching_strategy": "none",
|
|
13
|
+
"phase_branch_template": "gsd/phase-{phase}-{slug}",
|
|
14
|
+
"milestone_branch_template": "gsd/{milestone}-{slug}"
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
| Option | Default | Description |
|
|
19
|
+
|--------|---------|-------------|
|
|
20
|
+
| `commit_docs` | `true` | Whether to commit planning artifacts to git |
|
|
21
|
+
| `search_gitignored` | `false` | Add `--no-ignore` to broad rg searches |
|
|
22
|
+
| `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"phase"`, or `"milestone"` |
|
|
23
|
+
| `git.phase_branch_template` | `"gsd/phase-{phase}-{slug}"` | Branch template for phase strategy |
|
|
24
|
+
| `git.milestone_branch_template` | `"gsd/{milestone}-{slug}"` | Branch template for milestone strategy |
|
|
25
|
+
</config_schema>
|
|
26
|
+
|
|
27
|
+
<commit_docs_behavior>
|
|
28
|
+
|
|
29
|
+
**When `commit_docs: true` (default):**
|
|
30
|
+
- Planning files committed normally
|
|
31
|
+
- SUMMARY.md, STATE.md, ROADMAP.md tracked in git
|
|
32
|
+
- Full history of planning decisions preserved
|
|
33
|
+
|
|
34
|
+
**When `commit_docs: false`:**
|
|
35
|
+
- Skip all `git add`/`git commit` for `.planning/` files
|
|
36
|
+
- User must add `.planning/` to `.gitignore`
|
|
37
|
+
- Useful for: OSS contributions, client projects, keeping planning private
|
|
38
|
+
|
|
39
|
+
**Using gsd-tools.cjs (preferred):**
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Commit with automatic commit_docs + gitignore checks:
|
|
43
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs: update state" --files .planning/STATE.md
|
|
44
|
+
|
|
45
|
+
# Load config via state load (returns JSON):
|
|
46
|
+
INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs state load)
|
|
47
|
+
# commit_docs is available in the JSON output
|
|
48
|
+
|
|
49
|
+
# Or use init commands which include commit_docs:
|
|
50
|
+
INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init execute-phase "1")
|
|
51
|
+
# commit_docs is included in all init command outputs
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**Auto-detection:** If `.planning/` is gitignored, `commit_docs` is automatically `false` regardless of config.json. This prevents git errors when users have `.planning/` in `.gitignore`.
|
|
55
|
+
|
|
56
|
+
**Commit via CLI (handles checks automatically):**
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
node ~/.codex/get-shit-done/bin/gsd-tools.cjs commit "docs: update state" --files .planning/STATE.md
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
The CLI checks `commit_docs` config and gitignore status internally — no manual conditionals needed.
|
|
63
|
+
|
|
64
|
+
</commit_docs_behavior>
|
|
65
|
+
|
|
66
|
+
<search_behavior>
|
|
67
|
+
|
|
68
|
+
**When `search_gitignored: false` (default):**
|
|
69
|
+
- Standard rg behavior (respects .gitignore)
|
|
70
|
+
- Direct path searches work: `rg "pattern" .planning/` finds files
|
|
71
|
+
- Broad searches skip gitignored: `rg "pattern"` skips `.planning/`
|
|
72
|
+
|
|
73
|
+
**When `search_gitignored: true`:**
|
|
74
|
+
- Add `--no-ignore` to broad rg searches that should include `.planning/`
|
|
75
|
+
- Only needed when searching entire repo and expecting `.planning/` matches
|
|
76
|
+
|
|
77
|
+
**Note:** Most GSD operations use direct file reads or explicit paths, which work regardless of gitignore status.
|
|
78
|
+
|
|
79
|
+
</search_behavior>
|
|
80
|
+
|
|
81
|
+
<setup_uncommitted_mode>
|
|
82
|
+
|
|
83
|
+
To use uncommitted mode:
|
|
84
|
+
|
|
85
|
+
1. **Set config:**
|
|
86
|
+
```json
|
|
87
|
+
"planning": {
|
|
88
|
+
"commit_docs": false,
|
|
89
|
+
"search_gitignored": true
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
2. **Add to .gitignore:**
|
|
94
|
+
```
|
|
95
|
+
.planning/
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
3. **Existing tracked files:** If `.planning/` was previously tracked:
|
|
99
|
+
```bash
|
|
100
|
+
git rm -r --cached .planning/
|
|
101
|
+
git commit -m "chore: stop tracking planning docs"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
4. **Branch merges:** When using `branching_strategy: phase` or `milestone`, the `complete-milestone` workflow automatically strips `.planning/` files from staging before merge commits when `commit_docs: false`.
|
|
105
|
+
|
|
106
|
+
</setup_uncommitted_mode>
|
|
107
|
+
|
|
108
|
+
<branching_strategy_behavior>
|
|
109
|
+
|
|
110
|
+
**Branching Strategies:**
|
|
111
|
+
|
|
112
|
+
| Strategy | When branch created | Branch scope | Merge point |
|
|
113
|
+
|----------|---------------------|--------------|-------------|
|
|
114
|
+
| `none` | Never | N/A | N/A |
|
|
115
|
+
| `phase` | At `execute-phase` start | Single phase | User merges after phase |
|
|
116
|
+
| `milestone` | At first `execute-phase` of milestone | Entire milestone | At `complete-milestone` |
|
|
117
|
+
|
|
118
|
+
**When `git.branching_strategy: "none"` (default):**
|
|
119
|
+
- All work commits to current branch
|
|
120
|
+
- Standard GSD behavior
|
|
121
|
+
|
|
122
|
+
**When `git.branching_strategy: "phase"`:**
|
|
123
|
+
- `execute-phase` creates/switches to a branch before execution
|
|
124
|
+
- Branch name from `phase_branch_template` (e.g., `gsd/phase-03-authentication`)
|
|
125
|
+
- All plan commits go to that branch
|
|
126
|
+
- User merges branches manually after phase completion
|
|
127
|
+
- `complete-milestone` offers to merge all phase branches
|
|
128
|
+
|
|
129
|
+
**When `git.branching_strategy: "milestone"`:**
|
|
130
|
+
- First `execute-phase` of milestone creates the milestone branch
|
|
131
|
+
- Branch name from `milestone_branch_template` (e.g., `gsd/v1.0-mvp`)
|
|
132
|
+
- All phases in milestone commit to same branch
|
|
133
|
+
- `complete-milestone` offers to merge milestone branch to main
|
|
134
|
+
|
|
135
|
+
**Template variables:**
|
|
136
|
+
|
|
137
|
+
| Variable | Available in | Description |
|
|
138
|
+
|----------|--------------|-------------|
|
|
139
|
+
| `{phase}` | phase_branch_template | Zero-padded phase number (e.g., "03") |
|
|
140
|
+
| `{slug}` | Both | Lowercase, hyphenated name |
|
|
141
|
+
| `{milestone}` | milestone_branch_template | Milestone version (e.g., "v1.0") |
|
|
142
|
+
|
|
143
|
+
**Checking the config:**
|
|
144
|
+
|
|
145
|
+
Use `init execute-phase` which returns all config as JSON:
|
|
146
|
+
```bash
|
|
147
|
+
INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs init execute-phase "1")
|
|
148
|
+
# JSON output includes: branching_strategy, phase_branch_template, milestone_branch_template
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
Or use `state load` for the config values:
|
|
152
|
+
```bash
|
|
153
|
+
INIT=$(node ~/.codex/get-shit-done/bin/gsd-tools.cjs state load)
|
|
154
|
+
# Parse branching_strategy, phase_branch_template, milestone_branch_template from JSON
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
**Branch creation:**
|
|
158
|
+
|
|
159
|
+
```bash
|
|
160
|
+
# For phase strategy
|
|
161
|
+
if [ "$BRANCHING_STRATEGY" = "phase" ]; then
|
|
162
|
+
PHASE_SLUG=$(echo "$PHASE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
163
|
+
BRANCH_NAME=$(echo "$PHASE_BRANCH_TEMPLATE" | sed "s/{phase}/$PADDED_PHASE/g" | sed "s/{slug}/$PHASE_SLUG/g")
|
|
164
|
+
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
|
|
165
|
+
fi
|
|
166
|
+
|
|
167
|
+
# For milestone strategy
|
|
168
|
+
if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
|
|
169
|
+
MILESTONE_SLUG=$(echo "$MILESTONE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
|
|
170
|
+
BRANCH_NAME=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed "s/{milestone}/$MILESTONE_VERSION/g" | sed "s/{slug}/$MILESTONE_SLUG/g")
|
|
171
|
+
git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
|
|
172
|
+
fi
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
**Merge options at complete-milestone:**
|
|
176
|
+
|
|
177
|
+
| Option | Git command | Result |
|
|
178
|
+
|--------|-------------|--------|
|
|
179
|
+
| Squash merge (recommended) | `git merge --squash` | Single clean commit per branch |
|
|
180
|
+
| Merge with history | `git merge --no-ff` | Preserves all individual commits |
|
|
181
|
+
| Delete without merging | `git branch -D` | Discard branch work |
|
|
182
|
+
| Keep branches | (none) | Manual handling later |
|
|
183
|
+
|
|
184
|
+
Squash merge is recommended — keeps main branch history clean while preserving the full development history in the branch (until deleted).
|
|
185
|
+
|
|
186
|
+
**Use cases:**
|
|
187
|
+
|
|
188
|
+
| Strategy | Best for |
|
|
189
|
+
|----------|----------|
|
|
190
|
+
| `none` | Solo development, simple projects |
|
|
191
|
+
| `phase` | Code review per phase, granular rollback, team collaboration |
|
|
192
|
+
| `milestone` | Release branches, staging environments, PR per version |
|
|
193
|
+
|
|
194
|
+
</branching_strategy_behavior>
|
|
195
|
+
|
|
196
|
+
</planning_config>
|
|
@@ -79,6 +79,7 @@ Use AskUserQuestion to help users think by presenting concrete options to react
|
|
|
79
79
|
- Generic categories ("Technical", "Business", "Other")
|
|
80
80
|
- Leading options that presume an answer
|
|
81
81
|
- Too many options (2-4 is ideal)
|
|
82
|
+
- Headers longer than 12 characters (hard limit — validation will reject them)
|
|
82
83
|
|
|
83
84
|
**Example — vague answer:**
|
|
84
85
|
User says "it should be fast"
|
|
@@ -94,6 +95,9 @@ User mentions "frustrated with current tools"
|
|
|
94
95
|
- question: "What specifically frustrates you?"
|
|
95
96
|
- options: ["Too many clicks", "Missing features", "Unreliable", "Let me explain"]
|
|
96
97
|
|
|
98
|
+
**Tip for users — modifying an option:**
|
|
99
|
+
Users who want a slightly modified version of an option can select "Other" and reference the option by number: `#1 but for finger joints only` or `#2 with pagination disabled`. This avoids retyping the full option text.
|
|
100
|
+
|
|
97
101
|
</using_askuserquestion>
|
|
98
102
|
|
|
99
103
|
<context_checklist>
|
|
@@ -134,7 +138,7 @@ Loop until "Create PROJECT.md" selected.
|
|
|
134
138
|
- **Rushing** — Minimizing questions to get to "the work"
|
|
135
139
|
- **Shallow acceptance** — Taking vague answers without probing
|
|
136
140
|
- **Premature constraints** — Asking about tech stack before understanding the idea
|
|
137
|
-
- **User skills** — NEVER ask about user's technical experience.
|
|
141
|
+
- **User skills** — NEVER ask about user's technical experience. Codex builds.
|
|
138
142
|
|
|
139
143
|
</anti_patterns>
|
|
140
144
|
|
|
@@ -593,3 +593,20 @@ Some things can't be verified programmatically. Flag these for human testing:
|
|
|
593
593
|
```
|
|
594
594
|
|
|
595
595
|
</human_verification_triggers>
|
|
596
|
+
|
|
597
|
+
<checkpoint_automation_reference>
|
|
598
|
+
|
|
599
|
+
## Pre-Checkpoint Automation
|
|
600
|
+
|
|
601
|
+
For automation-first checkpoint patterns, server lifecycle management, CLI installation handling, and error recovery protocols, see:
|
|
602
|
+
|
|
603
|
+
**@~/.codex/get-shit-done/references/checkpoints.md** → `<automation_reference>` section
|
|
604
|
+
|
|
605
|
+
Key principles:
|
|
606
|
+
- Codex sets up verification environment BEFORE presenting checkpoints
|
|
607
|
+
- Users never run CLI commands (visit URLs only)
|
|
608
|
+
- Server lifecycle: start before checkpoint, handle port conflicts, keep running for duration
|
|
609
|
+
- CLI installation: auto-install where safe, checkpoint for user choice otherwise
|
|
610
|
+
- Error handling: fix broken environment before checkpoint, never present checkpoint with failed setup
|
|
611
|
+
|
|
612
|
+
</checkpoint_automation_reference>
|
|
@@ -67,8 +67,8 @@ files_changed: []
|
|
|
67
67
|
|
|
68
68
|
**Current Focus:**
|
|
69
69
|
- OVERWRITE entirely on each update
|
|
70
|
-
- Always reflects what
|
|
71
|
-
- If
|
|
70
|
+
- Always reflects what Codex is doing RIGHT NOW
|
|
71
|
+
- If Codex reads this after /clear, it knows exactly where to resume
|
|
72
72
|
- Fields: hypothesis, test, expecting, next_action
|
|
73
73
|
|
|
74
74
|
**Symptoms:**
|
|
@@ -135,7 +135,7 @@ files_changed: []
|
|
|
135
135
|
|
|
136
136
|
<resume_behavior>
|
|
137
137
|
|
|
138
|
-
When
|
|
138
|
+
When Codex reads this file after /clear:
|
|
139
139
|
|
|
140
140
|
1. Parse frontmatter → know status
|
|
141
141
|
2. Read Current Focus → know exactly what was happening
|
|
@@ -143,7 +143,7 @@ When Claude reads this file after /clear:
|
|
|
143
143
|
4. Read Evidence → know what's been learned
|
|
144
144
|
5. Continue from next_action
|
|
145
145
|
|
|
146
|
-
The file IS the debugging brain.
|
|
146
|
+
The file IS the debugging brain. Codex should be able to resume perfectly from any interruption point.
|
|
147
147
|
|
|
148
148
|
</resume_behavior>
|
|
149
149
|
|
|
@@ -238,7 +238,7 @@ Template for `.planning/codebase/ARCHITECTURE.md` - captures conceptual code org
|
|
|
238
238
|
- Implementation details of specific features
|
|
239
239
|
|
|
240
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
|
|
241
|
+
Include file paths as concrete examples of abstractions. Use backtick formatting: `src/services/user.ts`. This makes the architecture document actionable for Codex when planning.
|
|
242
242
|
|
|
243
243
|
**When filling this template:**
|
|
244
244
|
- Read main entry points (index, server, main)
|
|
@@ -302,7 +302,7 @@ Template for `.planning/codebase/CONCERNS.md` - captures known issues and areas
|
|
|
302
302
|
- Estimating risk of changes
|
|
303
303
|
- Understanding where to be careful
|
|
304
304
|
- Prioritizing improvements
|
|
305
|
-
- Onboarding new
|
|
305
|
+
- Onboarding new Codex contexts
|
|
306
306
|
- Planning refactoring work
|
|
307
307
|
|
|
308
308
|
**How this gets populated:**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Template for `.planning/codebase/CONVENTIONS.md` - captures coding style and patterns.
|
|
4
4
|
|
|
5
|
-
**Purpose:** Document how code is written in this codebase. Prescriptive guide for
|
|
5
|
+
**Purpose:** Document how code is written in this codebase. Prescriptive guide for Codex to match existing style.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|