docs(update-agent): 改名改用 Edit 同步 agent.json 与 persona.md 标题 (#43)

## 变更 / Changes

update-agent 技能:纯改名场景改为用 **Edit 工具同时更新两个文件**——`agent.json` 的 `name` 字段 与
`persona.md` 的首行标题(`# 名称`),避免两者脱节;并强调不实际编辑文件不得声称已改名。

The update-agent skill now instructs: for a pure display-name change,
use the **Edit tool to update both files** — the `name` field in
`agent.json` and the first-line title heading (`# Name`) in `persona.md`
— so the display name and persona title never fall out of sync. Also
emphasizes never claiming a rename is done without actually editing the
files.

## 背景 / Context

此前改名只改了 `agent.json` 的 name,`persona.md`
标题残留旧名(显示名与人格文档脱节);且模型有时只口头声称完成而不真正落盘。本改动通过技能引导修正这两点。

Previously renaming only touched `agent.json`'s name while
`persona.md`'s title kept the old name (desync), and the model would
sometimes claim completion without actually writing. This skill guidance
fixes both.

## 改动范围 / Scope

- `skills/update-agent/SKILL.md`(+3)
- `skills/update-agent/SKILL.zh-CN.md`(+3)
- 纯文档/技能引导改动,version 保持 3.0.4 不变

Co-authored-by: 张馨元 <zhangxy@iynss.com>
This commit is contained in:
Zxy-y
2026-07-07 22:30:26 +08:00
committed by GitHub
parent a4718379d9
commit a59f223e56
2 changed files with 7 additions and 1 deletions

View File

@@ -140,6 +140,8 @@ diff_metadata:
通过 AgentFS 直接读写文件完成变更。**不要调用 HTTP API不要直接操作 Git**(版本管理由后端自动处理)。
> **修改智能体显示名称 → 必须用 Edit 工具同时改两个文件保持一致。** 若用户要改 Agent 的**显示名称**(如"把 X 改名为 Y"),用 Edit 工具**同时**更新两处:①`agent.json` 的 `name` 字段;②`persona.md` 的首行标题(`# 名称`)。只改其中一个会导致显示名与人格文档标题脱节。**绝不要在没有实际编辑文件的情况下声称已改名**——不真正编辑文件则磁盘不变、智能体列表也不会刷新。
**AgentFS 根目录**`${DESIRECORE_ROOT}/agents/<agentId>/`
**读取文件**:使用 `cat` 命令读取目标文件当前内容。
@@ -186,6 +188,7 @@ git show <commit>:persona.md
| 用户意图 | 目标文件 | AgentFS 路径 |
| -------------- | --------------- | ---------------------------------------------- |
| **改名(显示名称)** | `agent.json` **+** `persona.md` | 用 Edit 同时改:`agent.json` 的 name 字段 + `persona.md` 首行 `# 标题` |
| 修改性格/风格 | `persona.md` | `${DESIRECORE_ROOT}/agents/<agentId>/persona.md` |
| 修改行为规则 | `principles.md` | `${DESIRECORE_ROOT}/agents/<agentId>/principles.md` |
| 安装/卸载技能 | `skills/` | `${DESIRECORE_ROOT}/agents/<agentId>/skills/` |