chore: untrack agent-sdlc gate state #50

Merged
brandon merged 1 commit from chore/untrack-agent-sdlc-state into main 2026-09-17 20:56:53 +00:00
Owner

What

.agent-sdlc/state/ and .agent-sdlc/worktrees/ become git-ignored, and the
tracked pre-pr-pass marker 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 .gitignore rules
were 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:

  1. A tracked pre-pr-pass is a stale "this tree passed" claim. pr-gate.sh
    reads that marker to decide whether gh/tea pr create is allowed, so
    committing it means the claim outlives the tree it was made about.
  2. It silently defeats post-merge cleanup. Every /pre-pr run dirties the
    worktree, so git worktree remove refuses and return-to-default.sh correctly
    stands down rather than --force. Observed on atlas#46, where the only dirty
    files 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 succeeded
    with no --force.

Scope

state/ and worktrees/ only. .agent-sdlc/config/ is deliberately NOT
ignored
— plan-wip-cap and brief-file-budget are repo settings the user-level
hooks read (plan-wip-cap.sh:67, brief-budget.sh:63) and are meant to be shared.

Test plan

/pre-pr tier 0 (2 files, well under 50 lines, no control code — .gitignore is
not a hook, guard, CI gate or gating command, and no logic changed).

git ls-files -i -c --exclude-standard   -> empty (no tracked file shadowed)
git check-ignore -v .agent-sdlc/state/pre-pr-pass  -> matches the new rule
test -f .agent-sdlc/state/pre-pr-pass   -> still present on disk
grep -rl '.agent-sdlc/state' --include='*.md' .   -> 0 (no doc made wrong)
grep -rl 'pre-pr-pass' .woodpecker/ .github/      -> 0 (CI never reads it)

pr-gate.sh reads the marker from the working tree, not from git — verified by
executing the hook during atlas#47's review, where it reported a reviewed sha
present in no tree at HEAD. Change direction is fail-closed: a fresh clone has
no marker, so the gate denies.

🤖 Generated with Claude Code

## What `.agent-sdlc/state/` and `.agent-sdlc/worktrees/` become git-ignored, and the tracked `pre-pr-pass` marker 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 `.gitignore` rules were 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: 1. **A tracked `pre-pr-pass` is a stale "this tree passed" claim.** `pr-gate.sh` reads that marker to decide whether `gh`/`tea pr create` is allowed, so committing it means the claim outlives the tree it was made about. 2. **It silently defeats post-merge cleanup.** Every `/pre-pr` run dirties the worktree, so `git worktree remove` refuses and `return-to-default.sh` correctly stands down rather than `--force`. Observed on `atlas#46`, where the only dirty files 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 succeeded with no `--force`. ## Scope `state/` and `worktrees/` only. **`.agent-sdlc/config/` is deliberately NOT ignored** — `plan-wip-cap` and `brief-file-budget` are repo settings the user-level hooks read (`plan-wip-cap.sh:67`, `brief-budget.sh:63`) and are meant to be shared. ## Test plan `/pre-pr` tier 0 (2 files, well under 50 lines, no control code — `.gitignore` is not a hook, guard, CI gate or gating command, and no logic changed). ``` git ls-files -i -c --exclude-standard -> empty (no tracked file shadowed) git check-ignore -v .agent-sdlc/state/pre-pr-pass -> matches the new rule test -f .agent-sdlc/state/pre-pr-pass -> still present on disk grep -rl '.agent-sdlc/state' --include='*.md' . -> 0 (no doc made wrong) grep -rl 'pre-pr-pass' .woodpecker/ .github/ -> 0 (CI never reads it) ``` `pr-gate.sh` reads the marker from the working tree, not from git — verified by executing the hook during `atlas#47`'s review, where it reported a reviewed sha present in no tree at HEAD. Change direction is fail-**closed**: a fresh clone has no marker, so the gate denies. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chore: untrack agent-sdlc gate state
All checks were successful
ci/woodpecker/pr/pr-review Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
3cdf245f9c
SDLC state moved .claude/ -> .agent-sdlc/ on 2026-09-15. The .gitignore rules
were written for the OLD paths and were 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:

1. A tracked pre-pr-pass is a stale "this tree passed" claim. pr-gate.sh reads
   that marker to decide whether gh/tea pr create is allowed, so committing it
   means the claim outlives the tree it was made about.

2. Every /pre-pr run dirties the worktree, so `git worktree remove` refuses and
   return-to-default.sh correctly stands down rather than --force. Post-merge
   cleanup therefore silently does nothing. Observed on atlas#46, where the
   only dirty files were the two gate markers.

Scope: state/ and worktrees/ only. .agent-sdlc/config/ is deliberately NOT
ignored -- plan-wip-cap and brief-file-budget are repo settings the user-level
hooks read (plan-wip-cap.sh:67, brief-budget.sh:63) and are meant to be shared.

Working copies are left in place; only index entries are removed.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
First-time contributor

Review Findings

No issues found. The changes are straightforward and appropriate:

  1. File deletion: Removes a stale .agent-sdlc/state/pre-pr-pass gate marker file that shouldn't have been tracked
  2. Gitignore addition: Adds proper ignore rules for .agent-sdlc/state/ and .agent-sdlc/worktrees/ directories to prevent tracking ephemeral build/CI state files in the future

The 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.

## Review Findings **No issues found.** The changes are straightforward and appropriate: 1. **File deletion**: Removes a stale `.agent-sdlc/state/pre-pr-pass` gate marker file that shouldn't have been tracked 2. **Gitignore addition**: Adds proper ignore rules for `.agent-sdlc/state/` and `.agent-sdlc/worktrees/` directories to prevent tracking ephemeral build/CI state files in the future The 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. <!-- claude-review: commit=3cdf245f9c74da8211224bb3dba942a625275324 -->
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
brandon/ci-plugins!50
No description provided.