constitution%3Aamend by aaronbassett/agent-foundry
npx skills add https://github.com/aaronbassett/agent-foundry --skill constitution:amend您正在对项目的 CONSTITUTION.md 进行带版本跟踪的修订。
使用语义化版本控制更新宪法原则,维护变更日志(最新优先),并自动重新生成实施清单。
搜索 CONSTITUTION.md:
从页脚解析版本:
*Version: X.Y.Z*
如果未找到:假设为 1.0.0
交互式提示:
提示 1:修订类型
What type of amendment?
1. MAJOR - Breaking change (removes/fundamentally changes core principles)
2. MINOR - Additive change (adds new principles)
3. PATCH - Clarification (typo fixes, wording improvements)
Choice [1-3]:
提示 2:变更描述
Describe the changes (2-5 sentences):
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
提示 3:迁移说明(PATCH 类型可跳过)
Migration guidance for existing code (what needs to change?):
提示 4:修订理由
Why is this amendment necessary?
规则:
从以下位置加载模板:
${CLAUDE_PLUGIN_ROOT}/plugins/constitution/skills/amend/templates/amendment.template.md
替换占位符:
{{new_version}} → 计算出的版本号 (例如,"2.4.0"){{amendment_date}} → 当前日期 (YYYY-MM-DD 格式){{amendment_type}} → MAJOR/MINOR/PATCH{{change_description}} → 用户输入{{migration_notes}} → 用户输入 (PATCH 类型则为 "N/A"){{rationale}} → 用户输入渲染方式: 简单的字符串替换(无外部依赖)
查找或创建变更日志部分:
查找:
## Changelog
如果未找到,在序言之后(第一个 ## 原则之前)插入:
## Changelog
### Version {{new_version}} - {{amendment_date}}
**Type**: {{amendment_type}}
**Changes**:
{{change_description}}
**Migration Notes**:
{{migration_notes}}
**Rationale**:
{{rationale}}
---
如果找到: 将渲染的条目立即插入到 ## Changelog 标题之后(最新优先):
## Changelog
### Version 2.4.0 - 2026-01-25
...
### Version 2.3.0 - 2026-01-20
...
查找页脚(通常是最后 3 行):
---
*Last amended: YYYY-MM-DD*
*Version: X.Y.Z*
更新:
Last amended: → 当前日期Version: → 新版本号如果页脚不存在,则追加:
---
*Last amended: 2026-01-25*
*Version: 2.4.0*
自动调用清单生成器:
输出指令:
Amendment complete. Now regenerating checklist to reflect updated principles...
然后指示 Claude:
Please run the constitution:checklist-generator skill to update the implementation checklist based on the amended constitution.
(技能不能直接调用其他技能,因此这是给 Claude 执行下一步的指令)
输出:
✓ Constitution amended successfully
Version: 1.2.3 → 2.0.0
Type: MAJOR
Date: 2026-01-25
Changelog entry added (3 total entries)
Footer updated
Checklist regeneration requested
⚠️ MAJOR version change detected!
Review existing code for compliance with updated principles.
Migration notes:
[User's migration guidance]
未找到宪法文件: 报错并提示 "Run constitution:writer first"
版本格式无效: 假设为 1.0.0 并添加警告
变更日志放置位置: 如果结构不明确,则在末尾(页脚之前)添加该部分
迁移说明为空: PATCH 类型使用 "N/A",MAJOR/MINOR 类型则要求提供
Amendment removes principles? → MAJOR
Amendment changes core requirements fundamentally? → MAJOR
Amendment adds new principles? → MINOR
Amendment expands scope? → MINOR
Amendment clarifies existing wording? → PATCH
Amendment fixes typos? → PATCH
不确定时: 在继续之前请用户确认类型
❌ 禁止:
✅ 应该:
每周安装次数
1
代码仓库
GitHub 星标数
1
首次出现
1 天前
安装于
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
You are amending a project's CONSTITUTION.md with version tracking.
Update constitutional principles with semantic versioning, maintain changelog (newest first), and automatically regenerate the implementation checklist.
Search for CONSTITUTION.md:
Parse version from footer:
*Version: X.Y.Z*
If not found: Assume 1.0.0
Interactive prompts:
Prompt 1: Amendment Type
What type of amendment?
1. MAJOR - Breaking change (removes/fundamentally changes core principles)
2. MINOR - Additive change (adds new principles)
3. PATCH - Clarification (typo fixes, wording improvements)
Choice [1-3]:
Prompt 2: Change Description
Describe the changes (2-5 sentences):
Prompt 3: Migration Notes (skip for PATCH)
Migration guidance for existing code (what needs to change?):
Prompt 4: Rationale
Why is this amendment necessary?
Rules:
MAJOR : X+1.0.0 (e.g., 2.3.1 → 3.0.0)
MINOR : X.Y+1.0 (e.g., 2.3.1 → 2.4.0)
PATCH : X.Y.Z+1 (e.g., 2.3.1 → 2.3.2)
Load template from:
${CLAUDE_PLUGIN_ROOT}/plugins/constitution/skills/amend/templates/amendment.template.md
Replace placeholders:
{{new_version}} → Calculated version (e.g., "2.4.0"){{amendment_date}} → Today's date (YYYY-MM-DD format){{amendment_type}} → MAJOR/MINOR/PATCH{{change_description}} → User input{{migration_notes}} → User input (or "N/A" for PATCH){{rationale}} → User inputRendering: Simple string replacement (no external dependencies)
Find or create changelog section:
Look for:
## Changelog
If not found, insert after preamble (before first ## principle):
## Changelog
### Version {{new_version}} - {{amendment_date}}
**Type**: {{amendment_type}}
**Changes**:
{{change_description}}
**Migration Notes**:
{{migration_notes}}
**Rationale**:
{{rationale}}
---
If found: Insert rendered entry immediately after ## Changelog header (newest first):
## Changelog
### Version 2.4.0 - 2026-01-25
...
### Version 2.3.0 - 2026-01-20
...
Find footer (last 3 lines typically):
---
*Last amended: YYYY-MM-DD*
*Version: X.Y.Z*
Update:
Last amended: → Today's dateVersion: → New versionIf no footer exists, append:
---
*Last amended: 2026-01-25*
*Version: 2.4.0*
Automatically invoke checklist generator:
Output instruction:
Amendment complete. Now regenerating checklist to reflect updated principles...
Then instruct Claude:
Please run the constitution:checklist-generator skill to update the implementation checklist based on the amended constitution.
(Skills cannot directly invoke other skills, so this is an instruction for Claude to execute next)
Output:
✓ Constitution amended successfully
Version: 1.2.3 → 2.0.0
Type: MAJOR
Date: 2026-01-25
Changelog entry added (3 total entries)
Footer updated
Checklist regeneration requested
⚠️ MAJOR version change detected!
Review existing code for compliance with updated principles.
Migration notes:
[User's migration guidance]
No constitution found: Error with "Run constitution:writer first"
Invalid version format: Assume 1.0.0 and add warning
Changelog placement: If unclear structure, add section at end (before footer)
Empty migration notes: Use "N/A" for PATCH, require for MAJOR/MINOR
Amendment removes principles? → MAJOR
Amendment changes core requirements fundamentally? → MAJOR
Amendment adds new principles? → MINOR
Amendment expands scope? → MINOR
Amendment clarifies existing wording? → PATCH
Amendment fixes typos? → PATCH
When uncertain: Ask user to confirm type before proceeding
❌ Don't:
✅ Do:
Weekly Installs
1
Repository
GitHub Stars
1
First Seen
1 day ago
Installed on
zencoder1
amp1
cline1
openclaw1
opencode1
cursor1
agent-browser 浏览器自动化工具 - Vercel Labs 命令行网页操作与测试
147,400 周安装