claudify-agent 1.0.1 → 1.0.3
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 +13 -1
- package/.claude/skills/debug-optimizer.md +0 -12
- package/.claude/skills/nextjs.md +0 -13
- package/.claude/skills/react.md +0 -12
|
@@ -1,308 +1,313 @@
|
|
|
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
|
-
- Detection:
|
|
86
|
-
- Fix:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
-
|
|
90
|
-
- Detection:
|
|
91
|
-
- Fix:
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
-
|
|
95
|
-
- Detection:
|
|
96
|
-
- Fix:
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
-
|
|
100
|
-
- Detection:
|
|
101
|
-
- Fix:
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
-
|
|
105
|
-
- Detection:
|
|
106
|
-
- Fix:
|
|
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
|
-
**Occurrences**:
|
|
179
|
-
**Impact**:
|
|
180
|
-
**Suggestion**:
|
|
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
|
-
2.
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
###
|
|
217
|
-
1.
|
|
218
|
-
2.
|
|
219
|
-
3.
|
|
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
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
- `
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
-
|
|
301
|
-
-
|
|
302
|
-
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
-
|
|
306
|
-
-
|
|
307
|
-
-
|
|
308
|
-
|
|
1
|
+
---
|
|
2
|
+
name: learning-loop
|
|
3
|
+
description: Analyze plan metrics in .claude/plan-metrics.json to detect anti-patterns and repeated mistakes and suggest rule improvements. Use for weekly reviews or when plan accuracy drops.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# SKILL.md: Learning Loop
|
|
7
|
+
|
|
8
|
+
## Description
|
|
9
|
+
Analyzes plan metrics to identify patterns, detect repeated mistakes, and suggest continuous improvements based on historical execution data.
|
|
10
|
+
|
|
11
|
+
## When to Use
|
|
12
|
+
- Weekly review of plan performance
|
|
13
|
+
- After detecting repeated failures
|
|
14
|
+
- When plan accuracy drops below threshold
|
|
15
|
+
- Proactive optimization of workflows
|
|
16
|
+
|
|
17
|
+
## Capabilities
|
|
18
|
+
- Pattern recognition from metrics
|
|
19
|
+
- Anti-pattern detection
|
|
20
|
+
- Repeated mistake identification
|
|
21
|
+
- Trend analysis
|
|
22
|
+
- Improvement recommendations
|
|
23
|
+
- Rule update suggestions
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
/learning-loop-analyze: Full pattern analysis
|
|
27
|
+
/learning-loop-weekly: Weekly performance review
|
|
28
|
+
/learning-loop-suggest: Generate improvement suggestions
|
|
29
|
+
/learning-loop-patterns: Show detected anti-patterns
|
|
30
|
+
|
|
31
|
+
## Workflows
|
|
32
|
+
|
|
33
|
+
### Weekly Analysis Workflow
|
|
34
|
+
|
|
35
|
+
1. **Load Metrics** (30s)
|
|
36
|
+
```bash
|
|
37
|
+
Read: .claude/plan-metrics.json
|
|
38
|
+
```
|
|
39
|
+
- Last 10-20 plan executions
|
|
40
|
+
- Extract key metrics
|
|
41
|
+
|
|
42
|
+
2. **Pattern Detection** (60s)
|
|
43
|
+
- Run anti-pattern detection rules
|
|
44
|
+
- Identify repeated mistakes
|
|
45
|
+
- Calculate trends
|
|
46
|
+
|
|
47
|
+
3. **Analysis Report** (30s)
|
|
48
|
+
```markdown
|
|
49
|
+
## Weekly Learning Report
|
|
50
|
+
|
|
51
|
+
### Performance Summary
|
|
52
|
+
- Avg Accuracy: X% (trend: ↑/↓/→)
|
|
53
|
+
- Avg Iterations: X (target: <2)
|
|
54
|
+
- Tool Efficiency: X% (target: >70%)
|
|
55
|
+
|
|
56
|
+
### Detected Anti-Patterns
|
|
57
|
+
1. [SEVERITY] Pattern name
|
|
58
|
+
- Suggestion: ...
|
|
59
|
+
|
|
60
|
+
### Repeated Mistakes
|
|
61
|
+
- Mistake 1 (count: X)
|
|
62
|
+
- Mistake 2 (count: X)
|
|
63
|
+
|
|
64
|
+
### Top 3 Improvements
|
|
65
|
+
1. [Action item]
|
|
66
|
+
2. [Action item]
|
|
67
|
+
3. [Action item]
|
|
68
|
+
|
|
69
|
+
### Rule Update Suggestions
|
|
70
|
+
- Suggest updating: .claude/rules/[file]
|
|
71
|
+
- Reason: [pattern detected]
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
4. **Action Items** (30s)
|
|
75
|
+
- Prioritize top 3 improvements
|
|
76
|
+
- Create tasks for rule updates
|
|
77
|
+
- Schedule follow-up review
|
|
78
|
+
|
|
79
|
+
### Anti-Pattern Detection
|
|
80
|
+
|
|
81
|
+
The skill detects these anti-patterns automatically:
|
|
82
|
+
|
|
83
|
+
1. **Over-Engineering** (High)
|
|
84
|
+
- Using expensive tools when cheap alternatives work
|
|
85
|
+
- Detection: avg tool efficiency < 50% over 3 plans
|
|
86
|
+
- Fix: Follow tool escalation protocol
|
|
87
|
+
|
|
88
|
+
2. **Planning Without Research** (Critical)
|
|
89
|
+
- Creating plans without Explore (quick)
|
|
90
|
+
- Detection: No Explore (quick) in last 3 plans
|
|
91
|
+
- Fix: Always research before planning
|
|
92
|
+
|
|
93
|
+
3. **Repeated Execution Failures** (Critical)
|
|
94
|
+
- Multiple consecutive low-accuracy plans
|
|
95
|
+
- Detection: 2+ plans with <60% accuracy
|
|
96
|
+
- Fix: Improve validation process
|
|
97
|
+
|
|
98
|
+
4. **MCP Overuse** (Medium)
|
|
99
|
+
- Using MCP tools unnecessarily
|
|
100
|
+
- Detection: High MCP usage + low accuracy
|
|
101
|
+
- Fix: Use MCP only when essential
|
|
102
|
+
|
|
103
|
+
5. **Skipping Validation** (High)
|
|
104
|
+
- Not running Lint check/tests
|
|
105
|
+
- Detection: No validation tools in 3 plans
|
|
106
|
+
- Fix: Auto-validate after changes
|
|
107
|
+
|
|
108
|
+
6. **Context Bloat** (Medium)
|
|
109
|
+
- Loading too much context
|
|
110
|
+
- Detection: Low efficiency + high iterations
|
|
111
|
+
- Fix: Apply tiered injection, minimalism
|
|
112
|
+
|
|
113
|
+
### Trend Analysis
|
|
114
|
+
|
|
115
|
+
Analyzes performance trends:
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
if (secondHalfAvg > firstHalfAvg + 5) {
|
|
119
|
+
trend = "improving";
|
|
120
|
+
// Reinforce what's working
|
|
121
|
+
} else if (secondHalfAvg < firstHalfAvg - 5) {
|
|
122
|
+
trend = "declining";
|
|
123
|
+
// Investigate root causes
|
|
124
|
+
} else {
|
|
125
|
+
trend = "stable";
|
|
126
|
+
// Look for optimization opportunities
|
|
127
|
+
}
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
## Examples
|
|
131
|
+
|
|
132
|
+
### Example 1: Weekly Review
|
|
133
|
+
|
|
134
|
+
User: "/learning-loop-weekly"
|
|
135
|
+
|
|
136
|
+
Agent analyzes last 10 plans:
|
|
137
|
+
|
|
138
|
+
```markdown
|
|
139
|
+
## Weekly Learning Report (Mar 23-30, 2026)
|
|
140
|
+
|
|
141
|
+
### Performance Summary
|
|
142
|
+
- Avg Accuracy: 82.5% (↑ +5.2% from last week)
|
|
143
|
+
- Avg Iterations: 1.8 (↓ -0.5, improving)
|
|
144
|
+
- Tool Efficiency: 75.0% (→ stable)
|
|
145
|
+
- Avg Parallel Subagents: 2.3
|
|
146
|
+
|
|
147
|
+
### Wins This Week
|
|
148
|
+
✅ Accuracy improved above 80% threshold
|
|
149
|
+
✅ Iteration count decreasing
|
|
150
|
+
✅ MCP usage correlated with success
|
|
151
|
+
|
|
152
|
+
### Detected Anti-Patterns
|
|
153
|
+
1. [MEDIUM] MCP Overuse (2 occurrences)
|
|
154
|
+
- Suggestion: Use MCP tools only when essential
|
|
155
|
+
|
|
156
|
+
### Repeated Mistakes
|
|
157
|
+
- None detected this week 🎉
|
|
158
|
+
|
|
159
|
+
### Top 3 Improvements
|
|
160
|
+
1. Continue current research practices
|
|
161
|
+
2. Reduce MCP usage for simple tasks
|
|
162
|
+
3. Document successful patterns
|
|
163
|
+
|
|
164
|
+
### Rule Updates
|
|
165
|
+
No updates needed this week
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Example 2: Pattern Detection
|
|
169
|
+
|
|
170
|
+
User: "/learning-loop-patterns"
|
|
171
|
+
|
|
172
|
+
Agent detects patterns:
|
|
173
|
+
|
|
174
|
+
```markdown
|
|
175
|
+
## Detected Anti-Patterns
|
|
176
|
+
|
|
177
|
+
### 1. [CRITICAL] Planning Without Research
|
|
178
|
+
**Occurrences**: 3 times in last 5 plans
|
|
179
|
+
**Impact**: Avg accuracy 58% (vs 82% when researched)
|
|
180
|
+
**Suggestion**: Always use Explore (quick) before planning
|
|
181
|
+
|
|
182
|
+
### 2. [HIGH] Skipping Validation
|
|
183
|
+
**Occurrences**: 4 times in last 5 plans
|
|
184
|
+
**Impact**: 75% of unvalidated plans had lints
|
|
185
|
+
**Suggestion**: Enable auto-validate hook
|
|
186
|
+
|
|
187
|
+
### Recommended Actions
|
|
188
|
+
1. Add rule: "Always research before planning"
|
|
189
|
+
2. Enable auto-validate in hooks.config.json
|
|
190
|
+
3. Create checklist for plan creation
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
### Example 3: Improvement Suggestions
|
|
194
|
+
|
|
195
|
+
User: "/learning-loop-suggest"
|
|
196
|
+
|
|
197
|
+
Agent generates suggestions:
|
|
198
|
+
|
|
199
|
+
```markdown
|
|
200
|
+
## Improvement Suggestions
|
|
201
|
+
|
|
202
|
+
### Immediate (This Week)
|
|
203
|
+
1. **Add pre-plan research step**
|
|
204
|
+
- Time cost: +2 min per plan
|
|
205
|
+
- Benefit: +20% accuracy improvement
|
|
206
|
+
|
|
207
|
+
2. **Enable automatic validation**
|
|
208
|
+
- Already configured, just use it
|
|
209
|
+
- Benefit: Catch 100% of lint issues
|
|
210
|
+
|
|
211
|
+
3. **Reduce MCP tool usage**
|
|
212
|
+
- Current: 4.2 MCP tools/plan
|
|
213
|
+
- Target: 2.0 MCP tools/plan
|
|
214
|
+
- Savings: ~30% token cost
|
|
215
|
+
|
|
216
|
+
### Medium-term (This Month)
|
|
217
|
+
1. Create validation checklist
|
|
218
|
+
2. Document successful patterns
|
|
219
|
+
3. Update anti-pattern detection rules
|
|
220
|
+
|
|
221
|
+
### Long-term (This Quarter)
|
|
222
|
+
1. Integrate with CI/CD metrics
|
|
223
|
+
2. A/B test different workflows
|
|
224
|
+
3. Build pattern recognition dashboard
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
## Best Practices
|
|
228
|
+
|
|
229
|
+
### 1. Review Weekly
|
|
230
|
+
- Schedule fixed time (e.g., Friday 4pm)
|
|
231
|
+
- Review last 10 plans
|
|
232
|
+
- Identify top 3 improvements
|
|
233
|
+
- Update rules if needed
|
|
234
|
+
|
|
235
|
+
### 2. Act on Patterns
|
|
236
|
+
- Don't just detect - fix
|
|
237
|
+
- Prioritize critical patterns first
|
|
238
|
+
- Track improvement over time
|
|
239
|
+
|
|
240
|
+
### 3. Keep Rules Minimal
|
|
241
|
+
- Only add rules for repeated patterns
|
|
242
|
+
- Keep rules under 20 lines
|
|
243
|
+
- Use references over content
|
|
244
|
+
|
|
245
|
+
### 4. Measure Impact
|
|
246
|
+
- Before/after comparisons
|
|
247
|
+
- Track metric changes
|
|
248
|
+
- Adjust based on data
|
|
249
|
+
|
|
250
|
+
## Anti-Patterns
|
|
251
|
+
|
|
252
|
+
### ❌ Ignoring Detected Patterns
|
|
253
|
+
Bad: Detect patterns but don't act
|
|
254
|
+
Good: Create action items, track fixes
|
|
255
|
+
|
|
256
|
+
### ❌ Over-Analyzing
|
|
257
|
+
Bad: Analyze every single plan
|
|
258
|
+
Good: Weekly batch analysis
|
|
259
|
+
|
|
260
|
+
### ❌ Too Many Rules
|
|
261
|
+
Bad: Add rule for every mistake
|
|
262
|
+
Good: Only for repeated patterns (3+ occurrences)
|
|
263
|
+
|
|
264
|
+
### ❌ No Follow-up
|
|
265
|
+
Bad: Generate suggestions, forget them
|
|
266
|
+
Good: Schedule follow-up review
|
|
267
|
+
|
|
268
|
+
## Troubleshooting
|
|
269
|
+
|
|
270
|
+
### Not Enough Data
|
|
271
|
+
**Problem**: Less than 3 plans to analyze
|
|
272
|
+
|
|
273
|
+
**Solution**:
|
|
274
|
+
- Wait for more data
|
|
275
|
+
- Run analysis after 10+ plans
|
|
276
|
+
- Use qualitative feedback initially
|
|
277
|
+
|
|
278
|
+
### False Positive Patterns
|
|
279
|
+
**Problem**: Pattern detected but not actually an issue
|
|
280
|
+
|
|
281
|
+
**Solution**:
|
|
282
|
+
- Adjust detection thresholds
|
|
283
|
+
- Add exception rules
|
|
284
|
+
- Manual review before acting
|
|
285
|
+
|
|
286
|
+
### No Patterns Detected
|
|
287
|
+
**Problem**: Analysis shows no patterns
|
|
288
|
+
|
|
289
|
+
**Solution**:
|
|
290
|
+
- Check if thresholds too strict
|
|
291
|
+
- Look for subtle patterns
|
|
292
|
+
- Consider qualitative feedback
|
|
293
|
+
|
|
294
|
+
## Metrics Reference
|
|
295
|
+
|
|
296
|
+
### Key Metrics Tracked
|
|
297
|
+
- `plan_accuracy`: % of plan followed correctly
|
|
298
|
+
- `iteration_count`: Number of fix-and-retest loops
|
|
299
|
+
- `tool_efficiency`: Cost-weighted tool score
|
|
300
|
+
- `parallel_subagents`: Number of parallel explorations
|
|
301
|
+
- `mcp_usage`: MCP server utilization
|
|
302
|
+
- `cost_estimate`: Estimated token consumption
|
|
303
|
+
|
|
304
|
+
### Thresholds
|
|
305
|
+
- **Excellent**: Accuracy >90%, Iterations <2, Efficiency >80%
|
|
306
|
+
- **Good**: Accuracy 70-90%, Iterations 2-3, Efficiency 60-80%
|
|
307
|
+
- **Needs Work**: Accuracy <70%, Iterations >3, Efficiency <60%
|
|
308
|
+
|
|
309
|
+
## Related Documentation
|
|
310
|
+
- `AGENT-INSTRUCTION-BEST-PRACTICES.md` - Core research
|
|
311
|
+
- `.claude/hooks.config.json` - Configuration
|
|
312
|
+
- `.claude/plan-metrics.json` - Historical data
|
|
313
|
+
- `.claude/docs/PLAN-MODE-OPTIMIZATION.md` - Plan mode guide
|