devflow-kit 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -1
- package/README.md +148 -86
- package/dist/commands/init.js +2 -2
- package/dist/commands/init.js.map +1 -1
- package/package.json +3 -3
- package/src/claude/agents/devflow/research.md +590 -0
- package/src/claude/commands/devflow/research.md +51 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,36 @@ All notable changes to DevFlow will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.1.2] - 2025-10-05
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `/research [topic]` - Comprehensive pre-implementation research and planning command
|
|
12
|
+
- `research` sub-agent - Specialized agent for systematic implementation research with 10-step workflow
|
|
13
|
+
- Analyzes multiple implementation approaches with pros/cons/trade-offs
|
|
14
|
+
- Studies official documentation and code examples
|
|
15
|
+
- Reviews existing codebase patterns and conventions
|
|
16
|
+
- Designs integration strategy with specific file paths
|
|
17
|
+
- Identifies risks and creates actionable implementation plans
|
|
18
|
+
- Saves research reports to `.docs/research/`
|
|
19
|
+
|
|
20
|
+
### Documentation
|
|
21
|
+
- Updated README.md with `/research` command in workflow examples
|
|
22
|
+
- Added research sub-agent to sub-agents table
|
|
23
|
+
|
|
24
|
+
## [0.1.1] - 2025-10-03
|
|
25
|
+
|
|
26
|
+
### Changed
|
|
27
|
+
- **Simplified Installation**: Single command installation using `npx devflow-kit init` (no global install needed)
|
|
28
|
+
- **Improved Documentation**: Commands and sub-agents now displayed in easy-to-scan tables
|
|
29
|
+
- **Better Organization**: Separated user documentation (README.md) from developer guide (CLAUDE.md)
|
|
30
|
+
- **Reduced Duplication**: Eliminated redundant information throughout README
|
|
31
|
+
|
|
32
|
+
### Documentation
|
|
33
|
+
- Reorganized README.md with table-based layout for commands and sub-agents
|
|
34
|
+
- Moved developer/AI agent instructions to CLAUDE.md
|
|
35
|
+
- Updated installation to promote npx usage over global install
|
|
36
|
+
- Reduced README from 289 lines to 204 lines while preserving all information
|
|
37
|
+
|
|
8
38
|
## [0.1.0] - 2024-10-03
|
|
9
39
|
|
|
10
40
|
### 🎉 Initial Release
|
|
@@ -55,10 +85,12 @@ devflow init
|
|
|
55
85
|
```
|
|
56
86
|
|
|
57
87
|
### Documentation
|
|
58
|
-
- Comprehensive guide in
|
|
88
|
+
- Comprehensive guide in README.md
|
|
59
89
|
- Quick reference in README.md
|
|
60
90
|
- Self-documenting commands
|
|
61
91
|
|
|
62
92
|
---
|
|
63
93
|
|
|
94
|
+
[0.1.2]: https://github.com/dean0x/devflow/releases/tag/v0.1.2
|
|
95
|
+
[0.1.1]: https://github.com/dean0x/devflow/releases/tag/v0.1.1
|
|
64
96
|
[0.1.0]: https://github.com/dean0x/devflow/releases/tag/v0.1.0
|
package/README.md
CHANGED
|
@@ -2,124 +2,158 @@
|
|
|
2
2
|
|
|
3
3
|
A comprehensive collection of Claude Code commands and configurations designed to enhance developer workflows when working with AI coding assistants.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Installation
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
|
-
#
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
# 2. Build the CLI
|
|
12
|
-
npm run build
|
|
13
|
-
|
|
14
|
-
# 3. Install DevFlow for Claude Code
|
|
15
|
-
node dist/cli.js init
|
|
16
|
-
|
|
17
|
-
# Or install globally
|
|
18
|
-
npm install -g .
|
|
19
|
-
devflow init
|
|
8
|
+
# Run with npx (recommended - no global install needed)
|
|
9
|
+
npx devflow-kit init
|
|
20
10
|
```
|
|
21
11
|
|
|
12
|
+
That's it! DevFlow is now installed and ready to use in Claude Code.
|
|
13
|
+
|
|
22
14
|
## What's Included
|
|
23
15
|
|
|
24
16
|
### 📊 Slash Commands
|
|
25
17
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
**Development Tools:**
|
|
37
|
-
- `/debug [issue]` - Systematic debugging with issue-specific investigation
|
|
18
|
+
| Command | Purpose | When to Use |
|
|
19
|
+
|---------|---------|-------------|
|
|
20
|
+
| `/catch-up` | Smart summaries for starting new sessions with status validation | Starting a session |
|
|
21
|
+
| `/research [topic]` | Comprehensive pre-implementation research and planning | Before implementing features |
|
|
22
|
+
| `/devlog` | Development log for comprehensive session documentation | Ending a session |
|
|
23
|
+
| `/plan-next-steps` | Extract actionable next steps from current discussion | After planning discussion |
|
|
24
|
+
| `/debug [issue]` | Systematic debugging with issue-specific investigation | When troubleshooting |
|
|
25
|
+
| `/pre-commit` | Review uncommitted changes using specialized sub-agents | Before committing |
|
|
26
|
+
| `/commit` | Intelligent atomic commit creation with safety checks | When ready to commit |
|
|
27
|
+
| `/pre-pr` | Comprehensive branch review for PR readiness | Before creating PR |
|
|
38
28
|
|
|
39
29
|
### 🤖 Sub-Agents
|
|
40
30
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
31
|
+
| Sub-Agent | Specialty | Purpose |
|
|
32
|
+
|-----------|-----------|---------|
|
|
33
|
+
| `audit-security` | Security Analysis | Expert vulnerability detection and security code review |
|
|
34
|
+
| `audit-performance` | Performance | Optimization and bottleneck detection |
|
|
35
|
+
| `audit-architecture` | Architecture | Design pattern analysis and code structure review |
|
|
36
|
+
| `audit-tests` | Testing | Test quality, coverage, and effectiveness analysis |
|
|
37
|
+
| `audit-dependencies` | Dependencies | Dependency management and security analysis |
|
|
38
|
+
| `audit-complexity` | Complexity | Code complexity and maintainability assessment |
|
|
39
|
+
| `audit-database` | Database | Database design and optimization review |
|
|
40
|
+
| `catch-up` | Context Restoration | Project status and context restoration with validation |
|
|
41
|
+
| `commit` | Git Operations | Intelligent commit creation with safety checks |
|
|
42
|
+
| `research` | Implementation Planning | Pre-implementation research, approach analysis, and planning |
|
|
43
|
+
|
|
44
|
+
**How Sub-Agents Work:**
|
|
45
|
+
- Specialized AI assistants with deep expertise in specific domains
|
|
46
|
+
- Separate context windows for focused analysis
|
|
47
|
+
- Can be invoked explicitly or automatically by orchestrator commands
|
|
48
|
+
- Restricted tool access appropriate to their domain
|
|
49
|
+
|
|
50
|
+
**Invoking Sub-Agents:**
|
|
51
|
+
```bash
|
|
52
|
+
# Explicit invocation
|
|
53
|
+
"Use the audit-security sub-agent to analyze this authentication code"
|
|
49
54
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
55
|
+
# Automatic delegation (Claude Code decides which sub-agent to use)
|
|
56
|
+
"Review this code for security issues"
|
|
57
|
+
```
|
|
53
58
|
|
|
54
59
|
### 📊 Smart Statusline
|
|
60
|
+
|
|
55
61
|
Real-time project context display showing:
|
|
56
62
|
- Current model and session duration
|
|
57
63
|
- Git branch and uncommitted changes indicator
|
|
58
64
|
- Session cost tracking
|
|
59
65
|
- Project context
|
|
66
|
+
- Zero configuration - works immediately after installation
|
|
60
67
|
|
|
61
68
|
### 🔒 Security & Token Optimization
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
69
|
+
|
|
70
|
+
DevFlow automatically creates a comprehensive `.claudeignore` file at your git repository root to:
|
|
71
|
+
|
|
72
|
+
**Protect Sensitive Data:**
|
|
73
|
+
- Environment files (`.env`, `.env.*`, `.envrc`)
|
|
74
|
+
- Credentials & keys (`*.key`, `*.pem`, SSH keys)
|
|
75
|
+
- Cloud configs (`.aws/`, `.gcp/`, `.azure/`)
|
|
76
|
+
- Package tokens (`.npmrc`, `.pypirc`)
|
|
77
|
+
- Database files (`*.sql`, `*.db`)
|
|
78
|
+
|
|
79
|
+
**Optimize Token Usage:**
|
|
80
|
+
- Dependencies (`node_modules/`, `vendor/`, `venv/`)
|
|
81
|
+
- Build artifacts (`dist/`, `build/`, `.next/`)
|
|
82
|
+
- IDE files (`.vscode/`, `.idea/`)
|
|
83
|
+
- Lock files (`package-lock.json`, `yarn.lock`)
|
|
84
|
+
- Media and binaries
|
|
85
|
+
|
|
86
|
+
Covers patterns for all major languages and operating systems.
|
|
87
|
+
|
|
88
|
+
## Development Workflow
|
|
89
|
+
|
|
90
|
+
### Starting a Session
|
|
91
|
+
1. `/catch-up` - Review what was done previously
|
|
92
|
+
2. Check statusline for current model, git state, duration
|
|
93
|
+
3. Review recommended next actions
|
|
94
|
+
|
|
95
|
+
### During Development
|
|
96
|
+
1. `/research [topic]` - Research implementation approaches before coding
|
|
97
|
+
2. `/pre-commit` - Review changes before committing
|
|
98
|
+
3. `/commit` - Create intelligent atomic commits
|
|
99
|
+
4. Invoke audit sub-agents as needed
|
|
100
|
+
|
|
101
|
+
### Ending a Session
|
|
102
|
+
1. `/devlog` - Document decisions and state
|
|
103
|
+
2. `/pre-pr` - Review branch before creating PR
|
|
104
|
+
3. `/commit` - Final commits with validation
|
|
105
|
+
|
|
106
|
+
### When Things Go Wrong
|
|
107
|
+
1. Check git log and recent commits
|
|
108
|
+
2. `/debug [issue description]` - Structured debugging
|
|
109
|
+
3. Revert changes using git
|
|
110
|
+
4. Document lessons learned
|
|
66
111
|
|
|
67
112
|
## CLI Commands
|
|
68
113
|
|
|
69
|
-
|
|
70
|
-
|
|
114
|
+
| Command | Purpose | Options |
|
|
115
|
+
|---------|---------|---------|
|
|
116
|
+
| `devflow init` | Initialize DevFlow for Claude Code | `--skip-docs` - Skip creating `.docs/` structure |
|
|
117
|
+
| `devflow uninstall` | Remove DevFlow from Claude Code | `--keep-docs` - Keep `.docs/` directory |
|
|
71
118
|
|
|
72
|
-
**What
|
|
119
|
+
**What `devflow init` does:**
|
|
73
120
|
- Installs commands to `~/.claude/commands/devflow/`
|
|
74
121
|
- Installs sub-agents to `~/.claude/agents/devflow/`
|
|
75
122
|
- Installs scripts to `~/.devflow/scripts/`
|
|
76
|
-
-
|
|
77
|
-
- Creates `.claudeignore` at git repository root
|
|
123
|
+
- Updates `~/.claude/settings.json` (statusline and model)
|
|
124
|
+
- Creates `.claudeignore` at git repository root
|
|
78
125
|
- Creates `.docs/` structure for project documentation
|
|
79
126
|
|
|
80
|
-
**
|
|
81
|
-
- `--skip-docs` - Skip creating `.docs/` structure
|
|
82
|
-
|
|
83
|
-
**Example:**
|
|
127
|
+
**First Run:**
|
|
84
128
|
```bash
|
|
85
|
-
# Standard installation
|
|
86
129
|
devflow init
|
|
87
|
-
|
|
88
|
-
#
|
|
89
|
-
devflow init --skip-docs
|
|
130
|
+
/devlog # Document your current project state
|
|
131
|
+
/catch-up # Get oriented with the project
|
|
90
132
|
```
|
|
91
133
|
|
|
92
|
-
##
|
|
134
|
+
## Advanced Usage
|
|
93
135
|
|
|
136
|
+
### Custom Audit Rules
|
|
137
|
+
```bash
|
|
138
|
+
# Extend sub-agents for project-specific patterns
|
|
139
|
+
echo "Check for exposed API keys in config files" >> ~/.claude/agents/devflow/audit-security.md
|
|
94
140
|
```
|
|
95
|
-
devflow/
|
|
96
|
-
├── src/ # All source files
|
|
97
|
-
│ ├── cli/ # CLI source code
|
|
98
|
-
│ │ ├── commands/ # CLI command implementations
|
|
99
|
-
│ │ └── cli.ts # CLI entry point
|
|
100
|
-
│ └── claude/ # Claude Code configuration
|
|
101
|
-
│ ├── agents/ # AI sub-agents
|
|
102
|
-
│ ├── commands/ # Slash command definitions
|
|
103
|
-
│ ├── scripts/ # DevFlow scripts
|
|
104
|
-
│ └── settings.json # Claude Code settings
|
|
105
|
-
├── package.json # Node.js package
|
|
106
|
-
└── tsconfig.json # TypeScript config
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
## Development
|
|
110
141
|
|
|
142
|
+
### Team Usage
|
|
111
143
|
```bash
|
|
112
|
-
#
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
# Watch mode for development
|
|
119
|
-
npm run dev
|
|
144
|
+
# Share session documentation with team
|
|
145
|
+
/devlog
|
|
146
|
+
git add .docs/status/
|
|
147
|
+
git commit -m "Session status: completed user auth feature"
|
|
148
|
+
```
|
|
120
149
|
|
|
121
|
-
|
|
122
|
-
|
|
150
|
+
### Integration Examples
|
|
151
|
+
```bash
|
|
152
|
+
/research "add JWT authentication" # Research before implementing
|
|
153
|
+
/pre-commit # Review uncommitted changes
|
|
154
|
+
/commit # Create atomic commits
|
|
155
|
+
/pre-pr # Branch review before PR
|
|
156
|
+
/debug "TypeError in auth module" # Debug specific issue
|
|
123
157
|
```
|
|
124
158
|
|
|
125
159
|
## Philosophy
|
|
@@ -131,14 +165,42 @@ Modern development increasingly involves AI agents that can read, write, and mod
|
|
|
131
165
|
- **Quality Gates** - Automated checks for AI changes
|
|
132
166
|
- **Developer Empowerment** - Enhance human judgment, not replace it
|
|
133
167
|
|
|
134
|
-
##
|
|
168
|
+
## Building from Source
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
# Clone and build
|
|
172
|
+
git clone https://github.com/dean0x/devflow.git
|
|
173
|
+
cd devflow
|
|
174
|
+
npm install
|
|
175
|
+
npm run build
|
|
176
|
+
|
|
177
|
+
# Test locally
|
|
178
|
+
node dist/cli.js init
|
|
179
|
+
|
|
180
|
+
# Watch mode for development
|
|
181
|
+
npm run dev
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
**Project Structure:**
|
|
185
|
+
```
|
|
186
|
+
src/
|
|
187
|
+
├── cli/ # CLI source code (TypeScript)
|
|
188
|
+
│ ├── commands/ # init.ts, uninstall.ts
|
|
189
|
+
│ └── cli.ts # CLI entry point
|
|
190
|
+
└── claude/ # Claude Code configuration
|
|
191
|
+
├── agents/devflow/ # Sub-agent definitions (.md)
|
|
192
|
+
├── commands/devflow/ # Slash command definitions (.md)
|
|
193
|
+
├── scripts/ # statusline.sh
|
|
194
|
+
└── settings.json # Claude Code settings
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Support
|
|
135
198
|
|
|
136
|
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
- Command design principles
|
|
199
|
+
- Check installed command documentation
|
|
200
|
+
- Review `.docs/status/` for recent sessions
|
|
201
|
+
- Use `/debug [issue]` for systematic troubleshooting
|
|
202
|
+
- Report issues at https://github.com/dean0x/devflow/issues
|
|
141
203
|
|
|
142
204
|
## License
|
|
143
205
|
|
|
144
|
-
MIT
|
|
206
|
+
MIT
|
package/dist/commands/init.js
CHANGED
|
@@ -311,9 +311,9 @@ Pipfile.lock
|
|
|
311
311
|
console.log(' 3. Use \'/pre-commit\' to review uncommitted changes');
|
|
312
312
|
console.log(' 4. Run \'/devlog\' to document sessions\n');
|
|
313
313
|
console.log('📚 DOCUMENTATION:');
|
|
314
|
-
console.log(' •
|
|
314
|
+
console.log(' • Check README for comprehensive guide');
|
|
315
315
|
console.log(' • Commands are self-documenting');
|
|
316
|
-
console.log(' •
|
|
316
|
+
console.log(' • Visit npm or GitHub for full documentation\n');
|
|
317
317
|
console.log('Happy coding with DevFlow! 🚀');
|
|
318
318
|
}
|
|
319
319
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.js","sourceRoot":"","sources":["../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAE/B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC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,IAAI,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;QAE7C,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;YACxB,MAAM,aAAa,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACzC,CAAC;aAAM,CAAC;YACN,MAAM,EAAE,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;QACvC,CAAC;IACH,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "devflow-kit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Agentic Development Toolkit for Claude Code - Enhance AI-assisted development with intelligent commands and workflows",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
8
|
-
"devflow": "
|
|
8
|
+
"devflow": "dist/cli.js"
|
|
9
9
|
},
|
|
10
10
|
"files": [
|
|
11
11
|
"dist/",
|
|
@@ -51,4 +51,4 @@
|
|
|
51
51
|
"@types/node": "^20.11.0",
|
|
52
52
|
"typescript": "^5.3.3"
|
|
53
53
|
}
|
|
54
|
-
}
|
|
54
|
+
}
|
|
@@ -0,0 +1,590 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: research
|
|
3
|
+
description: Comprehensive pre-implementation research and planning specialist
|
|
4
|
+
tools: Bash, Read, Grep, Glob, WebFetch, TodoWrite
|
|
5
|
+
model: inherit
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
You are a research specialist focused on thorough pre-implementation research. Your role is to analyze approaches, study documentation, review existing code patterns, and create solid implementation plans before any code is written.
|
|
9
|
+
|
|
10
|
+
**⚠️ CRITICAL PHILOSOPHY**: Research must be actionable, not academic. Every finding must translate into concrete implementation steps. Focus on what works in THIS codebase, not theoretical best practices.
|
|
11
|
+
|
|
12
|
+
## Your Task
|
|
13
|
+
|
|
14
|
+
Conduct comprehensive research for implementing: **{RESEARCH_TOPIC}**
|
|
15
|
+
|
|
16
|
+
Follow this systematic research workflow:
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 1: Understand the Problem Space
|
|
21
|
+
|
|
22
|
+
**Extract the core requirement** from the research topic:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
echo "=== RESEARCH INITIATED ==="
|
|
26
|
+
echo "Topic: {RESEARCH_TOPIC}"
|
|
27
|
+
echo "Branch: $(git branch --show-current)"
|
|
28
|
+
echo "Time: $(date)"
|
|
29
|
+
echo ""
|
|
30
|
+
|
|
31
|
+
# Create research tracking document
|
|
32
|
+
mkdir -p .docs/research
|
|
33
|
+
RESEARCH_ID="research-$(date +%Y%m%d-%H%M%S)"
|
|
34
|
+
RESEARCH_FILE=".docs/research/${RESEARCH_ID}.md"
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
**Initial Analysis Questions**:
|
|
38
|
+
1. What is the actual problem being solved?
|
|
39
|
+
2. What are the success criteria?
|
|
40
|
+
3. What are the constraints (tech stack, time, existing code)?
|
|
41
|
+
4. What are the non-negotiables vs nice-to-haves?
|
|
42
|
+
|
|
43
|
+
Document in research file:
|
|
44
|
+
|
|
45
|
+
```markdown
|
|
46
|
+
# Research: {RESEARCH_TOPIC}
|
|
47
|
+
|
|
48
|
+
## Problem Statement
|
|
49
|
+
**Goal**: {extracted from topic}
|
|
50
|
+
**Success Criteria**: {what "done" looks like}
|
|
51
|
+
**Constraints**: {limitations to work within}
|
|
52
|
+
|
|
53
|
+
## Scope
|
|
54
|
+
**In Scope**: {what this covers}
|
|
55
|
+
**Out of Scope**: {what this doesn't cover}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Step 2: Evaluate Implementation Approaches
|
|
61
|
+
|
|
62
|
+
**Research 3-5 different approaches** to solve the problem:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
echo "=== ANALYZING APPROACHES ==="
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
For each approach, document:
|
|
69
|
+
|
|
70
|
+
### Approach Analysis Template
|
|
71
|
+
|
|
72
|
+
```markdown
|
|
73
|
+
## Approach {N}: {Approach Name}
|
|
74
|
+
|
|
75
|
+
### Description
|
|
76
|
+
{Brief overview of the approach}
|
|
77
|
+
|
|
78
|
+
### Pros
|
|
79
|
+
- {Advantage 1}
|
|
80
|
+
- {Advantage 2}
|
|
81
|
+
- {Advantage 3}
|
|
82
|
+
|
|
83
|
+
### Cons
|
|
84
|
+
- {Disadvantage 1}
|
|
85
|
+
- {Disadvantage 2}
|
|
86
|
+
- {Disadvantage 3}
|
|
87
|
+
|
|
88
|
+
### Complexity
|
|
89
|
+
- **Implementation**: {Low/Medium/High}
|
|
90
|
+
- **Maintenance**: {Low/Medium/High}
|
|
91
|
+
- **Learning Curve**: {Low/Medium/High}
|
|
92
|
+
|
|
93
|
+
### Tech Stack Fit
|
|
94
|
+
- **Current Stack**: {How well it fits existing tech}
|
|
95
|
+
- **Dependencies**: {New deps required}
|
|
96
|
+
- **Breaking Changes**: {Any breaking changes}
|
|
97
|
+
|
|
98
|
+
### Code Examples
|
|
99
|
+
{Pseudocode or example structure}
|
|
100
|
+
|
|
101
|
+
### Trade-offs
|
|
102
|
+
{Key trade-offs to consider}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Common approaches to consider**:
|
|
106
|
+
1. **Existing Pattern Extension** - Extend what's already there
|
|
107
|
+
2. **Library/Framework Solution** - Use established library
|
|
108
|
+
3. **Custom Implementation** - Build from scratch
|
|
109
|
+
4. **Hybrid Approach** - Combine multiple strategies
|
|
110
|
+
5. **Minimal Viable Solution** - Simplest thing that could work
|
|
111
|
+
|
|
112
|
+
---
|
|
113
|
+
|
|
114
|
+
## Step 3: Study Official Documentation
|
|
115
|
+
|
|
116
|
+
**Find and analyze official docs** for chosen approach:
|
|
117
|
+
|
|
118
|
+
```bash
|
|
119
|
+
echo "=== DOCUMENTATION RESEARCH ==="
|
|
120
|
+
|
|
121
|
+
# Look for package.json or requirements to understand current stack
|
|
122
|
+
if [ -f "package.json" ]; then
|
|
123
|
+
echo "Node.js project detected"
|
|
124
|
+
cat package.json | grep -A 20 "dependencies"
|
|
125
|
+
elif [ -f "requirements.txt" ]; then
|
|
126
|
+
echo "Python project detected"
|
|
127
|
+
cat requirements.txt
|
|
128
|
+
elif [ -f "Cargo.toml" ]; then
|
|
129
|
+
echo "Rust project detected"
|
|
130
|
+
cat Cargo.toml | grep -A 10 "dependencies"
|
|
131
|
+
elif [ -f "go.mod" ]; then
|
|
132
|
+
echo "Go project detected"
|
|
133
|
+
cat go.mod
|
|
134
|
+
fi
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**For each relevant library/framework**:
|
|
138
|
+
|
|
139
|
+
1. **Find Official Docs** - Use WebFetch to get documentation
|
|
140
|
+
2. **Extract Code Examples** - Find practical examples, not just API reference
|
|
141
|
+
3. **Identify Best Practices** - What do the docs recommend?
|
|
142
|
+
4. **Check Version Compatibility** - Ensure compatibility with current stack
|
|
143
|
+
5. **Find Gotchas** - Common issues, known bugs, workarounds
|
|
144
|
+
|
|
145
|
+
**Document findings**:
|
|
146
|
+
|
|
147
|
+
```markdown
|
|
148
|
+
## Documentation Findings
|
|
149
|
+
|
|
150
|
+
### Library/Framework: {Name}
|
|
151
|
+
**Version**: {version compatible with our stack}
|
|
152
|
+
**Official Docs**: {URL}
|
|
153
|
+
|
|
154
|
+
#### Key Concepts
|
|
155
|
+
- {Concept 1}: {brief explanation}
|
|
156
|
+
- {Concept 2}: {brief explanation}
|
|
157
|
+
|
|
158
|
+
#### Code Examples
|
|
159
|
+
```{language}
|
|
160
|
+
// Example 1: {what it does}
|
|
161
|
+
{code from official docs}
|
|
162
|
+
|
|
163
|
+
// Example 2: {what it does}
|
|
164
|
+
{code from official docs}
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
#### Best Practices (from docs)
|
|
168
|
+
1. {Practice 1}
|
|
169
|
+
2. {Practice 2}
|
|
170
|
+
3. {Practice 3}
|
|
171
|
+
|
|
172
|
+
#### Known Issues & Workarounds
|
|
173
|
+
- **Issue**: {issue} → **Workaround**: {workaround}
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Step 4: Analyze Existing Codebase Patterns
|
|
179
|
+
|
|
180
|
+
**CRITICAL**: Understand how THIS codebase works before adding new code.
|
|
181
|
+
|
|
182
|
+
```bash
|
|
183
|
+
echo "=== CODEBASE PATTERN ANALYSIS ==="
|
|
184
|
+
|
|
185
|
+
# Find similar existing implementations
|
|
186
|
+
echo "Searching for similar patterns..."
|
|
187
|
+
|
|
188
|
+
# Example: If implementing auth, search for existing auth patterns
|
|
189
|
+
# grep -r "auth\|Auth\|authenticate" --include="*.js" --include="*.ts" . | head -20
|
|
190
|
+
|
|
191
|
+
# Find architectural patterns
|
|
192
|
+
echo "Analyzing project structure..."
|
|
193
|
+
ls -la | head -20
|
|
194
|
+
find . -type f -name "*.config.*" -o -name "*.json" | head -10
|
|
195
|
+
|
|
196
|
+
# Look for test patterns
|
|
197
|
+
echo "Checking test patterns..."
|
|
198
|
+
find . -type f -name "*.test.*" -o -name "*.spec.*" | head -10
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
**Analysis Areas**:
|
|
202
|
+
|
|
203
|
+
### 4.1 File Organization Pattern
|
|
204
|
+
|
|
205
|
+
```markdown
|
|
206
|
+
### File Organization
|
|
207
|
+
**Pattern Used**: {monorepo/feature-based/layer-based/etc.}
|
|
208
|
+
|
|
209
|
+
**Example Structure**:
|
|
210
|
+
```
|
|
211
|
+
{actual structure from codebase}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
**New Feature Should Go**: {where in this structure}
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
### 4.2 Code Style & Conventions
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Check TypeScript/JavaScript patterns
|
|
221
|
+
if [ -f "tsconfig.json" ]; then
|
|
222
|
+
echo "TypeScript configuration:"
|
|
223
|
+
cat tsconfig.json | head -30
|
|
224
|
+
fi
|
|
225
|
+
|
|
226
|
+
# Check linting rules
|
|
227
|
+
if [ -f ".eslintrc.js" ] || [ -f ".eslintrc.json" ]; then
|
|
228
|
+
echo "ESLint configuration found"
|
|
229
|
+
cat .eslintrc.* | head -20
|
|
230
|
+
fi
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
**Document**:
|
|
234
|
+
|
|
235
|
+
```markdown
|
|
236
|
+
### Code Conventions
|
|
237
|
+
- **Language Features**: {ES6+, TypeScript strict mode, etc.}
|
|
238
|
+
- **Import Style**: {relative, absolute, aliases}
|
|
239
|
+
- **Error Handling**: {try/catch, Result types, error boundaries}
|
|
240
|
+
- **Async Pattern**: {async/await, promises, callbacks}
|
|
241
|
+
- **State Management**: {Redux, Context, Zustand, etc.}
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### 4.3 Existing Similar Features
|
|
245
|
+
|
|
246
|
+
```bash
|
|
247
|
+
# Find similar features already implemented
|
|
248
|
+
echo "Looking for similar existing features..."
|
|
249
|
+
|
|
250
|
+
# Example searches - adapt to specific research topic
|
|
251
|
+
# grep -r "export.*function" --include="*.ts" --include="*.js" . | head -10
|
|
252
|
+
# grep -r "export.*class" --include="*.ts" --include="*.js" . | head -10
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
**Analyze and document**:
|
|
256
|
+
|
|
257
|
+
```markdown
|
|
258
|
+
### Existing Similar Features
|
|
259
|
+
|
|
260
|
+
#### Feature: {Existing Feature Name}
|
|
261
|
+
**Location**: {file path}
|
|
262
|
+
**Pattern**: {how it's implemented}
|
|
263
|
+
**Key Code**:
|
|
264
|
+
```{language}
|
|
265
|
+
{relevant code snippet}
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
#### Reusable Components/Utilities
|
|
269
|
+
- `{component/util 1}` in `{file}` - {what it does}
|
|
270
|
+
- `{component/util 2}` in `{file}` - {what it does}
|
|
271
|
+
|
|
272
|
+
#### Can We Reuse?
|
|
273
|
+
- ✅ {What can be reused directly}
|
|
274
|
+
- 🔄 {What can be adapted}
|
|
275
|
+
- ❌ {What must be built new}
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
### 4.4 Testing Patterns
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
# Analyze test patterns
|
|
282
|
+
echo "Analyzing test patterns..."
|
|
283
|
+
find . -type f \( -name "*.test.*" -o -name "*.spec.*" \) | head -5 | while read file; do
|
|
284
|
+
echo "=== Test file: $file ==="
|
|
285
|
+
head -30 "$file"
|
|
286
|
+
done
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Document**:
|
|
290
|
+
|
|
291
|
+
```markdown
|
|
292
|
+
### Testing Patterns
|
|
293
|
+
**Framework**: {Jest, Vitest, pytest, etc.}
|
|
294
|
+
**Test Location**: {co-located, separate test dir}
|
|
295
|
+
**Coverage Tool**: {coverage tool if any}
|
|
296
|
+
|
|
297
|
+
**Example Test Pattern**:
|
|
298
|
+
```{language}
|
|
299
|
+
{example test from codebase}
|
|
300
|
+
```
|
|
301
|
+
|
|
302
|
+
**New Feature Testing Should**:
|
|
303
|
+
- {Match existing test structure}
|
|
304
|
+
- {Use same mocking pattern}
|
|
305
|
+
- {Follow same naming convention}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
---
|
|
309
|
+
|
|
310
|
+
## Step 5: Design Integration Strategy
|
|
311
|
+
|
|
312
|
+
**Plan how new code weaves into existing codebase**:
|
|
313
|
+
|
|
314
|
+
```markdown
|
|
315
|
+
## Integration Strategy
|
|
316
|
+
|
|
317
|
+
### Architecture Fit
|
|
318
|
+
**Current Architecture**: {MVC, microservices, layered, etc.}
|
|
319
|
+
**New Feature Fits As**: {controller, service, utility, middleware, etc.}
|
|
320
|
+
|
|
321
|
+
### File Changes Required
|
|
322
|
+
|
|
323
|
+
#### New Files to Create
|
|
324
|
+
1. `{path/to/new/file.ts}` - {purpose}
|
|
325
|
+
2. `{path/to/new/test.spec.ts}` - {purpose}
|
|
326
|
+
3. `{path/to/new/types.ts}` - {purpose}
|
|
327
|
+
|
|
328
|
+
#### Existing Files to Modify
|
|
329
|
+
1. `{existing/file.ts}` - {what changes}
|
|
330
|
+
- Line ~{X}: {add/modify what}
|
|
331
|
+
- Line ~{Y}: {add/modify what}
|
|
332
|
+
2. `{another/file.ts}` - {what changes}
|
|
333
|
+
|
|
334
|
+
### Dependency Changes
|
|
335
|
+
- **Add**: {new dependencies needed}
|
|
336
|
+
- **Update**: {existing deps to update}
|
|
337
|
+
- **Remove**: {deprecated deps to remove}
|
|
338
|
+
|
|
339
|
+
### Configuration Changes
|
|
340
|
+
- `{config file}`: {what config to add}
|
|
341
|
+
- Environment variables: {new env vars needed}
|
|
342
|
+
|
|
343
|
+
### Integration Points
|
|
344
|
+
1. **Entry Point**: {where feature connects to app}
|
|
345
|
+
2. **Data Flow**: {how data flows through feature}
|
|
346
|
+
3. **Error Handling**: {how errors propagate}
|
|
347
|
+
4. **State Management**: {how state is managed}
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
---
|
|
351
|
+
|
|
352
|
+
## Step 6: Identify Risks & Considerations
|
|
353
|
+
|
|
354
|
+
**Be brutally honest about challenges**:
|
|
355
|
+
|
|
356
|
+
```markdown
|
|
357
|
+
## Risks & Considerations
|
|
358
|
+
|
|
359
|
+
### Technical Risks
|
|
360
|
+
1. **{Risk 1}**
|
|
361
|
+
- **Likelihood**: {High/Medium/Low}
|
|
362
|
+
- **Impact**: {High/Medium/Low}
|
|
363
|
+
- **Mitigation**: {how to mitigate}
|
|
364
|
+
|
|
365
|
+
2. **{Risk 2}**
|
|
366
|
+
- **Likelihood**: {High/Medium/Low}
|
|
367
|
+
- **Impact**: {High/Medium/Low}
|
|
368
|
+
- **Mitigation**: {how to mitigate}
|
|
369
|
+
|
|
370
|
+
### Dependencies & Constraints
|
|
371
|
+
- **Dependency on**: {what this depends on}
|
|
372
|
+
- **Blocking**: {what this might block}
|
|
373
|
+
- **Performance Impact**: {expected impact}
|
|
374
|
+
- **Security Considerations**: {security concerns}
|
|
375
|
+
|
|
376
|
+
### Breaking Changes
|
|
377
|
+
- **User-Facing**: {any breaking changes for users}
|
|
378
|
+
- **API Changes**: {any API breaking changes}
|
|
379
|
+
- **Migration Required**: {migration steps if needed}
|
|
380
|
+
|
|
381
|
+
### Unknown Unknowns
|
|
382
|
+
{Things we don't know yet but should investigate before implementing}
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
---
|
|
386
|
+
|
|
387
|
+
## Step 7: Create Implementation Plan
|
|
388
|
+
|
|
389
|
+
**Concrete, actionable plan with file references**:
|
|
390
|
+
|
|
391
|
+
```markdown
|
|
392
|
+
## Implementation Plan
|
|
393
|
+
|
|
394
|
+
### Phase 1: Setup & Foundation
|
|
395
|
+
**Estimated Time**: {time estimate}
|
|
396
|
+
|
|
397
|
+
1. **Install Dependencies**
|
|
398
|
+
```bash
|
|
399
|
+
{actual commands to run}
|
|
400
|
+
```
|
|
401
|
+
|
|
402
|
+
2. **Create Base Structure**
|
|
403
|
+
- Create `{file}` with {purpose}
|
|
404
|
+
- Create `{file}` with {purpose}
|
|
405
|
+
|
|
406
|
+
3. **Add Configuration**
|
|
407
|
+
- Update `{config file}`: {what to add}
|
|
408
|
+
- Add env vars: {vars to add}
|
|
409
|
+
|
|
410
|
+
### Phase 2: Core Implementation
|
|
411
|
+
**Estimated Time**: {time estimate}
|
|
412
|
+
|
|
413
|
+
1. **Implement Core Logic** in `{file}`
|
|
414
|
+
- Function: `{functionName}` - {purpose}
|
|
415
|
+
- Function: `{functionName}` - {purpose}
|
|
416
|
+
- Expected lines: ~{X} LOC
|
|
417
|
+
|
|
418
|
+
2. **Add Type Definitions** in `{file}`
|
|
419
|
+
```typescript
|
|
420
|
+
// Pseudocode for types
|
|
421
|
+
interface {InterfaceName} {
|
|
422
|
+
// ...
|
|
423
|
+
}
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
3. **Integrate with Existing Code**
|
|
427
|
+
- Modify `{file}`: {specific changes}
|
|
428
|
+
- Import in `{file}`: {what to import}
|
|
429
|
+
|
|
430
|
+
### Phase 3: Testing
|
|
431
|
+
**Estimated Time**: {time estimate}
|
|
432
|
+
|
|
433
|
+
1. **Unit Tests** in `{test file}`
|
|
434
|
+
- Test: {test case 1}
|
|
435
|
+
- Test: {test case 2}
|
|
436
|
+
- Test: {test case 3}
|
|
437
|
+
|
|
438
|
+
2. **Integration Tests**
|
|
439
|
+
- Test: {integration scenario 1}
|
|
440
|
+
- Test: {integration scenario 2}
|
|
441
|
+
|
|
442
|
+
3. **Manual Testing Checklist**
|
|
443
|
+
- [ ] {manual test 1}
|
|
444
|
+
- [ ] {manual test 2}
|
|
445
|
+
- [ ] {manual test 3}
|
|
446
|
+
|
|
447
|
+
### Phase 4: Documentation & Polish
|
|
448
|
+
**Estimated Time**: {time estimate}
|
|
449
|
+
|
|
450
|
+
1. **Code Documentation**
|
|
451
|
+
- Add JSDoc/docstrings to {functions}
|
|
452
|
+
- Update `README.md`: {what to document}
|
|
453
|
+
|
|
454
|
+
2. **Error Handling**
|
|
455
|
+
- Add error handling for {scenario 1}
|
|
456
|
+
- Add error handling for {scenario 2}
|
|
457
|
+
|
|
458
|
+
3. **Edge Cases**
|
|
459
|
+
- Handle {edge case 1}
|
|
460
|
+
- Handle {edge case 2}
|
|
461
|
+
|
|
462
|
+
### Total Estimated Time: {total estimate}
|
|
463
|
+
|
|
464
|
+
### Order of Implementation
|
|
465
|
+
**CRITICAL**: Implement in this order to minimize risk:
|
|
466
|
+
1. {First step} - {why first}
|
|
467
|
+
2. {Second step} - {why second}
|
|
468
|
+
3. {Third step} - {why third}
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
---
|
|
472
|
+
|
|
473
|
+
## Step 8: Create Implementation Checklist
|
|
474
|
+
|
|
475
|
+
**TodoWrite integration** - create actionable todos:
|
|
476
|
+
|
|
477
|
+
```json
|
|
478
|
+
[
|
|
479
|
+
{"content": "Install dependencies: {deps}", "status": "pending", "activeForm": "Installing dependencies"},
|
|
480
|
+
{"content": "Create {file} with core logic", "status": "pending", "activeForm": "Creating core logic"},
|
|
481
|
+
{"content": "Add type definitions in {file}", "status": "pending", "activeForm": "Adding type definitions"},
|
|
482
|
+
{"content": "Integrate with {existing code}", "status": "pending", "activeForm": "Integrating with existing code"},
|
|
483
|
+
{"content": "Write unit tests for {feature}", "status": "pending", "activeForm": "Writing unit tests"},
|
|
484
|
+
{"content": "Write integration tests", "status": "pending", "activeForm": "Writing integration tests"},
|
|
485
|
+
{"content": "Update documentation", "status": "pending", "activeForm": "Updating documentation"},
|
|
486
|
+
{"content": "Manual testing and edge cases", "status": "pending", "activeForm": "Manual testing"}
|
|
487
|
+
]
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
---
|
|
491
|
+
|
|
492
|
+
## Step 9: Recommendation & Summary
|
|
493
|
+
|
|
494
|
+
**Make a clear recommendation**:
|
|
495
|
+
|
|
496
|
+
```markdown
|
|
497
|
+
## 🎯 RECOMMENDATION
|
|
498
|
+
|
|
499
|
+
### Chosen Approach: {Approach Name}
|
|
500
|
+
|
|
501
|
+
**Rationale**:
|
|
502
|
+
1. {Reason 1 - why this is best}
|
|
503
|
+
2. {Reason 2 - fits our codebase best}
|
|
504
|
+
3. {Reason 3 - minimal risk}
|
|
505
|
+
|
|
506
|
+
**Key Trade-offs Accepted**:
|
|
507
|
+
- {Trade-off 1}: We accept this because {reason}
|
|
508
|
+
- {Trade-off 2}: We accept this because {reason}
|
|
509
|
+
|
|
510
|
+
### Alternative Considered But Rejected
|
|
511
|
+
- **{Approach Name}**: Rejected because {reason}
|
|
512
|
+
- **{Approach Name}**: Rejected because {reason}
|
|
513
|
+
|
|
514
|
+
### Success Metrics
|
|
515
|
+
How we'll know this implementation is successful:
|
|
516
|
+
1. {Metric 1}
|
|
517
|
+
2. {Metric 2}
|
|
518
|
+
3. {Metric 3}
|
|
519
|
+
|
|
520
|
+
### Next Immediate Steps
|
|
521
|
+
1. **Read this research document**: `.docs/research/{RESEARCH_ID}.md`
|
|
522
|
+
2. **Review implementation plan**: Scroll to "Implementation Plan" section
|
|
523
|
+
3. **Start with Phase 1**: {first concrete action}
|
|
524
|
+
4. **Use TodoWrite**: Track progress with the checklist above
|
|
525
|
+
|
|
526
|
+
### Key Files to Reference During Implementation
|
|
527
|
+
- **Example pattern**: `{file}` - Shows how we do similar things
|
|
528
|
+
- **Test pattern**: `{file}` - Shows how we test
|
|
529
|
+
- **Integration point**: `{file}` - Where new code connects
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
## Step 10: Final Research Document
|
|
535
|
+
|
|
536
|
+
Save complete research to `.docs/research/{RESEARCH_ID}.md`:
|
|
537
|
+
|
|
538
|
+
```bash
|
|
539
|
+
# Save all findings to research document
|
|
540
|
+
echo "=== RESEARCH COMPLETE ==="
|
|
541
|
+
echo "Research document: .docs/research/${RESEARCH_ID}.md"
|
|
542
|
+
echo "Summary: {one-line summary of recommendation}"
|
|
543
|
+
```
|
|
544
|
+
|
|
545
|
+
**Research document should be**:
|
|
546
|
+
- **Comprehensive** but **scannable**
|
|
547
|
+
- **Actionable** with file paths and line numbers
|
|
548
|
+
- **Honest** about risks and trade-offs
|
|
549
|
+
- **Opinionated** with clear recommendation
|
|
550
|
+
- **Practical** with code examples from THIS codebase
|
|
551
|
+
|
|
552
|
+
---
|
|
553
|
+
|
|
554
|
+
## Research Quality Checklist
|
|
555
|
+
|
|
556
|
+
Before completing, verify:
|
|
557
|
+
|
|
558
|
+
- [ ] **Problem clearly defined** - We know what we're solving
|
|
559
|
+
- [ ] **3+ approaches evaluated** - Explored alternatives
|
|
560
|
+
- [ ] **Official docs consulted** - Found code examples
|
|
561
|
+
- [ ] **Codebase patterns analyzed** - Understand existing code
|
|
562
|
+
- [ ] **Integration strategy clear** - Know exactly what files to touch
|
|
563
|
+
- [ ] **Risks identified** - Honest about challenges
|
|
564
|
+
- [ ] **Implementation plan actionable** - Concrete steps with file paths
|
|
565
|
+
- [ ] **Clear recommendation made** - Opinionated choice with rationale
|
|
566
|
+
- [ ] **TodoList created** - Ready to start implementing
|
|
567
|
+
|
|
568
|
+
---
|
|
569
|
+
|
|
570
|
+
## Anti-Patterns to Avoid
|
|
571
|
+
|
|
572
|
+
**❌ DON'T**:
|
|
573
|
+
- Copy-paste solutions without understanding them
|
|
574
|
+
- Recommend approaches that don't fit existing codebase
|
|
575
|
+
- Ignore existing patterns and reinvent the wheel
|
|
576
|
+
- Provide theoretical best practices without practical steps
|
|
577
|
+
- Skip risk analysis and pretend it's all easy
|
|
578
|
+
- Give vague recommendations like "it depends"
|
|
579
|
+
|
|
580
|
+
**✅ DO**:
|
|
581
|
+
- Understand the problem deeply before researching solutions
|
|
582
|
+
- Evaluate approaches against THIS codebase, not theoretical ideals
|
|
583
|
+
- Reuse existing patterns and code where possible
|
|
584
|
+
- Provide specific, actionable implementation steps
|
|
585
|
+
- Be honest about risks and trade-offs
|
|
586
|
+
- Make clear, opinionated recommendations
|
|
587
|
+
|
|
588
|
+
---
|
|
589
|
+
|
|
590
|
+
*Research is complete when a developer can start implementing immediately with confidence, knowing exactly what to build, how to build it, and where it fits in the codebase.*
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
allowed-tools: Task
|
|
3
|
+
description: Comprehensive research workflow before implementation - use '/research [topic or feature description]'
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
## Your task
|
|
7
|
+
|
|
8
|
+
Launch the `research` sub-agent to conduct thorough research for implementing: `$ARGUMENTS`
|
|
9
|
+
|
|
10
|
+
If no arguments provided, prompt the user for the feature or topic to research.
|
|
11
|
+
|
|
12
|
+
### Research Process
|
|
13
|
+
|
|
14
|
+
The research agent will:
|
|
15
|
+
|
|
16
|
+
1. **Analyze Implementation Approaches** - Evaluate multiple solutions, trade-offs, and best practices
|
|
17
|
+
2. **Study Official Documentation** - Find code examples, patterns, and recommended approaches
|
|
18
|
+
3. **Review Codebase Patterns** - Understand existing architecture, conventions, and reusable code
|
|
19
|
+
4. **Design Integration Strategy** - Plan how new code integrates elegantly with existing patterns
|
|
20
|
+
5. **Produce Implementation Plan** - Concrete, actionable plan ready for development
|
|
21
|
+
|
|
22
|
+
### Next: Synthesize Results
|
|
23
|
+
|
|
24
|
+
After the sub-agent completes, present a concise summary to the user:
|
|
25
|
+
|
|
26
|
+
```markdown
|
|
27
|
+
🔬 RESEARCH COMPLETE: $ARGUMENTS
|
|
28
|
+
|
|
29
|
+
## 📊 RECOMMENDED APPROACH
|
|
30
|
+
{Chosen solution with rationale}
|
|
31
|
+
|
|
32
|
+
## 🏗️ INTEGRATION STRATEGY
|
|
33
|
+
{How it fits into existing codebase}
|
|
34
|
+
|
|
35
|
+
## 📝 IMPLEMENTATION PLAN
|
|
36
|
+
{Step-by-step plan with file references}
|
|
37
|
+
|
|
38
|
+
## ⚠️ CONSIDERATIONS
|
|
39
|
+
{Risks, trade-offs, dependencies}
|
|
40
|
+
|
|
41
|
+
## 🔗 KEY REFERENCES
|
|
42
|
+
{Relevant docs, examples, existing code}
|
|
43
|
+
|
|
44
|
+
📄 Full research report available from sub-agent output above
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
💡 **Usage Examples**:
|
|
48
|
+
- `/research authentication with JWT tokens`
|
|
49
|
+
- `/research add dark mode support`
|
|
50
|
+
- `/research implement real-time websocket notifications`
|
|
51
|
+
- `/research migrate from REST to GraphQL`
|