Skip to content

refactor(hooks): move blast radius guidance from PreToolUse to sessio…#11

Merged
Umaaz merged 1 commit intomainfrom
refactor/move-blast-radius-to-session-start
Feb 27, 2026
Merged

refactor(hooks): move blast radius guidance from PreToolUse to sessio…#11
Umaaz merged 1 commit intomainfrom
refactor/move-blast-radius-to-session-start

Conversation

@Umaaz
Copy link
Member

@Umaaz Umaaz commented Feb 27, 2026

Overview

This merge request refactors the "blast radius" guidance by moving it from a PreToolUse hook to the session start context. Previously, this check was triggered on every Edit tool call. By relocating it to the session start, the guidance is injected only once, improving efficiency and centralizing static behavioral instructions.

Technical Details

  • Files Changed: .claude-plugin/plugin.json

  • Change Type: Refactor

  • Context:

    • Previous Behavior: A PreToolUse hook prompted the user to consider the impact of changes in critical integration or infrastructure paths by querying OpenTrace before each Edit tool execution.
    • New Behavior: The guidance is now included in the session-start script. This script proactively queries OpenTrace when a user intends to edit files in shared paths and automatically calls the most useful follow-up tool after receiving the results.
  • Specific Changes:

    • Removed the PreToolUse Edit matcher and its associated prompt hook.
    • Deleted the hooks/pre-tool-use-edit-blast-radius/ directory.
    • Added the blast radius guidance to the session-start base context.

Review Summary

  • Key Findings: The change was reviewed and determined to be a beneficial refactor that improves efficiency without altering the core guidance.
  • Approval Status: Approved.

Impact Assessment

  • Security: No direct security impact. The change preserves the original intent of promoting awareness for modifications in critical system paths.
  • Performance: Positive. Moving the check from a per-call hook to the session start reduces redundant processing and improves the responsiveness of the Edit tool.
  • Maintainability: Improved. Centralizing this logic into the session start context simplifies the overall hook configuration and makes the behavior easier to manage.

Attached by run j-32261132-4c0b-4150-bdae-53927cb28fa3

…n start

Move the Edit blast radius check from a per-call PreToolUse prompt hook
to the session start context. This is more efficient (injected once vs
on every Edit call) and the guidance is static behavioral instruction
that doesn't need runtime parameter inspection.

- Remove PreToolUse Edit matcher and prompt hook
- Delete hooks/pre-tool-use-edit-blast-radius/
- Add blast radius guidance to session start base_context

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link

@opentrace opentrace bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

@opentrace
Copy link

opentrace bot commented Feb 27, 2026

This is a good refactoring that improves efficiency. Moving the static blast radius guidance from a per-call hook to the session start context is a sensible change that reduces redundant operations without losing functionality. The change is well-described and justified.


Attached by run j-32261132-4c0b-4150-bdae-53927cb28fa3

@Umaaz Umaaz merged commit f216b88 into main Feb 27, 2026
1 check passed
@Umaaz Umaaz deleted the refactor/move-blast-radius-to-session-start branch February 27, 2026 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants