Skip to content

Commit c3c0c30

Browse files
feat(skills): scenario-eval internal skill for eval rounds and the eval-run record (#34006)
<!-- claude-projects-attribution: {"github_login":"os-steve"} --> _Requested by **Steve** · [project thread](https://claude.ai/code/project/chan_01FdL1XeUyvVNxLreh3F4Qi9?thread=cmsg_01FdL1XeUyvVNxLreh3F4Qi9J4aPx8N1Kyneqy3VTTtNSY)_ Fixes #33923 Clause-②: no Metadata-protocol: none ## 维护者速读 - 改了什么:新增内部技能 `.claude/skills/scenario-eval/SKILL.md`(评测席跑一轮场景卡的方法:排卡、模型与 effort 配置、5 次重复与噪声、录制回放、`eval-run` 记录格式、发现去向);`lanes/eval.md` 改三处:产出加上场景卡照技能跑、立 `eval-run` 记录(其它评测仍每轮一份评分卡)、定时归本席自控、「不对外发布准确率数字」对场景卡记录豁免。 - 为什么改:你的令「技能应该进仓库,测试卡也应该进仓库,参考 qa」与 "objectstack 公开仓,像 qa-run";今天跑一轮的方法只在一个席位的笔记里,换席就没法重复或审计。 - 风险与回滚:只是内部 agent 文本,不发布、不碰代码;回滚 = revert 本 PR。 - 先看:`.claude/skills/scenario-eval/SKILL.md` §5(记录格式)与 §2(配置);`lanes/eval.md` 边界节两行(准确率数字的豁免只给场景卡记录,问数基线 ② 照旧不发)。 - 两分钟验证:`node scripts/pm/check-skill-line-ratchet.mjs`,预期 `lanes/eval.md is 45 lines (ceiling 45; headroom 0)` 且退出 0。 - 需要你做的:无,席位落地(Tier S,席位跑达档复审后入队)。 ## What changes - New `.claude/skills/scenario-eval/SKILL.md` (`metadata.internal: true`), modelled on `checklist-test`. It points at `packages/qa/scenarios/README.md` for runner mechanics (flags, modes, the cloud-session settings, grading) and copies none of them. Sections: - §0 environment (subscription login, no API variables, dependencies built first, `claude --version` recorded, the runner sha pinned for the whole round); - §1 round plan (control cards every round, read off the card files by `tier`; starter cards scratch-only, one per command under the 2-hour background cap, at most two in parallel; `--packages published` with `--create-version` pinned across the round); - §2 configs (tracked = the hosted default, today `--model haiku --effort medium`, current value in the seat post; reference = `--model opus --effort low`; `--model` and `--effort` always explicit; served-model mismatches kept out of the mean); - §3 repetitions and noise (5 per config for a model or effort decision; a single run's Ask moves about ±4 of 58 on the control cards, so one round reports a trend; mean and min–max, method stated; no silent re-rolls or dropped outliers); - §4 recording and replay, with a command block a fresh session can run for a control-card round; - §5 the `eval-run` record: title shape, label `eval-run` only, body sections Environment / Scope / Results / Reading / Findings filed from this run / Records, writes through the pm-dispatch write gate, close when every finding has a destination; - §6 findings routing (grader misreads to the scorer owner, product defects through the filing gate, skill text as a `domain:skills` finding, leaks and any security lead only per `references/security-findings.md`, pointer only). - `.claude/skills/pm-dispatch/references/lanes/eval.md`: - 〈座位与唤醒〉: the "Routines are set by the maintainer; the seat never creates or changes them" line is replaced by the maintainer's order that the seat runs its own schedule (2026-11-14 「你自己控制定时可以吗?」), merged with the suggested cadence line. The words are quoted on card #33923 (its body, filed by the eval seat) from the eval seat's thread, 2026-11-14; the seat reads them as a hand-over to their addressee, eval#1. - 〈产出〉: one line now reads 「场景卡每轮照 `scenario-eval` 跑并立 `eval-run` 记录;他项每轮一份评分卡;皆附上轮趋势对比。」 It names the skill and the record and keeps main's general rule (「每轮一份评分卡,附与上一轮的趋势对比」) for every other scope, so 〈边界〉's 「评分卡」 keeps its definition. Nothing in 〈产出〉 is deleted (fix round 1, M1). - 〈边界〉: 「⛔ 不对外发布准确率数字」 now exempts scenario-card `eval-run` records only (ruling on the eval seat's decision card "eval 测试记录卡放哪个仓?": "objectstack 公开仓,像 qa-run"); the ask-accuracy baseline ② keeps the line. ## Why The qa seat runs from a repository skill and leaves one `qa-run` record per round; the eval seat had only its charter, and its round method lived in one seat's notes. The maintainer directed 「技能应该进仓库,测试卡也应该进仓库,参考 qa」. ## Acceptance notes - **Premise drift, card items 2 and 4.** The card and its dispatch said effort goes by `CLAUDE_CODE_EFFORT_LEVEL` until the runner's effort flag lands, and that replay cannot score operations until the replay fix lands. Both landed before this PR: #33739 (closed by #33767, `--effort` / `--author-effort` / `--ask-effort`) and #33737 (closed by #33764, replay re-sends recorded writes). Read on origin/main `b8ac0e24`: `packages/qa/scenarios/src/runner/cli.ts` documents the three effort flags, and the package README's Driver bullet says a replay re-sends each turn's recorded writes. So the skill teaches the landed behaviour: always pass `--effort`, and replay re-scores Build, Ask and operations, with a write that cannot be re-sent read as not measured. It cites neither card as open. - **How the first record, #33920, differs from the skill's shape.** Its sections and title match the skill's (Environment / Scope / Results / Reading / Findings filed / Records; `Eval run · SCOPE × N configs × R reps · SHA8 · DATE`). Where it differs: 1. effort was set by `CLAUDE_CODE_EFFORT_LEVEL`; the skill requires `--effort` on the command line; 2. its Environment names no `claude --version`; 3. its Scope gives no per-command exit codes or not-measured halves. It says "all exit 0", which covers the first; the second is not stated; 4. it does not say how the means were computed (pooled counts or the mean of per-rep percentages); 5. it was closed three minutes after filing. Under the skill that is right only when every finding already has a destination, which its Findings section shows; 6. its Results heading carries a suffix, and its Build column has no min–max; 7. one of its configs ran at the CLI default effort, which §2 now forbids (`--effort` is always explicit). - **No ceiling row for the new skill.** `check:pm-skill-ratchet` covers an enumerated map, not a glob, and no derived gate named a row for a new `.claude/skills/*` directory, so none was added (file surface: only rows a gate names). The new file is 127 lines; several prose lines run past 120 bytes, which only ceilinged files are held to. Adding a ceiling row is the seat's call. - `lanes/eval.md` stays at its 45-line ceiling with headroom 0. What was deleted: (a) 「节奏由维护者在 Routines 设定;⛔ 本席不自建、不改频率」, reversed by the schedule order; (b) the cadence line as a separate line, its content merged into the schedule line. What was kept: 〈产出〉's general scorecard rule (see above). The one line this PR adds (the ask-accuracy baseline line in 〈边界〉) is paid for by (b). No line was gained by re-wrapping. - **Fix round 1 (contract review 6897354155).** M1: the 〈产出〉 line above. S2: §5 quotes the record-location ruling verbatim ("objectstack 公开仓,像 qa-run") and keeps 「带全分」 outside the quote as the derived rule. S1: §5 says the triage sweeps do not yet know the `eval-run` label (their exclusion lists name `qa-run` only), so until they do the record closes in the round it is filed, or triage is told it is a record; the sweep change itself is the seat's follow-up card. S3: the schedule words' source is stated above. N1: the §4 block marks its control-card list as the list at the time of writing. N4: a security lead's Findings line is the fixed line of `security-findings.md` §4, nothing more (and §6's row says the same). N2: differences 6 and 7 above. N3 not taken (no line to spare in `eval.md`). - Forced test edits: none. ## Verification At head `7d9600e4` (fix round 1), in the card worktree: - `node scripts/pm/dispatch-gates.mjs --commands --repo objectstack-ai/objectstack` derived 17 commands. All 17 ran and exited 0. The run reconciles: `--ran` reports "17 derived famil(ies) accounted for — 17 run, 0 NOT-MEASURED (a DERIVED zero — all 17 recorded an exit code and none of them is 3)". - On the first head `3d9dedb1`, `check:doc-formula-expressions` first exited 3 (prerequisite not met: `@objectstack/lint` and `@objectstack/formula` not built). After `pnpm exec turbo run build --filter=@objectstack/formula --filter=@objectstack/lint` under `os-verify-lock` (VERDICT command-exit 0), it exited 0. - `pnpm check:pm-skill-ratchet` exited 0 on both heads: `lanes/eval.md is 45 lines (ceiling 45; headroom 0)`. `pnpm check:pm-skill-id-lint`, `pnpm check:skill-frame-sync`, `pnpm check:nul-bytes` and `pnpm check:pm-governed-merges` also exited 0. - `pnpm --filter create-objectstack exec vitest run --maxWorkers=2 src/template-consistency.test.ts` passed: Test Files 1 passed (1), Tests 41 passed (41). That covers the `metadata.internal` marker on every SKILL.md outside `skills/`. - No changeset: the diff is `.claude/**` only and publishes nothing (`skip-changeset`). - Governed surface, Tier S (`.claude/**`). This PR stays draft until the owning seat's contract-review record. <!-- signed: domain:skills#2 · os-steve · session_01ADHkmSzqTCJc8NsdLvgbyw --> --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 9db729f commit c3c0c30

2 files changed

Lines changed: 135 additions & 4 deletions

File tree

‎.claude/skills/pm-dispatch/references/lanes/eval.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
## 座位与唤醒
55

66
- 席位 `eval#N`,首席 `eval#1`;签名、座位贴、信箱同他席;无 `domain:*` 标签、无 `pm:queue`。
7-
- 节奏由维护者在 Routines 设定;⛔ 本席不自建、不改频率。
8-
- 建议节奏:每周一轮场景卡;每次发版一轮问数基线。
7+
- 定时归本席自控(维护者令):自建自调 Routines;建议每周一轮场景卡,每版一轮问数基线。
98

109
## 评测范围
1110

@@ -24,15 +23,16 @@
2423

2524
## 产出
2625

27-
- 每轮一份评分卡,附与上一轮的趋势对比。
26+
- 场景卡每轮照 `scenario-eval` 跑并立 `eval-run` 记录;他项每轮一份评分卡;皆附上轮趋势对比。
2827
- 产品缺陷按立卡门交对应车道;评分误判交跑分器维护者。
2928

3029
## 边界
3130

3231
- ⛔ 不派 `os-dev`、不改产品代码、不开 PR。
3332
- 技能文本归 `domain:skills`;本席见文本问题以 `finding` 报。
3433
- 安全发现(含任何泄露)只照 `../security-findings.md`;评分卡里的泄露只写有泄露,⛔ 不写内容。
35-
- ⛔ 不对外发布准确率数字;对外口径由维护者决定。
34+
- ⛔ 不对外发布准确率数字;唯场景卡 `eval-run` 记录带全分进本仓(维护者令)。
35+
- 问数基线 ② 的数字仍不对外;对外口径由维护者决定。
3636

3737
## 地盘
3838

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
---
2+
name: scenario-eval
3+
description: >
4+
Run one round of the scenario-card eval (docs/qa/scenarios/) and file its
5+
`eval-run` record. Use whenever the eval seat or the maintainer says "跑一轮场景卡",
6+
"跑 control 卡", "对比模型 / effort", "run an eval round", "re-score the recordings",
7+
or asks how a model or effort config scores on the scenario cards. Covers the round
8+
plan, the configs, repetitions and noise, recording and replay, the record shape and
9+
where findings go; runner mechanics stay in packages/qa/scenarios/README.md. The eval
10+
counterpart of `checklist-test`. NOT a customer-published skill — internal agent
11+
tooling (lives in .claude/, never in the published `skills/` dir).
12+
metadata:
13+
# Hides this skill from interactive `npx skills add objectstack-ai/objectstack`
14+
# discovery — every SKILL.md outside `skills/` must carry this marker
15+
# (template-consistency.test.ts enforces it).
16+
internal: true
17+
---
18+
19+
# Scenario eval —— 跑一轮场景卡评测,立一张 `eval-run` 记录
20+
21+
一轮 = 选定的场景卡 × 若干模型/effort 配置 × 若干次重复,产出**一张** `eval-run` 记录 issue。
22+
跑法(参数、模式、评分口径、云会话设置)是 **`packages/qa/scenarios/README.md`** —— 先读它、
23+
服从它;卡的格式与 tier 是 `docs/qa/scenarios/README.md`。本技能只管一轮怎么排、怎么配、
24+
怎么记、发现交给谁,⛔ 不复述 runner 机制。岗位与地盘见 pm-dispatch `references/lanes/eval.md`。
25+
26+
## 0. 环境 —— 照 README〈Running the cards in a Claude Code cloud session〉
27+
28+
- 订阅登录(`claude auth status` 答 `oauth_token`),`ANTHROPIC_API_KEY` / `ANTHROPIC_AUTH_TOKEN` 都 unset;
29+
⛔ 不用 API 计费的模型。权限模式非 Auto。前台命令有时限,一轮里每条 runner 命令都放后台。
30+
- 先建依赖:`pnpm install && pnpm --filter '@objectstack/scenarios^...' build`;
31+
没建就跑会停在 `ERR_MODULE_NOT_FOUND`,那是环境,不是读数。
32+
- 记下 `claude --version`:effort 档位表随 CLI 版本变,记录的环境行要带它。
33+
- runner 的 sha 整轮钉死:轮中 ⛔ 不拉 `main`。评分器改了,分数就不可比;要用新评分器,走 §4 回放。
34+
35+
## 1. 规划这一轮
36+
37+
- **control 卡每轮必跑**:`grep -l '"tier": "control"' docs/qa/scenarios/*.json` 读出名单,⛔ 不凭记忆列。
38+
三张小卡可同一条命令(`--only A,B,C`);首轮实测一次重复 haiku 约 45 分钟、opus low 约 25 分钟。
39+
- **starter 卡只跑 scratch**(`--modes scratch`),一卡一条命令(`--only ID`):一条后台命令限 2 小时,
40+
starter 的搭建就要 20–30 分钟;同一容器至多两条并行,各自起各自的端口(README 原文)。
41+
- `template` 模式要一份已验证的构建(`--template F`),不进例行;本轮的问题点名它才跑。
42+
- **包来源**:评测量的是客户拿到的东西 —— `--packages published`(默认),并用
43+
`--create-version V` 把整轮所有配置与重复钉在同一个发布版本上;`workspace` 是 QA 席测未发布波的用法。
44+
- 规划写成一张表再动手:卡 × 配置 × 重复 → 命令条数 × 预计墙钟;超出 2 小时的一条拆开。
45+
46+
## 2. 配置
47+
48+
- **跟踪配置** = 托管默认(写本技能时:`--model haiku --effort medium`);**参照配置** = `--model opus --effort low`。
49+
托管默认变了以座位贴为准,本技能 ⛔ 不跟着改值。其它配置只在本轮问题需要时加。
50+
- 每条命令**显式**写 `--model` 与 `--effort`。⛔ 不用 CLI 默认模型不点名(登录不同、默认不同,还会悄悄变);
51+
⛔ 不靠 `CLAUDE_CODE_EFFORT_LEVEL` 环境变量:它只是 `--effort` 缺省时的回退,命令行上看不见。
52+
- `--author-model` / `--ask-model`(及两个 effort 对应项)只在本轮要拆开搭建与问答时用,记录里写明。
53+
- 读计分卡的 `Run · model` 与 author 行核对**实际服务的模型**:出现 `⚠ asked for` / `not <model>` 的
54+
那次运行不属于该配置,单列说明,⛔ 不并入均值。effort 只有请求值,没有服务值可核(README)。
55+
56+
## 3. 重复与噪声
57+
58+
- **要据此定模型或 effort 的,每配置 5 次重复。** 单次运行的问数在 control 三卡 58 题上会摆动约 ±4 题:
59+
单次一轮只报**趋势**,⛔ 不排名次,记录的 Reading 照此措辞。
60+
- 结果按配置报**均值 + 最小–最大**,再按卡把 5 次合并报一张表。汇总脚本 runner 里还没有:
61+
手算或本席脚本都行,记录写明算法(分子分母合并,还是逐次百分比再平均)。
62+
- 只和上一张记录的**同一配置、同一组卡**比;发布版本或 runner sha 变了,Reading 点名这一变量。
63+
- 每次重复都进记录:没跑完的照实写 `not measured` 与原因(README 的超时、`error_max_turns` 等),
64+
⛔ 不静默重跑顶替,⛔ 不剔除离群值;重跑了就写重跑了。
65+
66+
## 4. 录制与回放
67+
68+
- **每条命令都录**:`--record FILE`,一条命令一个文件,路径带配置与第几次重复。
69+
pnpm 在包目录里跑脚本,`--out` / `--record` 一律传绝对路径。
70+
- **回放** `--driver recorded:FILE`:不调模型、不花额度,重评一轮旧运行。它把每个回合录下的写调用按序
71+
重发给新起的应用,所以 Build、问数、写操作三项都能重评;一回合重发不成的记 `not measured` 并点名
72+
那次调用,⛔ 不判 fail。回放拒收模型与 effort 参数,记录沿用录制时的驱动(`replayOf`)。
73+
- 回放重评同样立一张 `eval-run` 记录:Scope 写明回放的是哪张记录的录音、评分器在哪个 sha;旧记录不改。
74+
75+
```bash
76+
# --only 的三张 control 卡是写本技能时的名单;跑前照 §1 从卡文件重读
77+
unset ANTHROPIC_API_KEY ANTHROPIC_AUTH_TOKEN
78+
claude auth status && claude --version
79+
pnpm install && pnpm --filter '@objectstack/scenarios^...' build
80+
OUT=/abs/path/eval-runs/DATE-ROUND/haiku-medium/rep1 && mkdir -p "$OUT"
81+
nohup pnpm --filter @objectstack/scenarios run-scenarios \
82+
--only crm_account_with_contacts,invoice_with_line_items,project_with_tasks --modes scratch \
83+
--model haiku --effort medium --create-version VERSION \
84+
--out "$OUT" --record "$OUT/run.rec.json" > "$OUT/run.log" 2>&1 &
85+
```
86+
87+
## 5. 记录 —— 一轮一张 `eval-run` issue
88+
89+
维护者令(原话):"objectstack 公开仓,像 qa-run"。据此场景卡评测记录立在本仓、带全分(问数基线 ② 的
90+
数字仍不对外,见 `lanes/eval.md`)。运行产物 ⛔ 不进仓库树:run 记录 JSON、录音、日志留在 git-ignore 的默认
91+
`--out` 目录或本席的项目文件里;issue 就是报告,纯文本,⛔ 不放图。
92+
93+
- **写入门**:立单、评论、关单全走 pm-dispatch 写入门,照 `checklist-test` §4 那一段;⛔ MCP `issue_write`。
94+
- **标题**:`Eval run · SCOPE × N configs × R reps · SHA8 · DATE`,如
95+
`Eval run · control cards × 3 model configs × 5 reps · 3be13473 · 2026-11-15`;SHA8 是 runner 的 commit。
96+
- **标签**:只带 `eval-run`;⛔ 不挂 priority / `domain:*` / `pm:*`。记录不是可派发单元,整个生命周期都不补挂。
97+
- **正文**,按此顺序,英文:
98+
- `## Environment` —— runner 仓与 sha;包来源行(`packages: published 18.4.0`)与模式;驱动与登录
99+
(`oauth_token`,无 API key);`claude --version`;每个配置实际服务的模型与请求的 effort;花费是 CLI
100+
报的名义数,未计费。
101+
- `## Scope` —— 卡 id 与 tier、首轮加 iterate;配置清单;每配置重复次数;每次重复的题数、写操作数、
102+
Build 检查数;每条命令的退出码;`not measured` 的半边逐个点名原因(⛔ 不计入分母)。
103+
- `## Results` —— 一行一个配置:Build · 问数 · 写操作(均值,括号最小–最大)· 每次重复的泄露标记**数**
104+
· 搭建分钟 · 问答分钟 · 每次重复名义花费;再一张按卡合并表。泄露只写数,⛔ 不写内容。
105+
- `## Reading` —— 编号结论,每条按 §3 的噪声规则措辞,并与上一张记录比。
106+
- `## Findings filed from this run` —— 每条发现一行,写去向(§6);无则写 `none`。安全线索那一行只写
107+
`security-findings.md` §4 的固定一句,别无其它。
108+
- `## Records` —— 产物放在哪(路径),说明留在仓库树外、可回放。
109+
- **收口**:§6 的每条发现都有了去向(卡号或已报的私密渠道)即由本席关 `completed`;
110+
⛔ 不为等修复开着,修复的回测进下一轮。上一轮的记录不 supersede:每张都是它那个 sha 上的一次测量。
111+
- **分诊扫描还不认 `eval-run`**(排除名单只列 `qa-run`):在它补进之前,记录在立单的同一轮关闭;
112+
当轮关不了,就告诉分诊席这是一张记录、不是待分诊的卡。
113+
- 记录立好后给维护者一句话:链接 + 两行 Reading。
114+
115+
## 6. 发现 —— 各归各主
116+
117+
| 读到的 | 去向 |
118+
|:---|:---|
119+
| **评分误判**:评分器把对的判错、错的判对(含泄露标记误报) | 跑分器主人:`packages/qa/scenarios` 归 `domain:devx`,有开着的评分专题卡就作它的一行 / 子卡(卡号见座位贴),否则走立卡门 |
120+
| **产品缺陷**:平台拒收合法写、probe 失败、能力缺失 | 立卡门(pm-dispatch `references/filing-gate.md`)交对应车道;probe 失败算平台,不算 agent |
121+
| **技能文本**:agent 照着已发布技能搭错 | 以 `finding` 报 `domain:skills`;本席 ⛔ 不自改技能 |
122+
| **泄露 / 任何安全线索** | 只照 pm-dispatch `references/security-findings.md`;Results 只写泄露标记数,Findings 只写该文 §4 的固定一句,⛔ 不写内容、不立公开卡 |
123+
124+
泄露标记先分清是评分误判还是真泄露;真泄露只走最后一行。
125+
126+
## Guardrails
127+
128+
- ⛔ 不派 `os-dev`、不改产品代码、不开 PR(`lanes/eval.md` 边界);runner 或卡要改,立卡交车道。
129+
- ⛔ 不用 API 计费;花费只报 CLI 报的名义数(车道成本规则)。
130+
- `not measured` 就是 `not measured`:⛔ 不记 pass、不记 fail、不挑重复、不剔离群。
131+
- 一轮一张记录;回放重评另立一张,⛔ 不改旧记录的分数。

0 commit comments

Comments
 (0)