xiaohongshu
xiaohongshu
impact-analysis
コード変更の影響範囲分析スキル。変更が引き起こし得る影響を影響面(code/interface/data/external/config/runtime/security/observability)ごとに整理し、「どこをレビューし、何をテストし、何を観測すべきか」を根拠つきで提示する。 トリガー条件: - 「影響範囲を分析して」「この変更の影響は?」「どこまで波及する?」 - PRレビュー依頼時、リファクタ/仕様変更時 - 障害対応で「原因箇所の周辺影響」を確認したい時 注意: 変更の是非の最終判断は行わない。実行時にしか分からない挙動は推定と不確実性を提示する。
Full skill instructions
コード変更(差分・設計変更・設定変更)が引き起こし得る影響を、影響面ごとに漏れにくく整理し、「どこをレビューし、何をテストし、何を観測すべきか」を根拠つきで提示する。
| 原則 | 説明 |
|---|---|
| Traceability | 各impactに根拠(参照種別・該当箇所)を付ける |
| Uncertainty-aware | 静的に断定できない影響は "推定" として出す |
| Surface-based | 呼び出し関係+公開IF+データ+設定+外部+非機能を同列に扱う |
| Actionable | テスト/観測/ロールアウトまで落とし込む(根拠とセット) |
| Bounded | 探索の深さ/優先ルールを定義し、境界を明示 |
impact_analysis_input:
change_set:
diff: optional<string> # 可能ならdiff
changed_files: optional<list> # 変更ファイル一覧
commit_or_pr: optional<string> # コミットSHA or PR番号
change_summary: optional<string> # 変更の説明
target: # 指定があれば優先
- file: optional<string>
symbol: optional<string>
kind: optional<function|class|method|module|endpoint|sql|config>
location: optional<string> # "path:line"
context:
language: optional<string> # ts/go/java...
framework: optional<string> # express/nest/next...
architecture: optional<string> # monolith/microservices...
entrypoints_hint: optional<list> # routes, handlers, jobs
risk_profile: optional<string> # "auth/payment" 等の重要領域
constraints:
max_graph_depth: optional<int> # default 3
max_items_per_section: optional<int> # default 20
詳細なスキーマは references/output-schema.md を参照。
impact_analysis:
meta:
schema_version: "2.0"
confidence:
overall: 0.0-1.0
notes: ["静的解析で追えないDIがある"]
change_overview:
summary: "<何が変わるか>"
change_type: <behavior_change|refactor|bugfix|perf|security|config|data_migration|unknown>
risk_domain_tags: ["auth", "session"]
blast_radius_hint: <local|module|service|system|unknown>
targets: [...] # 変更対象のエンティティ
impacts:
code: # 呼び出し関係
direct: [...]
transitive: [...]
interface: # 公開IF・契約
exports: [...]
api_endpoints: [...]
data: # データストア
stores: [...]
external: # 外部依存
dependencies: [...]
config: # 設定・環境
items: [...]
runtime_quality: # 性能・可用性
performance: [...]
availability: [...]
security_privacy: # セキュリティ
concerns: [...]
risk_assessment: # リスク評価(因子ベース)
overall:
level: <high|medium|low>
score: 0-100
applied_factors: [...]
matrix: {high: N, medium: N, low: N}
recommended_verification: # 検証計画
tests_to_run: [...]
tests_to_add_or_update: [...]
rollout_and_safety: [...]
observation_plan: # 観測計画
logs: [...]
metrics: [...]
traces: [...]
unknowns_and_assumptions: # 不確実性
unknowns: [...]
assumptions: [...]
suggested_followups: [...]
詳細は references/impact-surfaces.md を参照。
| 影響面 | 説明 | 分析対象 |
|---|---|---|
code | 呼び出し関係 | caller/callee/importer/override/implements |
interface | 公開IF・契約 | export/API/イベント/型 |
data | データストア | DB/キャッシュ/ファイル |
external | 外部依存 | 外部API/SaaS/メッセージング |
config | 設定・環境 | env/feature flag/権限/timeout |
runtime_quality | 性能・可用性 | レイテンシ/障害時挙動 |
security_privacy | セキュリティ | 認証/認可/PII/インジェクション |
observability | 観測性 | ログ/メトリクス/トレース |
詳細は references/risk-scoring.md を参照。
| 因子 | 重み | 説明 |
|---|---|---|
security_critical_path | 25 | 認証/認可/決済等のクリティカルパス |
data_write | 20 | データ書き込み・更新・削除 |
public_interface_change | 15 | 公開APIや型の変更 |
fanout_large | 10 | 多数の呼び出し元がある |
low_test_coverage | 15 | テストカバレッジが低い |
unknowns_present | 15 | 静的解析で追えない経路がある |
| score | level |
|---|---|
| 70-100 | high |
| 40-69 | medium |
| 0-39 | low |
diff/変更ファイル/説明/ターゲットを統合し「変更集合」を作る。
変更箇所からシンボル・公開IF・設定キー・SQLを候補化。
DB操作、キャッシュ、メッセージング、外部API、ファイルI/O。
8つの影響面(code/interface/data/external/config/runtime/security/observability)に分類。
各impactに根拠(evidence)と確度(confidence)を付与。断定可能か推定かを明確化。
定義済み因子でスコア化し、上位因子を説明可能な形で出す。
テスト(層・優先度・目的)、ロールアウト安全策、観測プランへ接続。
深さ上限、列挙上限、解析不能領域(unknowns)を必ず出す。
各impactには必ず根拠を付与する。
impact:
ref: "src/middleware/auth.ts:45"
relation: "caller"
risk_level: "high"
confidence: 0.85
evidence:
- "authenticateUser() を直接呼び出している"
- "import { authenticateUser } from '../auth/login'"
| relation | 説明 |
|---|---|
caller | 対象を呼び出している |
callee | 対象から呼び出されている |
importer | 対象をimportしている |
override | 対象をオーバーライドしている |
implements | 対象インターフェースを実装 |
type_depends | 型として依存 |
route_maps_to | ルーティングで対応 |
di_binds_to | DIでバインド |
静的解析で追えない影響は必ずunknownsに記載。
unknowns_and_assumptions:
unknowns:
- "動的ディスパッチによる呼び出し経路が追跡不能"
- "文字列ベースのルーティングで静的解析不可"
- "設定値依存の分岐は実行時まで不明"
assumptions:
- "DIコンテナの設定は本番と同一と仮定"
- "Feature Flagは全てONと仮定"
suggested_followups:
- "DIバインディング設定の確認"
- "実行時ログで呼び出し経路を確認"
User: この変更の影響範囲を分析して
[diff: src/auth/login.ts の修正]
Claude:
## Impact Analysis
### Change Overview
- summary: "認証関数のnullチェック追加"
- change_type: bugfix
- risk_domain_tags: ["auth", "session"]
- blast_radius_hint: module
### Targets
| file | symbol | kind | role |
|------|--------|------|------|
| src/auth/login.ts | authenticateUser | function | modified |
### Impacts
#### Code (Direct)
| ref | relation | risk | confidence | evidence |
|-----|----------|------|------------|----------|
| src/middleware/auth.ts:45 | caller | high | 0.90 | authenticateUser()を直接呼び出し |
| src/api/session.ts:23 | caller | medium | 0.85 | ログイン時にセッション作成 |
#### Data
| store | entity | operation | risk | evidence |
|-------|--------|-----------|------|----------|
| postgres | users | read | medium | SELECT FROM users |
| redis | sessions | write | high | セッション書き込み |
### Risk Assessment
- overall: medium (score: 55)
- applied_factors:
- security_critical_path: 25 (認証フロー)
- data_write: 20 (セッション書き込み)
- unknowns_present: 10 (DI経路)
### Recommended Verification
| test | layer | priority | purpose |
|------|-------|----------|---------|
| login.test.ts | unit | p0 | nullケースのカバー |
| auth.integration.ts | integration | p0 | E2Eログインフロー |
### Unknowns
- "DIコンテナ経由の呼び出しは静的解析不可"
- "Feature Flag状態による分岐は実行時依存"
xiaohongshu
technical spec
product ux expert
database patterns
Conduct multi-agent task orchestration and workflow coordination.
Initialize project with Conductor artifacts (product definition,
Expert in web animations, transitions, and motion design using Framer Motion and CSS
Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...
PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.
Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...
Display project status, active tracks, and next actions
Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.
Generate, edit, and beat-sync AI video with leading models in one workspace.
The world's fastest calendar for remote work
Transform Your Design with AI Designer by ImgCreator.ai
Revolutionizing Video Production with AI-Powered Creativity
Extend an image past the frame and let AI fill the new aspect ratio.
Discover your celebrity doppelgänger with StarByFace!
ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.
Opus.ai: Revolutionize Your Web Experience