kimchi:research
This command should be used to investigate codebase patterns, frameworks, and existing implementations before planning. Third stage of the Kimchi planning pipeline. Produces .kimchi/RESEARCH.md.
Best use case
kimchi:research is best used when you need a repeatable AI agent workflow instead of a one-off prompt.
This command should be used to investigate codebase patterns, frameworks, and existing implementations before planning. Third stage of the Kimchi planning pipeline. Produces .kimchi/RESEARCH.md.
Teams using kimchi:research should expect a more consistent output, faster repeated execution, less prompt rewriting.
When to use this skill
- You want a reusable workflow that can be run more than once with consistent structure.
When not to use this skill
- You only need a quick one-off answer and do not need a reusable workflow.
- You cannot install or maintain the underlying files, dependencies, or repository context.
Installation
Claude Code / Cursor / Codex
Manual Installation
- Download SKILL.md from GitHub
- Place it in
.claude/skills/research/SKILL.mdinside your project - Restart your AI agent — it will auto-discover the skill
How kimchi:research Compares
| Feature / Agent | kimchi:research | Standard Approach |
|---|---|---|
| Platform Support | Not specified | Limited / Varies |
| Context Awareness | High | Baseline |
| Installation Complexity | Unknown | N/A |
Frequently Asked Questions
What does this skill do?
This command should be used to investigate codebase patterns, frameworks, and existing implementations before planning. Third stage of the Kimchi planning pipeline. Produces .kimchi/RESEARCH.md.
Where can I find the source code?
You can find the source code on GitHub using the link provided at the top of the page.
SKILL.md Source
# Kimchi Research
<command_purpose>
Investigate the codebase for existing patterns, similar features, framework conventions, and anti-patterns. All code references use `find:` landmarks (semantic identifiers), never line numbers.
</command_purpose>
## The Iron Law
```
RESEARCH REQUIRES REQUIREMENTS.MD FIRST
```
If REQUIREMENTS.md doesn't exist, stop and tell user to run `/kimchi:requirements` first.
Research is NOT requirements extraction. Research investigates actual code.
## Prerequisites Check (MANDATORY)
Before starting research, verify prerequisites exist:
```bash
ls .kimchi/CONTEXT.md
ls .kimchi/REQUIREMENTS.md
```
If either missing, output:
```
Missing prerequisites:
- CONTEXT.md: [exists/missing]
- REQUIREMENTS.md: [exists/missing]
Run missing stages first:
- Missing CONTEXT.md? Run /kimchi:clarify
- Missing REQUIREMENTS.md? Run /kimchi:requirements
```
**STOP.** Do not proceed.
## Input
Read `.kimchi/CONTEXT.md` and `.kimchi/REQUIREMENTS.md`.
## Process
### 1. Detect Project Stack
Search for package manager files to determine language/framework:
- `Gemfile` / `Gemfile.lock` → Ruby/Rails
- `package.json` → Node/JavaScript/TypeScript
- `requirements.txt` / `pyproject.toml` → Python
- `go.mod` → Go
- `Cargo.toml` → Rust
- `pom.xml` / `build.gradle` → Java
Detect test framework:
- `spec/` directory + `Gemfile` with rspec → RSpec
- `test/` directory + Rails → Minitest
- `jest.config.*` or `vitest.config.*` → Jest/Vitest
- `pytest.ini` / `conftest.py` → Pytest
### 2. Search for Similar Patterns
For each v1 requirement, search the codebase for similar implementations:
```
For each requirement:
1. Identify keywords (e.g., "upload", "avatar", "resize")
2. Glob for files matching: **/*{keyword}*
3. Grep for class/method definitions related to the feature
4. When found, document with find: landmarks
```
### 3. Extract Patterns with Landmarks
For each discovered pattern, document using `find:` strategies:
| Strategy | Use When | Example |
|----------|----------|---------|
| Class definition | Referencing a class | `find: "class UserService"` |
| Method definition | Referencing a method | `find: "def upload"` |
| Module definition | Referencing a module | `find: "module Authentication"` |
| Constant | Referencing a constant | `find: "AVATAR_SIZES ="` |
| Error handling | Showing error pattern | `find: "rescue Aws::"` |
| Config block | Referencing config | `find: "Aws.config.update"` |
| Unique string | Config values, env vars | `find: "AWS_S3_BUCKET"` |
**NEVER use line numbers.** Always use `find:` with a string unique enough to locate the code.
### 4. Document Anti-Patterns
If you find code that violates framework conventions or has obvious issues, document it as an anti-pattern to avoid.
### 5. Framework Research (if needed)
If codebase has few patterns (new project), research framework best practices:
- Use WebSearch for framework documentation
- Use Context7 MCP tools for library-specific docs
- Document recommended approaches
### 6. Write RESEARCH.md
Write to `.kimchi/RESEARCH.md`:
```markdown
# Research: [Feature Name]
**Researched:** [today's date]
**Stack:** [Language] / [Framework] / [Test Framework]
## Codebase Patterns
### [Pattern Category 1]
[Description of what was found]
**Reference Implementation:**
- Service: `[file path]`
- find: "[search term]"
- scope: "[entire class|entire method|etc]"
- Pattern: [What pattern this demonstrates]
- Controller: `[file path]`
- find: "[search term]"
- Pattern: [What pattern this demonstrates]
- Tests: `[file path]`
- find: "[search term]"
- Pattern: [What pattern this demonstrates]
### [Pattern Category 2]
[...]
## Framework Recommendations
### [Topic]
[Recommended approach based on framework conventions]
```[language]
# Recommended approach
[code example]
```
## Anti-Patterns to Avoid
- [Description of what NOT to do and why]
## Test Patterns
- Test framework: [name]
- Test directory: [path]
- Run command: [command]
- Mock patterns: [description with find: reference if applicable]
## No Patterns Found
[If nothing relevant was found in the codebase, state that clearly.
"No existing patterns found for [feature area]. Implementation will follow [framework] conventions."]
```
Report: "Research complete. Saved to .kimchi/RESEARCH.md"
Suggest: "Run `/kimchi:generate` to create the implementation plan."
## Red Flags — STOP and Check Prerequisites
- REQUIREMENTS.md doesn't exist (skipped requirements stage)
- You're extracting requirements (that's previous stage)
- You're writing acceptance criteria (that's requirements)
- You're categorizing into v1/v2 (that's requirements)
**Action if detected:** Stop. Tell user to run missing prerequisite stage first.
## Verification Checklist
Before completing research stage:
- [ ] CONTEXT.md exists (read it)
- [ ] REQUIREMENTS.md exists (read it)
- [ ] Searched codebase with Glob/Grep
- [ ] Documented patterns with find: landmarks
- [ ] Created RESEARCH.md
- [ ] Did NOT modify REQUIREMENTS.md
- [ ] Did NOT extract new requirements
## Key Principles
- **Landmarks, not coordinates**: `find: "class S3Client"` not `lines: "12-34"`
- **Research is not optional**: Plans that ignore existing patterns fight the codebase
- **Anti-patterns matter**: Knowing what NOT to do is as valuable as knowing what TO do
- **Empty is OK**: New projects won't have patterns. Document that and move on.Related Skills
kimchi:verification-before-completion
Use when about to claim work is complete, fixed, or passing — before committing or creating PRs. Evidence before assertions, always.
kimchi:validate
This command should be used to validate bead YAML files for standalone executability. Runs 4 validators (context completeness, deliverables clarity, test specification, isolation) and enriches failing beads. Eighth stage of the Kimchi planning pipeline.
kimchi:tdd
Use when implementing any feature, bugfix, or behavior change — before writing implementation code. Enforces RED-GREEN-REFACTOR cycle.
kimchi:systematic-debugging
Use when encountering any bug, test failure, or unexpected behavior — before proposing fixes. Enforces 4-phase root cause analysis.
kimchi:status
This command should be used to check the current state of the Kimchi planning pipeline, including which stages have completed, what artifacts exist, and bead validation status.
kimchi:simplicity-enforcement
Use when designing solutions, implementing features, or considering abstractions. Enforces YAGNI, minimal code, and preferring duplication over wrong abstraction.
kimchi:review
This command should be used to run multi-persona review of the implementation plan. Five specialized personas critique the plan for scope creep, complexity, premature optimization, and test coverage. Fifth stage of the Kimchi planning pipeline. Produces .kimchi/PLAN-REVIEWED.md.
kimchi:reset
This command should be used to clear the Kimchi working directory (.kimchi/) and start fresh. Preserves .beads/ directory. Use when starting a new planning session or recovering from a bad state.
kimchi:requirements
This command should be used to extract and categorize requirements from CONTEXT.md into v1 (must have), v2 (next iteration), and out of scope. Second stage of the Kimchi planning pipeline. Produces .kimchi/REQUIREMENTS.md.
kimchi:refine
This command should be used to iteratively improve the plan until quality threshold is reached or diminishing returns detected. Sixth stage of the Kimchi planning pipeline. Produces .kimchi/PLAN-DRAFT.md.
kimchi:plan
This command should be used to run the Kimchi planning pipeline through refinement, transforming a vague idea into a draft plan ready for cross-model analysis. Orchestrates 6 stages: clarify, requirements, research, generate, review, refine. Use --full-auto to also run beads + validate after manual revise/synthesize.
kimchi:plan-synthesize
This command should be used to synthesize multiple cross-model plan revisions into a superior hybrid plan. Eighth stage of the Kimchi planning pipeline. Reads PLAN-REVISED-*.md files and outputs PLAN-SYNTHESIZED.md — the TRUE final plan.