Ein Meta-Tracking-System, bei dem Claude Code seine eigene Performance analysiert und daraus lernt.
- Agent fรผhrt Task aus โ Tracking startet
- Agent trackt eigene Performance โ Erfolg/Fehler/Zeit/Token/Tools
- Agent analysiert, was funktioniert hat โ Reflexion nach jedem Task
- Agent passt Strategie an โ Prompt-Variationen, Tool-Nutzung optimieren
- Agent speichert Learnings โ Memory-System fรผr zukรผnftige Tasks
- Task Tracker: Trackt jede Task-Ausfรผhrung mit Metriken
- Reflection Engine: Self-Critique nach jedem Task
- Memory System: Persistiert erfolgreiche Taktiken
- Strategy Optimizer: Passt Prompts und Tool-Nutzung an
- A/B Testing: Probiert verschiedene Ansรคtze parallel
- TypeScript/Node.js
- SQLite fรผr lokale Persistenz
- MCP Server fรผr Claude Code Integration
- Custom Hooks & Slash Commands
{
taskId: "uuid",
timestamp: "2024-...",
duration: 1234,
success: true,
toolCalls: ["Read", "Edit", "Bash"],
tokenUsage: 5000,
errorRate: 0.0
}{
taskId: "uuid",
reflection: {
whatWorked: ["Used Grep before Read", "Parallel tool calls"],
whatFailed: ["Missed edge case in validation"],
improvements: ["Add error handling earlier"],
confidence: 0.85
}
}{
pattern: "file-search-optimization",
tactic: "Use Explore agent for multi-file searches",
successRate: 0.92,
contexts: ["large-codebase", "unknown-structure"],
priority: "high"
}{
strategy: "parallel-tool-calls",
variants: [
{ approach: "A", successRate: 0.78 },
{ approach: "B", successRate: 0.91 }
],
currentChoice: "B",
confidence: 0.88
}# Tracking lรคuft automatisch bei jedem Task
# Hooks werden bei Session-Start und Prompt-Submit ausgefรผhrt/reflect # Trigger manual reflection
/analyze # View performance analytics
/learnings # Show stored learnings
/optimize # Get optimization suggestions// Claude Code kommuniziert direkt mit dem Tracker
await trackTask({
action: "start",
taskType: "file-edit",
context: { ... }
});Nach jedem Task:
โ Task completed: "Fix authentication bug"
๐ Metrics:
- Duration: 3m 24s
- Tools used: Grep (2x), Read (3x), Edit (1x)
- Token usage: 4,200
- Success: โ
๐ค Self-Critique:
โ What worked:
- Used Grep to find all auth-related files first
- Read files in parallel
- Applied fix in single Edit call
โ What could improve:
- Could have used Explore agent to understand auth flow
- Missed checking test files initially
๐ก Learnings:
- Pattern "search-then-read-parallel" โ High success (0.89)
- Add to memory: Always check test files for auth changes
๐ Strategy Update:
- Increase priority of Explore agent for architectural questions
- Add "check-tests" to default workflow checklist
Task โ Execute โ Track โ Reflect โ Learn โ Adapt โ Next Task
โ โ
โโโโโโโโโโโโโโโโโ Apply Learnings โโโโโโโโโโโโโโโโโโโโ
- Claude Code System Prompts
- Reflexion Pattern
- Self-Critique Loops
- Continuous Learning
# Clone & Install
git clone <repo>
cd TobleroneX
npm install
# Setup MCP Server
npm run setup-mcp
# Configure Claude Code
# Add to ~/.config/claude-code/config.json- Basic tracking implementation
- Reflection engine
- Memory persistence
- Strategy adaptation
- A/B testing framework
- Analytics dashboard
- Export/Import learnings
- Multi-session analysis
Status: ๐ง In Development