fix: Polecat lifecycle cleanup - stale worktrees and git tracking
Fixes gt-v07fl: Polecat lifecycle cleanup for stale worktrees and git tracking conflicts. Changes: 1. Add .claude/ to .gitignore (prevents untracked file accumulation) 2. Add beads runtime state patterns to .gitignore (prevents future tracking) 3. Remove .beads/ runtime state from git tracking (mq/, issues.jsonl, etc.) - Formulas and config remain tracked (needed for go install) - Created follow-up gt-mpyuq for formulas refactor 4. Add DetectStalePolecats() to polecat manager for identifying cleanup candidates 5. Add CountCommitsBehind() to git package for staleness detection 6. Add `gt polecat stale <rig>` command for stale polecat detection/cleanup - Shows polecats without active sessions - Identifies polecats far behind main (configurable threshold) - Optional --cleanup flag to auto-nuke stale polecats The existing `gt polecat gc` command handles branch cleanup. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
13
.gitignore
vendored
13
.gitignore
vendored
@@ -17,6 +17,9 @@
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
|
||||
# Claude Code local state
|
||||
.claude/
|
||||
|
||||
# Test
|
||||
coverage.out
|
||||
*.test
|
||||
@@ -29,7 +32,17 @@ gt
|
||||
# Runtime state
|
||||
state.json
|
||||
.runtime/
|
||||
|
||||
# Beads runtime state (not tracked)
|
||||
# Formulas ARE tracked for `go install @latest` - see bottom of file
|
||||
.beads/redirect
|
||||
.beads/issues.jsonl
|
||||
.beads/interactions.jsonl
|
||||
.beads/metadata.json
|
||||
.beads/mq/
|
||||
.beads/last-touched
|
||||
.beads/daemon-*.log.gz
|
||||
.beads-wisp/
|
||||
|
||||
# Clone-specific CLAUDE.md (regenerated locally per clone)
|
||||
CLAUDE.md
|
||||
|
||||
Reference in New Issue
Block a user