mirror of
https://git.openapi.site/https://github.com/desirecore/market.git
synced 2026-06-06 04:30:42 +08:00
* 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>
8.1 KiB
8.1 KiB
name, description, version, type, risk_level, status, disable-model-invocation, tags, metadata, market
| name | description | version | type | risk_level | status | disable-model-invocation | tags | metadata | market | |||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| manage-teams | 创建和管理 Agent 团队,组织多 Agent 协作。Use when 需要多个 Agent 围绕同一任务协作、需要建立组织架构、或需要组长统一调度分派任务时。 | 1.2.3 | procedural | medium | enabled | true |
|
|
|
manage-teams Skill
L0: One-line Summary
Create and manage Agent teams to organize multiple Agents collaborating around a shared task.
L1: Overview and Use Cases
Capability Description
manage-teams is a Procedural Skill that gives DesireCore the ability to create and manage Agent teams. A team is an organizational unit in which multiple Agents collaborate around a shared task; each team has a supervisor responsible for receiving requirements, decomposing tasks, dispatching work to members, and consolidating results.
Use Cases
- Multiple Agents need to collaborate continuously on the same task (e.g., a project group)
- An organizational hierarchy is required (departments / team levels)
- A supervisor is needed to centrally orchestrate, decompose, and dispatch tasks
- Simple one-off delegation is insufficient and long-term collaboration with shared context is required
Core Value
- Organized collaboration: upgrade from point-to-point delegation to a team collaboration model
- Flexible management: supports both ephemeral and persistent team modes
- Dynamic adjustment: members can be added/removed and supervisors swapped at runtime
L2: Detailed Specification
Core Concepts
Teams vs. Single-point Delegation
| Scenario | Recommended Approach | Rationale |
|---|---|---|
| One-off simple problem | Delegate(target, mode='sync') |
No need for organizational overhead |
| Need a single expert to handle | Delegate(target, mode='sync/async') |
One-to-one is sufficient |
| Need multiple experts to weigh in | Delegate(targets, mode='fan-out') |
Parallel dispatch without creating a team |
| Continuous collaboration + shared context | Create a team | Teams provide a shared workdir and structure |
| Organizational hierarchy management | Create nested teams | Department / team hierarchy relationships |
Team Types
- Ephemeral team: task-driven, can be disbanded after completion. Suitable for project-based collaboration.
- Persistent team: long-lived, suitable for departments / teams. Ephemeral teams can be promoted to persistent.
Supervisor Uniqueness Constraint
An Agent can only serve as the supervisor (TL) of a single team. This is a hard constraint of the organizational structure:
- When creating a team, if the caller is already a supervisor of another team, they must first step down from the original team (use
set_supervisorto designate a successor) before creating the new team - Do not assign an Agent who already serves as supervisor to be the supervisor of another team
- An Agent can simultaneously be the supervisor of one team and a regular member of another, but cannot be supervisor of two teams at once
Supervisor Responsibilities
- Receive user requirements and analyze task complexity
- Decompose subtasks and decide which members are needed
- Use the
Delegatetool to dispatch tasks (single-point or fan-out) - Consolidate results from members and produce an integrated answer
- Dynamically adjust members (add/remove) as needed
Operations Guide
Create a Team
ManageTeam({
action: 'create',
name: '房产评估项目组',
members: ['legal-advisor', 'finance-advisor', 'real-estate'],
task: '综合评估目标房产'
})
The supervisor defaults to the caller (you). After creation, you are the supervisor of this team.
Dispatch Tasks to Team Members
Single-point delegation (one member handles it):
Delegate({
target: 'legal-advisor',
task: '检查该房产的产权状况和法律风险',
mode: 'sync'
})
Fan-out delegation (multiple members in parallel):
Delegate({
targets: ['legal-advisor', 'finance-advisor', 'real-estate'],
task: '从各自专业角度评估这套房产',
mode: 'fan-out',
strategy: 'parallel'
})
Manage Members
// 添加成员
ManageTeam({ action: 'add_member', teamId: '...', agentId: 'new-agent' })
// 批量添加成员
ManageTeam({ action: 'add_members', teamId: '...', members: ['agent-a', 'agent-b'] })
// 移除成员
ManageTeam({ action: 'remove_member', teamId: '...', agentId: 'old-agent' })
// 批量移除成员
ManageTeam({ action: 'remove_members', teamId: '...', members: ['agent-a', 'agent-b'] })
// 更换组长
ManageTeam({ action: 'set_supervisor', teamId: '...', agentId: 'new-leader' })
Team Lifecycle
// 任务完成,解散临时团队
ManageTeam({ action: 'disband', teamId: '...' })
// 或升级为持久团队(长期使用)
ManageTeam({ action: 'promote', teamId: '...' })
Best Practices
- Evaluate before creating a team: simple tasks should be delegated directly without over-organizing
- Keep membership lean: only bring in the experts truly needed to avoid information overload
- Prefer in-team members: within a team, prefer delegating to its members. For one-off opinions from outside experts, ad-hoc
Delegateconsultation is fine without joining the team; if needed repeatedly, formally bring them in viaadd_member - Clear task descriptions: provide a clear task description and background information when dispatching
- Consolidate promptly: synthesize member results promptly — do not keep the user waiting
- Adjust dynamically: when missing a domain expert, supplement with
add_member - Disband after use: disband ephemeral teams promptly when their task is done to keep the organization tidy
- One supervisor per Agent: an Agent should only serve as supervisor of one team to avoid management chaos from divided responsibilities