Like the mythic serpent coiled into a ring, this harness feeds on its own output: every session leaves feedback traces, a monthly audit consumes them, and the rules that emerge are forced through a hard token budget before they can live in context. It is not a plugin or a framework โ it is a sanitized one-way mirror of a real daily-driver ~/.claude, used across multiple servers for ML research and engineering.
๐ Nothing here is hand-edited. A fail-closed export pipeline (allowlist โ sanitize โ forbidden-pattern gate โ fresh-history sync) regenerates this repo on each release. Even the logo is code-generated โ see
assets/gen_ouroboros.py.๐ฐ๐ท The rules and skills are written in Korean โ this is a real production config, not a localized demo. The architecture, file layout, and this README are English; the patterns (budget hooks, audit loop, two-tier rules) read the same in any language.
- ๐งฎ Hard token budget with a zero-sum rule โ always-on context (
CLAUDE.md+rules/) has a byte ceiling enforced by a commit hook. Adding a rule means shrinking another. The context never silently bloats. - ๐ A self-audit loop with recorded baselines โ a monthly audit skill measures inventory drift, pointer integrity, doc/implementation mismatch, and built-but-unused rot against numbers written down last cycle. Fixes are classified (structural vs parameter) and hit-tracked next time.
- ๐งพ Evidence-gated "done" โ no success claims without verification output; subagent claims that change downstream actions are re-checked against
file:linebefore adoption. - ๐ง Judgment rationale lives in artifacts โ trade-offs, failure-mode definitions, and tool-selection measurements are written into the rule/skill/script that embodies them, so any future session can reproduce the reasoning from files alone.
- ๐ก๏ธ User sovereignty by construction โ pushes, deletions, training runs, and destructive writes are always user-executed; cross-session peer messages cannot escalate permissions; untrusted web content is quarantined to read-only agents.
flowchart LR
W["โ๏ธ Daily work<br/>sessions ยท experiments"] --> F["๐ฅ Feedback capture<br/>QA fails ยท corrections ยท repeated patterns"]
F --> A["๐ Monthly self-audit<br/>baselines ยท pointer integrity ยท rot check"]
A --> D["โ๏ธ Zero-sum diet<br/>token budget ยท rule compression"]
D --> B["๐งช Bench gate<br/>before/after behavior check"]
B --> W
The tail feeds the mouth: waste found by the audit becomes the budget for the next rule.
| Layer | Contents |
|---|---|
๐ CLAUDE.md + rules/ |
Always-on tier: routing, model delegation (opus/sonnet/haiku), code-execution policy, memory triggers, prompt preprocessing |
๐ค rules-lazy/ |
40 lazy-loaded policies: QA process, context management, error handling, untrusted-content quarantine, secret handling, โฆ |
๐ค agents/ |
10 specialized subagents (scout ยท coder ยท qa ยท planner ยท researcher ยท searcher ยท docs ยท gitops ยท designer ยท citation-verifier) with spawn-prompt contracts |
๐งฐ skills/ |
25 skills: experiment workflow, paper reading, multi-perspective discussion, harness audit & bench, wandb/checkpoint cleanup, cost breakdown, โฆ |
๐ฉ scripts/ |
Hooks & automation: commit gates, session-start pattern mining, nightly ontology refresh, cost snapshots, this export pipeline |
โ๏ธ settings.json + _audit/history.md |
The receipts: actual hook wiring, and the audit history with recorded baselines |
๐ค The 10 agents, one line each
| Agent | Model | Role |
|---|---|---|
scout |
haiku | Read-only recon โ finds the files, symbols, and wiring before anyone edits |
coder |
sonnet | Implementation โ writes and modifies code to spec |
qa |
sonnet | Verification โ tests, call-site impact analysis, causal bug tracing |
planner |
opus | Architecture & experiment design consulting; final calls stay with main |
researcher |
opus | Paper writing, result analysis, adversarial design review |
searcher |
sonnet | The only agent that touches the open web โ returns quarantined summaries |
docs |
sonnet | Confluence/Jira via MCP, with the media-preserving edit protocol |
gitops |
sonnet | Commits, branches, diffs, tags โ push always stays with the human |
designer |
sonnet | Figures โ TikZ diagrams and matplotlib plots |
citation-verifier |
sonnet | Retraction gate + supporting/contrasting stance debate before any paper is cited |
๐งฐ The 25 skills, one line each
| Skill | What it does |
|---|---|
solve |
Opinion/planning questions via a 5-step method; ambiguous execution requests get meta-prompt convergence |
discuss |
Multi-agent debate with a devil's advocate, persuasion-attack guards, and consensus-quality metrics |
experiment |
Experiment lifecycle: design โ dry-run โ launch โ analysis โ cleanup gates |
workflow |
Phase-based workflow design with auto-generated rubric gates |
harness-audit |
The monthly self-audit: baselines, pointer integrity, recurring-defect catalog |
harness-bench |
Before/after behavior measurement when rules change |
learn-from-feedback |
Corrections accumulate into rule proposals after 3+ hits |
paper-read |
9-source parallel paper search + full-PDF close reading + review doc |
paper |
Paper writing: abstract, sections, review responses |
research |
Deep multi-source research with citation verification |
neuro-explain |
Neuroscience mechanism citations with mandatory plain-language analogies |
figure |
Paper figures: TikZ for structure, matplotlib for data |
confluence |
Page format standards, macro-escaping lore, media-preserving edit protocol |
confluence-research-record |
4-level research-note hierarchy (overview โ year โ month โ day) |
storytelling |
But/therefore narrative structure for research records and talks |
dumbify |
Rewrites expert prose for non-expert readers without losing the numbers |
commit |
Commit conventions + a rejected-pattern check against feedback history |
wandb-cleanup |
3-tier run triage + workspace visibility via raw GraphQL (no global hide API exists) |
ckpt-cleanup |
KEEP/DELETE/HOLD checkpoint classification against wandb run states; purge script is user-executed |
cost |
Per-model, per-agent cost breakdown rendered as a bar chart |
cost-reset |
Wipe accumulated cost ledgers (destructive, user-executed) |
graphify |
Turn any input into a persistent knowledge graph; query it before grepping |
project-init |
New research project scaffolding |
quick-skill |
Define a new rule/skill/agent quickly, with a write-time bloat gate |
setup-panels |
tmux panel layouts for teammate sessions |
- ๐ Measured, not vibes โ a token-diet cycle found and removed ~3KB of per-session waste (stale index blocks, uncapped hook injections, over-verbose skill descriptions) because baselines made the growth visible.
- ๐ชค A catalog of defects that actually recur โ the audit greps first for the five patterns that have really bitten before: label/reality drift, catalog desync, hook cache isolation, MCP tool renames, and built-but-unused rot (including "trigger conditions no real utterance can reach").
- ๐งน ML lifecycle cleanup gates โ after a training cycle: wandb run triage (3-tier tagging + workspace visibility) and checkpoint purge planning (KEEP/DELETE/HOLD matched against run states), destructive steps always user-executed.
- ๐๏ธ Convention-based document format registry โ per-project Confluence/doc templates detected by directory existence, so any server or new project picks up the right format with no central table to maintain.
- ๐ผ๏ธ Media-preserving Confluence edits โ verbatim fetch โ literal single-match substitution โ node-count check, encoded as a rule after a real incident where full-body regeneration destroyed every image on a page.
Read it as a reference architecture. The pieces most worth stealing:
- โ๏ธ the zero-sum always-on budget hook (commit gate + byte ceiling),
- ๐ the audit skill and its baseline/history discipline,
- ๐ค the two-tier rule layout (always-on summary โ lazy detail) with pointer-integrity checks,
- ๐ the spawn-prompt 4-element contract (objective / output format / tools / task boundary).
Paths and identifiers are genericized; a few private layers (project knowledge, internal doc formats, personal memory) are intentionally absent, and some pointers to them are left dangling on purpose.
Issues and PRs are welcome โ they are reviewed, back-ported into the private source of truth, and re-published here. Derivatives are part of the loop too: if you build on this, link it in an issue. See CONTRIBUTING.md.
MIT โ see LICENSE.