The Bible Framework

One behavioral codex for you, your AI agents and your team — so a rule you state once keeps being followed in session forty.

Markdown and conventions, no runtime, no lock-in · MIT · extracted from a live production system by the Palo Alto AI Research Lab.

Repository Quickstart The spec Templates For robots
The Bible Framework — one rulebook loaded by a founder, his agents and his team

The problem

Everyone running an agent daily hits the same wall. You tell it something important; it works for one session, then it's gone. You write it into CLAUDE.md; the file bloats and half of it silently stops being followed. Your human assistant and your agent follow different rules. Nobody knows which rule is current.

The fix is not a bigger prompt. It is a codex with mechanics — the seven below.

The seven mechanics

  1. One rule = one file, with typed frontmatter: origin, date_established, status, supersedes, audience.
  2. Newer beats older on the same topic. Rules stated by the principal are overridden only by the principal.
  3. A routing tree decides where each rule lives — the Bible (human + agent behavior), the agent config (machine-only), memory (facts), or a hook (deterministic “every time X”). One home per rule; every other layer points at it.
  4. Always-loaded index vs lazy body. The config carries only trigger + essence + pointer; the full rule loads on demand. The context window stays lean.
  5. A declined-decisions journal — what you decided not to do and why, so rejected ideas don't quietly resurface a week later as fresh amnesiac proposals.
  6. An intake ritual. A rule spoken in chat is not “noted”, it is routed to every home it belongs in, linked, and traceable. Rules do not die in scrollback.
  7. Objection sparring. When the agent says “no-go” it must produce a numbered objection list and invite rebuttal. Undissolved objections become boundaries, not vetoes.

Quickstart — 5 minutes

  1. Copy templates/ into your vault or repo.
  2. Write your first three rules with rule-template.md. Keep each one trigger + essence + pointer.
  3. Add one index line per rule to your CLAUDE.md (or AGENTS.md for other agents).
  4. Start the journal from declined-decisions-template.md.
  5. When a decision matters, write it with decision-memo-template.md and link both ways.

Your own agent will maintain this better than any human: point it at the repository and say “adopt this structure for my rules.”

What a rule looks like

---
title: "Rule — <verb phrase: what to do, specific enough to act on>"
type: reglament
date_established: YYYY-MM-DD
status: active
origin: owner            # who stated it: owner | <name> | agent-inferred
authored_by: agent       # who physically wrote this file
audience: both           # human | agent | both
# supersedes: "[[old-rule-file]]"
---

And the one line that goes into the always-loaded layer:

## <Trigger — when this fires>
<Essence in 1-3 sentences: what to do / not do, and why it exists.>
Canon: `<rule-file-name>` (+ related rules as links).

The spec

Full text — anatomy, schema, precedence, routing, journals — in docs/SPEC.md. Section map:

§SectionAnswers
1Rule anatomyWhat one rule file contains, and what its compressed index line looks like.
2Frontmatter schemaThe five fields that make precedence and audience machine-decidable.
3PrecedenceNewer beats older; owner beats inference; supersedes beats both — and the old file stays, marked, because history is data.
4Routing treeFour questions in order that put a new rule in exactly one home.
5Declined-decisions journalHow a declined item is allowed to reopen (a recorded revisit-if condition, or an explicit trade-off quoting the decline).
6Objection sparringSix steps from “no-go” to a synthesis table of objection → dissolved / stands.
7Intake ritualThe done-test: will a parallel session that never saw this chat pick the rule up on its own?
8Plugin-family (Connect) ruleHandoffs between skills: the sender owns the result, not the delivery.

What's in the box

PathWhat it is
docs/SPEC.mdRule anatomy, frontmatter schema, precedence, routing tree.
templates/Rule, decision memo, declined-decisions journal.
examples/Real, sanitized rules from the live system — including the one born from an overturned verdict.
FOR-ROBOTS.mdEntry point for AI agents mining this repo for patterns.
docs/the-day-my-ai-said-no.mdThe essay behind mechanic 7: the day the agent refused, and what the rebuttal changed.

Where the pieces went

The roadmap is pain-driven, and two of its items outgrew this repo and shipped as their own:

PainWhere it lives
Multiple machines, one system — laptops and desktops drift apart claude-consensus — consensus protocol, dual-rail bus, ACK discipline, self-healing sync.
“My agent has ten tools and any prompt injection can use them all” agent-leash — LEASH-8 control model, scorecard, plan-vs-authorize pattern.
Fabricated citations reaching the user verbatim-citation-gate — zero-token verbatim gate + burden-of-proof judge.

Still queued: memory bloat, the test-after-build gate, the declined-journal deep dive, the taste gate, the CRM-to-messaging pattern. Full list with status: ROADMAP.md · what already shipped: CHANGELOG.md.

Contributing

Have one of those pains, or a different one? Open an issue — it is the best signal for what to ship next. You keep the copyright to your work: no CLA, no assignment, ever; contributions go in under this repo's MIT license, the same terms as ours, and we answer every issue and PR within 48 hours, including “no, and here is why”. Full deal: CONTRIBUTING.md.

Who made this

Anton Dziatkovskii — also written Anton Dzyatkovsky — (founder, non-technical) and Mike, his AI cofounder running on Claude Code. Everything here is battle-tested on a daily operation and given away free — we teach, we don't sell. Citable via CITATION.cff (ORCID 0000-0001-7408-3054). Credit for AI contributors follows one lab-wide policy: AI-CONTRIBUTORS.md.