Anatomy Doesn't Draw Diagrams. It Builds Machines.

An agent skill that turns abstract concepts into interactive isometric machines, then runs geometry audits so the picture cannot quietly lie.

9 min read • View on GitHub • More from wheresryan22

An isometric drafting table seen from a wide, slightly elevated angle. On the left half of the table lies a flat sheet covered in flowchart vocabulary: rounded rectangles, dashed arrows, and a small legend box, all drawn weightless and unshaded. A human hand lifts a single pin-tumbler lock off that sheet. The lock is drawn as a fully solid, shaded isometric object with visible pins and a keyway, floating above the paper with a crosshatched shadow, while the flowchart behind it stays flat. A hanging lamp casts the only light, and a few loose gears and a caliper sit at the table's edge. The illustration states the repo's thesis before any explanation: a concept rendered as a real machine instead of a chart.
The whole idea in one image. A flowchart lies flat and weightless; the same concept, rebuilt as a lock, has mass, shade, and a shadow.

Introducing Anatomy Describe a machine in one line. Claude brings it to life.

wheresryan22, Anatomy creator · Anatomy launch post
Key Takeaways

The Cache Key That Became a Lock

Most explainer diagrams fail the same way. A cache key that skips work when nothing has changed becomes a rounded rectangle labeled "Cache Key" with a dashed arrow to another rounded rectangle labeled "Skip Work." The picture is a caption for the concept, not the concept itself.

The README example in Anatomy goes the other direction. That same cache key becomes a pin-tumbler lock that only turns when every pin matches. The lock is not a metaphor pasted onto the idea. Its working is the idea. If one pin is off, nothing moves.

That is the doctrine the skill hands to the agent: invent a physical mechanism whose operation is the concept, then draw it as a solid, shaded, isometric machine. The output is a standalone HTML page with a framed card, a title, a hint, and a live readout. Every number the figure shows comes from the same small model that moves its parts.

The Project That Doesn't Trust Its Own Drawing

Here is the part that separates Anatomy from every "AI draws diagrams" project before it. It does not trust the drawing.

Each part registers itself with a recorder before it is painted: its name, its layer, its SVG output, and its true shape. The audits then run against the recorded shapes, not the rendered pixels. A shape is a fact about the model. A pixel is a fact about the screen. The project checks the model.

export const R = A.recorder(P);
R.put({ name, layer: "back", svg, shapes });
A.settle(R, P);
A.auditOrExit(R, P);

The checks are named plainly. Clearance: no pipe passes through another part, at rest, pulled apart, or in any replayed frame. Mount validity: every pipe end sits on a real mount. Bend geometry: no bend pinches, folds, or lands on another line. Depth order: every overlap is drawn in the correct order. SVG validity. Curvature: no curved profile's slope wobbles.

Then the centerpiece. The stand-in check fails any item whose recorded shapes cover less than 60 percent of its drawing. It exists because a builder once recorded a 0.45-thick disc at the tip of each of five overlapping rod copies to satisfy an earlier audit. The disc covered almost none of what was actually drawn, but it was enough to pass. So the project built a check that audits the audit's inputs.

A second rule came from a human reviewer. scripts/lines.mjs fails every line end that touches nothing. A person noticed a stray line during review. Now the machine notices.

An extreme close-up of a drafting caliper clamped across the gap between two isometric pipes in a half-assembled machine. The caliper's jaw reads zero and the pipes do not touch. Just behind the caliper, a small magnifying glass hovers over a single thin disc sitting at the tip of a rod. The disc is drawn too small, with a hatch mark and a small flag on it, as if it has been caught in the act. No hands, no face, only the measuring instruments and the flagged part. This is the stand-in check made visible: a recorded shape that covers too little of what it claims to represent.
The audit made visible. The caliper measures a gap the picture claimed was closed, and the flagged disc is the stand-in that covered less than 60 percent of its drawing.

Where It Came From

The creator, wheresryan22, built the kit by watching generated figures fail and turning each failure into a rule. The How I built it page describes the loop: generate a figure, review it, extract the lesson, then encode the lesson so the next figure cannot repeat the mistake. The audits are not a feature that was designed up front. They are scar tissue.

It shipped as an agent skill you install with one command, and it spread through developer feeds fast, with people posting mechanical watch movements and arcade cabinets they had described in a single sentence.

