Create or update project constitution defining principles and governance rules
Creates or updates a project's core principles, architectural decisions, coding standards, and quality thresholds.
/plugin marketplace add datamaker-kr/synapse-claude-marketplace/plugin install speckit-helper@synapse-marketplaceCreate or update a project constitution defining principles and governance rules.
A project constitution is a living document that establishes the non-negotiable principles, architectural decisions, coding standards, and quality thresholds that all specifications in the project must comply with. It acts as a governance layer: when specs are analyzed or checklists are generated, they are checked against the constitution for compliance.
Use Glob to check whether .speckit/constitution.md already exists.
Before gathering input, explain to the user what a constitution is and why it matters:
A project constitution defines the principles and rules that ALL specifications in this project must comply with. Think of it as your project's "bill of rights" -- the non-negotiable standards that every feature must respect.
I'll ask you about four categories of principles. You can provide as many or as few as you like in each category. These can always be updated later.
Collect principles in four categories, using AskUserQuestion for each:
Category 1: Core Principles Ask: "What are your non-negotiable architectural rules? These are principles that must never be violated, regardless of the feature being built."
Examples to offer:
Category 2: Architecture Decisions Ask: "What key technology choices has the project committed to? Think of these as ADR-style (Architecture Decision Records) entries."
Examples to offer:
Category 3: Coding Standards Ask: "What project-specific coding conventions should all implementations follow?"
Examples to offer:
Category 4: Quality Thresholds Ask: "What are the minimum acceptable quality criteria for any feature in this project?"
Examples to offer:
Write .speckit/constitution.md with the following structure:
# Project Constitution
**Version:** 1.0.0
**Created:** <DATE>
**Last Updated:** <DATE>
---
## Purpose
This constitution defines the non-negotiable principles, architectural decisions,
coding standards, and quality thresholds that all specifications and implementations
in this project must comply with.
---
## 1. Core Principles
<user-provided principles, each as a numbered item with brief explanation>
## 2. Architecture Decisions
<user-provided decisions in ADR-style format>
<Each entry: ID (AD-001+), title, context, decision, consequences>
## 3. Coding Standards
<user-provided standards, each as a numbered item>
## 4. Quality Thresholds
<user-provided thresholds, each with a measurable criterion>
---
## Compliance
Specifications are checked against this constitution during:
- `/speckit-helper:analyze` — gap analysis flags constitutional violations
- `/speckit-helper:checklist` — generated checklists include constitution items
---
## Changelog
| Date | Version | Description |
|------------|---------|----------------------|
| <DATE> | 1.0.0 | Initial constitution |
If the user provides no input for a category, include the section header with a placeholder:
No principles defined yet. Run
/speckit-helper:constitutionto add.
Read .speckit/constitution.md and display a concise summary to the user:
--- Current Constitution (v<VERSION>) ---
Core Principles: <N> defined
Architecture Decisions: <N> defined
Coding Standards: <N> defined
Quality Thresholds: <N> defined
Last updated: <DATE>
List the key items in each category in a brief, scannable format.
Use AskUserQuestion to ask:
"What would you like to change in the constitution? You can:
- Add new principles to any category
- Modify existing principles
- Remove outdated principles
- Update thresholds or standards
Describe the changes you want to make."
Based on the user's response, modify .speckit/constitution.md:
Use the Edit tool for all modifications to preserve unchanged content.
Apply semantic versioning to the constitution:
Update the Version and Last Updated fields in the document header.
Append a new row to the Changelog table:
| Date | Version | Description |
|---|---|---|
| <DATE> | <VER> | <brief description of what changed> |
After creating or updating the constitution, print a summary:
For new constitutions:
--- Constitution Created ---
File: .speckit/constitution.md
Version: 1.0.0
Principles defined:
Core Principles: <N>
Architecture Decisions: <N>
Coding Standards: <N>
Quality Thresholds: <N>
Note: /speckit-helper:analyze and /speckit-helper:checklist will check
specifications for compliance with this constitution.
For updated constitutions:
--- Constitution Updated ---
File: .speckit/constitution.md
Version: <old> -> <new>
Changes:
- <summary of changes made>
Note: Existing specifications have NOT been re-checked against the updated
constitution. Run /speckit-helper:analyze <feature-slug> to verify compliance.
.speckit/constitution.md, not inside a feature directory./speckit-helper:analyze and /speckit-helper:checklist will check
specifications for compliance with the constitution when it exists.