* chore(#191): migrate gsd-sdk query call sites to gsd-tools query Retiring the gsd-sdk shim. gsd-tools.cjs already accepts `query` as a meta-prefix (gsd-tools query <command>), so this is a behavior-preserving 1:1 swap across the runtime reference prompts, the graphify hook's commit-detection gate, and two bin/lib comment/message references. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(#191): remove vestigial gsd-sdk shim code from installer + projection The gsd-sdk shim was already not wired up (no gsd-sdk bin in package.json; buildWindowsShimTriple had zero call sites). Remove the dead code: - shell-command-projection.cjs: buildWindowsShimTriple + formatSdkPathDiagnostic (+ their now-unused PACKAGE_NAME import) and exports - install.js: the re-export wrappers + imports, the #3406 stale-standalone-sdk detection (detectStaleStandaloneSdk/formatStaleStandaloneSdkWarning + its global-install call site), and the exports Preserved (retained, not gsd-sdk): buildCodexHookWindowsShimIR (#3426) — only its comments referenced the gsd-sdk pattern; reworded. Also kept the homePathCoveredByRc 'reopen your shell' branch in maybeSuggestPathExport — its logic is bin-dir-agnostic, only the message mentioned gsd-sdk; reworded to use the actual bin dir. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * test(#191): update tests for retired gsd-sdk shim - bug-3441/bug-3442: drop the formatSdkPathDiagnostic / buildWindowsShimTriple assertions (functions removed); retained PATH-action + drift-guard tests stay - bug-505: remove the 'still exported' assertions for detectStaleStandaloneSdk / formatStaleStandaloneSdkWarning / the shim contract surface (#505 kept them; #191 removes them) - graphify-auto-update: migrate the hook-dispatch inputs gsd-sdk query commit -> gsd-tools query commit to match the migrated commit hook Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(#191): point active docs at gsd-tools query (gsd-sdk shim retired) Update the user/agent-facing docs (AGENTS, COMMANDS, CONFIGURATION, USER-GUIDE, ship-pr-body-sections) that presented gsd-sdk query as a current command to gsd-tools query. Historical docs (ADRs, PRDs, release notes) left untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * docs(#191): correct state.load vs state.json description for gsd-tools query Adversarial-review (codex) finding: the migrated USER-GUIDE line claimed both 'gsd-tools query state.json' and 'state.load' resolve to the frontmatter-rebuild handler. Verified they don't — state.load returns the CJS load shape (config + state_raw + flags), state.json returns the frontmatter shape. Both are available via gsd-tools query; corrected the text to say so. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * chore(#191): add changeset for gsd-sdk shim retirement Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
8.9 KiB
<core_principle>
Commit outcomes, not process.
The git log should read like a changelog of what shipped, not a diary of planning activity. </core_principle>
<commit_points>
| Event | Commit? | Why |
|---|---|---|
| BRIEF + ROADMAP created | YES | Project initialization |
| PLAN.md created | NO | Intermediate - commit with plan completion |
| RESEARCH.md created | NO | Intermediate |
| DISCOVERY.md created | NO | Intermediate |
| Task completed | YES | Atomic unit of work (1 commit per task) |
| Plan completed | YES | Metadata commit (SUMMARY + STATE + ROADMAP) |
| Handoff created | YES | WIP state preserved |
</commit_points>
<git_check>
[ -d .git ] && echo "GIT_EXISTS" || echo "NO_GIT"
If NO_GIT: Run git init silently. GSD projects always get their own repo.
</git_check>
<commit_formats>
## Project Initialization (brief + roadmap together)docs: initialize [project-name] ([N] phases)
[One-liner from PROJECT.md]
Phases:
1. [phase-name]: [goal]
2. [phase-name]: [goal]
3. [phase-name]: [goal]
What to commit:
gsd-tools query commit "docs: initialize [project-name] ([N] phases)" --files .planning/
Each task gets its own commit immediately after completion.
Parallel agents: When running as a parallel executor (spawned by execute-phase), run commits normally — let pre-commit hooks run. Do NOT pass
--no-verifyby default (#2924). Hooks should fire on the introducing commit; silent bypass violates project CLAUDE.md guidance. If a project explicitly opts out viaworkflow.worktree_skip_hooks=true, the orchestrator surfaces that flag in the executor prompt; absent that signal, hooks run normally.
{type}({phase}-{plan}): {task-name}
- [Key change 1]
- [Key change 2]
- [Key change 3]
Commit types:
feat- New feature/functionalityfix- Bug fixtest- Test-only (TDD RED phase)refactor- Code cleanup (TDD REFACTOR phase)perf- Performance improvementchore- Dependencies, config, tooling
Examples:
# Standard task
git add src/api/auth.ts src/types/user.ts
git commit -m "feat(08-02): create user registration endpoint
- POST /auth/register validates email and password
- Checks for duplicate users
- Returns JWT token on success
"
# TDD task - RED phase
git add src/__tests__/jwt.test.ts
git commit -m "test(07-02): add failing test for JWT generation
- Tests token contains user ID claim
- Tests token expires in 1 hour
- Tests signature verification
"
# TDD task - GREEN phase
git add src/utils/jwt.ts
git commit -m "feat(07-02): implement JWT generation
- Uses jose library for signing
- Includes user ID and expiry claims
- Signs with HS256 algorithm
"
After all tasks committed, one final metadata commit captures plan completion.
docs({phase}-{plan}): complete [plan-name] plan
Tasks completed: [N]/[N]
- [Task 1 name]
- [Task 2 name]
- [Task 3 name]
SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
What to commit:
gsd-tools query 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
Note: Code files NOT included - already committed per-task.
## Handoff (WIP)wip: [phase-name] paused at task [X]/[Y]
Current: [task name]
[If blocked:] Blocked: [reason]
What to commit:
gsd-tools query commit "wip: [phase-name] paused at task [X]/[Y]" --files .planning/
<example_log>
Old approach (per-plan commits):
a7f2d1 feat(checkout): Stripe payments with webhook verification
3e9c4b feat(products): catalog with search, filters, and pagination
8a1b2c feat(auth): JWT with refresh rotation using jose
5c3d7e feat(foundation): Next.js 15 + Prisma + Tailwind scaffold
2f4a8d docs: initialize ecommerce-app (5 phases)
New approach (per-task commits):
# Phase 04 - Checkout
1a2b3c docs(04-01): complete checkout flow plan
4d5e6f feat(04-01): add webhook signature verification
7g8h9i feat(04-01): implement payment session creation
0j1k2l feat(04-01): create checkout page component
# Phase 03 - Products
3m4n5o docs(03-02): complete product listing plan
6p7q8r feat(03-02): add pagination controls
9s0t1u feat(03-02): implement search and filters
2v3w4x feat(03-01): create product catalog schema
# Phase 02 - Auth
5y6z7a docs(02-02): complete token refresh plan
8b9c0d feat(02-02): implement refresh token rotation
1e2f3g test(02-02): add failing test for token refresh
4h5i6j docs(02-01): complete JWT setup plan
7k8l9m feat(02-01): add JWT generation and validation
0n1o2p chore(02-01): install jose library
# Phase 01 - Foundation
3q4r5s docs(01-01): complete scaffold plan
6t7u8v feat(01-01): configure Tailwind and globals
9w0x1y feat(01-01): set up Prisma with database
2z3a4b feat(01-01): create Next.js 15 project
# Initialization
5c6d7e docs: initialize ecommerce-app (5 phases)
Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
</example_log>
<anti_patterns>
Still don't commit (intermediate artifacts):
- PLAN.md creation (commit with plan completion)
- RESEARCH.md (intermediate)
- DISCOVERY.md (intermediate)
- Minor planning tweaks
- "Fixed typo in roadmap"
Do commit (outcomes):
- Each task completion (feat/fix/test/refactor)
- Plan completion metadata (docs)
- Project initialization (docs)
Key principle: Commit working code and shipped outcomes, not planning process.
</anti_patterns>
<commit_strategy_rationale>
Why Per-Task Commits?
Context engineering for AI:
- Git history becomes primary context source for future Claude sessions
git log --grep="{phase}-{plan}"shows all work for a plangit diff <hash>^..<hash>shows exact changes per task- Less reliance on parsing SUMMARY.md = more context for actual work
Failure recovery:
- Task 1 committed ✅, Task 2 failed ❌
- Claude in next session: sees task 1 complete, can retry task 2
- Can
git reset --hardto last successful task
Debugging:
git bisectfinds exact failing task, not just failing plangit blametraces line to specific task context- Each commit is independently revertable
Observability:
- Solo developer + Claude workflow benefits from granular attribution
- Atomic commits are git best practice
- "Commit noise" irrelevant when consumer is Claude, not humans
</commit_strategy_rationale>
<sub_repos_support>
Multi-Repo Workspace Support (sub_repos)
For workspaces with separate git repos (e.g., backend/, frontend/, shared/), GSD routes commits to each repo independently.
Configuration
In .planning/config.json, list sub-repo directories under planning.sub_repos:
{
"planning": {
"commit_docs": false,
"sub_repos": ["backend", "frontend", "shared"]
}
}
Set commit_docs: false so planning docs stay local and are not committed to any sub-repo.
How It Works
- Auto-detection: During
/gsd:new-project, directories with their own.gitfolder are detected and offered for selection as sub-repos. On subsequent runs,loadConfigauto-syncs thesub_reposlist with the filesystem — adding newly created repos and removing deleted ones. This meansconfig.jsonmay be rewritten automatically when repos change on disk. - File grouping: Code files are grouped by their sub-repo prefix (e.g.,
backend/src/api/users.tsbelongs to thebackend/repo). - Independent commits: Each sub-repo receives its own atomic commit via
gsd-tools.cjs commit-to-subrepo. File paths are made relative to the sub-repo root before staging. - Planning stays local: The
.planning/directory is not committed; it acts as cross-repo coordination.
Commit Routing
Instead of the standard commit command, use commit-to-subrepo when sub_repos is configured:
gsd-tools query commit-to-subrepo "feat(02-01): add user API" \
--files backend/src/api/users.ts backend/src/types/user.ts frontend/src/components/UserForm.tsx
This stages src/api/users.ts and src/types/user.ts in the backend/ repo, and src/components/UserForm.tsx in the frontend/ repo, then commits each independently with the same message.
Files that don't match any configured sub-repo are reported as unmatched.
</sub_repos_support>