From 5ff66a8c409a1eb744594be313333167d000d369 Mon Sep 17 00:00:00 2001 From: Jim Lancaster <40281233+zoltan57@users.noreply.github.com> Date: Sun, 23 Aug 2026 19:17:33 -0500 Subject: [PATCH] Align python-reviewer agent with the python-code-reviewer skill The agent file had drifted from the skill it delegates to, in two ways that would corrupt a review run. Report target: the agent said write reports to ./docs, but the skill targets ./docs/reviews/-code-review.md and explicitly marks docs/reviews/** as non-canonical. Following the agent would place a dated, opinionated review inside the canonical authority set that findings are supposed to resolve against. Verification commands: the agent said run 'ruff check', 'pytest', and 'ty'. None are on PATH in this uv project, so an agent following its own instruction gets command-not-found and is pushed toward guessing instead of verifying. The agent now defers to the skill for all specifics rather than restating them, which is what let the two copies drift apart. Also carries forward the consumer-tracing rule and states the read-only scope explicitly. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> --- .github/agents/python-reviewer.agent.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/agents/python-reviewer.agent.md b/.github/agents/python-reviewer.agent.md index 5b80ddc..ccbcc9a 100644 --- a/.github/agents/python-reviewer.agent.md +++ b/.github/agents/python-reviewer.agent.md @@ -19,6 +19,7 @@ You are a Senior Python Architect performing an evidence-based, read-only code r - **Stack Context:** Python 3.12+, FastAPI, NiceGUI, SQLModel, SQLAlchemy (SQLite/PostgreSQL), Pydantic V2, asyncio workers, and OpenRouter adapters. - **Evidence-Based:** Always inspect real files. Every finding must reference concrete file paths and line numbers (e.g., `app/services/worker.py:45-78`). Do not speculate. -- **Tool Verification:** Run linters and tests via the terminal (`ruff check`, `pytest`, `ty`) to verify issues before reporting. -- **Skill Execution:** Adhere strictly to the review dimensions, duplication analysis, and report scaffolding defined in the `python-code-reviewer` skill. -- **Report Target:** Output all complete review reports as Markdown files written to `./docs`. \ No newline at end of file +- **Tool Verification:** This is a `uv` project; the toolchain is not on `PATH`. Verify with `uv run ruff check .`, `uv run ty check`, and `uv run pytest -q -m "not external"`, and record the exact commands and outcomes. Never report a lint, type, or test claim you did not run. +- **Verify Recommendations, Not Just Findings:** Before recommending a change to a shared symbol, enumerate its consumers and confirm the fix is safe for each. See the skill's consumer-tracing step and `Blast Radius` field. +- **Skill Is Canonical:** The `python-code-reviewer` skill defines the review workflow, deterministic checks, severity and reachability rubrics, report location, and report template. Follow it exactly. Where this file and the skill disagree, the skill wins — do not restate its specifics here. +- **Read-Only Scope:** Do not modify source, tests, docs, instructions, or configuration. The review report is the only artifact you produce. \ No newline at end of file