Skip to content
feature-investigation logo

Feature Investigation

feature-investigation

Investigate and explain how existing features/logic work. READ-ONLY exploration. Triggers: how does, explain, what is the logic, investigate, understand, where is, trace, walk through, show me how. NOT for: implementing (use feature-implementation), debugging (use debugging).

SKILL.md

Full skill instructions

Feature Investigation

READ-ONLY exploration skill for understanding existing features. No code changes.

Mode Selection

ModeUse WhenWorkflow
InteractiveUser available, exploratory questionReal-time collaboration, iterative tracing
AutonomousDeep analysis, complex cross-service tracingStructured 4-phase workflow with analysis artifact

Workflow

  1. Discovery - Search codebase for all files related to the feature/​question. Prioritize: Entities > Commands/​Queries > EventHandlers > Controllers > Consumers > Components.
  2. Knowledge Graph - Read and analyze each file. Document purpose, symbols, dependencies, data flow. Batch in groups of 10, update progress after each batch.
  3. Flow Mapping - Trace entry points through processing pipeline to exit points. Map data transformations, persistence, side effects, cross-service boundaries.
  4. Analysis - Extract business rules, validation logic, authorization, error handling. Document happy path and edge cases.
  5. Synthesis - Write executive summary answering the original question. Include key files, patterns used, and text-based flow diagrams.
  6. Present - Deliver findings using the structured output format. Offer deeper dives on subtopics.

⚠️ MUST READ Before Investigation

IMPORTANT: You MUST read these files before starting. Do NOT skip.

  • ⚠️ MUST READ .claude/​skills/​shared/​anti-hallucination-protocol.md — Assumption validation, evidence chains, context anchoring
  • ⚠️ MUST READ .claude/​skills/​shared/​knowledge-graph-template.md — Per-file analysis structure

If preceded by /​scout: Use Scout's numbered file list as analysis targets. Skip redundant discovery. Prioritize HIGH PRIORITY files first.

Investigation Techniques

Discovery Search Patterns

File Discovery by Feature Name
.*EventHandler.*{FeatureName}|{FeatureName}.*EventHandler
.*BackgroundJob.*{FeatureName}|{FeatureName}.*BackgroundJob
.*Consumer.*{FeatureName}|{FeatureName}.*Consumer
.*Service.*{FeatureName}|{FeatureName}.*Service
.*Component.*{FeatureName}|{FeatureName}.*Component
Priority Order for Analysis
  1. Domain Entities - Core business objects
  2. Commands/​Queries - CQRS entry points (UseCaseCommands/, UseCaseQueries/)
  3. Event Handlers - Side effects (UseCaseEvents/, *EventHandler.cs)
  4. Controllers - API endpoints (Controllers/, *Controller.cs)
  5. Consumers - Cross-service (*Consumer.cs, *BusMessage.cs)
  6. Background Jobs - Scheduled processing (*BackgroundJob*.cs, *Job.cs)
  7. Components/​Stores - Frontend (*.component.ts, *.store.ts)
  8. Services/​Helpers - Supporting logic (*Service.cs, *Helper.cs)

Dependency Tracing

Backend (C#)
Looking forSearch pattern
Who calls this methodGrep method name across *.cs
Who injects this serviceGrep interface name in constructors
What events this entity raisesGrep PlatformCqrsEntityEvent<EntityName>
Cross-service consumersGrep *BusMessage type across all services
Repository usageGrep IRepository<EntityName> or IPlatformQueryableRootRepository<EntityName
Frontend (TypeScript)
Looking forSearch pattern
Who uses this componentGrep selector app-component-name in *.html
Who imports this serviceGrep service class name in *.ts
Store effects chainTrace effectSimple -> API call -> tapResponse -> state update
Route entryGrep component name in *routing*.ts

Data Flow Mapping

Document flow as text diagram:

[Entry Point] --> [Step 1: Validation] --> [Step 2: Processing] --> [Step 3: Persistence]
                                                  |
                                                  v
                                          [Side Effect: Event]
Flow Documentation Checklist
  1. Entry Points - API endpoint, UI action, scheduled job, message bus
  2. Processing Pipeline - Step-by-step through handlers
  3. Data Transformations - How data changes at each step
  4. Persistence Points - Where data is saved/​loaded
  5. Exit Points - Responses, events, side effects
  6. Cross-Service Flows - Message bus boundaries

Common Investigation Scenarios

"How does feature X work?"
  1. Find entry points (API, UI, job)
  2. Trace through command/​query handlers
  3. Document entity changes
  4. Map side effects (events, notifications)
"Where is the logic for Y?"
  1. Search keywords in commands, queries, entities
  2. Check event handlers for side effect logic
  3. Look in helper/​service classes
  4. Check frontend stores and components
"What happens when Z occurs?"
  1. Identify trigger (user action, event, schedule)
  2. Trace the handler chain
  3. Document all side effects
  4. Map error handling
"Why does A behave like B?"
  1. Find the relevant code path
  2. Identify decision points
  3. Check configuration/​feature flags
  4. Document business rules

Platform Pattern Recognition

Backend Patterns
  • PlatformCqrsCommand / PlatformCqrsQuery - CQRS entry points
  • PlatformCqrsEntityEventApplicationHandler - Side effects
  • PlatformApplicationMessageBusConsumer - Cross-service consumers
  • IPlatformQueryableRootRepository - Data access
  • PlatformValidationResult - Validation logic
  • [PlatformAuthorize] - Authorization
Frontend Patterns
  • AppBaseVmStoreComponent - State management components
  • PlatformVmStore - Store implementations
  • effectSimple / tapResponse - Effect handling
  • observerLoadingErrorState - Loading/​error states
  • API services extending PlatformApiService

Evidence Collection

Analysis File Setup

Autonomous mode writes analysis to .ai/​workspace/​analysis/[feature-name]-investigation.md with:

## Metadata
> Original question: [user's exact question]

## Investigation Question
[Clearly stated investigation goal]

## Progress
- **Phase**: 1
- **Items Processed**: 0 / [total]
- **Current Focus**: [original question]

## File List
[All discovered files, grouped by priority]

## Knowledge Graph
[Per-file analysis entries - see template below]

## Data Flow
[Flow diagrams and pipeline documentation]

## Findings
[Populated in Phase 2+]

Per-File Analysis Entry

For each file, document in ## Knowledge Graph:

Core Fields
  • filePath: Full path
  • type: Component classification (Entity, Command, Handler, Controller, Component, Store, etc.)
  • architecturalPattern: Design pattern used
  • content: Purpose and logic summary
  • symbols: Key classes, interfaces, methods
  • dependencies: Imports/​injections
  • relevanceScore: 1-10 (to investigation question)
  • evidenceLevel: "verified" or "inferred"
Investigation-Specific Fields
  • entryPoints: How this code is triggered/​called
  • outputPoints: What this code produces/​returns
  • dataTransformations: How data is modified
  • conditionalLogic: Key decision points and branches
  • errorScenarios: What can go wrong, error handling
  • externalDependencies: External services, APIs, databases
Cross-Service Fields (if applicable)
  • messageBusMessage: Message type consumed/​produced
  • messageBusProducers: Who sends this message
  • crossServiceIntegration: Cross-service data flow

Rule: After every 10 files, update progress and re-check alignment with original question.

Structured Findings Format

Phase 2: Comprehensive Analysis
Workflow Analysis
  1. Happy Path - Normal successful execution flow
  2. Error Paths - How errors are handled at each stage
  3. Edge Cases - Special conditions
  4. Authorization - Permission checks
  5. Validation - Input validation at each layer
Business Logic Extraction
  1. Core Business Rules - What rules govern this feature
  2. State Transitions - Entity state changes
  3. Side Effects - Notifications, events, external calls
Phase 3: Synthesis
Executive Summary
  • One-paragraph answer to user's question
  • Top 5-10 key files
  • Key patterns used
Detailed Explanation
  • Step-by-step walkthrough with file:line references
  • Architectural decisions explained
Diagrams
+-----------+     +-----------+     +-----------+
| Component |---->|  Command  |---->|  Handler  |
+-----------+     +-----------+     +-----------+
                                          |
                                          v
                                    +-----------+
                                    |Repository |
                                    +-----------+

Output Format

## Answer
[Direct answer in 1-2 paragraphs]

## How It Works
### 1. [Step] - [Explanation with `file:line` reference]
### 2. [Step] - [Explanation with `file:line` reference]

## Key Files
| File | Purpose |
| ---- | ------- |

## Data Flow
[Text diagram: Entry -> Processing -> Persistence -> Side Effects]

## Want to Know More?
- [Subtopic 1]
- [Subtopic 2]

Guidelines

  • Evidence-based: Every claim needs code evidence. Mark unverified claims as "inferred".
  • Question-focused: Tie all findings back to the original question.
  • Read-only: Never suggest changes unless explicitly asked.
  • Layered explanation: Start simple, offer deeper detail on request.

Related Skills

  • feature-implementation - Implementing new features (code changes)
  • debugging - Debugging and fixing issues
  • scout - Quick codebase discovery (run before investigation)

IMPORTANT Task Planning Notes

  • Always plan and break many small todo tasks
  • Always add a final review todo task to review the works done at the end to find any fix or enhancement needed

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

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...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

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...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

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.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View