From 55049708b1c29290423958a6000e4bf8d74441dd Mon Sep 17 00:00:00 2001 From: David Chen <40507679+david6666666@users.noreply.github.com> Date: Mon, 30 Nov 2026 09:48:32 +0800 Subject: [PATCH] docs(review): require visual evidence and add advisory scoring Signed-off-by: David Chen <40507679+david6666666@users.noreply.github.com> --- .agents/skills/opendirector-review/SKILL.md | 107 ++++++++++++++++---- .github/pull_request_template.md | 11 +- CONTRIBUTING.md | 2 +- 3 files changed, 97 insertions(+), 23 deletions(-) diff --git a/.agents/skills/opendirector-review/SKILL.md b/.agents/skills/opendirector-review/SKILL.md index 15d712b1d..61b26cbf1 100644 --- a/.agents/skills/opendirector-review/SKILL.md +++ b/.agents/skills/opendirector-review/SKILL.md @@ -1,6 +1,6 @@ --- name: opendirector-review -description: Review one OpenDirector pull request tip and report PASS, WITHHOLD, or REQUEST CHANGES. Use when the user invokes opendirector-review or asks for a PR or tip review; not for implementing the change, merging, force-pushing, or discussion of the skill itself. +description: Review one OpenDirector pull request tip, verify evidence, and report PASS, WITHHOLD, or REQUEST CHANGES. Use when asked to review or score an OpenDirector PR or tip. --- # OpenDirector review @@ -9,8 +9,8 @@ Review one pull request tip and post a short verdict in the room or chat. The verdict is the review record. This repository has no signed-verdict bot, attestation file, or extra status check; do not invent one. -Read the diff and the remote check runs. The PR body, commit messages, and -chat claims are claims, not evidence. +Verify claims in the PR body, commit messages, and chat against the diff, +remote check runs, and attached or linked evidence. ## Authority @@ -148,13 +148,34 @@ diffs do not need unrelated model, media, or browser tests. not this SHA does not count. Never invent a green run. Distinguish a model double from a real provider call; do not upgrade either. -- For a user-visible tip (UI, canvas, provider settings, generation - flows, and similar), require screenshots, a short screen recording, or - a demo GIF in the pull request, or an explicit N/A with a reason - (docs-only, pure refactor with no UI, CI-only). If that is missing, - WITHHOLD while the author can still add it, and REQUEST CHANGES when - the tip is offered as ready. Do not PASS on CI alone. The author prompt - is `.github/pull_request_template.md`. +## Required evidence + +Determine the required artifacts from the behavior in the diff. Include +the canvas, timeline, assistant, provider settings, and generation, +adoption, or export flows when affected. Apply both media requirements +if the PR ships both a user-visible fix and a feature. + +| Change | Required evidence in the PR | +| --- | --- | +| User-visible bug fix | A screenshot from the actual reproduction path showing the corrected result. Include the steps and the previous failure for comparison. Add a playable recording when the fix depends on a transition the screenshot cannot show. | +| User-visible feature or behavior extension | A playable video showing the affected workflow in OpenDirector, from its entry point through the visible result. Include the resulting project state and a reload or retry when the claim involves persistence or recovery. | +| No user-visible change | Give a concrete reason that visual evidence is N/A. For a nonvisual runtime claim, provide a matching run or receipt. | + +For affected generation, editing, and export claims, list the cases and +include the actual output for each claimed modality. Verify returned text +or payload, decodable images, playable audio, and playable video as +applicable. Include the exact synthesis text for TTS and audible output +for a video that promises sound. For an adoption claim, show the adopted +asset or project result. For any performance claim, include comparable +before-and-after measurements and the workload. + +Use attachments or links reviewers can open. Identify the tested commit, +the reproduction steps or run inputs, and the result each artifact shows. +Label fixtures and model doubles. Verify real-provider claims against +outputs and receipts from that provider and model. Require these artifacts +alongside applicable tests and CI. The +[PR template](../../../.github/pull_request_template.md) prompts authors for +the evidence. ## External and fork tips @@ -178,30 +199,76 @@ copy still needs both `zh-CN` and `en-US` in the same change. - **PASS** — the tip matches the linked issue; no actionable defect for the scoped risk; Release checks and other required statuses are green - on this tip SHA; the tip merges cleanly onto current main. A - user-visible change includes a screenshot, short recording, demo GIF, - or a justified N/A. + on this tip SHA; the tip merges cleanly onto current main; and the + [required evidence](#required-evidence) is available. - **WITHHOLD** — evidence is incomplete: CI is running or unsettled, the tip moved, the review is unfinished, the branch is conflicted or - behind main, or a user-visible change still has no demo and no - justified N/A. WITHHOLD is not PASS. + behind main, or required evidence is outstanding while the author is + preparing the tip for review. - **REQUEST CHANGES** — an actionable defect: correctness, a break of an AGENTS.md contract, security, missing tests for a claimed fix, a dishonest claim, a language-policy break on user-facing copy or on - PR text that must be English, or a ready user-visible tip with neither - media nor a justified N/A. + PR text that must be English, or missing required evidence on a tip + offered as ready. One verdict only. Do not soften REQUEST CHANGES into PASS because the rest looks fine. Do not soften WITHHOLD into PASS because the diff looks fine while CI is unsettled. +## Advisory score + +Score on request. Base the score on the pinned diff and evidence. Choose +the review verdict independently using the criteria above. + +| Dimension | Weight | What to assess | +| --- | ---: | --- | +| Scope and intent | 15 | Fit to the issue or agreed scope, clear acceptance criteria, and a focused diff. | +| Correctness and safety | 25 | Shared UI and agent capability contracts, authoritative project state, generation and adoption boundaries, permissions, recovery, and bilingual behavior as applicable. | +| Validation | 20 | Focused tests, failing-before regression coverage, relevant CI on this tip, and exercised UI and agent paths where affected. | +| Claim evidence | 30 | Reviewable [required artifacts](#required-evidence), matching inputs and outputs, and receipts or measurements for the claims made. | +| Simplicity | 10 | Reuse of the owning service or capability, minimal state, and direct code and tests. | + +Apply these hard zeros before choosing the remaining ratings. + +- **Claim evidence is 0/3** if any required artifact is missing, + inaccessible, or fails to substantiate the claim on the reviewed tip. + A unit test or green CI can support Validation. A screenshot-only + feature or a unit-test-only user-visible fix earns 0/3 for Claim evidence. +- **Simplicity is 0/3** if the diff adds or rewrites an explanatory code + comment in maintained source, tests, scripts, or config. License + headers, shebangs, tool directives, and required docstrings are exempt. + Score comment removals under the normal criteria. Express behavior + through code, tests, or relevant docs. + +Use the highest rating the evidence supports for each applicable dimension. + +- **3** — matching evidence covers the applicable checks. +- **2** — the main checks are supported, with a bounded gap. +- **1** — partial support, with a material gap or inconsistency. +- **0** — usable evidence is absent or a material contract violation is confirmed. + +Use `N/A` only for dimensions outside the reviewed scope. A skill-only +change without a runtime claim can use `N/A` for Claim evidence. Attribute +each gap to its primary dimension and cite the evidence behind each rating. + +Calculate `100 * sum(weight * rating) / (3 * sum(applicable weights))` +and round to the nearest integer, with halves up. Exclude `N/A` from both +sums. For example, if Claim evidence is `N/A` and the other ratings are +3, 3, 2, and 3 in table order, the score is **90/100**. If Claim evidence +is 0/3 and every other dimension is 3/3, the score is **70/100**. + +Withhold the total if the snapshot is stale or a material part of the +diff could not be reviewed. Report the full base and head SHAs, total, +dimension ratings with evidence or N/A reasons, and the highest-priority +remaining action when there is one. + ## Output English. Short enough to post in the room or chat. First line is the verdict, the tip short SHA (at least 7 hex digits), and the `Fixes` / -`Refs` numbers. Then findings, then `Ran:` and `Not run:`. On PASS, the -last line names the Coordinator. Use "no actionable findings" only on -PASS. +`Refs` numbers. Then findings, then `Ran:` and `Not run:`. If requested, +append the advisory score after the test record. On PASS, the last line +names the Coordinator. Use "no actionable findings" only on PASS. ```text PASS abc1234 Fixes #123 diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0af5a6bfb..0a2ab67d9 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -25,9 +25,16 @@ Say what you ran locally and what you left to Release checks. Name checks you co ## Evidence that it works -Reviewers use this to see that the change works, not only that CI is green. When the change is user-visible (UI, canvas, provider settings, generation flows, and similar), attach screenshots, a short screen recording, or a demo GIF. Otherwise mark N/A and give the reason (docs-only, pure refactor with no UI, CI-only, and similar). +Attach evidence from the tested revision alongside the test plan. -- [ ] Media attached, or N/A because: +- User-visible bug fix. Attach a screenshot of the corrected result from the actual reproduction path, with steps and the previous failure for comparison. Add a short recording if the fix depends on a transition the screenshot cannot show. +- User-visible feature. Attach a playable video showing the workflow and its result in OpenDirector. +- For media or generation claims, include the actual affected outputs and identify the run inputs. For a nonvisual runtime claim, include a matching run or receipt. For a performance claim, include comparable before-and-after measurements and the workload. +- If there is no user-visible change, give a concrete N/A reason for visual evidence. + +Include the tested SHA and describe what each artifact shows. See the [review evidence rules](../.agents/skills/opendirector-review/SKILL.md#required-evidence). + +- [ ] Applicable evidence attached and any visual N/A explained ## Provider verification diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5142a5e40..7739c8130 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -89,7 +89,7 @@ The privileged workflow only checks out the PR base commit, never the contributo 4. Never claim real-provider verification you did not run. State what was validated with a model double, what needs credentials, and what remains unverified. 5. Credentials, private assets and raw provider responses never enter commits, fixtures, logs or receipts. 6. Run the checks from [docs/development/validation.md](docs/development/validation.md) locally, or make it explicit which ones you could not run. -7. For a user-visible change, attach screenshots or a short demo in the pull request, or mark N/A with a reason, as asked in the evidence section of the [pull request template](.github/pull_request_template.md). +7. Include the evidence required by the [pull request template](.github/pull_request_template.md#evidence-that-it-works). Attach a screenshot for a user-visible bug fix and a playable video for a user-visible feature. ## Model-assisted issue labels / Issue 自动领域与优先级