The machine now carries its own manual for AI hands

Claude-Session: https://claude.ai/code/session_01Ms2FbjQy31TVf3CEvQhGM8
This commit is contained in:
Gabriel Brown
2026-08-25 10:09:38 -04:00
parent beed44dd87
commit 045a774847
16 changed files with 1321 additions and 30 deletions
+18 -5
View File
@@ -49,7 +49,7 @@ done < <(find "$repo_dir/user" -type f \( -name 'id_*' -o -name '*.pem' -o -name
while read -r kind source destination; do
[[ -e "$repo_dir/user/$source" ]] \
|| note "the manifest points at $source, which is not in user/"
[[ "$kind" == link || "$kind" == copy ]] \
[[ "$kind" == link || "$kind" == linkdir || "$kind" == copy ]] \
|| note "the manifest uses an unknown kind: $kind"
[[ "$destination" == '~/'* ]] \
|| note "the manifest destination $destination is not under the home directory"
@@ -72,10 +72,11 @@ printf 'copied once\n' >"$checkout/user/plain.txt"
cat >"$checkout/user/manifest" <<'FIXTURE'
# a comment, and a blank line follow
link agents/AGENTS.md ~/.claude/CLAUDE.md
link agents/skills ~/.agents/skills
copy plain.txt ~/.config/plain.txt
link missing.txt ~/.config/missing.txt
link agents/AGENTS.md ~/.claude/CLAUDE.md
link agents/skills ~/.agents/skills
linkdir agents/skills ~/.claude/skills
copy plain.txt ~/.config/plain.txt
link missing.txt ~/.config/missing.txt
FIXTURE
home="$work/home"
@@ -101,6 +102,12 @@ PANAMA_USER_CONTENT=no run
# ── 2. Saying yes links, and keeps what was there ───────────────────────────
# ~/.claude/skills is shared now: link-skills has already made it a real
# directory and linked Panama's own skills into it. A linkdir entry has to land
# beside those rather than replace the directory holding them.
mkdir -p "$home/.claude/skills"
ln -s "$checkout/skills/shipped" "$home/.claude/skills/shipped"
PANAMA_USER_CONTENT=yes run
[[ -L "$home/.claude/CLAUDE.md" ]] \
@@ -109,6 +116,12 @@ PANAMA_USER_CONTENT=yes run
|| note 'the CLAUDE.md link does not resolve to the tracked file'
[[ -L "$home/.agents/skills" && -f "$home/.agents/skills/example/SKILL.md" ]] \
|| note 'the skills directory was not linked as a directory'
[[ -d "$home/.claude/skills" && ! -L "$home/.claude/skills" ]] \
|| note 'a linkdir entry replaced its destination directory with a symlink'
[[ -L "$home/.claude/skills/example" && -f "$home/.claude/skills/example/SKILL.md" ]] \
|| note 'a linkdir entry did not link each child into the destination'
[[ -L "$home/.claude/skills/shipped" ]] \
|| note 'a linkdir entry removed what another stage had linked into the destination'
[[ -f "$home/.config/plain.txt" && ! -L "$home/.config/plain.txt" ]] \
|| note 'a copy entry was linked rather than copied'