pr-blast-radius by anticorrelator/lore
npx skills add https://github.com/anticorrelator/lore --skill pr-blast-radius聚焦变体。如需全面覆盖,请使用 /pr-review。
您正在运行 影响范围镜头 —— 一种聚焦式审查,用于追踪 PR 变更对差异之外代码的影响。此镜头识别出未包含在 PR 中但受变更影响的文件、模块和消费者。它补充了 /pr-review 中的 8 点代理代码检查清单;其目标是下游影响,而非变更代码本身的正确性。
发现结果将以结构化 JSON 格式写入共享工作项。发布到 GitHub 是通过 post-review.sh 的单独步骤。
提供的参数:$ARGUMENTS
将第一个标记解析为 PR 编号(数字)或 GitHub URL。提取数字形式的 PR 标识符。
如果未找到 PR 标识符,请向用户询问 PR 编号。
从 git 远程仓库解析仓库所有者/名称:
REMOTE_URL=$(git remote get-url origin)
从远程 URL 中提取 OWNER/REPO。
bash ~/.lore/scripts/fetch-pr-data.sh <PR_NUMBER>
gh pr diff <PR_NUMBER>
gh pr view <PR_NUMBER> --json files,title,body,commits
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
根据获取的数据,识别:
isOutdated: true 的线程。注意任何已提出的影响问题,以避免重复。此镜头本质上需要超越差异的多文件探索。根据变更类型优先进行调查。
3a. 导出和接口变更 —— 对于每个变更的导出、公共函数、类或类型定义:
rg "import.*<name>" --type <lang> 或等效模式3b. 函数签名变更 —— 对于每个签名发生变更的函数(参数添加/移除/重新排序,返回类型变更):
rg "<function_name>\(" --type <lang>3c. 配置和模式变更 —— 对于每个变更的配置文件、模式定义或环境变量:
rg "<config_key>"。3d. 行为契约变更 —— 对于可观察行为发生变更的代码(不同的副作用、不同的错误类型、不同的顺序),即使类型签名未变:
大型差异的范围界定:如果超过约 10 个文件有接口或导出变更,请优先处理:(1) 对共享库或工具模块的变更,(2) 对公共 API 或外部接口的变更,(3) 对跨模块边界使用的类型或模式的变更。对优先变更应用完整方法;对其余部分进行较轻量级的检查。
阅读增强协议:
cat ~/.lore/claude-md/70-review-protocol.md
对于每个发现,查询知识库:
lore search "<finding topic>" --type knowledge --json --limit 3
将相关引用作为 knowledge_context 条目附加到发现中。遵循共享协议中的增强门限和输出上限。如果未找到相关知识,则将 knowledge_context 设置为空数组。
如果某个发现涉及深度的跨边界影响(跨越多个模块的不变量,且消费者行为不明确)并且知识库中没有相关条目,请按照 70-review-protocol.md 中的调查升级协议进行升级。预算:每次镜头运行最多 2 次升级。
从以下位置读取严重性分类和发现输出格式:
cat ~/.lore/claude-md/70-review-protocol.md
5a. 构建符合发现输出格式模式的发现 JSON:
{
"lens": "blast-radius",
"pr": <PR_NUMBER>,
"repo": "<OWNER>/<REPO>",
"findings": [...]
}
使用严重性分类定义对每个发现进行分类。在阻塞性问题和建议之间不确定时,默认为 suggestion。此镜头的典型严重性模式:
5b. 向用户呈现发现,按严重性分组(阻塞性问题优先,然后是建议,最后是疑问)。对于每个发现,显示:严重性、标题、差异中变更的文件:行号、差异外受影响的文件、正文和知识上下文。
5c. 写入工作项。 创建或更新共享的镜头审查工作项:
/work create pr-lens-review-<PR_NUMBER>
如果工作项已存在,则加载它而不是创建重复项。将发现 JSON 作为围栏式 JSON 代码块追加到 notes.md 中的 ## Blast Radius Lens 标题下。
5d. 通知发布。 编写发现后,提醒用户:
发现已写入工作项。要作为 PR 审查发布,请运行:
bash ~/.lore/scripts/post-review.sh <findings.json> --pr <PR_NUMBER> [--dry-run]
/remember PR 影响范围分析来自 PR #<N> —— 捕获:代码库中发现的跨模块依赖模式、接口契约约定、消费者更新要求。对于审查者观察,使用置信度:中等。跳过:特定于此 PR 且无法泛化的发现、一次性消费者列表、仓库特定的导入拓扑。
gh auth login每周安装次数
1
仓库
GitHub 星标数
1
首次出现
1 天前
安全审计
安装于
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1
Focused variant. For holistic coverage, use /pr-review.
You are running the blast radius lens — a focused review that traces the impact of PR changes on code outside the diff. This lens identifies files, modules, and consumers NOT in the PR that are affected by the changes. It complements the 8-point agent-code checklist in /pr-review; it targets downstream impact, not correctness of the changed code itself.
Findings are structured JSON written to a shared work item. Posting to GitHub is a separate step via post-review.sh.
Argument provided: $ARGUMENTS
Parse the first token as a PR number (digits) or GitHub URL. Extract the numeric PR identifier.
If no PR identifier is found, ask the user for the PR number.
Resolve the repo owner/name from the git remote:
REMOTE_URL=$(git remote get-url origin)
Extract OWNER/REPO from the remote URL.
bash ~/.lore/scripts/fetch-pr-data.sh <PR_NUMBER>
gh pr diff <PR_NUMBER>
gh pr view <PR_NUMBER> --json files,title,body,commits
From the fetched data, identify:
isOutdated: true threads. Note any impact concerns already raised to avoid duplication.This lens inherently requires multi-file exploration beyond the diff. Prioritize investigation based on the type of change.
3a. Export and interface changes — For each changed export, public function, class, or type definition:
rg "import.*<name>" --type <lang> or equivalent patterns3b. Function signature changes — For each function whose signature changed (parameters added/removed/reordered, return type changed):
rg "<function_name>\(" --type <lang>3c. Configuration and schema changes — For each changed config file, schema definition, or environment variable:
rg "<config_key>" across the codebase.3d. Behavioral contract changes — For code where the observable behavior changes (different side effects, different error types, different ordering) even if the type signature is unchanged:
Scoping for large diffs: If more than ~10 files have interface or export changes, prioritize: (1) changes to shared libraries or utility modules, (2) changes to public APIs or external interfaces, (3) changes to types or schemas used across module boundaries. Apply full methodology to priority changes; do a lighter pass on the rest.
Read the enrichment protocol:
cat ~/.lore/claude-md/70-review-protocol.md
For each finding, query the knowledge store:
lore search "<finding topic>" --type knowledge --json --limit 3
Attach relevant citations as knowledge_context entries in the finding. Follow the enrichment gate and output cap from the shared protocol. If no relevant knowledge is found, set knowledge_context to an empty array.
If a finding involves deep cross-boundary impact (invariants spanning multiple modules where consumer behavior is unclear) and the knowledge store has no relevant entries, escalate per the Investigation Escalation protocol in 70-review-protocol.md. Budget: maximum 2 escalations per lens run.
Read the severity classification and findings output format from:
cat ~/.lore/claude-md/70-review-protocol.md
5a. Build findings JSON conforming to the Findings Output Format schema:
{
"lens": "blast-radius",
"pr": <PR_NUMBER>,
"repo": "<OWNER>/<REPO>",
"findings": [...]
}
Classify each finding using the Severity Classification definitions. Default to suggestion when uncertain between blocking and suggestion. Typical severity patterns for this lens:
5b. Present findings to the user grouped by severity (blocking first, then suggestions, then questions). For each finding show: severity, title, file:line of the change in the diff, affected files outside the diff, body, and knowledge context.
5c. Write to work item. Create or update the shared lens review work item:
/work create pr-lens-review-<PR_NUMBER>
If the work item already exists, load it instead of creating a duplicate. Append the findings JSON under a ## Blast Radius Lens heading in notes.md as a fenced JSON code block.
5d. Notify about posting. After writing findings, remind the user:
Findings written to work item. To post as a PR review, run:
bash ~/.lore/scripts/post-review.sh <findings.json> --pr <PR_NUMBER> [--dry-run]
/remember PR blast radius analysis from PR #<N> — capture: cross-module dependency patterns, interface contract conventions, consumer update requirements discovered in the codebase. Use confidence: medium for reviewer observations. Skip: findings specific to this PR that don't generalize, one-off consumer lists, repo-specific import topology.
gh auth loginWeekly Installs
1
Repository
GitHub Stars
1
First Seen
1 day ago
Security Audits
Gen Agent Trust HubPassSocketPassSnykWarn
Installed on
mcpjam1
claude-code1
replit1
junie1
windsurf1
zencoder1