aboutsummaryrefslogtreecommitdiff
path: root/scripts/install-lang.sh
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-22 13:06:12 -0500
committerCraig Jennings <c@cjennings.net>2026-05-22 13:06:12 -0500
commit1ceed704147a1cd6c2c9cd332d3aa33ea43bda83 (patch)
treea76c66f491833e3403ba68b0d982c29a0cf78b48 /scripts/install-lang.sh
parent79dad4659b8ac97ce65d958efdcd1deed66b3661 (diff)
downloadrulesets-1ceed704147a1cd6c2c9cd332d3aa33ea43bda83.tar.gz
rulesets-1ceed704147a1cd6c2c9cd332d3aa33ea43bda83.zip
feat(startup): sync language bundles per project on session launch
Startup synced the .ai/ templates into the current project every session but never checked the language bundle (elisp, python) installed in .claude/. Bundle drift went unnoticed until someone re-ran make install-lang by hand: a generic rule added to claude-rules/ after the last install, or a changed validator hook. scripts/sync-language-bundle.sh closes that gap. It fingerprints which bundle a project has by the presence of the language's own rule files (elisp.md, python-testing.md), then reconciles against the canonical source: auto-fix for rulesets-owned files (.claude/rules/*.md, .claude/hooks/*, githooks/*), surface-only for settings.json, which a project may have customized. CLAUDE.md is left alone. It's seed-only in install-lang and project-owned afterward, the same reason diff-lang skips it. Startup Phase A step 12 calls it for the current project, guarded so older checkouts that lack the script still boot. It writes only under .claude/ and githooks/, disjoint from the .ai/ rsync paths, so the parallel batch stays safe. A script rather than a make target keeps the Makefile-parse layer off the boot path. The absolute rulesets path it depends on is the same one the rsyncs already carry. Tested: 11 bats cases (no-bundle, clean, drifted rule/hook auto-fixed, surfaced settings.json asserted unmodified, absent CLAUDE.md not flagged, python detection, $PWD default, bad path). A smoke run against a copy of a real elisp project's .claude/ caught a perpetual "CLAUDE.md missing" alarm, which is what drove dropping CLAUDE.md from the surface set.
Diffstat (limited to 'scripts/install-lang.sh')
0 files changed, 0 insertions, 0 deletions