원클릭으로
crd-investigate
Deep codebase investigation to generate PROJECT.md context. Analyzes architecture, patterns, features, APIs, and schemas.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Deep codebase investigation to generate PROJECT.md context. Analyzes architecture, patterns, features, APIs, and schemas.
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.
Analyze the impact of a proposed change on an existing codebase. Identifies affected files, features, and potential breaking changes.
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-investigate |
| description | Deep codebase investigation to generate PROJECT.md context. Analyzes architecture, patterns, features, APIs, and schemas. |
| context | fork |
| agent | crd-investigator |
| allowed-tools | Read Glob Grep Bash |
| model | claude-sonnet-4-5 |
You perform deep analysis of an existing codebase to generate comprehensive PROJECT.md context.
| Argument | Required | Description |
|---|---|---|
--project <path> | Yes | Path to project root |
--depth <level> | No | Investigation depth: quick, medium (default), deep |
# Get current git hash for context tracking
git -C {project_path} rev-parse HEAD
# List top-level structure
ls -la {project_path}
# Get directory tree (excluding common ignores)
find {project_path} -type d \
-not -path '*/\.*' \
-not -path '*/node_modules/*' \
-not -path '*/venv/*' \
-not -path '*/.venv/*' \
-not -path '*/__pycache__/*' \
-not -path '*/dist/*' \
-not -path '*/build/*' \
| head -100
Check for package/config files:
# Check multiple patterns
ls {project_path}/pyproject.toml {project_path}/requirements.txt {project_path}/setup.py 2>/dev/null
ls {project_path}/package.json {project_path}/tsconfig.json 2>/dev/null
ls {project_path}/go.mod {project_path}/Cargo.toml 2>/dev/null
Read package files to extract:
Based on detected framework, look for features:
FastAPI/Python:
grep -r "@router\." {project_path}/src --include="*.py" -l
grep -r "@app\." {project_path}/src --include="*.py" -l
Express/Node:
grep -r "router\." {project_path}/src --include="*.ts" --include="*.js" -l
React:
find {project_path}/src -name "*.tsx" -path "*/components/*" -o -name "*.tsx" -path "*/pages/*"
FastAPI:
# Look for patterns like:
@router.get("/users")
@router.post("/auth/login")
Read files and extract:
Express/TanStack:
// Look for patterns like:
router.get('/users', handler)
app.post('/auth/login', handler)
SQLAlchemy:
# Look for class definitions inheriting from Base
class User(Base):
__tablename__ = "users"
Drizzle:
// Look for table definitions
export const users = pgTable('users', {...})
Extract:
Identify common patterns:
Create PROJECT.md at {project_path}/PROJECT.md:
# Project: {detected name}
## Overview
{Inferred from README.md or code structure}
## Architecture
### Tech Stack
{Detected stack}
### Component Structure
{Directory tree with annotations}
### Key Patterns
{Detected patterns}
## Context Metadata
<project-context version="1.0">
<meta>
<last-updated>{now}</last-updated>
<last-context-hash>{git hash}</last-context-hash>
</meta>
<features>
{Discovered features}
</features>
<api-registry>
{Extracted endpoints}
</api-registry>
<schema-registry>
{Extracted models}
</schema-registry>
</project-context>
mkdir -p {project_path}/docs/crd
After completion, report:
Investigation complete.
PROJECT.md generated at: {project_path}/PROJECT.md
Summary:
- Tech Stack: {stack}
- Features: {count} identified
- API Endpoints: {count} documented
- Database Models: {count} cataloged
- Context Hash: {hash}
docs/crd/ directory created for future CRDs.
| Situation | Action |
|---|---|
| Empty project | Create minimal PROJECT.md |
| No recognizable framework | Document structure only |
| Binary files | Skip, note in overview |
| Permission errors | Report and continue with accessible files |
| Very large codebase | Limit scope, note truncation |