feat: Pass B — consolidation & AI anti-pattern analysis (report-only)
Adds the cross-file analysis pass on top of v1's per-node simplification:
- F1 consolidation: duplicate enums/labels (ast-grep+LLM cluster), near-duplicate
functions (cpd exact + ast-grep skeleton for renamed), untyped repeated DTOs.
- F2 reinventing-the-wheel: ast-grep signature index + judge.
- F3 lint enrichment: bundled Biome (JS/TS) + ruff (Python), read-only, mapped to ledger
(defer to linters, don't reimplement).
- F4 metrics: scc + ast-grep-derived; flags god/long functions.
Engines bundled as standalone single binaries (manifest + checksums + LFS): ast-grep,
cpd, scc, biome, ruff. Qlty REJECTED at the non-intrusiveness gate (requires `qlty init`
writing .qlty/ into the target) → contingency cpd+scc. Pass B is report-only with a
mandatory model judge + AHA guardrails (validated on software-house: 5 enum clusters incl.
a latent bug, 7 near-dup fn clusters, biome 148 diags, scc flags dispatch.ts cx=698).
Docs: references/CONSOLIDATION.md, references/ANTIPATTERNS.md, docs/PLAN-v2-antipatterns.md;
SKILL.md Pass B section; ledger schema consolidation kind. linux-x64 binaries bundled;
other platforms via manifest fetch+verify.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>