constitution

A command for creating or updating docs/CONSTITUTION.md, a project document that records non-negotiable, default, and aspirational rules.

In plain words
What is it for?
Use it to establish or revise project principles, using existing discovery, architecture, accessibility, and security documents when available.
Why use it?
It gives architectural and implementation decisions a shared set of project rules to follow and check against.

Command

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 commands/jonase47/ccpr/constitution
Clone the repo
git clone --depth 1 https://github.com/jonase47/ccpr
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,738 The whole file, excluding the scripts and references it only reads on demand.
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.00000 $0.01738
Opus 5 $0.00000 $0.00869
Sonnet 5 $0.00000 $0.00348
Haiku 4.5 $0.00000 $0.00174

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

Security

Grade A, and why

constitution 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.

commands/constitution.md · 150 lines

How it starts

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

/constitution – Create or revise the project Constitution

Creates or updates docs/CONSTITUTION.md — the project Constitution with three sections (Inviolable / Default / Aspirational). Read as a mandatory input by all Full-Track Gates and used as a consistency check for every ADR and implementation decision.

Argument: $ARGUMENTS = [optional: projectdir]

  • No argument: operates on $(pwd).

Prerequisites

  • Template: ~/.claude/templates/CONSTITUTION_TEMPLATE.md
  • Domain bootstraps (for Greenfield mode): ~/.claude/templates/constitution-bootstraps/{slug}.md
    • If the directory does not exist: fully interactive prompting with no bootstrap suggestions.

Lead Agent

konzeptor with security-master consultation for Inviolables (DSGVO, BFSG, sector-specific obligations).

Mode detection (automatic)

A) Mode "Existing Full-Track"

Trigger: Phase docs already exist from which Constitution content can be derived:

  • docs/discovery/REGULATORY.md (Inviolables from regulatory analysis)
  • docs/architecture/ADR/ (Inviolables from "inviolable"-tagged ADRs)
  • docs/architecture/A11Y.md (A11y minimum standard)
  • docs/architecture/SECURITY.md, THREATS.md (security constraints)
  • docs/architecture/NFR.md (performance/A11y Aspirational)
  • docs/concept/DSGVO_INITIAL_ASSESSMENT.md (privacy obligations)

B) Mode "Lean pre-run"

Trigger: docs/FRAME.md exists with a "Constitution-Light" section.

C) Mode "Greenfield"

Trigger: Neither A nor B applies. No source material available.

Execution

1. Detect mode and bootstrap

Mode A (Existing Full-Track):

  1. Read all source files listed above that exist.
  2. Build a draft proposal per section:
    • Inviolable: from REGULATORY obligations, "inviolable"-tagged ADRs, A11Y minimum standard, NFR security
    • Default: from tech-stack ADRs, language, TDD convention, platform targets
    • Aspirational: from NFR performance, NFR coverage, A11y audit goals, user-research goals
  3. Present the draft to the user; ask for refinement per bullet (keep / change / drop).

Read the full file on GitHub · 150 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 · 150 lines · 0 tokens per session scan A 209674e6ec43

Subscribe to this mod's changes

constitution is a command published in the GitHub repository jonase47/ccpr (1 stars, last pushed yesterday), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,738 tokens. 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.