speckit-constitution
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
{what this skill teaches agents}
Add boolean configuration flags to the update-config CLI command using TryParseRequiredBoolean() for argument parsing and GetOrCreateObject() for JSON section navigation, following the three-step flow and nesting conventions established across PRs #85, #86, and #92. WHEN: adding a new --flag to update-config, nesting a config value under a JSON section, or writing unit tests for CLI config flag parsing.
Resolve configuration file paths in CLI commands using the same shared pipeline as the doctor/diagnostics so all commands target the same effective config file. WHEN: adding a new CLI command that reads or writes config, debugging a command that mutates a different config file than doctor reports, or implementing config-aware CLI behavior in a multi-location config environment.
Implement discovery-source attribution tracking for MCP tool enumeration by creating a dedicated tracker interface with first-writer-wins semantics, recording at discovery call sites (not in the doctor/reporter), and wiring both in-process and OOP paths to agree on provenance. WHEN: the doctor or a reporting surface infers tool source heuristically, adding source attribution to a new discovery path, or aligning in-process and OOP discovery provenance.
Implement OAuth 2.1 + Entra ID authentication for an MCP server using a lightweight AS metadata proxy — handling RFC 9728 protected resource metadata, RFC 8414 AS metadata, and a /register endpoint that eliminates client_id prompts for all MCP clients. WHEN: adding OAuth to an MCP server, MCP clients ask users to paste a client_id, authorization redirects go to the wrong endpoint, or debugging Entra DCR limitations.
Publish .NET NuGet packages to GitHub Packages using GitHub PAT authentication — covering gh auth token retrieval, write:packages scope verification, dotnet pack/push workflow, and owner resolution from git remote. WHEN: publishing a NuGet package to GitHub Packages, debugging 401 on dotnet nuget push, adding a GitHub Packages NuGet source, or resolving write:packages scope errors.
| name | speckit-constitution |
| description | Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync. |
| 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 | true |
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
You are updating the project constitution at .specify/memory/constitution.md. This file is a TEMPLATE containing placeholder tokens in square brackets (e.g. [PROJECT_NAME], [PRINCIPLE_1_NAME]). Your job is to (a) collect/derive concrete values, (b) fill the template precisely, and (c) propagate any amendments across dependent artifacts.
Note: If .specify/memory/constitution.md does not exist yet, it should have been initialized from .specify/templates/constitution-template.md during project setup. If it's missing, copy the template first.
Follow this execution flow:
Load the existing constitution at .specify/memory/constitution.md.
[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:
Consistency propagation checklist (convert prior checklist into active validations):
.specify/templates/plan-template.md and ensure any "Constitution Check" or rules align with updated principles..specify/templates/spec-template.md for scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints..specify/templates/tasks-template.md and ensure task categorization reflects new or removed principle-driven task types (e.g., observability, versioning, testing discipline)..specify/templates/commands/*.md (including this one) to verify no outdated references (agent-specific names like CLAUDE only) remain when generic guidance is required.README.md, docs/quickstart.md, or agent-specific guidance files if present). Update references to principles changed.Produce a Sync Impact Report (prepend as an HTML comment at top of the constitution file after update):
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)).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.
Do not create a new template; always operate on the existing .specify/memory/constitution.md file.