@givolt/i3-composer-agent 2.2.1 → 2.2.3
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.
- package/.agents/plugins/marketplace.json +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/README.md +46 -18
- package/bin/asset-fingerprint.cjs +3 -5
- package/bin/i3-composer-agent.cjs +10 -5
- package/bin/install.cjs +54 -66
- package/bin/legacy-native-files.json +329 -0
- package/bin/native-command-validation.cjs +22 -0
- package/bin/native-content.cjs +0 -1
- package/bin/native-layout.cjs +169 -0
- package/bin/native-migration.cjs +99 -0
- package/bin/native-runtime.cjs +62 -0
- package/bin/wizard.cjs +3 -1
- package/docs/advanced-per-agent-configuration.md +78 -0
- package/docs/codebuddy-setup.md +4 -3
- package/docs/codex-setup.md +5 -3
- package/docs/workbuddy-setup.md +8 -6
- package/evals/README.md +40 -21
- package/evals/skill-impact.md +6 -0
- package/package.json +39 -18
- package/plugin.json +1 -1
- package/scripts/floor-guard-reference-test.js +291 -0
- package/scripts/lib/skill-lint-test.js +650 -0
- package/scripts/run-evals-test.js +623 -0
- package/scripts/run-regressions.js +19 -0
- package/scripts/validate-artifact-paths-test.js +179 -0
- package/scripts/validate-commands-test.js +216 -0
- package/scripts/validate-reference-links-test.js +495 -0
- package/scripts/validate-versions-test.js +32 -0
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Installed as i3-composer-agent/scripts/lib/installation.js. Resolve from
|
|
4
|
+
// this file, never the caller's working directory or the host's package.json.
|
|
5
|
+
const fs = require('node:fs');
|
|
6
|
+
const path = require('node:path');
|
|
7
|
+
const EXPECTED_VERSION = '__I3_INSTALL_VERSION__';
|
|
8
|
+
const root = path.resolve(__dirname, '../../..');
|
|
9
|
+
const manifestPath = path.join(root, '.i3-composer-agent.json');
|
|
10
|
+
|
|
11
|
+
function resolveOwned(relative) {
|
|
12
|
+
if (typeof relative !== 'string' || relative.includes('\\') || relative.includes(':')
|
|
13
|
+
|| relative.includes('\0') || relative.split('/').some(part => ['', '.', '..'].includes(part))) {
|
|
14
|
+
throw new Error(`安装清单路径无效:${relative}`);
|
|
15
|
+
}
|
|
16
|
+
let file = root;
|
|
17
|
+
for (const part of relative.split('/')) {
|
|
18
|
+
file = path.join(file, part);
|
|
19
|
+
if (!fs.existsSync(file)) throw new Error(`安装内容缺失:${relative}`);
|
|
20
|
+
if (fs.lstatSync(file).isSymbolicLink()) throw new Error(`安装内容不能通过符号链接替代:${relative}`);
|
|
21
|
+
}
|
|
22
|
+
if (!fs.statSync(file).isFile()) throw new Error(`安装文件无效:${relative}`);
|
|
23
|
+
return file;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
function loadInstallation() {
|
|
27
|
+
let manifest;
|
|
28
|
+
try { manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); }
|
|
29
|
+
catch (error) { throw new Error(`无法读取安装清单 ${manifestPath}:${error.message}`); }
|
|
30
|
+
if (manifest.name !== 'i3-composer-agent' || manifest.layoutVersion !== 3
|
|
31
|
+
|| manifest.version !== EXPECTED_VERSION || !Array.isArray(manifest.assets) || !manifest.assets.length) {
|
|
32
|
+
throw new Error(`安装清单的名称、布局或版本不匹配:${manifestPath}`);
|
|
33
|
+
}
|
|
34
|
+
const assets = new Set(manifest.assets);
|
|
35
|
+
for (const [category, suffix] of [['skills', '/SKILL.md'], ['commands', '.md'], ['agents', '.md']]) {
|
|
36
|
+
const names = manifest.catalog?.[category];
|
|
37
|
+
if (!Array.isArray(names) || !names.length || new Set(names).size !== names.length) {
|
|
38
|
+
throw new Error(`安装清单缺少有效的 ${category} 目录项:${manifestPath}`);
|
|
39
|
+
}
|
|
40
|
+
for (const name of names) {
|
|
41
|
+
if (typeof name !== 'string' || !/^[a-z0-9][a-z0-9-]*$/.test(name)
|
|
42
|
+
|| !assets.has(`${category}/${name}${suffix}`)) throw new Error(`安装清单目录项无效:${category}/${name}`);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
for (const relative of assets) resolveOwned(relative);
|
|
46
|
+
const resources = {};
|
|
47
|
+
for (const category of ['references', 'evals', 'hooks', 'scripts', 'docs', 'adapters']) {
|
|
48
|
+
const relative = 'i3-composer-agent/' + category;
|
|
49
|
+
if (manifest.resources?.[category] !== relative || ![...assets].some(file => file.startsWith(relative + '/'))) {
|
|
50
|
+
throw new Error(`安装清单缺少资源:${category}`);
|
|
51
|
+
}
|
|
52
|
+
resources[category] = path.join(root, relative);
|
|
53
|
+
}
|
|
54
|
+
const toolkitRoot = path.join(root, 'i3-composer-agent');
|
|
55
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(toolkitRoot, 'package.json'), 'utf8'));
|
|
56
|
+
if (pkg.name !== '@givolt/i3-composer-agent' || pkg.type !== 'commonjs' || pkg.version !== EXPECTED_VERSION) {
|
|
57
|
+
throw new Error('配套 package.json 的名称、模块格式或版本与安装不一致');
|
|
58
|
+
}
|
|
59
|
+
return { root, toolkitRoot, manifest, catalog: manifest.catalog, resources, skillsDirectory: path.join(root, 'skills') };
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
module.exports = { loadInstallation };
|
package/bin/wizard.cjs
CHANGED
|
@@ -44,7 +44,9 @@ async function confirm(plan) {
|
|
|
44
44
|
for (const target of plan.targets) {
|
|
45
45
|
console.log(` ${target.agents.join(', ')}: ${target.skillsDirectory}`);
|
|
46
46
|
if (target.commandsDirectory) console.log(` 命令:${target.commandsDirectory}`);
|
|
47
|
-
console.log(`
|
|
47
|
+
console.log(` 评测:${target.evalsDirectory}`);
|
|
48
|
+
console.log(` 脚本:${target.scriptsDirectory}`);
|
|
49
|
+
console.log(` Hook:${target.hooksDirectory}`);
|
|
48
50
|
}
|
|
49
51
|
if (plan.conflicts.length) console.log(`将替换 ${plan.conflicts.length} 个已有内容;安装成功后清理旧文件,失败则恢复。`);
|
|
50
52
|
if (plan.reused.length) console.log(`将复用同版本的 ${plan.reused.length} 个未修改内容。`);
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# Advanced per-agent configuration
|
|
2
|
+
|
|
3
|
+
<!-- i3:zh-guide:start -->
|
|
4
|
+
## 中文使用说明
|
|
5
|
+
|
|
6
|
+
按下文完整工程步骤、检查项与验证条件执行。根据任务选择适用步骤,保留证据、风险和退出条件;正文示例中的英文标签在面向用户输出时译为中文。
|
|
7
|
+
|
|
8
|
+
默认使用简体中文解释、追问及生成报告;用户明确要求其他语言时可切换。原方法正文、引用、阈值和审批条件完整保留。代码标识、路径、命令、工具参数、JSON 键/枚举与原文引用保持原样。
|
|
9
|
+
<!-- i3:zh-guide:end -->
|
|
10
|
+
|
|
11
|
+
Skills in this repository are intentionally portable. Every `SKILL.md` keeps its frontmatter limited to the fields the [Agent Skills specification](https://agentskills.io) defines, so the same file works across Claude Code, Cursor, Gemini CLI, Antigravity, and any other spec-conformant client.
|
|
12
|
+
|
|
13
|
+
Several agents also support extra runtime controls: model routing, tool restrictions, turn limits, execution isolation. These controls are valuable, but they are vendor-specific and do not belong in the shared, portable frontmatter. This document explains which controls each agent supports, where they belong, and how to apply them as an opt-in without breaking portability.
|
|
14
|
+
|
|
15
|
+
This is the canonical reference for per-agent configuration, and it supersedes the earlier approach of adding vendor fields to top-level `SKILL.md` frontmatter. Fields such as `kind`, `model`, `temperature`, `max_turns`, `tools`, and `context` must not appear at the top level of a skill. They belong under `metadata` or in a separate per-agent adapter file, as described below.
|
|
16
|
+
|
|
17
|
+
## Principles
|
|
18
|
+
|
|
19
|
+
1. **Keep `SKILL.md` portable.** The Agent Skills specification reserves top-level frontmatter for `name`, `description`, `license`, `compatibility`, `metadata`, and the experimental `allowed-tools`. Vendor or client-specific properties belong under `metadata`, not at the top level.
|
|
20
|
+
2. **Unknown top-level fields are not guaranteed to be ignored.** Many parsers only read `name` and `description` and silently drop the rest, but a strict spec-conformant validator or client may flag or reject unrecognized top-level keys. Putting vendor fields under `metadata` keeps the file conformant everywhere.
|
|
21
|
+
3. **Opt-in, not global.** Runtime controls should be something a user adds for their own agent and workflow, not a default baked into every skill in the repository.
|
|
22
|
+
4. **Prefer generation over hand-editing.** Where a configuration is repetitive and mechanical, generate it from a single source of truth instead of maintaining copies by hand. See [Automating with scripts](#automating-with-scripts).
|
|
23
|
+
|
|
24
|
+
## Where vendor fields belong
|
|
25
|
+
|
|
26
|
+
| Field type | Example | Correct home |
|
|
27
|
+
|---|---|---|
|
|
28
|
+
| Spec fields | `name`, `description`, `license`, `compatibility` | Top-level frontmatter in `SKILL.md` |
|
|
29
|
+
| Vendor metadata | model hints, routing tags | Under the `metadata` key in `SKILL.md` |
|
|
30
|
+
| Runtime orchestration | subagent definitions, turn limits, tool allowlists | A separate per-agent adapter file (see each agent below) |
|
|
31
|
+
|
|
32
|
+
## Claude Code
|
|
33
|
+
|
|
34
|
+
Claude Code reads `name` and `description` for discovery. Custom commands and skills share the same frontmatter, so the `context` and `allowed-tools` fields below work in both `.claude/commands/*.md` and `.claude/skills/*/SKILL.md`.
|
|
35
|
+
|
|
36
|
+
- **`context: fork`** runs a command or skill in an isolated subagent context instead of the active conversation. This gives context isolation, repeatable execution from a clean state, execution tokens spent in the fork rather than the main session, and a cleaner handoff where only the result surfaces back. An optional **`agent`** field selects which subagent type runs the fork (for example `agent: Plan`); it defaults to `general-purpose`.
|
|
37
|
+
- **`allowed-tools`** pre-approves tools; it does not restrict them. Listed tools run without a permission prompt for the turn that invokes the command or skill, and the grant clears on your next message. Nothing is removed from the tool pool.
|
|
38
|
+
- **`disallowed-tools`** is the field that actually restricts: it removes the listed tools from the available pool while the skill is active, which is what least-privilege needs for passive stages such as review or audit. The restriction also clears on your next message. Note it is a Claude Code field and not one of the specification's six, so it belongs in a local copy or an adapter file; in a published `SKILL.md` it fails packaging with an unexpected-key error.
|
|
39
|
+
|
|
40
|
+
These are Claude Code conventions. Keep the shared, published `SKILL.md` limited to spec fields; apply these runtime controls in your own local command or skill copies instead.
|
|
41
|
+
|
|
42
|
+
## Gemini CLI and Antigravity
|
|
43
|
+
|
|
44
|
+
Gemini CLI and Antigravity discover skills the same way: they match `name` and `description`, then load the full skill on demand. Runtime orchestration lives in a separate resource, not in the skill frontmatter.
|
|
45
|
+
|
|
46
|
+
- **Subagent definitions** live in `.gemini/agents/*.md`, which are distinct from skills. Their schema is `kind` (`local` or `remote`), `model`, `temperature`, `max_turns`, and `tools`. Note that this is a subagent schema, not a skill schema: the two should not be merged into one `SKILL.md`.
|
|
47
|
+
- **Model routing** can send lighter tasks (formatting, documentation, git operations) to a faster model and reserve a stronger model for cognitively demanding work (debugging, security auditing, interface design).
|
|
48
|
+
- **Tool restrictions** enforce least-privilege per subagent, which also trims unused tool schemas from the prompt.
|
|
49
|
+
- **Turn limits** (`max_turns`) cap execution to avoid runaway correction loops.
|
|
50
|
+
|
|
51
|
+
### Model guidance
|
|
52
|
+
|
|
53
|
+
Google recommends omitting `temperature` for Gemini 3.x models and using `thinking_level` instead. Do not hardcode `temperature` on skills or subagents routed to 3.x models; prefer `thinking_level` and revisit this guidance as the models evolve.
|
|
54
|
+
|
|
55
|
+
```yaml
|
|
56
|
+
# .gemini/agents/security-auditor.md
|
|
57
|
+
---
|
|
58
|
+
kind: local
|
|
59
|
+
model: gemini-3-pro
|
|
60
|
+
thinking_level: high # not: temperature: 0.1
|
|
61
|
+
tools: [read_file, grep]
|
|
62
|
+
max_turns: 10
|
|
63
|
+
---
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
## Automating with scripts
|
|
67
|
+
|
|
68
|
+
Maintaining per-agent metadata by hand across every skill is repetitive, drifts out of sync, and is easy to get wrong. A better approach is to keep a single source of truth and generate the agent-specific output:
|
|
69
|
+
|
|
70
|
+
- A generator reads a per-skill configuration map (which model, tool allowlist, turn limit, and isolation each skill should use for a given agent).
|
|
71
|
+
- For metadata-style fields, it injects them under the `metadata` key of each `SKILL.md`, keeping the file spec-conformant.
|
|
72
|
+
- For orchestration-style fields, it emits the separate adapter files an agent expects, for example `.gemini/agents/*.md` subagent definitions, leaving `SKILL.md` untouched.
|
|
73
|
+
|
|
74
|
+
Generation also lets the tooling validate **semantics, not just shape**: confirm that a model name is a known model, that a tool name is a real tool, that `max_turns` is a positive integer, and that `temperature` (where still applicable) is a valid number in range. Shape-only checks let invalid values such as `parseInt("1.5")` or `parseFloat("0.2oops")` slip through.
|
|
75
|
+
|
|
76
|
+
## Status
|
|
77
|
+
|
|
78
|
+
It is the single reference for per-agent configuration: it keeps the shared skills portable while documenting the advanced controls each agent offers as an opt-in. The script-based automation described above is a proposal pending agreement before any implementation.
|
package/docs/codebuddy-setup.md
CHANGED
|
@@ -11,7 +11,8 @@ npx @givolt/i3-composer-agent --codebuddy
|
|
|
11
11
|
向导预选 CodeBuddy,可增加其他工具,再选择项目或全局范围。
|
|
12
12
|
项目安装提供 `.codebuddy/skills/`(25 个技能)、`references/`、
|
|
13
13
|
`commands/`(9 个命令)和 `agents/`(4 个角色)。
|
|
14
|
-
同级 `i3-composer-agent/`
|
|
14
|
+
同级 `i3-composer-agent/` 是配套工具根,集中提供 `package.json`、`evals/`、`hooks/`、`scripts/`、`docs/`、`references/` 和校验输入 `adapters/`,
|
|
15
|
+
只有一份实际技能、命令和角色,评测与宿主共用。
|
|
15
16
|
全局使用 `~/.codebuddy/` 的相同结构。默认中文说明和回复;技能/命令标识不改名。
|
|
16
17
|
安装成功清理旧内容,失败恢复;设置与自定义命令保留。
|
|
17
18
|
|
|
@@ -40,8 +41,8 @@ CodeBuddy 与 WorkBuddy 项目共用 `.codebuddy/`;同版本追加客户端会
|
|
|
40
41
|
|
|
41
42
|
## 配套检查
|
|
42
43
|
|
|
43
|
-
|
|
44
|
-
|
|
44
|
+
在业务项目运行 `node .codebuddy/i3-composer-agent/scripts/run-evals.js --min-rank1 95`,
|
|
45
|
+
可检查中英文触发,不调用模型;进入 `.codebuddy/i3-composer-agent/` 可运行 `npm test` 和 `node scripts/run-evals.js --locale zh-CN --min-rank1 95`。全局安装使用脚本的全局绝对路径。五项校验、行为评测和样例用法见
|
|
45
46
|
[评测说明](../evals/README.md)。Hook 文件已安装,需要按宿主协议单独启用。
|
|
46
47
|
|
|
47
48
|
## 通过 CodeBuddy Code 插件管理器安装
|
package/docs/codex-setup.md
CHANGED
|
@@ -6,10 +6,12 @@
|
|
|
6
6
|
npx @givolt/i3-composer-agent --codex
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
项目范围写入 `.agents/skills/`,全局写入 `~/.agents/skills/`,并安装同级 `references/`。
|
|
9
|
+
项目范围写入 `.agents/skills/`,全局写入 `~/.agents/skills/`,并安装同级 `i3-composer-agent/references/`。
|
|
10
10
|
提供全部 25 个 `i3-` 技能,中文选择说明与默认中文回复在每个入口独立生效。
|
|
11
|
-
同级 `i3-composer-agent/`
|
|
12
|
-
|
|
11
|
+
同级 `evals/`、`hooks/`、`scripts/`、`docs/` 各自以 `i3-composer-agent/` 分组资料。
|
|
12
|
+
命令与角色文件也会提供,供按需阅读,其自动发现由宿主决定。
|
|
13
|
+
从项目目录执行 `node .agents/i3-composer-agent/scripts/run-evals.js --min-rank1 95`
|
|
14
|
+
检查实际安装技能的中英文触发,不调用模型;五项结构校验详见
|
|
13
15
|
[评测说明](../evals/README.md)。原生调用使用技能 ID,Hook 文件需按宿主能力单独启用。
|
|
14
16
|
|
|
15
17
|
## 通过插件管理器安装
|
package/docs/workbuddy-setup.md
CHANGED
|
@@ -13,9 +13,11 @@ npx @givolt/i3-composer-agent --agents codebuddy,workbuddy --scope global --yes
|
|
|
13
13
|
- `~/.workbuddy/skills/`:25 个 `i3-` 技能,选择说明和默认回复中文。
|
|
14
14
|
- `~/.workbuddy/commands/`:9 个 `/i3-*` 短命令。
|
|
15
15
|
- `~/.workbuddy/agents/`:4 个专业角色。
|
|
16
|
-
- `~/.workbuddy/references
|
|
17
|
-
- `~/.workbuddy/docs/agents.md`:角色说明。
|
|
18
|
-
- `~/.workbuddy/i3-composer-agent
|
|
16
|
+
- `~/.workbuddy/i3-composer-agent/references/`:共享参考。
|
|
17
|
+
- `~/.workbuddy/i3-composer-agent/docs/agents.md`:角色说明。
|
|
18
|
+
- `~/.workbuddy/i3-composer-agent/evals/`:中英文用例、样例与评测结果。
|
|
19
|
+
- `~/.workbuddy/i3-composer-agent/hooks/`:Hook 文件与说明。
|
|
20
|
+
- `~/.workbuddy/i3-composer-agent/scripts/`:评测、校验与依赖库。
|
|
19
21
|
- `~/.workbuddy/.i3-composer-agent.json`:安装内容所有权及客户端清单。
|
|
20
22
|
|
|
21
23
|
自定义 profile 可设置 `WORKBUDDY_CONFIG_DIR`,安装后打开对应 profile。
|
|
@@ -23,8 +25,8 @@ WorkBuddy 的目录选择使用自己的配置,不借用 `CODEBUDDY_CONFIG_DIR
|
|
|
23
25
|
|
|
24
26
|
## 配套检查
|
|
25
27
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
+
运行 `node ~/.workbuddy/i3-composer-agent/scripts/run-evals.js --min-rank1 95`,检查实际安装技能的中英文触发,
|
|
29
|
+
不会调用模型。进入 `~/.workbuddy/i3-composer-agent/` 运行 `npm test` 可检查完整内容、两种语言及全部脚本回归;原 `.js` 入口保留。项目安装将 `~/.workbuddy/` 换成 `.codebuddy/`。五项校验、行为评测用例、样例和
|
|
28
30
|
脚本用法见 [评测说明](../evals/README.md)。Hook 文件默认提供,启用需适配宿主事件协议。
|
|
29
31
|
|
|
30
32
|
## 发现和调用
|
|
@@ -72,7 +74,7 @@ npx @givolt/i3-composer-agent --workbuddy --scope global --dry-run
|
|
|
72
74
|
npx @givolt/i3-composer-agent --workbuddy --scope global --yes --force
|
|
73
75
|
```
|
|
74
76
|
|
|
75
|
-
|
|
77
|
+
升级和已登记文件修改需确认;未归属的资料冲突或不同内容的同名评测结果需要先处理;成功替换后清理旧文件与所属历史备份,失败恢复。
|
|
76
78
|
原生安装同时提供 Skills、Commands、Agents 和完整 evals/hooks/scripts 配套。
|
|
77
79
|
`--prepare --workbuddy` 不支持,原生安装不会启用插件 Hook。
|
|
78
80
|
|
package/evals/README.md
CHANGED
|
@@ -6,32 +6,49 @@
|
|
|
6
6
|
|
|
7
7
|
## 运行位置
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
WorkBuddy
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
宿主实际使用的原生入口仍位于它自己的 `skills/`、`commands/`、`agents/`。
|
|
9
|
+
原生安装的技能位于宿主基址的 `skills/`;评测资料位于 `i3-composer-agent/evals/`,
|
|
10
|
+
脚本位于 `i3-composer-agent/scripts/`。安装清单记录预期技能和文件,评测只读取这份实际安装内容。
|
|
11
|
+
例如 CodeBuddy 项目基址是 `.codebuddy/`,WorkBuddy 全局基址是 `~/.workbuddy/`。
|
|
12
|
+
下面原生示例从业务项目根目录运行;从其他位置运行时,将脚本路径换成绝对路径即可。
|
|
13
|
+
Node.js 20 或以上,无需额外 npm 依赖;配套根的独立 CommonJS 配置使 `.js` 入口兼容业务项目的 ESM/CommonJS 设置。
|
|
15
14
|
|
|
16
15
|
## 不调用模型的检查
|
|
17
16
|
|
|
18
|
-
|
|
17
|
+
进入 `.codebuddy/i3-composer-agent/`(全局安装进入对应宿主的配套根)即可沿用:
|
|
19
18
|
|
|
20
19
|
```bash
|
|
21
|
-
|
|
22
|
-
npm run validate
|
|
23
|
-
|
|
24
|
-
# 中英文分别检查;省略 --locale 时检查两种语言
|
|
20
|
+
npm test
|
|
25
21
|
node scripts/run-evals.js --locale zh-CN --min-rank1 95
|
|
26
|
-
|
|
22
|
+
```
|
|
27
23
|
|
|
28
|
-
|
|
24
|
+
第一条执行五项校验、中英文评测与全部脚本回归;第二条只运行中文评测。以下项目路径入口也可用。
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
node .codebuddy/i3-composer-agent/scripts/validate-skills.js
|
|
28
|
+
node .codebuddy/i3-composer-agent/scripts/validate-versions.js
|
|
29
|
+
node .codebuddy/i3-composer-agent/scripts/validate-commands.js
|
|
30
|
+
node .codebuddy/i3-composer-agent/scripts/validate-reference-links.js
|
|
31
|
+
node .codebuddy/i3-composer-agent/scripts/validate-artifact-paths.js
|
|
32
|
+
node .codebuddy/i3-composer-agent/scripts/run-evals.js --locale zh-CN --min-rank1 95
|
|
33
|
+
node .codebuddy/i3-composer-agent/scripts/run-evals.js --locale en --min-rank1 95
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
五项校验分别检查技能格式、安装版本及登记文件、实际命令和角色格式、引用锚点、规格/计划产物路径。
|
|
37
|
+
缺少安装清单、已登记技能或必需资源会报错;其他插件和用户新增技能不进入本包的评测目录项。
|
|
38
|
+
`cases/` 保留英文用例,`zh-CN/cases/` 提供中文用例,`fixtures/` 是行为评测的真实输入,
|
|
39
|
+
`plugin/` 保留插件评测提示与评分标准。`skill-impact.md` 记录因评测未通过而放弃的技能改动。
|
|
40
|
+
|
|
41
|
+
若使用 `--prepare` / `--extract` 的独立插件,进入导出目录运行原有入口:
|
|
42
|
+
|
|
43
|
+
```bash
|
|
29
44
|
npm test
|
|
45
|
+
npm run validate
|
|
46
|
+
node scripts/run-evals.js --locale zh-CN --min-rank1 95
|
|
30
47
|
```
|
|
31
48
|
|
|
32
|
-
|
|
33
|
-
`
|
|
34
|
-
`
|
|
49
|
+
原生配套与独立插件均保留全部原版脚本及回归测试。原生校验读取真实宿主命令,
|
|
50
|
+
并与 `adapters/` 中另外两种格式比较;同时检查五份插件清单、配套包及安装版本。
|
|
51
|
+
这些 adapter 输入不自动注册插件。在配套根运行 `npm test`,不修改业务项目配置。
|
|
35
52
|
|
|
36
53
|
触发评测使用词法评分检查正例、负例、描述冲突、用例结构及样例是否齐全。
|
|
37
54
|
中英文各自满足指定门槛;这不能证明模型在实际宿主中一定选择正确技能。
|
|
@@ -42,13 +59,13 @@ npm test
|
|
|
42
59
|
先预览,不调用模型、不生成评测结果:
|
|
43
60
|
|
|
44
61
|
```bash
|
|
45
|
-
node scripts/run-evals.js --behavioral i3-test-driven-development --locale zh-CN --dry-run
|
|
62
|
+
node .codebuddy/i3-composer-agent/scripts/run-evals.js --behavioral i3-test-driven-development --locale zh-CN --dry-run
|
|
46
63
|
```
|
|
47
64
|
|
|
48
65
|
确认需要后,移除 `--dry-run` 才会调用已登录的 Claude Code,并消耗该账户的模型额度:
|
|
49
66
|
|
|
50
67
|
```bash
|
|
51
|
-
node scripts/run-evals.js --behavioral i3-test-driven-development --locale zh-CN
|
|
68
|
+
node .codebuddy/i3-composer-agent/scripts/run-evals.js --behavioral i3-test-driven-development --locale zh-CN
|
|
52
69
|
```
|
|
53
70
|
|
|
54
71
|
执行型用例需要 Git,并在临时 Git 项目中复制 `fixtures/` 的真实输入;
|
|
@@ -59,13 +76,15 @@ node scripts/run-evals.js --behavioral i3-test-driven-development --locale zh-CN
|
|
|
59
76
|
|
|
60
77
|
`--locale en` 运行英文用例,省略该参数运行两种语言。可通过 `I3_EVAL_MODEL`
|
|
61
78
|
和 `I3_EVAL_GRADER_MODEL` 指定执行/评分模型;报告同时记录宿主和模型信息。
|
|
62
|
-
|
|
79
|
+
原生结果写入 `i3-composer-agent/evals/results/`;独立插件写入 `evals/results/`。
|
|
80
|
+
结果不会进入发行包和文件替换清单,升级保留;旧配套目录的结果会迁入新位置,同名异内容时停止迁移。
|
|
63
81
|
|
|
64
82
|
## 插件级评测
|
|
65
83
|
|
|
66
84
|
插件清单中的 `experimental.evals` 指向随包提供的 `evals/plugin/`。
|
|
85
|
+
原生安装也保留这些用例作为资料;要运行依赖插件清单的命令,需要独立插件导出。
|
|
67
86
|
它包含整体插件的触发/不触发提示和评分规则;支持 `plugin eval` 的 Claude Code
|
|
68
|
-
|
|
87
|
+
可从 `--prepare` / `--extract` 的独立插件导出目录主动运行:
|
|
69
88
|
|
|
70
89
|
```bash
|
|
71
90
|
claude plugin eval . --no-publish
|
|
@@ -77,7 +96,7 @@ claude plugin eval . --no-publish
|
|
|
77
96
|
|
|
78
97
|
## Hooks
|
|
79
98
|
|
|
80
|
-
`hooks
|
|
99
|
+
原生的 `i3-composer-agent/hooks/`(独立插件为 `hooks/`)默认交付会话注入、文档缓存、代码块保护脚本及说明。
|
|
81
100
|
安装文件不会自动注册事件。中文回复与普通技能调用不依赖启用 Hook。
|
|
82
101
|
会话注入仅适用于缺少原生技能路由的宿主;已有路由时不要重复注入。
|
|
83
102
|
缓存及保护的当前配置示例针对 Claude Code,详见
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Rejected Skill Changes
|
|
2
|
+
|
|
3
|
+
This append-only ledger records skill and description changes rejected on eval evidence so contributors can review prior attempts before proposing overlapping work. Add one concise row per rejected proposal; do not record accepted changes here.
|
|
4
|
+
|
|
5
|
+
| Date | Affected skill | Attempted change | Rank-1 score (before → after) | Rejected PR and outcome |
|
|
6
|
+
|---|---|---|---:|---|
|
package/package.json
CHANGED
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"evals/plugin/code-review-stays-quiet/graders/not-fired.md",
|
|
114
114
|
"evals/plugin/code-review-stays-quiet/graders/tdd-fired.md",
|
|
115
115
|
"evals/plugin/code-review-stays-quiet/prompt.md",
|
|
116
|
+
"evals/skill-impact.md",
|
|
116
117
|
"evals/zh-CN/cases/i3-api-and-interface-design.json",
|
|
117
118
|
"evals/zh-CN/cases/i3-browser-testing-with-devtools.json",
|
|
118
119
|
"evals/zh-CN/cases/i3-ci-cd-and-automation.json",
|
|
@@ -138,14 +139,8 @@
|
|
|
138
139
|
"evals/zh-CN/cases/i3-spec-driven-development.json",
|
|
139
140
|
"evals/zh-CN/cases/i3-test-driven-development.json",
|
|
140
141
|
"evals/zh-CN/cases/i3-using-agent-skills.json",
|
|
141
|
-
"scripts/run-evals.js",
|
|
142
|
-
"scripts/validate-skills.js",
|
|
143
|
-
"scripts/validate-versions.js",
|
|
144
|
-
"scripts/validate-commands.js",
|
|
145
|
-
"scripts/validate-reference-links.js",
|
|
146
|
-
"scripts/validate-artifact-paths.js",
|
|
147
|
-
"scripts/lib/skill-lint.js",
|
|
148
142
|
"docs/adoption-guide.md",
|
|
143
|
+
"docs/advanced-per-agent-configuration.md",
|
|
149
144
|
"docs/agents.md",
|
|
150
145
|
"docs/antigravity-setup.md",
|
|
151
146
|
"docs/codebuddy-setup.md",
|
|
@@ -162,12 +157,28 @@
|
|
|
162
157
|
"docs/workbuddy-setup.md",
|
|
163
158
|
"plugin.json",
|
|
164
159
|
"README.md",
|
|
165
|
-
"LICENSE"
|
|
160
|
+
"LICENSE",
|
|
161
|
+
"scripts/floor-guard-reference-test.js",
|
|
162
|
+
"scripts/lib/skill-lint-test.js",
|
|
163
|
+
"scripts/lib/skill-lint.js",
|
|
164
|
+
"scripts/run-evals-test.js",
|
|
165
|
+
"scripts/run-evals.js",
|
|
166
|
+
"scripts/run-regressions.js",
|
|
167
|
+
"scripts/validate-artifact-paths-test.js",
|
|
168
|
+
"scripts/validate-artifact-paths.js",
|
|
169
|
+
"scripts/validate-commands-test.js",
|
|
170
|
+
"scripts/validate-commands.js",
|
|
171
|
+
"scripts/validate-reference-links-test.js",
|
|
172
|
+
"scripts/validate-reference-links.js",
|
|
173
|
+
"scripts/validate-skills.js",
|
|
174
|
+
"scripts/validate-versions-test.js",
|
|
175
|
+
"scripts/validate-versions.js"
|
|
166
176
|
],
|
|
167
177
|
"scripts": {
|
|
168
178
|
"validate": "node scripts/validate-skills.js && node scripts/validate-versions.js && node scripts/validate-commands.js && node scripts/validate-reference-links.js && node scripts/validate-artifact-paths.js",
|
|
169
179
|
"eval": "node scripts/run-evals.js",
|
|
170
|
-
"test": "npm run validate && npm run eval -- --min-rank1 95",
|
|
180
|
+
"test": "npm run validate && npm run eval -- --min-rank1 95 && npm run test:regression",
|
|
181
|
+
"test:regression": "node scripts/run-regressions.js",
|
|
171
182
|
"prepack": "npm run validate"
|
|
172
183
|
},
|
|
173
184
|
"keywords": [
|
|
@@ -274,6 +285,7 @@
|
|
|
274
285
|
"evals/plugin/code-review-stays-quiet/graders/not-fired.md",
|
|
275
286
|
"evals/plugin/code-review-stays-quiet/graders/tdd-fired.md",
|
|
276
287
|
"evals/plugin/code-review-stays-quiet/prompt.md",
|
|
288
|
+
"evals/skill-impact.md",
|
|
277
289
|
"evals/zh-CN/cases/i3-api-and-interface-design.json",
|
|
278
290
|
"evals/zh-CN/cases/i3-browser-testing-with-devtools.json",
|
|
279
291
|
"evals/zh-CN/cases/i3-ci-cd-and-automation.json",
|
|
@@ -299,14 +311,8 @@
|
|
|
299
311
|
"evals/zh-CN/cases/i3-spec-driven-development.json",
|
|
300
312
|
"evals/zh-CN/cases/i3-test-driven-development.json",
|
|
301
313
|
"evals/zh-CN/cases/i3-using-agent-skills.json",
|
|
302
|
-
"scripts/run-evals.js",
|
|
303
|
-
"scripts/validate-skills.js",
|
|
304
|
-
"scripts/validate-versions.js",
|
|
305
|
-
"scripts/validate-commands.js",
|
|
306
|
-
"scripts/validate-reference-links.js",
|
|
307
|
-
"scripts/validate-artifact-paths.js",
|
|
308
|
-
"scripts/lib/skill-lint.js",
|
|
309
314
|
"docs/adoption-guide.md",
|
|
315
|
+
"docs/advanced-per-agent-configuration.md",
|
|
310
316
|
"docs/agents.md",
|
|
311
317
|
"docs/antigravity-setup.md",
|
|
312
318
|
"docs/codebuddy-setup.md",
|
|
@@ -324,10 +330,25 @@
|
|
|
324
330
|
"plugin.json",
|
|
325
331
|
"package.json",
|
|
326
332
|
"README.md",
|
|
327
|
-
"LICENSE"
|
|
333
|
+
"LICENSE",
|
|
334
|
+
"scripts/floor-guard-reference-test.js",
|
|
335
|
+
"scripts/lib/skill-lint-test.js",
|
|
336
|
+
"scripts/lib/skill-lint.js",
|
|
337
|
+
"scripts/run-evals-test.js",
|
|
338
|
+
"scripts/run-evals.js",
|
|
339
|
+
"scripts/run-regressions.js",
|
|
340
|
+
"scripts/validate-artifact-paths-test.js",
|
|
341
|
+
"scripts/validate-artifact-paths.js",
|
|
342
|
+
"scripts/validate-commands-test.js",
|
|
343
|
+
"scripts/validate-commands.js",
|
|
344
|
+
"scripts/validate-reference-links-test.js",
|
|
345
|
+
"scripts/validate-reference-links.js",
|
|
346
|
+
"scripts/validate-skills.js",
|
|
347
|
+
"scripts/validate-versions-test.js",
|
|
348
|
+
"scripts/validate-versions.js"
|
|
328
349
|
]
|
|
329
350
|
},
|
|
330
|
-
"version": "2.2.
|
|
351
|
+
"version": "2.2.3",
|
|
331
352
|
"repository": {
|
|
332
353
|
"type": "git",
|
|
333
354
|
"url": "https://github.com/49780522/i3-composer-agent.git"
|
package/plugin.json
CHANGED