feat: add unified_review MCP prompt + sync tool/prompt counts

Adds the unified_review MCP prompt (invoked as /code-review-graph:unified_review)
that drives the unified-review workflow: graph context -> detect_changes ->
score_review -> findings -> dedupe_findings -> generate_report. READ-ONLY:
every finding waits for a manual fix decision. Takes base and tier
(fast/standard/strict) arguments.

- prompts.py: unified_review_prompt + docstring count 5->6
- main.py: @mcp.prompt() registration
- tests/test_prompts.py: TestUnifiedReviewPrompt + preamble test
- docs: LLM-OPTIMIZED-REFERENCE, COMMANDS, CLAUDE.md, INDEX, architecture,
  README + 4 localized READMEs; tool count 30->31 and prompt count 5->6
  synced (historical ROADMAP/FEATURES version notes left unchanged)
This commit is contained in:
dev
2026-08-05 13:58:51 +08:00
parent 84ae9b817e
commit b96f38276f
13 changed files with 159 additions and 21 deletions
+16
View File
@@ -28,6 +28,7 @@ from .prompts import (
onboard_developer_prompt,
pre_merge_check_prompt,
review_changes_prompt,
unified_review_prompt,
)
from .tools import (
apply_refactor_func,
@@ -1124,6 +1125,21 @@ def pre_merge_check(base: str = "HEAD~1") -> list[dict]:
return pre_merge_check_prompt(base=base)
@mcp.prompt()
def unified_review(base: str = "HEAD~1", tier: str = "standard") -> list[dict]:
"""Three-layer unified review (CRG graph context + scoring + dedupe + report).
Fuses graph context with the objective scoring metrics, finding merge,
and the standalone HTML report. READ-ONLY: every finding waits for a
manual fix decision.
Args:
base: Git ref to diff against. Default: HEAD~1.
tier: Review tier (fast / standard / strict). Default: standard.
"""
return unified_review_prompt(base=base, tier=tier)
def _apply_tool_filter(tools: str | None = None) -> None:
"""Remove tools not listed in the allow-list.