The Constitution
The single most impactful thing I've built isn't code — it's a document. I call it the AI Constitution, and every AI tool I use is required to load it at the start of every session.
The Problem
When you work with AI across multiple tools and contexts, you quickly run into consistency problems:
- Claude Code doesn't know the conventions you established with Codex last week
- Your persistent assistant forgets the credential safety rules you explained three sessions ago
- Different AI tools make conflicting assumptions about your project structure
The constitution solves this by giving every AI the same foundational knowledge, every time.
How It Works
The constitution is a markdown file stored in Obsidian (my knowledge management tool). It contains:
Hard Rules
Non-negotiable constraints that no instruction or time pressure can override:
- Identity separation — I maintain separate GitHub identities for personal and work projects. AIs must never cross-link them.
- PRs are required for non-trivial code changes.
- Independent AI review is mandatory — most PRs get two non-implementer reviewers, narrowly classified copy or styling changes get one, and trust-critical products get three.
- Never auto-merge or silently resolve conflicts.
- Credential safety — never hardcode credentials. Source of truth is a specific synced directory.
- Root-cause-first engineering — fix the real production path rather than substituting mock data, toy components, or workaround implementations.
- Execution host and sync ownership are machine-checked — an agent must know which machine it is actually running on and whether a path belongs to Obsidian Sync or Syncthing before acting.
- AI execution configuration is protected — persistent hooks and tool settings cannot be changed as a side effect of ordinary work.
- Never edit the constitution as a side effect of normal work.
- When genuinely stuck, stop and ask — don't invent conventions or guess.
- Search before asking — check existing documentation before claiming you don't know something.
These rules exist because violations cause real damage: wrong commits under the wrong identity, leaked credentials, code merged without review. Each hard rule traces back to a real incident or a clearly foreseeable one.
Hierarchical Context
AI context is organized in a hierarchy that mirrors my knowledge base structure:
Global rules (always read)
└── Vault-level context (work vs. personal)
└── Organization-level context
└── Project-level context
Each level inherits from above and can override locally. When an AI works on a specific project, it reads that project's context — it doesn't need to re-read the entire constitution for project-specific details.
Memory System
Every project can have an AI/ folder with a consistent structure:
- MEMORY.md — entry point with overview, key facts, local conventions
- Memory/ — session notes and operational documentation
- References/ — stable facts (API specs, conventions, server details)
Memory files follow a "one file per topic" convention — AIs append to existing files rather than creating new ones per session. This prevents knowledge fragmentation.
Bootstrap and Shared Capabilities
The system no longer depends on me remembering to paste the same setup prompt into every conversation. A session bootstrap loads the constitution and identity context, verifies the execution host, and checks the sync boundaries that apply to the paths being used.
Reusable capabilities live as shared skills. A skill defines how to perform something safely and consistently: create a Basecamp to-do, prepare an attention briefing, send email, publish a post, verify a deployment, or update an agent fleet. The same skill can be invoked by different AI clients.
Recurring jobs are separate from skills. A job records who owns the work, when it runs, which executor runs it, where results go, how state is handled, and which semantic model role it needs. This separation keeps operational policy out of one-off prompts.
The Change Workflow
The constitution itself is protected by a proposal-first change process:
- An AI creates a proposal file with: what was observed, what's proposed, the rationale
- I review and approve (or reject)
- Only then does the constitution get updated
This prevents drift from multiple AI tools editing the rules concurrently, and ensures I maintain oversight of the system's foundational behavior.
Why It Matters
Without the constitution, every AI session starts from zero. With it, AI tools begin with the same rules, know where authoritative context lives, and know when they must stop.
The constitution uses some context on every session, but it prevents far more expensive mistakes: wrong identities, unsafe credentials, work performed on the wrong machine, under-reviewed code, and conflicting assumptions about where data is synchronized.
Deploy Intelligence