speckit-constitution
Skill296 starsChanged 3 days agoMITView on GitHub
Create or update the project constitution from interactive or provided principle inputs.
We split this skill into the rules it gives an agent
29 rules. 10 are common, 5 are distinctive, and 14 are very specific to this project.
10
Common
Most of the 115 edited versions we read keep these.
5
Distinctive
This author's own choices. Worth a look.
14
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 26
If the input includes feature implementation, code generation, refactoring, building, or deployment requests, you MUST NOT execute them.
- Distinctive: line 31
If it is unclear whether an instruction is constitution content, ask for clarification before making changes.
- Very specific: line 33
After completing the constitution update, include a Next Actions section for each deferred intent.
- Very specific: line 36
If there are no non-governance intents, omit the Next Actions section.
- Very specific: line 41
Check if .specify/extensions.yml exists in the project root.
- Very specific: line 42
If it exists, read it and look for entries under the hooks.before_constitution key
- Very specific: line 43
If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that .specify/extensions.yml could not be read (include the …
- Very specific: line 46
If the hook has no condition field, or it is null/empty, treat the hook as executable
- Very specific: line 47
If the hook defines a non-empty condition, skip the hook and leave condition evaluation to the HookExecutor implementation
- Very specific: line 48
When constructing command invocations from hook command names, replace dots (.) with hyphens (-).
- Very specific: line 72
If no hooks are registered or .specify/extensions.yml does not exist, skip silently
- Common: line 80
Follow this execution flow:
- Very specific: line 82
Run .specify/scripts/bash/resolve-template.sh constitution-template --json from the repository root and parse TEMPLATE_CONTENT as the …
- Distinctive: line 85
If it fails, stop and report the resolution error.
- Very specific: line 87
If .specify/memory/constitution.md exists, load it as the source of current project-specific values and amendments.
- Distinctive: line 90
If it does not exist, use the resolved template as the initial document.
- Distinctive: line 91
Do not write back to any versioned template layer.
- Common: line 96
If user input (conversation) supplies a value, use it.
- Common: line 103
If version bump type ambiguous, propose reasoning before finalizing.
- Common: line 108
Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not …
- Common: line 109
Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
- Common: line 118
Follow-up TODOs if any placeholders intentionally deferred.
- Common: line 121
No remaining unexplained bracket tokens.
- Very specific: line 126
Write the completed constitution back to .specify/memory/constitution.md (overwrite).
- Common: line 136
Use Markdown headings exactly as in the template (do not demote/promote levels).
- Common: line 138
Keep a single blank line between sections.
- Common: line 141
If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.
- Very specific: line 143
If critical info missing (e.g., ratification date truly unknown), insert TODO(<FIELD_NAME>): explanation and include in the Sync Impact …
- Very specific: line 145
Write only .specify/memory/constitution.md.
“Common” is measured: kept by at least 6 in 10 of the 115 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
User Input
$ARGUMENTSYou MUST consider the user input before proceeding (if not empty).
Scope Guard
This command's own work is limited to updating the project constitution itself. Dependent templates and commands read the constitution at runtime and are not modified here.
- Classify every part of the user input as either constitution content or a separate, non-governance intent.
- If the input includes feature implementation, code generation, refactoring, building, or deployment requests, you MUST NOT execute them. Extract them as deferred intents instead.
- You MUST NOT create, modify, or delete application source files, feature routes, components, tests, deployment files, or other artifacts unrelated to the constitution workflow.
- If it is unclear whether an instruction is constitution content, ask for clarification before making changes.
- After completing the constitution update, include a
Next Actionssection for each deferred intent. List the original intent and suggest the appropriate follow-up Spec Kit command, such as/speckit-specify, without invoking it. - If there are no non-governance intents, omit the
Next Actionssection.
Pre-Execution Checks
Check for extension hooks (before constitution update):
- Check if
.specify/extensions.ymlexists in the project root. - If it exists, read it and look for entries under the
hooks.before_constitutionkey - If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that
.specify/extensions.ymlcould not be read (include the parser error) and that no hooks were checked, including any mandatory (optional: false) hooks registered there, then continue normally - Filter out hooks where
enabledis explicitlyfalse. Treat hooks without anenabledfield as enabled by default. - For each remaining hook, do not attempt to interpret or evaluate hook
conditionexpressions:- If the hook has no
conditionfield, or it is null/empty, treat the hook as executable - If the hook defines a non-empty
condition, skip the hook and leave condition evaluation to the HookExecutor implementation
- If the hook has no
- When constructing command invocations from hook command names, replace dots (
.) with hyphens (-). For example,speckit.git.commit→/speckit-git-commit. - For each executable hook, output the following based on its
optionalflag:- Optional hook (
optional: true):## Extension Hooks **Optional Pre-Hook**: {extension} Command: `/{command}` Description: {description} Prompt: {prompt} To execute: `/{command}` - Mandatory hook (
optional: false):
After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal## Extension Hooks **Automatic Pre-Hook**: {extension} Executing: `/{command}` EXECUTE_COMMAND: {command} Wait for the result of the hook command before proceeding to the Outline.{command}id shown above, e.g. a skills-mode agent runs it as/skill:speckit-...or$speckit-...). Emitting the block alone does not run the hook.
- Optional hook (
- If no hooks are registered or
.specify/extensions.ymldoes not exist, skip silently
Outline
You are updating the project constitution at .specify/memory/constitution.md. The active
constitution scaffold is resolved at command time from constitution-template through the Spec Kit
preset/template resolution stack.
Follow this execution flow:
- Run
.specify/scripts/bash/resolve-template.sh constitution-template --jsonfrom the repository root and parseTEMPLATE_CONTENTas the active template.- The shared resolver applies project overrides, composing preset layers, and extension layers before the core template fallback. It MUST succeed before continuing.
- If it fails, stop and report the resolution error; do not continue with only one contributing template layer.
- If
.specify/memory/constitution.mdexists, load it as the source of current project-specific values and amendments. Preserve information that is still applicable when applying the newly resolved scaffold. - If it does not exist, use the resolved template as the initial document.
- Do not write back to any versioned template layer.
- Identify every placeholder token of the form
[ALL_CAPS_IDENTIFIER]. IMPORTANT: The user might require less or more principles than the ones used in the template. If a number is specified, respect that - follow the general template. You will update the doc accordingly.
- Collect/derive values for placeholders:
- If user input (conversation) supplies a value, use it.
- Otherwise infer from existing repo context (README, docs, prior constitution versions if embedded).
- For governance dates:
RATIFICATION_DATEis the original adoption date (if unknown ask or mark TODO),LAST_AMENDED_DATEis today if changes are made, otherwise keep previous. CONSTITUTION_VERSIONmust increment according to semantic versioning rules:- MAJOR: Backward incompatible governance/principle removals or redefinitions.
- MINOR: New principle/section added or materially expanded guidance.
- PATCH: Clarifications, wording, typo fixes, non-semantic refinements.
- If version bump type ambiguous, propose reasoning before finalizing.
- Draft the updated constitution content using the resolved template as the required structure:
- Replace every placeholder with concrete text (no bracketed tokens left except intentionally retained template slots that the project has chosen not to define yet—explicitly justify any left).
- Preserve heading hierarchy and comments can be removed once replaced unless they still add clarifying guidance.
- Ensure each Principle section: succinct name line, paragraph (or bullet list) capturing non‑negotiable rules, explicit rationale if not obvious.
- Ensure Governance section lists amendment procedure, versioning policy, and compliance review expectations.
- Produce a Sync Impact Report as an HTML comment at the top of the constitution file after update.
This report is temporary scratch material for human review of the amendment, not governance
content; it is expected to be removed before the amended constitution file is committed.
- Version change: old → new
- List of modified principles (old title → new title if renamed)
- Added sections
- Removed sections
- Follow-up TODOs if any placeholders intentionally deferred.
- Validation before final output:
- No remaining unexplained bracket tokens.
- Version line matches report.
- Dates ISO format YYYY-MM-DD.
- Principles are declarative, testable, and free of vague language ("should" → replace with MUST/SHOULD rationale where appropriate).
- Write the completed constitution back to
.specify/memory/constitution.md(overwrite). - Output a final summary to the user with:
- New version and bump rationale.
- Any TODO placeholders or deferred items requiring manual follow-up.
- Suggested commit message (e.g.,
docs: amend constitution to vX.Y.Z (principle additions + governance update)). - A
Next Actionssection for any deferred non-governance intents.
Formatting & Style Requirements:
- Use Markdown headings exactly as in the template (do not demote/promote levels).
- Wrap long rationale lines to keep readability (<100 chars ideally) but do not hard enforce with awkward breaks.
- Keep a single blank line between sections.
- Avoid trailing whitespace.
If the user supplies partial updates (e.g., only one principle revision), still perform validation and version decision steps.
If critical info missing (e.g., ratification date truly unknown), insert TODO(<FIELD_NAME>): explanation and include in the Sync Impact Report under deferred items.
Write only .specify/memory/constitution.md; do not create or modify template source files.
Post-Execution Checks
Check for extension hooks (after constitution update):
Check if .specify/extensions.yml exists in the project root.
- If it exists, read it and look for entries under the
hooks.after_constitutionkey - If the YAML cannot be parsed or is invalid, do not skip silently: tell the user that
.specify/extensions.ymlcould not be read (include the parser error) and that no hooks were checked, including any mandatory (optional: false) hooks registered there, then continue normally - Filter out hooks where
enabledis explicitlyfalse. Treat hooks without anenabledfield as enabled by default. - For each remaining hook, do not attempt to interpret or evaluate hook
conditionexpressions:- If the hook has no
conditionfield, or it is null/empty, treat the hook as executable - If the hook defines a non-empty
condition, skip the hook and leave condition evaluation to the HookExecutor implementation
- If the hook has no
- When constructing command invocations from hook command names, replace dots (
.) with hyphens (-). For example,speckit.git.commit→/speckit-git-commit. - For each executable hook, output the following based on its
optionalflag:- Optional hook (
optional: true):## Extension Hooks **Optional Hook**: {extension} Command: `/{command}` Description: {description} Prompt: {prompt} To execute: `/{command}` - Mandatory hook (
optional: false):
After emitting the block above you MUST actually invoke the hook and wait for it to finish before continuing. Run it the same way you would run the command yourself in this agent/session (the invocation may differ from the literal## Extension Hooks **Automatic Hook**: {extension} Executing: `/{command}` EXECUTE_COMMAND: {command}{command}id shown above, e.g. a skills-mode agent runs it as/skill:speckit-...or$speckit-...). Emitting the block alone does not run the hook.
- Optional hook (
- If no hooks are registered or
.specify/extensions.ymldoes not exist, skip silently
Other versions123 projects use a version of this.
Word for word · 6
- nota-daw/nota★ 201100% same
- dogganidhal/agui-inspector★ 4100% same
- electrohire/spec-kit-evaluator★ 3100% same
- joaoguimaraespro/personal-finance★ 1100% same
- authdog/agent-skills★ 0100% same
- richardkuo2002/repo-chronicle★ 0100% same
Edited · 114
- pmndrs/react-spring★ 29k65% same
- unoplatform/uno★ 10k65% same
- elsa-workflows/elsa-core★ 7.9k66% same
- hhyo/Archery★ 7.1k98% same
- pamburus/hl★ 3.3k98% same
- nornir-automation/nornir★ 1.6k98% same
- cloudposse/atmos★ 1.4k65% same
- Azure/agent-landing-zone★ 1.2k97% same
- Azure/GPT-RAG★ 1.2k97% same
- dotCMS/core★ 97198% same
104 more not listed
Wrote their own version · 3
- FavToSkill/douxiaojia★ 11same name
- sarveshtalele/mcp-skills-registry★ 2same name
- TienDat-Vna/BackSpec★ 1same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
Used alongsideProjects with it also use speckit-git-commit, speckit-git-feature and 9 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
Sorcha-PlatformSkillspeckit-git-commit
Auto-commit changes after a Spec Kit command completes
Also in 33 projects that use this
Sorcha-PlatformSkillspeckit-git-feature
Create a feature branch with sequential or timestamp numbering
Also in 33 projects that use this
patterson-agentsSkillspeckit-baseline
Generate feature specifications by analyzing existing source code.
Also in 3 projects that use this
patterson-agentsSkillclaude-command-converter
Convert Claude Code commands (.claude/commands/*.md) to standard Agent Skills (skills/*/SKILL.md). Use when migrating slash commands to portable skill format, creating skills from existing commands, or standardizing command definitions across AI runtimes.
Also in 3 projects that use this
SentrySkillcommit
Create commit messages following Sentry conventions. Use when committing code changes, writing commit messages, or formatting git history. Follows conventional commits with Sentry-specific issue references.
Also in 4 projects that use this
GoogleSkillimprove-codebase-architecture
Scan a codebase for deepening opportunities, present them as a visual HTML report, then grill through whichever one you pick.
Also in 3 projects that use this
- +3 more from Sorcha-Platform
In this repository11 other files it gives its agents.
- .github/copilot-instructions.mdCopilot instructions
- speckit-agent-context-updateSkill
- speckit-analyzeSkill
- speckit-checklistSkill
- speckit-clarifySkill
- speckit-convergeSkill
- speckit-implementSkill
- speckit-planSkill
- speckit-specifySkill
- speckit-tasksSkill
- speckit-taskstoissuesSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

