From ultracodex
Designs and scaffolds a filesystem-routed agent organization with per-entity memory, deterministic ingestion, audit, replay, and tick scheduling. Use for continuous document/event intake and durable judgment synthesis.
How this skill is triggered — by the user, by Claude, or both
Slash command
/ultracodex:org-creationThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
An org is an attention organization: a directory tree of agents with durable
An org is an attention organization: a directory tree of agents with durable memory, inboxes, and a tick scheduler. Nothing is resident. Agents are directories; ticks wake only the agents whose triggers fire.
Build an org only when all four tests pass:
If a test fails, use a workflow, script, queue, or database instead.
Use two to three levels:
/ root agent: house view and user door
AGENTS.md BRIEF.md LOG.md inbox/ tickets/
coverage.toml scaffold input: groups + entities
templates/ root.md group.md entity.md
<GROUP>/ aggregator
AGENTS.md BRIEF.md THESIS.md LOG.md inbox/ tickets/
<ENTITY>/ leaf agent
AGENTS.md BRIEF.md IDENTITY.md THESIS.md LOG.md WATCHLIST.md
FACTS/ inbox/ tickets/
ingest/ ledger.jsonl cache/ unassigned/
Keep aggregator span near 5-15 children. The superior reads only child
BRIEF.md files, and every BRIEF.md body is capped at 80 lines.
Templates use {{GROUP}}, {{GROUP_TITLE}}, and {{ENTITY}}. Scaffold owns
AGENTS.md; edit templates and re-scaffold rather than editing instances.
Directory slugs must be filesystem-safe and stable. Avoid reserved names:
ingest, templates, docs, coverage.toml, .ultracodex, .git,
node_modules, ops, runtime, workflows, audit, and user. Map scoped
or special external ids to safe slugs and record the mapping in IDENTITY.md.
Runtime-created files and directories such as tickets/, .thread, and
QA.log.md may appear after operation. Do not make templates depend on their
initial presence.
Entity counts are flexible. Cover the real population, then split or add aggregators when the span rule breaks.
Divide memory by update trigger, not by topic:
| slot | update trigger |
|---|---|
IDENTITY.md | Rebuild from primary sources on next_review; between rebuilds, only append a clearly labeled recent-developments section. |
FACTS/ | Fetcher-written only; agents cite these files, never transcribe them from memory. |
THESIS.md | The agent's judgment; revise only on the agent's own wake. |
LOG.md | Append on every wake. The null entry is mandatory when nothing changed. |
WATCHLIST.md | Each item carries an expiry or trigger date. |
BRIEF.md | The only artifact a superior reads; body <= 80 lines. |
Every memory file needs frontmatter: updated, sources, confidence,
next_review. Use fixed vocabulary: confidence
speculative|possible|likely|high-confidence; severity
routine|notable|material|urgent.
Calibrate severity in the templates with the deciding test: "would the owner act differently today?" Expect thresholds to be wrong at first. Replay real history and adjust.
Citation discipline:
[source:...] or
[fact:...].projection: and cite their basis.LOG.md or WATCHLIST.md.Auditor test: could a reader verify this line by reading the cited source file alone?
Use three receiver-cost levels:
Nobody writes up-tree. Agents do not page their ancestors; they write severity in memory, and the scheduler wakes the parent through content triggers.
Router violations are not silent. The runtime rejects the message, appends a
routing-violation row to ingest/ledger.jsonl, and sends feedback to the
sender so the next wake can correct the behavior.
The scheduler evaluates four trigger classes:
next_review or cadence.Wakes run from the agent directory. The wake result shape is:
{ changed, severity, logLine, outbox }
The runtime delivers outbox messages with authority checks, records state, and
runs org lint. Every wake appends a LOG.md line; a quiet wake appends a null
entry with severity:routine.
Build deterministic fetchers. They write one inbox item and one ledger row per delivered item:
{"type":"ingest","at":"2026-07-09T00:00:00.000Z","id":"item-1","date":"2026-07-09","to":"group/entity","item":"item-1.md","ref":"ingest/cache/item-1.txt"}
Disciplines:
id is any stable
non-empty source id, not a filesystem slug; replay escapes it only when it
must derive a fallback inbox filename. Router delivery and violation rows
coexist in the same file.ingest/unassigned/ for root review.Example domains can be dependency-watching, incident-watching, or an investment-research org watching a public filings feed. Keep the fetcher contract generic until the user supplies source-specific rules.
Run ultracodex org lint on demand and after ticks. Lint checks file
presence, frontmatter, vocabulary, BRIEF.md length, watchlist dates, thesis
provenance, LOG liveness, and single-writer boundaries.
Run ultracodex org audit after large ingests and on a schedule. A different
agent samples BRIEF.md and THESIS.md claims, verifies each against its
cited source file only, and returns
verified|unsupported|contradicted|uncheckable. Mixed lines use weakest-link
grading. Audit findings are delivered as audit notifies; owning agents fix
their own memory on the next tick.
Use replay for calibration. Replay derives a corpus from ingest ledger rows,
re-delivers it day by day, and can inject drop, dup, and late faults.
--pristine resets memory to scaffold state and is allowed only on a
replay/ branch.
coverage.toml and role templates. Put severity calibration and
citation rules in the templates.ultracodex org init; ultracodex org lint must pass.ultracodex org tick. Read the root and group
briefs yourself.npx claudepluginhub yuanpingsong/ultracodex --plugin ultracodexGenerates a complete agentic system (orchestrator + agents + skills) from a natural language description, with adversarial validation and atomic commit. Useful for creating an entire system at once instead of piece by piece.
Guides users through a multi-phase interview to create a custom Claude Code agent, covering purpose, capabilities, triggers, output format, and coordination rules.
Authors and reviews Agent Script workflow files: deterministic multi-agent orchestration in plain JavaScript, compatible with Claude Code Workflow and ultracodex.