claudify-agent 1.0.0 → 1.0.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/.claude/QUICK-REFERENCE.md +213 -213
- package/.claude/cost-dashboard.md +162 -162
- package/.claude/docs/COST-OPTIMIZATION.md +402 -403
- package/.claude/docs/MCP-INTEGRATION-GUIDE.md +348 -348
- package/.claude/docs/PLAN-MODE-OPTIMIZATION.md +835 -836
- package/.claude/hooks/auto-learning-review.ts +200 -195
- package/.claude/hooks/auto-lint-fix.ts +60 -104
- package/.claude/hooks/auto-security-review.ts +314 -354
- package/.claude/hooks/auto-validate.ts +249 -348
- package/.claude/hooks/lib/claude-hook.ts +168 -0
- package/.claude/hooks/plan-quality-tracker.ts +598 -719
- package/.claude/rules/anti-patterns.md +22 -22
- package/.claude/rules/context-tier-1.md +41 -41
- package/.claude/rules/context-tier-2.md +285 -285
- package/.claude/rules/general.md +25 -25
- package/.claude/rules/mcp-auto-use.md +46 -46
- package/.claude/rules/parallel-exploration-auto.md +30 -31
- package/.claude/rules/plan-mode-execution.md +289 -289
- package/.claude/rules/plan-mode-research.md +34 -34
- package/.claude/rules/plan-mode-structure.md +166 -166
- package/.claude/rules/plan-mode-validation.md +129 -130
- package/.claude/rules/security-critical.md +19 -19
- package/.claude/rules/tool-auto-selection.md +45 -45
- package/.claude/rules/tool-strategy.md +22 -22
- package/.claude/scripts/security-scan.js +1 -1
- package/.claude/security-dashboard.md +142 -142
- package/.claude/settings.json +50 -0
- package/.claude/skills/debug-optimizer/SKILL.md +420 -399
- package/.claude/skills/learning-loop/SKILL.md +313 -308
- package/.claude/skills/mcp-mastery/SKILL.md +218 -214
- package/.claude/skills/nextjs-guide/SKILL.md +687 -687
- package/.claude/skills/parallel-exploration/SKILL.md +197 -193
- package/.claude/skills/plan-mode-mastery/SKILL.md +268 -263
- package/.claude/skills/python-guide/SKILL.md +822 -822
- package/.claude/skills/react-guide/SKILL.md +762 -762
- package/.claude/skills/{security.md → security-guide/SKILL.md} +10 -0
- package/.claude/skills/solidity-guide/SKILL.md +5 -0
- package/.claude/skills/tool-selection/SKILL.md +433 -428
- package/.claude/skills/vite-guide/SKILL.md +445 -445
- package/CLAUDE.md +1 -0
- package/README.md +74 -35
- package/README.vi.md +106 -0
- package/bin/cli.js +13 -4
- package/package.json +9 -1
- package/.claude/skills/debug-optimizer.md +0 -12
- package/.claude/skills/nextjs.md +0 -13
- package/.claude/skills/react.md +0 -12
|
@@ -1,263 +1,268 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
##
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
-
|
|
49
|
-
-
|
|
50
|
-
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
- **
|
|
63
|
-
- **
|
|
64
|
-
- **
|
|
65
|
-
|
|
66
|
-
###
|
|
67
|
-
- **
|
|
68
|
-
- **
|
|
69
|
-
- **
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
- **
|
|
74
|
-
-
|
|
75
|
-
- **
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
-
|
|
92
|
-
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
-
|
|
103
|
-
-
|
|
104
|
-
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
-
|
|
110
|
-
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
-
|
|
125
|
-
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
-
|
|
130
|
-
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
|
|
139
|
-
**
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
-
|
|
157
|
-
-
|
|
158
|
-
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
-
|
|
163
|
-
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
-
|
|
168
|
-
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
-
|
|
188
|
-
-
|
|
189
|
-
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
-
|
|
200
|
-
-
|
|
201
|
-
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
1
|
+
---
|
|
2
|
+
name: plan-mode-mastery
|
|
3
|
+
description: Research, structure, validate and execute implementation plans in Plan Mode. Use when planning a non-trivial feature, refactor or migration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SKILL.md: Plan Mode Mastery
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
Comprehensive plan mode workflow with automatic research, validation, and execution monitoring.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
- User requests Plan Mode
|
|
13
|
+
- Large feature implementation
|
|
14
|
+
- Complex refactoring
|
|
15
|
+
- Ambiguous requirements
|
|
16
|
+
- Multi-step tasks
|
|
17
|
+
|
|
18
|
+
## Capabilities
|
|
19
|
+
- Automatic pre-plan research
|
|
20
|
+
- Tool-aware plan creation
|
|
21
|
+
- Feasibility validation
|
|
22
|
+
- Progress monitoring
|
|
23
|
+
- Adaptive re-planning
|
|
24
|
+
- Iteration loops
|
|
25
|
+
|
|
26
|
+
## Commands
|
|
27
|
+
/plan-mode-full: Complete optimized workflow
|
|
28
|
+
/plan-mode-quick: Standard plan mode (no research)
|
|
29
|
+
/plan-mode-validate: Validate existing plan
|
|
30
|
+
|
|
31
|
+
## Workflows
|
|
32
|
+
|
|
33
|
+
### Full Plan Mode Workflow
|
|
34
|
+
|
|
35
|
+
1. **Pre-Plan Research** (2-3 minutes)
|
|
36
|
+
- Explore (quick) for patterns
|
|
37
|
+
- Parallel subagent exploration
|
|
38
|
+
- Lint check check
|
|
39
|
+
- AskUserQuestion (batch) if needed
|
|
40
|
+
|
|
41
|
+
2. **Plan Creation** (1-2 minutes)
|
|
42
|
+
- Enhanced structure with tools
|
|
43
|
+
- Risk assessment
|
|
44
|
+
- Checkpoint strategy
|
|
45
|
+
- Time estimation
|
|
46
|
+
|
|
47
|
+
3. **Plan Validation** (1 minute)
|
|
48
|
+
- Feasibility subagent
|
|
49
|
+
- Tool availability check
|
|
50
|
+
- Dependency analysis
|
|
51
|
+
|
|
52
|
+
4. **Execution Monitoring**
|
|
53
|
+
- TodoWrite tracking
|
|
54
|
+
- Automatic checkpoints
|
|
55
|
+
- Iteration loops
|
|
56
|
+
- Adaptive re-planning
|
|
57
|
+
|
|
58
|
+
## Tool Integration
|
|
59
|
+
|
|
60
|
+
### Research Phase Tools
|
|
61
|
+
- **Explore (quick)**: Find existing patterns
|
|
62
|
+
- **Agent (Explore)**: Parallel codebase exploration
|
|
63
|
+
- **Lint check**: Check code health
|
|
64
|
+
- **AskUserQuestion**: Batch clarifications
|
|
65
|
+
|
|
66
|
+
### Planning Phase Tools
|
|
67
|
+
- **CreatePlan**: Structured plan creation
|
|
68
|
+
- **TodoWrite**: Progress tracking setup
|
|
69
|
+
- **Checkpoints**: Strategic rollback points
|
|
70
|
+
|
|
71
|
+
### Execution Phase Tools
|
|
72
|
+
- **Read/Write/Edit**: Implementation
|
|
73
|
+
- **Bash**: Run tests and commands
|
|
74
|
+
- **Lint check**: Quality validation
|
|
75
|
+
- **Agent (subagents)**: Parallel work
|
|
76
|
+
|
|
77
|
+
### Monitoring Tools
|
|
78
|
+
- **TodoWrite**: Real-time progress
|
|
79
|
+
- **Fix-and-retest loop**: Iteration loops
|
|
80
|
+
- **AskUserQuestion**: Blocker resolution
|
|
81
|
+
|
|
82
|
+
## Examples
|
|
83
|
+
|
|
84
|
+
### Example 1: Feature Implementation
|
|
85
|
+
|
|
86
|
+
User: "Add user dashboard"
|
|
87
|
+
|
|
88
|
+
Agent invokes /plan-mode-full:
|
|
89
|
+
|
|
90
|
+
**Research Phase**:
|
|
91
|
+
- Explore (quick): "How are pages structured?"
|
|
92
|
+
- Agent (parallel):
|
|
93
|
+
- "Find dashboard-like features"
|
|
94
|
+
- "Find API route patterns"
|
|
95
|
+
- "Find component patterns"
|
|
96
|
+
- Lint check: Check current health
|
|
97
|
+
- AskUserQuestion: "Which widgets for MVP?" (batched)
|
|
98
|
+
|
|
99
|
+
**Plan Phase**:
|
|
100
|
+
Creates enhanced plan with:
|
|
101
|
+
- Files to create/modify with patterns
|
|
102
|
+
- Tool strategy for each step
|
|
103
|
+
- Risk mitigation (checkpoint before API changes)
|
|
104
|
+
- Time estimate: 45 minutes
|
|
105
|
+
|
|
106
|
+
**Validation Phase**:
|
|
107
|
+
- Agent: "Validate plan feasibility"
|
|
108
|
+
- Check: All files accessible
|
|
109
|
+
- Verify: Tool availability
|
|
110
|
+
- Result: PASS
|
|
111
|
+
|
|
112
|
+
**Execution Phase**:
|
|
113
|
+
- TodoWrite: Track 7 steps
|
|
114
|
+
- Checkpoint: Before API changes
|
|
115
|
+
- fix-and-retest loop: Fix test failures
|
|
116
|
+
- Progress updates: After each step
|
|
117
|
+
|
|
118
|
+
### Example 2: Complex Refactor
|
|
119
|
+
|
|
120
|
+
User: "Refactor authentication system"
|
|
121
|
+
|
|
122
|
+
**Research Phase**:
|
|
123
|
+
- Explore (quick): "How is auth implemented?"
|
|
124
|
+
- Agent (parallel x4):
|
|
125
|
+
- "Find JWT validation logic"
|
|
126
|
+
- "Find session management"
|
|
127
|
+
- "Find OAuth integrations"
|
|
128
|
+
- "Find password hashing"
|
|
129
|
+
- Lint check: Check all auth files
|
|
130
|
+
- AskUserQuestion: "Target auth method?"
|
|
131
|
+
|
|
132
|
+
**Plan Phase**:
|
|
133
|
+
- Summary: Migrate from JWT to sessions
|
|
134
|
+
- Files: 8 files to modify
|
|
135
|
+
- Steps: 12 steps with checkpoints
|
|
136
|
+
- Risks: Breaking change, data migration
|
|
137
|
+
- Time: 3 hours
|
|
138
|
+
|
|
139
|
+
**Validation Phase**:
|
|
140
|
+
- Agent: Validate complexity
|
|
141
|
+
- Warning: High risk, suggest phased approach
|
|
142
|
+
- Result: PASS with warnings
|
|
143
|
+
|
|
144
|
+
**Execution Phase**:
|
|
145
|
+
- TodoWrite: 12 steps tracked
|
|
146
|
+
- Checkpoints: 3 (before breaking changes)
|
|
147
|
+
- Adaptive re-plan: Discovered legacy code
|
|
148
|
+
- fix-and-retest: Fixed auth edge cases
|
|
149
|
+
|
|
150
|
+
### Example 3: Bug Fix
|
|
151
|
+
|
|
152
|
+
User: "Fix authentication bug #123"
|
|
153
|
+
|
|
154
|
+
**Research Phase**:
|
|
155
|
+
- Explore (quick): "How does auth flow work?"
|
|
156
|
+
- Agent: "Investigate bug #123"
|
|
157
|
+
- Lint check: Check auth files
|
|
158
|
+
- Result: Token expiration issue found
|
|
159
|
+
|
|
160
|
+
**Plan Phase**:
|
|
161
|
+
- Summary: Fix JWT expiration handling
|
|
162
|
+
- Files: 2 files to modify
|
|
163
|
+
- Steps: 4 steps
|
|
164
|
+
- Time: 20 minutes
|
|
165
|
+
|
|
166
|
+
**Validation Phase**:
|
|
167
|
+
- Quick validation (simple fix)
|
|
168
|
+
- Result: PASS
|
|
169
|
+
|
|
170
|
+
**Execution Phase**:
|
|
171
|
+
- TodoWrite: 4 steps
|
|
172
|
+
- Edit: Fix expiration logic
|
|
173
|
+
- Bash: Run auth tests
|
|
174
|
+
- Lint check: Verify quality
|
|
175
|
+
- Complete: Bug fixed
|
|
176
|
+
|
|
177
|
+
## Best Practices
|
|
178
|
+
|
|
179
|
+
### 1. Always Research First
|
|
180
|
+
- Never plan blind
|
|
181
|
+
- Spend 2-3 min on research
|
|
182
|
+
- Find patterns before coding
|
|
183
|
+
- Ask questions in batches
|
|
184
|
+
|
|
185
|
+
### 2. Validate Before Presenting
|
|
186
|
+
- Use validation subagent
|
|
187
|
+
- Check file accessibility
|
|
188
|
+
- Verify time estimates
|
|
189
|
+
- Flag risks explicitly
|
|
190
|
+
|
|
191
|
+
### 3. Track Progress Religiously
|
|
192
|
+
- Update todos immediately
|
|
193
|
+
- One task in_progress at a time
|
|
194
|
+
- Create checkpoints strategically
|
|
195
|
+
- Report blockers early
|
|
196
|
+
|
|
197
|
+
### 4. Iterate When Stuck
|
|
198
|
+
- Use the fix-and-retest loop for tests (max 5 iterations)
|
|
199
|
+
- Update scratchpad
|
|
200
|
+
- AskUserQuestion if blocked
|
|
201
|
+
- Re-plan if >30% deviation
|
|
202
|
+
|
|
203
|
+
### 5. Time-Box Research
|
|
204
|
+
- Max 3 minutes for research
|
|
205
|
+
- "Good enough" threshold
|
|
206
|
+
- Progressive disclosure
|
|
207
|
+
- Optimize for speed
|
|
208
|
+
|
|
209
|
+
## Anti-Patterns
|
|
210
|
+
|
|
211
|
+
### ❌ Planning Without Research
|
|
212
|
+
Bad: "I'll create a plan immediately"
|
|
213
|
+
Good: "Let me research existing patterns first"
|
|
214
|
+
|
|
215
|
+
### ❌ Vague Plans
|
|
216
|
+
Bad: "Implement authentication"
|
|
217
|
+
Good: "Add JWT validation to /api/login following @src/auth/validateToken.ts pattern"
|
|
218
|
+
|
|
219
|
+
### ❌ No Validation
|
|
220
|
+
Bad: Present plan without checking
|
|
221
|
+
Good: Validate feasibility before presenting
|
|
222
|
+
|
|
223
|
+
### ❌ Skipping Progress Tracking
|
|
224
|
+
Bad: Work without updating todos
|
|
225
|
+
Good: Update TodoWrite after each step
|
|
226
|
+
|
|
227
|
+
### ❌ No Checkpoints
|
|
228
|
+
Bad: Risky changes without rollback
|
|
229
|
+
Good: Checkpoint before breaking changes
|
|
230
|
+
|
|
231
|
+
## Troubleshooting
|
|
232
|
+
|
|
233
|
+
### Research Taking Too Long
|
|
234
|
+
**Problem**: >5 minutes in research phase
|
|
235
|
+
|
|
236
|
+
**Solutions**:
|
|
237
|
+
- Time-box to 3 minutes max
|
|
238
|
+
- Use model="haiku" for subagents
|
|
239
|
+
- Narrow target_directories
|
|
240
|
+
- Accept "good enough" patterns
|
|
241
|
+
|
|
242
|
+
### Validation Failing Repeatedly
|
|
243
|
+
**Problem**: Plan fails validation multiple times
|
|
244
|
+
|
|
245
|
+
**Solutions**:
|
|
246
|
+
- Simplify the plan
|
|
247
|
+
- Break into smaller phases
|
|
248
|
+
- Add more fallback strategies
|
|
249
|
+
- Revise time estimates
|
|
250
|
+
|
|
251
|
+
### Tests Not Passing
|
|
252
|
+
**Problem**: fix-and-retest loop failing after 5 iterations
|
|
253
|
+
|
|
254
|
+
**Solutions**:
|
|
255
|
+
- Report BLOCKED with details
|
|
256
|
+
- AskUserQuestion for guidance
|
|
257
|
+
- Re-plan approach
|
|
258
|
+
- Check for missing dependencies
|
|
259
|
+
|
|
260
|
+
### Plan Deviation
|
|
261
|
+
**Problem**: Execution diverging >30% from plan
|
|
262
|
+
|
|
263
|
+
**Solutions**:
|
|
264
|
+
- Pause immediately
|
|
265
|
+
- Create checkpoint
|
|
266
|
+
- Assess what changed
|
|
267
|
+
- Present updated plan
|
|
268
|
+
- Get approval before continuing
|