kata-set-profile

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese
<objective> Switch the model profile used by Kata agents. This controls which Claude model each agent uses, balancing quality vs token spend. </objective> <profiles> | Profile | Description | | ------------ | -------------------------------------------------------------- | | **quality** | Opus everywhere except read-only verification | | **balanced** | Opus for planning, Sonnet for execution/verification (default) | | **budget** | Sonnet for writing, Haiku for research/verification | </profiles> <process>
<objective> 切换Kata agents所使用的模型配置文件。这将控制每个agent使用的Claude模型,在质量与令牌消耗之间取得平衡。 </objective> <profiles> | 配置文件 | 说明 | | ------------ | -------------------------------------------------------------- | | **quality** | 除只读验证外,所有场景均使用Opus | | **balanced** | 规划使用Opus,执行/验证使用Sonnet(默认) | | **budget** | 写作使用Sonnet,研究/验证使用Haiku | </profiles> <process>

1. Validate argument

1. 验证参数

if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]:
  Error: Invalid profile "$ARGUMENTS.profile"
  Valid profiles: quality, balanced, budget
  STOP
if $ARGUMENTS.profile not in ["quality", "balanced", "budget"]:
  Error: Invalid profile "$ARGUMENTS.profile"
  Valid profiles: quality, balanced, budget
  STOP

2. Check for project

2. 检查项目

bash
ls .planning/config.json 2>/dev/null
If no
.planning/
directory:
Error: No Kata project found.
Run /kata-new-project first to initialize a project.
bash
ls .planning/config.json 2>/dev/null
如果不存在
.planning/
目录:
错误:未找到Kata项目。
请先运行/kata-new-project初始化项目。

3. Update config.json

3. 更新config.json

Read current config:
bash
cat .planning/config.json
Update
model_profile
field (or add if missing):
json
{
  "model_profile": "$ARGUMENTS.profile"
}
Write updated config back to
.planning/config.json
.
读取当前配置:
bash
cat .planning/config.json
更新
model_profile
字段(若不存在则添加):
json
{
  "model_profile": "$ARGUMENTS.profile"
}
将更新后的配置写回
.planning/config.json

4. Confirm

4. 确认

✓ Model profile set to: $ARGUMENTS.profile

Agents will now use:
[Show table from model-profiles.md for selected profile]

Next spawned agents will use the new profile.
</process> <examples>
Switch to budget mode:
/kata-set-profile budget

✓ Model profile set to: budget

Agents will now use:
| Agent         | Model  |
| ------------- | ------ |
| kata-planner  | sonnet |
| kata-executor | sonnet |
| kata-verifier | haiku  |
| ...           | ...    |
Switch to quality mode:
/kata-set-profile quality

✓ Model profile set to: quality

Agents will now use:
| Agent         | Model  |
| ------------- | ------ |
| kata-planner  | opus   |
| kata-executor | opus   |
| kata-verifier | sonnet |
| ...           | ...    |
</examples>
✓ 模型配置文件已设置为:$ARGUMENTS.profile

Agents现在将使用:
[显示所选配置文件对应的model-profiles.md中的表格]

下次启动的agents将使用新的配置文件。
</process> <examples>
切换至budget模式:
/kata-set-profile budget

✓ Model profile set to: budget

Agents will now use:
| Agent         | Model  |
| ------------- | ------ |
| kata-planner  | sonnet |
| kata-executor | sonnet |
| kata-verifier | haiku  |
| ...           | ...    |
切换至quality模式:
/kata-set-profile quality

✓ Model profile set to: quality

Agents will now use:
| Agent         | Model  |
| ------------- | ------ |
| kata-planner  | opus   |
| kata-executor | opus   |
| kata-verifier | sonnet |
| ...           | ...    |
</examples>