원클릭으로
constitution
Define and manage non-negotiable project principles (Constitution) and verify synchronization with other documents
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Define and manage non-negotiable project principles (Constitution) and verify synchronization with other documents
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Analyze and extract requirements from use case diagram. Use when extracting UR/FR/NFR from use cases or when called by generate-prd.
Check consistency between implementation code and design documents (design), detecting discrepancies
Generate quality assurance checklists from specifications and plans with structured IDs and categories
Analyze specifications and generate clarification questions to eliminate ambiguity before implementation
Automatically executed during document updates or before implementation to check consistency between PRD ↔ *_spec.md ↔ *_design.md. Detects missing requirement ID (UR/FR/NFR) references, data model mismatches, API definition discrepancies, terminology inconsistencies, and ensures traceability between documents.
Finalize and integrate PRD from all artifacts. Use when combining use case diagrams, requirements analysis, and requirements diagrams into a complete PRD, or when called by generate-prd.
| name | constitution |
| description | Define and manage non-negotiable project principles (Constitution) and verify synchronization with other documents |
| argument-hint | <subcommand> [arguments] |
| license | MIT |
| user-invocable | true |
| disable-model-invocation | true |
| allowed-tools | Read, Write, Edit, Glob, Grep, Skill, Bash |
Define the project's non-negotiable principles (Constitution) and verify that all specifications and design documents comply with them.
Read the following prerequisite references before execution:
references/prerequisites_plugin_update.md - Check for plugin updatesreferences/prerequisites_principles.md - Read AI-SDD principles documentreferences/prerequisites_directory_paths.md - Resolve directory paths using SDD_* environment variablesOutput templates are located under templates/${SDD_LANG:-en}/ within this skill directory.
The SDD_LANG environment variable determines the language (default: en).
A Project Constitution defines non-negotiable principles that form the foundation of all design decisions.
| Characteristic | Description |
|---|---|
| Non-negotiable | Not open to debate. Changes require careful consideration |
| Persistent | Consistently applied across the entire project |
| Hierarchical | Higher principles take precedence over lower ones |
| Verifiable | Can automatically verify spec/design compliance with principles |
| Principle Category | Example Principles |
|---|---|
| Architecture | Library-First, Clean Architecture |
| Development | Test-First, Specification-Driven |
| Quality | Test Coverage > 80%, Zero Runtime Errors |
| Technical | TypeScript Only, No Any Types |
| Business | Privacy by Design, Accessibility First |
$ARGUMENTS
| Subcommand | Description | Additional Arguments |
|---|---|---|
init | Initialize constitution file | [context] (optional) |
validate | Validate constitution compliance | - |
add | Add new principle | "principle-name" |
bump-version | Version bump | major|minor|patch |
| Example | Description |
|---|---|
/constitution init | Initialize constitution file (interactive) |
/constitution init "TypeScript/React Web application" | Initialize with context (non-interactive) |
/constitution validate | Validate constitution compliance |
/constitution add "Library-First" | Add new principle |
/constitution bump-version major | Major version bump |
Create a constitution file in the project by running /constitution init.
Generated File: ${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/CONSTITUTION.md
Processing Flow:
${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/CONSTITUTION.md already existstemplates/${SDD_LANG:-en}/constitution_template.md{Principle Name}, {Description of the principle}, {Applicable scope}, {Validation item},
YYYY-MM-DD, etc.) with project-specific contentCRITICAL: The output language MUST match the template language. Do NOT mix languages regardless of the user's global language settings.
SDD_LANG=en (or unset) → All content in English (use templates/en/)SDD_LANG=ja → All content in Japanese (use templates/ja/)Content: Template customized for the project
Add a new principle to a constitution by running /constitution add "Library-First".
Process:
Command: /constitution show
Output Content:
Command: /constitution update
Interactive Prompts: See examples/update_interactive_session.md for an example interactive session.
Version Bump Rules:
| Change Type | Version Impact | Example |
|---|---|---|
| Add principle | MAJOR (X.y.z) | 1.0.0 -> 2.0.0 |
| Modify principle | MAJOR (X.y.z) | 1.0.0 -> 2.0.0 |
| Remove principle | MAJOR (X.y.z) | 1.0.0 -> 2.0.0 |
| Clarify principle | MINOR (x.Y.z) | 1.0.0 -> 1.1.0 |
| Update enforcement | MINOR (x.Y.z) | 1.0.0 -> 1.1.0 |
| Fix typo | PATCH (x.y.Z) | 1.0.0 -> 1.0.1 |
Verify all specifications and design documents comply with constitution by running /constitution validate.
Optimized Execution Flow:
Phase 1: Shell Script - Execute python3 "${CLAUDE_PLUGIN_ROOT}/skills/constitution/scripts/validate-files.py" to
scan file structure.
This script:
${CLAUDE_PROJECT_DIR}/${SDD_REQUIREMENT_PATH}/**/*.md)*_spec.md)*_design.md)$CLAUDE_ENV_FILE:
CONSTITUTION_REQUIREMENT_FILES - List of requirement filesCONSTITUTION_SPEC_FILES - List of spec filesCONSTITUTION_DESIGN_FILES - List of design filesCONSTITUTION_SUMMARY - JSON summary with file countsPhase 2: Claude - Read files from pre-scanned lists and validate content
Validation Targets:
${CLAUDE_PROJECT_DIR}/${SDD_REQUIREMENT_PATH}/**/*.md${CLAUDE_PROJECT_DIR}/${SDD_SPECIFICATION_PATH}/**/*_spec.md${CLAUDE_PROJECT_DIR}/${SDD_SPECIFICATION_PATH}/**/*_design.md${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/PRD_TEMPLATE.md${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/SPECIFICATION_TEMPLATE.md${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/DESIGN_DOC_TEMPLATE.mdValidation Items:
| Validation Item | Check Content |
|---|---|
| Principle Mention | Are principles mentioned in specs/designs? |
| Principle Compliance | Do implementation decisions follow principles? |
| Contradiction Detection | Are there descriptions contrary to principles? |
| Template Sync | Do templates reflect latest constitution? |
Validation Output Format: See examples/validation_report.md for the complete report template.
Command: /constitution sync
Purpose: Ensure principles are reflected in other documents
Actions:
Update Specification Template:
Update Design Template:
Update Task Templates:
Update Checklist Template:
Output: See examples/sync_report.md for an example sync report.
Update constitution version by running /constitution bump-version {major|minor|patch} (e.g.
/constitution bump-version major for a breaking change, minor to add a principle, patch for a typo fix).
Semantic Versioning:
| Version Type | Use Case | Example |
|---|---|---|
| Major | Remove/significantly change existing principle (breaking) | 1.0.0 -> 2.0.0 |
| Minor | Add new principle | 1.0.0 -> 1.1.0 |
| Patch | Fix expression of principle, typo fix | 1.0.0 -> 1.0.1 |
For a complete constitution file example with all categories (Business, Architecture, Development Methodology, Technical Constraints), principle hierarchy, verification items, and change history, see:
Reference: examples/constitution_file_structure.md
Save Location: ${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/CONSTITUTION.md
Depending on sub command, use the templates/${SDD_LANG:-en}/constitution_output.md template for output formatting.
YYYY-MM-DD → actual date)| Document | Sync Content |
|---|---|
${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/SPECIFICATION_TEMPLATE.md | Add principle reference sections |
${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/DESIGN_DOC_TEMPLATE.md | Add principle compliance checklist |
*_spec.md | Design based on principles |
*_design.md | Explicitly state principle compliance |
Running /constitution validate automatically verifies:
| Scenario | Command | Purpose |
|---|---|---|
| Project Start | /constitution init | Create constitution file |
| Add New Principle | /constitution add | Add principle and bump version |
| Before Creating Spec | /constitution validate | Check latest constitution |
| Before Review | /constitution validate | Verify constitution compliance |
| Major Policy Change | /constitution bump-version major | Major version bump |
The change process follows these steps in order: propose change (discuss in Issue, etc.) -> team approval -> update
constitution file -> bump version -> update affected documents -> verify with /constitution validate.
Major version bump required for any of the following:
See references/best_practices.md for detailed guidance on:
Constitution principles are checked at each level of the AI-SDD workflow, in this order: Constitution (Project-Level Principles) -> PRD (Business Requirements) -> Specification (Logical Design) -> Design Document (Technical Implementation) -> Implementation (Code).
${CLAUDE_PROJECT_DIR}/${SDD_ROOT}/CONSTITUTION.mdreferences/best_practices.md for additional recommendations