feat: 创建与更新技能支持独立长期指令 (#211)

创建与更新技能增加可选 instructions 字符串:普通 Markdown
全文、省略保留、字符串整体替换、空字符串清空。内容归属明确为人格、原则、长期指令与技能方法;既有 AgentFS
直接编辑遵循实际权限与审批。create-agent 2.8.0 / update-agent 3.4.0 的最低客户端为
10.0.179,双语正文与 sidecar 同步。

Add optional plain-Markdown instructions to Agent creation and update
guidance, including preserve/replace/clear semantics and clear content
ownership. Existing direct AgentFS editing retains its permission and
approval rules. Both localized bodies and catalog sidecars require
DesireCore 10.0.179.

验证 / Validation:目录与 i18n 校验 0 errors;严格 sidecar 全覆盖检查 0
errors(既有证据警告保留);双语由人工同步并按真实 source body 计算 freshness
hash。依据用户明确授权,本次以全树凭据形状扫描、Git/PR 元数据扫描与客户中立性人工审阅代替缺失的私有敏感词表检查;凭据形状扫描 740
文件无命中,不声称执行私有词表匹配。
This commit is contained in:
2026-10-07 21:03:40 -07:00
committed by GitHub
parent 8f6aa67c96
commit 13c72eba29
6 changed files with 54 additions and 32 deletions

View File

@@ -2,8 +2,8 @@
license: "MIT"
name: create-agent
description: >-
通过多轮对话收集需求,调用 ManageAgent 内置工具创建新的 AgentFS v2 智能体,支持自定义 persona 和 principles。Use when 用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。
version: 2.7.0
通过多轮对话收集需求,调用 ManageAgent 内置工具创建新的 AgentFS v2 智能体,支持自定义 persona、principles 和可选 instructions。Use when 用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。
version: 2.8.0
compatibility: "DesireCore ManageAgent; optional avatar generation requires a configured image provider under its own terms and quota, with separate charges; unavailable generation retains the existing avatar."
type: meta
risk_level: low
@@ -15,7 +15,7 @@ tags:
- meta
metadata:
author: desirecore
updated_at: '2026-10-03'
updated_at: '2026-10-08'
i18n:
default_locale: en-US
source_locale: zh-CN
@@ -26,17 +26,17 @@ metadata:
name: 创建智能体
short_desc: 通过自然语言对话收集需求,一键创建专业化数字智能体
description: >-
通过多轮对话收集需求,调用 ManageAgent 内置工具创建新的 AgentFS v2 智能体,支持自定义 persona 和 principles。Use when 用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。
通过多轮对话收集需求,调用 ManageAgent 内置工具创建新的 AgentFS v2 智能体,支持自定义 persona、principles 和可选 instructions。Use when 用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。
body: ./SKILL.zh-CN.md
source_hash: sha256:7ffb7a362c26a91e
source_hash: sha256:3c0613f2d9e9479a
translated_by: human
en-US:
name: Create Agent
short_desc: Collect requirements through natural-language conversation and create a specialized digital Agent in one step
description: >-
Collect requirements through multi-turn conversation and call the ManageAgent builtin tool to create a new AgentFS v2 Agent, with customizable persona and principles. Use when the user asks to create a new Agent, raise a domain assistant, or quickly produce a governable Agent from a template. Optional avatar generation requires a configured image service under provider terms/quota and separate charges.
Collect requirements through multi-turn conversation and call the ManageAgent builtin tool to create a new AgentFS v2 Agent, with customizable persona, principles and optional standing instructions. Use when the user asks to create a new Agent, raise a domain assistant, or quickly produce a governable Agent from a template. Optional avatar generation requires a configured image service under provider terms/quota and separate charges.
body: ./SKILL.md
source_hash: sha256:7ffb7a362c26a91e
source_hash: sha256:3c0613f2d9e9479a
translated_by: human
market:
icon: >-
@@ -58,7 +58,7 @@ market:
verified: true
compatible_agents: []
channel: latest
required_client_version: 10.0.108
required_client_version: 10.0.179
---
# create-agent skill
@@ -69,7 +69,7 @@ Collect requirements through natural-language conversation and call the ManageAg
## L1: Overview
Meta-skill: gather requirements over multi-turn conversation → generate persona/principles → land via `ManageAgent(action='create')`. Use it to raise a domain specialist (legal advisor, financial analyst), deploy a customized business Agent quickly, or produce a prototype from a template. The created repo conforms to the AgentFS v2 spec and is version-managed by git (governable, traceable). Its value is what the tool can't give: domain-tailored persona/principles generation + a pre-create preview confirmation.
Meta-skill: gather requirements over multi-turn conversation → generate persona/principles and standing instructions → land via `ManageAgent(action='create')`. Use it to raise a domain specialist (legal advisor, financial analyst), deploy a customized business Agent quickly, or produce a prototype from a template. The created repo conforms to the AgentFS v2 spec and is version-managed by git (governable, traceable). Its value is what the tool can't give: domain-tailored persona/principles generation + a pre-create preview confirmation.
## L2: Detailed Spec
@@ -87,9 +87,10 @@ Trigger (any): user explicitly says "create an Agent / make me an assistant"; de
### Stage 3: Content Generation
Organize persona and principles as structured fields (do not emit raw markdown; present field-by-field). Leave uncollected fields empty for the system to fill with defaults:
Organize persona, principles and optional standing instructions as structured fields (do not emit raw markdown; present field-by-field). Leave uncollected fields empty for the system to fill with defaults:
- **persona**: L0 one-sentence core identity; L1 `role` / `personality` (array of trait tags) / `communication_style`; L2 specialty, values, decision preferences (free-form).
- **instructions**: optional plain Markdown string for stable responsibilities, default work strategies and delivery requirements; the full text is loaded without L0/L1/L2 parsing or truncation. Detailed procedures and reference material belong to skills. If only the name is known, omit this file.
- **principles**: L0 one-sentence top principle; L1 `must_do` / `must_not` (safety red lines) / `priority`; L2 governance principles, escalation rules (free-form).
**Domain matching reference** (recommend personality and red lines by domain):
@@ -103,7 +104,7 @@ Organize persona and principles as structured fields (do not emit raw markdown;
### Stage 4: User Confirmation
Present the preview in natural language / tables (name, description, persona, principles; **no raw markdown source**), e.g.:
Present the preview in natural language / tables (name, description, persona, principles, and optional standing instructions; **no raw markdown source**), e.g.:
> About to create "Legal Advisor Assistant" — focused on contract review and legal risk assessment.
> **Persona**: digital legal advisor; professional, rigorous, prudent; uses legal terms accurately with plain-language explanations.
@@ -122,7 +123,8 @@ ManageAgent({
"name": "Legal Advisor Assistant",
"description": "A digital Agent focused on contract review and legal risk assessment",
"persona": { "L0": "…", "L1": { "role": "…", "personality": ["professional","rigorous","prudent"], "communication_style": "…" } },
"principles": { "L0": "…", "L1": { "must_do": ["…"], "must_not": ["…"], "priority": "user safety > accuracy > efficiency" } }
"principles": { "L0": "…", "L1": { "must_do": ["…"], "must_not": ["…"], "priority": "user safety > accuracy > efficiency" } },
"instructions": "# Responsibilities\nDescribe stable duties here.\n\n## Delivery requirements\nInclude the result location and evidence."
})
```
@@ -189,3 +191,5 @@ Present in a user-friendly way (no internal paths / technical details): confirm
- AgentFS structure, troubleshooting, and protected paths: see `_agentfs-background.md` and `_protected-paths.yaml`.
- Always create via `ManageAgent`; never use curl / HTTP or write AgentFS directories directly. Requires client ≥ 10.0.90.
Keep role/expression in persona, boundaries in principles, stable duties in instructions, and methods in skills. Never place private user or team data in distributable Agent files.

View File

@@ -8,7 +8,7 @@
## L1:概述
元技能:多轮对话收集需求 → 生成 persona/principles → `ManageAgent(action='create')` 落地。用于为用户培养专业领域数字助手(法律顾问、财务分析师)、企业快速部署定制业务 Agent、或基于模板快速创建原型。创建的仓库符合 AgentFS v2 规范、由 git 管理版本(可治理、可追溯)。价值在工具给不了的部分:领域化的人格/原则生成 + 创建前的预览确认。
元技能:多轮对话收集需求 → 生成 persona/principles 与可选长期指令 → `ManageAgent(action='create')` 落地。用于为用户培养专业领域数字助手(法律顾问、财务分析师)、企业快速部署定制业务 Agent、或基于模板快速创建原型。创建的仓库符合 AgentFS v2 规范、由 git 管理版本(可治理、可追溯)。价值在工具给不了的部分:领域化的人格/原则生成 + 创建前的预览确认。
## L2:详细规范
@@ -26,9 +26,10 @@
### 阶段 3:内容生成
按结构化字段组织 persona 与 principles(不要输出 raw markdown,按字段整理后再展示)。未收集到的字段留空,由系统补全默认:
人格与原则按既有结构化字段组织;长期指令使用普通 Markdown 字符串,先以自然语言说明职责和交付要求。未收集到的字段留空,由系统补全默认:
- **persona**:L0 一句话核心身份;L1 `role`(角色定位)/ `personality`(特征标签数组)/ `communication_style`(沟通风格);L2 专业领域、价值观、决策偏好(free-form)。
- **instructions**:可选普通 Markdown 字符串,维护稳定职责、工作策略与交付契约,全文加载,不使用 L0/L1/L2 或自动截断。详细方法、长 SOP、案例与资料放入技能;只知道名称时省略,不虚构职责。
- **principles**:L0 一句话最高原则;L1 `must_do` / `must_not`(安全红线)/ `priority`(优先级排序);L2 治理原则、升级规则(free-form)。
**领域匹配参考**(据 domain 推荐人格与红线):
@@ -42,7 +43,7 @@
### 阶段 4:用户确认
以自然语言/表格向用户展示预览(名称、描述、人格设定、行为原则;**不展示 raw markdown 源码**),例如:
以自然语言/表格向用户展示预览(名称、描述、人格设定、行为原则、可选长期指令;**不展示 raw markdown 源码**),例如:
> 即将创建「法律顾问小助手」——专注合同审查与法律风险评估。
> **人格**:数字法律顾问;专业、严谨、审慎;准确用法律术语并给通俗解释。
@@ -61,7 +62,8 @@ ManageAgent({
"name": "法律顾问小助手",
"description": "专注于合同审查和法律风险评估的数字智能体",
"persona": { "L0": "…", "L1": { "role": "…", "personality": ["专业","严谨","审慎"], "communication_style": "…" } },
"principles": { "L0": "…", "L1": { "must_do": ["…"], "must_not": ["…"], "priority": "用户安全 > 准确性 > 效率" } }
"principles": { "L0": "…", "L1": { "must_do": ["…"], "must_not": ["…"], "priority": "用户安全 > 准确性 > 效率" } },
"instructions": "# 职责\n写明稳定负责的工作。\n\n## 交付要求\n给出成果位置与必要证据。"
})
```
@@ -128,3 +130,5 @@ ManageAgent({
- AgentFS 结构、排查要点与受保护路径详见 `_agentfs-background.md` 与 `_protected-paths.yaml`。
- 一律经 `ManageAgent` 创建,禁止 curl / HTTP 或直接写 AgentFS 目录;需客户端 ≥ 10.0.90。
角色与表达归人格,边界归原则,稳定职责归长期指令,方法归技能。用户或团队私有数据不得写入可分发 Agent 本体。

View File

@@ -11,12 +11,12 @@
"zh-CN": {
"name": "创建智能体",
"summary": "通过自然语言对话收集需求,一键创建专业化数字智能体",
"description": "通过多轮对话收集需求,调用 ManageAgent 内置工具创建新的 AgentFS v2 智能体,支持自定义 persona 和 principles。Use when 用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。"
"description": "通过多轮对话收集需求,调用 ManageAgent 内置工具创建新的 AgentFS v2 智能体,支持自定义 persona、principles 和可选 instructions。Use when 用户要求创建新智能体、培养某领域助手、或快速基于模板生成可治理 Agent。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。"
},
"en-US": {
"name": "Create Agent",
"summary": "Collect requirements through natural-language conversation and create a specialized digital Agent in one step",
"description": "Collect requirements through multi-turn conversation and call the ManageAgent builtin tool to create a new AgentFS v2 Agent, with customizable persona and principles. Use when the user asks to create a new Agent, raise a domain assistant, or quickly produce a governable Agent from a template. Optional avatar generation requires a configured image service under provider terms/quota and separate charges."
"description": "Collect requirements through multi-turn conversation and call the ManageAgent builtin tool to create a new AgentFS v2 Agent, with customizable persona, principles and optional standing instructions. Use when the user asks to create a new Agent, raise a domain assistant, or quickly produce a governable Agent from a template. Optional avatar generation requires a configured image service under provider terms/quota and separate charges."
}
},
"category": "productivity",
@@ -28,13 +28,13 @@
},
"release": {
"state": "known",
"version": "2.7.0",
"version": "2.8.0",
"versionScheme": "semver"
},
"timestamps": {
"catalogUpdatedAt": {
"state": "known",
"value": "2026-10-03",
"value": "2026-10-08",
"precision": "day"
},
"releasePublishedAt": {
@@ -65,7 +65,7 @@
"platforms": {
"state": "unknown"
},
"requiredClientVersion": "10.0.108"
"requiredClientVersion": "10.0.179"
},
"spec": {
"kind": "skill",

View File

@@ -4,7 +4,7 @@ name: update-agent
description: >-
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent
行为、安装/卸载技能、调整配置、回滚变更或修订规则。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。
version: 3.3.0
version: 3.4.0
compatibility: "DesireCore ManageAgent; optional avatar generation requires a configured image provider under its own terms and quota, with separate charges; unavailable generation retains the existing avatar."
type: meta
risk_level: low
@@ -16,7 +16,7 @@ tags:
- meta
metadata:
author: desirecore
updated_at: '2026-10-03'
updated_at: '2026-10-08'
i18n:
default_locale: en-US
source_locale: zh-CN
@@ -29,7 +29,7 @@ metadata:
description: >-
安全更新现有智能体的配置、人格、原则、技能与记忆,输出可审阅 diff 并在确认后应用与提交。Use when 用户要求修改 Agent 行为、安装/卸载技能、调整配置、回滚变更或修订规则。可选头像生成需配置图像服务,适用供应商条款/额度及独立费用。
body: ./SKILL.zh-CN.md
source_hash: sha256:b2c95e40c280b162
source_hash: sha256:b20d14b1dc7d4afb
translated_by: human
en-US:
name: Update Agent
@@ -37,7 +37,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. Optional avatar generation requires a configured image service under provider terms/quota and separate charges.
body: ./SKILL.md
source_hash: sha256:b2c95e40c280b162
source_hash: sha256:b20d14b1dc7d4afb
translated_by: human
market:
icon: >-
@@ -59,7 +59,7 @@ market:
verified: true
compatible_agents: []
channel: latest
required_client_version: 10.0.108
required_client_version: 10.0.179
---
# update-agent skill
@@ -76,7 +76,7 @@ Meta-skill: recognize the edit intent → generate a reviewable diff → user co
### Update Types and the Two Paths
Structured fields always go through `ManageAgent(action='update')` (whitelist + validation + merge semantics); free-form files (memory/skills/tools) are edited directly with Read/Write:
ManageAgent provides whitelist validation, structured field merging and receipts. Existing AgentFS files also support Read/Write/Edit under the same permissions and approval policy; direct editing is not a bypass. Free-form content remains in its owning file:
| User intent | Means | Target (risk) |
| --- | --- | --- |
@@ -86,6 +86,7 @@ Structured fields always go through `ManageAgent(action='update')` (whitelist +
| Declarative avatar | `ManageAgent(update, config={avatar:{...}})` | agent.json (low) |
| Image avatar | `ManageAgent(update, avatarImage={...})` | avatar (med) |
| Personality/style | `ManageAgent(update, persona=... or markdown)` | persona.md (med) |
| Stable duties/delivery | `ManageAgent(update, instructions="full Markdown")` or Read/Write/Edit | instructions.md (existing approval policy) |
| Behavior rules | `ManageAgent(update, principles=... or markdown)` | principles.md (high) |
| Install/uninstall skill | Read/Write | `skills/` (low/med) |
| Add memory | Read/Write | `memory/` (low) |
@@ -176,3 +177,9 @@ Trigger: user says "undo / roll back / restore the previous settings". Flow:
Check readiness through the current governed tool catalog: use `ManageCompute(action="list")` for enabled/credential status and `InspectModels(action="list", serviceType="image_gen")` for an eligible image model. Neither listing proves upstream quota or call success; follow provider terms/quota and separate charges. Do not read keys or use local HTTP. If these tools are absent, follow the configuring-compute skill's governed GUI observation. If generation is known unavailable, skip regeneration, preserve the current avatar and report the limitation. Unknown readiness is not success; inspect the background task result and do not fabricate completion.
Users may freely change the avatar's appearance, style, background, upload an existing image, or remove it with `avatarImage.remove:true`. On clients exposing `avatarGeneration`, pass a new generation request to `ManageAgent(action="update", avatarGeneration={prompt:"user requirements"})`; `transparentBackground:false` preserves a requested background and `enabled:false` cancels pending generation. Direct image replacement/removal invalidates older asynchronous results. The default automatic style is transparent and photorealistic; explicit user choices take precedence. `avatarImage.requireTransparency:true` opts into strict transparency checks; do not impose that check on a user who requested a background. Inspect `ManageAgent(get)` for task failures, and do not automatically retry paid requests. Older clients must use only fields in their actual tool schema.
## Standing instructions and content ownership
Persona owns identity and expression; principles own boundaries and tradeoffs; instructions.md owns stable duties, work strategies and delivery requirements; skills own detailed methods. instructions accepts only a full Markdown string: omit to preserve, pass a string to replace, or an empty string to clear. Read the original before editing and do not copy the same requirement into several files. Read/Write/Edit are also supported for existing files with the same permission, approval, optimistic-lock and audit rules. Saved instructions are read for new input, explicit continuation or restoration; an already accepted tool loop keeps its snapshot. Previously authorized work does not require another conversational confirmation; actual tool approval policy still applies.
Keep role/expression in persona, boundaries in principles, stable duties in instructions, and methods in skills. Never place private user or team data in distributable Agent files.

View File

@@ -14,7 +14,7 @@
### 更新类型与两条路径
结构化字段一律经 `ManageAgent(action='update')`(白名单 + 校验 + 合并语义);记忆/技能/工具等自由格式文件用 Read/Write 直接编辑:
ManageAgent 提供白名单校验、结构化字段合并和回执;既有 AgentFS 文件也支持 Read/Write/Edit,仍遵循相同权限与审批策略,直接编辑不是绕过安全边界。自由格式内容按归属维护:
| 用户意图 | 手段 | 目标(风险) |
| --- | --- | --- |
@@ -24,6 +24,7 @@
| 声明头像 | `ManageAgent(update, config={avatar:{...}})` | agent.json(低) |
| 图片头像 | `ManageAgent(update, avatarImage={...})` | avatar(中) |
| 性格/风格 | `ManageAgent(update, persona=... 或 markdown)` | persona.md(中) |
| 稳定职责/交付要求 | `ManageAgent(update, instructions="完整 Markdown")` 或 Read/Write/Edit | instructions.md(沿既有审批策略) |
| 行为规则 | `ManageAgent(update, principles=... 或 markdown)` | principles.md(高) |
| 安装/卸载技能 | Read/Write | `skills/`(低/中) |
| 添加记忆 | Read/Write | `memory/`(低) |
@@ -62,7 +63,7 @@
不要调 HTTP API(实例鉴权后不可达),不要直接操作 git(后端自动提交)。按目标分两路:
**路径 A · 结构化字段 → ManageAgent(强制;禁止直接 Write `agent.json` / `persona.md` / `principles.md`)**
**路径 A · 经 ManageAgent 便利接口校验并更新**
字段与约束:`name`(1–50 字符)、`description`(≤200)、`config.llm` / `config.avatar`(增量浅合并)、`avatarImage`、`smartRouting`、`persona` / `principles`(结构化对象 `{L0, L1:{...}, L2}` 或 markdown 字符串)。调用:
@@ -114,3 +115,9 @@ ManageAgent(action='update', id='<agent-id>', avatarImage={ source: "dc-media://
通过当前受治理工具目录检查就绪状态:用 `ManageCompute(action="list")` 查看启用/凭据状态,用 `InspectModels(action="list", serviceType="image_gen")` 查看可用图像模型。列表不证明上游额度或调用成功,遵守供应商条款/额度及独立费用;不读取密钥,不用本机 HTTP 旁路。缺少这些工具时,遵循 configuring-compute 技能的受治理 GUI 观察流程。已知生成不可用时,跳过重新生成,保留当前头像并报告限制。就绪状态未知不代表成功,检查后台任务结果,不伪造完成。
用户可自由改变头像外貌、风格、背景、上传已有图片或通过 `avatarImage.remove:true` 移除。提供 `avatarGeneration` 的新客户端可用 `ManageAgent(action="update", avatarGeneration={prompt:"用户要求"})` 重新生成;明确要求背景用 `transparentBackground:false`,`enabled:false` 取消未完成生成。后续设图/移除优先,旧异步结果不会覆盖用户新选择。透明真人风格只作为默认;明确用户要求优先。`avatarImage.requireTransparency:true` 可显式启用透明度检查,不对需要背景的用户强制该检查。用 `ManageAgent(get)` 查看失败,不自动重复付费请求;旧客户端只用实际 Schema 声明的字段。
## 长期指令与内容归属
人格负责身份与表达,原则负责边界与取舍,instructions.md 负责稳定职责、工作策略与交付要求,技能负责详细方法。instructions 只接受完整 Markdown 字符串:省略保留,字符串整份替换,空字符串清空。修改前先读原文,同一要求不复制到多份文件。既有文件也支持 Read/Write/Edit,仍遵循权限、审批、乐观锁和审计。保存后在新输入、显式继续或恢复时读取,同一已接纳工具循环保留快照。用户已明确授权的工作不重复要求对话确认,实际工具审批策略仍适用。
角色与表达归人格,边界归原则,稳定职责归长期指令,方法归技能。用户或团队私有数据不得写入可分发 Agent 本体。

View File

@@ -28,13 +28,13 @@
},
"release": {
"state": "known",
"version": "3.3.0",
"version": "3.4.0",
"versionScheme": "semver"
},
"timestamps": {
"catalogUpdatedAt": {
"state": "known",
"value": "2026-10-03",
"value": "2026-10-08",
"precision": "day"
},
"releasePublishedAt": {
@@ -65,7 +65,7 @@
"platforms": {
"state": "unknown"
},
"requiredClientVersion": "10.0.108"
"requiredClientVersion": "10.0.179"
},
"spec": {
"kind": "skill",