agents(review-code): export review results artifact and factor report format (#4048)
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.
diff --git a/.agents/skills/review-code/SKILL.md b/.agents/skills/review-code/SKILL.md
index 8646ff2..bbe16e6 100644
--- a/.agents/skills/review-code/SKILL.md
+++ b/.agents/skills/review-code/SKILL.md
@@ -54,6 +54,12 @@
### 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 45651fd..a708405 100644
--- a/.agents/skills/review-code/review-agents-prompt.md
+++ b/.agents/skills/review-code/review-agents-prompt.md
@@ -14,5 +14,4 @@
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 51fe58d..f0c3986 100644
--- a/.agents/skills/review-code/review-contributing-prompt.md
+++ b/.agents/skills/review-code/review-contributing-prompt.md
@@ -33,5 +33,4 @@
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 eaeb912..1010135 100644
--- a/.agents/skills/review-code/review-docs-prompt.md
+++ b/.agents/skills/review-code/review-docs-prompt.md
@@ -20,5 +20,4 @@
`.agents/rules/news.md` and `CONTRIBUTING.md` (proper `<id>.<category>.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 a4de429..d415f0e 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 @@
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 8e477ab..711ff7a 100644
--- a/.agents/skills/review-code/review-python-prompt.md
+++ b/.agents/skills/review-code/review-python-prompt.md
@@ -11,5 +11,4 @@
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 0000000..a5c45c7
--- /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 8bd8cdb..5386b37 100644
--- a/.agents/skills/review-code/review-starlark-prompt.md
+++ b/.agents/skills/review-code/review-starlark-prompt.md
@@ -13,5 +13,4 @@
(`"""`), 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