Every task in a GSD plan produces one commit immediately after completion.Not:
One commit per plan
One commit per phase
Bulk commit at the end
But: One commit per task, right away.
Copy
Ask AI
# Phase 08, Plan 02: User Registrationabc123f feat(08-02): create user model with email and password fieldsdef456g feat(08-02): add email confirmation flowhij789k feat(08-02): implement password hashing with bcryptlmn012o feat(08-02): create registration endpoint
# Something broke between yesterday and todaygit bisect startgit bisect bad HEADgit bisect good abc123f# Git bisect finds: hij789k# "feat(08-02): implement password hashing with bcrypt"# Now you know exactly what broke
With bulk commits, you’d have to manually search through 20 file changes.
# In future phase planning:Claude reads: git log --oneline phases/08-auth/abc123f feat(08-02): create user modeldef456g feat(08-02): add email confirmationhij789k feat(08-02): implement password hashinglmn012o feat(08-02): create registration endpoint# Claude sees: "Auth was built incrementally"# "User model came before registration"# "Email confirmation was added"
With vague commits (“Update auth”), Claude has no context.
git show hij789k# See exactly what changed for password hashing task:- Added bcrypt dependency- Created hashPassword() function- Updated User.create() to hash before save- Added unit test for hashing
With bulk commits, PRs become 1000+ line monsters.
feat(08-02): create user model with email/passwordfeat(08-02): add email confirmation flowfeat(03-01): implement card grid layout with hoverfix(05-02): handle null values in pricing calc
feat(08-02): implement password hashing with bcrypt- Add bcrypt dependency (v5.1.0)- Create hashPassword() utility function- Update User.create() to hash before database save- Add unit tests for hashing and verification- Use cost factor 10 (recommended for production)
But most tasks are concise enough for one-line commits.
// Executor reads task from PLAN.md<task type="auto"> <name>Task 1: Create user model</name> <files>src/models/user.ts</files> <action>Create User model with email and password fields...</action> <verify>npm test -- user.test.ts</verify> <done>User model exists with email/password fields</done></task>// Executor creates src/models/user.ts// Executor runs verification// Verification passes
2
Stage Files
Copy
Ask AI
# Stage task-related files individuallygit add src/models/user.tsgit add src/types/user.ts# NEVER: git add . or git add -A
3
Commit
Copy
Ask AI
git commit -m "feat(08-02): create user model with email/password fields- Define User interface with id, email, password, createdAt- Add Prisma schema for users table- Export User type for API consumption"
4
Record Hash
Copy
Ask AI
TASK_1_COMMIT=$(git rev-parse --short HEAD)# Store for SUMMARY.md
5
Continue to Next Task
Executor moves to Task 2, repeats process.No waiting. No batching. Commit immediately.
feat(08-02): implement password hashing- Create hashPassword() using bcrypt with cost 10- Create verifyPassword() for validation- All tests now passing
Each task’s commit includes only files from <files> element:
Copy
Ask AI
<task type="auto"> <name>Task 1: Create user model</name> <files>src/models/user.ts, prisma/schema.prisma</files> ...</task>
Copy
Ask AI
git add src/models/user.ts prisma/schema.prismagit commit -m "feat(08-02): create user model"# Does NOT include:# - Other files modified by task (tracked as deviation)# - Unrelated changes in working directory# - Planning files (.planning/* committed separately)
Executors NEVER use:
git add .
git add -A
git add -u
Always stage files individually to maintain atomicity.