Deep codebase research skill. Thoroughly reads and understands a target area of the codebase, then produces a detailed research.md artifact documenting all findings, patterns, dependencies, and edge cases before any planning or implementation begins.
A systematic skill for deeply understanding a target area of the codebase before any planning or implementation. Produces a persistent research.md artifact that serves as the verified foundation for all downstream work.
Never skim. Read deeply, understand fully, document everything.
Surface-level reading leads to implementations that work in isolation but break the surrounding system — functions that ignore existing caching layers, migrations that don't account for ORM conventions, endpoints that duplicate existing logic. This skill prevents all of that.
flowchart LR
T[Receive target area] --> R[Deep read all relevant files]
R --> U[Understand patterns & dependencies]
U --> D[Document findings in research.md]
D --> V[Self-verify completeness]
All research artifacts MUST be saved to doc/plans/ directory.
doc/plans/research.md — default output pathdoc/plans/research-<topic>.mdDetermine the scope of investigation:
Read every relevant file in the target area. For each file:
Key reading strategies:
Write a comprehensive research.md in doc/plans/ covering:
# Research: [Target Area]
## Overview
Brief summary of what the target area does and its role in the system.
## Architecture
- Module structure and organization
- Key abstractions and their relationships
- Data flow diagrams (text-based)
## Key Files & Components
For each significant file:
- **Purpose**: What it does
- **Key functions/classes**: Signature + behavior summary
- **Dependencies**: What it imports/uses
- **Consumers**: What depends on it
## Patterns & Conventions
- Naming conventions used
- Error handling approach
- State management patterns
- API design patterns
- Testing patterns
## Data Flow
Step-by-step trace of how data moves through the system for key operations.
## Dependencies
- Internal dependencies (other modules in this codebase)
- External dependencies (npm packages, APIs)
- Implicit dependencies (environment variables, config files)
## Edge Cases & Gotchas
- Known limitations
- Implicit assumptions in the code
- Potential race conditions or timing issues
- Error scenarios and how they're handled
## Potential Issues (if investigating bugs)
- Specific bugs found with file/line references
- Conditions that trigger the bugs
- Root cause analysis
- Suggested fixes (without implementing)
## Open Questions
Things that remain unclear after research, requiring clarification.
Before marking research complete:
Match your research depth to the language used:
| Signal Words | Research Depth |
|---|---|
| "look at", "check" | Standard read - understand the module |
| "understand", "study" | Deep read - trace all paths |
| "deeply", "in great detail", "intricacies" | Exhaustive - read every line, trace every dependency |
| "find all bugs", "don't stop until" | Investigative - actively look for issues, verify assumptions |
| Bad | Good |
|---|---|
| Reading only function signatures | Reading full function bodies |
| Listing files without describing them | Explaining what each file does and why |
| Ignoring test files | Reading tests to understand expected behavior |
| Missing error handling flows | Documenting all error paths |
| Stopping at the first layer | Tracing through 3+ layers of abstraction |
| Verbal summary in chat only | Persistent research.md document |
/research
Read the notification system in great detail. Understand deeply how notifications
are created, queued, sent, and tracked. Document all findings in research.md.
/research
Go through the task scheduling flow. Understand it deeply and look for potential bugs.
The system sometimes runs tasks that should have been cancelled. Keep researching until
you find all the bugs. Write a detailed report in research.md.
/research
Read the utils/i-state/ folder in depth. Understand how it works deeply, what it does
and all its specificities. Write a detailed report in research.md.
This skill is Phase 1 of the Boris Tane workflow:
Research (this skill) → Plan → Implement
The research.md output becomes the input context for the plan skill. Never skip research — a wrong plan built on wrong understanding wastes more time than thorough research ever costs.