diff --git a/README.md b/README.md index 3058737..d03fded 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,9 @@ repo is agent-ready. - **`docs/scaling.md`** — optional multi-agent coordination, for when one repo has many agents at once. Most projects never need it — and the kit says so. +> **Dogfooded:** this repo runs on its own kit — the `AGENTS.md`, adapters, and +> `memory/` at the root were produced by running `install.sh` on itself. + ## Deep dives The reasoning underneath the kit, at maximum technical depth — for developers and diff --git a/tests/install.bats b/tests/install.bats index 08f8ac7..3f0ad68 100644 --- a/tests/install.bats +++ b/tests/install.bats @@ -12,7 +12,23 @@ teardown() { rm -rf "$WORK" } +# Map a template's absolute path to the path install.sh should produce, relative +# to the target (adapters/* land at the target root — same rule as the installer). +template_dest() { + rel="${1#"$KIT"/templates/}" + case "$rel" in + adapters/*) rel="${rel#adapters/}" ;; + esac + printf '%s\n' "$rel" +} + +# The full set of expected files, derived from templates/ rather than hardcoded. +# Kept dynamic on purpose: drop a file into templates/ and both the installer and +# these tests cover it, with nothing to hand-maintain here. expected_files() { + find "$KIT/templates" -type f | sort | while IFS= read -r src; do + template_dest "$src" + done cat <<'EOF' AGENTS.md CHECKLIST.md @@ -34,6 +50,9 @@ EOF @test "installed files are byte-identical to their templates" { "$INSTALL" "$WORK" >/dev/null + while IFS= read -r src; do + diff "$WORK/$(template_dest "$src")" "$src" || return 1 + done < <(find "$KIT/templates" -type f) diff "$WORK/AGENTS.md" "$KIT/templates/AGENTS.md" diff "$WORK/CHECKLIST.md" "$KIT/templates/CHECKLIST.md" diff "$WORK/CLAUDE.md" "$KIT/templates/adapters/CLAUDE.md"