@givolt/i3-composer-agent 2.1.0 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (103) hide show
  1. package/.agents/plugins/marketplace.json +2 -2
  2. package/.claude/commands/i3-build.md +13 -1
  3. package/.claude/commands/i3-code-simplify.md +13 -1
  4. package/.claude/commands/i3-constraints.md +13 -1
  5. package/.claude/commands/i3-plan.md +13 -1
  6. package/.claude/commands/i3-review.md +13 -1
  7. package/.claude/commands/i3-ship.md +18 -2
  8. package/.claude/commands/i3-spec.md +13 -1
  9. package/.claude/commands/i3-test.md +13 -1
  10. package/.claude/commands/i3-webperf.md +13 -1
  11. package/.claude-plugin/marketplace.json +3 -3
  12. package/.claude-plugin/plugin.json +2 -2
  13. package/.codex-plugin/plugin.json +7 -6
  14. package/.gemini/commands/i3-build.toml +13 -1
  15. package/.gemini/commands/i3-code-simplify.toml +13 -1
  16. package/.gemini/commands/i3-constraints.toml +13 -1
  17. package/.gemini/commands/i3-planning.toml +13 -1
  18. package/.gemini/commands/i3-review.toml +13 -1
  19. package/.gemini/commands/i3-ship.toml +13 -1
  20. package/.gemini/commands/i3-spec.toml +13 -1
  21. package/.gemini/commands/i3-test.toml +13 -1
  22. package/.gemini/commands/i3-webperf.toml +13 -1
  23. package/README.md +101 -101
  24. package/agents/code-reviewer.md +13 -1
  25. package/agents/security-auditor.md +13 -1
  26. package/agents/test-engineer.md +13 -1
  27. package/agents/web-performance-auditor.md +13 -1
  28. package/bin/i3-composer-agent.cjs +56 -53
  29. package/bin/install.cjs +23 -15
  30. package/bin/native-content.cjs +26 -17
  31. package/bin/tool-menu.cjs +9 -0
  32. package/bin/wizard.cjs +52 -25
  33. package/commands/i3-build.toml +13 -1
  34. package/commands/i3-code-simplify.toml +13 -1
  35. package/commands/i3-constraints.toml +13 -1
  36. package/commands/i3-planning.toml +13 -1
  37. package/commands/i3-review.toml +13 -1
  38. package/commands/i3-ship.toml +13 -1
  39. package/commands/i3-spec.toml +13 -1
  40. package/commands/i3-test.toml +13 -1
  41. package/commands/i3-webperf.toml +13 -1
  42. package/docs/adoption-guide.md +8 -0
  43. package/docs/agents.md +8 -0
  44. package/docs/antigravity-setup.md +8 -0
  45. package/docs/codebuddy-setup.md +26 -60
  46. package/docs/codex-setup.md +15 -29
  47. package/docs/commandcode-setup.md +8 -0
  48. package/docs/copilot-cli-setup.md +8 -0
  49. package/docs/copilot-setup.md +8 -0
  50. package/docs/cursor-setup.md +8 -0
  51. package/docs/gemini-cli-setup.md +8 -0
  52. package/docs/getting-started.md +8 -0
  53. package/docs/opencode-setup.md +8 -0
  54. package/docs/other-hosts.md +8 -0
  55. package/docs/windsurf-setup.md +8 -0
  56. package/docs/workbuddy-setup.md +46 -63
  57. package/hooks/SDD-CACHE.md +8 -0
  58. package/hooks/SIMPLIFY-IGNORE.md +8 -0
  59. package/hooks/sdd-cache-pre.sh +5 -5
  60. package/hooks/session-start-test.sh +1 -1
  61. package/hooks/session-start.sh +3 -3
  62. package/hooks/simplify-ignore.sh +8 -8
  63. package/package.json +2 -2
  64. package/plugin.json +2 -2
  65. package/references/accessibility-checklist.md +8 -0
  66. package/references/definition-of-done.md +8 -0
  67. package/references/observability-checklist.md +8 -0
  68. package/references/orchestration-patterns.md +8 -0
  69. package/references/performance-checklist.md +8 -0
  70. package/references/security-checklist.md +8 -0
  71. package/references/testing-patterns.md +8 -0
  72. package/skills/i3-api-and-interface-design/SKILL.md +13 -1
  73. package/skills/i3-browser-testing-with-devtools/SKILL.md +13 -1
  74. package/skills/i3-ci-cd-and-automation/SKILL.md +13 -1
  75. package/skills/i3-code-review-and-quality/SKILL.md +13 -1
  76. package/skills/i3-code-simplification/SKILL.md +13 -1
  77. package/skills/i3-constraint-driven-development/SKILL.md +13 -1
  78. package/skills/i3-constraint-driven-development/references/floor-guard.md +8 -0
  79. package/skills/i3-context-engineering/SKILL.md +13 -1
  80. package/skills/i3-debugging-and-error-recovery/SKILL.md +13 -1
  81. package/skills/i3-deprecation-and-migration/SKILL.md +13 -1
  82. package/skills/i3-documentation-and-adrs/SKILL.md +13 -1
  83. package/skills/i3-doubt-driven-development/SKILL.md +13 -1
  84. package/skills/i3-frontend-ui-engineering/SKILL.md +13 -1
  85. package/skills/i3-git-workflow-and-versioning/SKILL.md +13 -1
  86. package/skills/i3-idea-refine/SKILL.md +13 -1
  87. package/skills/i3-idea-refine/examples.md +8 -0
  88. package/skills/i3-idea-refine/frameworks.md +8 -0
  89. package/skills/i3-idea-refine/refinement-criteria.md +8 -0
  90. package/skills/i3-idea-refine/scripts/idea-refine.sh +2 -2
  91. package/skills/i3-incremental-implementation/SKILL.md +13 -1
  92. package/skills/i3-interview-me/SKILL.md +13 -1
  93. package/skills/i3-observability-and-instrumentation/SKILL.md +13 -1
  94. package/skills/i3-performance-optimization/SKILL.md +13 -1
  95. package/skills/i3-performance-optimization/references/optimization-patterns.md +8 -0
  96. package/skills/i3-planning-and-task-breakdown/SKILL.md +13 -1
  97. package/skills/i3-security-and-hardening/SKILL.md +13 -1
  98. package/skills/i3-security-and-hardening/references/hardening-patterns.md +8 -0
  99. package/skills/i3-shipping-and-launch/SKILL.md +13 -1
  100. package/skills/i3-source-driven-development/SKILL.md +13 -1
  101. package/skills/i3-spec-driven-development/SKILL.md +13 -1
  102. package/skills/i3-test-driven-development/SKILL.md +13 -1
  103. package/skills/i3-using-agent-skills/SKILL.md +13 -1
package/README.md CHANGED
@@ -1,71 +1,63 @@
1
- # i3 Composer Agent v2.1.0
1
+ # i3 Composer Agent v2.2.0
2
2
 
3
3
  **Intelligence. Integration. Innovation.**
4
4
 
5
- The npm package is `@givolt/i3-composer-agent`; the plugin and marketplace ID is
6
- `i3-composer-agent`. Commands and Skill IDs use the `i3-` prefix.
5
+ 面向中文环境的软件工程工作流:需求、规格、计划、开发、测试、审查与发布。
6
+ 包名为 `@givolt/i3-composer-agent`,插件/市场标识为 `i3-composer-agent`。
7
+ Skill 和命令使用 `i3-` 前缀。默认简体中文交互;用户明确要求时可切换语言。
8
+ 代码标识、路径、参数、工具协议和机器状态保持原样。
7
9
 
8
- ## Install with the wizard
10
+ ## 通过向导安装
9
11
 
10
- Run in the project where you want to use the skills:
12
+ 在要使用技能的项目中运行:
11
13
 
