Skip to content
Skill Authoring
Skill

/speckit-constitution

Create or update the project constitution from interactive or provided principle inputs.

BOOST
From plugin
speckit-agent-skills
15112 skills
Install
$ npx -y skills add dceoy/speckit-agent-skills --skill speckit-constitution --agent claude-code

How it fires

How this skill gets triggered: by you, by Claude, or both.

  • Fires itselfAuto-invocation. Claude auto-loads it when your prompt matches the work.Auto-invocation is when the right skill fires by itself at the right moment, driven by a FLOW.md router and a hook, instead of you invoking it by name. It is the difference between a skill being installed and a skill actually getting used.Read the full definition →
  • You can call itInvoke it directly when you want it.
  • Slash command/speckit-constitution

Context preview

The summary Claude sees to decide when to auto-load this skill.

Create or update the project constitution from interactive or provided principle inputs.

SKILL.md

speckit-constitution.SKILL.md
name: "speckit-constitution"
description: "Create or update the project constitution from interactive or provided principle inputs."
argument-hint: "Principles or values for the project constitution"
compatibility: "Requires spec-kit project structure with .specify/ directory"
metadata:
  author: "github-spec-kit"
  source: "templates/commands/constitution.md"
user-invocable: true
disable-model-invocation: false

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, do not skip silently: tell the user that `.specify/extensions.yml` could 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 `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

Read more
Ships withspeckit-agent-skills

Agent skills and generated runtime entry points for Spec Kit.

Get the whole plugin

Other skills on speckit-agent-skills.