cmd-speckit-constitution
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese/speckit.constitution
/speckit.constitution
Agent skill wrapper for the Claude command .
/speckit.constitutionWhen the original command text references , , or named arguments, map them from the user's current request.
{{INPUT}}$1Claude命令的Agent技能包装器。
/speckit.constitution当原始命令文本引用、或命名参数时,从用户当前请求中映射对应的值。
{{INPUT}}$1Command Instructions
命令说明
Establish or update the project constitution — the single source of truth for governing principles that all specs and implementations must follow.
建立或更新项目治理准则——这是所有规范和实现必须遵循的治理原则的唯一真实来源。
Steps
步骤
-
Locate the constitution:
- Check for .
.specify/memory/constitution.md - If it does not exist and is absent, tell the user to run
.specify/first and stop./speckit.init - If the file exists, load its current content and note the current version.
- Check for
-
Identify placeholders and gaps: Scan for:
- Bracketed tokens: ,
[PROJECT_NAME],[YYYY-MM-DD][Describe the project...] - Non-declarative or untestable principles
- Missing sections (MUST, SHOULD, SHOULD NOT are required at minimum)
- Bracketed tokens:
-
Collect values:
- : Detect from
PROJECT_NAME(extract repo name),git remote get-url origin,package.json, or ask the user.mix.exs - Date: Today's date in ISO format (YYYY-MM-DD).
- Project context: Ask the user — "Briefly describe this project's purpose, primary users, and key constraints."
-
Present the proposed constitution (full text for new files, or a diff for updates). Ask for confirmation before writing.
-
Write the updated constitution: Replace all placeholder tokens. Ensure:
- Principles are declarative and testable ("All features..." not "We try to...")
- Dates use ISO format (YYYY-MM-DD)
- MUST = non-negotiable; SHOULD = strong default; SHOULD NOT = strong prohibition
- No trailing whitespace or unresolved bracketed tokens
-
Version bump (updates to existing constitutions only):
- MAJOR: removing or fundamentally changing a MUST principle
- MINOR: adding new principles
- PATCH: clarifying wording without changing intent
-
Report: File written, version, and a suggested commit message (e.g.,).
docs: ratify project constitution v0.1.0
Next step: Run to write your first feature specification.
/speckit.specify-
定位治理准则文件:
- 检查是否存在。
.specify/memory/constitution.md - 如果该文件不存在且目录也不存在,请告知用户先运行
.specify/并终止操作。/speckit.init - 如果文件存在,加载其当前内容并记录当前版本。
- 检查是否存在
-
识别占位符和缺失内容: 扫描以下内容:
- 括号标记:、
[PROJECT_NAME]、[YYYY-MM-DD][Describe the project...] - 非声明式或不可测试的原则
- 缺失的章节(至少必须包含MUST、SHOULD、SHOULD NOT部分)
- 括号标记:
-
收集所需值:
- :从
PROJECT_NAME(提取仓库名称)、git remote get-url origin、package.json中自动检测,或询问用户。mix.exs - 日期:采用ISO格式的今日日期(YYYY-MM-DD)。
- 项目背景:询问用户——“请简要描述该项目的目标、主要用户和关键约束条件。”
-
展示拟议的治理准则(新文件展示完整文本,更新则展示差异内容)。写入前需征得用户确认。
-
写入更新后的治理准则:替换所有占位符标记。确保:
- 原则为声明式且可测试(例如“所有功能……”而非“我们尝试……”)
- 日期采用ISO格式(YYYY-MM-DD)
- MUST = 不可协商;SHOULD = 强烈默认要求;SHOULD NOT = 强烈禁止
- 无尾随空格或未解析的括号标记
-
版本升级(仅适用于现有治理准则的更新):
- MAJOR:移除或根本性修改MUST级原则
- MINOR:添加新的原则
- PATCH:在不改变原意的前提下澄清措辞
-
报告:告知用户文件已写入、版本号,并提供建议的提交信息(例如:)。
docs: ratify project constitution v0.1.0
下一步: 运行来编写你的第一个功能规范。
/speckit.specify