chore: restore original directory structure (project under code-review-graph-main/)

This commit is contained in:
AuraK Developer
2026-08-31 13:08:20 +08:00
parent ecc55158c1
commit ecfd03a21c
404 changed files with 0 additions and 0 deletions
@@ -0,0 +1,42 @@
---
description: Whole-project or single-feature code review (not diff-based) using graph-wide analysis and objective scoring.
agent: build
---
# Project Review
Review the entire codebase or a single feature/module, independent of the git diff. The scope is driven by your instruction.
$ARGUMENTS
**Token optimization:** Before starting, call `get_docs_section_tool(section_name="project-review")` for the optimized workflow.
## Steps
1. **Parse the scope** from the user instruction:
- "对项目代码进行全面审查" / "全面审查" / "整个项目" → `scope=whole-project`
- "审查 <功能/模块> 的代码" (e.g. payment, auth) → `scope=feature`, target=<keyword>
2. **Ensure the graph is current** by calling `build_or_update_graph_tool()`.
3. **Map the architecture** by calling `get_architecture_overview_tool(detail_level="minimal")` and `list_communities_tool(detail_level="minimal")`.
4. **Scan high-risk areas** (whole-project): `get_knowledge_gaps_tool()`, `get_hub_nodes_tool()`, `get_bridge_nodes_tool()`, `find_large_functions_tool()`, `get_surprising_connections_tool()`.
5. **Score objectively**:
- whole-project: `score_review_tool(all_files=True)` — every source file in the graph
- feature: `semantic_search_nodes_tool(query=<target>)` + `query_graph_tool(pattern="children_of", target=<target>)` to locate files, then `score_review_tool(changed_files=<files>)` + `get_impact_radius_tool(changed_files=<files>)`
6. **Review the code** (Layer 1 chain decomposition): eight categories + gstack CRITICAL sub-pass. Produce findings with severity (blocker/major/minor), confidence (1-10), file:line, and proposed fix.
7. **Merge findings** by calling `dedupe_findings_tool(findings=<your findings>)`.
8. **Generate the report** by calling `generate_report_tool(review_data=<verdict, scope, metrics, merged findings>)` — writes `code-review-report.html` and `code-review-report.md` (default `format="both"`).
9. **Report** the verdict (✅ PASS / ❌ FAIL), severity counts, each issue with confidence + fix, and manual-review items.
## Important Rules
- **READ-ONLY.** This workflow never modifies code, commits, or pushes. Every finding waits for a manual fix decision.
- **Any blocker → verdict ❌ FAIL**, regardless of other scores.
- This is **not** a diff review. For diff-based review use `/code-review-graph-unified-review`.
@@ -0,0 +1,43 @@
---
description: Run the three-layer unified review (CRG graph context + score_review + dedupe_findings + generate_report).
agent: build
---
# Unified Review
Run the three-layer unified code review using the MCP prompt workflow.
$ARGUMENTS
**Token optimization:** Before starting, call `get_docs_section_tool(section_name="unified-review")` for the optimized workflow.
## Steps
1. **Load the workflow** by calling the `unified_review` MCP prompt (or the `unified-review` skill). This drives the full READ-ONLY review pipeline.
2. **Ensure the graph is current** by calling `build_or_update_graph_tool()`.
3. **Get the review context** by calling `get_review_context_tool()` — changed files, blast radius, source snippets.
4. **Detect changes** by calling `detect_changes_tool()` — risk score, changed functions, test gaps, affected flows.
5. **Score objectively** by calling `score_review_tool()` — SQL risk, exception coverage, redundancy, high-risk density, vulnerability heuristic (good/warn/fail grades). LLM-judged metrics are in `llm_judged`.
6. **Review the changed code** (Layer 1 chain decomposition): interface, business, data, utility, error handling, security, performance, observability. Produce findings with severity (blocker/major/minor), confidence (1-10), file:line, and proposed fix.
7. **Merge findings** by calling `dedupe_findings_tool(findings=<your findings>)` — fingerprint dedup, multi-source confidence boost, PR quality score.
8. **Generate the report** by calling `generate_report_tool(review_data=<verdict, tier, scope, metrics, merged findings>)` — writes `code-review-report.html` and `code-review-report.md` (default `format="both"`).
9. **Report** the verdict (✅ PASS / ❌ FAIL), severity counts, each issue with confidence + fix, and manual-review items.
## Important Rules
- **READ-ONLY.** This workflow never modifies code, commits, or pushes. Every finding waits for a manual fix decision.
- **Any blocker → verdict ❌ FAIL**, regardless of other scores.
- Tier (fast / standard / strict) comes from `.code-review.yaml` at the repo root, or the `tier` argument.
## Tips
- For large diffs (50+ lines), dispatch specialist subagents (testing, maintainability, security, performance, data-migration, api-contract) in parallel before dedupe.
- Security and data-migration are insurance specialists — always run even when silent.