do-constitution

Creates and amends the per-repo tier-2 constitution overlaying the base governance file.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/khoavu882/do-flow --skill do-constitution-khoavu882
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: do-constitution
Source: https://github.com/khoavu882/do-flow/tree/main/core/shared/skills/do-constitution
Command: npx skills add https://github.com/khoavu882/do-flow --skill do-constitution-khoavu882

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Teams working with AI coding agents need persistent, repo-specific governing principles that every later workflow phase and agent inherits, but maintaining, versioning, and propagating those rules into agent context files is manual and error-prone. ## Core Features & Use Cases - Two-tier constitution management: Reads the read-only tier-1 base constitution and creates or amends the tier-2 per-repo overlay, with tier-2 taking precedence. - Versioning and Sync Impact Report: Bumps the semver version line and records what changed and what it propagates to on every amendment. - Deterministic context propagation: Pipes a pointer block through the DoFlow sync-context verb so CLAUDE.md or AGENTS.md reflects the active constitution without rewriting the whole file. - Use Case: A team lead says "amend our constitution to require integration tests for all public APIs" — the skill amends the tier-2 file, bumps the version, writes the Sync Impact Report, and updates the agent context pointer. ## Quick Start Ask the agent to set ground rules for this repository, for example: run /do-constitution with the principle that all database migrations must be reversible.

Frequently Asked Questions about do-constitution

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up governing principles for AI coding agents in a repo?▼

Run /do-constitution with your repo-specific principle inputs. It copies the installed constitution template into the tier-2 local file, fills it from your inputs, and propagates a pointer into the agent context file so every later phase inherits the rules.

How do I amend an existing repo constitution?▼

Invoke /do-constitution with the --amend flag and describe the change. The skill applies the amendment to the tier-2 file, bumps the semver version, and fills in the Sync Impact Report describing what changed and what it propagates to.

What is the difference between the tier-1 and tier-2 constitution?▼

The tier-1 base constitution is read-only and shared across repos, while the tier-2 per-repo file overlays it with repo-specific rules. When the two conflict, tier-2 takes precedence, but tier-2 cannot weaken the base P1 safety principle.

Why did the constitution propagation to CLAUDE.md fail?▼

The sync-context verb returns a non-zero exit when propagation fails: exit 1 means the write failed and exit 2 means the call was malformed. The skill reports this as a failed propagation rather than claiming the context file was updated.

What are the limitations of the do-constitution skill?▼

It only maintains the tier-2 constitution file and the marker-delimited DOFLOW block in the context file. It will not weaken base safety principles, rewrite the whole context file, or edit any source code.