Skip to content
Draft
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Local impact analysis · Git differential orphan detection · CLI + MCP + Agent

</div>

> **Development preview (0.0.1-dev), not a v0.1.0 release.** The 30 curated goldens, 120 baseline tests and live official MCP SDK stdio have passed hosted CI. A frozen npm v3 lock, provenance/license metadata check and repeatable packed-consumer smoke are now tracked by [P1](docs/P1_SUPPLY_CHAIN.md). Real-project accuracy, complete TypeChecker semantics and license-text/NOTICE sign-off remain open. Never auto-delete orphan findings.
> **Development preview (0.0.1-dev), not a v0.1.0 release.** The original 30 goldens and live official MCP SDK stdio have passed hosted CI, with additional pinned public-source regressions and a separate first-score independent corpus. Test counts and the exact SHA gates are recorded in [Acceptance](docs/ACCEPTANCE.md); do not infer graph completeness from a green scoped oracle. A frozen npm v3 lock, provenance/license metadata check and repeatable packed-consumer smoke are now tracked by [P1](docs/P1_SUPPLY_CHAIN.md). Real-project accuracy, complete TypeChecker semantics and license-text/NOTICE sign-off remain open. Never auto-delete orphan findings.

BlastRadius helps coding agents and developers answer two questions **before and after a refactor**:

Expand Down Expand Up @@ -77,7 +77,7 @@ These are not proof that either declaration can safely be deleted. External cons

### Independent public-source evaluation

The [pinned independent source/Knip study](docs/evidence/P2_PUBLIC_ACCURACY.md) reproduces and fixes 13 missed static bindings in real usehooks-ts and Next.js source, then scores **215 true-positive and 5 true-negative relations with no FP/FN among 220 compiler-resolvable pairs**. The full projects nevertheless have **incomplete/unknown graph coverage**; these metrics must not be generalized or treated as authorization to remove code. See the [before/after evidence](docs/evidence/p2-public-post-fix.json) and limitations before interpreting the result.
The historical [three-project accuracy study](docs/evidence/P2_PUBLIC_ACCURACY.md) found 13 missed bindings and fixed them. A later **15-repository source-pinned evaluation** on the first-score P7 SHA `b9b53cc053bf0978c50d86a463ddcdc8d677ec1b` measured **70 TP, 46 TN, 0 FP/FN among 116 independently annotated references**, and **8749 TP, 30 TN, 0 FP/FN among 8779 compiler-resolvable named-import pairs**; the 18 P7 labels were frozen in a separate earlier commit. P7 alone had **5310 external or unresolved imports out of 10124 attempted** and all three entire graphs were incomplete. The complete 15-repo evaluation remains a *curated static subset*, not a representative precision/recall estimate or code-deletion authorization. See [P7 evidence](docs/evidence/P7_FIRST_SCORE.md) and [UNKNOWN boundaries](docs/evidence/P2_REMAINING_UNKNOWN.md).

## Implementation status

Expand All @@ -86,10 +86,10 @@ The [pinned independent source/Knip study](docs/evidence/P2_PUBLIC_ACCURACY.md)
| TypeScript AST, static imports, exports, barrels | Basic graph and resolution implemented | Compiler-backed semantic identity, ambiguity and more workspaces |
| React and Next.js | JSX references/props and App/Pages route patterns | Advanced HOCs, redirects, special routes, richer prop spreads |
| Git differential orphan analysis | HEAD/index/worktree, broken references, affected route/test summary and test/story classification | Git rename identity, complex public API/side-effect cases |
| SQLite | Persistent graphs, file facts, transactional writes, forced rebuild and cache symlink protection | Process concurrency, hardening and migration matrix |
| SQLite | Persistent graphs, file facts, transactional writes and symlink protection; source-backed SQLite lock classification regression in PR #23 | More concurrent process modes, cancellation/crash recovery and migration matrix |
| CLI | Core commands with JSON | Full pagination and stricter input contracts |
| MCP and Skill | Five input-validated tools, snapshot-bound explain and agent Skill; official SDK stdio PASS in all 8 CI cells | Additional clients/resources, formal response contract and integration breadth |
| Acceptance | 120 P2 baseline tests + 30 hand-labeled goldens + 8 TypeChecker oracles and 8-cell CI PASS | Real-world pinned precision/recall, richer semantic model, repeatable performance and v0.1.0 release review |
| Acceptance | 30 golden fixtures, official SDK CI, 15 SHA-pinned public-source evaluation with explicit UNKNOWN; 5k/50k repeated synthetic profiles from a separate exact PR SHA | Real monorepo repeated p50/p95, complete graph coverage boundaries, independent post-change untouched holdout, legal review, v0.1.0 release decision |

