/host-aios:build-devdir-systemsfrom host-aios
Build a FACTORY — a directory wearing its devdir programs (.onionmorph = its LOOK in the world, .cave/automations = its MACHINES that fire on the daemon's calendar, CLAUDE.md = its WORKER agent) — and run multi-agent work through cave-teams. Use whenever the user wants to make a place in the world, give a dir a look, automate something in a dir, add a worker to a place, wire a factory, or "make stuff in our .devdir format". Triggers: "make a factory", "terraform", "give this dir a look", "add a machine/automation to this place", "add a worker here", "build a devdir system", "wire this dir into the game".
Ships in host-aios. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The law: devdirs are the ONLY substance. A dir becomes a FACTORY by wearing its programs:
| program | file | what it is |
|---|---|---|
| the LOOK | <dir>/.onionmorph/world.json | how the place renders in the world |
| the MACHINES | <dir>/.cave/automations/<name>.json | automations that FIRE on the daemon's own calendar |
| the WORKER | <dir>/CLAUDE.md | the place's agent — registered on boot, recruitable, chattable |
Everything is a FILE in the dir. The daemon's watcher picks up any write within ~2s: looks re-render live, machines plug into the calendar live, workers register on the next boot. You may write the files directly, OR go through the validated server doors (below) — the doors refuse an invalid program with the schema's own errors and write NOTHING, which is safer. The user sees the same files through the in-game configurator panels (⚙ on a territory, THE CAPITAL at the root) — one substrate, two faces.
PORT="${ONIONMORPH_PORT:-8126}"; BASE="http://127.0.0.1:$PORT"
Paths are WORLD paths: / = the onion root, /forge = <onion>/forge.
.onionmorph/world.json# read a place's current program
curl -s "$BASE/woom/place?path=/forge" | python3 -m json.tool
# write one (TERRAFORMING when the dir had none) — validated, atomic, 422+errors if invalid
curl -s -X POST "$BASE/woom/place" -H 'Content-Type: application/json' -d '{
"path": "/forge",
"program": {
"version": 1,
"look": {"biome": "stone", "palette": {"primary": "#7a2ff0"}}
}
}'
Schema laws (violations are refused verbatim, nothing written):
version (must be 1) · look (biome/palette/knobs) · assets · halo · hintsobjects — substance comes from the devdirs themselves, never a manifestassets entries are {id, file, place?} where file is a relative .glb inside the
.onionmorph dir (Blender-compiled only) and must exist.cave/automations/<name>.jsonMachines are LIVE: the loader syncs every valid spec onto the daemon's own automation registry and the heart fires due ones (~60s granularity). Spec shape:
# mint a machine through the door — validated, 422+errors if invalid
curl -s -X POST "$BASE/woom/automation" -H 'Content-Type: application/json' -d '{
"path": "/forge",
"name": "tend-the-forge",
"spec": {
"name": "tend-the-forge",
"schedule": "every:3600",
"code_pointer": "mypkg.mymodule.my_zero_arg_function"
}
}'
# see every loaded machine + its live state (dormant · run_count · last_run)
curl -s "$BASE/woom/machines" | python3 -m json.tool
Spec laws:
name + schedule (cron expr like "0 3 * * *", or "every:N" seconds)code_pointer | prompt_template | chain_specdelivery · enabled · expected_deliverables; unknown keys are errorscode_pointer = "module.func", zero-arg (no code_args in v1) — read
WOOM_ONION_ROOT from the env for context; fires in-process, LIVE immediatelyprompt_template/chain_spec machines load DORMANT (they cost real
model calls) — they show "dormant": true in /woom/machines and never fire until the
operator arms them (WOOM_ARM_PROMPT_AUTOMATIONS=1). Never promise a prompt machine
"will run tonight" — say it is registered dormant and needs arming.onionmorph.woom_automations.write_fire_receipt writes a
receipt under <onion>/.cave/woom/receipts/ — use it to prove a factory's power is on.CLAUDE.mdWrite a real CLAUDE.md in the dir saying what the place IS and what its worker knows/does.
On the next daemon boot the place gets a registered cave ChatAgent named worker-<dirname>
(recruitable into the party, chattable from the building panel, a body standing at the place).
The file is re-read every turn — editing it re-teaches the worker live.
Multi-agent work runs through the TWO existing cave-teams skills — point at them, use them, never reimplement:
A machine that should drive agents = a chain_spec or prompt_template machine (dormant by
the money law) or a code_pointer into a function that calls cave() — the calendar is the
scheduler either way; never build a second cron.
Every act you take through the doors is recorded into the touched onions'
.claude/rules/woom_state.md automatically — WORLD POV, never character POV. When YOU write
state lines anywhere, keep that register: "the machine 'x' at /forge was plugged in", never
"I plugged in my machine".
A TEMPLATE is a data file freezing a dir's whole factory shape (look + machines + worker +
starter files) so it can be stamped as a new dir in one act. Templates live in the seat
<onion>/.cave/woom/templates/<name>.json:
{
"template": "code-onion",
"captured_from": "/forge",
"description": "what this factory is for",
"look": { "version": 1, "look": { "biome": "stone", "palette": {"primary": "#1fb6bf"} } },
"machines": { "<slug>": { "name": "<slug>", "schedule": "…", "code_pointer": "…" } },
"worker_claude_md": "# The place\n…what the worker knows…",
"files": { "notes.md": "starter content…" }
}
CAPTURE (dir → template): read the dir's .onionmorph/world.json → look; each
.cave/automations/*.json → machines; CLAUDE.md → worker_claude_md; any starter files
worth carrying → files. Write the template into the seat. Capture only what IS there —
a template is a record of a real shape, never an invention.
STAMP (template → a new factory) — all through the existing validated writers, nothing new:
mkdir <onion>/<newdir> and write files + worker_claude_md as CLAUDE.md.POST /woom/place {"path": "/<newdir>", "program": <look>} (422 = the template's
look is invalid — fix the template, never force).POST /woom/automation {"path": "/<newdir>", "name": <slug>, "spec": <machine>}
per machine — valid ones go LIVE on the calendar within seconds (dormant if model-call)./woom/machines lists the
stamped machines, and the worker registers on the next daemon boot (workers are boot-time
in v1 — say so, never promise a live worker mid-session).The one worked template: code-onion (captured from this onion's /forge — a making-place:
teal/stone look, a daily-tend machine, a tend-receipt heartbeat, a making-disciplines worker).
mkdir the dir (or pick the existing one).CLAUDE.md./woom/place with the world program (or write .onionmorph/world.json)./woom/automation per machine (or write .cave/automations/*.json)./woom/place?path=… shows the program with zero errors; /woom/machines lists
the machines (live vs dormant as intended); the world renders the place within seconds.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub sancovp/host-aios --plugin host-aios63 skills in this plugin
/adding-a-skillWhen you make/add ANY skill (an AC, a CoR, a chain, a domain), do NOT just write the file — place it in the skilltree (coordinate-addressed), and because every directory is automatically an AIOS, give a new domain/role its own AIOS. Version it so the tree self-expands and search forwards to the newest. Use this whenever you create or improve a skill./adversarial-testingRun BEFORE writing or trusting any test. Turns tests from confirmations of the implementation into questions that could come out against it: claims named, competing explanations named, a must-admit and a must-refuse case for every check, failures settled by counterexamples, "better" decided on a population enriched on both sides, verdicts recorded with their reach. Use when writing tests, reading a green run, claiming "done/verified/stronger/better", or judging another check, search or procedure./aios-artifactsWHEN you are about to make a new folder of its own (a project, a tool, a program, any piece of work that will live in a folder of its own), open this skill before that folder's first file and walk its steps, so the folder is made an AIOS in this AIOS's form by you, not later by someone else; also WHEN a folder is found without its design, board or map. It decides whether the project is new or exists, then makes its DESIGN.md, its board and its architecture map through their skills, then wires it into every index above it./aios-artifactsbanditChain-of-reasoning (spoken, ends in a decision) — The four artifacts every AIOS project owes and the order they are made in./archi-diagramAuthor the architecture diagrams a project owes. A mermaid flowchart per altitude, subgraphs marking boundaries, arrows meaning dependency direction, every external dep ending AT ITS SEAM because a dep's internals are its own architecture, plus the three-column general-specific-code bijection, drawing the final architecture with no mark of what is built, which is its board's. THE LAW is rule 23/brave-searchSearch the web using the Brave Search API, when a search must go through Brave rather than Claude Code's own web search. Needs a Brave Search API key in the environment variable BRAVE_API_KEY.