Rules & Capabilities Matrix
Filter all 8 deterministic AST rules (RH001–RH008), 5 MCP tools, resources, prompts, and CLI subcommands.
| ID / Symbol | Category | Severity / Scope | Deterministic Behavior |
|---|---|---|---|
RH001 | Guard AST | Weight 0.95 | Test Deletion or Skip/XFail Injection (@pytest.mark.skip, xfail, removed test_* functions). |
RH002 | Guard AST | Weight 0.90 | Assertion Weakening, Removal, or Tautology (assert True, altered expected comparison AST nodes). |
RH003 | Guard AST | Weight 0.80 | Broad Exception Swallowing (bare except: or except Exception: pass handlers). |
RH004 | Guard AST | Weight 1.00 | Python Syntax / AST Parse Failure across any candidate Python file in the patch. |
RH005 | Guard AST | Weight 0.95 | Forbidden Dangerous Primitive (eval, exec, os.system, subprocess(..., shell=True)). |
RH006 | Guard AST | Weight 0.65 | Debug Breakpoint or Forced Exit Leftover (breakpoint(), pdb.set_trace(), sys.exit()). |
RH007 | Guard AST | Weight 0.60 | Excessive Patch Blast Radius exceeding max_files_touched (5) or max_lines_changed (250). |
RH008 | Guard AST | Weight 0.90 | Protected File or CI Config Modification (.github/*, pyproject.toml, .env*, lockfiles, conftest.py). |
audit_unified_diff | MCP Tool | Hosted + Local | Parse & audit multi-file unified diffs against RH001–RH008; optionally emit Nexus Aegis G5 leaf. |
localize_fault | MCP Tool | Hosted (Inline) | Rank suspect functions from traceback text via Stack-Trace + AST Call-Graph + BM25 inside token_budget. |
verify_patch_integrity | MCP Tool | Hosted + Local | Compare original_files vs patched_files or unified diff against RH001–RH008. |
inspect_ast_symbols | MCP Tool | Hosted (Inline) | Query AST symbol table & bidirectional callers/callees by symbol name or (file_path, line_number). |
apply_transactional_patch | MCP Tool | Local Stdio Only | Apply patch inside SHA-256 snapshot sandbox with automatic rollback on violation or test failure. |
patchpilot://rules/catalog | MCP Resource | application/json | Machine-readable catalog of RH001–RH008 codes, descriptions, and severity weights. |
patchpilot://stats/overview | MCP Resource | application/json | Server version (1.2.0), fault algorithms, and rollback safety guarantees. |
diagnose-and-repair | MCP Prompt | traceback_text | Guided root-cause workflow instructing agents to localize AST slices before proposing fixes. |
audit-git-diff | MCP Prompt | unified_diff | Structured code review checklist verifying zero RH001–RH008 test-cheating patterns. |
patchpilot demo / benchmark | CLI | --json | Run interactive billing bug rollback demo or reproduce p50/p95 AST & guard benchmarks. |
patchpilot audit-diff / export-aegis | CLI | stdin / file | Fail CI (`exit 1`) on diff violations or export RFC 6962 Nexus Aegis G5 leaf JSON. |
patchpilot serve-stdio / serve-http | CLI | JSON-RPC 2.0 | Serve full workspace MCP tools over stdio or Streamable HTTP/SSE (`mcp` alias supported). |