alunduil-chezmoi
CLAUDE.md2 starsChanged 2 months ago0BSDView on GitHub
Chezmoi source directory. Files deploy to $HOME via chezmoi apply; names follow chezmoi rules (dot_ → ., executable_ → +x, .tmpl → Go template, .chezmoiscripts/run_*_before_NN-… → ordered convergent bootstrap). docs/tutorials/bootstrap.md has the bootstrap walkthrough; docs/explanation/architecture.md has the human-facing rationale. chezmoi diff/apply read the applied clone at ~/.local/share/chezmoi, not this working tree. Edits here don't take effect on apply until committed and pulled into the apply clone. Use chezmoi diff --source-path . to preview from this checkout. - Bootstrap scripts live…
- Commits and pushes
In this repository2 other files it gives its agents.
- dot_claude/CLAUDE.mdCLAUDE.md
- add-toolSkill
The file
We split this CLAUDE.md into the rules it gives an agent
2 rules. About 0 are common, 0 are distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 40
Every apt package lives in .chezmoidata/packages.yaml, in one list, so one pass makes one apt transaction.
- Very specific: line 54
Every *_VERSION pin carries a # renovate: datasource=… depName=… line directly above it (order: datasource, depName, packageName, …
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
alunduil-chezmoi
Chezmoi source directory. Files deploy to $HOME via chezmoi apply;
names follow chezmoi rules (dot_ → ., executable_ → +x, .tmpl →
Go template, .chezmoiscripts/run_*_before_NN-… → ordered convergent bootstrap).
docs/tutorials/bootstrap.md has the bootstrap walkthrough; docs/explanation/architecture.md has the human-facing rationale.
Source vs. apply path
chezmoi diff/apply read the applied clone at
~/.local/share/chezmoi, not this working tree. Edits here don't take
effect on apply until committed and pulled into the apply clone. Use
chezmoi diff --source-path . to preview from this checkout.
Invariants
- Bootstrap scripts live in
.chezmoiscripts/and converge: they run on every apply and each checks host state before acting (dpkg-querystatus, pinned--version,cmpbeforesudo install), so drift heals. Guards stay local and reach nosudowhen the host already matches — one that costs a network round-trip or prompts for a password belongs behindrun_onchange_instead.run_*_before_NN-*install/config passes carry a numeric prefix that orders them (dependencies);run_*_after_*passes are order-independent and named by concept, not numbered. - Helpers shared across passes live in
script/lib/bootstrap.sh, which each pass sources. run_onchange_is only for passes whose trigger is genuinely content, not host state:_07(itsclaude mcp listguard costs a network round-trip per server) andrun_onchange_after_register-*-mcp(rotating secrets must re-register on change). Everything else is plainrun_. Norun_once_— it keys off script content, so it cannot see drift.afteris for passes that consume somethingchezmoi applydeploys: a user unit fromdot_config/systemd/user/, a decrypted token, an external binary. That dependency is the only thing that forces the phase — everything else isbefore. Enabling a service the package itself shipped (tailscaled) forces nothing, so it stays in the pass that installed it rather than splitting one concern across two.- Every apt package lives in
.chezmoidata/packages.yaml, in one list, so one pass makes one apt transaction. Later passes configure what it installed rather than installing their own. - pre-commit shellchecks
.sh.tmplfiles unrendered, so a{{ … }}expression must sit inside quotes or a comment. That is why the package lists arrive viaread -ra <<<'{{ … }}'rather than an array literal. - Release binaries are chezmoi externals in
.chezmoiexternal.toml, each pinned by the version in its URL; bootstrap and CI (.github/actions/setup-chezmoi) both apply them. Renovate bumps every copy of a version in a URL, so write it out in full and leave it unannotated. ADR 0008 names the tools that stayscript/install/*scripts, each pinning its own*_VERSION. Zellij plugins (zellaude,zjstatus) pin their version inside the release URL in thepluginsblock ofdot_config/zellij/config.kdl. - Every
*_VERSIONpin carries a# renovate: datasource=… depName=…line directly above it (order: datasource, depName, packageName, versioning, extractVersion). One generic manager inrenovate.jsonreads them all — a new pinned tool needs no Renovate config change. An unannotated pin is invisible to Renovate rather than an error, soscript/checks/renovate-pins(a pre-commit hook) fails the build on one. - The repo requires every action pinned to a full-length SHA,
including the actions a third-party action calls. Renovate's digest
pinning stops at our own
uses:line. Before adopting or bumping a third-party action, read itsaction.ymlat the new SHA and confirm everyuses:underruns.stepsis a full-length SHA. dot_local/bin/executable_ghshadows systemghto enforce--draftongh pr create. PRs Claude opens go through this wrapper.
Pull request descriptions
This repo squash-merges with squash_merge_commit_message: PR_BODY, so
the description lands in git log verbatim and the branch commits go
with the squash. Write it as a commit message: prose wrapped at 72
columns, no H1 repeating the title, no ## section headings, no
checkbox lists. A trailer that has to persist goes in the description,
since the ones on branch commits are discarded.
The pr-create skill still composes Summary/Gotchas/Verification
headings; #778 tracks the divergence. This file wins here.
Sensors
CI is authoritative. Run all sensors locally before claiming done:
just check # runs every sensor below, reports all failuresEach runs in its own CI workflow and can be invoked alone:
pre-commit run --all-files # shellcheck, shfmt, check-json
bats --recursive dot_local dot_claude script # unit tests
script/checks/zellij-config # zellij KDL validation (needs zellij)
script/checks/chezmoi-apply # apply round-trip (needs chezmoi + age)Two CLAUDE.md files
- This file: rules for AI editing the chezmoi source.
dot_claude/CLAUDE.md→ deploys to~/.claude/CLAUDE.md. Edits there change Claude's host-wide behaviour on nextchezmoi apply.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

