skillfit 0.16.0 → 0.16.1
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/CHANGELOG.md +15 -0
- package/README.md +17 -17
- package/README.zh-CN.md +17 -17
- package/dist/agents/adapters/cli.js +4 -2
- package/dist/bench/authoring.js +101 -1
- package/dist/cli/definition.js +3 -0
- package/dist/cli/main.js +59 -0
- package/dist/composition.js +4 -0
- package/dist/evaluation/application/preparation.js +150 -0
- package/dist/evaluation/records/audit.js +3 -2
- package/docs/README.md +4 -4
- package/docs/reference/eval-component.md +39 -0
- package/docs/reference/evaluation-reports.md +3 -1
- package/package.json +1 -1
- package/skills/skillfit/SKILL.md +28 -13
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.16.1 — Prepare Skill revision comparisons and fix shell startup (2026-11-17)
|
|
6
|
+
|
|
7
|
+
- `eval --prepare` creates a fresh comparison workspace from two complete Skill
|
|
8
|
+
versions, a real fix commit and an issue-style prompt. It snapshots both Skills,
|
|
9
|
+
imports the parent fixture and hidden regression tests, records the reference
|
|
10
|
+
fix, runs local integrity gates and writes a balanced two-call development
|
|
11
|
+
request. Preview writes nothing and calls no model; execution remains separate
|
|
12
|
+
and requires its dry-run fingerprint and authorized spending.
|
|
13
|
+
- Existing outputs are refused, source drift is rechecked before creation,
|
|
14
|
+
failed writes remove the new workspace and failed integrity gates retain
|
|
15
|
+
blocked inputs. Revision adoption policy and verdict semantics are unchanged.
|
|
16
|
+
- Shell-backed agent startup passes its already quoted command line directly to
|
|
17
|
+
Node, avoiding DEP0190 while preserving literal arguments, empty values and
|
|
18
|
+
executable paths containing spaces.
|
|
19
|
+
|
|
5
20
|
## 0.16.0 — Personal agent configuration maintenance (2026-11-16)
|
|
6
21
|
|
|
7
22
|
- Add versioned `doctor --json` output and opt-in `doctor --strict` health
|
package/README.md
CHANGED
|
@@ -27,16 +27,16 @@ skillfit compares a baseline and a treatment on the same tasks and reports what
|
|
|
27
27
|
`report` and `doctor` read this machine and do not call a model.
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx skillfit@0.16.
|
|
31
|
-
npx skillfit@0.16.
|
|
32
|
-
npx skillfit@0.16.
|
|
33
|
-
npx skillfit@0.16.
|
|
30
|
+
npx skillfit@0.16.1 report
|
|
31
|
+
npx skillfit@0.16.1 doctor
|
|
32
|
+
npx skillfit@0.16.1 doctor --json
|
|
33
|
+
npx skillfit@0.16.1 doctor --strict
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
The JSON output is a `skillfit.doctor-report` [version-1 document](docs/schemas/doctor-report.schema.json) with Agent detection, Rules/Skills/MCP checks and matching summary counts. Findings remain advisory and exit 0 by default; `--strict` explicitly exits 1 when a FAIL exists, while an unknown Agent exits 2. Every doctor mode stays read-only: no model call, MCP connection or configuration write is performed.
|
|
37
37
|
|
|
38
38
|
```console
|
|
39
|
-
$ npx skillfit@0.16.
|
|
39
|
+
$ npx skillfit@0.16.1 report --agent codex
|
|
40
40
|
|
|
41
41
|
codex — 280 session(s), 280 transcript(s)
|
|
42
42
|
skill FIRES SESSIONS LAST SEEN
|
|
@@ -70,9 +70,9 @@ Captured 2026-11-04 from one Codex history. Five installed skills have no observ
|
|
|
70
70
|
No agent CLI, no login, no model calls. These read the benches shipped inside the package and take a few seconds:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
npx skillfit@0.16.
|
|
74
|
-
npx skillfit@0.16.
|
|
75
|
-
npx skillfit@0.16.
|
|
73
|
+
npx skillfit@0.16.1 bench check code-review
|
|
74
|
+
npx skillfit@0.16.1 bench self-test code-review --suite existing-mock-arms --runs-root ./runs --run-group controls-001 --yes
|
|
75
|
+
npx skillfit@0.16.1 report eval ./runs/controls-001/existing-mock-arms
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
<p align="center">
|
|
@@ -92,8 +92,8 @@ Paired eval defaults to **5 trials per condition**: 8 tasks require 80 agent exe
|
|
|
92
92
|
## Install
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
|
-
npx skillfit@0.16.
|
|
96
|
-
npx skillfit@0.16.
|
|
95
|
+
npx skillfit@0.16.1 --help
|
|
96
|
+
npx skillfit@0.16.1 doctor
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
Requires Node.js 22+. Both commands above are offline and make no model calls: `--help` lists the nine commands, and `doctor` is a read-only health report that detects which supported agents you have, inspects their rules files, and flags invalid or conflicting Skills. [Choose your build](docs/README.md#choose-your-build) owns the package/source boundary, availability checks and older release documentation.
|
|
@@ -132,10 +132,10 @@ The instructions the agent should follow.
|
|
|
132
132
|
Then scaffold a case and preview an evaluation:
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
|
-
npx skillfit@0.16.
|
|
136
|
-
npx skillfit@0.16.
|
|
137
|
-
npx skillfit@0.16.
|
|
138
|
-
npx skillfit@0.16.
|
|
135
|
+
npx skillfit@0.16.1 bench init my-bench --kind command --dry-run
|
|
136
|
+
npx skillfit@0.16.1 bench init my-bench --kind command --yes
|
|
137
|
+
npx skillfit@0.16.1 bench check ./my-bench --json
|
|
138
|
+
npx skillfit@0.16.1 eval ./my-skill --bench ./my-bench --mode installed --agent codex --trials 1 --max-calls 2 --runs-root ./runs --run-group first-eval --json --dry-run
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
Replace the teaching fixture, prompt, verifier and oracle before measuring benefit. The preview declares two calls and makes none. Inspect `plan.evaluation.agentPreflight.status`; login remains unknown offline. Keep cases and runs in separate directories. Continue with [your first real evaluation](docs/guides/first-real-eval.md).
|
|
@@ -181,7 +181,7 @@ checkout once:
|
|
|
181
181
|
```bash
|
|
182
182
|
git clone https://github.com/remote-controlled-man/skillfit.git
|
|
183
183
|
cd skillfit
|
|
184
|
-
git switch --detach
|
|
184
|
+
git switch --detach 17772db9b2f112a1e25d0284a76cf38860f7790b
|
|
185
185
|
npm ci
|
|
186
186
|
npm run build
|
|
187
187
|
node dist/cli.js --help
|
|
@@ -192,7 +192,7 @@ node dist/cli.js eval skills/skillfit --bench code-review --agent codex --dry-ru
|
|
|
192
192
|
node dist/cli.js install --agent codex --dry-run
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
-
The detached commit contains
|
|
195
|
+
The detached commit contains revision preparation and the startup fix before this release bump. Building it prints 0.16.0.
|
|
196
196
|
For development on your own checkout, follow
|
|
197
197
|
[CONTRIBUTING.md](https://github.com/remote-controlled-man/skillfit/blob/main/CONTRIBUTING.md).
|
|
198
198
|
|
|
@@ -236,7 +236,7 @@ node dist/cli.js eval <skill-dir> --bench <bench-dir> --agent codex --input work
|
|
|
236
236
|
node dist/cli.js bench check <bench-dir> --calibrate --agent codex --input workspace --trials 3 --dry-run
|
|
237
237
|
```
|
|
238
238
|
|
|
239
|
-
Import the issue request with `--prompt-file` so the fix message does not reveal the answer. Follow the [real OSS workflow](docs/guides/bench-authoring.md) or inspect the [pinned mcp-use example](https://github.com/remote-controlled-man/skillfit/blob/
|
|
239
|
+
Import the issue request with `--prompt-file` so the fix message does not reveal the answer. Follow the [real OSS workflow](docs/guides/bench-authoring.md) or inspect the [pinned mcp-use example](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/benches/contrib/oss-mcp-use-utf8/README.md).
|
|
240
240
|
|
|
241
241
|
### Compare Skill revisions
|
|
242
242
|
|
package/README.zh-CN.md
CHANGED
|
@@ -27,16 +27,16 @@ skillfit 在同一批任务上比较基线组与实验组,并报告变化及
|
|
|
27
27
|
`report` 和 `doctor` 只读这台机器,不调用模型。
|
|
28
28
|
|
|
29
29
|
```bash
|
|
30
|
-
npx skillfit@0.16.
|
|
31
|
-
npx skillfit@0.16.
|
|
32
|
-
npx skillfit@0.16.
|
|
33
|
-
npx skillfit@0.16.
|
|
30
|
+
npx skillfit@0.16.1 report
|
|
31
|
+
npx skillfit@0.16.1 doctor
|
|
32
|
+
npx skillfit@0.16.1 doctor --json
|
|
33
|
+
npx skillfit@0.16.1 doctor --strict
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
JSON 输出是 `skillfit.doctor-report` [v1 文档](docs/schemas/doctor-report.schema.json),包含 Agent 检测、Rules/Skills/MCP 检查及一致的汇总计数。默认情况下发现异常仍是建议信息并退出 0;`--strict` 在存在 FAIL 时显式退出 1,未知 Agent 仍退出 2。所有 doctor 模式都保持只读:不调用模型、不连接 MCP,也不修改配置。
|
|
37
37
|
|
|
38
38
|
```console
|
|
39
|
-
$ npx skillfit@0.16.
|
|
39
|
+
$ npx skillfit@0.16.1 report --agent codex
|
|
40
40
|
|
|
41
41
|
codex — 280 session(s), 280 transcript(s)
|
|
42
42
|
skill FIRES SESSIONS LAST SEEN
|
|
@@ -70,9 +70,9 @@ Overall: 17 installed skill(s), 12 observed firing, 5 with no observed fire in r
|
|
|
70
70
|
不需要 agent CLI、不需要登录、不调用模型。以下命令读取包内自带的 bench,几秒即可跑完:
|
|
71
71
|
|
|
72
72
|
```bash
|
|
73
|
-
npx skillfit@0.16.
|
|
74
|
-
npx skillfit@0.16.
|
|
75
|
-
npx skillfit@0.16.
|
|
73
|
+
npx skillfit@0.16.1 bench check code-review
|
|
74
|
+
npx skillfit@0.16.1 bench self-test code-review --suite existing-mock-arms --runs-root ./runs --run-group controls-001 --yes
|
|
75
|
+
npx skillfit@0.16.1 report eval ./runs/controls-001/existing-mock-arms
|
|
76
76
|
```
|
|
77
77
|
|
|
78
78
|
<p align="center">
|
|
@@ -92,8 +92,8 @@ npx skillfit@0.16.0 report eval ./runs/controls-001/existing-mock-arms
|
|
|
92
92
|
## 安装
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
|
-
npx skillfit@0.16.
|
|
96
|
-
npx skillfit@0.16.
|
|
95
|
+
npx skillfit@0.16.1 --help
|
|
96
|
+
npx skillfit@0.16.1 doctor
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
需要 Node.js 22+。以上两条命令均离线执行,不调用模型:`--help` 列出九个命令;`doctor` 是只读健康报告,检测你装了哪些受支持的 agent、检查它们的规则文件,并标出无效或冲突的 Skill。[选择构建](docs/README.md#choose-your-build)是包/源码边界、可用性确认与旧版发布文档的唯一入口。
|
|
@@ -132,10 +132,10 @@ The instructions the agent should follow.
|
|
|
132
132
|
然后脚手架一个 case 并预览评测:
|
|
133
133
|
|
|
134
134
|
```bash
|
|
135
|
-
npx skillfit@0.16.
|
|
136
|
-
npx skillfit@0.16.
|
|
137
|
-
npx skillfit@0.16.
|
|
138
|
-
npx skillfit@0.16.
|
|
135
|
+
npx skillfit@0.16.1 bench init my-bench --kind command --dry-run
|
|
136
|
+
npx skillfit@0.16.1 bench init my-bench --kind command --yes
|
|
137
|
+
npx skillfit@0.16.1 bench check ./my-bench --json
|
|
138
|
+
npx skillfit@0.16.1 eval ./my-skill --bench ./my-bench --mode installed --agent codex --trials 1 --max-calls 2 --runs-root ./runs --run-group first-eval --json --dry-run
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
测收益前先把教学用 fixture、prompt、verifier 和 oracle 换成真实任务。预览声明两次调用,实际不调用。检查 `plan.evaluation.agentPreflight.status`;离线登录状态仍未知。case 与运行记录分开放。继续阅读[第一次真实评测](docs/guides/first-real-eval.md)。
|
|
@@ -178,7 +178,7 @@ F1 : 0.20 (no CI: a harmonic mean of two proportions has no clo
|
|
|
178
178
|
```bash
|
|
179
179
|
git clone https://github.com/remote-controlled-man/skillfit.git
|
|
180
180
|
cd skillfit
|
|
181
|
-
git switch --detach
|
|
181
|
+
git switch --detach 17772db9b2f112a1e25d0284a76cf38860f7790b
|
|
182
182
|
npm ci
|
|
183
183
|
npm run build
|
|
184
184
|
node dist/cli.js --help
|
|
@@ -189,7 +189,7 @@ node dist/cli.js eval skills/skillfit --bench code-review --agent codex --dry-ru
|
|
|
189
189
|
node dist/cli.js install --agent codex --dry-run
|
|
190
190
|
```
|
|
191
191
|
|
|
192
|
-
该 detached commit
|
|
192
|
+
该 detached commit 包含版本比较准备入口和启动修复,位于本次版本号更新之前。构建后打印 0.16.0。要在自己的检出上开发,请按 [CONTRIBUTING.md](https://github.com/remote-controlled-man/skillfit/blob/main/CONTRIBUTING.md) 操作。
|
|
193
193
|
|
|
194
194
|
校验离线执行;`doctor` 只读,两种预览都只展示计划。适配器覆盖 **Claude Code**、**OpenAI Codex CLI** 与 **Kimi Code**;[当前源码能力表](docs/guides/experiment-workflow.md#executor-capabilities)列出模式、trigger reader、token/cache 限制与验证层级。matrix 声明命令;离线替身不能证明已安装 CLI 的兼容性或登录状态。
|
|
195
195
|
|
|
@@ -231,7 +231,7 @@ node dist/cli.js eval <skill-dir> --bench <bench-dir> --agent codex --input work
|
|
|
231
231
|
node dist/cli.js bench check <bench-dir> --calibrate --agent codex --input workspace --trials 3 --dry-run
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
导入时用 `--prompt-file` 保留 issue 请求,避免修复提交信息泄露答案。参见[真实 OSS 流程](docs/guides/bench-authoring.md)或[固定的 mcp-use 示例](https://github.com/remote-controlled-man/skillfit/blob/
|
|
234
|
+
导入时用 `--prompt-file` 保留 issue 请求,避免修复提交信息泄露答案。参见[真实 OSS 流程](docs/guides/bench-authoring.md)或[固定的 mcp-use 示例](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/benches/contrib/oss-mcp-use-utf8/README.md)。
|
|
235
235
|
|
|
236
236
|
### 比较 Skill 修订版本
|
|
237
237
|
|
|
@@ -209,8 +209,10 @@ export class CliExecutor {
|
|
|
209
209
|
return Promise.reject(new Error("CliExecutor has an empty command"));
|
|
210
210
|
}
|
|
211
211
|
const spawnArgv = this.shell ? [command, ...args].map(quoteShellArg) : [command, ...args];
|
|
212
|
-
|
|
213
|
-
|
|
212
|
+
// Shell arguments have already been validated and quoted. Supply the command line directly
|
|
213
|
+
// instead of asking Node to concatenate a separate argv, which is deprecated as DEP0190.
|
|
214
|
+
const spawnCommand = this.shell ? spawnArgv.join(" ") : (spawnArgv[0] ?? command);
|
|
215
|
+
const spawnArgs = this.shell ? [] : spawnArgv.slice(1);
|
|
214
216
|
return new Promise((resolvePromise, rejectPromise) => {
|
|
215
217
|
const deadline = new ExecutionDeadline(this.timeoutMs, this.clock);
|
|
216
218
|
const child = spawn(spawnCommand, spawnArgs, {
|
package/dist/bench/authoring.js
CHANGED
|
@@ -677,7 +677,7 @@ if (result.error) {
|
|
|
677
677
|
process.exit(result.status ?? 1);
|
|
678
678
|
`;
|
|
679
679
|
}
|
|
680
|
-
function prepareFromCommit(options, cwd, preparedAt) {
|
|
680
|
+
function prepareFromCommit(options, cwd, preparedAt, reference = false) {
|
|
681
681
|
const issuePrompt = options.prompt ??
|
|
682
682
|
(options.promptFile !== undefined
|
|
683
683
|
? readFileSync(resolve(cwd, options.promptFile), "utf8")
|
|
@@ -751,6 +751,16 @@ function prepareFromCommit(options, cwd, preparedAt) {
|
|
|
751
751
|
content: gitShow(repo, sha, entry.path),
|
|
752
752
|
}));
|
|
753
753
|
const verifierCmd = options.verifierCmd ?? "node --test";
|
|
754
|
+
const referenceFiles = reference
|
|
755
|
+
? nonTests.map((entry) => {
|
|
756
|
+
if (isAbsolute(entry.path) || entry.path.split(/[\\/]/).includes(".."))
|
|
757
|
+
throw new Error(`Invalid reference path: ${entry.path}`);
|
|
758
|
+
return {
|
|
759
|
+
path: entry.path,
|
|
760
|
+
content: entry.status === "D" ? null : gitShow(repo, sha, entry.path).toString("base64"),
|
|
761
|
+
};
|
|
762
|
+
})
|
|
763
|
+
: [];
|
|
754
764
|
return {
|
|
755
765
|
defaultTaskId: `fix-${shortSha}`,
|
|
756
766
|
promptText: issuePrompt ??
|
|
@@ -768,6 +778,20 @@ ${subject}${body !== "" ? `\n\n${body}` : ""}
|
|
|
768
778
|
- Hidden grading runs the project's tests afterward — make the behavior correct, not merely plausible.`,
|
|
769
779
|
verifierSource: verifierForMinedTests(tests, verifierCmd),
|
|
770
780
|
verifierKind: "command",
|
|
781
|
+
...(reference
|
|
782
|
+
? {
|
|
783
|
+
oracleSource: `import { mkdirSync, writeFileSync, rmSync } from 'node:fs';
|
|
784
|
+
import { join, dirname } from 'node:path';
|
|
785
|
+
const root = process.argv[2];
|
|
786
|
+
if (!root) throw new Error('Missing run directory');
|
|
787
|
+
for (const file of ${JSON.stringify(referenceFiles)}) {
|
|
788
|
+
const target = join(root, file.path);
|
|
789
|
+
if (file.content === null) rmSync(target, {force: true});
|
|
790
|
+
else { mkdirSync(dirname(target), {recursive: true}); writeFileSync(target, Buffer.from(file.content, 'base64')); }
|
|
791
|
+
}
|
|
792
|
+
`,
|
|
793
|
+
}
|
|
794
|
+
: {}),
|
|
771
795
|
fixtureFiles,
|
|
772
796
|
groundTruth: `# Ground truth — fix-${shortSha}
|
|
773
797
|
|
|
@@ -932,6 +956,82 @@ function prepareManagement(options) {
|
|
|
932
956
|
},
|
|
933
957
|
});
|
|
934
958
|
}
|
|
959
|
+
/** Mine a complete, fresh bench without writing a teaching task or invoking a drafter. */
|
|
960
|
+
export function prepareCommitBench(options) {
|
|
961
|
+
if (!options.fromCommit || !options.promptFile)
|
|
962
|
+
throw new Error("Commit preparation requires --from-commit and an issue-style --prompt-file.");
|
|
963
|
+
const cwd = options.cwd ?? process.cwd(), dir = resolve(cwd, options.dir), at = new Date();
|
|
964
|
+
const capture = () => prepareFromCommit(options, cwd, at, true);
|
|
965
|
+
const source = capture(), fingerprint = sha256Text(JSON.stringify(source));
|
|
966
|
+
const files = taskFilePaths(source.defaultTaskId);
|
|
967
|
+
const writes = source.fixtureFiles.map((file) => ({
|
|
968
|
+
target: join(dir, files.fixture, file.rel),
|
|
969
|
+
content: file.content,
|
|
970
|
+
}));
|
|
971
|
+
for (const [rel, content] of Object.entries({
|
|
972
|
+
[files.prompt]: source.promptText,
|
|
973
|
+
[files.promptTrigger]: source.promptText,
|
|
974
|
+
[files.verifier]: source.verifierSource,
|
|
975
|
+
[files.oracle]: source.oracleSource,
|
|
976
|
+
[files.rubric]: source.groundTruth.replace("TODO: summarize the correct fix here so future bench edits stay honest.", "The reference oracle applies the fix commit's non-test file changes; the verifier supplies the commit's tests."),
|
|
977
|
+
"bench.json": JSON.stringify({
|
|
978
|
+
schemaVersion: 1,
|
|
979
|
+
name: basename(dir),
|
|
980
|
+
tasks: [
|
|
981
|
+
{
|
|
982
|
+
id: source.defaultTaskId,
|
|
983
|
+
fixture: files.fixture,
|
|
984
|
+
prompt: files.prompt,
|
|
985
|
+
promptTrigger: files.promptTrigger,
|
|
986
|
+
verifier: `node ${files.verifier}`,
|
|
987
|
+
verifierKind: "command",
|
|
988
|
+
oracle: `node ${files.oracle}`,
|
|
989
|
+
rubric: files.rubric,
|
|
990
|
+
},
|
|
991
|
+
],
|
|
992
|
+
}, null, 2) + "\n",
|
|
993
|
+
}))
|
|
994
|
+
writes.push({ target: join(dir, rel), content });
|
|
995
|
+
const assertCurrent = () => {
|
|
996
|
+
try {
|
|
997
|
+
lstatSync(dir);
|
|
998
|
+
throw new Error(`Target directory already exists: ${dir}`);
|
|
999
|
+
}
|
|
1000
|
+
catch (error) {
|
|
1001
|
+
if (error.code !== "ENOENT")
|
|
1002
|
+
throw error;
|
|
1003
|
+
}
|
|
1004
|
+
if (sha256Text(JSON.stringify(capture())) !== fingerprint)
|
|
1005
|
+
throw new Error("Commit source changed; prepare a fresh plan.");
|
|
1006
|
+
};
|
|
1007
|
+
assertCurrent();
|
|
1008
|
+
return prepared({
|
|
1009
|
+
operation: "init",
|
|
1010
|
+
dir,
|
|
1011
|
+
writes,
|
|
1012
|
+
sourceSha256: fingerprint,
|
|
1013
|
+
targetSha256: sha256Text(JSON.stringify(writes)),
|
|
1014
|
+
lines: { before: [], preview: [], after: [] },
|
|
1015
|
+
confirmation: `Create commit-derived bench in ${dir}? [y/N] `,
|
|
1016
|
+
draft: false,
|
|
1017
|
+
result: { dir },
|
|
1018
|
+
assertCurrent,
|
|
1019
|
+
}, {
|
|
1020
|
+
apply: () => {
|
|
1021
|
+
assertCurrent();
|
|
1022
|
+
mkdirSync(dirname(dir), { recursive: true });
|
|
1023
|
+
mkdirSync(dir);
|
|
1024
|
+
try {
|
|
1025
|
+
applyBenchWrites(dir, writes);
|
|
1026
|
+
return { dir };
|
|
1027
|
+
}
|
|
1028
|
+
catch (error) {
|
|
1029
|
+
rmSync(dir, { recursive: true, force: true });
|
|
1030
|
+
throw error;
|
|
1031
|
+
}
|
|
1032
|
+
},
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
935
1035
|
export function prepareBenchChange(request, dependencies = {}) {
|
|
936
1036
|
if (request.operation === "init")
|
|
937
1037
|
return prepareInit({ ...request.options }, dependencies);
|
package/dist/cli/definition.js
CHANGED
|
@@ -8,6 +8,7 @@ const judgeAgent = option(" --judge-agent <id> Drive a paired eval's blind jud
|
|
|
8
8
|
const mode = option(" --mode <mode> Eval mode: inject (default) | installed (paired complete Skill) | trigger (single arm)");
|
|
9
9
|
const baselineSkill = option(" --baseline-skill <path> With --mode installed, compare a previous Skill version against the target");
|
|
10
10
|
const request = option(" --request <path> Version 1 Skill revision request (JSON output; excludes positional eval options)");
|
|
11
|
+
const prepare = option(" --prepare <dir> Prepare a fresh revision workspace; requires --baseline-skill, --from-commit, --source-dir, --prompt-file and --agent (no model calls)");
|
|
11
12
|
const planSha = option(" --plan-sha <hash> Confirm an eval/calibration/self-test dry-run plan (also needs --run-group)");
|
|
12
13
|
const json = option(" --json Machine output for doctor, bench check/self-test/list/show/edit/remove, report, eval and calibration");
|
|
13
14
|
const spendingBudget = option(" --spending-budget <file> Eval/calibration/drafting: input, cachedInput, uncachedInput, output, durationSeconds stop lines");
|
|
@@ -86,6 +87,7 @@ const COMMAND_HELP = {
|
|
|
86
87
|
mode,
|
|
87
88
|
baselineSkill,
|
|
88
89
|
request,
|
|
90
|
+
prepare,
|
|
89
91
|
planSha,
|
|
90
92
|
json,
|
|
91
93
|
spendingBudget,
|
|
@@ -186,6 +188,7 @@ export const CLI_OPTIONS = {
|
|
|
186
188
|
mode: { type: "string" },
|
|
187
189
|
"baseline-skill": { type: "string" },
|
|
188
190
|
request: { type: "string" },
|
|
191
|
+
prepare: { type: "string" },
|
|
189
192
|
"plan-sha": { type: "string" },
|
|
190
193
|
"spending-budget": { type: "string" },
|
|
191
194
|
"executor-timeout-seconds": { type: "string" },
|
package/dist/cli/main.js
CHANGED
|
@@ -21,6 +21,7 @@ import { runInstall, runMcpApply, runUninstall } from "../composition.js";
|
|
|
21
21
|
import { runMcpCheck } from "./mcp.js";
|
|
22
22
|
import { runReport } from "./report.js";
|
|
23
23
|
import { runCodexSetup } from "../composition.js";
|
|
24
|
+
import { prepareSkillRevision } from "../composition.js";
|
|
24
25
|
import { VERSION } from "../shared/version.js";
|
|
25
26
|
function jsonBenchCommand() {
|
|
26
27
|
const supported = ["check", "self-test", "list", "show", "edit", "remove"];
|
|
@@ -125,6 +126,64 @@ async function main() {
|
|
|
125
126
|
}
|
|
126
127
|
if (values.controls !== undefined || values.suite !== undefined)
|
|
127
128
|
throw new Error("--controls and --suite apply only to bench self-test.");
|
|
129
|
+
if (values.prepare !== undefined) {
|
|
130
|
+
if (values.json && !values["dry-run"] && !values.yes)
|
|
131
|
+
throw new Error("JSON preparation requires --yes; preview first with --dry-run.");
|
|
132
|
+
if (command !== "eval" || positionals.length !== 2)
|
|
133
|
+
throw new Error("--prepare requires eval <candidate-skill>.");
|
|
134
|
+
const allowed = new Set([
|
|
135
|
+
"prepare",
|
|
136
|
+
"baseline-skill",
|
|
137
|
+
"from-commit",
|
|
138
|
+
"source-dir",
|
|
139
|
+
"prompt-file",
|
|
140
|
+
"agent",
|
|
141
|
+
"include",
|
|
142
|
+
"verifier-cmd",
|
|
143
|
+
"spending-budget",
|
|
144
|
+
"executor-timeout-seconds",
|
|
145
|
+
"dry-run",
|
|
146
|
+
"yes",
|
|
147
|
+
"json",
|
|
148
|
+
]);
|
|
149
|
+
for (const [key, value] of Object.entries(values))
|
|
150
|
+
if (value !== undefined && value !== false && !allowed.has(key))
|
|
151
|
+
throw new Error(`--${key} is unsupported with --prepare; no evaluation started.`);
|
|
152
|
+
if (!values["baseline-skill"] ||
|
|
153
|
+
!values["from-commit"] ||
|
|
154
|
+
!values["source-dir"] ||
|
|
155
|
+
!values["prompt-file"] ||
|
|
156
|
+
!values.agent)
|
|
157
|
+
throw new Error("--prepare requires --baseline-skill, --from-commit, --source-dir, --prompt-file and --agent.");
|
|
158
|
+
const result = await prepareSkillRevision({
|
|
159
|
+
candidateSkill: positionals[1],
|
|
160
|
+
baselineSkill: values["baseline-skill"],
|
|
161
|
+
workspace: values.prepare,
|
|
162
|
+
sourceDir: values["source-dir"],
|
|
163
|
+
fromCommit: values["from-commit"],
|
|
164
|
+
promptFile: values["prompt-file"],
|
|
165
|
+
agent: values.agent,
|
|
166
|
+
include: values.include,
|
|
167
|
+
verifierCmd: values["verifier-cmd"],
|
|
168
|
+
dryRun: values["dry-run"],
|
|
169
|
+
yes: values.yes,
|
|
170
|
+
spendingBudget: values["spending-budget"] === undefined
|
|
171
|
+
? undefined
|
|
172
|
+
: parseSpendingBudget(readComponentJson(resolve(values["spending-budget"])).value),
|
|
173
|
+
executorTimeoutSeconds: executorTimeoutArgument(values["executor-timeout-seconds"]),
|
|
174
|
+
log: (line) => (values.json ? console.error(line) : console.log(line)),
|
|
175
|
+
});
|
|
176
|
+
if (values.json)
|
|
177
|
+
console.log(JSON.stringify(result, null, 2));
|
|
178
|
+
else {
|
|
179
|
+
console.log(`Revision workspace: ${result.status}; ${result.files.length} files; 0 model calls.\nRequest: ${result.requestPath}`);
|
|
180
|
+
for (const command of result.nextCommands)
|
|
181
|
+
console.log(` ${command}`);
|
|
182
|
+
}
|
|
183
|
+
if (result.status === "blocked")
|
|
184
|
+
process.exitCode = 2;
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
128
187
|
const calibrationCommand = command === "bench" && positionals[1] === "check" && values.calibrate;
|
|
129
188
|
if (values["baseline-skill"] !== undefined && command !== "eval") {
|
|
130
189
|
throw new Error("--baseline-skill applies only to eval --mode installed.");
|
package/dist/composition.js
CHANGED
|
@@ -12,6 +12,10 @@ import { runUninstall as uninstall } from "./configuration/uninstall.js";
|
|
|
12
12
|
import { runMcpApply as mcpApply } from "./configuration/mcp-write.js";
|
|
13
13
|
import { runBundleExport as bundle } from "./configuration/bundle.js";
|
|
14
14
|
import { runCodexSetup as setup } from "./configuration/setup.js";
|
|
15
|
+
import { prepareSkillRevision as prepareRevision, } from "./evaluation/application/preparation.js";
|
|
16
|
+
export function prepareSkillRevision(options) {
|
|
17
|
+
return withEvaluationInterrupts(() => prepareRevision({ ...options, confirm: options.confirm ?? confirm }));
|
|
18
|
+
}
|
|
15
19
|
export function executeEvalPlan(...args) {
|
|
16
20
|
return withEvaluationInterrupts(() => evaluation.executeEvalPlan(...args));
|
|
17
21
|
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { lstatSync, mkdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { dirname, isAbsolute, join, relative, resolve } from "node:path";
|
|
3
|
+
import { prepareCommitBench } from "../../bench/authoring.js";
|
|
4
|
+
import { runOfflineBenchCheck } from "../../bench/gates/check.js";
|
|
5
|
+
import { collectInstalledSkillTarget } from "../../resources/installed-skill.js";
|
|
6
|
+
import { assertSkillRevisionTargets } from "../targets/skill.js";
|
|
7
|
+
import { parseEvalRequest } from "./request.js";
|
|
8
|
+
import { assertTokenBudgetSupport } from "../execution/budget.js";
|
|
9
|
+
/** One fresh development comparison. No executor or user configuration writer is reachable. */
|
|
10
|
+
export async function prepareSkillRevision(options, dependencies = {}) {
|
|
11
|
+
const requested = resolve(options.workspace);
|
|
12
|
+
// Resolve existing ancestors (including macOS /var and /tmp aliases), then pin that parent.
|
|
13
|
+
let ancestor = dirname(requested);
|
|
14
|
+
while (true) {
|
|
15
|
+
try {
|
|
16
|
+
realpathSync(ancestor);
|
|
17
|
+
break;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
if (error.code !== "ENOENT")
|
|
21
|
+
throw error;
|
|
22
|
+
ancestor = dirname(ancestor);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const physicalParent = realpathSync(ancestor);
|
|
26
|
+
const workspace = resolve(physicalParent, relative(ancestor, requested));
|
|
27
|
+
const assertFresh = () => {
|
|
28
|
+
try {
|
|
29
|
+
lstatSync(workspace);
|
|
30
|
+
throw new Error(`Workspace already exists: ${workspace}`);
|
|
31
|
+
}
|
|
32
|
+
catch (error) {
|
|
33
|
+
if (error.code !== "ENOENT")
|
|
34
|
+
throw error;
|
|
35
|
+
}
|
|
36
|
+
for (let parent = dirname(workspace); parent !== physicalParent; parent = dirname(parent)) {
|
|
37
|
+
try {
|
|
38
|
+
if (lstatSync(parent).isSymbolicLink())
|
|
39
|
+
throw new Error(`Workspace parent is a symlink: ${parent}`);
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
if (error.code !== "ENOENT")
|
|
43
|
+
throw error;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
assertFresh();
|
|
48
|
+
const candidate = collectInstalledSkillTarget(options.candidateSkill);
|
|
49
|
+
const baseline = collectInstalledSkillTarget(options.baselineSkill);
|
|
50
|
+
assertSkillRevisionTargets(candidate, baseline);
|
|
51
|
+
for (const target of [baseline, candidate]) {
|
|
52
|
+
const rel = relative(target.sourceDir, workspace);
|
|
53
|
+
if (rel === "" || (!rel.startsWith("..") && !isAbsolute(rel)))
|
|
54
|
+
throw new Error("Preparation workspace must not be inside an input Skill.");
|
|
55
|
+
}
|
|
56
|
+
const bench = prepareCommitBench({
|
|
57
|
+
dir: join(workspace, "bench"),
|
|
58
|
+
sourceDir: options.sourceDir,
|
|
59
|
+
fromCommit: options.fromCommit,
|
|
60
|
+
promptFile: options.promptFile,
|
|
61
|
+
verifierCmd: options.verifierCmd,
|
|
62
|
+
include: options.include,
|
|
63
|
+
});
|
|
64
|
+
const requestPath = join(workspace, "request.json");
|
|
65
|
+
const body = {
|
|
66
|
+
schemaVersion: 1,
|
|
67
|
+
baselineSkill: "skills/old",
|
|
68
|
+
candidateSkill: "skills/new",
|
|
69
|
+
bench: "bench",
|
|
70
|
+
agent: options.agent,
|
|
71
|
+
purpose: "development",
|
|
72
|
+
pairOrder: "balanced",
|
|
73
|
+
trials: 1,
|
|
74
|
+
maxCalls: 2,
|
|
75
|
+
runsRoot: "runs",
|
|
76
|
+
runGroup: "revision-001",
|
|
77
|
+
...(options.spendingBudget ? { spendingBudget: options.spendingBudget } : {}),
|
|
78
|
+
...(options.executorTimeoutSeconds !== undefined
|
|
79
|
+
? { executorTimeoutSeconds: options.executorTimeoutSeconds }
|
|
80
|
+
: {}),
|
|
81
|
+
};
|
|
82
|
+
const request = parseEvalRequest(body, workspace);
|
|
83
|
+
assertTokenBudgetSupport([], request.executorTimeoutSeconds, request.spendingBudget);
|
|
84
|
+
const writes = bench.writes.map((write) => ({ target: write.target, content: write.content }));
|
|
85
|
+
for (const [target, folder] of [
|
|
86
|
+
[baseline, "old"],
|
|
87
|
+
[candidate, "new"],
|
|
88
|
+
])
|
|
89
|
+
for (const file of target.files)
|
|
90
|
+
writes.push({
|
|
91
|
+
target: join(workspace, "skills", folder, file),
|
|
92
|
+
content: readFileSync(join(target.sourceDir, file)),
|
|
93
|
+
});
|
|
94
|
+
writes.push({ target: requestPath, content: JSON.stringify(body, null, 2) + "\n" });
|
|
95
|
+
// POSIX shells and PowerShell both support single-quoted literal paths (including spaces).
|
|
96
|
+
const quote = (value) => "'" + value.replaceAll("'", process.platform === "win32" ? "''" : "'\\''") + "'";
|
|
97
|
+
const nextCommands = [
|
|
98
|
+
`skillfit bench check ${quote(join(workspace, "bench"))}`,
|
|
99
|
+
`skillfit eval --request ${quote(requestPath)} --dry-run`,
|
|
100
|
+
`skillfit eval --request ${quote(requestPath)} --plan-sha <sha256-from-preview>`,
|
|
101
|
+
];
|
|
102
|
+
const view = {
|
|
103
|
+
schemaVersion: 1,
|
|
104
|
+
kind: "skillfit.revision-preparation",
|
|
105
|
+
workspace,
|
|
106
|
+
requestPath,
|
|
107
|
+
modelCalls: 0,
|
|
108
|
+
maxCalls: 2,
|
|
109
|
+
spendingBudget: request.spendingBudget ?? null,
|
|
110
|
+
executorTimeoutSeconds: request.executorTimeoutSeconds,
|
|
111
|
+
files: writes.map((w) => relative(workspace, w.target)),
|
|
112
|
+
nextCommands,
|
|
113
|
+
};
|
|
114
|
+
options.log?.(`Prepare one development pair (2 task calls when separately executed); token limits: ${JSON.stringify(view.spendingBudget)}; executor deadline: ${request.executorTimeoutSeconds === null ? "disabled" : request.executorTimeoutSeconds + "s"}.`);
|
|
115
|
+
options.log?.(`Verifier command ${JSON.stringify(options.verifierCmd ?? "node --test")} is retained and executed with a shell by bench check and evaluation. Creation runs offline gates; preview does not execute it.`);
|
|
116
|
+
options.log?.("A single development pair cannot authorize adoption. Authentication and ambient agent configuration are checked by the separate evaluation preview.");
|
|
117
|
+
options.log?.(`Workspace plan: ${workspace}`);
|
|
118
|
+
for (const file of view.files)
|
|
119
|
+
options.log?.(` + ${file}`);
|
|
120
|
+
if (options.dryRun)
|
|
121
|
+
return { ...view, status: "preview" };
|
|
122
|
+
if (!options.yes &&
|
|
123
|
+
!(await options.confirm?.(`Create ${writes.length} files in ${workspace} and run local verifier/oracle commands? [y/N] `)))
|
|
124
|
+
return { ...view, status: "cancelled" };
|
|
125
|
+
assertFresh();
|
|
126
|
+
bench.assertCurrent();
|
|
127
|
+
for (const target of [baseline, candidate]) {
|
|
128
|
+
const current = collectInstalledSkillTarget(target.sourceDir);
|
|
129
|
+
if (current.sha256 !== target.sha256)
|
|
130
|
+
throw new Error("Skill inputs changed after preparation; review a fresh plan.");
|
|
131
|
+
}
|
|
132
|
+
mkdirSync(dirname(workspace), { recursive: true });
|
|
133
|
+
mkdirSync(workspace); // Exclusive ownership: do not remove anything unless this succeeded.
|
|
134
|
+
try {
|
|
135
|
+
for (const write of writes) {
|
|
136
|
+
mkdirSync(dirname(write.target), { recursive: true });
|
|
137
|
+
(dependencies.writeFile ?? writeFileSync)(write.target, write.content, { flag: "wx" });
|
|
138
|
+
}
|
|
139
|
+
const checks = await runOfflineBenchCheck({ dir: request.bench, log: options.log });
|
|
140
|
+
return {
|
|
141
|
+
...view,
|
|
142
|
+
status: checks.failures === 0 ? "ready" : "blocked",
|
|
143
|
+
checks,
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
catch (error) {
|
|
147
|
+
rmSync(workspace, { recursive: true, force: true });
|
|
148
|
+
throw error;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -297,11 +297,12 @@ export async function auditEvaluation(value, runDir, options = {}) {
|
|
|
297
297
|
assert.ok(definition);
|
|
298
298
|
const scratch = mkdtempSync(join(tmpdir(), "skillfit-eval-replay-"));
|
|
299
299
|
try {
|
|
300
|
-
|
|
300
|
+
const replayDir = join(scratch, arm, `trial-${trial}`);
|
|
301
|
+
cpSync(join(root, task.id, arm, `trial-${trial}`), replayDir, {
|
|
301
302
|
recursive: true,
|
|
302
303
|
filter: (path) => basename(path) !== ".git",
|
|
303
304
|
});
|
|
304
|
-
const grade = await runVerifier(bench.dir, definition.verifier,
|
|
305
|
+
const grade = await runVerifier(bench.dir, definition.verifier, replayDir, definition.verifierTimeoutSeconds), summary = verdictFromOutput(grade.output);
|
|
305
306
|
assert.equal(grade.error, null, `Replay verifier failed: ${grade.error}`);
|
|
306
307
|
assert.notEqual(grade.exitCode, null);
|
|
307
308
|
assert.equal(grade.exitCode, r.verifierExitCode);
|
package/docs/README.md
CHANGED
|
@@ -2,16 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
## Choose your build
|
|
4
4
|
|
|
5
|
-
These pages describe the **0.16.
|
|
5
|
+
These pages describe the **0.16.1 package and current source**; source guides use
|
|
6
6
|
Node >=22, `npm run build` and `node dist/cli.js`. The pinned
|
|
7
|
-
`npx skillfit@0.16.
|
|
7
|
+
`npx skillfit@0.16.1` commands name the version these pages describe; the registry
|
|
8
8
|
is the source of truth for what is currently published. Superseded releases keep
|
|
9
9
|
their own documentation: see the
|
|
10
10
|
[0.13.1 documentation](https://github.com/remote-controlled-man/skillfit/tree/4eaefde80f7e8a6b1e01939d3bd8a8b6418b75d6/docs)
|
|
11
11
|
and its [publication record](https://github.com/remote-controlled-man/skillfit/blob/3a3ff415ccef1a3a45d1e2d2cc00d903ab7db850/docs/releases/0.13.1.md).
|
|
12
12
|
Standalone driver links and unshipped source references use the
|
|
13
|
-
[reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/
|
|
14
|
-
which contains
|
|
13
|
+
[reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/17772db9b2f112a1e25d0284a76cf38860f7790b),
|
|
14
|
+
which contains revision preparation and the startup fix before this release bump. Building that commit prints 0.16.0.
|
|
15
15
|
|
|
16
16
|
## Find your task
|
|
17
17
|
|
|
@@ -7,6 +7,45 @@ formats and costs, and [metrics](metrics.md) owns statistical meaning.
|
|
|
7
7
|
Use the [build/version entry](../README.md#choose-your-build) for availability.
|
|
8
8
|
The component never installs or adopts a Skill automatically.
|
|
9
9
|
|
|
10
|
+
## Prepare a first revision comparison
|
|
11
|
+
|
|
12
|
+
With npm 0.16.1 or a built checkout that lists `--prepare` in `eval --help`, start
|
|
13
|
+
from two complete versions of one Skill and a real fix commit, including its regression tests:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
skillfit eval ./skill-new --baseline-skill ./skill-old --prepare ./comparison --from-commit <fix-sha> --source-dir ./project --prompt-file ./issue.md --agent codex --dry-run
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Use the original issue-style request in `issue.md`; the fix commit's message is
|
|
20
|
+
kept out of the task prompt. Preview validates inputs and lists destination files
|
|
21
|
+
without writing or executing verifier/oracle/model commands. Remove `--dry-run`
|
|
22
|
+
and use `--yes` (or confirm interactively) to create the workspace and run its
|
|
23
|
+
trusted local checks. `--verifier-cmd` defaults to `node --test`; it is retained
|
|
24
|
+
and run with a shell on future checks/evaluations. `--include` narrows the fixture
|
|
25
|
+
to repository directories using the existing commit import limits.
|
|
26
|
+
|
|
27
|
+
The fresh workspace contains complete `skills/old` and `skills/new` snapshots, a
|
|
28
|
+
commit-derived `bench` and `request.json`. Existing destinations, even empty ones,
|
|
29
|
+
are refused. A write failure removes only the newly created workspace. A failed
|
|
30
|
+
integrity gate instead returns `blocked` and retains inputs for inspection.
|
|
31
|
+
Preparation requires no model call and does not change agent configuration.
|
|
32
|
+
|
|
33
|
+
The request defaults to one balanced development pair (two task invocations),
|
|
34
|
+
the existing 600-second executor deadline and unchanged adoption policy. Optional
|
|
35
|
+
`--spending-budget <file>` and `--executor-timeout-seconds <n|none>` are copied into
|
|
36
|
+
the request after validation. No token cap is implied when the budget is omitted.
|
|
37
|
+
This small run cannot authorize adoption. Inspect the returned next commands:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
skillfit eval --request ./comparison/request.json --dry-run
|
|
41
|
+
skillfit eval --request ./comparison/request.json --plan-sha <sha256-from-preview>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Run only within authorized spending. The separate evaluation preview checks the
|
|
45
|
+
agent environment; a ready workspace does not establish authentication or isolate
|
|
46
|
+
inherited global Skills/rules/MCP. For an already authored bench or larger
|
|
47
|
+
independent validation, use the request contract below. This preparation entry is included in npm 0.16.1; earlier packages do not provide it.
|
|
48
|
+
|
|
10
49
|
## Input and execution
|
|
11
50
|
|
|
12
51
|
Save `request.json` outside the evaluated Skill directories. All paths resolve
|
|
@@ -426,7 +426,9 @@ bench, selected task order and native/reviewed plans, and scope without its
|
|
|
426
426
|
required sealed declarations fails rather than taking the historical recovery
|
|
427
427
|
route. Legacy missing metadata stays unrecorded. Current-reader audit and the
|
|
428
428
|
package's pinned `reproduce.mjs` each interpret saved evidence with their own
|
|
429
|
-
runtime.
|
|
429
|
+
runtime. Paired replay preserves each trial's `condition/trial-N` parent layout in
|
|
430
|
+
its disposable copy, so a verifier that derives the arm from the run directory
|
|
431
|
+
observes the same condition as during native execution.
|
|
430
432
|
|
|
431
433
|
For [self-test controls](../guides/bench-authoring.md#test-known-controls), export a native
|
|
432
434
|
suite directory, not its wrapper. It retains a null requested claim, mock identity,
|
package/package.json
CHANGED
package/skills/skillfit/SKILL.md
CHANGED
|
@@ -10,7 +10,7 @@ truth for all numbers; your job is to pick the right command, run it, and interp
|
|
|
10
10
|
|
|
11
11
|
## Prerequisites
|
|
12
12
|
|
|
13
|
-
Check availability with `npx skillfit@0.16.
|
|
13
|
+
Check availability with `npx skillfit@0.16.1 --version`, or `node dist/cli.js --version` inside a clone.
|
|
14
14
|
If neither works, tell the user to install from https://github.com/remote-controlled-man/skillfit and stop.
|
|
15
15
|
For source-only commands below, set `skillfit_source` to the absolute path of a
|
|
16
16
|
built checkout, then run from the project/study workspace that owns the outputs.
|
|
@@ -24,13 +24,13 @@ and earlier lack them. Registry availability is
|
|
|
24
24
|
separate from source preparation, so inspect the installed version and fall back
|
|
25
25
|
to the reviewed implementing source snapshot when a 0.15.0 package is
|
|
26
26
|
unavailable. Read the
|
|
27
|
-
[capability table](https://github.com/remote-controlled-man/skillfit/blob/
|
|
27
|
+
[capability table](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md#executor-capabilities)
|
|
28
28
|
before promising a mode, strict budget or model provenance, and check the
|
|
29
29
|
installed version before relying on a flag a later release added.
|
|
30
30
|
|
|
31
31
|
Source links in this standalone driver use the
|
|
32
|
-
[reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/
|
|
33
|
-
That snapshot contains
|
|
32
|
+
[reviewed source snapshot](https://github.com/remote-controlled-man/skillfit/tree/17772db9b2f112a1e25d0284a76cf38860f7790b). They do not follow main.
|
|
33
|
+
That snapshot contains revision preparation and the startup fix before this release bump, so its built CLI reports source package version 0.16.0.
|
|
34
34
|
For a superseded release such as 0.13.1, use its
|
|
35
35
|
[original documentation](https://github.com/remote-controlled-man/skillfit/tree/4eaefde80f7e8a6b1e01939d3bd8a8b6418b75d6/docs);
|
|
36
36
|
do not substitute that older package for an example requiring 0.15.0 features.
|
|
@@ -42,21 +42,21 @@ do not substitute that older package for an example requiring 0.15.0 features.
|
|
|
42
42
|
| "我的 skill 有没有被用到 / are my skills used at all" | `skillfit report` — read-only, free, instant; start here |
|
|
43
43
|
| "这个配置健不健康" | `skillfit doctor` — read-only; current source supports versioned `--json` output and explicit `--strict` exit 1 on FAIL |
|
|
44
44
|
| "这个 skill 值不值得装 / does this skill help" | Preview `skillfit eval <skill-path> --mode installed --bench <bench> --agent <id> --trials 3 --dry-run`, then run within authorized spending |
|
|
45
|
-
| "新版 Skill 是否值得采用 / evaluate a candidate for a Skill evolution workflow" | With npm 0.9.0 or a current checkout, use `eval --request <request.json> --dry-run`; read the [component contract](https://github.com/remote-controlled-man/skillfit/blob/
|
|
45
|
+
| "新版 Skill 是否值得采用 / evaluate a candidate for a Skill evolution workflow" | With npm 0.9.0 or a current checkout, use `eval --request <request.json> --dry-run`; read the [component contract](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/reference/eval-component.md) for inputs and acceptance policy |
|
|
46
46
|
| "agent 自己想不想得起用它 / does it trigger" | same + `--mode trigger`. Add `--compete-installed` to copy other user Skills; otherwise recall is an upper bound. Codex counts a `SKILL.md` read |
|
|
47
47
|
| "这个 MCP 能不能连上 / is this MCP catalog valid" | Preview `skillfit mcp check <probe.json> --dry-run`, then check explicitly; current source also selects real JSON config with `--agent <id> --server <name> [--project]`. Never calls tools; may start/connect the server. Native Codex TOML selection is unsupported |
|
|
48
48
|
| "添加 / 修改 / 移除一个 MCP 配置" | Preview current-source `skillfit mcp apply --agent <id> --server <name> (--from <probe.json> | --remove) [--project] --dry-run`, then use `--yes`; JSON only, native Codex TOML refuses. No server/model call |
|
|
49
49
|
| "卸载一个托管 Skill / 移除托管规则" | Preview current-source `skillfit uninstall --agent <id> --skill <name> [--project] --dry-run`, then use `--yes`; `--rules` removes only the managed block. Local drift refuses; no usage-based automatic removal |
|
|
50
50
|
| "迁移个人 rules / Skills / MCP" | Preview current-source `skillfit bundle export <new-dir> --agent <codex|kimi-code> [--skill <name> ...] [--allow-symlink-root <dir> ...] [--mcp <name> ...] --dry-run`, then export with `--yes`; run the generated `setup.mjs --dry-run` before `--yes`. Same-Agent migration only; MCP accepts only structurally credential-free JSON declarations, never native Codex TOML. Skill links require explicit containing roots and stay inside the selected Skill; default refuses. No server/model call |
|
|
51
|
-
| "这个 MCP / AGENTS.md 真的有帮助吗" | Preview `skillfit eval <experiment-dir> --bench <bench> --agent <id> --trials 3 --dry-run`; follow the [configuration experiment guide](https://github.com/remote-controlled-man/skillfit/blob/
|
|
52
|
-
| "建一个 bench" | `skillfit bench init [dir]` then `skillfit bench check [dir]`; default schema 1 stays unrecorded; source supports explicit `--schema-version 2` with [claims](https://github.com/remote-controlled-man/skillfit/blob/
|
|
53
|
-
| "花钱前确认流水线能测到预期对照" | 0.15.0 / reviewed source: preview `node "$skillfit_source/dist/cli.js" bench self-test "$skillfit_source/benches/_self-test/example" --runs-root ./runs --run-group controls-001 --json --dry-run` from the owning workspace, then confirm with `--plan-sha <plan.sha256>`; read [self-test](https://github.com/remote-controlled-man/skillfit/blob/
|
|
51
|
+
| "这个 MCP / AGENTS.md 真的有帮助吗" | Preview `skillfit eval <experiment-dir> --bench <bench> --agent <id> --trials 3 --dry-run`; follow the [configuration experiment guide](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md#rules-and-mcp-overlays) |
|
|
52
|
+
| "建一个 bench" | `skillfit bench init [dir]` then `skillfit bench check [dir]`; default schema 1 stays unrecorded; source supports explicit `--schema-version 2` with [claims](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/benches/README.md#claims-and-measurement-scope) |
|
|
53
|
+
| "花钱前确认流水线能测到预期对照" | 0.15.0 / reviewed source: preview `node "$skillfit_source/dist/cli.js" bench self-test "$skillfit_source/benches/_self-test/example" --runs-root ./runs --run-group controls-001 --json --dry-run` from the owning workspace, then confirm with `--plan-sha <plan.sha256>`; read [self-test](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/bench-authoring.md#test-known-controls) for controls, limits and fresh output rules |
|
|
54
54
|
| "做代码修改 case" | `bench init <dir> --kind command --dry-run`, then apply within the authorized scope; replace the teaching case with the real fixture, prompt, verifier and oracle |
|
|
55
55
|
| "给 Agent 看 case 校验失败原因" | `bench check <dir> --json` — offline gate IDs, evidence and remediation; this is the integrity result, not calibration |
|
|
56
56
|
| "先测 case 难度" | Version 0.11.0: `bench check <dir> --calibrate --agent <id> --task <id> --trials 1 --max-calls 1 --run-group <fresh-name> --json --dry-run`; calibrate only within authorized spending |
|
|
57
57
|
| "查看或管理 case" | `bench list <dir> --json`, `bench show <dir> <id> --json`; preview `bench edit <dir> <id> --set field=value --json` or `bench remove <dir> <id> --json` |
|
|
58
58
|
| "只测几个 case" | Repeat `eval --task <id>` or set request `taskIds`; source also supports task selection for calibration/trigger; preview the selected budget and keep validation independent |
|
|
59
|
-
| "把结果交给另一台机器复现" | Preview `report eval <run-dir> --export <new-dir> --json`, then apply within the authorized scope; read the [portable package contract](https://github.com/remote-controlled-man/skillfit/blob/
|
|
59
|
+
| "把结果交给另一台机器复现" | Preview `report eval <run-dir> --export <new-dir> --json`, then apply within the authorized scope; read the [portable package contract](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/reference/evaluation-reports.md) for matching inputs, stopped costs and sharing review |
|
|
60
60
|
| "把这次翻车存成任务" | `skillfit bench add <bench> --freeze --task <id> --prompt "..." --verifier-cmd "<cmd>"` |
|
|
61
61
|
| "帮我起草 verifier" | same but `--decompose --agent <id>` — an agent drafts verifier + oracle; admitted only if the NOP + oracle gates pass |
|
|
62
62
|
|
|
@@ -74,13 +74,28 @@ commands and eval; local paths win. Editing still needs an owned local directory
|
|
|
74
74
|
Git-root benches are supported since 0.12.0, with metadata excluded consistently.
|
|
75
75
|
Keep `--runs-root` outside the bench/Skill/runtime and Git metadata; bad layouts
|
|
76
76
|
are rejected at preview, including aliases. See the
|
|
77
|
-
[first-run guide](https://github.com/remote-controlled-man/skillfit/blob/
|
|
77
|
+
[first-run guide](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/first-real-eval.md).
|
|
78
|
+
|
|
79
|
+
For a first revision comparison, npm 0.16.1 and newer provide `--prepare`; check `eval --help`.
|
|
80
|
+
When available, preview `eval <new-skill> --baseline-skill <old-skill> --prepare
|
|
81
|
+
<fresh-workspace> --from-commit <fix-sha> --source-dir <repo> --prompt-file
|
|
82
|
+
<issue-request> --agent <id> --dry-run`. This validates two complete same-name,
|
|
83
|
+
different-byte Skills and mines the fix plus its tests without model calls.
|
|
84
|
+
Apply within existing local-write authorization using `--yes`; creation executes
|
|
85
|
+
trusted offline verifier/oracle commands, with `--verifier-cmd` retained for later
|
|
86
|
+
runs (default `node --test`). Failed gates retain the workspace as blocked. No
|
|
87
|
+
agent configuration is changed or isolated. The generated request uses one
|
|
88
|
+
balanced development pair with a two-call ceiling; optional spending-budget and
|
|
89
|
+
executor-timeout flags are copied into it. Preview the returned request separately
|
|
90
|
+
and confirm its exact digest only within authorized spending. This entry does not
|
|
91
|
+
prepare independent validation or relax the adoption policy. npm 0.16.0 and
|
|
92
|
+
earlier do not include this preparation entry.
|
|
78
93
|
|
|
79
94
|
Since 0.12.0, `--freeze` selects tracked ordinary files inside Git; outside Git,
|
|
80
95
|
explicit `--include <file-or-dir>` selections are required. Narrow large fixtures
|
|
81
96
|
before importing. For `--decompose`, preview and authorize its single call within
|
|
82
97
|
existing spending permission. Failed/interrupted drafts retain costs and inputs;
|
|
83
|
-
never retry implicitly. See [drafting records](https://github.com/remote-controlled-man/skillfit/blob/
|
|
98
|
+
never retry implicitly. See [drafting records](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/bench-authoring.md).
|
|
84
99
|
|
|
85
100
|
Current-source schema 2 requires explicit `--claim` values for add/freeze/from-commit;
|
|
86
101
|
claims edits use a JSON array and never upgrade schema 1 implicitly. Preview and
|
|
@@ -112,7 +127,7 @@ Dry previews execute no verifier/oracle/agent. Inspect the environment's nested
|
|
|
112
127
|
`status`: a generated `planned` result can still be blocked by a missing CLI.
|
|
113
128
|
Login always remains offline unknown. Live calibration/eval block hard case or
|
|
114
129
|
environment failures; warnings and unknown evidence are not interchangeable.
|
|
115
|
-
See [shared planning](https://github.com/remote-controlled-man/skillfit/blob/
|
|
130
|
+
See [shared planning](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md).
|
|
116
131
|
|
|
117
132
|
Calibration has one no-Skill baseline arm and defaults to two trials; trigger
|
|
118
133
|
has one installed arm, defaults to five and skips unlabeled selected tasks.
|
|
@@ -219,7 +234,7 @@ historical adoption requirement; a declaration mismatch is an integrity error.
|
|
|
219
234
|
source checkout; source-development validation uses OS temporary directories.
|
|
220
235
|
Exclude outputs from that project's Git history; the CLI does not edit its ignore rules.
|
|
221
236
|
Keep derived analysis/scratch outside sealed batches; never edit/prune indexed
|
|
222
|
-
receipts. Follow the [workflow](https://github.com/remote-controlled-man/skillfit/blob/
|
|
237
|
+
receipts. Follow the [workflow](https://github.com/remote-controlled-man/skillfit/blob/17772db9b2f112a1e25d0284a76cf38860f7790b/docs/guides/experiment-workflow.md#retain-and-clean-up)
|
|
223
238
|
for explicit manual retention/cleanup. This CLI has no automatic GC or generic
|
|
224
239
|
custom process-metric collector.
|
|
225
240
|
- `bench init` / `bench add` show a plan before writing; `bench edit/remove` default
|