Skip to content

majiayu000/spellbook / skills/codebase-audit

codebase-audit

Verified

全面代码库审计 — 自适应并行深度分析(前后端契约、数据完整性、异常处理/安全、架构/技术债、配置/缓存),结构化 findings + 对抗验证 + 基线对比,输出按严重程度排序的统一报告和修复路线图。支持 quick 快速体检模式。Use when user asks to audit, analyze, or review an entire codebase for design issues, find hidden bugs, check architecture health, or asks '全面审查', '代码库审计', '分析设计问题', 'audit codebase', 'health check', '有哪些问题', '快速体检'. Also trigger when user asks to find silent degradation, data flow breakpoints, type mismatches between frontend and backend, or wants to understand technical debt across a project.

references/ledger-format.md

View on GitHub
# Findings Ledger Format

Path: `<target>/.audit/findings.json`. Written after every audit (full and quick). Enables
resolved / still-open / new tracking across audits. Suggest gitignoring `.audit/` if the repo is
tracked (do not edit `.gitignore` yourself).

## Schema

```json
{
  "version": 1,
  "audits": [
    { "date": "2026-07-02", "mode": "full", "dimensions": ["contract", "dataflow", "errors", "arch", "config"] }
  ],
  "findings": [
    {
      "id": "errors--app-handlers-py--warning-plus-default-fallback",
      "category": "silent-degradation",
      "severity": "high",
      "file": "app/handlers.py",
      "line": 14,
      "summary": "load_section catches all exceptions and returns DEFAULT_SECTION at warning level",
      "status": "open",
      "verified": true,
      "first_seen": "2026-07-02",
      "last_seen": "2026-07-02"
    }
  ]
}
```

Field notes:
- `id`: stable slug built from `category + file + short root-cause phrase`. Never include line numbers in the id.
- `status`: `open` | `resolved`. Resolved entries stay in the ledger (with their resolution date in `last_seen`) so regressions are detectable.
- `line`: informational only — update it freely on re-audit, never match on it.
- `verified`: `true` (survived adversarial verify) | `false` (refuted — refuted findings are NOT stored in the ledger) | `null` (unverified: medium severity or quick mode).

## Matching rules (previous ledger ↔ current findings)

1. Match on **(category, file)** first; disambiguate multiple candidates by root-cause summary similarity. NEVER match by line number.
2. Current finding matches a previous `open` entry → `still-open`: keep `id` and `first_seen`, update `line`/`last_seen`/`severity`.
3. Current finding has no previous match → `new`: mint an id, `first_seen` = today.
4. Previous `open` entry has no current match → before marking `resolved`, open the file and spot-check: if the issue is actually still present (the finder just missed it), re-add it as `still-open` and note the miss in the report.
5. Current finding matches a previous `resolved` entry → regression: reopen it (`status: open`), keep the original `first_seen`, and flag it as a **regression** in the report.
6. File was renamed/moved → if an unmatched previous entry and an unmatched new finding share category + near-identical summary, treat as the same finding (rename), keep the id.
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 194kUpdated Claude CodeCodexVerifiedInstall