anatomy
ยกมาตรงตามผลรันจริง ไม่ได้แก้ไข
# anatomy real run
- Date: 2026-10-15 23:00 +0700
- Tool: Claude Code 2.1.300, headless `claude -p`, later turns with `--resume` (one session)
- Model: claude-sonnet-5-5
- Isolation: --setting-sources project --strict-mcp-config (no user skills, memory or MCP)
- Skill: wheresryan22/anatomy @ e6600ffc4e8e6620eeb45bf49bcdbd5e4b84163f `SKILL.md` (MIT, @wheresryan22)
- Exact first prompt: `/anatomy Make one small isometric figure that explains a cache as a cabinet of drawers: a hit opens a front drawer fast, a miss walks to the back shelf and fills the drawer. Framework free, a single HTML file in out/.`
- User replies are sample text written by our team. Assistant text is verbatim from the session log. Tool calls are shown as one line notes; local paths in them are shortened to `~` and `<project>`.
## Turn 1
### User
/anatomy Make one small isometric figure that explains a cache as a cabinet of drawers: a hit opens a front drawer fast, a miss walks to the back shelf and fills the drawer. Framework free, a single HTML file in out/.
> [event] skill loaded: anatomy
### Assistant
Sizing this as a **Figure**: one mechanism, a cabinet of drawers. I'll start by looking at the closest example and the kit.
> [tool call] Bash {"command": "date && ls && ls .claude/skills/anatomy .claude/skills/anatomy/examples .claude/skills/anatomy/examples/dial-indicator && wc -l .claude/s[trimmed…]
> [tool call] Read {"file_path": "<project>/.claude/skills/anatomy/examples/dial-indicator/build.mjs"}
> [tool call] Grep {"pattern": "^export (function|const) ", "path": "<project>/.claude/skills/anatomy/kit/iso-kit.mjs", "output_mode": "content"}
> [tool call] Grep {"pattern": "drawer|sideMatrix|faceText", "path": "<project>/.claude/skills/anatomy/references", "output_mode": "content", "-i": true, "head_limit": 4[trimmed…]
> [tool call] Read {"file_path": "<project>/.claude/skills/anatomy/kit/iso-kit.mjs", "offset": 1, "limit": 30}
> [tool call] Read {"file_path": "<project>/.claude/skills/anatomy/kit/iso-kit.mjs", "offset": 355, "limit": 215}
### Assistant
Now the drawer recipe in craft.md and the slab/extrude geometry (which faces are visible).
> [tool call] Read {"file_path": "<project>/.claude/skills/anatomy/references/craft.md", "offset": 100, "limit": 90}
> [tool call] Read {"file_path": "<project>/.claude/skills/anatomy/kit/iso-kit.mjs", "offset": 100, "limit": 100}
> [tool call] Read {"file_path": "<project>/.claude/skills/anatomy/kit/iso-kit.mjs", "offset": 200, "limit": 155}
> [tool call] Read {"file_path": "<project>/.claude/skills/anatomy/kit/iso-kit.mjs", "offset": 567, "limit": 110}
> [tool call] Bash {"command": "cd <project>/.claude/skills/anatomy && cat scripts/inline-kit.mjs | head -60; sed -n 1,80p references/motion.md"}
### Assistant
Plan: a direct-mapped cache as a cabinet. Card *k* belongs in drawer *k mod 8*. A cantilever gantry shuttles copies from a card-file shelf into drawers. Writing the model, geometry and build now.
> [tool call] Bash {"command": "mkdir -p <project>/cache-cabinet <project>/out && cat > <project>/cache-cabinet/model.mjs <<'EOF'\n// Pure model: a direct-mapped cache. [trimmed…]
> [tool call] Write {"file_path": "<project>/cache-cabinet/model.mjs", "content": "// Pure model: a direct-mapped cache. Card k belongs in drawer k mod 8.\nexport const D[trimmed…]
> [tool call] Write {"file_path": "<project>/cache-cabinet/geo.mjs", "content": "// Geometry for the cache cabinet. Takes the kit as `k` so the build and the page share i[trimmed…]
> [tool call] Write {"file_path": "<project>/cache-cabinet/build.mjs", "content": "import { mkdirSync, readFileSync, writeFileSync } from \"node:fs\";\nimport { dirname, [trimmed…]
> [tool call] Bash {"command": "cd <project> && node cache-cabinet/build.mjs && node cache-cabinet/build.mjs --light --out=<tmp> && ls -la out && sed -n 1,60p .claude/sk[trimmed…]
> [tool call] Bash {"command": "mkdir -p <tmp> && node .claude/skills/anatomy/scripts/capture.mjs out/cache-cabinet.html --out <tmp> --wait 600 --times 2600,5200 2>&1 | [trimmed…]
### Assistant
I've built the first version of the cache cabinet page and am about to screenshot it to check the drawing. The compound command needed approval, so I'll run it as a single command instead.
> [tool call] Bash {"command": "node <project>/.claude/skills/anatomy/scripts/capture.mjs <project>/out/cache-cabinet.html --out <tmp> --wait 600 --times 2600,5200"}
> [tool call] Read {"file_path": "<tmp>"}
> [tool call] Bash {"command": "ls <tmp>"}
> [tool call] Read {"file_path": "<tmp>"}
> [tool call] Read {"file_path": "<tmp>"}
> [tool call] Bash {"command": "sed -n 1,60p .claude/skills/anatomy/scripts/drive.mjs"}
> [tool call] Bash {"command": "mkdir -p shots && cat > shots/hit.json <<'EOF'\n[[\"wait\",300],[\"key\",\"Enter\"],[\"sheet\",\"shots/hit-sheet.png\",150,12,null,1,[330[trimmed…]
### Assistant
I'm still debugging why the hit drawer doesn't open on screen. I'll write the action file with the Write tool, since the heredoc was rejected, then capture a frame sequence.
> [tool call] Write {"file_path": "<project>/shots/hit.json", "content": "[[\"wait\",300],[\"key\",\"Enter\"],[\"sheet\",\"shots/hit-sheet.png\",150,12,null,1,[330,150,40[trimmed…]
> [tool call] Bash {"command": "node <project>/.claude/skills/anatomy/scripts/drive.mjs <project>/out/cache-cabinet.html --actions <project>/shots/hit.json --scale 1"}
> [tool call] Read {"file_path": "<project>/shots/hit-sheet.png"}
> [tool call] Write {"file_path": "<project>/shots/hit2.json", "content": "[[\"wait\",300],[\"key\",\"Enter\"],[\"wait\",650],[\"shot\",\"shots/hit-zoom.png\",null,5,[380[trimmed…]
> [tool call] Bash {"command": "node <project>/.claude/skills/anatomy/scripts/drive.mjs <project>/out/cache-cabinet.html --actions <project>/shots/hit2.json --scale 1"}
> [tool call] Read {"file_path": "<project>/shots/hit-zoom.png"}
> [tool call] Write {"file_path": "<project>/shots/miss.json", "content": "[[\"wait\",300],[\"key\",\"ArrowRight\"],[\"sheet\",\"shots/miss-sheet.png\",320,16,null,0.7,[1[trimmed…]
> [tool call] Bash {"command": "node <project>/.claude/skills/anatomy/scripts/drive.mjs <project>/out/cache-cabinet.html --actions <project>/shots/miss.json --scale 1 | [trimmed…]
> [tool call] Read {"file_path": "<project>/shots/miss-sheet.png"}
> [tool call] Bash {"command": "cd <project>/cache-cabinet && sed -i 's/topMatrix(\\[tag.x + 14, tag.y + 8\\]/topMatrix([tag.x + 14, tag.y + tag.d - 8]/; s/{ tone: \"hi\[trimmed…]
### Assistant
I'll use the Edit tool for these changes instead of shell commands.
> [tool call] Edit {"replace_all": false, "file_path": "<project>/cache-cabinet/geo.mjs", "old_string": "topMatrix([tag.x + 14, tag.y + 8]", "new_string": "topMatrix([ta[trimmed…]
> [tool call] Edit {"replace_all": false, "file_path": "<project>/cache-cabinet/geo.mjs", "old_string": " out.push(S(k.slabOf({ x: F + 3, y: yc - 10.5, w: 2.4, d: 21,[trimmed…]
> [tool call] Edit {"replace_all": false, "file_path": "<project>/cache-cabinet/geo.mjs", "old_string": " const copy = () => cardSvg({ x0: C.BIN_X - C.CARD_L / 2, x1: C[trimmed…]
> [tool call] Write {"file_path": "<project>/shots/miss2.json", "content": "[[\"wait\",300],[\"key\",\"ArrowRight\"],[\"sheet\",\"shots/grab-sheet.png\",260,8,null,1.6,[1[trimmed…]
> [tool call] Bash {"command": "node cache-cabinet/build.mjs && node .claude/skills/anatomy/scripts/drive.mjs out/cache-cabinet.html --actions shots/miss2.json --scale 1[trimmed…]
> [tool call] Read {"file_path": "<project>/shots/grab-sheet.png"}
> [tool call] Read {"file_path": "<project>/shots/drop-sheet.png"}
> [tool call] Bash {"command": "sed -i 's/ H: 470,/ H: 410,/' cache-cabinet/geo.mjs && node cache-cabinet/build.mjs && node cache-cabinet/build.mjs --light --out=<proj[trimmed…]
> [tool call] Write {"file_path": "<project>/shots/light.json", "content": "[[\"wait\",300],[\"key\",\"ArrowRight\"],[\"wait\",2900],[\"shot\",\"shots/light-mid.png\",nul[trimmed…]
### Assistant
Line-end check passed with 0 floating ends in the dark build. I'm now checking the light theme mid-fetch and its line ends.
> [tool call] Bash {"command": "node <project>/.claude/skills/anatomy/scripts/drive.mjs <project>/shots/light.html --actions <project>/shots/light.json --scale 1 | cut -[trimmed…]
> [tool call] Edit {"replace_all": false, "file_path": "<project>/cache-cabinet/geo.mjs", "old_string": "k.lineOnTop([x - 5, 0], [x + 5, 0], z + 5, P)", "new_string": "k[trimmed…]
> [tool call] Read {"file_path": "<project>/shots/light-mid.png"}
> [tool call] Bash {"command": "node cache-cabinet/build.mjs && node cache-cabinet/build.mjs --light --out=<project>/shots/light.html && node .claude/skills/anatomy/scri[trimmed…]
> [tool call] Bash {"command": "node .claude/skills/anatomy/scripts/capture.mjs out/cache-cabinet.html --out shots/phone.png --width 390 --scale 2 --wait 1500 --reduced [trimmed…]
### Assistant
The figure is built: `out/cache-cabinet.html`, one standalone HTML file with no framework, dark theme.
It is a Figure-sized build, about 90 solids. I checked it in headless Chrome: the dark and light pages have 0 floating line ends, the console is clean, nothing scrolls sideways at 390 px wide, and reduced motion shows a still page with the "6 of 8 drawers filled" readout. I did not run `--audit` (the kit's geometry audit), because the build script has no audit hook. I checked the layering of the open drawer, the card and the arm by eye in captured frames, not by proof. I did not look at the phone screenshot.
**What you see**
- **The cabinet is the cache.** Eight drawers hold one card each. A drawer's label shows which of its two possible cards it holds.
- **The card file is the back shelf.** It holds all sixteen cards. Card *k* always goes in drawer *k* mod 8. A ruler strip with a marker shows which card is being requested.
- **A hit:** the drawer slides open (about 1.4 s) and the card is already there.
- **A miss:** a gantry on a back rail runs down the card file, lowers its jaw onto the card and lifts a lit copy. It carries the copy to the drawer, which has opened, and drops it in. The old card fades out and the drawer's label updates (about 4 s).
- **Cycle counts:** the readout gives 4 cycles for a hit and 204 for a miss, taken from the same model that drives the motion. Those figures are illustrative, and the caption says so and that the animation is not to scale.
**Interaction:** click a card or a drawer to request it, or use the arrow keys, Enter, Home and End. When nobody touches it, it runs a looping tour of hits and conflict misses, and it pauses while you interact.
**Source:** it's in `cache-cabinet/`, as `model.mjs` (the cache logic), `geo.mjs` (the parts) and `build.mjs`. Run `node cache-cabinet/build.mjs`, and add `--light` for the light theme. The light page is built at `shots/light.html` next to my scratch screenshots in `shots/`, so only the dark page is in `out/`.