From e2bf040e2aacf82173037453346519dbc6237d0e Mon Sep 17 00:00:00 2001 From: Richard Levasseur Date: Fri, 14 Aug 2026 18:36:57 +0000 Subject: [PATCH] agents(review-code): export review results artifact and factor report format The review-code skill orchestrator previously lacked instructions to synthesize subagent findings into a single user-facing markdown artifact, making it difficult to inspect audit reports in a structured manner. Furthermore, reporting format and status guidelines were duplicated across individual auditor prompts. Update the review-code orchestrator to generate a unified `code-review-results.md` artifact containing overall summaries and per-category findings. Extract shared reporting format rules into a reusable markdown fragment referenced by all reviewer prompts. --- .agents/skills/review-code/SKILL.md | 12 +++++++++--- .agents/skills/review-code/review-agents-prompt.md | 3 +-- .../skills/review-code/review-contributing-prompt.md | 3 +-- .agents/skills/review-code/review-docs-prompt.md | 3 +-- .../skills/review-code/review-pr-standards-prompt.md | 3 +-- .agents/skills/review-code/review-python-prompt.md | 3 +-- .agents/skills/review-code/review-report-format.md | 6 ++++++ .agents/skills/review-code/review-starlark-prompt.md | 3 +-- 8 files changed, 21 insertions(+), 15 deletions(-) create mode 100644 .agents/skills/review-code/review-report-format.md diff --git a/.agents/skills/review-code/SKILL.md b/.agents/skills/review-code/SKILL.md index 8646ff2451..bbe16e6533 100644 --- a/.agents/skills/review-code/SKILL.md +++ b/.agents/skills/review-code/SKILL.md @@ -54,6 +54,12 @@ file from `.agents/skills/review-code/`: ### Action Instructions - Launch all sub-agents concurrently using `invoke_subagent`. -- Collect the reports from each sub-agent and report all violations and - suggested improvements clearly with suggested fixes for the user. -- If all domain audits pass, confirm that the PR is ready for review. +- Collect the reports from each sub-agent. +- Create a user-facing review artifact named `code-review-results.md` in the + conversation artifact directory. The artifact must include: + - Overall summary and verdict across audit categories. + - Detailed analysis and findings from each sub-agent. + - Actionable findings and fix suggestions with specific code snippets, diffs, + and clickable file links for any violations found. +- In the response, provide a concise summary with the overall verdict and a + clickable markdown link to `code-review-results.md`. diff --git a/.agents/skills/review-code/review-agents-prompt.md b/.agents/skills/review-code/review-agents-prompt.md index 45651fd0de..a708405b9d 100644 --- a/.agents/skills/review-code/review-agents-prompt.md +++ b/.agents/skills/review-code/review-agents-prompt.md @@ -14,5 +14,4 @@ against `AGENTS.md`: 5. Check that all repo rules and macro conventions described in `AGENTS.md` are respected. -Report any violations found clearly with actionable suggested fixes, or report -that the changes pass project conventions audit. +@.agents/skills/review-code/review-report-format.md diff --git a/.agents/skills/review-code/review-contributing-prompt.md b/.agents/skills/review-code/review-contributing-prompt.md index 51fe58db00..f0c3986f93 100644 --- a/.agents/skills/review-code/review-contributing-prompt.md +++ b/.agents/skills/review-code/review-contributing-prompt.md @@ -33,5 +33,4 @@ and PR metadata against `CONTRIBUTING.md` and project rules: 5. Ensure style and conventions described in `CONTRIBUTING.md` are respected across all changes. -Report any violations found clearly with actionable suggested fixes, or report -that the changes pass contribution audit. +@.agents/skills/review-code/review-report-format.md diff --git a/.agents/skills/review-code/review-docs-prompt.md b/.agents/skills/review-code/review-docs-prompt.md index eaeb91232d..101013552d 100644 --- a/.agents/skills/review-code/review-docs-prompt.md +++ b/.agents/skills/review-code/review-docs-prompt.md @@ -20,5 +20,4 @@ in `git diff` against the project's documentation rules: `.agents/rules/news.md` and `CONTRIBUTING.md` (proper `..md` name, no leading bullets, subsystem prefix, `{obj}` refs, issue links). -Report any violations found clearly with actionable suggested fixes, or report -that the documentation changes pass audit. +@.agents/skills/review-code/review-report-format.md diff --git a/.agents/skills/review-code/review-pr-standards-prompt.md b/.agents/skills/review-code/review-pr-standards-prompt.md index a4de4296a1..d415f0e650 100644 --- a/.agents/skills/review-code/review-pr-standards-prompt.md +++ b/.agents/skills/review-code/review-pr-standards-prompt.md @@ -13,5 +13,4 @@ Your sole task is to audit PR titles and PR descriptions against rebase existing commits (create new commits and merges instead, to preserve code review comment threads). -Report any violations found clearly with actionable suggested fixes, or report -that the PR standards pass audit. +@.agents/skills/review-code/review-report-format.md diff --git a/.agents/skills/review-code/review-python-prompt.md b/.agents/skills/review-code/review-python-prompt.md index 8e477ab3a7..711ff7aecf 100644 --- a/.agents/skills/review-code/review-python-prompt.md +++ b/.agents/skills/review-code/review-python-prompt.md @@ -11,5 +11,4 @@ Your sole task is to audit all Python source (`.py`) and test changes in 4. Verify that tests were executed using Bazel (`bazel test --config=fast-tests`) and passed. -Report any violations found clearly with actionable suggested fixes, or report -that the Python changes pass audit. +@.agents/skills/review-code/review-report-format.md diff --git a/.agents/skills/review-code/review-report-format.md b/.agents/skills/review-code/review-report-format.md new file mode 100644 index 0000000000..a5c45c78be --- /dev/null +++ b/.agents/skills/review-code/review-report-format.md @@ -0,0 +1,6 @@ +Provide a structured report containing: +- Status: PASS, WARNING, ACTION_REQUIRED, USER_DECISION_REQUIRED, or + NOT_APPLICABLE +- Detailed analysis and findings for each item checked +- Actionable findings and fix suggestions with specific code snippets, diffs, + and clickable file links for any violations found diff --git a/.agents/skills/review-code/review-starlark-prompt.md b/.agents/skills/review-code/review-starlark-prompt.md index 8bd8cdbe21..5386b37a38 100644 --- a/.agents/skills/review-code/review-starlark-prompt.md +++ b/.agents/skills/review-code/review-starlark-prompt.md @@ -13,5 +13,4 @@ in `git diff` against the project's Starlark coding rules and conventions: (`"""`), and do NOT use trailing backslashes (`\`) on opening triple-quotes. 6. Verify analysis tests use `rules_testing`, not `bazel_skylib`. -Report any violations found clearly with actionable suggested fixes, or report -that the Starlark changes pass audit. +@.agents/skills/review-code/review-report-format.md