From 94782eea3df22289fb556481f9569a9284c7ac50 Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Fri, 15 May 2026 17:18:55 -0500 Subject: feat(make): add audit target for cross-project .ai/ drift detection scripts/audit.sh walks every .ai/-using project under ~/code/, ~/projects/, and ~/.emacs.d/, compares each .ai/ against the canonical source at claude-templates/.ai/, and reports drift per project. Default mode is report-only; APPLY=1 rsyncs detected drift into each project (no auto-commit). FORCE=1 also rsyncs into projects with uncommitted .ai/ changes (default: skip with a warning). Uses diff -rq for content comparison rather than rsync --itemize-changes to avoid false positives on attribute-only drift (mtime, permissions). Skips the rulesets repo itself, the in-repo canonical source, and the legacy standalone ~/projects/claude-templates/ during the fold transition. Output mirrors make doctor: per-project ok/drift/applied/skipped/FAIL lines, summary tally, exit 0 when all ok. Runs make doctor as the final check by default; NO_DOCTOR=1 skips. --- todo.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'todo.org') diff --git a/todo.org b/todo.org index 25bf6c7..6b2a957 100644 --- a/todo.org +++ b/todo.org @@ -1819,7 +1819,7 @@ Two repos, one source of truth. =~/projects/claude-templates/= is the canonical Every project on the machine has a =.ai/workflows/startup.org= that rsyncs from =~/projects/claude-templates/=. Until each project's startup.org gets refreshed (which happens via the rsync itself), the old path needs to keep resolving. The symlink at step 4 is the bridge: old paths resolve into the new location, the rsync delivers the updated startup.org, next session uses the new path directly. -*** TODO [#A] Add =make audit= — drift detector across all =.ai/=-using projects +*** DOING [#A] Add =make audit= — drift detector across all =.ai/=-using projects Companion to =make doctor= (single-machine scope, checks =~/.claude/=). =audit= is cross-project scope: walks every directory on the machine that has a =.ai/=, diffs the synced template files against the canonical source, and reports drift. =--apply= flag rsyncs the drift into the project's working tree (no auto-commit). Catches stale projects without forcing a session start in each one. -- cgit v1.2.3