From dac56a54f0cf79060ada29fcc22c8678d6c85df4 Mon Sep 17 00:00:00 2001 From: facadefish <203220865+facadefish@users.noreply.github.com> Date: Fri, 25 Sep 2026 23:04:00 +0800 Subject: [PATCH] Improve task-based effectiveness review guidance --- docs/effectiveness-review.md | 98 +++++++++++++++++++ .../references/strong-model-review-rules.md | 8 ++ .../references/strong-model-review-rules.md | 8 ++ 3 files changed, 114 insertions(+) create mode 100644 docs/effectiveness-review.md diff --git a/docs/effectiveness-review.md b/docs/effectiveness-review.md new file mode 100644 index 0000000..3cf7ecc --- /dev/null +++ b/docs/effectiveness-review.md @@ -0,0 +1,98 @@ +# Effectiveness review and regression scenarios + +Reviewed baseline: [`3a3b390`](https://github.com/facadefish/prune-skill/tree/3a3b39014c2bde760792a8a693db1f799655eab4). Scope: the instructions that guide Prune's semantic decisions and candidate validation. This is a source review and a manual walkthrough of constructed scenarios, not a model benchmark. It establishes instruction coverage, not a measured improvement in task success, routing, speed, or token use. + +## Findings + +The existing design has useful safeguards: whole-object review, task-specific incremental value, retained substitutes when disabling skills, dependency checks before moving resources, and separate states for advice, file changes, and session loading. These should remain. The workbench is a delivery and execution mechanism; its tests cannot establish the quality of a recommendation. + +### P2: Failure diagnosis does not distinguish selection from execution + +[R2](../skills/prune/references/strong-model-review-rules.md) already asks for intended and neighboring tasks, but the baseline does not explain how to diagnose a reported ineffective skill. A missing installation, an overly broad description, a broken procedure, and an unavailable tool need different corrections. Rewriting the description after a tool failure can change routing without repairing the failure. + +Change: add a short distinction between discovery, selection, execution, and prerequisites. Use supplied, authorized evidence; absent traces remain a hypothesis. This is an instruction gap, not an observed failure rate. + +### P2: Candidate checks lack an explicit task outcome comparison + +Baseline R7 asks for trigger, constraint, and reference checks, but does not specify how to connect them to concrete tasks before and after a meaningful rewrite. [`validatePackage`](../skills/prune/scripts/engine.mjs) checks the package, basic metadata presence, and local Markdown references; it cannot detect the deletion of a necessary workflow condition. A successful package check is compatible with a semantic regression. + +Change: derive a few relevant scenarios before rewriting, then compare original and candidate against observable outcomes and prohibited side effects. Distinguish skill selection from completion and inspect content rather than merely the presence of a file or heading. Use the existing `validation` fields; no schema, scoring, or mandatory test matrix is needed. Assessment-only requests describe future checks without pretending to validate a candidate. + +### P3: The optional path to measured claims is underspecified + +Baseline R7 correctly says that static checks do not demonstrate model gains and does not start A/B runs by default. It does not specify baseline contamination, matched conditions, environment failures, or tuning on the same examples. These omissions matter when a user actually requests a comparison. + +Change: describe those checks conditionally, including original-versus-candidate and with-versus-without baselines, retained raw outputs, final unused tasks after iterative tuning, and unknown telemetry. Ordinary semantic review remains sufficient for reasoned advice. + +## Comparable public implementations + +Sources are pinned to the inspected revisions. These are comparisons of particular files, not rankings of whole projects. No upstream code or runtime dependency is incorporated. + +| Inspected source | Useful mechanism | Application and limit in Prune | +| --- | --- | --- | +| Anthropic [`run_eval.py`](https://github.com/anthropics/skills/blob/33375500bcea98d610eb30ce10ac4e59b89c390d/skills/skill-creator/scripts/run_eval.py) | Measures selection for positive and negative queries via skill/read events. | Separate routing evidence from output quality. Do not treat a selection event as task success or import its Claude-specific runner. | +| Anthropic [`grader.md`](https://github.com/anthropics/skills/blob/33375500bcea98d610eb30ce10ac4e59b89c390d/skills/skill-creator/agents/grader.md) | Inspects actual artifacts and challenges assertions that accept superficial output. | Check task content and prohibited effects, rather than headings or file existence alone. | +| Anthropic [`run_loop.py`](https://github.com/anthropics/skills/blob/33375500bcea98d610eb30ce10ac4e59b89c390d/skills/skill-creator/scripts/run_loop.py) | Separates training examples from a test partition and hides test fields from the description improver. | Keep unused tasks for final checks when iterating. That implementation also uses test scores to select an iteration; Prune should not describe repeatedly consulted selection data as an untouched final test. | +| Agent Skills [`evaluating-skills.mdx`](https://github.com/agentskills/agentskills/blob/69ef37e9424c0a7ea9dd2293b559e43ec8176379/docs/skill-creation/evaluating-skills.mdx) | Uses realistic prompts, expected outputs, baseline artifacts, and outcome assertions. | Adopt concrete scenarios, but keep model runs optional. A child task is not automatically uncontaminated: inherited rules and skill visibility still need checking. | +| Fastxyz [`prompt-evaluator.ts`](https://github.com/fastxyz/skill-optimizer/blob/7fe480ddec98d8b687acb62a4d137de0f51f9211/src/benchmark/prompt-evaluator.ts) | Evaluates sections, formats, keywords, and structure; generates some criteria from skill text. | These can check a specific format contract. They cannot establish semantic correctness or incremental value and should not become Prune's ranking system. | + +## Constructed scenarios for reviewer walkthroughs + +These scenarios are author-created, public, and deliberately small. They are not private user examples or executed agent transcripts. Reviewers can use them to check a proposed instruction change without starting model calls. A future agent evaluation must use the same case inputs independently, preserve outputs, and report its actual method; this document alone supplies no agent pass rate. + +### 1. Broad selection with a retained useful capability + +- User request: “Review and revise the description of `pdf-forms` for filling existing PDF forms.” +- Original description: “Use for documents, forms, reports, and data.” The body fills existing PDF form fields and reports unresolved fields. +- Candidate description: “Fill fields in an existing PDF form and report unresolved fields. Use for PDF form completion.” The body is unchanged. +- Checks: “Fill the attached PDF form from these supplied values” should fit; “Summarize this plain-text report” should not. Reporting unresolved PDF fields must remain available. +- Walkthrough: R2 and R7 support comparing these boundaries while preserving the body. This predicts applicability only; neither actual host discovery nor task completion has been run. A record must say `static walkthrough`, not `routing accuracy improved`. + +### 2. Shorter instructions that lose a necessary constraint + +- User request: “Simplify this CSV cleanup skill; keep original input files intact.” +- Original: “Write the cleaned result to a separate file. Preserve the input. Count rows with missing email values; do not invent email addresses.” +- Bad candidate: “Clean the CSV and save it.” +- Revised candidate: “Save a cleaned copy, preserving the input; count missing emails without inventing values.” +- Input: a CSV with `id,email` and rows `1,supplied-address` and `2,` (the nonempty value is a public placeholder). +- Checks: the expected missing-email count is one; the original must remain byte-identical; no email may be fabricated. Static inspection rejects the bad candidate's lost requirements and finds them retained in the revised candidate. It does not show that either version was executed successfully. + +### 3. A tool failure is not a description defect + +- User request: “This image skill was selected, but produced no image. Review why it failed.” +- Supplied synthetic trace: skill selected; invoked its documented renderer; renderer returned `command not found`. +- Skill procedure: use that renderer to produce an image and verify the file. +- Check: identify the unavailable prerequisite and propose checking its installation or documented alternative. Do not broaden the description or claim that an image was generated. Do not install anything from this review request. +- Walkthrough: the new R2 diagnoses the evidenced failure layer; R7 separates the environmental failure from a content-quality comparison. A corrected description alone would not address the supplied evidence. + +### 4. A superficial check accepts an incorrect artifact + +- Task: report the number of missing emails in scenario 2. +- Observed fixture artifact: `{"missing_email_count": 0}`. It is a constructed artifact, not model output. +- Weak check: a JSON file exists and contains `missing_email_count`. +- Meaningful check: the count equals one, derived from the input, and the input remains unchanged. +- Walkthrough: the artifact passes the weak check but fails the content check. R7 now states that existence and keywords alone are insufficient. The actual failed check must not be marked `passed`; the current contract records failed or unperformed checks as `unknown` with a clear reason in `detail`. + +### 5. A nominal no-skill baseline still inherits the skill + +- Requested comparison: a skill that teaches a project-specific validation command versus no skill. +- Supplied setup: the baseline omits the skill path but inherits a project instruction containing that same command; a new child task is used for each run. +- Check: do not attribute equal outcomes to the skill having no incremental value. Mark the comparison as contaminated; either establish an eligible isolated comparison within the authorized scope or retain the limitation. +- Walkthrough: the added conditional R7 addresses the inherited content directly. No baseline or candidate model run was performed during this audit. + +### 6. Advice only, with no candidate + +- User request: “Only assess whether this CSV skill needs changes.” +- Inputs: the original instructions from scenario 2 and a report of concern about overwriting input; no candidate exists. +- Check: explain that the source already preserves input, seek supplied execution evidence only if needed to diagnose a reported failure, and describe any useful future check as unperformed. Do not invent a candidate, claim its validation, or apply files. +- Walkthrough: R7 now explicitly distinguishes future checks from candidate validation; the existing entrypoint still determines the requested delivery and authority boundaries. + +## Verification and follow-up + +Manual comparison covers both Chinese and English R2/R7 changes against the scenarios above. The additions provide explicit guidance for these decisions; they do not prove that the previous skill would fail or the revised skill would succeed in an actual session. Existing entrypoints, metadata, resource paths, R1/R3–R6/R8–R9, execution contract, runtime, and workbench remain unchanged. + +Package validation and the repository checks establish metadata/reference integrity and existing runtime behavior only. No real installed skill, plugin configuration, host integration, or model comparison is part of this change. No measured effectiveness result is claimed. + +Local verification for this proposal: Windows with Node.js 24.15.0; `npm run check` passed with 76 tests passing and two opt-in official-host integration tests skipped. Both standalone language packages built and passed skill frontmatter validation. No runtime or workbench behavior changed, so this proposal does not require new browser Apply/Restore acceptance. + +If comparative performance is requested later, choose representative tasks and the specific claim first, use frozen old/new packages and comparable environments, verify isolation, and preserve the outputs. Add new cases when an observed failure justifies them. Do not build an automatic optimizer, generic score, or full evaluation platform merely to review a few instructions. diff --git a/locales/prune/en/references/strong-model-review-rules.md b/locales/prune/en/references/strong-model-review-rules.md index 81f6df8..719b05a 100644 --- a/locales/prune/en/references/strong-model-review-rules.md +++ b/locales/prune/en/references/strong-model-review-rules.md @@ -12,6 +12,8 @@ For a collection, assess coverage against the set that would remain after the re Describe the capability and its actual activation conditions. Remove catchalls that pull the skill into unrelated tasks and modifiers that add no distinction. Check competing triggers across skills. After revising a description, consider an intended task and a nearby task that should not activate it. Optimize discrimination, not an arbitrary length or compression ratio. +When the user reports that a skill does not work, distinguish host discovery, selection, execution after selection, and unavailable tools or resources. Diagnose from records provided within the authorized scope. Without execution evidence, label the cause as a hypothesis; do not collect private sessions on your own. Rewriting a description cannot fix installation, missing tools, or execution logic. Propose a correction at the layer that failed. + ## R3 · Selective loading For multiple workflows, route to the material needed for the current task. Keep shared invariants and discoverable resource paths. Moving repeated content into an always-required reference does not make loading selective. A short, single workflow need not be split; restructuring must preserve prerequisites, links, and dependencies. @@ -34,6 +36,12 @@ Check for duplication or conflicts among skills, task prompts, and relevant proj Match checks to the change and the claim. For text revisions, inspect activation boundaries, retained constraints, and references. Test relevant behavior when scripts change, and retain required project checks. Repeat or expand validation only for new changes, failures, or unresolved concerns. Semantic review does not initiate model A/B runs by default. File checks, author review, and tool tests do not establish improved model performance. +For revisions that change selection or workflow, derive a few discriminating scenarios and expected outcomes from the user's tasks and original skill before rewriting; compare the original and candidate afterward. Reuse provided examples where possible. Label constructed examples rather than presenting them as observed usage. Choose ordinary tasks, confusing neighboring tasks, or failures involving necessary constraints according to the change; do not impose a case quota or a full matrix on every object. Wording-only corrections need no separate case suite. For assessment-only requests, describe useful future checks without claiming to have validated a nonexistent candidate. + +A scenario identifies the input and necessary context, observable result or prohibited side effect, evidence from the original and candidate, and the check method and actual result. Check correct content, retained capabilities, and stopping conditions, not just keywords, headings, file existence, or skill invocation. Judge correct selection separately from task completion. The original may fail on the defect being corrected; unrelated capabilities and constraints must survive. Reuse existing `validation` records: make static walkthroughs, tool checks, and model runs explicit in `name` / `detail`. `passed` means only that the named check actually passed. Use `unknown` with the reason for unperformed or failed checks; never report a walkthrough as an execution result. + +Only when the user requests measured comparisons, establish the tasks, inputs, success conditions, budget, and stopping scope separately. Use the original version as the baseline for a revision. For incremental value with versus without the skill, verify that conversations, project rules, memory, or other skills have not supplied its content to the baseline; starting a new child task alone does not establish isolation. Keep the model, host, tools, other instructions, and inputs comparable, and preserve actual outputs and failures. Separate environmental failures such as missing tools or timeouts from content failures; mark an invalid comparison unknown. If iterating against cases, reserve tasks not used during rewriting for the final check. Report individual outcomes and sample limitations; unavailable token, cost, or loading telemetry remains unknown. + ## R8 · Decision boundaries Replace blanket step-by-step approval requirements with concrete authorized work, user decisions, and stop conditions. Allow preparation and validation within scope; greater model capability does not confer broader authority. Preserve real mutation, publication, and source-drift boundaries. For installed originals and plugins, follow the authority rules in the entrypoint. diff --git a/skills/prune/references/strong-model-review-rules.md b/skills/prune/references/strong-model-review-rules.md index 773dd23..ef1715c 100644 --- a/skills/prune/references/strong-model-review-rules.md +++ b/skills/prune/references/strong-model-review-rules.md @@ -12,6 +12,8 @@ 描述说明能力与真实适用条件,移除抢占无关任务的泛化触发和重复修饰。检查技能间的触发冲突;用适用任务与容易混淆的相邻任务核对改写后的边界。边界清楚即可,不设置任意字数或压缩比例。 +用户报告“技能没效果”时,先区分未被宿主发现、未正确选用、选用后执行出错,以及工具或资源不可用;依据本次已授权提供的记录定位。缺少执行记录时把原因写成假设,不自行搜集私人会话。仅改描述不能修复安装、工具缺失或执行逻辑;在实际出问题的层级提出改法。 + ## R3 · 按需加载 多流程入口按当前任务指向所需材料,保留共用不变量与清楚的资源路径。不要把重复内容移到每次必读的引用中。简短单流程不必拆文件;调整结构不能丢失前置条件、链接或依赖。 @@ -34,6 +36,12 @@ 验证要对应改动和交付主张。文本修订检查触发边界、必要约束与引用;脚本变化验证相关行为,项目要求的必要检查继续保留。只有新改动、新失败或未解决疑点才重复或扩大检查。默认语义评审不启动模型 A/B;文件校验、人工审阅和工具测试都不证明模型效果提升。 +对会改变触发或工作流程的修订,改写前从用户任务与原技能提炼少量有区分力的场景及预期结果,改写后对照原版和候选检查。优先复用已提供的实例;构造的例子须注明,不能称为实际使用证据。按改动选择正常任务、易混淆的相邻任务或涉及必要约束的失败情形,不要求每个对象套用固定数量或完整矩阵;纯措辞修正无需另建用例集。只给评估建议时,可说明后续应检查的场景,不能声称已验证不存在的候选。 + +场景说明输入与必要上下文、可观察结果或禁止的副作用、原版与候选的依据,以及检查方式和实际结果。检查是否产出正确内容、保留必要能力和停止条件,而非只找关键词、标题、文件存在或“调用了技能”;选用正确与任务完成分开判断。原版在待修问题上失败可以是预期,未涉及的能力与约束仍须保留。使用现有 `validation` 记录,`name` / `detail` 明确是静态推演、工具检查还是模型运行;`passed` 只表示该项实际检查通过,未做或失败用 `unknown` 并说明原因,不把推演结果写成运行结果。 + +仅在用户要求实测比较时,另行明确任务、输入、成功条件、预算及停止范围。改写比较用原版作基线;有无技能的增量比较需确认基线未从会话、项目规则、记忆或其他技能继承被测内容,不能仅凭启动了新子任务就声称隔离。保持模型、宿主、工具、其他指令和输入条件可比,保留实际产物与失败记录;缺工具、超时等环境失败与内容失败分开,无法比较就标未知。若根据用例反复调优,留出未参与改写的任务用于最终核查;报告逐场景结果及样本限制,未提供的 token、费用或加载遥测保持未知。 + ## R8 · 决策边界 把泛化的逐步审批改成具体的已授权工作、用户决定与停止条件。允许完成范围内的准备和验证,但不因模型更强而扩大权限。保留真实写入、发布、来源漂移等边界;Prune 的安装原件与插件操作遵守入口中的授权规则。