chore: untrack agent-sdlc gate state #50
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/untrack-agent-sdlc-state"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
.agent-sdlc/state/and.agent-sdlc/worktrees/become git-ignored, and thetracked
pre-pr-passmarker is removed from the index. The working copy stays;only the index entry goes.
Why
SDLC state moved
.claude/→.agent-sdlc/on 2026-09-15. The.gitignoreruleswere written for the old paths and never carried across, so the gate markers
silently became tracked files and were pushed straight to the default branch.
Two harms, both observed rather than hypothesised:
pre-pr-passis a stale "this tree passed" claim.pr-gate.shreads that marker to decide whether
gh/tea pr createis allowed, socommitting it means the claim outlives the tree it was made about.
/pre-prrun dirties theworktree, so
git worktree removerefuses andreturn-to-default.shcorrectlystands down rather than
--force. Observed onatlas#46, where the only dirtyfiles were the two gate markers; the worktree and branch had to be cleaned by
hand. After the equivalent fix landed as
atlas#47, the same cleanup succeededwith no
--force.Scope
state/andworktrees/only..agent-sdlc/config/is deliberately NOTignored —
plan-wip-capandbrief-file-budgetare repo settings the user-levelhooks read (
plan-wip-cap.sh:67,brief-budget.sh:63) and are meant to be shared.Test plan
/pre-prtier 0 (2 files, well under 50 lines, no control code —.gitignoreisnot a hook, guard, CI gate or gating command, and no logic changed).
pr-gate.shreads the marker from the working tree, not from git — verified byexecuting the hook during
atlas#47's review, where it reported a reviewed shapresent in no tree at HEAD. Change direction is fail-closed: a fresh clone has
no marker, so the gate denies.
🤖 Generated with Claude Code
Review Findings
No issues found. The changes are straightforward and appropriate:
.agent-sdlc/state/pre-pr-passgate marker file that shouldn't have been tracked.agent-sdlc/state/and.agent-sdlc/worktrees/directories to prevent tracking ephemeral build/CI state files in the futureThe commit message in the gitignore explains the issue well: gate markers were accidentally tracked after a path migration, causing worktree cleanup problems. The fix correctly excludes only transient state while preserving config files that should be tracked.