constitution

constitution is a command for Claude Code from nicelight/DevRails-26. It costs 11 tokens per session (1,201 once invoked), scanned A, original, MIT.

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 for Claude Code

Written for Claude Code: $ARGUMENTS substitution. Also seen: mentions AGENTS.md.

Good fit Use it to establish or revise project rules, autonomy limits, non-negotiable requirements, and the conditions for considering work complete.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/nicelight/devrails-26/constitution
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.

Clone the repo
git clone --depth 1 https://github.com/nicelight/DevRails-26

Made for: Claude Code.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for constitution

README.md
[![agentmods](https://agentmods.dev/badge/commands/nicelight/devrails-26/constitution/github.svg)](https://agentmods.dev/commands/nicelight/devrails-26/constitution)
Your own site
<a href="https://agentmods.dev/commands/nicelight/devrails-26/constitution"><img src="https://agentmods.dev/badge/commands/nicelight/devrails-26/constitution/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for constitution

Your own site · 80×15
<a href="https://agentmods.dev/commands/nicelight/devrails-26/constitution"><img src="https://agentmods.dev/badge/commands/nicelight/devrails-26/constitution.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
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,201 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00011 $0.01201
Opus 5.5 $0.00004 $0.00480
Sonnet 5.5 $0.00002 $0.00240
Haiku 4.5 $0.00001 $0.00120

Measured 1mo ago against content hash d86b3ba78676, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, 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 1mo 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 · 129 lines

How it starts

The opening of the file, as written. The whole thing — 129 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/brief.md, or legacy product-brief and brainstorming artifacts when migrating an existing project;
  • .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 discovery 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 · 129 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. 1mo ago Changed · +1 lines d86b3ba78676
  2. 1mo 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 (23 stars, last pushed 1mo ago), licensed MIT. It adds 11 tokens to every session and 1,201 once invoked, about $0.0000 per session on Opus 5.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.