Constitution
The Constitution establishes the ground rules for how the AI should behave during the workflow.
It defines:
Project values and constraints
Coding standards and architectural preferences
Expectations around testing, documentation, and quality
This phase ensures that all subsequent reasoning and implementation aligns with the team’s norms and the existing codebase. You only need to generate a constitution once when you first initialize Spec Kit in your project.
✏️ Steps
Create a Spec Kit Constitution
Run the prompt:
/speckit.constitution <optional context>This command will automatically look in your codebase and try to derive rules and guidelines for the constitution. You can also provide
<optional context>,which will guide the AI in what the rules should look like.This command may also modify the template files in
.specify/templatesto better align with the principles it establishes.Be sure to commit your code once this finishes running
Walkthrough Images
Locate the constitution.md file and look at the default template
Run the /speckit.constitution prompt
View the output results and chat with the speckit.constitution agent to make any requested changes.
Next Steps
Continue on to create your first spec and start implementing a feature