From 2a1ce8e3753ef159fa2eae0026bb487d509abd16 Mon Sep 17 00:00:00 2001 From: David Chen <40507679+david6666666@users.noreply.github.com> Date: Mon, 30 Nov 2026 21:10:01 +0800 Subject: [PATCH 1/2] [docs] repo: require independent AI PR pre-review ## summary Require a separate reviewer subagent to score the candidate and give the author revision-scoped feedback before opening the PR. Signed-off-by: David Chen <40507679+david6666666@users.noreply.github.com> --- .../opendirector-agent-development/SKILL.md | 1 + .agents/skills/opendirector-review/SKILL.md | 15 ++++++++++++++- .github/pull_request_template.md | 1 + AGENTS.md | 18 ++++++++++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.agents/skills/opendirector-agent-development/SKILL.md b/.agents/skills/opendirector-agent-development/SKILL.md index b604768f7..9459ce280 100644 --- a/.agents/skills/opendirector-agent-development/SKILL.md +++ b/.agents/skills/opendirector-agent-development/SKILL.md @@ -20,6 +20,7 @@ Read the upstream files at the revisions pinned by OpenDirector. If a matching c - **Changes to Agent behavior or reliability** → [eval-harness](../../upstream/ecc/skills/eval-harness/SKILL.md#eval-types). Use **Eval Types** and the grader and repeat-run guidance in **Product Evals**. Grade observable effects through OpenDirector's test entry points and apply the project’s acceptance criteria. - **Tool scope, workspace isolation, or sensitive trace output** → [agent-security-hardening](../../upstream/ecc/skills/agent-security-hardening/SKILL.md#hardening-workflow). Use **Map Trust Boundaries** and **Bound and Sanitize Tool Output** when reviewing the affected boundary. - **Formal pull request review** → [opendirector-review](../opendirector-review/SKILL.md) for the review procedure. Apply the matching development references and the constraints below to the Agent change. +- **Submitting an AI-authored pull request** → Complete the [independent scoring step](../../../AGENTS.md#ai-authored-pr-submission) before opening the PR or marking it ready. ## OpenDirector constraints diff --git a/.agents/skills/opendirector-review/SKILL.md b/.agents/skills/opendirector-review/SKILL.md index 61b26cbf1..f8b042254 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, verify evidence, and report PASS, WITHHOLD, or REQUEST CHANGES. Use when asked to review or score an OpenDirector PR or tip. +description: Review one OpenDirector pull request tip, verify evidence, and report PASS, WITHHOLD, or REQUEST CHANGES. Use when asked to review a PR or score its committed candidate before submission. --- # OpenDirector review @@ -45,6 +45,19 @@ architecture pages indexed from [docs/README.md](../../../docs/README.md). Review the tip against the fetched default branch. If the tip is itself the rule change, say so and review that change. +## Score an unpublished candidate + +For author-delegated pre-review, read the review guidance at the pinned +target base. Review the committed diff between the supplied base and head, +the draft PR body, any linked Issue, and the test and artifact evidence. +Apply the issue-fit, architecture, test, and evidence criteria below. +List applicable PR-triggered checks that have yet to run. + +Keep this review read-only. Return findings and the +[advisory score](#advisory-score) to the author for the supplied SHAs. +Withhold the total on a stale or materially incomplete snapshot. Use +the live PR workflow and its verdicts below for formal PR review. + ## Establish the tip Record these from the remote before reading the narrative: diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 0a2ab67d9..9df0fb6f3 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -22,6 +22,7 @@ Say what you ran locally and what you left to Release checks. Name checks you co - Local: - Left to CI: +- For AI-authored PRs, include the independent pre-review score, reviewed head, and any material validation gaps. ## Evidence that it works diff --git a/AGENTS.md b/AGENTS.md index a9cae012c..ba33e0eac 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -153,6 +153,24 @@ Acceptance focuses on output that actually meets creative requirements, recovera - Production studios, complete scriptwriting and full-series delivery systems, additional model capabilities, and background rendering engines require explicit requirements; do not expand scope automatically because of the unified project model. - When adding or changing user-visible content, follow the new-feature checklist in [Bilingual interface](docs/development/i18n.md) and run `npm run check:i18n`. Automated checks alone are insufficient; switch between both languages and inspect the new flow. +## AI-authored PR submission + +Before opening an AI-authored PR or marking an existing draft ready, +start a separate subagent that did not contribute to the change. Give it +the full base and committed candidate head SHAs, the intended PR body, +and check and artifact evidence. Ask it to use the +[candidate review mode](.agents/skills/opendirector-review/SKILL.md#score-an-unpublished-candidate) +and return findings and a score. + +Proceed when the subagent scores the candidate **at least 80/100** and +blocking findings are resolved. Address a lower or withheld score with +fixes or evidence, then request a fresh review. Rescore after a change to +the candidate or material claims or evidence. When no subagent is +available, keep submission pending and report the blocker. + +Record the independent score, reviewed head, and material validation gaps +in the PR body. Follow the existing PR review and Release checks process. + ## Documentation maintenance Update this document when architectural principles or development direction change; do not maintain implementation progress here. The [documentation index and maintenance rules](docs/README.md) index the formal documentation, which is delivered with the code through Git. From 5b99407d4aa0e7e117621eb76500da08c62a0211 Mon Sep 17 00:00:00 2001 From: David Chen <40507679+david6666666@users.noreply.github.com> Date: Mon, 30 Nov 2026 21:14:42 +0800 Subject: [PATCH 2/2] [docs] repo: recheck the scored snapshot before submission ## summary Check the current base and outgoing head before publishing or updating an AI-authored PR. Signed-off-by: David Chen <40507679+david6666666@users.noreply.github.com> --- .../opendirector-agent-development/SKILL.md | 2 +- .agents/skills/opendirector-review/SKILL.md | 2 +- .github/pull_request_template.md | 2 +- AGENTS.md | 15 ++++++++------- 4 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.agents/skills/opendirector-agent-development/SKILL.md b/.agents/skills/opendirector-agent-development/SKILL.md index 9459ce280..2c594ff20 100644 --- a/.agents/skills/opendirector-agent-development/SKILL.md +++ b/.agents/skills/opendirector-agent-development/SKILL.md @@ -20,7 +20,7 @@ Read the upstream files at the revisions pinned by OpenDirector. If a matching c - **Changes to Agent behavior or reliability** → [eval-harness](../../upstream/ecc/skills/eval-harness/SKILL.md#eval-types). Use **Eval Types** and the grader and repeat-run guidance in **Product Evals**. Grade observable effects through OpenDirector's test entry points and apply the project’s acceptance criteria. - **Tool scope, workspace isolation, or sensitive trace output** → [agent-security-hardening](../../upstream/ecc/skills/agent-security-hardening/SKILL.md#hardening-workflow). Use **Map Trust Boundaries** and **Bound and Sanitize Tool Output** when reviewing the affected boundary. - **Formal pull request review** → [opendirector-review](../opendirector-review/SKILL.md) for the review procedure. Apply the matching development references and the constraints below to the Agent change. -- **Submitting an AI-authored pull request** → Complete the [independent scoring step](../../../AGENTS.md#ai-authored-pr-submission) before opening the PR or marking it ready. +- **Submitting an AI-authored pull request** → Complete the [independent scoring step](../../../AGENTS.md#ai-authored-pr-submission) before opening the PR, updating its head, or marking it ready. ## OpenDirector constraints diff --git a/.agents/skills/opendirector-review/SKILL.md b/.agents/skills/opendirector-review/SKILL.md index f8b042254..67f243fa7 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, verify evidence, and report PASS, WITHHOLD, or REQUEST CHANGES. Use when asked to review a PR or score its committed candidate before submission. +description: Review one OpenDirector pull request tip, verify evidence, and report PASS, WITHHOLD, or REQUEST CHANGES. Use to review or score an OpenDirector PR or to score a committed candidate before submission. --- # OpenDirector review diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 9df0fb6f3..48e35ae9d 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -22,7 +22,7 @@ Say what you ran locally and what you left to Release checks. Name checks you co - Local: - Left to CI: -- For AI-authored PRs, include the independent pre-review score, reviewed head, and any material validation gaps. +- For AI-authored PRs, include the independent pre-review score, reviewed base and head, and any material validation gaps. ## Evidence that it works diff --git a/AGENTS.md b/AGENTS.md index ba33e0eac..2ce1546e7 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -155,20 +155,21 @@ Acceptance focuses on output that actually meets creative requirements, recovera ## AI-authored PR submission -Before opening an AI-authored PR or marking an existing draft ready, -start a separate subagent that did not contribute to the change. Give it -the full base and committed candidate head SHAs, the intended PR body, +Before opening an AI-authored PR, updating its head, or marking a draft +ready, start a separate subagent that did not contribute to the change. +Give it the full base and committed candidate head SHAs, the intended PR body, and check and artifact evidence. Ask it to use the [candidate review mode](.agents/skills/opendirector-review/SKILL.md#score-an-unpublished-candidate) and return findings and a score. Proceed when the subagent scores the candidate **at least 80/100** and blocking findings are resolved. Address a lower or withheld score with -fixes or evidence, then request a fresh review. Rescore after a change to -the candidate or material claims or evidence. When no subagent is -available, keep submission pending and report the blocker. +fixes or evidence, then request a fresh review. Before submission, confirm +the current target base and outgoing head still match the review. Rescore +if either SHA or any material claim or evidence changes. When no subagent +is available, keep submission pending and report the blocker. -Record the independent score, reviewed head, and material validation gaps +Record the independent score, reviewed base and head, and material validation gaps in the PR body. Follow the existing PR review and Release checks process. ## Documentation maintenance