mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-07-23 03:23:41 +08:00
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:
@@ -35,7 +35,7 @@ metadata:
|
||||
description: >-
|
||||
Safely update an existing Agent's config, persona, principles, skills, and memory, producing reviewable diffs that are applied and committed only after confirmation. Use when the user asks to modify Agent behavior, install/uninstall skills, adjust config, roll back changes, or revise rules.
|
||||
body: ./SKILL.md
|
||||
source_hash: sha256:a58c60b086945340
|
||||
source_hash: sha256:a920af860d6f6a19
|
||||
translated_by: human
|
||||
translated_at: '2026-05-03'
|
||||
market:
|
||||
@@ -200,6 +200,8 @@ diff_metadata:
|
||||
|
||||
Apply the change by reading and writing files directly through AgentFS. **Do not call HTTP APIs, and do not operate Git directly** (version management is handled automatically by the backend).
|
||||
|
||||
> **Renaming an Agent's display name — you MUST edit two files to keep them in sync.** If the user wants to change the Agent's **display name** (e.g. "rename X to Y"), use the Edit tool to update **both**: (1) the `name` field in `agent.json`, and (2) the first-line title heading (`# Name`) in `persona.md`. Editing only one leaves the display name and the persona title out of sync. **Never claim the rename is done without actually editing the files** — if no edit runs, nothing changes on disk and the Agent list will not refresh.
|
||||
|
||||
**AgentFS root directory**: `${DESIRECORE_ROOT}/agents/<agentId>/`
|
||||
|
||||
**Read file**: Use the `cat` command to read the current contents of the target file.
|
||||
@@ -246,6 +248,7 @@ git show <commit>:persona.md
|
||||
|
||||
| User Intent | Target File | AgentFS Path |
|
||||
| ---------------------------- | --------------- | ---------------------------------------------- |
|
||||
| **Rename (display name)** | `agent.json` **+** `persona.md` | Edit BOTH: `name` in `agent.json` AND the `# Title` first line in `persona.md` |
|
||||
| Modify personality/style | `persona.md` | `${DESIRECORE_ROOT}/agents/<agentId>/persona.md` |
|
||||
| Modify behavioral rules | `principles.md` | `${DESIRECORE_ROOT}/agents/<agentId>/principles.md` |
|
||||
| Install/uninstall skills | `skills/` | `${DESIRECORE_ROOT}/agents/<agentId>/skills/` |
|
||||
|
||||
@@ -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/` |
|
||||
|
||||
Reference in New Issue
Block a user