PAI: add CONSTITUTION.md — Nine Articles of Development#1102
Open
caraka wants to merge 1 commit intodanielmiessler:mainfrom
Open
PAI: add CONSTITUTION.md — Nine Articles of Development#1102caraka wants to merge 1 commit intodanielmiessler:mainfrom
caraka wants to merge 1 commit intodanielmiessler:mainfrom
Conversation
Engineer.md cites a "Nine Articles of Development" framework and EngineerContext.md line 35 instructs the Engineer to pre-load PAI/CONSTITUTION.md as Required Knowledge, but no such file ships in any release. This adds it. Adapted from GitHub Spec Kit (MIT, https://github.com/github/spec-kit): - I, II, III, VII, VIII, IX: from spec-driven.md - IV, V, VI: from templates/constitution-template.md example comments Preamble adopts an explicit per-article binding rule: each article binds an agent only when that article is explicitly cited by the agent's system prompt, a skill workflow it runs, or the task it receives. Loading this file is not binding; citation is. This matches Engineer.md's existing inline citation of I/II/III/VII/VIII/IX (which bind) while leaving IV/V/VI present but uncited and therefore not currently binding any agent. Tested with a fresh Engineer agent spawn from a clean Claude Code session: Engineer loaded ~/.claude/PAI/CONSTITUTION.md per its EngineerContext.md startup directive, quoted Article V verbatim, and correctly applied the per-article binding rule across all three citation channels (system prompt, skill workflow, task). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
Releases/v4.0.3/.claude/PAI/CONSTITUTION.md, the file referenced byEngineerContext.mdline 35 ("Required Knowledge (Pre-load from Skills): PAI/CONSTITUTION.md") and cited byEngineer.mdlines 236-260 (the "Nine Articles of Development (Constitutional Law)" section). Currently no such file ships in any release (verified across v2.3 through v4.0.3), so the citations resolve to nothing.This addresses recommendation #1 from @esciara's phantom-references audit posted in #812 (2026-03-02), which identified
PAI/CONSTITUTION.mdas the highest-priority phantom reference (12 agents touch it).A note on context
I'm new to PAI — I picked it up a few days ago and discovered this gap while learning how the agent system works, by walking through
Engineer.mdand following its references. The Constitution citation was a natural rabbit hole; this PR is what came out the other end. I'm genuinely grateful for the tool, and have no attachment to the outcome of this PR — accept as-is, edit freely, or reject — all of those are good outcomes from where I sit. Mostly I wanted the missing reference to land somewhere useful for the next person who walks the same path.What's in the file
Adapted from GitHub Spec Kit (
github/spec-kit, MIT-licensed) — the framework Engineer.md's Articles citation appears to come from. Specifically:spec-driven.mdtemplates/constitution-template.mdexample comments (these articles are named in spec-kit's template but not fleshed out in the spec-driven.md essay)Articles VII and VIII carry the "Gate" suffix to match
Engineer.md's existing usage. The other articles do not.The Preamble's binding gate (important for review)
The Preamble adopts an explicit per-article, citation-based binding rule:
This is the key design choice and it should ease any concern about merging this PR. Adding this file does not impose new rules on any existing agent. The mechanics:
Engineer.mdalready cites Articles I, II, III, VII, VIII, IX inline (lines 236-260). Those articles already bind the Engineer; this PR doesn't change that.So the file changes nothing about runtime behaviour. It just gives a real source-of-truth for citations that already point at it. Future PRs (not this one) could extend article citations into more agents if desired; doing so would expand binding by explicit choice.
Testing
Tested by spawning a fresh Engineer agent from a clean
claudesession in a fork-clone of this repo. The Engineer:~/.claude/PAI/CONSTITUTION.mdvia itsEngineerContext.mdstartup directive — successful, no errorsEngineer.mddoes not cite itThe Engineer's reasoning matched the spec-kit-derived wording exactly, demonstrating the file is intelligible and the binding rule is unambiguous.
What this PR does NOT do (scope)
Engineer.md(the inline article listing in lines 236-260 remains; it duplicates the new file's I/II/III/VII/VIII/IX content but coexists harmlessly via the per-article binding rule)EngineerContext.md(the existing line-35 pre-load directive now resolves to a real file rather than a missing one)These are deliberately out of scope to keep the PR minimal and reviewable. Note: this diverges from @esciara's audit recommendation, which suggested extracting the Articles from Engineer.md into the new file (deduplication). I chose to add the file without extraction to keep the PR scope as small as possible — happy to do the extraction as a follow-up PR if preferred, or to fold it into this one if reviewers want.
Notes for review
A few things you may want to weigh in on:
III. Test-First (NON-NEGOTIABLE)). Drop if you prefer a cleaner heading.License + attribution
Spec-kit is MIT. PAI is MIT. Source attribution lives in the Preamble (markdown link to spec-kit) and Governance rule 3.
🤖 Generated with Claude Code