Doctrine
Doctrine is an opinionated but hackable set of tools and conventions for software engineering with LLM agents.

Heresy burns; Doctrine remains.
Design Goals:
- Correctness
- Laziness
- Hackability
- Efficiency
- DX for solo developers, teams
- time and token efficiency
- suitability for systems of any size & complexity profile
- useful support for "pre-rational" stages of specification (e.g. product design, backlog)
- quality engineering: robust auditability; formal verification gates
- separation of structured, relational data from prose
- separation of mutable, disposable state from useful artifacts
- thoughfully designed memory retrieval, relevance & decay
- composability; provide "orchestration primitives"
- avoidance of vendor lockin
- single binary distribution
- more with less: focused ambition, not minimalism.
Non-Goals
- SaaS integration (in core)
- Windows support (for now)
- Integrated TUI (for now)
Installation
||
or install from source (customise templates / skills):
&&
# optional:
# customise install/templates and/or plugins/skills
# they'll get bundled into the binary for installation
or use it as a nix flake:
inputs.doctrine.url = "github:davidlee/doctrine";
# ...
doctrine = inputs.doctrine.packages.${system}.doctrine;
to install skills for other agents:
Setup
&&
&&
Memory-only use
Use Doctrine's memory system with your preferred tooling for the rest:
# doctrine memory help
# doctrine memory record --type pattern "red/green/refactor TDD" --glob "src/lib/**/*" --summary "..."
# doctrine memory list
Usage
Doctrine ships with self-documenting agent memories.
The agent should be able to steer while you get used to the default workflow.
Hack
templates:
skills:
or:
&&
# in your projects
License
This repository is multi-licensed:
- Rust source code, application code, and compiled binaries are licensed under GPL-3.0-only.
- Files under
plugins/are licensed under MIT. - Files under
install/are licensed under MIT, including templates andconfig.toml.
Where a file contains an SPDX license identifier or a directory contains its own LICENSE file, that more specific notice controls.
Acknowledgements
The /worktree skill's directory-selection and safety-verification patterns are
adapted from superpowers:using-git-worktrees
by Jesse Vincent (MIT).
Specifications
Product and technical specifications — the durable, agent-readable intent behind
Doctrine's capabilities. Regenerate this list with just readme-index.
Product Specifications
- PRD-001 — Slices —
active - PRD-002 — Specifications —
active - PRD-003 — Skills —
active - PRD-004 — Memory —
active - PRD-005 — Reservation & Leasing —
active - PRD-006 — Install —
active - PRD-007 — Boot & Governance —
active - PRD-008 — ADRs —
active - PRD-009 — Backlog —
active - PRD-010 — Epistemic and Governance Records —
active - PRD-011 — Graph-Derived Priority and Actionability —
active - PRD-012 — Technical Specifications —
active - PRD-013 — Requirement Reconciliation —
active - PRD-014 — Estimation & Value —
active - PRD-015 — Dispatch & worktree —
active
Technical Specifications
- SPEC-001 — Graph-Derived Priority Engine —
active - SPEC-002 — Requirement Reconciliation Engine —
active - SPEC-003 — Doctrine —
active - SPEC-004 — Entity engine —
active - SPEC-005 — ADR entity surface —
active - SPEC-006 — Spec composition machinery —
active - SPEC-007 — Memory engine —
active - SPEC-008 — Id lifecycle —
active - SPEC-009 — Install & distribution —
active - SPEC-010 — Skills distribution —
active - SPEC-011 — Boot snapshot —
active - SPEC-012 — Dispatch & worktree —
active - SPEC-013 — CLI surface —
active - SPEC-014 — Slice surface —
active - SPEC-015 — Backlog entity surface —
active - SPEC-016 — Governance kinds (POL/STD) —
active - SPEC-017 — Tech-spec spine —
active - SPEC-018 — Cross-corpus relation contract —
active - SPEC-019 — Knowledge-record entity surface —
active - SPEC-020 — Estimation facet —
active - SPEC-021 — Dispatch orchestrator process —
active - SPEC-022 — Git interaction model —
active
Architecture Decision Records
- ADR-001 — Module layering: leaf ← engine ← command, no cycles —
accepted - ADR-002 — Global orientation memory class: repo-empty, unanchored, evergreen —
accepted - ADR-003 — Canonical change loop: slice-first, observe, reconcile, close —
accepted - ADR-004 — Relations stored outbound-only; reciprocity is derived —
accepted - ADR-005 — Shipped knowledge is tiered by access pattern; skills route, reference docs explain —
accepted - ADR-006 — Worktree posture: policy-agnostic framework, orchestrator-sole-writer dispatch —
accepted - ADR-007 — Adversarial review as a first-class kind with turn-based ledger coordination —
accepted - ADR-008 — Project-local jail build isolation and worker confinement for parallel dispatch —
accepted - ADR-009 — Slice lifecycle state machine and conduct axis —
accepted - ADR-010 — Relation modelling: unify the contract and write seam, keep storage bespoke —
accepted - ADR-011 — Harness-agnostic orchestrator spawn interface and per-harness capability altitude —
accepted - ADR-012 — Dispatch integration topology: isolated coordination worktree, class-routed projection, preserved code branches —
accepted - ADR-013 — Revision as a first-class change-axis kind; governance dependency routes through a Revision —
accepted - ADR-014 — RFC: governance-neutral first-class kind, precursor to Revision —
accepted