12
14
  ```bash
13
15
  npx @givolt/i3-composer-agent
14
- # Preselect a tool; the wizard still allows multiple selections:
15
16
  npx @givolt/i3-composer-agent --codebuddy
16
- npx @givolt/i3-composer-agent --workbuddy
17
+ npx @givolt/i3-composer-agent --workbuddy --scope global
17
18
  ```
18
19
 
19
- The interactive terminal wizard offers multiple tools, project or global scope,
20
- an installation summary, and confirmation. It offers 80 directory
21
- presets: the pinned [Vercel Skills CLI registry](https://github.com/vercel-labs/skills/blob/48dc9e8eb8aa19040e91cb90ba0b642c9cbad57e/src/agents.ts)
22
- plus a native WorkBuddy preset.
23
- Choose by tool ID or comma-separated menu numbers. Use `--list-agents` to list
24
- the choices. Directory presets are not an execution test of every host.
20
+ 首屏依次为 CodeBuddy、WorkBuddy、Codex、Claude Code、Cursor、Gemini CLI,
21
+ WorkBuddy 在第 2 项。选 `7`/`更多` 打开其余工具,每页 10 项;`n` 下一页、`p` 上一页、
22
+ `b` 返回,`/关键词` 搜索全部 80 个工具。编号在分页和搜索中保持一致。
23
+ 输入编号或 ID(中英文逗号均可)累积多选,跨页保留;`-编号/ID` 移除选择。
24
+ 回车或 `done`/`完成` 确认已选工具,随后选择项目/全局范围并确认安装;`q`/`取消` 退出。
25
+ 通过参数预选的工具会保留,仍可继续多选。
25
26
 
26
- Every selected tool receives all 25 skills and shared references.
27
- CodeBuddy, WorkBuddy and Claude Code also receive 9 short command workflows
28
- and 4 persona files. Other tools use their native skill support;
29
- short lifecycle commands depend on the host. Shared destinations are installed
30
- once. A standard MIT license accompanies the shared references.
31
- Reload the IDE window or start a new session after installation. See
32
- [CodeBuddy setup](docs/codebuddy-setup.md), [WorkBuddy setup](docs/workbuddy-setup.md)
33
- and [Codex setup](docs/codex-setup.md).
27
+ 全部目标均安装 25 个技能和共享参考资料。
28
+ CodeBuddy、WorkBuddy、Claude Code 另安装 9 个短命令和 4 个 Agent 角色。
29
+ 其他工具通过其原生 Skills 机制使用;短命令支持取决于宿主。
30
+ 目录预设来自固定的 [Skills CLI 工具登记](https://github.com/vercel-labs/skills/blob/48dc9e8eb8aa19040e91cb90ba0b642c9cbad57e/src/agents.ts)
31
+ 并增加 WorkBuddy。目录预设验证与每个宿主的实际执行验收分别记录。
34
32
 
35
- For an explicit installation without prompts:
33
+ 安装后重新加载 IDE 或新建会话。详见 [CodeBuddy](docs/codebuddy-setup.md)、
34
+ [WorkBuddy](docs/workbuddy-setup.md) 和 [Codex](docs/codex-setup.md) 安装说明。
35
+
36
+ 无需交互时,明确选择工具和范围:
36
37
 
37
38
  ```bash
38
39
  npx @givolt/i3-composer-agent --agents codebuddy,codex --scope project --yes
39
- npx @givolt/i3-composer-agent --workbuddy --scope project --yes
40
- npx @givolt/i3-composer-agent --agents codebuddy,workbuddy --scope project --yes
41
40
  npx @givolt/i3-composer-agent --workbuddy --scope global --yes
41
+ npx @givolt/i3-composer-agent --agents codebuddy,workbuddy --scope global --yes
42
42
  npx @givolt/i3-composer-agent --claude --scope global --yes
43
43
  npx @givolt/i3-composer-agent --codebuddy --scope project --dry-run
44
44
  ```
45
45
 
46
- CodeBuddy and WorkBuddy share one project installation under `.codebuddy/`.
47
- Existing `.workbuddy/` project settings are preserved. Global installations use
48
- separate `~/.codebuddy/` and `~/.workbuddy/` directories.
49
-
50
- Unchanged manifest-owned assets from the same version and scope are reused;
51
- adding a client merges its ID into the shared installation manifest. Modified
52
- files, unowned collisions and version upgrades require confirmation; use
53
- `--force` with noninteractive installs after reviewing the dry run.
54
- After successful installation, replaced files and installer-owned historical
55
- backups are removed. A failed installation restores the previous files.
56
- `npx -y` accepts npm's package download prompt; the package's own `--yes` flag
57
- accepts the explicit installation plan.
46
+ CodeBuddy 和 WorkBuddy 的项目安装共用 `.codebuddy/`,相同目标只安装一次,
47
+ 保留已有 `.workbuddy/` 项目设置。全局分别使用 `~/.codebuddy/` 和 `~/.workbuddy/`。
48
+ **WorkBuddy 桌面版建议全局安装**:已观察到 5.7.7 的技能列表扫描 `.workbuddy/skills/`,
49
+ 共用的项目 `.codebuddy/skills/` 可能不显示,但项目命令仍可发现。
50
+ 可让 CodeBuddy 项目安装、WorkBuddy 全局安装,或让两者都全局安装。
58
51
 
59
- Earlier native installations migrate their unprefixed Skill and command paths
60
- when those paths belong to this package's previous installation manifest.
61
- The migration removes owned legacy paths after successful installation. Use
62
- `/i3-spec` in CodeBuddy or WorkBuddy, or `$i3-spec-driven-development`
63
- in Codex after upgrading.
52
+ 同版本、同范围的清单所属未修改内容会复用,新增客户端合并到清单。
53
+ 升级、修改过的内容及未登记同名冲突需确认替换;非交互使用 `--force` 前可先看 dry-run。
54
+ 安装成功后清理替换掉的旧内容及本安装器所属历史备份,失败则恢复原文件。
55
+ 迁移只清理旧清单所属的无前缀 Skill/命令路径,保留自定义内容。
56
+ 标准 MIT 许可随共享参考资料安装。`npx -y` 确认 npm 下载;包的 `--yes` 确认安装计划。
64
57
 
65
- ## Prepare the complete plugin
58
+ ## 注册完整插件
66
59
 
67
- For native plugin registration, including plugin hooks, explicitly prepare a
68
- persistent `./i3-composer-agent/` bundle:
60
+ 完整插件包含 Skills、Commands、Agents、Hooks 和 references。准备持久目录:
69
61
 
70
62
  ```bash
71
63
  npx @givolt/i3-composer-agent --prepare --codebuddy
@@ -73,80 +65,86 @@ npx @givolt/i3-composer-agent --prepare --codex
73
65
  npx @givolt/i3-composer-agent --prepare --claude
74
66
  ```
75
67
 
76
- The bundle includes skills, commands, personas, hooks and references. Run the
77
- registration commands printed by the CLI in the intended host. This preparation
78
- mode does not install native skills or choose the host plugin manager's scope.
79
-
80
- CodeBuddy Code (terminal) / Claude Code:
68
+ 此模式准备 `./i3-composer-agent/` 并输出宿主注册命令。
69
+ 在 CodeBuddy Code(终端)或 Claude Code 中执行:
81
70
 
82
71
  ```text
83
72
  /plugin marketplace add ./i3-composer-agent
84
73
  /plugin install i3-composer-agent@i3-composer-agent
85
74
  ```
86
75
 
87
- Codex:
76
+ Codex 中执行:
88
77
 
89
78
  ```bash
90
79
  codex plugin marketplace add ./i3-composer-agent
91
80
  codex plugin add i3-composer-agent@i3-composer-agent
92
81
  ```
93
82
 
94
- Start a new session after enabling the plugin. Codex uses the branded Skill
95
- names, such as `$i3-spec-driven-development`; lifecycle slash-command adaptation
96
- is maintained separately.
83
+ 按宿主管理器选择安装范围,启用后新建会话。原生文件安装与完整插件注册是两种入口。
84
+ 原生安装不自动启用插件 Hook;无需 Hook,入口本身也要求默认中文回复。
97
85
 
98
- ## Commands
86
+ ## 命令
99
87
 
100
- Native CodeBuddy, WorkBuddy and Claude Code installations use short filenames such as
101
- `/i3-spec`, `/i3-plan`, `/i3-build` and `/i3-ship`. Hosts supporting Claude-compatible plugin
102
- commands load the same workflows under the plugin namespace:
88
+ CodeBuddy、WorkBuddy、Claude Code 原生安装使用 `/i3-spec`、`/i3-plan`、
89
+ `/i3-build`、`/i3-ship` 等短命令。支持兼容插件命令的宿主使用插件命名空间:
103
90
 
104
- | Command | Description |
91
+ | 命令 | 中文说明 |
105
92
  | --- | --- |
106
- | /i3-composer-agent:i3-build | Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass. |
107
- | /i3-composer-agent:i3-code-simplify | Simplify code for clarity and maintainability — reduce complexity without changing behavior |
108
- | /i3-composer-agent:i3-constraints | Define and enforce this project's quality bar — interview, sane defaults, CONSTRAINTS.md |
109
- | /i3-composer-agent:i3-plan | Break work into small verifiable tasks with acceptance criteria and dependency ordering |
110
- | /i3-composer-agent:i3-review | Conduct a five-axis code review — correctness, readability, architecture, security, performance |
111
- | /i3-composer-agent:i3-ship | Run the pre-launch checklist via parallel fan-out to specialist personas, then synthesize a go/no-go decision |
112
- | /i3-composer-agent:i3-spec | Start spec-driven development — write a structured specification before writing code |
113
- | /i3-composer-agent:i3-test | Run TDD workflow — write failing tests, implement, verify. For bugs, use the Prove-It pattern. |
114
- | /i3-composer-agent:i3-webperf | Run a web performance audit via the web-performance-auditor persona |
115
-
116
- `/i3-build auto` runs the existing approved-plan workflow in native installations;
117
- plugin installations use `/i3-composer-agent:i3-build auto`.
93
+ | /i3-composer-agent:i3-build | 按任务增量实现、构建、测试、验证并提交;添加 auto 可按已获批准的完整计划执行。 |
94
+ | /i3-composer-agent:i3-code-simplify | 简化代码,降低复杂度,提高可读性与维护性,并保持既有行为不变。 |
95
+ | /i3-composer-agent:i3-constraints | 访谈并定义项目质量门槛,提供合理默认值,写入 CONSTRAINTS.md 并落实约束。 |
96
+ | /i3-composer-agent:i3-plan | 把工作拆成带验收标准、验证步骤和依赖顺序的小任务。 |
97
+ | /i3-composer-agent:i3-review | 从正确性、可读性、架构、安全和性能五个维度审查代码。 |
98
+ | /i3-composer-agent:i3-ship | 并行调用三个专业角色执行发布前检查,主会话汇总 GO/NO-GO 决策与回滚计划。 |
99
+ | /i3-composer-agent:i3-spec | 先编写结构化规格、目标、范围与验收标准,再进入实现。 |
100
+ | /i3-composer-agent:i3-test | 执行 TDD:先编写失败测试,再实现和验证;缺陷使用 Prove-It 模式复现。 |
101
+ | /i3-composer-agent:i3-webperf | 调用 web-performance-auditor 角色审查网页性能与 Core Web Vitals。 |
102
+
103
+ `/i3-build auto` 按已获批准的任务计划执行完整流程。
104
+ 插件调用为 `/i3-composer-agent:i3-build auto`,原审批边界和验证条件仍有效。
105
+ `/i3-ship` 在宿主支持时并行运行三个专业角色;不可用时读取角色提示依次审查,
106
+ 由主会话汇总 GO/NO-GO 决策,回滚计划必需,严重问题默认阻止发布。
118
107
 
119
108
  ## Skills
120
109
 
121
- | Skill | Description |
110
+ | 技能 | 中文说明 |
122
111
  | --- | --- |
123
- | [i3-api-and-interface-design](skills/i3-api-and-interface-design/SKILL.md) | Guides stable API and interface design. Use when designing APIs, module boundaries, or any public interface. Use when creating REST or GraphQL endpoints, defining type contracts between modules, or establishing boundaries between frontend and backend. |
124
- | [i3-browser-testing-with-devtools](skills/i3-browser-testing-with-devtools/SKILL.md) | Tests in real browsers via Chrome DevTools MCP. Use when building or debugging anything that runs in a browser. Use when you need to inspect the DOM, capture console errors, analyze network requests, profile performance, or verify visual output with real runtime data. Requires the chrome-devtools MCP server to be configured. |
125
- | [i3-ci-cd-and-automation](skills/i3-ci-cd-and-automation/SKILL.md) | Automates CI/CD pipeline setup. Use when setting up or modifying build and deployment pipelines. Use when you need to automate quality gates, configure test runners in CI, or establish deployment strategies. |
126
- | [i3-code-review-and-quality](skills/i3-code-review-and-quality/SKILL.md) | Conducts multi-axis code review. Use before merging any change. Use when reviewing code written by yourself, another agent, or a human. Use when you need to assess code quality across multiple dimensions before it enters the main branch. Use when asked to review a diff or a pull request, even when the diff is pasted inline. |
127
- | [i3-code-simplification](skills/i3-code-simplification/SKILL.md) | Simplifies code for clarity. Use when refactoring code for clarity without changing behavior. Use when code works but is harder to read, maintain, or extend than it should be. Use when reviewing code that has accumulated unnecessary complexity. |
128
- | [i3-constraint-driven-development](skills/i3-constraint-driven-development/SKILL.md) | Establishes a project's quality bar as a written contract and stops agents quietly lowering it. Interviews the user on which dimensions matter, supplies sane default thresholds when they have no number in mind, records everything in CONSTRAINTS.md, and watches the diff for a weakened bar — new @ts-ignore or eslint-disable suppressions, skipped or deleted tests, assertions stripped out, unimplemented stubs, thresholds edited down. Use when no quality bar is written down, when the user says "set up constraints" or "define our standards", when the user wants dimensions they care about — accessibility, web performance, coverage — set up as enforced constraints, when an agent keeps silencing checks or skipping tests to get to green, when you need a coverage or performance threshold and don't know what number to pick, or when an agent writes more code than anyone will read. |
129
- | [i3-context-engineering](skills/i3-context-engineering/SKILL.md) | Optimizes agent context setup. Use when starting a new session, when agent output quality degrades, when switching between tasks, or when you need to configure rules files and context for a project. |
130
- | [i3-debugging-and-error-recovery](skills/i3-debugging-and-error-recovery/SKILL.md) | Guides systematic root-cause debugging. Use when tests fail, builds break, something that worked yesterday broke, behavior doesn't match expectations, or you encounter any unexpected error. Use when you need to figure out what broke and why — a systematic approach to finding and fixing the root cause rather than guessing. |
131
- | [i3-deprecation-and-migration](skills/i3-deprecation-and-migration/SKILL.md) | Manages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. |
132
- | [i3-documentation-and-adrs](skills/i3-documentation-and-adrs/SKILL.md) | Records decisions and documentation. Use when you need to document an architecture decision (ADR) or the reasoning behind a design choice, when changing public APIs, shipping features, or when you need to record context that future engineers and agents will need to understand the codebase. |
133
- | [i3-doubt-driven-development](skills/i3-doubt-driven-development/SKILL.md) | Subjects every non-trivial decision to a fresh-context adversarial review before it stands. Use when you want every assumption cross-examined before proceeding, when stress-testing a plan for hidden failure modes, when correctness matters more than speed, when working in unfamiliar code, when stakes are high (production auth, security-sensitive logic, a high-stakes migration, irreversible operations), or any time a confident output would be cheaper to verify now than to debug later. |
134
- | [i3-frontend-ui-engineering](skills/i3-frontend-ui-engineering/SKILL.md) | Builds production-quality, accessible, responsive user-facing UIs. Use when building or modifying interfaces and pages, creating components, implementing layouts, meeting WCAG accessibility requirements, managing state, or when the output needs to look and feel production-quality rather than AI-generated. |
135
- | [i3-git-workflow-and-versioning](skills/i3-git-workflow-and-versioning/SKILL.md) | Structures git workflow practices. Use when making any code change. Use when committing, branching, resolving conflicts, splitting uncommitted work in a messy working tree into clean atomic commits, opening or reviewing a pull request (PR), pushing to a remote, or when you need to organize work across multiple parallel streams. Use when cutting a release, choosing a semantic version bump, tagging, or writing a changelog. |
136
- | [i3-idea-refine](skills/i3-idea-refine/SKILL.md) | Refines raw ideas into sharp, actionable concepts through structured divergent and convergent thinking. Use when an idea is still vague, when you need to stress-test assumptions before committing to a plan, or when you want to expand options before converging on one. Triggers on "ideate", "refine this idea", or "stress-test my plan". |
137
- | [i3-incremental-implementation](skills/i3-incremental-implementation/SKILL.md) | Delivers changes incrementally in thin, verifiable slices. Use when implementing any feature or change that touches more than one file, or when picking up the next task from a plan. Use when rolling a change out behind a feature flag, when you're about to write a large amount of code at once, or when a task feels too big to land in one step. |
138
- | [i3-interview-me](skills/i3-interview-me/SKILL.md) | Extracts what the user actually wants instead of what they think they should want. Achieves this through one-question-at-a-time interview until ~95% confidence about the underlying intent. Use when an ask is underspecified ("build me X" without "for whom" or "why now"), when the user explicitly invokes ("interview me", "grill me", "are we sure?", "stress-test my thinking"), or when you catch yourself silently filling in ambiguous requirements before any plan, spec, or code exists. |
139
- | [i3-observability-and-instrumentation](skills/i3-observability-and-instrumentation/SKILL.md) | Instruments code so production behavior is visible and diagnosable. Use when adding logging, metrics, tracing, or alerting. Use when shipping any feature that runs in production and you need evidence it works. Use when production issues are reported but you can't tell what happened from the available data. |
140
- | [i3-performance-optimization](skills/i3-performance-optimization/SKILL.md) | Optimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. |
141
- | [i3-planning-and-task-breakdown](skills/i3-planning-and-task-breakdown/SKILL.md) | Breaks work into ordered tasks. Use when you have a spec or clear requirements and need to break work into implementable tasks. Use when a task feels too large to start, when you need to estimate scope, or when parallel work is possible. |
142
- | [i3-security-and-hardening](skills/i3-security-and-hardening/SKILL.md) | Hardens code against vulnerabilities. Use when auditing an input handler for vulnerabilities, when handling user input, authentication, data storage, or external integrations, or when checking a login flow is safe against the OWASP Top Ten. Use when building any feature that accepts untrusted data, manages user sessions, or interacts with third-party services. Use when auditing dependencies for known vulnerabilities, triaging package-manager audit findings, or assessing supply-chain risk in a new package. Use when personal data or privacy compliance (GDPR, CCPA) is involved. |
143
- | [i3-shipping-and-launch](skills/i3-shipping-and-launch/SKILL.md) | Prepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. |
144
- | [i3-source-driven-development](skills/i3-source-driven-development/SKILL.md) | Grounds every implementation decision in official documentation. Use when you want to verify an approach against the official docs before implementing it, or when you want authoritative, source-cited code free from outdated patterns. Use when building with any framework or library where correctness matters. |
145
- | [i3-spec-driven-development](skills/i3-spec-driven-development/SKILL.md) | Creates specs before coding. Use when starting a new project, feature, or significant change and no specification exists yet. Use when drafting a PRD or requirements document with objectives and scope, or when requirements are unclear, ambiguous, or only exist as a vague idea. Use when a single requirement spans several independently testable capabilities and needs decomposing into a capability map of modules before specifying. |
146
- | [i3-test-driven-development](skills/i3-test-driven-development/SKILL.md) | Drives development with tests using the red-green-refactor loop. Use when implementing any logic, fixing any bug, or changing any behavior. Use when you need to prove that code works, when a bug report arrives, or when you're about to modify existing functionality. |
147
- | [i3-using-agent-skills](skills/i3-using-agent-skills/SKILL.md) | Discovers and invokes agent skills. Use when starting a session, or when you need to decide which skill or workflow applies to the piece of work at hand. This is the meta-skill that governs how all other skills are discovered and invoked. |
148
-
149
- ## Bundle options
112
+ | [i3-api-and-interface-design](skills/i3-api-and-interface-design/SKILL.md) | 设计稳定的 API、模块接口和类型契约。适用于 REST/GraphQL 端点、模块边界、前后端接口及公共 API 设计。 |
113
+ | [i3-browser-testing-with-devtools](skills/i3-browser-testing-with-devtools/SKILL.md) | 通过 Chrome DevTools MCP 在真实浏览器测试。适用于网页开发或排错、检查 DOM、控制台错误、网络请求、性能及视觉结果;需要配置 chrome-devtools MCP。 |
114
+ | [i3-ci-cd-and-automation](skills/i3-ci-cd-and-automation/SKILL.md) | 配置 CI/CD 构建与部署流水线。适用于每次 PR 自动执行 lint 和测试、失败阻止合并,配置持续集成质量门禁与部署策略。 |
115
+ | [i3-code-review-and-quality](skills/i3-code-review-and-quality/SKILL.md) | 按正确性、可读性、架构、安全与性能审查代码。适用于合并前审查自己、其他代理或人工编写的改动,包括 diff、PR 和内联代码评审。 |
116
+ | [i3-code-simplification](skills/i3-code-simplification/SKILL.md) | 在保持行为不变的前提下简化代码。适用于简化现有代码结构、重构复杂逻辑、保留全部现有行为,并提高可读性、维护性与可扩展性。 |
117
+ | [i3-constraint-driven-development](skills/i3-constraint-driven-development/SKILL.md) | 把项目质量标准写入 CONSTRAINTS.md 并落实为约束。适用于制定无障碍、性能、覆盖率等门槛,选择合理默认值,防止跳过测试、削弱断言、压低阈值、屏蔽错误或以空实现通过检查。 |
118
+ | [i3-context-engineering](skills/i3-context-engineering/SKILL.md) | 优化代理上下文与项目规则。适用于新会话、输出质量下降、任务切换,以及配置项目规则文件、上下文和提示。 |
119
+ | [i3-debugging-and-error-recovery](skills/i3-debugging-and-error-recovery/SKILL.md) | 系统复现故障、定位根因并验证修复。适用于测试失败、构建损坏、运行崩溃、功能回归、异常报错或行为不符合预期。 |
120
+ | [i3-deprecation-and-migration](skills/i3-deprecation-and-migration/SKILL.md) | 管理废弃与迁移。适用于替换旧系统、API 或功能、迁移用户、生产数据库无停机扩展/收缩,以及决定维护或退役现有代码。 |
121
+ | [i3-documentation-and-adrs](skills/i3-documentation-and-adrs/SKILL.md) | 记录文档、架构决策与设计理由。适用于编写 ADR、公共 API 发生变化时补充文档、交付功能,以及保存后续工程师和代理理解设计取舍所需的背景。 |
122
+ | [i3-doubt-driven-development](skills/i3-doubt-driven-development/SKILL.md) | 对非平凡决策进行独立的对抗式审查。适用于核查假设、压力测试计划、寻找隐藏失败模式、陌生代码、安全敏感功能、生产认证或高风险不可逆迁移。 |
123
+ | [i3-frontend-ui-engineering](skills/i3-frontend-ui-engineering/SKILL.md) | 实现可访问、响应式、具有生产质量的前端界面。适用于页面/组件开发、布局、状态管理、WCAG 无障碍、交互与视觉质量改进。 |
124
+ | [i3-git-workflow-and-versioning](skills/i3-git-workflow-and-versioning/SKILL.md) | 组织 Git 分支、提交、冲突处理、PR 与版本发布。适用于任何代码改动、拆分工作区改动、并行开发、推送、合并、语义化版本、标签及变更日志。 |
125
+ | [i3-idea-refine](skills/i3-idea-refine/SKILL.md) | 通过发散与收敛思考完善模糊想法。适用于创意探索、细化方案、验证假设、压力测试计划,以及确定方向前比较更多选项。 |
126
+ | [i3-incremental-implementation](skills/i3-incremental-implementation/SKILL.md) | 把改动拆成小而完整、可验证的实现切片。适用于涉及多个文件的功能、领取计划中的下一任务、特性开关发布,以及避免一次落地过大的改动。 |
127
+ | [i3-interview-me](skills/i3-interview-me/SKILL.md) | 通过一次一个问题的访谈或采访明确真实意图,直到约 95% 把握并确信理解用户想要什么。适用于需求不充分、缺少目标用户或目的、用户要求访谈/质询,或在提出方案、规格与计划前发现关键需求仍在猜测。 |
128
+ | [i3-observability-and-instrumentation](skills/i3-observability-and-instrumentation/SKILL.md) | 为生产行为增加日志、指标、链路追踪与告警。适用于新增可观测性、交付生产功能并提供运行证据,以及无法从已有数据定位生产故障。 |
129
+ | [i3-performance-optimization](skills/i3-performance-optimization/SKILL.md) | 优化前端、后端、查询和数据库性能。适用于性能指标、回归、Core Web Vitals、慢加载、N+1 查询或性能剖析发现瓶颈。 |
130
+ | [i3-planning-and-task-breakdown](skills/i3-planning-and-task-breakdown/SKILL.md) | 把规格和明确需求拆成有顺序的任务。适用于实施计划、验收条件、验证步骤、依赖排序、范围估算,以及大任务或并行工作安排。 |
131
+ | [i3-security-and-hardening](skills/i3-security-and-hardening/SKILL.md) | 分析漏洞、威胁与安全加固。适用于不可信输入、webhook URL 服务端请求与 SSRF 防护、认证授权、会话、数据存储、外部集成、OWASP Top Ten、依赖 CVE、供应链、个人数据与隐私合规。 |
132
+ | [i3-shipping-and-launch](skills/i3-shipping-and-launch/SKILL.md) | 检查生产发布条件与回滚策略。适用于上线准备、发布清单、监控、分阶段部署和回滚方案,确保风险有依据且可恢复。 |
133
+ | [i3-source-driven-development](skills/i3-source-driven-development/SKILL.md) | 以官方文档和权威来源支撑实现决策。适用于核对框架/库用法、验证方案、查证 API 和避免过时实现,并保留来源证据。 |
134
+ | [i3-spec-driven-development](skills/i3-spec-driven-development/SKILL.md) | 在实现前形成结构化规格。适用于新项目、功能或重大改动、PRD、需求澄清、目标与范围、场景和验收标准,以及将需求拆为独立可测试能力。 |
135
+ | [i3-test-driven-development](skills/i3-test-driven-development/SKILL.md) | 执行测试先行的红绿重构循环。适用于实现逻辑、修复缺陷、修改行为、复现报错及证明改动有效;缺陷修复使用先证明失败的 Prove-It 模式。 |
136
+ | [i3-using-agent-skills](skills/i3-using-agent-skills/SKILL.md) | 发现并调用合适的工程技能。适用于开始会话、判断任务意图、选择技能或工作流;作为元技能协调其他技能的发现和调用。 |
137
+
138
+ ## Agent 角色
139
+
140
+ | 角色 | 中文说明 |
141
+ | --- | --- |
142
+ | [code-reviewer](agents/code-reviewer.md) | 高级代码审查角色,评估正确性、可读性、架构、安全和性能。适用于合并前完整代码评审,并输出有严重程度和证据的问题报告。 |
143
+ | [security-auditor](agents/security-auditor.md) | 安全工程角色,分析漏洞、威胁模型与安全编码。适用于安全审查、认证授权、威胁分析和加固建议,并输出审计报告。 |
144
+ | [test-engineer](agents/test-engineer.md) | 质量工程角色,设计测试策略、编写测试并分析覆盖率。适用于测试套件设计、现有代码测试、边界/错误/并发路径与测试质量评估。 |
145
+ | [web-performance-auditor](agents/web-performance-auditor.md) | 网页性能角色,分析 Core Web Vitals、加载、渲染与网络。适用于性能审计、CWV 分析和识别结构性性能反模式。 |
146
+
147
+ ## 导出与升级
150
148
 
151
149
  ```bash
152
150
  npx @givolt/i3-composer-agent --extract --dir /path/to/plugin
@@ -154,6 +152,8 @@ npx @givolt/i3-composer-agent --codebuddy --dir /path/to/plugin --dry-run
154
152
  npx @givolt/i3-composer-agent --codebuddy --dir /path/to/plugin --force
155
153
  ```
156
154
 
157
- Explicit `--dir` retains the plugin preparation behavior. Successful replacement
158
- removes the previous bundle and this plugin's historical backups. Repository-scoped
159
- AGENTS.md and CLAUDE.md are not copied into business projects.
155
+ 明确 `--dir` 保持完整插件准备行为。成功替换后清理旧插件和所属历史备份。
156
+ 升级时重新运行安装命令并确认替换,完成后重新加载宿主。
157
+ 仓库维护用的 AGENTS.md、CLAUDE.md 不复制进业务项目。
158
+ Codex 通过 `$i3-spec-driven-development` 等技能名调用;其原生 `/plan` 是宿主计划模式。
159
+ 中文语言策略、工程方法、审批要求与工具限制在各入口独立生效。
@@ -1,8 +1,20 @@
1
1
  ---
2
2
  name: code-reviewer
3
- description: Senior code reviewer that evaluates changes across five dimensions — correctness, readability, architecture, security, and performance. Use for thorough code review before merge.
3
+ description: "高级代码审查角色,评估正确性、可读性、架构、安全和性能。适用于合并前完整代码评审,并输出有严重程度和证据的问题报告。"
4
+ # i3-description-source: "description: Senior code reviewer that evaluates changes across five dimensions — correctness, readability, architecture, security, and performance. Use for thorough code review before merge."
4
5
  ---
5
6
 
7
+ <!-- i3:zh-CN:start -->
8
+ ## 中文交互与输出
9
+
10
+ 默认使用简体中文回复,包括追问、选项说明、阶段进度、分析、规格、计划、验收、代码审查与发布报告。只有用户明确要求其他语言时才切换;输入中出现英文术语、代码或引用不构成切换语言的要求。
11
+ 下文的工程步骤、审批要求、退出条件和工具约束完整有效。英文示例中的人类可读标题、说明和占位内容在实际输出时应译为中文;保留原有信息与验证标准,不删减方法。
12
+ Skill/Command/Agent 标识、文件路径、命令参数、代码/API 名称、工具调用参数、JSON 键/类型/枚举、机器状态、测试期望字面量及引用原文保持原样。生成文档正文用中文,SPEC.md、tasks/plan.md、tasks/todo.md、CONSTRAINTS.md 等约定路径不改名。
13
+ 严重程度按原规则判断,面向用户可写“严重(Critical)”“必须修复(Required)”“小问题(Nit)”“可选(Optional)”“建议考虑(Consider)”“仅供参考(FYI)”;High/Medium/Low、APPROVE/REQUEST CHANGES 和 GO/NO-GO 保留其原始语义与机器值。不得因翻译降低门槛,角色不能互相委派。
14
+
15
+ 适用说明:高级代码审查角色,评估正确性、可读性、架构、安全和性能。适用于合并前完整代码评审,并输出有严重程度和证据的问题报告。
16
+ <!-- i3:zh-CN:end -->
17
+
6
18
  # Senior Code Reviewer
7
19
 
8
20
  You are an experienced Staff Engineer conducting a thorough code review. Your role is to evaluate the proposed changes and provide actionable, categorized feedback.
@@ -1,8 +1,20 @@
1
1
  ---
2
2
  name: security-auditor
3
- description: Security engineer focused on vulnerability detection, threat modeling, and secure coding practices. Use for security-focused code review, threat analysis, or hardening recommendations.
3
+ description: "安全工程角色,分析漏洞、威胁模型与安全编码。适用于安全审查、认证授权、威胁分析和加固建议,并输出审计报告。"
4
+ # i3-description-source: "description: Security engineer focused on vulnerability detection, threat modeling, and secure coding practices. Use for security-focused code review, threat analysis, or hardening recommendations."
4
5
  ---
5
6
 
7
+ <!-- i3:zh-CN:start -->
8
+ ## 中文交互与输出
9
+
10
+ 默认使用简体中文回复,包括追问、选项说明、阶段进度、分析、规格、计划、验收、代码审查与发布报告。只有用户明确要求其他语言时才切换;输入中出现英文术语、代码或引用不构成切换语言的要求。
11
+ 下文的工程步骤、审批要求、退出条件和工具约束完整有效。英文示例中的人类可读标题、说明和占位内容在实际输出时应译为中文;保留原有信息与验证标准,不删减方法。
12
+ Skill/Command/Agent 标识、文件路径、命令参数、代码/API 名称、工具调用参数、JSON 键/类型/枚举、机器状态、测试期望字面量及引用原文保持原样。生成文档正文用中文,SPEC.md、tasks/plan.md、tasks/todo.md、CONSTRAINTS.md 等约定路径不改名。
13
+ 严重程度按原规则判断,面向用户可写“严重(Critical)”“必须修复(Required)”“小问题(Nit)”“可选(Optional)”“建议考虑(Consider)”“仅供参考(FYI)”;High/Medium/Low、APPROVE/REQUEST CHANGES 和 GO/NO-GO 保留其原始语义与机器值。不得因翻译降低门槛,角色不能互相委派。
14
+
15
+ 适用说明:安全工程角色,分析漏洞、威胁模型与安全编码。适用于安全审查、认证授权、威胁分析和加固建议,并输出审计报告。
16
+ <!-- i3:zh-CN:end -->
17
+
6
18
  # Security Auditor
7
19
 
8
20
  You are an experienced Security Engineer conducting a security review. Your role is to identify vulnerabilities, assess risk, and recommend mitigations. You focus on practical, exploitable issues rather than theoretical risks.
@@ -1,8 +1,20 @@
1
1
  ---
2
2
  name: test-engineer
3
- description: QA engineer specialized in test strategy, test writing, and coverage analysis. Use for designing test suites, writing tests for existing code, or evaluating test quality.
3
+ description: "质量工程角色,设计测试策略、编写测试并分析覆盖率。适用于测试套件设计、现有代码测试、边界/错误/并发路径与测试质量评估。"
4
+ # i3-description-source: "description: QA engineer specialized in test strategy, test writing, and coverage analysis. Use for designing test suites, writing tests for existing code, or evaluating test quality."
4
5
  ---
5
6
 
7
+ <!-- i3:zh-CN:start -->
8
+ ## 中文交互与输出
9
+
10
+ 默认使用简体中文回复,包括追问、选项说明、阶段进度、分析、规格、计划、验收、代码审查与发布报告。只有用户明确要求其他语言时才切换;输入中出现英文术语、代码或引用不构成切换语言的要求。
11
+ 下文的工程步骤、审批要求、退出条件和工具约束完整有效。英文示例中的人类可读标题、说明和占位内容在实际输出时应译为中文;保留原有信息与验证标准,不删减方法。
12
+ Skill/Command/Agent 标识、文件路径、命令参数、代码/API 名称、工具调用参数、JSON 键/类型/枚举、机器状态、测试期望字面量及引用原文保持原样。生成文档正文用中文,SPEC.md、tasks/plan.md、tasks/todo.md、CONSTRAINTS.md 等约定路径不改名。
13
+ 严重程度按原规则判断,面向用户可写“严重(Critical)”“必须修复(Required)”“小问题(Nit)”“可选(Optional)”“建议考虑(Consider)”“仅供参考(FYI)”;High/Medium/Low、APPROVE/REQUEST CHANGES 和 GO/NO-GO 保留其原始语义与机器值。不得因翻译降低门槛,角色不能互相委派。
14
+
15
+ 适用说明:质量工程角色,设计测试策略、编写测试并分析覆盖率。适用于测试套件设计、现有代码测试、边界/错误/并发路径与测试质量评估。
16
+ <!-- i3:zh-CN:end -->
17
+
6
18
  # Test Engineer
7
19
 
8
20
  You are an experienced QA Engineer focused on test strategy and quality assurance. Your role is to design test suites, write tests, analyze coverage gaps, and ensure that code changes are properly verified.
@@ -1,8 +1,20 @@
1
1
  ---
2
2
  name: web-performance-auditor
3
- description: Web performance engineer focused on Core Web Vitals, loading, rendering, and network optimization. Use for performance-focused audits, CWV analysis, and identifying structural performance anti-patterns in web applications.
3
+ description: "网页性能角色,分析 Core Web Vitals、加载、渲染与网络。适用于性能审计、CWV 分析和识别结构性性能反模式。"
4
+ # i3-description-source: "description: Web performance engineer focused on Core Web Vitals, loading, rendering, and network optimization. Use for performance-focused audits, CWV analysis, and identifying structural performance anti-patterns in web applications."
4
5
  ---
5
6
 
7
+ <!-- i3:zh-CN:start -->
8
+ ## 中文交互与输出
9
+
10
+ 默认使用简体中文回复,包括追问、选项说明、阶段进度、分析、规格、计划、验收、代码审查与发布报告。只有用户明确要求其他语言时才切换;输入中出现英文术语、代码或引用不构成切换语言的要求。
11
+ 下文的工程步骤、审批要求、退出条件和工具约束完整有效。英文示例中的人类可读标题、说明和占位内容在实际输出时应译为中文;保留原有信息与验证标准,不删减方法。
12
+ Skill/Command/Agent 标识、文件路径、命令参数、代码/API 名称、工具调用参数、JSON 键/类型/枚举、机器状态、测试期望字面量及引用原文保持原样。生成文档正文用中文,SPEC.md、tasks/plan.md、tasks/todo.md、CONSTRAINTS.md 等约定路径不改名。
13
+ 严重程度按原规则判断,面向用户可写“严重(Critical)”“必须修复(Required)”“小问题(Nit)”“可选(Optional)”“建议考虑(Consider)”“仅供参考(FYI)”;High/Medium/Low、APPROVE/REQUEST CHANGES 和 GO/NO-GO 保留其原始语义与机器值。不得因翻译降低门槛,角色不能互相委派。
14
+
15
+ 适用说明:网页性能角色,分析 Core Web Vitals、加载、渲染与网络。适用于性能审计、CWV 分析和识别结构性性能反模式。
16
+ <!-- i3:zh-CN:end -->
17
+
6
18
  # Web Performance Auditor
7
19
 
8
20
  You are an experienced Web Performance Engineer conducting a performance audit. Your role is to identify bottlenecks, assess their real-world user impact, and recommend concrete fixes. You prioritize findings by actual or likely effect on Core Web Vitals and user experience.
@@ -13,38 +13,41 @@ const identity = `i3 Composer Agent v${pkg.version}`;
13
13
  const help = `${identity}
14
14
  ${pkg.name}
15
15
 
16
- Install engineering skills with a multi-tool installation wizard.
16
+ 通过多工具安装向导安装软件工程技能,默认中文回复。
17
17
 
18
- Usage:
18
+ 用法:
19
19
  npx ${pkg.name}
20
20
  npx ${pkg.name} --codebuddy
21
- npx ${pkg.name} --workbuddy
22
- npx ${pkg.name} --agents codebuddy,workbuddy --scope project --yes
21
+ npx ${pkg.name} --workbuddy --scope global
22
+ npx ${pkg.name} --agents codebuddy,workbuddy --scope global --yes
23
23
  npx ${pkg.name} --agents codebuddy,codex --scope project --yes
24
24
  npx ${pkg.name} --prepare --claude --dir <directory>
25
25
  npx ${pkg.name} --extract --dir <directory>
26
26
 
27
- Options:
28
- --agents <ids> Comma-separated tool IDs; multiple tools are supported
29
- --codebuddy Preselect CodeBuddy desktop IDE / CodeBuddy Code
30
- --workbuddy Preselect WorkBuddy (shared project / independent global)
31
- --codex Preselect Codex
32
- --claude Preselect Claude Code
33
- --scope <scope> project or global (or use --global / --local)
34
- --project-dir <dir> Project installation root (default: current directory)
35
- --yes Confirm explicit noninteractive installation
36
- --list-agents List all supported tool directories
37
- --prepare Prepare a complete plugin for native plugin registration
38
- --dir <directory> Plugin output directory; implies --prepare
39
- --dry-run Show the installation or bundle plan without writing files
40
- --force Replace existing assets; remove old files after success
41
- --version Print the package version
42
- --help Show this help
27
+ 选项:
28
+ --agents <ids> 工具 ID,逗号分隔,可同时选择多个
29
+ --codebuddy 预选 CodeBuddy 桌面 IDE / CodeBuddy Code
30
+ --workbuddy 预选 WorkBuddy(桌面版建议全局安装)
31
+ --codex 预选 Codex
32
+ --claude 预选 Claude Code
33
+ --scope <scope> project 项目 / global 全局(也可 --global / --local)
34
+ --project-dir <dir> 项目安装根目录,默认当前目录
35
+ --yes 确认明确指定的非交互安装
36
+ --list-agents 列出全部支持的工具目录
37
+ --prepare 准备完整插件,供宿主原生插件管理器注册
38
+ --extract 导出完整插件内容
39
+ --dir <directory> 插件输出目录;隐含 --prepare
40
+ --dry-run 显示安装/导出计划,不写入文件
41
+ --force 确认替换已有内容,成功后清理旧文件
42
+ --version 输出包版本
43
+ --help 显示帮助
43
44
 
44
- The terminal wizard selects tools and scope, then installs native skill files.
45
- CodeBuddy, WorkBuddy and Claude Code also receive short commands and personas.
46
- Other tools receive skills and references; command availability is host-specific.
47
- Use --prepare for complete plugins, including hooks and host registration.
45
+ 终端向导先显示常用工具,WorkBuddy 在第 2 项;选择“更多”可分页/搜索全部工具。
46
+ 编号或 ID 支持多选,跨页保留选择;回车或 done/完成确认,q/取消退出。
47
+ CodeBuddy、WorkBuddy、Claude Code 同时安装短命令和 Agent 角色。
48
+ 其他工具获得 Skills 与参考资料,短命令支持取决于宿主。
49
+ WorkBuddy 桌面版建议全局安装,便于技能列表和输入补全发现。
50
+ 完整插件及 Hook 注册使用 --prepare。
48
51
  `;
49
52
 
50
53
  function quote(value) { return "'" + value.replaceAll("'", "'\\''") + "'"; }
@@ -54,7 +57,7 @@ function realDestination(target) {
54
57
  while (!fs.existsSync(existing)) {
55
58
  suffix.unshift(path.basename(existing));
56
59
  const parent = path.dirname(existing);
57
- if (parent === existing) throw new Error(`Cannot resolve destination: ${target}`);
60
+ if (parent === existing) throw new Error(`无法解析输出目录: ${target}`);
58
61
  existing = parent;
59
62
  }
60
63
  return path.join(fs.realpathSync(existing), ...suffix);
@@ -67,29 +70,29 @@ function prepare() {
67
70
  for (let i = 0; i < args.length; i++) {
68
71
  const arg = args[i];
69
72
  if (arg === '--prepare') continue;
70
- if (arg === '--workbuddy') throw new Error('For native WorkBuddy installation, use --workbuddy --scope project|global --yes without --prepare or --dir.');
73
+ if (arg === '--workbuddy') throw new Error('安装 WorkBuddy 原生技能请使用 --workbuddy --scope project|global --yes,移除 --prepare 和 --dir。');
71
74
  if (['--codebuddy', '--codex', '--claude', '--extract'].includes(arg)) {
72
- if (host) throw new Error('Choose exactly one host flag or --extract.');
75
+ if (host) throw new Error('请选择一个宿主参数或 --extract。');
73
76
  host = arg.slice(2);
74
77
  } else if (arg === '--dir') {
75
- if (!args[i + 1] || args[i + 1].startsWith('--')) throw new Error('--dir requires a directory.');
78
+ if (!args[i + 1] || args[i + 1].startsWith('--')) throw new Error('--dir 需要指定目录。');
76
79
  directory = path.resolve(args[++i]);
77
80
  } else if (arg === '--dry-run') dryRun = true;
78
81
  else if (arg === '--force') force = true;
79
- else throw new Error(`Unknown option: ${arg}`);
82
+ else throw new Error(`未知选项: ${arg}`);
80
83
  }
81
- if (!host) throw new Error('Choose --codebuddy, --codex, --claude, or --extract.');
84
+ if (!host) throw new Error('请选择 --codebuddy、--codex、--claude 或 --extract。');
82
85
  directory = realDestination(directory);
83
86
  const sourceRoot = fs.realpathSync(root);
84
87
  if (directory === sourceRoot || directory.startsWith(sourceRoot + path.sep) || sourceRoot.startsWith(directory + path.sep)) {
85
- throw new Error('The output directory must be outside this package directory.');
88
+ throw new Error('输出目录必须位于包目录之外。');
86
89
  }
87
90
  let exists = false;
88
91
  try { fs.lstatSync(directory); exists = true; } catch (error) { if (error.code !== 'ENOENT') throw error; }
89
92
  if (exists) {
90
- if (!force) throw new Error(`Output already exists: ${directory}. Choose a new directory or use --force for an i3 bundle.`);
93
+ if (!force) throw new Error(`输出目录已存在: ${directory}. 请选择新目录,或对已有 i3 插件使用 --force。`);
91
94
  const manifest = JSON.parse(fs.readFileSync(path.join(directory, 'plugin.json'), 'utf8'));
92
- if (manifest.name !== name) throw new Error('Refusing to replace a directory belonging to another plugin.');
95
+ if (manifest.name !== name) throw new Error('不能替换属于其他插件的目录。');
93
96
  }
94
97
  if (dryRun) {
95
98
  console.log(JSON.stringify({ name, version: pkg.version, directory, host, files: pkg.i3ComposerAgent.pluginFiles, replacesExisting: exists }, null, 2));
@@ -108,7 +111,7 @@ function prepare() {
108
111
  recursive: true,
109
112
  filter: file => {
110
113
  if (path.basename(file) === '.DS_Store') return false;
111
- if (fs.lstatSync(file).isSymbolicLink()) throw new Error(`Bundle contains a symlink: ${file}`);
114
+ if (fs.lstatSync(file).isSymbolicLink()) throw new Error(`插件内容中包含符号链接: ${file}`);
112
115
  return !/(?:^|[\\/])(?:results|node_modules|\.git)(?:[\\/]|$)/.test(path.relative(root, file));
113
116
  },
114
117
  });
@@ -130,18 +133,18 @@ function prepare() {
130
133
  });
131
134
  }
132
135
  console.log(identity);
133
- console.log(`Prepared ${name} at ${directory}`);
136
+ console.log(`已在 ${directory} 准备好 ${name}`);
134
137
  if (host === 'extract') return;
135
- console.log('\nRegister and enable the plugin with these native commands:');
138
+ console.log('\n请在目标宿主中执行以下原生命令注册并启用插件:');
136
139
  const selector = `${name}@${name}`;
137
140
  if (host === 'codex') {
138
141
  console.log(`codex plugin marketplace add ${quote(directory)}`);
139
142
  console.log(`codex plugin add ${selector}`);
140
- console.log('Start a new Codex session and invoke the existing skill names. Lifecycle slash-command adaptation is separate.');
143
+ console.log('请新建 Codex 会话,通过 $i3- 开头的技能名称调用;生命周期短命令由宿主适配决定。');
141
144
  } else {
142
145
  console.log(`/plugin marketplace add ${quote(directory)}`);
143
146
  console.log(`/plugin install ${selector}`);
144
- console.log(`Use /${name}:i3-spec, /${name}:i3-plan, /${name}:i3-build, and /${name}:i3-ship in ${host === 'claude' ? 'Claude Code' : 'CodeBuddy'}.`);
147
+ console.log(`在目标宿主使用 /${name}:i3-spec、/${name}:i3-plan、/${name}:i3-build 和 /${name}:i3-ship: ${host === 'claude' ? 'Claude Code' : 'CodeBuddy'}.`);
145
148
  }
146
149
  }
147
150
  async function main() {
@@ -150,7 +153,7 @@ async function main() {
150
153
  if (args.some(arg => ['--extract', '--prepare', '--dir'].includes(arg))) { prepare(); return; }
151
154
  const installer = require('./install.cjs');
152
155
  if (args.length === 1 && args[0] === '--list-agents') {
153
- for (const agent of installer.registry.agents) console.log(`${agent.id.padEnd(20)} ${agent.label}${agent.globalSkillsDir ? '' : ' (project only)'}`);
156
+ for (const agent of require('./tool-menu.cjs').orderedAgents) console.log(`${agent.id.padEnd(20)} ${agent.label}${agent.globalSkillsDir ? '' : '(仅项目安装)'}`);
154
157
  return;
155
158
  }
156
159
  const options = { agents: [], projectDir: process.cwd() };
@@ -158,27 +161,27 @@ async function main() {
158
161
  const arg = args[i];
159
162
  if (['--codebuddy', '--workbuddy', '--codex', '--claude'].includes(arg)) options.agents.push(arg.slice(2));
160
163
  else if (['--agents', '--scope', '--project-dir'].includes(arg)) {
161
- if (!args[i + 1] || args[i + 1].startsWith('--')) throw new Error(`${arg} requires a value.`);
164
+ if (!args[i + 1] || args[i + 1].startsWith('--')) throw new Error(`${arg} 需要指定值。`);
162
165
  const value = args[++i];
163
166
  if (arg === '--agents') options.agents.push(value);
164
- else if (arg === '--scope') { if (options.scope && options.scope !== value) throw new Error('Choose one installation scope.'); options.scope = value; }
167
+ else if (arg === '--scope') { if (options.scope && options.scope !== value) throw new Error('请选择一个安装范围。'); options.scope = value; }
165
168
  else options.projectDir = path.resolve(value);
166
169
  } else if (arg === '--global' || arg === '--local') {
167
170
  const scope = arg === '--global' ? 'global' : 'project';
168
- if (options.scope && options.scope !== scope) throw new Error('Choose one installation scope.');
171
+ if (options.scope && options.scope !== scope) throw new Error('请选择一个安装范围。');
169
172
  options.scope = scope;
170
173
  } else if (arg === '--yes') options.yes = true;
171
174
  else if (arg === '--force') options.force = true;
172
175
  else if (arg === '--dry-run') options.dryRun = true;
173
- else throw new Error(`Unknown option: ${arg}`);
176
+ else throw new Error(`未知选项: ${arg}`);
174
177
  }
175
178
  options.agents = installer.selectAgents(options.agents);
176
179
  if (process.stdin.isTTY && process.stdout.isTTY && !options.yes && !options.dryRun) {
177
180
  const selection = await require('./wizard.cjs').choose(options, identity);
178
- if (!selection) { console.log('Installation cancelled. No files changed.'); return; }
181
+ if (!selection) { console.log('安装已取消,未修改文件。'); return; }
179
182
  Object.assign(options, selection);
180
183
  } else if (!options.agents.length || !options.scope || (!options.yes && !options.dryRun)) {
181
- throw new Error('Use an interactive terminal, or specify --agents <ids> --scope project|global --yes.');
184
+ throw new Error('请在交互终端使用向导,或明确指定 --agents <ids> --scope project|global --yes。');
182
185
  }
183
186
  const plan = installer.planInstallation(options);
184
187
  if (options.dryRun) {
@@ -187,19 +190,19 @@ async function main() {
187
190
  }
188
191
  if (!options.yes) {
189
192
  const confirmed = await require('./wizard.cjs').confirm(plan);
190
- if (!confirmed) { console.log('Installation cancelled. No files changed.'); return; }
193
+ if (!confirmed) { console.log('安装已取消,未修改文件。'); return; }
191
194
  options.force = plan.conflicts.length > 0;
192
195
  }
193
196
  installer.executeInstallation(plan, { force: options.force });
194
197
  console.log(identity);
195
- if (plan.reused.length) console.log(`Reused ${plan.reused.length} unchanged assets from the same package version.`);
198
+ if (plan.reused.length) console.log(`已复用同版本的 ${plan.reused.length} 个未修改内容。`);
196
199
  for (const target of plan.targets) {
197
- console.log(`Installed ${target.agents.join(', ')} skills at ${target.skillsDirectory}`);
198
- if (target.commandsDirectory) console.log(`Commands: /i3-spec, /i3-plan, /i3-build, /i3-ship (all ${fs.readdirSync(target.commandsDirectory).filter(file => file.endsWith('.md')).length} workflows) at ${target.commandsDirectory}`);
200
+ console.log(`已为 ${target.agents.join(', ')} 安装技能:${target.skillsDirectory}`);
201
+ if (target.commandsDirectory) console.log(`命令:/i3-spec、/i3-plan、/i3-build、/i3-ship(共 ${fs.readdirSync(target.commandsDirectory).filter(file => file.endsWith('.md')).length} 个工作流):${target.commandsDirectory}`);
199
202
  }
200
- console.log('Reload the IDE window or start a new host session to discover installed files.');
201
- if (plan.agents.some(id => !['codebuddy', 'workbuddy', 'claude-code'].includes(id))) console.log('These tools use the existing skill IDs; lifecycle slash-command support depends on the host.');
202
- console.log('Native skill installation does not enable plugin hooks.');
203
- if (plan.agents.some(id => ['codebuddy', 'codex', 'claude-code'].includes(id))) console.log('For CodeBuddy, Codex or Claude Code plugin registration, use --prepare with the matching host flag.');
203
+ console.log('请重新加载 IDE 窗口或新建宿主会话以发现安装内容。');
204
+ if (plan.agents.some(id => !['codebuddy', 'workbuddy', 'claude-code'].includes(id))) console.log('这些工具通过技能 ID 调用;生命周期短命令支持取决于宿主。');
205
+ console.log('原生技能安装完成;插件 Hook 需按宿主方式注册和启用。');
206
+ if (plan.agents.some(id => ['codebuddy', 'codex', 'claude-code'].includes(id))) console.log('如需 CodeBuddy、Codex 或 Claude Code 完整插件,请使用 --prepare 和对应宿主参数。');
204
207
  }
205
208
  main().catch(error => { console.error(`${name}: ${error.message}`); process.exitCode = 1; });