feat(blast-radius): PR 4 — specialist consumption + flip default to on#5
Open
ni5h4nt wants to merge 8 commits into
Open
feat(blast-radius): PR 4 — specialist consumption + flip default to on#5ni5h4nt wants to merge 8 commits into
ni5h4nt wants to merge 8 commits into
Conversation
Phase 1/9 of blast-radius PR 4.
Phase 4/9 of blast-radius PR 4.
…US rule Phase 5/9 of blast-radius PR 4.
Phase 2/9 of blast-radius PR 4.
…ymbols Phase 3/9 of blast-radius PR 4.
… helper Phase 6/9 of blast-radius PR 4.
…nt paths Phase 7/9 of blast-radius PR 4.
Phase 8/9 of blast-radius PR 4. This is the behaviour-changing commit. Reverting just this commit disables blast-radius prompts and the workflow phase entirely without touching git_provider, prompt-rendering, or specialist code.
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
PR 4 of the blast-radius initiative — the one that actually changes reviewer behavior. Three coordinated changes; the flag flip is the last commit so a regression revert is exactly one commit.
git_provider. NewGitHostAdapter.get_file_content+GitHubAdapterimpl +fetch_file_contents_activity(rename-aware: usesold_pathfor base SHA,pathfor head; skip-on-error rather than coercing exceptions to empty content).impact_context.coordinator.pyandanalyzer.pyboth render a## Impact Contextmarkdown section into their user prompts via the sharedrender_impact_contexthelper in a new neutral moduleapp/services/review/impact_prompt.py. Every specialist's system prompt is augmented with a standing rule about confidence tiers (EXTRACTED/INFERRED = definitely impacted; AMBIGUOUS = possibly impacted, lower severity by one level if a finding depends on one). Done in the coordinator/analyzer, not per-specialist file.True. Last commit. Revert justfbcf61c-equivalent to disable the feature without touching prompt or git-provider code.Stacked on PR 3 (PR #4 in this repo). GitHub will auto-retarget the base branch when PR 3 merges.
Spec:
docs/superpowers/specs/2026-05-02-blast-radius-pre-filter-design.mdPlan:
docs/superpowers/plans/2026-05-04-blast-radius-pr4-specialist-consumption.md(lives on the umbrella branch)What lands (8 commits, 20 files, +955/-30)
app/services/git_provider.py+app/services/github_adapter.py—get_file_content(owner, repo, path, sha) -> Optional[str].Nonefor 404 / directory / non-file / decode failure.app/services/review/impact_prompt.py(NEW, neutral helper module) —_STANDING_AMBIGUITY_RULE, publicrender_impact_context(impact), publicaugment_system_prompt(base). Exists specifically to break thecoordinator <-> analyzerimport cycle.app/workflows/context_activities.py—fetch_file_contents_activityregistered inREGISTERED_ACTIVITIES. Rename-aware. Skip-on-error (genuine 404 -> empty string; exception -> file dropped from output).app/workflows/review_workflow.py—fetch_file_contentsruns beforeextract_changed_symbolswhen the flag is on; threadsold_pathper file.app/services/review/multi_agent_analyzer.py—multi_agent_analyze_fileacceptsimpact_context;_build_contextputs it undercontext["impact"](legacy integer slot redefined for the symbol-level payload, documented inline).app/services/review/coordinator.py—_build_review_promptrenders the new section;Agent(...)constructed withaugment_system_prompt(config["prompt"]).app/services/analyzer.py— single-agentanalyze_fileacceptsimpact_context; new_build_user_prompthelper appendsrender_impact_context(...)when non-None; system prompt augmented identically to multi-agent. Lazy-imports the helpers to break the package-init cycle (documented inline).app/workflows/activities.py—analyze_file_activityforwardsinput.impact_contextto BOTH paths.app/core/config.py—blast_radius_enabled: bool = True(wasFalse). Last commit.Architecture decisions
impact_prompt.py, not per-specialist. Seven specialist subclass files would otherwise need identical edits;augment_system_prompt(base)does it in one place.get_file_contentreturnsOptional[str]—Nonefor genuine 404 (added/removed/directory), exception propagates for transient errors. The activity coercesNoneto""so the chunker runs on added/removed files; exceptions trigger per-file skip rather than fabricating empty content.context["impact"]slot redefined. Pre-PR-4 it carried an integer impact-radius from the legacyImpactAnalyzer(no consumer reads it). PR 4 reuses the slot for the symbol-levelBlastRadiuspayload.analyzer.pyfor theimpact_prompthelpers. The neutral module itself has no review-package deps, butapp/services/review/__init__.pyeagerly imports fromcoordinator.py(which imports fromanalyzer.py), recreating the cycle on submodule import. Lazy imports fix it cleanly without a wider__init__.pyrefactor.Test plan
get_file_contenthappy path + 404 + directory + empty-filefetch_file_contents_activityreturns the right per-file payloads + rename-aware base fetch + skip-on-error + worker-registration object-identityfetch_file_contents; flag-on runsfetch_file_contents<extract_changed_symbols<compute_blast_radius<analyze_file_activity_build_contextcarriesimpact_contextunder"impact"render_impact_contextcovers all sections + graph-unavailable caseAgentwith system_prompt containing the standing AMBIGUOUS rule (end-to-end wiring)_build_user_promptrenders the same sectionanalyze_file_activityforwardsimpact_contextto multi-agent pathTrue; workflow blast-radius tests still passuv run ruff checkclean across all 11 touched Python filesRollback plan
Revert just commit
feat(blast-radius): flip blast_radius_enabled default to True. Everything else stays — workflow phase still runs, prompts still know how to render impact context, but everySettings()defaults toFalseagain so the phase short-circuits.