Commit Graph

18 Commits

Author SHA1 Message Date
caccaee6ef fix(skills): 去除追问/展示数量的软性倾向措辞,完全交 Agent 自主 (#59)
## 摘要 / Summary

### 中文

在去除机械数字上限(#58)后,进一步删掉技能里追问/展示数量的**软性倾向措辞**——create
的「一次不要问太多以免用户负担」、discover 的「避免一次刷屏过多」。数量与节奏完全交由执行 Agent
自主判断,不带任何倾向暗示。create 2.5.4 / discover 2.6.4,manifest 1.2.15,中英双份同步、重算
source_hash(validate-i18n 通过)。

### English

After removing the mechanical numeric caps (#58), further drop the soft
directional hints on ask/display count — create's "don't ask too many so
as not to burden the user" and discover's "avoid flooding the screen".
Count and pacing are left entirely to the executing Agent's judgment
with no bias. create 2.5.4 / discover 2.6.4, manifest 1.2.15, both
locales synced, hashes recomputed (validate-i18n passes).
2026-07-19 17:31:31 +08:00
14b6a02c48 fix(skills): 去除束缚 Agent 自主判断的机械数字策略 (#58)
## 摘要 / Summary

### 中文

去除技能里束缚执行 Agent 自主判断的**机械数字策略**:create 需求收集的「每轮最多问 2 个」、discover
排序的「最多展示 5 个候选」。改为交由 Agent 按情况自主把握追问节奏与展示数量,保留「别让用户负担 /
别一次刷屏」的原则意图——把控制权交还给判断力更强的执行者,而非用固定上限约束。create 2.5.3 / discover
2.6.3,manifest 1.2.14,中英双份同步、重算 source_hash(validate-i18n 通过)。

### English

Remove mechanical numeric limits that constrain the executing Agent's
judgment: create's "at most 2 questions per turn" and discover's "show
at most 5 candidates". Both become "the Agent decides the pacing/count
by situation", keeping the principle intent (don't burden the user /
don't flood the screen) while handing control back to the more capable
executor instead of a fixed cap. create 2.5.3 / discover 2.6.3, manifest
1.2.14, both locales synced, hashes recomputed (validate-i18n passes).
2026-07-19 17:05:41 +08:00
74be106952 fix(skills): 补回 #56 压缩时误删的实质信息(意图对齐) (#57)
## 摘要 / Summary

### 中文

#56 的复盘修正。上一轮"强改写压缩"把四技能 L1
的**技术属性、使用场景与交互示范当套话一刀切**,造成实质信息丢失(承诺"意图全保留"但未做到)。本 PR 补回:

- **create**:`创建仓库符合 AgentFS v2 规范、git
管理版本(可治理/可追溯)`定位;`基础创建`形态(name+description,description 自动填充 persona
L0);需求收集的**引导问题示例**("起什么名字?/主要负责什么?"…);企业部署/开发者原型使用场景。
- **update**:`agent 目录 git 管理版本、历史可追溯`定位 + 使用场景。
- **discover**:使用场景(浏览/新用户/找替代)+ `语义匹配而非关键词搜索`。
- **delete**:使用场景(清理/测试/释放存储)。

根因:L1 混着实质技术属性与营销套话、使用场景是触发判据、引导问题是交互示范,不该按"只留独有信息"一刀切。补回后仍保留结构性压缩(zh
正文合计仍降 ~64%)。版本 create 2.5.2 / update 3.1.3 / delete 2.5.2 / discover
2.6.2,manifest 1.2.13,中英双份同步、重算 source_hash(validate-i18n 通过)。

### English

Post-mortem fix for #56. The previous aggressive compression treated the
skills' L1 technical attributes, use cases, and interaction demos as
boilerplate and cut them in a blanket way, dropping substantive
information (the "all intent preserved" claim wasn't fully met). This PR
restores: create's AgentFS-v2 / git-version-management positioning, the
"basic create" form (name+description auto-filling persona L0), the
requirement-gathering prompt questions, and enterprise/developer use
cases; update's git-versioned/traceable positioning and use cases;
discover's use cases and "semantic match, not keyword search"; delete's
use cases. Root cause: L1 mixed real technical attributes with marketing
boilerplate, use cases are trigger cues, and prompt questions are
interaction demos — none should have been blanket-cut. Structural
compression is retained (zh bodies still ~64% smaller). Versions bumped,
manifest 1.2.13, both locales synced, source hashes recomputed
(validate-i18n passes).
2026-07-19 16:14:22 +08:00
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
b273a1008a docs(discover-agent): 使用场景补充"更换智能体"情形 (#40)
给 discover-agent 的中文源补充一条使用场景。

同时这是 #39(pull_request_target 自动翻译流水线)的端到端验证 PR:中文源变更 → en-US 过期 → CI
应自动翻译并把 commit 推回本分支、发评论。

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: desirecore-bot <bot@desirecore.net>
2026-07-07 20:04:55 +08:00
1f7c8b9673 feat: skills i18n 改造(schemaVersion 1.1,零向后兼容) (#1)
* feat: skills i18n 改造 — schemaVersion 1.1,零向后兼容

把 21 个 skills + 1 个 agent + manifest/categories 全量迁移到 schemaVersion 1.1
的 i18n 结构,配套 CI AI 翻译流水线(GitHub Models)与本地工具链。

## 关键变更

### 数据结构(破坏性,schemaVersion 1.0 → 1.1)
- SKILL.md: 顶层 name 改为 ASCII slug(== 目录名,符合 agentskills.io 规范);
  中文显示名/short_desc/description 全部迁入 metadata.i18n.<locale>
- agents/<id>/agent.json: shortDesc/fullDesc/tags/persona.{role,traits} 迁入
  i18n.<locale>;changelog[].changes 改为 { <locale>: string[] } 对象
- categories.json: 每个分类的 label/description 迁入 i18n.<locale>,顶层只剩
  color/icon
- manifest.json: 加 supportedLocales / defaultLocale;顶层 description 迁入
  i18n.<locale>

### Body 文件结构
- 根 SKILL.md = frontmatter + default_locale (en-US) body
- SKILL.<locale>.md = 各 locale 的 markdown body(首行 <!-- locale: xx --> 自校验)

### 工具链(scripts/i18n/)
- glossary.json: zh→en 术语表 + do_not_translate 白名单
- schema/skill-frontmatter.schema.json: i18n frontmatter JSON Schema
- validate-i18n.py: 8 条校验规则(name 合规 / locale 完整性 / hash 一致性等)
- translate.py: GitHub Models / Anthropic 双 backend,sha256 增量翻译
- migrate.py: 一次性迁移脚本(旧格式 → i18n 结构)

### CI(.github/workflows/)
- i18n-validate.yml: PR 触发跑 validate + translate --check
- i18n-translate.yml: PR 触发用 GitHub Models(默认 openai/gpt-5-mini)翻译缺失
  locale,自动追加 commit;可切到 ANTHROPIC_API_KEY 走 Claude

### 文档
- docs/I18N.md: 作者贡献指南(schema 说明 / 提交流程 / 常见问题)
- README.md: 加多语言段落

## 验证

- uv run scripts/i18n/validate-i18n.py: OK,49 文件 0 错误
- uv run scripts/i18n/translate.py --check: 0 stale locale
- 21 skills 标题数 zh-CN == en-US 严格对齐(最大 66=66)
- skills-ref 规范校验:全部通过(顶层 name ASCII slug + description 单字段)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(i18n): 修复 PR #1 review 反馈的 6 项问题

- schema: translated_by 正则放宽为 ^(human|ai:[A-Za-z0-9._:/-]+)$,接受
  'ai:github:openai/gpt-5-mini' 这类 backend:model 形式(CI 翻译输出格式)
- README + docs/I18N.md: 修正"CI 用 Claude API"误导描述,正确说明默认是
  GitHub Models(openai/gpt-5-mini)+ GITHUB_TOKEN,可选切到 Anthropic
- skills/minimax-tts/SKILL.md & SKILL.zh-CN.md: 删除多余的 ``` 闭合,避免
  Markdown 后续渲染错乱
- skills/docx/SKILL.md: 翻译时丢失的 • Unicode escape 示例已恢复,
  与 zh-CN 版本对齐

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-05 00:26:33 +08:00
3bed41d7a1 fix: 全局技能 disable-model-invocation 改为 true,按需加载减少 system prompt 体积
13 个技能从 false(自动注入 ~160KB)改为 true(按需加载),
大幅减少每次 LLM 请求的 system prompt token 占用。

涉及技能(版本号 patch +1):
- create-agent 2.4.1→2.4.2
- delete-agent 2.4.1→2.4.2
- discover-agent 2.5.1→2.5.2
- docx 1.0.1→1.0.2
- frontend-design 1.0.1→1.0.2
- mail-operations 1.0.1→1.0.2
- manage-skills 1.0.1→1.0.2
- pdf 1.0.1→1.0.2
- pptx 1.0.1→1.0.2
- s3-storage-operations 2.0.1→2.0.2
- skill-creator 1.0.0→1.0.1
- update-agent 3.0.1→3.0.2
- xlsx 1.0.1→1.0.2
2026-04-13 16:28:52 +08:00
aa6b1389fe fix: 为 9 个 skill 补全 L0/L1/L2 分层结构,版本号 +1
按照 desirecore-format.md 规范,为以下 skill 添加标准分层结构:
- docx (1.0.0→1.0.1), pdf (1.0.0→1.0.1), pptx (1.0.0→1.0.1), xlsx (1.0.0→1.0.1)
- frontend-design (1.0.0→1.0.1), mail-operations (1.0.0→1.0.1)
- environment-setup (1.1.0→1.1.1), web-access (1.1.0→1.1.1)
- manage-teams (1.2.0→1.2.1)

每个文件增加 L0(一句话摘要)、L1(概述与使用场景)、L2(详细规范)三层,
原有技术内容保持不变,metadata.updated_at 更新为 2026-04-13。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:33:56 +08:00
0f8daa5a0f refactor: discover-agent 改为按需加载(disable-model-invocation: true)
与 Claude Code 的 skills 加载机制对齐:默认不将完整内容注入 system prompt,
改为通过 Skill 工具按需加载,节省 token 消耗。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-08 15:38:58 +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
41afa07fbe chore: 全局技能升版至 v2.3.0
- 统一版本来源(移除 metadata.version 冗余)
- create-agent / update-agent risk_level 降为 low
- 技能名称中文化

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:53:47 +08:00
cb52235673 refactor: 移除 metadata.version 冗余,顶层 version 为唯一来源
- 所有 SKILL.md 的版本号统一由顶层 version 字段定义
- 删除 metadata 中的冗余 version 副本
- 参考 OpenClaw 实践:version 作为顶层一等公民

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 21:50:59 +08:00
2c40829b63 chore: discover-agent / delete-agent 升版至 2.2.0
- 与 create-agent / update-agent 版本对齐
- name 字段已在上个提交改为中文

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 19:21:00 +08:00
53fbc46150 refactor: 技能 name 改为中文 + update-agent 加入 AgentFS 背景知识
- 4 个技能 name 改为中文:创建智能体、更新智能体、发现智能体、删除智能体
- update-agent 新增 AgentFS 仓库结构背景知识(仅 Agent 内部使用)
- update-agent 回执改为用户友好格式,移除内部路径和 YAML 回执
- 合并重复的受保护路径段到背景知识中
2026-02-28 18:46:26 +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
761226d567 feat: 统一全局技能至 v2.1.0,简化 API 调用方式
- 4 个全局技能版本统一为 2.1.0
- 移除 fetch_api 工具引用,改为通过 Bash/curl 调用 HTTP API
- API 基础地址由 system prompt 注入,技能无需自行端口发现
- create-agent 改为以用户阅读体验优先的 blockquote 格式呈现 markdown 内容
2026-02-26 20:38:35 +08:00
15e8d1f0c8 feat: 添加 4 个全局技能到 builtin 通道
- 新增 builtin-skills.json 清单
- 添加 create-agent / delete-agent / discover-agent / update-agent SKILL.md
- 添加 _protected-paths.yaml 共享配置
- 与捆绑源版本一致,启用 Phase 2 热更新通道

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-25 09:10:44 +08:00