BumpyClock/agent-templates / skills/anatomy
anatomy
UnverifiedBuild crafted, highly detailed, interactive isometric SVG figures that explain a technical idea as a real physical object (a test rig, a dial gauge, a cabinet of drawers, a plotter, a lock), with many small precise solid parts, four-tone shading, correct painter's order, a framed card with title, hint and live readout, and calm eased motion. Use this whenever someone wants an isometric illustration, an explanatory diagram or figure for docs, a blog post, a landing page or an article, a "Linear-style" or "premium" technical drawing, an interactive explainer, or an SVG that shows how a system, algorithm or component works, even if they never say "isometric". Works framework-free (TypeScript/JS that writes SVG and HTML) and in React/Next.js, and can add realistic WebGL shaders (fire, exhaust, water, caustics, lamp light) that live inside the drawing in the same isometric perspective. Also publishes a finished figure to the Anatomy community gallery when asked.
scripts/turn-split-owner.test.mjs
View on GitHubimport assert from "node:assert/strict";
import test from "node:test";
import * as A from "../kit/audit.mjs";
import * as G from "../kit/lathe.mjs";
import { turning } from "../kit/turn-build.mjs";
import { TURN } from "../kit/turn.mjs";
import { posed } from "../kit/turn-audit.mjs";
function fixture(kind, owner = "pipe") {
const T = turning({ origin: [0, 0], scale: 1, azimuth: 45, elevation: 30 }); T.layer("all");
const group = T.group("assembly", { turn: { pivot: [5, 2] } });
const F = G.frameAlong([0, 0, 0], [0, 0, 1]);
const base = { name: "ferrule", owner, group, F, s0: 0, s1: 10 };
const part = kind === "prism" ? T.prism({ ...base, polygon: [[-2, -2], [2, -2], [2, 2], [-2, 2]] }) : T.round({ ...base, r: 2, ...(kind === "default round" ? {} : { fixed: false }) });
const tube = A.tube([[0, 0, -2], [0, 0, 12]], 0.5, { name: "pipe", owner: "pipe" });
return { T, part, tube };
}
for (const kind of ["prism", "round", "default round"]) test(`split ${kind} preserves explicit ownership and its pipe clearance`, () => {
const { T, part, tube } = fixture(kind);
assert.deepEqual(A.clearances([tube], part.shapes), []);
const halves = T.split(part, { n: [0, 0, 1], d: 5 });
assert.equal(halves.length, 2);
assert.ok(halves.every((half) => half.owner === "pipe" && half.shapes.every((shape) => shape.owner === "pipe")));
assert.deepEqual(A.clearances([tube], halves.flatMap((half) => half.shapes)), []);
T.build();
const scene = TURN.prepare(T.data, { unit: 1 });
for (const angle of [0, 45, 90, 180]) {
const cams = TURN.cams(scene, { assembly: angle });
const group = T.groups[0];
const pose = { R: cams[group.index].R, t: cams[group.index].t, origin: group.origin };
const shapes = halves.flatMap((half) => half.shapes.map((shape) => posed(shape, pose)));
const original = posed(part.shapes[0], pose);
assert.deepEqual(A.clearances([posed(tube, pose)], shapes), []);
for (const z of [2.5, 7.5]) {
const a = angle * Math.PI / 180;
const point = [5 - 4 * Math.cos(a) + 2 * Math.sin(a), 2 - 4 * Math.sin(a) - 2 * Math.cos(a), z];
const distance = Math.min(...shapes.map((shape) => A.sdf(shape, point)));
assert.ok(distance < 0);
assert.ok(Math.abs(distance - A.sdf(original, point)) < 1e-8);
}
for (const run of scene.runs) {
const frame = TURN.emit(run, cams[run.group], TURN.frame(run));
assert.ok(frame.d.some((path) => typeof path === "string" && path.length));
}
}
});
test("an unrelated pipe still reports real penetration of split fittings", () => {
for (const kind of ["prism", "round", "default round"]) {
const { T, part, tube } = fixture(kind, "other");
const halves = T.split(part, { n: [0, 0, 1], d: 5 });
const failures = A.clearances([tube], halves.flatMap((half) => half.shapes));
assert.equal(failures.length, 2);
assert.ok(failures.every((failure) => failure.kind === "through" && failure.clearance < 0));
}
});
test("unowned split parts retain normal collision checking", () => {
for (const kind of ["prism", "round", "default round"]) {
const { T, part, tube } = fixture(kind, null);
const halves = T.split(part, { n: [0, 0, 1], d: 5 });
assert.ok(halves.every((half) => !half.owner && half.shapes.every((shape) => !shape.owner)));
assert.equal(A.clearances([tube], halves.flatMap((half) => half.shapes)).length, 2);
}
});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |