Skip to content

feat: add bootcamp impact for change-impact ("blast radius") analysis#68

Merged
Arthur742Ramos merged 1 commit into
mainfrom
arthur742ramos/impact-command
Jun 15, 2026
Merged

feat: add bootcamp impact for change-impact ("blast radius") analysis#68
Arthur742Ramos merged 1 commit into
mainfrom
arthur742ramos/impact-command

Conversation

@Arthur742Ramos

Copy link
Copy Markdown
Owner

Summary

Adds bootcamp impact <repo-url> [file] β€” a standalone, deterministic change-impact / blast-radius report that exposes the existing buildImportGraph / analyzeChangeImpact engine (the same one that produces IMPACT.md) as a first-class command. No LLM involved.

🎯 src/util.ts
  imported by 1 Β· affects 1 file Β· 1 test Β· 0 docs

Imports (0)
  β€”
Imported by (1)
  β€’ src/index.ts
Affected tests (1)
  β€’ test/util.test.ts
…

Details

  • With a <file> argument β€” full blast radius for that file: what it imports, what imports it, and the transitively affected files, tests, and docs.
  • Without a file β€” summarizes the repository's key entry-point files (bounded by --top, default 10), each with a one-line impact count.
  • --json emits the full ChangeImpact objects for scripting.
  • A repo-relative path is normalized to the scan's forward-slash keys; a path that wasn't scanned exits non-zero with a helpful message (and still cleans up the temporary clone).

This completes the standalone deterministic command set: scan/health/metrics/security/deps/radar/impact.

Depends on #67 (import-resolution fix) β€” without it, dependents wouldn't resolve for TS/ESM projects and the blast radius would read empty.

Testing

  • Unit: key-file summary, single-file detail, --top bound, --json, ./-path normalization, not-found exit (with cleanup), no-key-files message, --keep-temp, scan failure, resolve failure β€” 10 tests.
  • E2E: bootcamp impact against a real local fixture with a genuine import edge β€” summary, single-file detail + JSON (importedBy contains the dependent), and not-found exit β€” 3 tests.
  • Full suite green locally: typecheck, lint, build, 1177/1177 unit tests.

πŸ€– Generated with Claude Code

Expose the deterministic change-impact engine (already used to generate
IMPACT.md) as a standalone command. `bootcamp impact <repo> [file]` builds
the import graph once and reports blast radius. No LLM involved.

- With a `<file>` argument: lists what the file imports, what imports it,
  and the transitively affected files, tests, and docs.
- Without one: summarizes the repository's key entry-point files (bounded
  by `--top`, default 10).
- `--json` emits the full ChangeImpact objects for scripting.

A repo-relative file path is normalized to the scan's forward-slash keys;
a path that wasn't scanned exits non-zero with a helpful message (and still
cleans up the temporary clone).

This completes the standalone deterministic command set
(scan/health/metrics/security/deps/radar/impact). Depends on the import
resolution fix (#67) so dependents resolve for TS/ESM projects.

Covered by unit tests (key-file summary, single-file detail, --top, JSON,
path normalization, not-found exit, no-key-files, keep-temp, scan failure,
resolve failure) and an e2e test that runs `bootcamp impact` against a real
local fixture with a genuine import edge.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Arthur742Ramos Arthur742Ramos merged commit 8634110 into main Jun 15, 2026
13 checks passed
@Arthur742Ramos Arthur742Ramos deleted the arthur742ramos/impact-command branch June 15, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants