constitution AGENTS.md

Repository instructions for the Constitution project, whose main documents define shared rules for software agents. They describe how to start work, manage branches and commits, and verify changes.

In plain words
What is it for?
Use them when modifying the Constitution repository to follow its startup workflow, branch rules, commit format, verification steps, and scope limits.
Why use it?
They give contributors a consistent process for changing a repository that is treated as a governing source of rules. This reduces missed checks and changes outside the requested scope.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/systemfsoftware/constitution/agents-md
Clone the repo
git clone --depth 1 https://github.com/systemfsoftware/constitution

Made for: Codex, OpenCode.

Per session 1,307 This file is loaded in full into every session.
When invoked 1,307 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01307 $0.01307
Opus 5 $0.00654 $0.00654
Sonnet 5 $0.00261 $0.00261
Haiku 4.5 $0.00131 $0.00131

Measured yesterday against content hash 44a302f3105b, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

constitution AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 122 lines

How it starts

The opening of the file, as written. The whole thing — 122 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AGENTS.md — Constitution Repository

Single source of truth for the supreme design law of System F Software. Consumer repos vendor via git subtree + symlink. This repo has no production code, no test suite, and no build step — it is two markdown documents plus their governance tooling (commit validation, agent harness): CONSTITUTION.md, resident in every agent's context, and CONSTITUTION-ARTICLES.md, retrieved on write or edit of a source file.

@CONSTITUTION.md

Startup Workflow

Before making changes:

  1. Read this file completely.
  2. Confirm the active task with the user or the agent's task list.
  3. Review recent commits with git log --oneline -5.
  4. Ensure current branch is not main — feature branches only. If on main, create one.

Working Rules

  • One task at a time. Finish before starting the next.
  • Conventional commits required. The commit-msg hook enforces type(scope): description. Run git commit through the hook — do not bypass with --no-verify.
  • Verification required. Run the verification commands before claiming done.
  • Stay in scope. Don't modify files unrelated to the task. Scope reduction requires explicit user approval.
  • Leave clean state. The next session must run verification immediately.

Amending the Constitution

File Split

  • CONSTITUTION.md (Resident): Conduct rules (Article V + Governance) loaded in every session.
  • CONSTITUTION-ARTICLES.md (Retrieved): Domain, boundary, verification, and organization rules (Articles I–IV) loaded on write/edit of source code.

Writing a Rule

Rules are fenced YAML blocks with: id, title, gate, do, dont, harm, check (and optional example, scope, layers).

Minting an ID

ID format: CONST-<family><n>. Pick the next free number in the family (never renumber to close gaps).

Letter Family Purpose
G Governance Invoking constitution or resolving priority
E Enforcement Gate design, execution, verification
P Purity Decision functions and side-effect isolation
D Domain modelling Domain types and constraints
B Boundary Core/shell boundaries, effects, adapters
T Testing Testing strategy, mutation, properties
N Naming & structure Module organization and naming
W Work discipline Task scope, bypass declarations, reviews
S Subtraction Code deletion and structural simplification

Read the full file on GitHub · 122 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 122 lines · 1,307 tokens per session scan A 44a302f3105b

Subscribe to this mod's changes

constitution AGENTS.md is an instructions file published in the GitHub repository systemfsoftware/constitution (2 stars, last pushed 2d ago), licensed Apache-2.0. It adds 1,307 tokens to every session, about $0.0065 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.