Development Workflow: Slow is Fast
Core rule: Never modify code based on assumptions alone. Ground every decision in evidence.
Complexity Assessment
| Complexity |
Characteristics |
Workflow |
| Trivial |
Typo, formatting, <10 lines, single API |
Answer directly, quick grep for context |
| Moderate |
Non-trivial logic in single file, local refactoring |
Standard: all phases below |
| Complex |
Cross-module design, concurrency, new architecture |
Deep: use Explore agent, WebSearch, context7 |
Skip Conditions
Research can be minimal when:
- Pure formatting, typo, or rename fixes
- User explicitly provides the exact solution or says "just do it"
- Follow-up changes in same conversation where research was already done
- The change is within code you just wrote in this conversation
Phase 0: Reasoning Principles
Before any action, apply these internally (do not output unless requested).
Constraint Priority
Analyze in this order:
- Rules and Constraints — never violate for convenience
- Operation Order and Reversibility — ensure no step blocks subsequent steps
- Prerequisites and Missing Information — only ask when missing info significantly affects solution choice
- User Preferences — style, language (without violating higher priorities)
Risk Assessment
- Low-risk (searches, simple refactoring): Proceed with existing information
- High-risk (data modifications, API changes, history rewrites): State risks, provide safer alternatives
Abductive Reasoning
When encountering problems:
- Don't just treat symptoms — infer deeper causes
- Construct 1–3 hypotheses ordered by likelihood
- Verify most likely first; update when invalidated
Conflict Resolution Priority
- Readability and Maintainability
- Correctness and Safety
- Explicit business requirements
- Performance and resource usage
- Code length and local elegance
Phase 1: Research
Execute before entering Plan mode. Summarize findings before proposing any approach.
For moderate+ tasks, use Explore agent to run research in an isolated context.
1.1 Codebase Search
Understand what already exists. Do not reinvent or contradict existing patterns.
- Grep for related function names, types, patterns, error messages
- Glob for related files by naming convention
- Read key files to understand existing architecture and conventions
- For broad exploration, use Explore agent to parallelize searches
1.2 Documentation Lookup
Verify API behavior, library usage, and framework conventions against official sources.
- Use context7 (
resolve-library-id → query-docs) for libraries/frameworks involved
- Use WebSearch when context7 lacks coverage or for newer APIs
- Check changelogs/migration guides if version-specific behavior is involved
1.3 Solution Survey & Reuse Decision
Apply the reuse decision matrix (see references/research-patterns.md).
- Search for common pitfalls, edge cases, and known issues
- Identify trade-offs between candidate approaches
- Produce 1-3 candidate approaches with evidence-backed pros/cons
Phase 2: Plan Mode (Analysis / Alignment)
- Briefly restate: objective, key constraints, current state
- Analyze top-down, find root causes, not just patch symptoms
- Provide 1–3 feasible options, each including:
- Summary approach
- Impact scope (modules/interfaces involved)
- Pros and cons
- Potential risks
- Verification methods
- Only ask clarifying questions when missing info would block progress
- Avoid providing essentially identical plans
Exit Conditions
- User explicitly chooses an option, OR
- One option is clearly superior (explain reasoning, proactively choose)
Once conditions met → enter Code mode directly.
Phase 3: Code Mode (Execute Plan)
- Before providing code, briefly state which files/modules will be modified and why
- Prefer minimal, reviewable changes: local snippets/patches over complete files
- Indicate how to verify: tests/commands to run, new test cases if needed
- If major problems discovered → pause, switch back to Plan mode
Output Should Include
- What changes were made, where
- How to verify
- Known limitations or follow-up TODOs
Anti-Patterns
- Cargo-cult coding: Copying patterns without understanding why they exist
- Stale knowledge: Using remembered API behavior instead of checking current docs
- Premature implementation: Jumping to code after reading only one file
- Research theater: Searching but ignoring findings that contradict your initial idea
- Dependency bloat: Adding a library when a 5-line solution exists in the project
- NIH syndrome: Rewriting what already exists because you didn't search thoroughly
- Symptom patching: Fixing symptoms without investigating root causes
- Hasty conclusions: Providing answers before completing reasoning
See also: references/research-patterns.md for anti-rationalization table and reuse decision matrix.
1---2name: slow-is-fast3description: Research → Plan → Code workflow. Enforces evidence-based reasoning, codebase research, and structured planning before code modifications. Applied automatically for moderate+ tasks.4---56# Development Workflow: Slow is Fast78**Core rule**: Never modify code based on assumptions alone. Ground every decision in evidence.910## Complexity Assessment1112| Complexity | Characteristics | Workflow |13|---|---|---|14| **Trivial** | Typo, formatting, <10 lines, single API | Answer directly, quick grep for context |15| **Moderate** | Non-trivial logic in single file, local refactoring | Standard: all phases below |16| **Complex** | Cross-module design, concurrency, new architecture | Deep: use Explore agent, WebSearch, context7 |1718### Skip Conditions1920Research can be minimal when:21- Pure formatting, typo, or rename fixes22- User explicitly provides the exact solution or says "just do it"23- Follow-up changes in same conversation where research was already done24- The change is within code you just wrote in this conversation2526## Phase 0: Reasoning Principles2728Before any action, apply these internally (do not output unless requested).2930### Constraint Priority3132Analyze in this order:331. **Rules and Constraints** — never violate for convenience342. **Operation Order and Reversibility** — ensure no step blocks subsequent steps353. **Prerequisites and Missing Information** — only ask when missing info significantly affects solution choice364. **User Preferences** — style, language (without violating higher priorities)3738### Risk Assessment3940- **Low-risk** (searches, simple refactoring): Proceed with existing information41- **High-risk** (data modifications, API changes, history rewrites): State risks, provide safer alternatives4243### Abductive Reasoning4445When encountering problems:46- Don't just treat symptoms — infer deeper causes47- Construct 1–3 hypotheses ordered by likelihood48- Verify most likely first; update when invalidated4950### Conflict Resolution Priority51521. Readability and Maintainability532. Correctness and Safety543. Explicit business requirements554. Performance and resource usage565. Code length and local elegance5758## Phase 1: Research5960Execute **before** entering Plan mode. Summarize findings before proposing any approach.6162For moderate+ tasks, **use Explore agent** to run research in an isolated context.6364### 1.1 Codebase Search6566Understand what already exists. Do not reinvent or contradict existing patterns.6768- **Grep** for related function names, types, patterns, error messages69- **Glob** for related files by naming convention70- **Read** key files to understand existing architecture and conventions71- For broad exploration, use **Explore agent** to parallelize searches7273### 1.2 Documentation Lookup7475Verify API behavior, library usage, and framework conventions against official sources.7677- Use **context7** (`resolve-library-id` → `query-docs`) for libraries/frameworks involved78- Use **WebSearch** when context7 lacks coverage or for newer APIs79- Check changelogs/migration guides if version-specific behavior is involved8081### 1.3 Solution Survey & Reuse Decision8283Apply the **reuse decision matrix** (see `references/research-patterns.md`).8485- Search for common pitfalls, edge cases, and known issues86- Identify trade-offs between candidate approaches87- Produce 1-3 candidate approaches with evidence-backed pros/cons8889## Phase 2: Plan Mode (Analysis / Alignment)90911. Briefly restate: objective, key constraints, current state922. Analyze top-down, find root causes, not just patch symptoms933. Provide **1–3 feasible options**, each including:94 - Summary approach95 - Impact scope (modules/interfaces involved)96 - Pros and cons97 - Potential risks98 - Verification methods994. Only ask clarifying questions when missing info would block progress1005. Avoid providing essentially identical plans101102### Exit Conditions103104- User explicitly chooses an option, OR105- One option is clearly superior (explain reasoning, proactively choose)106107Once conditions met → enter Code mode directly.108109## Phase 3: Code Mode (Execute Plan)1101111. Before providing code, briefly state which files/modules will be modified and why1122. Prefer **minimal, reviewable changes**: local snippets/patches over complete files1133. Indicate how to verify: tests/commands to run, new test cases if needed1144. If major problems discovered → pause, switch back to Plan mode115116### Output Should Include117118- What changes were made, where119- How to verify120- Known limitations or follow-up TODOs121122## Anti-Patterns123124- **Cargo-cult coding**: Copying patterns without understanding why they exist125- **Stale knowledge**: Using remembered API behavior instead of checking current docs126- **Premature implementation**: Jumping to code after reading only one file127- **Research theater**: Searching but ignoring findings that contradict your initial idea128- **Dependency bloat**: Adding a library when a 5-line solution exists in the project129- **NIH syndrome**: Rewriting what already exists because you didn't search thoroughly130- **Symptom patching**: Fixing symptoms without investigating root causes131- **Hasty conclusions**: Providing answers before completing reasoning132133See also: `references/research-patterns.md` for anti-rationalization table and reuse decision matrix.