任务:回归范围(能力 4a)

只读事实型任务包,开始运行时由 Hub 直接算出并存下结果(不需要模型提交)。

  • 包目录(只改这里):packs/workflow/regression-scope/**
  • 先读:AGENTS.md、docs/hub-r4-architecture.md(第 2、5、6a、6b 节)、docs/hub-r4-handoff.md、contracts/src/pack.ts、contracts/src/views.ts、一个已有的只读事实型包(packs/workflow/template-gap 或 packs/workflow/case-location)。
  • 依赖:知识包已能提供 knowledge:impact|facets|index 视图(已提交),产品包的用例索引(packs/product/famx 的 cases 生产器)由另一个任务完成;这个包的测试用手搭的视图和一个假的知识读取器,真实读取器上的端到端测试等用例索引提交后再补。
  • 复核重点(自己做完再对照一遍):Is the scope exact on a hand-built pair of trees: every case placed at a changed (added or modified) path of the later build is in scope once with all its reasons, no case at an unchanged path, removed paths are not in scope, changed paths without a case are reported as unknown (never as failure), and the result does not depend on the order of the input? Does the pack publish through the real registry and run as a production run?

规格

PACKAGE regression-scope - capability 4a (regression scope), a production-run workflow pack: fact producers only, the result is stored at start_run. Read first: contracts/src/pack.ts and views.ts (impact-view@1), packs/workflow/template-gap and case-location (formats of production packs), packs/workflow/case-review (formats), hub/runs/packs (publish check), hub/runs/engine/README.md (production runs), brief docs/hub-r4-architecture.md sections 6a and 6b, model K01 R[1]. Semantics (write them first as tests): the input slot impact (role subject, accepts the external type knowledge:impact, required) is bound by the caller to an id like knowledge:impact::..; the Hub's reader answers with impact-view@1. Items are the CASES IN SCOPE: a case is in scope when an entry of the attached kind is placed, in the later build, at a path whose change is added or modified; a case placed at several changed paths is one item with all its reasons; id = ':' from the entry data, label = the case title, summary at most 200 characters (priority, document, number of changed commands, the first change). Fields: document, node, title, priority, negative, reasons [{path, change, before, after}] with the digests and tree references of the entries. Parameters: priorities (optional list of numbers to keep), include_added (default true). Requirements: in_scope (fact, item, static, bookkeeping: a pack function check returning a support outcome per case whose data hold the reasons and whose grounds are the tree references of the case entry and of the changed definition entries; there is no violation: a scope is not a defect); uncovered_changes (fact, run level: every changed path with no case in the later build is an unknown outcome with the reason that the case index has no entry there, listed as a cross-item claim, never a failure, because the index is incomplete by construction; when the view states skipped sources (skipped.to above zero) the unknown outcome and the run-level note say so too: the later build's index lacks that many listed documents, so an uncovered path may be a path whose cases were never read). A view with no changed path gives an empty scope and says so. Deterministic: the order of placements and entries in the input never changes the output (sort by id). Deliver the pack under packs/workflow/regression-scope: workflow.json, functions (projection, checks), requirements.json, checks.json, slots.schema.json (empty), SKILL.md (the model relays the result unchanged, may add commentary marked as model relay, and may page through the result with get_nodes by the rec: reference), samples (positive and negative for every check), examples. Tests: hand-built impact views (every change kind, a case at two changed paths, a case at an unchanged path, a changed path without cases, priorities filter, include_added false, empty view, 5,000 cases for speed), metamorphic order independence, the publish check through the real registry and a production run end to end with a fake knowledge reader serving the view.