Repository navigation
feat(scenarios): an opt-in skills directory for ask turns, and dataset questions on two open cards - #34808
Conversation
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
…trol card keeps its corpus-derived expect Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
…hangeset Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
📓 Docs Drift CheckThis PR changes 1 package(s): 16 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 9 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 1 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 3d2d3fec09dee811db05edec246b527e7899e941 && git checkout 3d2d3fec09dee811db05edec246b527e7899e941
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin 3bbda33b78fff2681db9c09732347bc62ffc4cc6 372dfc5ec31481488d0c6961da5654cc0be6f44f && git checkout -B drift-repro 3bbda33b78fff2681db9c09732347bc62ffc4cc6 && git merge --no-ff 372dfc5ec31481488d0c6961da5654cc0be6f44f
node scripts/docs-audit/affected-docs.mjs --json 3bbda33b78fff2681db9c09732347bc62ffc4cc6
|
…lic surface The diff adds the `--ask-skills` CLI flag, new card keys and new exports on `.`, `./score`, `./score/full` and `./runner`, so `Clause-②: no` was wrong; the line now enumerates that surface. Level stays patch (non-protocol). Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: ① Derived judgmentsRead against
② Semver level
③ Boundary flags
Implemented-by: VERDICT: PASS |
…ssing dataset-question recording is not measured Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
…ot-measured dataset replay; changeset names every changed scorer Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WGufzg1NmbJpZhtiWQkTir
|
repo:objectstack#3 · os-support-ai · session_01WGufzgh1zkZzDXL36ckWAG Contract reviewServed-tier: ① Derived judgmentsDelta review of
② Semver levelUnchanged: ③ Boundary flags
Implemented-by: VERDICT: PASS |
|
repo:objectstack#3 · os-support-ai · session_01WGufzfWpJ96QY9T7d8DvFg L1: ACCEPT · 2026-11-17T12:42ZHead-sha: 372dfc5 席位核对PR shape. Draft, base Scope vs claim. All 27 paths sit inside the restated claim's surface: Declaration. The body's Governed / size. Check-runs at 372dfc5. 55 runs, every one S1 of L2 (a skill's front matter widening the turn): closed. I read
A key outside the ten-key set never reaches a turn. With no S2 of L2 (pre-PR recording replays fail every Code read (graders, loader, driver).
Docs made false? Both READMEs gain their rows. The Must-fixNone. Should-fix
Notes
Next: the seat owes the L2 delta on |
|
repo:objectstack#3 · os-support-ai · session_01WGufzg1NmbJpZhtiWQkTir Landing · area o3-F · 2026-11-17T12:44Z
State change: ready for review + auto-merge (merge queue). |
Requested by Yibo Wang · project thread
repo:objectstack#3 · os-support-ai · session_01WGufzg1NmbJpZhtiWQkTir
Part of #34687 — this PR lands the runner option, the dataset cards and the three graders; the five-repetition round with and without skills stays on the card.
Clause-②: yes (widening) — new CLI flag
--ask-skillsonobjectstack-scenarios run/run-scenarios; the card schema accepts the optional keysexpect.datasetsandrun.datasetQuestions, with new exportsDatasetExpectationSchema,DatasetMeasureExpectationSchema,DatasetDimensionExpectationSchema,DATASET_MEASURE_AGGREGATES,DatasetMemberRefSchema,DATASET_QUESTION_KINDS,DatasetExpectedRouteSchema,DatasetQuestionSchemaand the typesDatasetExpectation,DatasetQuestionKind,DatasetExpectedRoute,DatasetQuestion, and new optional fieldsScenarioExpect.datasetsandScenarioCard['run'].datasetQuestions(.); new exportsEvalGraphDatasetandEvalGraphDatasetMember, andEvalGraph.datasetsitems gaining optionalobjectandmembers(./score,./score/full); new exportsDATASET_GRADERS,OBJECT_QUERY_TOOLS,statedFigures,labelsFallback,gradeDatasetQuestion,gradeCardDatasetQuestionand the typesDatasetGrader,DatasetGrade(./score/fullonly); new exportsdatasetLines,datasetQuestionPrompt,datasetTallyandDatasetQuestionResult, new optional fieldsClaudeCodeDriverOptions.askSkillsDir,DriverInfo.askSkills,RunHalf.datasetQuestionsandHalfScores.datasets, andTABLE_DIMENSIONSgaining'ask skills'(all./runner).scoreGraph(./score,./score/full) andscoreScenarioArtifact(./score/full) answer differently on a card that declares datasets: they adddataset:anddataset-measure|dimension:checks, so that card's Build total grows;scoreCardArtifact(./score/full) answers with those checks too, andartifactToEvalGraph(./score,./score/full) reads each dataset'sobjectand every measure's and dimension'ssynonymsanddescriptioninto the graph it returns.DriverInfo.askSkillsis typed byAskSkillsInfo, which carries no exported name.Metadata-protocol: none
维护者速读
--ask-skills DIR(默认关闭),问数回合可加载指定技能并在记录里写明技能名与哈希;order_to_cash、travel_expense 两张公开卡加上带同义词与说明的数据集,以及五道数据集问题;新增三个评分器(选中指标 / 反问澄清 / 标注兜底)。@objectstack/scenarios(内部评测工具)与两张卡;参数关闭时回合参数和记录逐字节不变;两张卡的 Build 总分多出数据集检查项,旧记录不可与新记录直接对比总分。回滚即 revert 本 PR。packages/qa/scenarios/src/score/scenario-dataset-grade.ts(评分判据,尤其statedFigures与labelsFallback的词表)、packages/qa/scenarios/src/datasets.ts(加载器对词与数据集的约束)、packages/qa/scenarios/src/runner/driver.ts的ask()(技能放置与Skill放行)。pnpm --filter @objectstack/scenarios exec vitest run test/runner/ask-skills.test.ts test/score/scenario-dataset-grade.test.ts test/dataset-cards.test.ts,预期三文件全绿。What changes
--ask-skills DIR(src/runner/ask-skills.ts,driver.ts,cli.ts,summary.ts). Off by default, liveclaudedriver only (codex, external and replay are refused). It takes one skill directory, or a directory of them, and reads them once before any card runs. A directory that holds no skill is refused. Every question and operation turn gets those bytes at.claude/skills/NAME/in its working directory, and--allowedToolsgainsSkillbesidemcp__app. Authoring turns never see them. The record's driver gainsaskSkills: the directory, plus each skill's name, the sha256 of its files, and its front-matterversionwhen it has one. The console's driver line names them.summarygains anask skillstable dimension, so runs with different skills are refused rather than summed. A record without skills readsnoneand prints as before. When the option is off, the turn's argv, its working directory and the record'sdriverkeys are unchanged; a unit test pins this. A skill cannot widen the turn: aSKILL.md(nested ones too) whose front matter carries a key outside a closed set (name,description,version,license,compatibility,metadata,when_to_use,argument-hint,user-invocable,disable-model-invocation) is refused when the directory is read, before any turn runs, as is a front matter the runner cannot read for certain.Card layer (
src/schema.ts,src/datasets.ts,loader.ts,namespace.ts).expect.datasetsdeclares datasets with measures and dimensions, each with optionalsynonymsanddescription.run.datasetQuestionsdeclares questions of three kinds:metric_selected {dataset, measure},asked_back {reason: ambiguous|near_miss, candidates}andfallback_labelled {object}. The loader enforces the following, normalizing words the way the platform matches terms (normalizeDatasetTerm):DatasetSchema;Build half (
prompts.ts,scenario-score.ts,scenario-graph.ts). The build prompt states every dataset with its synonyms and descriptions. The scorer addsdataset:NAMEanddataset-measure|dimension:NAME.MEMBERchecks for the object, a missing synonym, and a missing description.Run half (
orchestrate.ts,scenario-dataset-grade.ts,scorecard.ts). Dataset questions are asked after the questions and before the operations, as the admin, and they honour--ask-repeats. Each is graded on its route, never its figure:metric-selectedreads thequery_datasetanswer'sprovenance, never the arguments;asked-backrequires a question, every candidate named by a word other than the asked one, and no stated figure;fallback-labelledrequires an object query on the expected object with no dataset answering, plus a not-governed label from a closed English and Chinese word list.A replay whose recording holds no turn for a dataset question records that ask as not measured, never as failed.
Notes record a loaded skill, a missing
list_datasetscall, and anycandidatesalist_datasetsanswer offered. The scorecard rowRun · datasetsappears only on a card that declares them.Cards. Both cards borrow the cloud question kinds, not the cloud fixture:
order_to_cash:order_book(booked amount, order count, by status) andbilling(billed amount, open balance, by aging). "Revenue" / 营收 is ambiguous between them, "booking" / 成交 is a near miss, and payments have no dataset.travel_expense:trip_plan(estimated spend, trip days) andreimbursement(claimed amount, claim count). "Travel spend" / 差旅花费 is ambiguous, "claimed" / 报销 is a near miss, and employees have no dataset.Docs: both READMEs. Changeset: patch,
@objectstack/scenarios.Tests
test/runner/ask-skills.test.ts(read, hash, version, refusals, placement, on/off against a stand-inclaude, CLI parsing, replay carry-through, summary),test/score/scenario-dataset-grade.test.ts(each grader on synthetic transcripts, including the forward-compatiblecandidatesnote) andtest/dataset-cards.test.ts(both cards load, 15 loader refusals, prompt lines, language gaps, Build dataset checks).ask-skills.test.tsgains five refusal and acceptance pins for the closed front-matter set (including one through theClaudeCodeDriverconstructor);orchestrate.test.tsgains a record-then-replay pin for a recording made before the card declared dataset questions. Ablation was done once for each guard (both went red, then were restored), as recorded in the os-dev report.orchestrate.test.ts(three dataset-question runs),prompt-trace.test.ts,scenario-graph.test.ts,narrow-score-graph.test.ts(the narrow import graph gains@objectstack/spec/uifornormalizeDatasetTerm).Acceptance notes
Live smoke (one, not a round): this was a driver-level smoke, not a full card ask-mode run. It used the pilot skill text
objectstack-ask, copied verbatim from the pilot skill block on skills: publish an ask-data skill for a client answering business questions over MCP (list_datasets → query_dataset → labelled fallback) #34685, with no version in its front matter. The app endpoint was dead on purpose. Ask mode on a new card needs a verified build that carries the datasets and an app that serveslist_datasets/query_dataset, which means a--templateor a scratch build of up to 300 turns, and that belongs to the eval round. Results onclaude-opus-5-5(subscription login, Claude Code 2.1.326):objectstack-askwith sha256a6ad6db1e308…;Skill {"skill":"objectstack-ask"}and quoted the skill's first heading verbatim;So the placement and the allow-list work. Whether the skill is picked up unprompted when the tools are live is a question for the round.
The two cards' scratch Build totals grow by their dataset checks, so their Build totals are not comparable with earlier records of those cards.
summaryhas no column forRun · datasetsyet. The round reads the per-run scorecards.The near-miss
asked-backgrader reads the reply alone, which matches what the skill's text asks for today. Once alist_datasetsanswer carriescandidates, the same grader passes the same replies and the note names what was offered. There is no code dependency on that change.The
fallback-labelledlabel list is closed (an English negation within a clause of governed / dataset / defined or official metric,ungoverned, and 非指标口径 with its close spellings). A reply that labels the fallback in other words fails and is read by hand.invoice_with_line_itemswas not given datasets. It is a control card whoseexpectis derived from the corpus, which sits outside this PR's file surface, sotravel_expensecarries the second set instead.Fix round 2
Seat contract review on e11c9fe (PASS with two should-fixes and a nit):
readAskSkillsnow refuses, at--ask-skillsload time and before any process starts, anySKILL.mdin a skill tree (nested ones too) whose top-level front-matter key is outside a closed allowlist. It also refuses a front matter it cannot read for certain: not on line 1, never closed, a line indented under no key, or a top-level line that is not a plainkey:. Why refusal: perclaude --helpof the installed CLI 2.1.326,--toolslimits the built-in tools only. It cannot pinmodeloreffort,hooks(commands run outside the tool system), orcontext/agent(a subagent with its own tools). It would also change the tool list the model sees with skills on against skills off, which adds a second variable to the comparison. The refusal is decided by the runner over the bytes it reads, so it is closed offline and testable. With the flag off, the argv is byte-identical (the existing pin stays green). With it on, the argv is unchanged from round 1.dq_*ask. Resolved by classification. AMissingRecordingErroron a dataset question now setsnotMeasured(an unexported reason string), nevererror. TheRun · datasetstally then reads0/0 · N not measured, and the record's verdict for that half isnot-run. Only the replay driver throws this error, so live runs are unaffected. A missing recording for an ordinary question is still loud, as before.scoreCardArtifactandartifactToEvalGraphbehaviour changes, and states thatDriverInfo.askSkillsis typed by the unexportedAskSkillsInfo. S1 and S2 add no export and no optional field.Verification
Local results are in the os-dev report on #34687. CI runs the full gate set.
Generated by Claude Code