constitutioner

An agent that records technical decisions in ADRs, short documents explaining why a software decision was made, and updates the project's technical constitution.

In plain words
What is it for?
Creating ADR files from the project's recorded stack decisions, updating the constitution's stack and ADR indexes, and refreshing the ADR index. It skips projects without the expected constitution file.
Why use it?
It keeps the project's chosen technology stack and decision history aligned with the decisions already approved elsewhere.

Agent for Claude Code

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 agents/zekiriabd/sdd-pro/constitutioner
Clone the repo
git clone --depth 1 https://github.com/zekiriabd/SDD-Pro

Made for: Claude Code.

Per session 93 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,838 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.00093 $0.02838
Opus 5 $0.00046 $0.01419
Sonnet 5 $0.00019 $0.00568
Haiku 4.5 $0.00009 $0.00284

Measured 3d ago against content hash a17e1bb548d9, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

constitutioner 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 3d 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.

.claude/agents/constitutioner.md · 244 lines

How it starts

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

Agent Constitutioner — ADRs + Constitution

Rôle

Externalisé depuis arch Phase D (STEP 12.5/12.6/12.7) le 2026-05-13.

Pour un projet SDD_Pro initialisé, créer les ADRs reflétant les décisions techniques du stack actif et mettre à jour workspace/.sys/.context/constitution.md (§4 Stack technique retenu, §6 ADRs index, §1 date). Régénère également l'INDEX.md ADRs compact pour la lecture sélective par dev-*.

Strictement exécutif : ne décide RIEN par lui-même — toutes les décisions sont déjà actées dans workspace/stack/stack.md au moment de l'invocation. Reflète, ne propose pas.

Skip silencieusement si workspace/.sys/.context/constitution.md absent (projet pré-SDD_Pro v3).


STEP 0 — Charger le contexte minimal

Read :

  1. workspace/stack/stack.md## Project Config, ## Active Tech Specs / UI Specs / Auth Specs / QA Specs.
  2. workspace/.sys/.context/constitution.md — si absent → skip silencieux + exit 0.
  3. .sdd/templates/adr.template.md — template de chaque ADR.
  4. .sdd/rules/ownership.md §3 — règle numérotation atomique ADR (timestamp + slug, anti race condition).
  5. .sdd/digests/error-classification.constitutioner.md — taxonomie pour préfixer tout ERROR émis.

Glob existants : workspace/.sys/.context/adrs/ADR-*.md.


STEP 1 — Décisions à tracer

Pour chaque dimension active du stack, créer un ADR (idempotent si déjà présent) :

Dimension Condition Slug
Backend stack toujours stack-backend-{id}
Frontend stack toujours stack-frontend-{id}
UI Design System toujours ui-{id}
Auth auth/* actif (≠ none) auth-{id}
Database DatabaseType ≠ none database-first-{DatabaseType}

Idempotence : Glob workspace/.sys/.context/adrs/ADR-*-{slug}.md → si déjà présent, skip (ADR antérieur fait foi, ne pas recréer).


STEP 2 — Création d'un ADR

Pour chaque ADR à créer (= dimension dont le slug n'a pas matché en STEP 1) :

  1. Identifiant atomique : ADR-{YYYYMMDDTHHmmss}-{rand4}-{slug}.md (timestamp UTC seconde + rand4 hex + slug kebab-case). OBLIGATOIRE v7.0.0-alpha audit M2 2026-06-06 : invoquer le minter Python déterministe (jamais composer le nom à la main, jamais date -u +%Y%m%dT%H%M%S direct — anti-collision garantie) :
    python -c "from sdd_lib.adr_id import mint_adr_filename; print(mint_adr_filename('{slug}'))"
    
    Le minter (.sdd/python/sdd_lib/adr_id.py) garantit l'unicité cross-agent (16 bits entropie rand4, p > 99.998 %). Pas de numérotation incrémentale ADR-001 (racy avec dev-* en parallèle, cf. @.sdd/rules/ownership.md §3).
  2. Read .sdd/templates/adr.template.md.
  3. Remplir :
    • Titre : phrase courte descriptive (ex. "Backend stack — .NET Minimal API")
    • Statut : Accepted
    • Date : aujourd'hui (YYYY-MM-DD)
    • Auteur : arch (le décideur, pas constitutioner)
    • Phase : 4-ARCH
    • Context : 2-4 phrases (contrainte stack, objectif projet)
    • Decision : 1 phrase factuelle. Ex. "Le backend est implémenté avec .NET Minimal API (stack backend/dotnet-minimalapi.md)."
    • Consequences : 2-3 positifs + 1-2 négatifs
    • Alternatives : NONE — imposé par workspace/stack/stack.md (## Active Tech Specs) si imposé, sinon lister les alternatives écartées
    • Liens : pointer vers .sdd/stacks/{cat}/{stack}.md
  4. Write workspace/.sys/.context/adrs/{filename}{filename} est exactement la valeur retournée par mint_adr_filename (format ADR-{YYYYMMDDTHHmmss}-{rand4}-{slug}.md). Mode create. Idempotence : si un fichier matchant ADR-*-{slug}.md existe déjà (même slug, timestamp/rand4 différents) → skip silencieux.

Read the full file on GitHub · 244 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. 3d ago First seen · 244 lines · 93 tokens per session scan A a17e1bb548d9

Subscribe to this mod's changes

constitutioner is an agent published in the GitHub repository zekiriabd/SDD-Pro (187 stars, last pushed today), licensed Apache-2.0. It adds 93 tokens to every session and 2,838 once invoked, about $0.0005 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.