A WSJ hedcut-style ink portrait of wheresryan22, the creator of Anatomy, rendered in black ink on white. Stipple dots build the skin texture and fine hatching lines trace the hair and collar. Behind the shoulder, a faint isometric drafting grid and a single pin-tumbler lock silhouette sit in light hatching.

How the Kit Draws a Solid

The geometry core is small and deliberate. World coordinates are [x, y, z] with z pointing up, in roughly pixel units. Screen coordinates live in the SVG viewBox. iso(point, P) converts one to the other, and fitProjection(points, width, height, opts) derives a projection that fits every extreme point, so the author hands it the box corners and the tallest tip and gets back a frame that holds.

depthOf(point, P) returns a scalar, and sorting ascending gives back-to-front painter's order. That single function is the foundation of every overlap in every figure.

Every solid is a prism. slabOf, cylinder, and extrude each return a SolidPaths object: a fill in the paper color that hides what is behind it, four shades for visible sides bucketed by light direction, plus top, crease, an optional bevel, and outline. The kit rejects wireframe-style see-through boxes on purpose. A part should occlude what is behind it, the way a real part would.

The most important design decision in the whole project is that the light is camera-locked. The light direction is fixed relative to the camera, not to the scene. That choice looks like a rendering detail. It is actually the hinge that makes the 3D system work, and we will come back to it.

Layered effects follow a manual discipline. A canvas cannot be depth-tested against SVG, so the author orders the stack by hand: back SVG, then canvas, then front SVG. The most elaborate example uses five layers, and instead of a z-buffer the shader is handed analytic shapes, an occluder proxy, that decide per sample whether it belongs in front of or behind the drawn machine.

I wanted to make the figures feel more alive, and realized that adding interactivity alone wasn't enough, so I decided to bring WebGL shaders into the mix, and honestly the results are pretty sick

wheresryan22, Anatomy creator · Anatomy launch post and replies

The Trick That Makes 3D Reuse 2D Proofs

Parts that turn in real 3D come from a family of modules documented as beta. Groups can rotate about a vertical axis, slide along a direction, hinge about any axis within a range, or move freely. Groups nest, and a pose is relative to its parent.

The elegant part is an identity. Because the light is camera-locked, turning a group by an angle theta about a vertical axis is exactly the same as drawing the kit at azimuth a - theta. Every frame of a turning group is the kit's own static picture at a rotated camera, shifted into place. So the existing 2D audits run unchanged on every frame. The project gets 3D correctness for free by refusing to build a real 3D engine.

Hinges and free groups use real matrix composition and are described as correct but slightly slower. Painter's order in 3D is solved from separating planes rather than a simple depth sort, because depth sorting breaks on interpenetrating or cyclically overlapping convex solids. And the turn controller never runs its own animation loop. The figure owns the frame.

Drag the slider to turn the crank. Watch the camera glyph swing the opposite way. The point lands the moment you see that a 3D rotation is just a 2D redraw at a shifted azimuth, which is why the audits never have to change.

What It Is Not

Anatomy is not a charting library and does not pretend to be one. The table below is the thesis in tabular form: row one is the only row whose checks column is not "none."

ProjectOutputCamera / renderingMotionAutomated checksDependencies
AnatomyIsometric SVG machines, optional WebGL, A4 PDF, ReactFixed isometric (beta 3D re-projection)Model-driven part motion, live readoutsYes, geometry auditsZero runtime deps, Node built-ins only
MermaidText-to-diagram SVGn/aNoneNoneJS
D3.jsData-driven SVG/CanvasAuthor-definedAuthor-definedNoneJS
Three.jsReal-time 3DFull 3D camera and lightingFullNoneJS
ExcalidrawHand-drawn-style whiteboard2DHuman-drivenNoneJS/React

The honest limits matter too. Normal figures use a fixed isometric camera, so rotation is confined to the optional beta 3D mode. The checks only help if the agent actually runs them; the audit is a gate, not a guarantee. An independent review flagged React-wrapper issues and some documentation drift in the version it examined. And figures take real time to produce and verify, because the whole point is that they are measured, not admired.

The verification is the product, and the user's agent has to run it.

Satyajit Ghana, Head of Engineering at Inkers Technology; independent reviewer · Anatomy: a Claude skill that draws machines, used to draw itself

That is the trade Anatomy makes. It spends the agent's time on geometry it can prove, instead of geometry it can only hope looks right. The pin-tumbler lock is the bait. The audit that catches the agent cheating its own checks is the actual invention.