constitution

A command for creating or maintaining the Project Constitution: the durable rules for an AI-assisted project, including principles, human checkpoints, and completion requirements.

In plain words
What is it for?
Use it to establish or revise project rules, autonomy limits, non-negotiable requirements, and the conditions for considering work complete.
Why use it?
It keeps governing decisions separate from product plans, technical specifications, task lists, and testing documents.

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/nicelight/devrails-26/constitution
Clone the repo
git clone --depth 1 https://github.com/nicelight/DevRails-26
Per session 11 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,192 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.00011 $0.01192
Opus 5 $0.00005 $0.00596
Sonnet 5 $0.00002 $0.00238
Haiku 4.5 $0.00001 $0.00119

Measured 2d ago against content hash 6876234ddea3, 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 2d ago.

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.

skills/_shared/references/commands/constitution.md · 128 lines

How it starts

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

/constitution - Project Constitution

The Constitution owns durable governing principles, agent autonomy rules, Definition of Done, human checkpoints, and non-negotiables. It does not replace the Product Brief, PRD, MBB, specs, contracts, states, testing docs, workflow policies, or tier policy.

<input_contract> Read relevant evidence from:

  • .memory-bank/constitution.md;
  • .memory-bank/analysis/product-brief.md and the latest relevant brainstorm;
  • .memory-bank/mbb/index.md, .memory-bank/spec-backbone.md, and .memory-bank/spec-index.md;
  • .memory-bank/invariants.md and applicable contracts/states/testing/workflow docs;
  • AGENTS.md and $ARGUMENTS.

If the Constitution is missing, create it from the current framework skeleton. Its minimum frontmatter remains:

description: Project Constitution - governing principles for AI-first development.
status: active
version: 1
project_principles: framework-default
ratified: null
last_updated: YYYY-MM-DD

Missing or blocked Product Brief does not prevent a generic governing-principles discussion, but it must be reported as context quality. </input_contract>

<hard_invariants>

  • Ground project-specific principles only in accepted operator answers, explicit instructions, AGENTS.md, or existing authoritative project docs.
  • Do not invent domain principles, Spec Kit hooks, command aliases, migration machinery, governance engines, or a second tier/status model.
  • Do not silently weaken or override existing authoritative rules.
  • An explicit operator skip is supported: keep framework-default or set skipped, record the skip, and allow /write-prd to continue. Absence of an answer is not an explicit skip. </hard_invariants>

<operator_decisions> Use an adaptive interview when a governing branch remains unresolved. Cover only the topics that lack authoritative answers, while ensuring the resulting Constitution addresses the applicable criteria:

  • project level (enterprise|medium|junior); for non-enterprise work, an explicit DO NOT Overengineering-equivalent principle;
  • architecture priority such as KISS or stability;
  • Definition of Done and required checks;
  • agent autonomy and human checkpoints;
  • applicable critical non-negotiables such as security/privacy, no data loss, backward compatibility, performance, accessibility/UX consistency, low maintenance, or an operator-defined rule.

In interactive mode, ask exactly one most relevant unresolved governance question at a time. Offer exactly two mutually exclusive answer options plus свой вариант. Put the best-fit option first and end its text with the exact phrase Рекомендую этот вариант. Briefly explain the impact of each option.

After every accepted answer, apply it to the current Constitution context, reassess the remaining unresolved governance branches, and select the next most relevant question. Do not reveal a queued questionnaire. Do not impose a pass count or an artificial word limit on a custom answer.

Recommendations and suggested answers become authoritative only after explicit operator acceptance. In unattended use, apply only decisions already fixed by authoritative policy; otherwise stop with the active workflow's existing HALT_BLOCKING_QUESTIONS or HALT_CLARIFICATION_REQUIRED state. </operator_decisions>

<required_outputs> Ensure the Constitution reflects the current durable governing state from accepted evidence and sets project_principles:

  • ratified: all applicable governing criteria have accepted answers;
  • partial: some criteria remain open and the operator explicitly chooses to proceed;
  • framework-default: generated defaults only;
  • skipped: the operator explicitly skipped the interview.

Edit the file only when durable governing state has changed or the existing contract needs repair. Do not append per-run evidence review/history or mirror the final chat handoff; preserve durable decisions, unresolved conflicts, and provenance needed by future agents.

Read the full file on GitHub · 128 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. 2d ago First seen · 128 lines · 11 tokens per session scan A 6876234ddea3

Subscribe to this mod's changes

constitution is a command published in the GitHub repository nicelight/DevRails-26 (22 stars, last pushed 4d ago), licensed MIT. It adds 11 tokens to every session and 1,192 once invoked, about $0.0001 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-30.