From: Plom Heller Date: Mon, 21 Sep 2026 11:45:32 +0000 (+0200) Subject: Add AI accounting of code changes and their meanings. X-Git-Url: https://plomlompom.com/repos/conditions?a=commitdiff_plain;ds=inline;p=confplom Add AI accounting of code changes and their meanings. --- diff --git a/CLAUDE.md b/CLAUDE.md new file mode 100644 index 0000000..192a9b0 --- /dev/null +++ b/CLAUDE.md @@ -0,0 +1,703 @@ +# CLAUDE.md + +This file provides guidance to Claude Code (claude.ai/code) when working with +code in this repository. + +Organization principle: each mechanism is described in exactly one place +(usually its own script's or file's section); everywhere else gets a pointer. +When changing behavior, update that one place. Git history covers "what used +to be there" — this file only says how things are and why. + +## Repository overview + +POSIX shell scripts for two related but distinct kinds of Debian setup, plus +the plain data/skeleton files they install. No build system, package manager +or test suite — the scripts and files are the entire deliverable. + +1. **Local, LUKS-encrypted multi-boot**: several mostly-isolated Debian + installs on one physical machine, all inside a single LUKS-encrypted LVM + volume group, sharing one large `data` LV. Driven from a rescue + environment on that machine by `setup_luksvg.sh`, `install_debian.sh`, + `chrooted_command.sh`. Installed systems refresh their own EFI boot files + after kernel upgrades via `update_efi.sh` — a deliberate, narrow exception + to the rescue environment's otherwise sole ownership of the EFI partition. +2. **Remote server bootstrap**: pushing this whole repo over SSH onto an + already-installed, root-SSH-reachable Debian server unrelated to the local + LUKS+VG (e.g. a fresh cloud VM), then remotely triggering its first-login + setup. Driven from the admin's own workstation by `install_server.sh`. + +Both tracks converge on the same first-login family — `start_root_t490s.sh` +(local installs) or `start_root_server.sh` (remote servers), then +`start_user.sh` — sharing plumbing via `_lib.sh` and `scripts/lib/`. + +### Directories + +- `scripts/` — every shell script, plus `_lib.sh` and `lib/` (below). All + scripts source `_lib.sh` via `. "$(dirname "$0")/_lib.sh"` and expect it, + and `lib/`, alongside themselves. + - rescue environment: `setup_luksvg.sh`, `install_debian.sh`, + `chrooted_command.sh` + - admin workstation: `install_server.sh` + - inside a target system: `start_root_t490s.sh`, `start_root_server.sh`, + `start_user.sh`, `update_efi.sh` (local systems only, see below) + - optional, by hand on an already-set-up target: `setup_git_mirror.sh` +- `to_install/` — per-target package lists (`t490s`, `server`), read in place + by `start_root` from `${PATH_REPO}/to_install/${TARGET}`. +- `to_copy/` — plain files installed verbatim by a target-side script. + Currently `90-backlight.rules` (see "`start_root_t490s.sh`"). +- `templates/` — files rendered by `render_template` with `${VAR}`/`$(cmd)` + expansion, instead of inline heredocs: `fstab`, `wifi.nmconnection` + (rendered by `install_debian.sh`), `git-daemon.service` + (`setup_git_mirror.sh`), `update-efi-hook` (`start_root_t490s.sh`). +- `home/` — dotfile skeletons `home/any/`, `home/root/`, `home/user/`, + symlinked file-by-file into an account's home by `link_home` (see below). + `link_home ` always links `home/any/` (what every account wants) + plus `home//`. + +The rescue-environment scripts only need `scripts/`, `to_copy/`, `templates/` +(the latter because `install_debian.sh` renders two of its files from it); +`to_install/` and `home/` matter only once a target's own first-login scripts +run. `setup_luksvg.sh` and `install_server.sh` both copy the *whole* repo +root, so all of it is present on every target. + +## Commands + +- Syntax check: `sh -n scripts/