SP

speckit-constitution

Automates the management of project governance files and principles to ensure consistency across templates.

Install

mkdir -p .claude/skills/speckit-constitution-dceoy && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/16346" && unzip -o skill.zip -d .claude/skills/speckit-constitution-dceoy && rm skill.zip

Installs to .claude/skills/speckit-constitution-dceoy

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
135 charsno explicit “when” trigger
Intermediate

Key capabilities

  • Load an existing constitution template
  • Collect or derive values for placeholder tokens
  • Draft updated constitution content by replacing placeholders
  • Propagate amendments across dependent artifacts
  • Generate a Sync Impact Report
  • Write the completed constitution to a file

How it works

The skill updates a project constitution template by collecting values for placeholders, drafting new content, propagating changes to dependent files, and generating a Sync Impact Report.

Inputs & outputs

You give it
User-provided principles or amendments, and existing `.specify/memory/constitution.md`
You get back
Updated `.specify/memory/constitution.md` with a Sync Impact Report, and potentially updated dependent templates

When to use speckit-constitution

  • Setting up initial project governance
  • Updating project principles
  • Amending constitution documents

About this skill

User Input

$ARGUMENTS

You 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 Actions section 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 Actions section.

Pre-Execution Checks

Check for extension hooks (before constitution update):

  • Check if .specify/extensions.yml exists in the project root.
  • If it exists, read it and look for entries under the hooks.before_constitution key
  • If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, 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
  • 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 optional flag:
    • Optional hook (optional: true):

      ## Extension Hooks
      
      **Optional Pre-Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`
      
    • Mandatory hook (optional: false):

      ## Extension Hooks
      
      **Automatic Pre-Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
      
      Wait for the result of the hook command before proceeding to the Outline.
      

      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 {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.

  • If no hooks are registered or .specify/extensions.yml does 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:

  1. Run .specify/scripts/bash/resolve-template.sh constitution-template --json from the repository root and parse TEMPLATE_CONTENT as 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.md exists, 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.
  2. 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_DATE is the original adoption date (if unknown ask or mark TODO), LAST_AMENDED_DATE is today if changes are made, otherwise keep previous.
    • CONSTITUTION_VERSION must 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.
  3. 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.
  4. Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):

    • 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.
  5. 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).
  6. Write the completed constitution back to .specify/memory/constitution.md (overwrite).

  7. 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 Actions section 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_constitution key
  • If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
  • Filter out hooks where enabled is explicitly false. Treat hooks without an enabled field as enabled by default.
  • For each remaining hook, do not attempt to interpret or evaluate hook condition expressions:
    • If the hook has no condition field, 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
  • 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 optional flag:
    • Optional hook (optional: true):

      ## Extension Hooks
      
      **Optional Hook**: {extension}
      Command: `/{command}`
      Description: {description}
      
      Prompt: {prompt}
      To execute: `/{command}`
      
    • Mandatory hook (optional: false):

      ## Extension Hooks
      
      **Automatic Hook**: {extension}
      Executing: `/{command}`
      EXECUTE_COMMAND: {command}
      

      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 {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.

  • If no hooks are registered or .specify/extensions.yml does not exist, skip silently

How it compares

This skill provides a structured workflow for managing project constitutions and their dependencies, ensuring consistency and versioning, unlike manual document updates.

Compared to similar skills

speckit-constitution side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
speckit-constitution (this skill)06moNo flagsIntermediate
docx935moReviewAdvanced
notion-knowledge-capture109moNo flagsIntermediate
session-handoff132moReviewBeginner

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

docx

anthropics

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

93225

notion-knowledge-capture

makenotion

Transforms conversations and discussions into structured documentation pages in Notion. Captures insights, decisions, and knowledge from chat context, formats appropriately, and saves to wikis or databases with proper organization and linking for easy discovery.

10115

session-handoff

davila7

Creates comprehensive handoff documents for seamless AI agent session transfers. Triggered when: (1) user requests handoff/memory/context save, (2) context window approaches capacity, (3) major task milestone completed, (4) work session ending, (5) user says 'save state', 'create handoff', 'I need to pause', 'context is getting full', (6) resuming work with 'load handoff', 'resume from', 'continue where we left off'. Proactively suggests handoffs after substantial work (multiple file edits, complex debugging, architecture decisions). Solves long-running agent context exhaustion by enabling fresh agents to continue with zero ambiguity.

1370

feishu-doc

openclaw

Feishu document read/write operations. Activate when user mentions Feishu docs, cloud docs, or docx links.

1464

spec-to-backlog

atlassian

Automatically convert Confluence specification documents into structured Jira backlogs with Epics and implementation tickets. When Claude needs to: (1) Create Jira tickets from a Confluence page, (2) Generate a backlog from a specification, (3) Break down a spec into implementation tasks, or (4) Convert requirements into Jira issues. Handles reading Confluence pages, analyzing specifications, creating Epics with proper structure, and generating detailed implementation tickets linked to the Epic.

868

marker

benchflow-ai

Convert PDF documents to Markdown using marker_single. Use when Claude needs to extract text content from PDFs while preserving LaTeX formulas, equations, and document structure. Ideal for academic papers and technical documents containing mathematical notation.

2248

Search skills

Search the agent skills registry