npx skills add ...
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution
Create or update the project constitution from interactive or provided principle inputs.
npx skills add dceoy/speckit-agent-skills --skill speckit-constitution
You MUST consider the user input before proceeding (if not empty).
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.
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.Next Actions section.Check for extension hooks (before constitution update):
.specify/extensions.yml exists in the project root.hooks.before_constitution key.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 normallyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementation.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.optional flag:
Optional hook (optional: true):
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 {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.
.specify/extensions.yml does not exist, skip silentlyYou 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 --json from the repository root and parse TEMPLATE_CONTENT as the active template.
.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.[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:
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:
Draft the updated constitution content using the resolved template as the required structure:
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.
Validation before final output:
Write the completed constitution back to .specify/memory/constitution.md (overwrite).
Output a final summary to the user with:
docs: amend constitution to vX.Y.Z (principle additions + governance update)).Next Actions section for any deferred non-governance intents.Formatting & Style Requirements:
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.
Check for extension hooks (after constitution update):
Check if .specify/extensions.yml exists in the project root.
hooks.after_constitution key.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 normallyenabled is explicitly false. Treat hooks without an enabled field as enabled by default.condition expressions:
condition field, or it is null/empty, treat the hook as executablecondition, skip the hook and leave condition evaluation to the HookExecutor implementation.) with hyphens (-). For example, speckit.git.commit → /speckit-git-commit.optional flag:
Optional hook (optional: true):
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 {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.
.specify/extensions.yml does not exist, skip silently