Commit Graph

4 Commits

Author SHA1 Message Date
d52e61e041 perf(skills): 智能体 CRUD 四技能提示词改写压缩(功能不变,~65%) (#56)
## 摘要 / Summary

### 中文

四个智能体管理技能(create/update/delete/discover-agent)改用 `ManageAgent`
内置工具后,正文与工具契约大量重叠——ManageAgent 的 description + params 已**常驻每次 query
的上下文**,声明了五个 action 语义、参数约束、权限硬边界、错误语义、字段级合并、确认行为、list/get
返回格式;技能正文里再复述即冗余。本次对四技能做**强改写·语境融合**压缩:

- 与工具契约重复的说明(参数/权限/错误码/确认行为/成功返回话术)**改写融入对应流程步骤**(如错误处理表 → 阶段一句、确认行为 →
阶段一句),不再照抄、不再表格化。
- 装饰性 ASCII 流程框图 → 一行文字流程;update 内部两张重复更新表 → 合并;YAML
元数据块(diff_metadata/context_handoff)融入流程;冗长示例(create 三份 JSON、update 附录 4
示例、discover ASCII 卡片)就地精简为代表示意。
- **不外置 references、不净删除任何内容**:所有决策/领域/交互意图完整保留——领域匹配表、persona/principles
的 L0/L1/L2 生成规范、update 两路径分流与字段级合并 vs 整体替换、防幻觉改名、回滚流程、discover
需求维度与无匹配衔接 create 等核心一字未丢。

zh 正文合计 **26542 → 9196 字符(降 ~65%)**;中英双份同步改写、逐段对齐,重算 i18n
source_hash(validate-i18n 通过)。版本 create 2.5.1 / update 3.1.2 / delete
2.5.1 / discover 2.6.1,manifest 1.2.12。

### English

After the four agent-management skills adopted the `ManageAgent` builtin
tool, their bodies heavily duplicated the tool contract — ManageAgent's
description + params are **resident in every query's context** (action
semantics, param constraints, permission hard-boundaries, error
semantics, field-level merge, confirmation behavior, list/get return
formats). This PR compresses all four via **aggressive rewrite +
contextual fusion**: contract-duplicating text is rewritten into the
relevant flow steps (not copied, not tabularized), decorative ASCII flow
boxes become one-line text, update's two duplicate tables are merged,
YAML metadata blocks are folded in, and long examples are trimmed in
place to representative sketches. **No references externalization, no
net deletion** — every decision/domain/interaction intent is preserved
(domain matching table, persona/principles L0/L1/L2 generation spec,
update's two-path split and field-level-merge-vs-full-replace,
anti-hallucination rename, rollback flow, discover's need dimensions and
create hand-off). zh bodies total **26542 → 9196 chars (~65% down)**;
both locales rewritten and aligned, i18n source hashes recomputed
(validate-i18n passes). Versions bumped, manifest 1.2.12.
2026-07-19 15:16:43 +08:00
1c00b8e6c8 feat(skills): 智能体 CRUD 四技能改经 ManageAgent 内置工具(实例鉴权适配) (#52)
## 摘要 / Summary

### 中文

主仓库 desirecore#1225 新增 `ManageAgent` 内置工具后,智能体 CRUD 四技能从"调本机 HTTP
API/curl"改写为调用该工具(实例鉴权上线后 Agent 直接访问本机 API 会 401):

- **create-agent 2.5.0**:`POST /api/agents` →
`ManageAgent(action='create', ...)`;补充保留标识(core/desirecore)拒创、config 仅允许
llm 白名单的错误处理
- **delete-agent 2.5.0**:`DELETE /api/agents/:id` →
`action='delete'`(工具层强制用户确认);错误处理改为工具拒绝语义(核心智能体/自删/活跃状态);补团队级联说明
- **discover-agent 2.6.0**:`GET /api/agents(/:id)` →
`action='list'/'get'`
- **update-agent
3.1.0**:结构化字段(name/description/llm/persona/principles)改经
`action='update'`(白名单+schema 校验+字段级合并语义),自由格式文件仍 Read/Write

四技能声明 `market.required_client_version:
10.0.90`,老客户端在市场端被门控禁装。中英双语正文同步改写,i18n source_hash 已重算(validate-i18n.py
通过);manifest 1.2.10。

### English

After desirecore#1225 shipped the `ManageAgent` builtin tool, the four
agent-CRUD skills are rewritten from local-HTTP-API/curl instructions to
tool calls (direct local API access now returns 401 under instance
auth). Each skill declares `market.required_client_version: 10.0.90` so
older clients are gated from installing. Both locales are rewritten in
sync and i18n source hashes recomputed (validate-i18n.py passes);
manifest bumped to 1.2.10.

主仓库回填:合并后将在 desirecore 主仓库执行 `npm run sync-market` 生成新的
defaults/market.zip 并单独提 PR。
2026-07-18 23:05:18 +08:00
0e013567d3 refactor: 四个全局技能复盘优化(v2.4.0)
P0 结构性修复:
- update-agent 阶段 5 统一为 HTTP API,移除所有 Git 操作示例
- create-agent 响应格式与实际 API 对齐
- delete-agent 合并"前置检查"与"错误处理"

P1 一致性修复:
- 统一 frontmatter 字段顺序、tags 英文化
- 提取 AgentFS 背景知识到共享 _agentfs-background.md
- 受保护路径统一引用 _protected-paths.yaml

P2 缺失补充:
- discover-agent 补充"了解更多"API 实现
- update-agent 新增 Persona 修改示例
- create-agent 补充"修改"分支交互流程
- delete-agent 补充停止 Agent 方式

P3 精简优化:
- 精简版本回滚、删除范围、匹配算法描述

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 22:47:09 +08:00
b8ba404577 refactor: 消灭 skill.json,SKILL.md 成为唯一真相源
- 将 skill.json 中的 icon、shortDesc、category、maintainer、
  compatibleAgents、channel 迁移到 SKILL.md frontmatter 的 market 段
- 将 skill.json 中的 changelog 字段提取为独立 CHANGELOG.md
- 删除所有 skill.json(downloads/rating/ratingCount 等虚假数据一并移除)
- 版本号统一从 SKILL.md frontmatter version 读取

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-27 20:38:00 +08:00