The full [requirements and acceptance matrix](docs/ACCEPTANCE.md) distinguishes tests that ran locally from targets and unverified behaviors.

Expand Down
6 changes: 5 additions & 1 deletion README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,12 @@ node dist/packages/cli/src/main.js diff --base HEAD --root /absolute/path/to/pro

## Текущий статус

Основной граф TS/JS, CLI, MCP и Skill доступны в исходниках. **30 формальных golden-сценариев и 120 базовых тестов проходят**, а [CI на Linux, Windows и macOS (8/8)](https://github.com/levencode-labs/blastradius/actions/runs/45003627005) подтвердила настоящий MCP stdio на Node 22/24. [P1](docs/P1_SUPPLY_CHAIN.md) добавляет зафиксированный `package-lock.json`, неизменяемый `npm ci`, проверку лицензий зависимостей и реальную сборку/установку npm-архива. Остаются независимые измерения точности на реальных проектах, сложная семантика TypeChecker, проверка юридических текстов лицензий и релизная приёмка; автоматически удалять найденный код нельзя.
Основной граф TS/JS, CLI, MCP и Skill доступны в исходниках. **30 формальных golden-сценариев и реальный MCP stdio** подтверждены в CI Linux/Windows/macOS на Node 22/24. Последняя независимая выборка из 15 Git-SHA-закреплённых репозиториев дала 70 TP / 46 TN по 116 ручным меткам и 8749 TP / 30 TN по 8779 разрешимым TypeScript-связям, без наблюдаемых FP/FN в этом ограниченном наборе. Однако все сложные графы могут оставаться неполными, а только в P7 **5310 из 10124** попыток импортов не вошли в проверяемую область. Это не разрешение удалять код автоматически. [P1](docs/P1_SUPPLY_CHAIN.md) добавляет зафиксированный `package-lock.json`, неизменяемый `npm ci`, проверку лицензий зависимостей и реальную сборку/установку npm-архива. Остаются независимые измерения точности на реальных проектах, сложная семантика TypeChecker, проверка юридических текстов лицензий и релизная приёмка; автоматически удалять найденный код нельзя.

## Лицензия

Исходный код проекта — MIT; перед публикацией npm нужна проверка всех зависимостей и платформ.

## Проверяемые границы и скорость

Подробные [итоги P7 и приёмочные ограничения](docs/ACCEPTANCE.md) показывают, что наличие `UNKNOWN` не означает отсутствие зависимостей. Сложные React HOC/spread, динамический React Router, `side effects` и условные package exports нельзя превращать в гарантированно безопасное удаление. Выполнены отдельные синтетические измерения **5000 × 3** и **50000 × 3** файлов (p50/p95 времени и RSS), но повторяемость на реальных монорепозиториях и полный audit/NOTICE ещё открыты. Подключение к OpenCode V2 в режиме stdio описано в [MCP_SETUP.md](docs/MCP_SETUP.md); настоящая интеграция с его установленным Desktop-клиентом отдельно не подтверждена.
27 changes: 21 additions & 6 deletions docs/ACCEPTANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,29 @@ A read-only study at three exact pinned TypeScript/React/Next.js Git SHAs and Kn

| Area | Verified preview evidence | Remaining v0.1.0 work |
| --- | --- | --- |
| Symbol graph | Imports/aliases/barrels, TypeScript paths, JSX, distinct export bindings; 8 independent TypeChecker alias checks | Fully semantic symbol identity, overload/merged declarations, multiple tsconfig/project refs, richer namespace cases |
| Symbol graph | Scoped overload/type-value/namespace cases, safe bounded import expressions, workspace-owned pnpm tsconfig and exact conditional exports; compiler oracles | Full TS project references, external/public consumers, advanced HOC/prop value flow, dynamic runtime identity |
| Impact and routes | React JSX, Next App/Pages and layout relationships, `apps/*` and `packages/*` Next roots | React Router, HOC/spread prop flow, interception routes and arbitrary bundler extensions |
| Differential analysis | Git HEAD/index/worktree, newly orphaned unchanged exports, public API transitions, unambiguous unchanged-source rename, uncertainty warnings | Edited-file rename fingerprints, arbitrary dynamic imports, complete package API boundary matrix and external consumer evidence |
| Conservative deletion | Side-effect and public API protection, unknown coverage handling, manual candidate review | Expand effect corpus, dynamic/plugin entry point policies; no automatic deletion in MVP |
| Persistent cache | SQLite snapshots and invalidation, symlink and corruption protections | Multiple concurrent processes, crash/cancel recovery, long-running project memory profiles |
| CLI and MCP | 78 baseline tests, five MCP tools, live stdio E2E on previously checked CI SHA | Full audited flags/compatibility matrix and formal response schema/documentation stability |
| Accuracy | All 30 curated goldens and 8 TypeChecker checks; 0 FP/FN on **39 annotated assertions only** | Independent pinned public-repository corpora, unbiased labeling, precision ≥95% / recall ≥90% with unknown coverage disclosed |
| Reproducibility | npm lockfile v3 (98 SHA-512-integrity packages), clean `npm ci` on 8 OS/Node cells, strict SPDX metadata inventory and repeated real npm pack + consumer smoke in P1 | 8-cell cross-OS tarball SHA equality (mandatory P1 aggregation), full license text/NOTICE review, security provenance and independent release approvals |
| Performance | One synthetic 5,001-file timing in old preview | Repeat p50/p95, RSS and cold/warm updates on real repositories, 50k-file evaluation |
| Persistent cache | SQLite snapshots/invalidation, symlink/corruption boundaries; real cross-process BUSY-vs-CORRUPTED source-backed recovery regression | Simultaneous write policies, crash/cancel recovery, schema migration compatibility and long-running profiles |
| CLI and MCP | Five validated MCP tools, official SDK stdio E2E on 8 OS/Node cells, source-bounded JSON schemas; indexed-project status regression in P4 candidate | Client-specific OpenCode/Codex/Cursor/Claude E2E, stable response/schema contracts and broader tool UX |
| Accuracy | 30 curated goldens plus 15 SHA-pinned public projects (116 manual and 8779 compiler-resolvable pairs, 0 observed FP/FN in those eligible units) | Unbiased representative sampling, after-change pristine holdout, explicit dynamic/external UNKNOWN and whole-graph limitations |
| Reproducibility | npm lock v3 with 98 exact SHA-512 package locations, frozen `npm ci`, installed SPDX metadata and pack+consumer smoke; **8-cell cross-OS byte parity PASS** on accepted SHAs | Full source-license texts/NOTICE and redistribution audit, security/build provenance and independent release approvals |
| Performance | Exact P3 candidate has 5000 × 3 and 50000 × 3 cold/warm/one-edit synthetic p50/p95 and RSS; algorithmic 160000-key RED evidence | Post-merge independent repeatable real monorepo p50/p95, multi-process contention and memory soak |

**No task may reduce the CI matrix after a failure to manufacture a pass. No release, tag, or npm publication is part of P1.**

## P6/P7 independent-source expansion — accepted preview evidence (2026-11-23)

- The first P6 source freeze `d7fecd7fd88fbb610292cbfe5ace7490df89904b` preserved 9 old sources/80 labels and added three sources/18 pre-picked labels. Original [RED CI #45031866212](https://github.com/levencode-labs/blastradius/actions/runs/45031866212) had 4 manual and 23 compiler-resolvable FNs from pnpm-owned workspace tsconfig. Separate regression-first fix PR #19; accepted P6 post-fix merge `abf5f93239c415ad7b31d1d4e32c774b9f520fab` [9/9 OS/Node + parity](https://github.com/levencode-labs/blastradius/actions/runs/45034364022) and [independent oracle/Knip](https://github.com/levencode-labs/blastradius/actions/runs/45034364047). P6 became **exposed**, not pristine.
- The **new pristine P7** exact source SHAs (TanStack Query `0827cf2c`, Ark UI `844114ee`, shadcn-ui `bfa64ff4`) and **18 manual labels** were committed before scoring in source-only PR #20, original SHA `f22405477cc3db4c34c5076196a2179400988905`. First scoring on `b9b53cc053bf0978c50d86a463ddcdc8d677ec1b`: [independent action #45155575563](https://github.com/levencode-labs/blastradius/actions/runs/45155575563), retained report artifact **14808372815**. P7: 12 TP/6 TN manual, 4809 TP/5 TN eligible named-import pairs; 0 FP/FN in both restricted units. **5310/10124 attempted named bindings excluded as external/unresolved**, 0/3 complete graphs. Original three Knip 6.45.1 mutations unchanged.
- Combined 15 public SHA pins/116 manual labels = **70 TP, 46 TN, 0 FP/FN**; 8779 independently compiler-resolvable named-import pairs = **8749 TP, 30 TN, 0 FP/FN**. These counts are intentionally NOT population estimates. No unknown source is treated as TN or safe-to-delete. PR #22 merged as `d3aa2273070159cba37e019cbbf7a17ea8082615`, [9/9 merge-SHA CI](https://github.com/levencode-labs/blastradius/actions/runs/45158415745), [independent oracle/Knip](https://github.com/levencode-labs/blastradius/actions/runs/45158415723) PASS.
- An optimization inspired by P7 graph timing is in PR #24: the P7 cohort must therefore be considered **exposed for subsequent post-change release claims**, even though its original independent first score remains valid for the prior engine. A fresh untouched P8 source-only freeze is in PR #26 with no scores at freeze time. Do not backfill labels from the analyzer.

## Preliminary performance and concurrency (not v0.1.0 acceptance)

- Real original P7 cold index (one run each): 2194 source files/13.7 s, 5006/84.7 s, 4426/96.4 s. The quadratic directory-resolution defect was reproduced with **160000 key enumerations** for 400 indexed files/200 proved imports in original [PR #24 RED CI #45156809769](https://github.com/levencode-labs/blastradius/actions/runs/45156809769). New algorithm indexes directories once per snapshot; no accuracy or UNKNOWN narrowing is authorized.
- On isolated performance candidate `cd41d0b31f7e8c592dba364537e9d2a368a11c6c` [exact GitHub Actions #45161031819](https://github.com/levencode-labs/blastradius/actions/runs/45161031819), 3 synthetic samples at each size: 5000 files cold p50/p95 **956/1302 ms**, warm **64/70 ms**, one-source-edit **301/318 ms**, peak RSS **264 MiB**; 50000 files cold **7895/8010 ms**, warm **723/750 ms**, edit **3239/3271 ms**, peak **865 MiB**. All 5001/50001 graph files were indexed. These are **three synthetic import-chain samples**, not representative real-repo p95, and the optimizer PR must separately pass full CI and merge SHA.
- A real SQLite cross-process write lock was misreported as cache corruption in original [PR #23 RED #45156045867](https://github.com/levencode-labs/blastradius/actions/runs/45156045867). Scoped repair distinguishes `CACHE_BUSY` from actual corruption and retains Windows/macOS path safeguards. This does NOT prove multi-writer performance, cancellation recovery, database integrity under crashes or complete migration compatibility.

**Still OPEN for first npm release:** complete license text/NOTICE and provenance review, client-specific OpenCode/Codex/Cursor/Claude integration beyond official SDK stdio smoke, real monorepo cold/warm/update p50/p95, concurrency/cancel recovery, semantic hard cases including dynamic import/React props/route config and external consumers, and an independent post-change blind holdout. Keep `private:true`, `0.0.1-dev`; do not create any release, tag, or npm publication.
Loading
Loading