一键导入
crd-impact-analysis
Analyze the impact of a proposed change on an existing codebase. Identifies affected files, features, and potential breaking changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Analyze the impact of a proposed change on an existing codebase. Identifies affected files, features, and potential breaking changes.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Break down a PRD or CRD into self-contained implementation tasks for LLM execution. Use when you have a PRD/CRD file and want to generate executable task files for autonomous implementation.
Incremental PROJECT.md update using git diff. Only re-analyzes changed areas for efficient context maintenance.
Deep codebase investigation to generate PROJECT.md context. Analyzes architecture, patterns, features, APIs, and schemas.
Orchestrates Change Request Document workflow. Manages context, captures changes, analyzes impact, and generates CRD files.
Handles one batch of tasks. Spawns task agents in parallel using git worktrees, waits for completion, and updates state.
Main entry point for hierarchical task execution. Orchestrates layer-by-layer implementation of PRD tasks with parallel worktree execution.
| name | crd-impact-analysis |
| description | Analyze the impact of a proposed change on an existing codebase. Identifies affected files, features, and potential breaking changes. |
| context | fork |
| agent | crd-impact-analyzer |
| allowed-tools | Read Glob Grep |
| model | claude-haiku-4-5 |
You analyze how a proposed change will affect an existing codebase using PROJECT.md context.
| Argument | Required | Description |
|---|---|---|
--project <path> | Yes | Path to project root |
--type <type> | Yes | Change type: feature-add, feature-modify, feature-remove, refactor |
--description "<text>" | Yes | Description of the proposed change |
Read PROJECT.md and parse:
<features> - Map of existing features<api-registry> - Map of API endpoints<schema-registry> - Map of database modelsExtract keywords and concepts from the description:
"Add dark mode toggle to settings modal that persists preference"
Keywords: dark mode, toggle, settings, modal, persist, preference
Components: SettingsModal, settings API, user preferences
Search PROJECT.md context for matches:
Feature matching:
<feature id="settings">
<name>User Settings</name>
<files>src/api/settings.py, src/components/SettingsModal.tsx</files>
</feature>
→ Match! "settings" appears in description
API matching:
<endpoint method="PUT" path="/api/settings">
<request>{ settings: object }</request>
</endpoint>
→ Match! Settings API will likely be used
Schema matching:
<model name="User">
<field name="settings" type="jsonb"/>
</model>
→ Match! User.settings will store preference
Based on matches, list files:
Files to Modify:
Files to Create:
Use grep to find additional dependencies:
grep -r "import.*SettingsModal" {project_path}/src --include="*.tsx" -l
grep -r "/api/settings" {project_path}/src --include="*.ts" -l
For each affected area, check for:
API breaking changes:
Schema breaking changes:
Interface breaking changes:
| Scope | Criteria |
|---|---|
small | 1-3 files, no breaking changes, single component |
medium | 4-8 files, minor API changes, multiple components |
large | 9+ files, schema changes, cross-cutting concerns |
| Confidence | When |
|---|---|
high | Change maps clearly to existing features, all files identified |
medium | Some new patterns needed, not all code cataloged |
low | Novel functionality, incomplete context, cross-cutting |
Return structured impact analysis:
<impact-analysis>
<affected-files>
<file action="modify">src/components/SettingsModal.tsx</file>
<file action="modify">src/api/settings.py</file>
<file action="create">src/hooks/useTheme.ts</file>
<file action="modify">src/styles/globals.css</file>
</affected-files>
<affected-features>
<feature id="settings">Add theme toggle to Appearance section</feature>
</affected-features>
<affected-apis>
<api path="/api/settings" change="Theme field added to settings object"/>
</affected-apis>
<affected-schemas>
<schema model="User" change="No schema change - uses existing JSONB settings"/>
</affected-schemas>
<breaking-changes>none</breaking-changes>
<new-dependencies>
<dependency name="@radix-ui/react-switch" version="^1.0.0" purpose="Accessible toggle"/>
</new-dependencies>
<scope>small</scope>
<confidence>high</confidence>
<notes>
Theme preference will be stored in existing User.settings JSONB field.
No database migration required.
</notes>
</impact-analysis>
feature-remove)Focus on:
Focus on:
If change doesn't match any existing feature:
low/crd-investigate --depth deep| Situation | Action |
|---|---|
| PROJECT.md not found | Return error, suggest running /crd-context |
| No matching features | Note as new feature area, expand scope |
| Ambiguous matches | List all possibilities, note medium confidence |
| Missing context | Note gaps, proceed with available info |