mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-07-23 07:03:51 +08:00
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.
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [2.5.1] - 2026-07-19
|
||||
|
||||
- 提示词改写压缩,功能不变——与 ManageAgent 工具契约重复的说明、装饰框图、重复表改写融入流程,示例就地精简;不外置、不净删,意图全保留。
|
||||
|
||||
## [2.5.0] - 2026-07-18
|
||||
|
||||
- 创建方式从 HTTP API(`POST /api/agents`)改为 `ManageAgent` 内置工具(实例鉴权上线后 Agent 不再直接访问本机 API)
|
||||
|
||||
Reference in New Issue
Block a user