feat: add bootcamp impact for change-impact ("blast radius") analysis#68
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds
bootcamp impact <repo-url> [file]β a standalone, deterministic change-impact / blast-radius report that exposes the existingbuildImportGraph/analyzeChangeImpactengine (the same one that producesIMPACT.md) as a first-class command. No LLM involved.Details
<file>argument β full blast radius for that file: what it imports, what imports it, and the transitively affected files, tests, and docs.--top, default 10), each with a one-line impact count.--jsonemits the fullChangeImpactobjects for scripting.This completes the standalone deterministic command set:
scan/health/metrics/security/deps/radar/impact.Testing
--topbound,--json,./-path normalization, not-found exit (with cleanup), no-key-files message,--keep-temp, scan failure, resolve failure β 10 tests.bootcamp impactagainst a real local fixture with a genuine import edge β summary, single-file detail + JSON (importedBycontains the dependent), and not-found exit β 3 tests.π€ Generated with Claude Code