feat(doctor): add check for last-touched file tracking

Add bd doctor check that warns if .beads/last-touched is tracked by git.
This file is local runtime state that should never be committed, as it
causes spurious diffs in other clones.

- CheckLastTouchedNotTracked() detects if file is git-tracked
- FixLastTouchedTracking() untracks with git rm --cached
- Comprehensive tests for all scenarios

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
beads/crew/emma
2026-01-12 19:37:57 -08:00
committed by Steve Yegge
parent 8ea1f970e1
commit 3854bb29e9
4 changed files with 314 additions and 0 deletions

View File

@@ -227,6 +227,8 @@ func applyFixList(path string, fixes []doctorCheck) {
err = doctor.FixGitignore()
case "Redirect Tracking":
err = doctor.FixRedirectTracking()
case "Last-Touched Tracking":
err = doctor.FixLastTouchedTracking()
case "Git Hooks":
err = fix.GitHooks(path)
case "Daemon Health":