speckit-constitution
它能做什么
这个技能帮助团队编写或更新其项目章程,即指导工作规划方式的一组核心原则。适合使用 Spec Kit 方法的团队。
适用场景
- ✓新项目开始,团队需要编写指导原则的时候。
- ✓现有原则已经改变,项目的规划模板需要相应更新的时候。
- ✓你想让 AI 把你粗略的规则整理成清晰书面章程的时候。
技能链接
https://github.com/unoplatform/uno/blob/master/.claude/skills/speckit-constitution/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请帮我编写项目章程,列出我们的主要原则,并更新规划模板使其保持一致。”
每周 5 个新技能,1 分钟读完。
工作原理
这个技能获取你的原则(或向你询问),并把它们写入章程。然后检查相关模板,确保它们保持一致。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
User Input
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Pre-Execution Checks
Check for extension hooks (before constitution update):
- Check if
.specify/extensions.ymlexists in the project root. - If it exists, read it and look for entries under the
hooks.before_constitutionkey - If the YAML cannot be parsed or is invalid, skip hook checking silently and continue normally
- Filter out hooks where
enabledis explicitlyfalse. Treat hooks without anenabledfield as enabled by default. - For each remaining hook, do not attempt to interpret or evaluate hook
conditionexpressions:- If the hook has no
conditionfield, 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
- If the hook has no
- When constructing slash commands 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
optionalflag:- 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.
- Optional hook (
- If no hooks are registered or
.specify/extensions.ymldoes not exist, skip silently
Outline
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.- 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.
- Identify every placeholder token of the form
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_DATEis the original adoption date (if unknown ask or mark TODO),LAST_AMENDED_DATEis today if changes are made, otherwise keep previous. CONSTITUTION_VERSIONmust 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.
Draft the updated constitution content:
- 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.
Consistency propagation checklist (convert prior checklist into active validations):
- Read
.specify/templates/plan-template.mdand ensure any "Constitution Check" or rules align with updated principles. - Read
.specify/templates/spec-template.mdfor scope/requirements alignment—update if constitution adds/removes mandatory sections or constraints. - Read
.specify/templates/tasks-template.mdand ensure task cate
- Read
常见问题
什么是项目章程?
它是一份简短的文件,列出团队同意在规划和开发工作中遵循的核心原则。
它能根据我的笔记工作吗?
可以。这个技能可以使用你提供的原则,也可以通过互动方式向你询问。
为什么要更新其他模板?
这个技能会让相关模板保持同步,从而使原则被一致地应用。
详情
作者的原始描述
Create or update the project constitution from interactive or provided principle inputs, ensuring all dependent templates stay in sync.
repo: unoplatform/uno
热度
- GitHub 星标
- 10k
- 排名
- #11998
- 许可证
- Apache-2.0
- 更新时间
- 2026/11/2
评论
- …
同一仓库的更多技能
speckit-analyze
10k帮你的智能体检查功能规格、计划和任务清单是否彼此一致,并指出缺口,且不修改任何文件。
speckit-checklist
10k帮你的智能体创建自定义检查清单,在开始开发前测试功能的书面需求是否清晰、完整且一致。
speckit-clarify
10k帮你的智能体找出功能规格中不清楚的部分,提出最多五个有针对性的问题,并把答案写回规格中。
speckit-git-commit
10k在 Spec Kit 步骤完成后,帮你的智能体按项目配置文件中的提交设置,自动将当前更改保存到 Git。