add-config-field
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseAdd Config Field
添加配置字段
Add a new field to the config schema with proper versioning and migration support.
.agents.yml为.agents.yml配置架构添加新字段,同时提供完善的版本控制与迁移支持。
Files Changed
修改的文件
| File | Purpose |
|---|---|
| 4 YAML templates that generate .agents.yml |
| Schema version number |
| Changelog + migration logic |
| Plugin version |
| Marketplace version |
| 文件 | 用途 |
|---|---|
| 用于生成.agents.yml的4个YAML模板 |
| 架构版本号文件 |
| 更新日志 + 迁移逻辑 |
| 插件版本文件 |
| 应用商店版本文件 |
Input
输入信息
- Field name: e.g.,
auto_commit - Default value: e.g., or multi-line YAML
false - Section: Where in template (Workflow, Quality Gate, etc.)
- Comment: Inline explanation
- Used by: Agent/command that reads this field
- 字段名称:例如,
auto_commit - 默认值:例如,或多行YAML内容
false - 位置:在模板中的对应章节(工作流、质量门等)
- 注释:行内说明文字
- 使用者:读取该字段的Agent/命令
Steps
操作步骤
1. Update init.md Templates
1. 更新init.md模板
File:
plugins/majestic-engineer/commands/workflows/init.mdAdd field to ALL 4 templates (Rails, Python, Node, Generic). Find the appropriate section and add:
yaml
new_field: value # Comment explaining purposeOr for multi-line:
yaml
new_field: # Comment
- item1
- item2文件路径:
plugins/majestic-engineer/commands/workflows/init.md为所有4个模板(Rails、Python、Node、通用版)添加字段。找到对应章节并添加:
yaml
new_field: value # 字段用途说明如果是多行内容:
yaml
new_field: # 注释
- item1
- item22. Bump Schema Version
2. 升级架构版本
File:
plugins/majestic-engineer/config-schema-versionIncrement: →
1.11.2文件路径:
plugins/majestic-engineer/config-schema-version版本号递增: →
1.11.23. Update config-reader.md
3. 更新config-reader.md
File:
plugins/majestic-engineer/agents/config-reader.mdA) Add to Version Changelog table:
markdown
| 1.2 | `new_field` | Description |B) Update migration YAML block (in "Outdated config_version" section):
yaml
new_field: default_value文件路径:
plugins/majestic-engineer/agents/config-reader.mdA) 添加至版本更新日志表格:
markdown
| 1.2 | `new_field` | 描述 |B) 更新迁移YAML块(在“过时的config_version”章节):
yaml
new_field: default_value4. Bump Plugin Versions
4. 升级插件版本
Files:
- :
plugins/majestic-engineer/.claude-plugin/plugin.json→3.15.03.16.0 - : Update majestic-engineer entry version
.claude-plugin/marketplace.json
涉及文件:
- :版本从
plugins/majestic-engineer/.claude-plugin/plugin.json→3.15.03.16.0 - :更新majestic-engineer条目版本
.claude-plugin/marketplace.json
5. Update Consumer Docs (if needed)
5. 更新使用者文档(如有需要)
If a specific agent/command reads this field, update its documentation to mention the config.
如果有特定Agent/命令会读取该字段,请更新对应文档以提及该配置项。
Verification
验证步骤
bash
undefinedbash
undefinedCount field in init.md (should be 4 - one per template)
统计init.md中字段出现次数(应为4次 - 每个模板1次)
grep -c "new_field" plugins/majestic-engineer/commands/workflows/init.md
grep -c "new_field" plugins/majestic-engineer/commands/workflows/init.md
Check schema version
检查架构版本
cat plugins/majestic-engineer/config-schema-version
cat plugins/majestic-engineer/config-schema-version
Check changelog entry
检查更新日志条目
grep "new_field" plugins/majestic-engineer/agents/config-reader.md
undefinedgrep "new_field" plugins/majestic-engineer/agents/config-reader.md
undefined