add-config-field

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Add Config Field

添加配置字段

Add a new field to the
.agents.yml
config schema with proper versioning and migration support.
为.agents.yml配置架构添加新字段,同时提供完善的版本控制与迁移支持。

Files Changed

修改的文件

FilePurpose
plugins/majestic-engineer/commands/workflows/init.md
4 YAML templates that generate .agents.yml
plugins/majestic-engineer/config-schema-version
Schema version number
plugins/majestic-engineer/agents/config-reader.md
Changelog + migration logic
plugins/majestic-engineer/.claude-plugin/plugin.json
Plugin version
.claude-plugin/marketplace.json
Marketplace version
文件用途
plugins/majestic-engineer/commands/workflows/init.md
用于生成.agents.yml的4个YAML模板
plugins/majestic-engineer/config-schema-version
架构版本号文件
plugins/majestic-engineer/agents/config-reader.md
更新日志 + 迁移逻辑
plugins/majestic-engineer/.claude-plugin/plugin.json
插件版本文件
.claude-plugin/marketplace.json
应用商店版本文件

Input

输入信息

  • Field name: e.g.,
    auto_commit
  • Default value: e.g.,
    false
    or multi-line YAML
  • Section: Where in template (Workflow, Quality Gate, etc.)
  • Comment: Inline explanation
  • Used by: Agent/command that reads this field
  • 字段名称:例如,
    auto_commit
  • 默认值:例如,
    false
    或多行YAML内容
  • 位置:在模板中的对应章节(工作流、质量门等)
  • 注释:行内说明文字
  • 使用者:读取该字段的Agent/命令

Steps

操作步骤

1. Update init.md Templates

1. 更新init.md模板

File:
plugins/majestic-engineer/commands/workflows/init.md
Add field to ALL 4 templates (Rails, Python, Node, Generic). Find the appropriate section and add:
yaml
new_field: value              # Comment explaining purpose
Or 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
  - item2

2. Bump Schema Version

2. 升级架构版本

File:
plugins/majestic-engineer/config-schema-version
Increment:
1.1
1.2
文件路径:
plugins/majestic-engineer/config-schema-version
版本号递增:
1.1
1.2

3. Update config-reader.md

3. 更新config-reader.md

File:
plugins/majestic-engineer/agents/config-reader.md
A) 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.md
A) 添加至版本更新日志表格:
markdown
| 1.2 | `new_field` | 描述 |
B) 更新迁移YAML块(在“过时的config_version”章节):
yaml
new_field: default_value

4. Bump Plugin Versions

4. 升级插件版本

Files:
  • plugins/majestic-engineer/.claude-plugin/plugin.json
    :
    3.15.0
    3.16.0
  • .claude-plugin/marketplace.json
    : Update majestic-engineer entry version
涉及文件:
  • plugins/majestic-engineer/.claude-plugin/plugin.json
    :版本从
    3.15.0
    3.16.0
  • .claude-plugin/marketplace.json
    :更新majestic-engineer条目版本

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
undefined
bash
undefined

Count 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
undefined
grep "new_field" plugins/majestic-engineer/agents/config-reader.md
undefined