doctrine

A set of operating rules for deciding how an AI coding assistant should delegate work, handle failures, choose an approach, and judge whether a task is finished.

In plain words
What is it for?
It helps choose an appropriate model for a subagent, write delegation instructions, respond to failed subagents, decide whether to retry, and verify completion before reporting success.
Why use it?
It provides a consistent way to make those decisions instead of retrying randomly, escalating unnecessarily, or claiming work is complete too early.

Skill for Claude CodeCodex

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/telagod/code-abyss/doctrine
Any agent
npx skills add telagod/code-abyss --skill doctrine
Clone the repo
git clone --depth 1 https://github.com/telagod/code-abyss

Made for: Claude Code, Codex.

Per session 98 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 676 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00098 $0.00676
Opus 5 $0.00049 $0.00338
Sonnet 5 $0.00020 $0.00135
Haiku 4.5 $0.00010 $0.00068

Measured 2d ago against content hash 5a9ad7616ab4, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

doctrine scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/_kernel/doctrine/SKILL.md · 43 lines

How it starts

The opening of the file, as written. The whole thing — 43 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Doctrine — the operating institution, one folder

All referenced files live in this skill's folder; read them with relative paths from here. The three always-on laws live in the user's ~/.claude/CLAUDE.md router; this bundle carries the depth. Content lives in the numbered files — this SKILL.md only routes; never duplicate rule text into it.

Route by moment

Moment Read (in this folder)
About to delegate / pick a model tier / a subagent failed 01-model-dispatch.md, then fill a template from 03-delegation-templates.md
Retry? escalate? done? ask the user? direction feels wrong? 02-judgment.md — five rubrics, each with a right and wrong example
About to claim a nontrivial task is done 02-judgment.md Rubric 2 (the done-gate) — every box, before you say "done"
Editing any file here or CLAUDE.md; recording a lesson 04-maintenance.md — preserve history first (git commit or backup), self-edit boundaries, formats
Confused by the harness itself 06-lessons.md first (it may already be paid for), then 00-diagnosis.md
First session in a new environment, or sharing this bundle INSTALL.md
Why these rules exist; environment-specific warnings 00-diagnosis.md, 05-letter.md

Dispatch pre-send checklist (all four, or don't send)

  • Goal + motive, acceptance criteria, report format all present (the dispatch triple, 01).
  • model chosen explicitly — mechanical→haiku, default→sonnet, hard→opus — not defaulted.
  • Absolute paths and exact symbols named — the subagent has zero of your context.
  • Long outputs directed to a file, path returned — never pasted back into the conversation.

Quick reference

Would raw output ≫ the answer?           → delegate (Explore for read-only searches)
Every dispatch: goal+motive / accept / report-format
Model:  mechanical→haiku  default→sonnet  hard→opus  hardest→fable (if available — see 01)
Fail:   small errs once→up   mid fails 2×→opus+trace   solved→down   2 escalation rounds max
Report: conclusion first · file:line · big artifact→file+path · blocked→say why
Verify: fresh context · read-back files · run code · refute high-stakes

Read the full file on GitHub · 43 lines

Files

What ships with it

8 files beside SKILL.md in the same directory: the scripts, references and assets a skill reads on demand. Not counted in the per-session cost; read them before you install if any of them is executable.

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 43 lines · 98 tokens per session scan A 5a9ad7616ab4

Subscribe to this mod's changes

doctrine is a skill published in the GitHub repository telagod/code-abyss (239 stars, last pushed 1mo ago), licensed MIT. It adds 98 tokens to every session and 676 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.