Doctrine chapters
Seventeen chapters at three levels — from the business “why” to technical mastery. Read online or download the whole thing.
The Decalogue — the core in 10 points
- IDocument for the agent, not for the archive.
- IISearch the history before you write a single line.
- IIIVerify, don’t declare.
- IVDry-run is the default; --execute is deliberate.
- VThe backup is the rollback mechanism, not a precaution.
- VIProd is sacred — nothing touches it without an explicit “deploy.”
- VIIUser data is inviolable.
- VIIITag every deploy and tell the user what they gained.
- IXSmall, coherent commit; one topic.
- XPlan → iterate → review.
Level 1 · Business The why — no code
The Decalogue
The core of the doctrine + the seven deadly sins.
ReadCollaboration and memory
Plan → sketch → scale, approval per action, the permission map, handing off state.
ReadA new project: Day 0
Wiring in the rules, the product brief and the start checklist.
ReadLaw and protecting the maker
Terms, privacy policy, disclaimers as the maker’s armour.
ReadLevel 2 · Technical The how — in practice
Documentation and AI_README
An AI_README in every folder, CLAUDE.md as the source of truth.
ReadTesting and verification
A test in every commit, proof instead of declarations, a guard proven on the incident.
ReadScripts and databases
Dry-run/--execute, idempotency, migrations, backups.
ReadGit and deployments
Git history, undoing mistakes, parallel work, deploy policy.
ReadStack and technologies
The default stack, monolith, testability, secrets outside the repo, an ADR for any deviation.
ReadRelease rehearsal
dev → preprod → prod: preprod built from prod by script, the real runbook rehearsed.
ReadLevel 3 · Codex Mastery — the full doctrine
Skills and refactoring
When to build a skill; the discipline of refactoring.
ReadSEO and translations
hreflang, language parity as a test, E-E-A-T/YMYL, Core Web Vitals.
ReadData model and normalization
Lookup tables, slug instead of ID, active rows, forward-only migrations.
ReadFlexibility and scalability
Separate the layers, feature flags, scale-to-zero vs always-on.
ReadPerformance: frontend and SQL
Measure first, indexes and partial indexes, no N+1, streaming.
ReadOperational resilience
Limits, timeouts, resumable jobs, a watchdog on the result — the service must not fall over from one bad request.
ReadScraping, AI APIs and chatbots
Gathering web data, delegating tasks to AI and steerable chatbots — as product features.
ReadDriving Claude
When to use plan mode, autopilot within the permission map, the model by stakes, a worktree per session.
ReadLanguage of code and guards
Code in English (test names too), prose in the project’s language, guards as a ratchet.
ReadDatabase swap runbook
Swapping the prod database without losing accounts: every user table, mapping by slug, a backup right before.
Read