constitution

A project constitution is a written set of rules for how a software project should be designed, built, tested, and maintained. This command creates or updates that document.

In plain words
What is it for?
Use it to define technology choices, testing expectations, performance targets, architecture patterns, code-quality rules, and security or accessibility requirements.
Why use it?
It records decisions that might otherwise be forgotten or applied inconsistently. It helps keep specifications, plans, and tasks aligned with the project's agreed principles.

Command

Part of the coco plugin — 6 skills, 14 commands, 4 agents, 3 hooks shipped together

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/skullninja/coco-workflow/constitution
Clone the repo
git clone --depth 1 https://github.com/skullninja/coco-workflow

Or install coco, the plugin that ships this one along with the rest of its 6 skills, 14 commands, 4 agents, 3 hooks.

Per session 14 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 637 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.00014 $0.00637
Opus 5 $0.00007 $0.00318
Sonnet 5 $0.00003 $0.00127
Haiku 4.5 $0.00001 $0.00064

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

commands/constitution.md · 85 lines

How it starts

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

User Input

$ARGUMENTS

You MUST consider the user input before proceeding (if not empty).

Goal

Create or update the project constitution at .coco/memory/constitution.md. The constitution defines non-negotiable principles that govern specification, planning, and task generation.

Setup

  1. Check if .coco/memory/constitution.md exists.
    • If yes: load it for amendment
    • If no: load the template from .coco/templates/constitution-template.md if it exists, otherwise use ${CLAUDE_PLUGIN_ROOT}/templates/constitution-template.md

Execution

1. Collect Principles

If user input provides principles, use them. Otherwise:

  • Infer from existing repo context (README, docs, CLAUDE.md, existing config)
  • Ask the user interactively about their project's core principles using categories:
    • Technology choices (language, framework, platform APIs)
    • Testing requirements (TDD, coverage thresholds)
    • Performance requirements (benchmarks, latency targets)
    • Architecture patterns (data layer, service layer)
    • Code quality standards
    • Security/accessibility requirements
  • The user might need fewer or more principles than the template provides. Respect their choice.

2. Draft Constitution

Replace all placeholder tokens with concrete text:

  • Each principle: name, non-negotiable rules (MUST/SHOULD), rationale
  • Governance: amendment procedure, versioning, compliance review
  • Definition of Done criteria aligned with principles
  • Version following semantic versioning:
    • MAJOR: Principle removals or redefinitions
    • MINOR: New principle added or materially expanded
    • PATCH: Clarifications, wording fixes

3. Consistency Propagation

Check that dependent files align with the new constitution:

  • .coco/templates/design-template.md or ${CLAUDE_PLUGIN_ROOT}/templates/design-template.md -- Constitution Check section + scope alignment
  • .coco/templates/tasks-template.md or ${CLAUDE_PLUGIN_ROOT}/templates/tasks-template.md -- task categorization

Read the full file on GitHub · 85 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 · 85 lines · 14 tokens per session scan A f3bb17ba0dd4

Subscribe to this mod's changes

constitution is a command published in the GitHub repository skullninja/coco-workflow (7 stars, last pushed 3d ago), licensed MIT. It adds 14 tokens to every session and 637 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-31.