Project Constitution Skill
Create or refine a practical project constitution: a short, durable governance artifact that downstream agents and humans can use to make consistent project decisions.
A constitution is not a manifesto, product spec, architecture document, or task plan. It is a decision contract: principles, boundaries, quality gates, memory rules, and routing guidance that remain useful across multiple delivery tasks.
Mode Selection
Select the lightest mode that satisfies the request:
- Create: use when no constitution exists or the user asks for a new governance artifact. Draft a complete constitution and write it only when file creation is requested or clearly implied by the workflow.
- Update: use when the user names an existing constitution path or asks to revise current governance. Read the existing artifact first, then make targeted changes that preserve stable decisions.
- Review: use when the user asks to assess, critique, audit, or identify weaknesses. Return findings and recommendations instead of rewriting files unless the user also asks for edits.
Core Workflow
- Inspect the available project context before drafting:
- Read the user's request, product idea, constraints, delivery context, and any named files.
- Check for existing governance artifacts such as
AGENTS.md, README.md, .agentspec/memory/constitution.md, .specify/memory/constitution.md, docs/project/constitution.md, or similar local conventions.
- Treat
AGENTS.md, README.md, ADRs, PRDs, and release checklists as context unless the user explicitly says one of them is the constitution.
- If updating an existing constitution, preserve stable approved decisions unless the user asks for a rewrite.
- Separate durable governance from temporary execution detail:
- Durable: product boundaries, engineering standards, architectural constraints, testing policy, security/privacy posture, release discipline, memory boundaries, and agent routing.
- Temporary: sprint tasks, implementation steps, speculative stack choices, unresolved preferences, and one-off estimates.
- Choose the artifact path:
- Use an explicit user-provided constitution path first.
- Reuse an existing constitution path when present.
- Otherwise prefer
.agentspec/memory/constitution.md.
- If the user only asked for advice or review, return the draft/review in chat instead of writing a file.
- Draft or revise the constitution using
assets/constitution-template.md as the default structure.
- Make every principle pass the decision-impact test:
- It must change or constrain at least one future decision.
- It must be specific enough for a downstream agent to follow.
- It must avoid slogans such as "write clean code" unless paired with a concrete rule.
- Add quality gates that can be verified later:
- Define what must be checked, when it applies, and what evidence satisfies it.
- Prefer commands, artifacts, review criteria, or explicit test expectations over vague assurances.
- Add open governance questions only when the answer could materially change architecture, testing, security, UX, release, or memory behavior.
- Run the verification checklist before finalizing.
Principle and Gate Quality
Write principles as decision rules, not values statements:
- Prefer:
API changes preserve backwards compatibility unless a versioned migration path is documented. Verification: contract tests or migration notes accompany the change.
- Avoid:
Build high-quality APIs.
Each principle should include or imply:
- scope: where it applies
- rule: the decision it constrains
- evidence: how future work proves compliance
- exception path: when deviations are allowed, if relevant
Write quality gates in a form a reviewer can grade:
| Gate |
Applies When |
Evidence Required |
| Test evidence |
Source behavior changes |
Passing repository test command, new/updated tests, or a documented test gap with rationale |
Memory Model
Use memory deliberately and keep the layers separate:
- Runtime memory: use temporary working notes while reading, reconciling constraints, and drafting. Do not persist these notes unless the user asks.
- Project-local memory: store durable project governance in the constitution file. Include only stable, project-scoped principles, quality gates, routing rules, and open questions.
- Shared memory: treat cross-project or cross-agent memory as an external dependency. Use a shared-memory skill or explicit integration only when the user asks for broader reuse. Do not silently promote project-local decisions into shared memory.
Promotion rules:
- Do not promote runtime assumptions into the constitution without labeling them as assumptions or open questions.
- Do not promote project-local policy into shared memory without explicit user approval.
- Do not invent organization-wide policy. If the user supplies policy, scope it to this project unless they explicitly request broader governance.
Skill Routing Policy
Include a routing section when downstream agents will continue the work.
- Prefer installed, relevant skills over generic reasoning for recurring work.
- Only name a skill as preferred when it is actually available in the current environment or the user explicitly named it as an external dependency.
- If a useful skill is missing, write a capability need instead of inventing a skill name.
- Acceptable route values are exact installed skill names, user-supplied external dependencies, repository-native processes, or capability needs.
- Keep routing advisory, not absolute; downstream agents must still respect newer user instructions and repository conventions.
Common routing categories:
| Work Type |
Route To |
| requirement critique |
installed requirement-analysis or test-analysis skill |
| backlog stories |
installed backlog story skill |
| acceptance criteria |
installed acceptance-criteria skill |
| architecture planning |
installed architecture-planning skill or repository-native process |
| implementation planning |
installed task-planning or SDLC skill |
| unit testing |
installed stack-aware unit-testing skill or repository-native test framework |
| browser or end-to-end testing |
installed Playwright/Cypress skill or repository-native test framework |
| API contract validation |
installed API contract skill or repository-native contract tests |
| release readiness |
installed release-management skill or repository-native release checklist |
| cross-agent memory |
external shared-memory skill, only with explicit user approval |
Guardrails
- Do not write implementation code as part of this skill.
- Do not select a complete architecture unless the user supplied or approved the decision.
- Do not turn the constitution into a backlog, PRD, ADR set, or release plan.
- Do not store secrets, credentials, personal data, or private policy details beyond what the user explicitly authorized.
- Do not overfit the constitution to a single sprint or immediate feature.
- Do not bury uncertainty. Capture material unknowns in
Open Governance Questions.
- Keep the document compact enough for future agents to read quickly.
Constitution Template
Use assets/constitution-template.md when creating a new constitution or normalizing a weak one.
Adapt section names when the repository already has a strong convention, but preserve these responsibilities:
- purpose and scope
- durable project context
- product, engineering, architecture, testing, UX/accessibility, security/privacy, release, and operations principles
- memory model
- skill routing policy
- quality gates
- open governance questions
- change control
Update Existing Constitutions
When revising an existing artifact:
- Identify whether the user asked for a targeted patch, a modernization pass, or a full rewrite.
- Preserve ratified principles, numbering, and terminology when they still serve the project.
- Remove or rewrite principles that are vague, stale, duplicated, unverifiable, or outside the constitution's scope.
- Mark material changes clearly in the final response.
- If a requested change conflicts with existing approved governance, surface the conflict instead of silently overriding it.
Verification Checklist
Before writing or returning the final constitution, confirm:
- The selected path follows an existing convention or defaults to
.agentspec/memory/constitution.md.
- Every principle has decision impact.
- The document distinguishes facts, assumptions, and open questions.
- Quality gates are observable and tied to delivery phases or evidence.
- The memory model separates runtime, project-local, and shared memory.
- The skill-routing policy does not invent unavailable skills.
- No organization-wide policy, secrets, or unsupported architecture decisions were invented.
- The final document is concise enough for downstream agents to use.
Final Response
Report:
- the path created, updated, reviewed, or intentionally left unwritten
- the most important principles or changes
- the quality gates established or strengthened
- any open governance questions needing human confirmation
- any validation or review performed
1---2name: project-constitution-skill3description: Use this skill when a user needs to create, update, or review a project constitution for a software project: an agent-readable governance document that defines durable product, engineering, architecture, testing, UX/accessibility, security/privacy, release, memory, and skill-routing principles before or during delivery. Prefer it for new projects, early-stage repositories, repo onboarding, SDLC kickoff, implementation planning, or when downstream agents need explicit quality gates and decision guardrails. Do not use it to choose a full architecture, write implementation code, or store cross-project policy unless the user supplied it.4---56# Project Constitution Skill78Create or refine a practical project constitution: a short, durable governance artifact that downstream agents and humans can use to make consistent project decisions.910A constitution is not a manifesto, product spec, architecture document, or task plan. It is a decision contract: principles, boundaries, quality gates, memory rules, and routing guidance that remain useful across multiple delivery tasks.1112## Mode Selection1314Select the lightest mode that satisfies the request:1516- Create: use when no constitution exists or the user asks for a new governance artifact. Draft a complete constitution and write it only when file creation is requested or clearly implied by the workflow.17- Update: use when the user names an existing constitution path or asks to revise current governance. Read the existing artifact first, then make targeted changes that preserve stable decisions.18- Review: use when the user asks to assess, critique, audit, or identify weaknesses. Return findings and recommendations instead of rewriting files unless the user also asks for edits.1920## Core Workflow21221. Inspect the available project context before drafting:23 - Read the user's request, product idea, constraints, delivery context, and any named files.24 - Check for existing governance artifacts such as `AGENTS.md`, `README.md`, `.agentspec/memory/constitution.md`, `.specify/memory/constitution.md`, `docs/project/constitution.md`, or similar local conventions.25 - Treat `AGENTS.md`, `README.md`, ADRs, PRDs, and release checklists as context unless the user explicitly says one of them is the constitution.26 - If updating an existing constitution, preserve stable approved decisions unless the user asks for a rewrite.272. Separate durable governance from temporary execution detail:28 - Durable: product boundaries, engineering standards, architectural constraints, testing policy, security/privacy posture, release discipline, memory boundaries, and agent routing.29 - Temporary: sprint tasks, implementation steps, speculative stack choices, unresolved preferences, and one-off estimates.303. Choose the artifact path:31 - Use an explicit user-provided constitution path first.32 - Reuse an existing constitution path when present.33 - Otherwise prefer `.agentspec/memory/constitution.md`.34 - If the user only asked for advice or review, return the draft/review in chat instead of writing a file.354. Draft or revise the constitution using `assets/constitution-template.md` as the default structure.365. Make every principle pass the decision-impact test:37 - It must change or constrain at least one future decision.38 - It must be specific enough for a downstream agent to follow.39 - It must avoid slogans such as "write clean code" unless paired with a concrete rule.406. Add quality gates that can be verified later:41 - Define what must be checked, when it applies, and what evidence satisfies it.42 - Prefer commands, artifacts, review criteria, or explicit test expectations over vague assurances.437. Add open governance questions only when the answer could materially change architecture, testing, security, UX, release, or memory behavior.448. Run the verification checklist before finalizing.4546## Principle and Gate Quality4748Write principles as decision rules, not values statements:4950- Prefer: `API changes preserve backwards compatibility unless a versioned migration path is documented. Verification: contract tests or migration notes accompany the change.`51- Avoid: `Build high-quality APIs.`5253Each principle should include or imply:5455- scope: where it applies56- rule: the decision it constrains57- evidence: how future work proves compliance58- exception path: when deviations are allowed, if relevant5960Write quality gates in a form a reviewer can grade:6162| Gate | Applies When | Evidence Required |63| --- | --- | --- |64| Test evidence | Source behavior changes | Passing repository test command, new/updated tests, or a documented test gap with rationale |6566## Memory Model6768Use memory deliberately and keep the layers separate:6970- Runtime memory: use temporary working notes while reading, reconciling constraints, and drafting. Do not persist these notes unless the user asks.71- Project-local memory: store durable project governance in the constitution file. Include only stable, project-scoped principles, quality gates, routing rules, and open questions.72- Shared memory: treat cross-project or cross-agent memory as an external dependency. Use a shared-memory skill or explicit integration only when the user asks for broader reuse. Do not silently promote project-local decisions into shared memory.7374Promotion rules:7576- Do not promote runtime assumptions into the constitution without labeling them as assumptions or open questions.77- Do not promote project-local policy into shared memory without explicit user approval.78- Do not invent organization-wide policy. If the user supplies policy, scope it to this project unless they explicitly request broader governance.7980## Skill Routing Policy8182Include a routing section when downstream agents will continue the work.8384- Prefer installed, relevant skills over generic reasoning for recurring work.85- Only name a skill as preferred when it is actually available in the current environment or the user explicitly named it as an external dependency.86- If a useful skill is missing, write a capability need instead of inventing a skill name.87- Acceptable route values are exact installed skill names, user-supplied external dependencies, repository-native processes, or capability needs.88- Keep routing advisory, not absolute; downstream agents must still respect newer user instructions and repository conventions.8990Common routing categories:9192| Work Type | Route To |93| --- | --- |94| requirement critique | installed requirement-analysis or test-analysis skill |95| backlog stories | installed backlog story skill |96| acceptance criteria | installed acceptance-criteria skill |97| architecture planning | installed architecture-planning skill or repository-native process |98| implementation planning | installed task-planning or SDLC skill |99| unit testing | installed stack-aware unit-testing skill or repository-native test framework |100| browser or end-to-end testing | installed Playwright/Cypress skill or repository-native test framework |101| API contract validation | installed API contract skill or repository-native contract tests |102| release readiness | installed release-management skill or repository-native release checklist |103| cross-agent memory | external shared-memory skill, only with explicit user approval |104105## Guardrails106107- Do not write implementation code as part of this skill.108- Do not select a complete architecture unless the user supplied or approved the decision.109- Do not turn the constitution into a backlog, PRD, ADR set, or release plan.110- Do not store secrets, credentials, personal data, or private policy details beyond what the user explicitly authorized.111- Do not overfit the constitution to a single sprint or immediate feature.112- Do not bury uncertainty. Capture material unknowns in `Open Governance Questions`.113- Keep the document compact enough for future agents to read quickly.114115## Constitution Template116117Use `assets/constitution-template.md` when creating a new constitution or normalizing a weak one.118119Adapt section names when the repository already has a strong convention, but preserve these responsibilities:120121- purpose and scope122- durable project context123- product, engineering, architecture, testing, UX/accessibility, security/privacy, release, and operations principles124- memory model125- skill routing policy126- quality gates127- open governance questions128- change control129130## Update Existing Constitutions131132When revising an existing artifact:1331341. Identify whether the user asked for a targeted patch, a modernization pass, or a full rewrite.1352. Preserve ratified principles, numbering, and terminology when they still serve the project.1363. Remove or rewrite principles that are vague, stale, duplicated, unverifiable, or outside the constitution's scope.1374. Mark material changes clearly in the final response.1385. If a requested change conflicts with existing approved governance, surface the conflict instead of silently overriding it.139140## Verification Checklist141142Before writing or returning the final constitution, confirm:143144- The selected path follows an existing convention or defaults to `.agentspec/memory/constitution.md`.145- Every principle has decision impact.146- The document distinguishes facts, assumptions, and open questions.147- Quality gates are observable and tied to delivery phases or evidence.148- The memory model separates runtime, project-local, and shared memory.149- The skill-routing policy does not invent unavailable skills.150- No organization-wide policy, secrets, or unsupported architecture decisions were invented.151- The final document is concise enough for downstream agents to use.152153## Final Response154155Report:156157- the path created, updated, reviewed, or intentionally left unwritten158- the most important principles or changes159- the quality gates established or strengthened160- any open governance questions needing human confirmation161- any validation or review performed