adaptive-memory-multi-model-router 1.2.2 → 1.3.1
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/LICENSE +21 -0
- package/README.md +146 -66
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/airtable.js +20 -0
- package/dist/integrations/discord.js +18 -0
- package/dist/integrations/github.js +23 -0
- package/dist/integrations/gmail.js +19 -0
- package/dist/integrations/google-calendar.js +18 -0
- package/dist/integrations/index.js +61 -0
- package/dist/integrations/jira.js +21 -0
- package/dist/integrations/linear.js +19 -0
- package/dist/integrations/notion.js +19 -0
- package/dist/integrations/slack.js +18 -0
- package/dist/integrations/telegram.js +19 -0
- package/dist/providers/registry.js +7 -3
- package/docs/ARCHITECTURAL-IMPROVEMENTS-2025.md +1391 -0
- package/docs/ARCHITECTURAL-IMPROVEMENTS-REVISED-2025.md +1051 -0
- package/docs/CONFIGURATION.md +476 -0
- package/docs/COUNCIL_DECISION.json +308 -0
- package/docs/COUNCIL_SUMMARY.md +265 -0
- package/docs/COUNCIL_V2.2_DECISION.md +416 -0
- package/docs/IMPROVEMENT_ROADMAP.md +515 -0
- package/docs/LLM_COUNCIL_DECISION.md +508 -0
- package/docs/QUICK_START_VISIBILITY.md +782 -0
- package/docs/REDDIT_GAP_ANALYSIS.md +299 -0
- package/docs/RESEARCH_BACKED_IMPROVEMENTS.md +1180 -0
- package/docs/TMLPD_QNA.md +751 -0
- package/docs/TMLPD_V2.1_COMPLETE.md +763 -0
- package/docs/TMLPD_V2.2_RESEARCH_ROADMAP.md +754 -0
- package/docs/V2.2_IMPLEMENTATION_COMPLETE.md +446 -0
- package/docs/V2_IMPLEMENTATION_GUIDE.md +388 -0
- package/docs/VISIBILITY_ADOPTION_PLAN.md +1005 -0
- package/docs/launch-content/LAUNCH_EXECUTION_CHECKLIST.md +421 -0
- package/docs/launch-content/README.md +457 -0
- package/docs/launch-content/assets/cost_comparison_100_tasks.png +0 -0
- package/docs/launch-content/assets/cumulative_savings.png +0 -0
- package/docs/launch-content/assets/parallel_speedup.png +0 -0
- package/docs/launch-content/assets/provider_pricing_comparison.png +0 -0
- package/docs/launch-content/assets/task_breakdown_comparison.png +0 -0
- package/docs/launch-content/generate_charts.py +313 -0
- package/docs/launch-content/hn_show_post.md +139 -0
- package/docs/launch-content/partner_outreach_templates.md +745 -0
- package/docs/launch-content/reddit_posts.md +467 -0
- package/docs/launch-content/twitter_thread.txt +460 -0
- package/examples/QUICKSTART.md +1 -1
- package/openclaw-alexa-bridge/ALL_REMAINING_FIXES_PLAN.md +313 -0
- package/openclaw-alexa-bridge/REMAINING_FIXES_SUMMARY.md +277 -0
- package/openclaw-alexa-bridge/src/alexa_handler_no_tmlpd.js +1234 -0
- package/openclaw-alexa-bridge/test_fixes.js +77 -0
- package/package.json +120 -29
- package/package.json.tmp +0 -0
- package/qna/TMLPD_QNA.md +3 -3
- package/skill/SKILL.md +2 -2
- package/src/__tests__/integration/tmpld_integration.test.py +540 -0
- package/src/agents/skill_enhanced_agent.py +318 -0
- package/src/memory/__init__.py +15 -0
- package/src/memory/agentic_memory.py +353 -0
- package/src/memory/semantic_memory.py +444 -0
- package/src/memory/simple_memory.py +466 -0
- package/src/memory/working_memory.py +447 -0
- package/src/orchestration/__init__.py +52 -0
- package/src/orchestration/execution_engine.py +353 -0
- package/src/orchestration/halo_orchestrator.py +367 -0
- package/src/orchestration/mcts_workflow.py +498 -0
- package/src/orchestration/role_assigner.py +473 -0
- package/src/orchestration/task_planner.py +522 -0
- package/src/providers/__init__.py +67 -0
- package/src/providers/anthropic.py +304 -0
- package/src/providers/base.py +241 -0
- package/src/providers/cerebras.py +373 -0
- package/src/providers/registry.py +476 -0
- package/src/routing/__init__.py +30 -0
- package/src/routing/universal_router.py +621 -0
- package/src/skills/TMLPD-QUICKREF.md +210 -0
- package/src/skills/TMLPD-SETUP-SUMMARY.md +157 -0
- package/src/skills/TMLPD.md +540 -0
- package/src/skills/__tests__/skill_manager.test.ts +328 -0
- package/src/skills/skill_manager.py +385 -0
- package/src/skills/test-tmlpd.sh +108 -0
- package/src/skills/tmlpd-category.yaml +67 -0
- package/src/skills/tmlpd-monitoring.yaml +188 -0
- package/src/skills/tmlpd-phase.yaml +132 -0
- package/src/state/__init__.py +17 -0
- package/src/state/simple_checkpoint.py +508 -0
- package/src/tmlpd_agent.py +464 -0
- package/src/tmpld_v2.py +427 -0
- package/src/workflows/__init__.py +18 -0
- package/src/workflows/advanced_difficulty_classifier.py +377 -0
- package/src/workflows/chaining_executor.py +417 -0
- package/src/workflows/difficulty_integration.py +209 -0
- package/src/workflows/orchestrator.py +469 -0
- package/src/workflows/orchestrator_executor.py +456 -0
- package/src/workflows/parallelization_executor.py +382 -0
- package/src/workflows/router.py +311 -0
- package/test_integration_simple.py +86 -0
- package/test_mcts_workflow.py +150 -0
- package/test_templd_integration.py +262 -0
- package/test_universal_router.py +275 -0
- package/tmlpd-pi-extension/README.md +36 -0
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts +114 -0
- package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/cache/prefixCache.js +285 -0
- package/tmlpd-pi-extension/dist/cache/prefixCache.js.map +1 -0
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts +58 -0
- package/tmlpd-pi-extension/dist/cache/responseCache.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/cache/responseCache.js +153 -0
- package/tmlpd-pi-extension/dist/cache/responseCache.js.map +1 -0
- package/tmlpd-pi-extension/dist/cli.js +59 -0
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts +95 -0
- package/tmlpd-pi-extension/dist/cost/costTracker.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/cost/costTracker.js +240 -0
- package/tmlpd-pi-extension/dist/cost/costTracker.js.map +1 -0
- package/tmlpd-pi-extension/dist/index.d.ts +723 -0
- package/tmlpd-pi-extension/dist/index.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/index.js +239 -0
- package/tmlpd-pi-extension/dist/index.js.map +1 -0
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts +82 -0
- package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js +145 -0
- package/tmlpd-pi-extension/dist/memory/episodicMemory.js.map +1 -0
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts +102 -0
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js +207 -0
- package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js.map +1 -0
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts +85 -0
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js +210 -0
- package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js.map +1 -0
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts +102 -0
- package/tmlpd-pi-extension/dist/providers/localProvider.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/providers/localProvider.js +338 -0
- package/tmlpd-pi-extension/dist/providers/localProvider.js.map +1 -0
- package/tmlpd-pi-extension/dist/providers/registry.d.ts +55 -0
- package/tmlpd-pi-extension/dist/providers/registry.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/providers/registry.js +138 -0
- package/tmlpd-pi-extension/dist/providers/registry.js.map +1 -0
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts +68 -0
- package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js +332 -0
- package/tmlpd-pi-extension/dist/routing/advancedRouter.js.map +1 -0
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts +101 -0
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js +368 -0
- package/tmlpd-pi-extension/dist/tools/tmlpdTools.js.map +1 -0
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts +96 -0
- package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js +170 -0
- package/tmlpd-pi-extension/dist/utils/batchProcessor.js.map +1 -0
- package/tmlpd-pi-extension/dist/utils/compression.d.ts +61 -0
- package/tmlpd-pi-extension/dist/utils/compression.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/utils/compression.js +281 -0
- package/tmlpd-pi-extension/dist/utils/compression.js.map +1 -0
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts +74 -0
- package/tmlpd-pi-extension/dist/utils/reliability.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/utils/reliability.js +177 -0
- package/tmlpd-pi-extension/dist/utils/reliability.js.map +1 -0
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts +117 -0
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js +246 -0
- package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js.map +1 -0
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts +50 -0
- package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts.map +1 -0
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js +124 -0
- package/tmlpd-pi-extension/dist/utils/tokenUtils.js.map +1 -0
- package/tmlpd-pi-extension/examples/QUICKSTART.md +183 -0
- package/tmlpd-pi-extension/package-lock.json +75 -0
- package/tmlpd-pi-extension/package.json +172 -0
- package/tmlpd-pi-extension/python/examples.py +53 -0
- package/tmlpd-pi-extension/python/integrations.py +330 -0
- package/tmlpd-pi-extension/python/setup.py +28 -0
- package/tmlpd-pi-extension/python/tmlpd.py +369 -0
- package/tmlpd-pi-extension/qna/REDDIT_GAP_ANALYSIS.md +299 -0
- package/tmlpd-pi-extension/qna/TMLPD_QNA.md +751 -0
- package/tmlpd-pi-extension/skill/SKILL.md +238 -0
- package/{src → tmlpd-pi-extension/src}/index.ts +1 -1
- package/tmlpd-pi-extension/tsconfig.json +18 -0
- package/demo/research-demo.js +0 -266
- package/notebooks/quickstart.ipynb +0 -157
- package/rust/tmlpd.h +0 -268
- package/src/cache/prefixCache.ts +0 -365
- package/src/routing/advancedRouter.ts +0 -406
- package/src/utils/speculativeDecoding.ts +0 -344
- /package/{src → tmlpd-pi-extension/src}/cache/responseCache.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/cost/costTracker.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/memory/episodicMemory.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/orchestration/haloOrchestrator.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/orchestration/mctsWorkflow.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/providers/localProvider.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/providers/registry.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/tools/tmlpdTools.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/utils/batchProcessor.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/utils/compression.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/utils/reliability.ts +0 -0
- /package/{src → tmlpd-pi-extension/src}/utils/tokenUtils.ts +0 -0
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
# TreeQuest Multi-LLM Parallel Deployment Strategy
|
|
2
|
+
|
|
3
|
+
**Shortcut:** `/TMLPD`
|
|
4
|
+
|
|
5
|
+
**Description:** Deploy multiple TreeQuest AI agents in parallel using multiple LLM providers for complex, multi-phase development tasks. This skill orchestrates parallel execution across different AI models to maximize throughput, leverage diverse capabilities, and accelerate project completion.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Overview
|
|
10
|
+
|
|
11
|
+
This strategy enables parallel deployment of TreeQuest agents across multiple LLM providers simultaneously, each handling specialized aspects of a project. By leveraging the strengths of different AI models (e.g., Claude for reasoning, GPT-4 for code generation, Gemini for research), we can:
|
|
12
|
+
|
|
13
|
+
- **Accelerate Development:** Execute multiple independent tasks in parallel
|
|
14
|
+
- **Optimize Cost-Performance:** Route tasks to the most cost-effective suitable model
|
|
15
|
+
- **Leverage Specialized Capabilities:** Use models for their strengths (vision, reasoning, coding, research)
|
|
16
|
+
- **Ensure Redundancy:** Run critical tasks on multiple models for verification
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
### Required Setup
|
|
23
|
+
|
|
24
|
+
1. **TreeQuest CLI Installed:**
|
|
25
|
+
```bash
|
|
26
|
+
# Check installation
|
|
27
|
+
treequest status
|
|
28
|
+
|
|
29
|
+
# If not installed
|
|
30
|
+
pip install treequest-ai
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
2. **Multiple API Keys Configured:**
|
|
34
|
+
```bash
|
|
35
|
+
# View current configuration
|
|
36
|
+
treequest config --show
|
|
37
|
+
|
|
38
|
+
# Edit configuration to add providers
|
|
39
|
+
# File: ~/.config/treequest/config.yaml
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
3. **Minimum Providers Recommended:**
|
|
43
|
+
- **Anthropic** (Claude Sonnet/Opus) - Complex reasoning and architecture
|
|
44
|
+
- **OpenAI** (GPT-4 Turbo) - Code generation and debugging
|
|
45
|
+
- **Google** (Gemini Pro) - Research and documentation
|
|
46
|
+
- **Groq/Cerebras** (Llama-based) - Fast execution for simple tasks
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Execution Modes
|
|
51
|
+
|
|
52
|
+
### Mode 1: Task-Category Parallelization
|
|
53
|
+
Split different task categories across specialized models.
|
|
54
|
+
|
|
55
|
+
**Best for:** Projects with clearly separated domains (frontend, backend, testing, docs)
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
Strategy:
|
|
59
|
+
- Frontend Development → claude-sonnet-4 (visual/UI focus)
|
|
60
|
+
- Backend API → gpt-4-turbo (code efficiency)
|
|
61
|
+
- Testing Suite → gemini-2.0-flash (test coverage)
|
|
62
|
+
- Documentation → perplexity-llama-3.1 (research-backed)
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Mode 2: Phased Parallel Execution
|
|
66
|
+
Execute project phases in parallel across models.
|
|
67
|
+
|
|
68
|
+
**Best for:** Multi-phase projects with dependencies between phases
|
|
69
|
+
|
|
70
|
+
```yaml
|
|
71
|
+
Strategy:
|
|
72
|
+
- Phase 1 (Architecture) → claude-opus-4 (all providers)
|
|
73
|
+
- Phase 2 (Core Features) → Split across 3 providers
|
|
74
|
+
- Phase 3 (Testing & Polish) → gpt-4o + gemini-2.0-flash
|
|
75
|
+
- Phase 4 (Documentation) → perplexity-llama-3.1-sonar
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### Mode 3: Redundancy & Verification
|
|
79
|
+
Run critical tasks on multiple models for consensus.
|
|
80
|
+
|
|
81
|
+
**Best for:** Critical code, security fixes, production deployments
|
|
82
|
+
|
|
83
|
+
```yaml
|
|
84
|
+
Strategy:
|
|
85
|
+
- Task 1 (Security Fix) → claude-opus-4 + gpt-4o (parallel)
|
|
86
|
+
- Task 2 (Core Logic) → claude-sonnet-4 + gemini-2.5-pro
|
|
87
|
+
- Compare results → Merge best solutions
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Quick Start Commands
|
|
93
|
+
|
|
94
|
+
### 1. System Health Check
|
|
95
|
+
```bash
|
|
96
|
+
# Test all providers
|
|
97
|
+
treequest test
|
|
98
|
+
|
|
99
|
+
# Check working providers
|
|
100
|
+
treequest status
|
|
101
|
+
|
|
102
|
+
# List available providers
|
|
103
|
+
treequest providers
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### 2. Parallel Deployment - Category Mode
|
|
107
|
+
```bash
|
|
108
|
+
# Deploy 4 parallel agents for different categories
|
|
109
|
+
treequest-parallel \
|
|
110
|
+
--agents=4 \
|
|
111
|
+
--mode=category \
|
|
112
|
+
--config=tmlpd-category.yaml
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 3. Parallel Deployment - Phase Mode
|
|
116
|
+
```bash
|
|
117
|
+
# Deploy phases across multiple models
|
|
118
|
+
treequest-parallel \
|
|
119
|
+
--agents=6 \
|
|
120
|
+
--mode=phase \
|
|
121
|
+
--config=tmlpd-phase.yaml
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### 4. Verification Mode
|
|
125
|
+
```bash
|
|
126
|
+
# Run task on 3 models for verification
|
|
127
|
+
treequest-parallel \
|
|
128
|
+
--agents=3 \
|
|
129
|
+
--mode=verification \
|
|
130
|
+
--task="Implement authentication system"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Configuration Files
|
|
136
|
+
|
|
137
|
+
### tmlpd-category.yaml
|
|
138
|
+
```yaml
|
|
139
|
+
deployment:
|
|
140
|
+
name: "TMLPD Category Parallelization"
|
|
141
|
+
agents:
|
|
142
|
+
- id: "frontend-agent"
|
|
143
|
+
provider: "anthropic"
|
|
144
|
+
model: "claude-sonnet-4-20250514"
|
|
145
|
+
focus: "UI components, styling, animations"
|
|
146
|
+
tasks: ["task-frontend-*"]
|
|
147
|
+
|
|
148
|
+
- id: "backend-agent"
|
|
149
|
+
provider: "openai"
|
|
150
|
+
model: "gpt-4-turbo"
|
|
151
|
+
focus: "API endpoints, database, business logic"
|
|
152
|
+
tasks: ["task-backend-*"]
|
|
153
|
+
|
|
154
|
+
- id: "testing-agent"
|
|
155
|
+
provider: "google"
|
|
156
|
+
model: "gemini-2.0-flash-exp"
|
|
157
|
+
focus: "Unit tests, integration tests, e2e tests"
|
|
158
|
+
tasks: ["task-testing-*"]
|
|
159
|
+
|
|
160
|
+
- id: "docs-agent"
|
|
161
|
+
provider: "perplexity"
|
|
162
|
+
model: "llama-3.1-sonar-large-128k-online"
|
|
163
|
+
focus: "Documentation, README files, API docs"
|
|
164
|
+
tasks: ["task-docs-*"]
|
|
165
|
+
|
|
166
|
+
coordination:
|
|
167
|
+
sync_interval: 300 # 5 minutes
|
|
168
|
+
conflict_resolution: "timestamp"
|
|
169
|
+
merge_strategy: "git-merge"
|
|
170
|
+
|
|
171
|
+
output:
|
|
172
|
+
directory: ".tmlpd-output"
|
|
173
|
+
logs: "tmlpd-logs.json"
|
|
174
|
+
metrics: "tmlpd-metrics.json"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### tmlpd-phase.yaml
|
|
178
|
+
```yaml
|
|
179
|
+
deployment:
|
|
180
|
+
name: "TMLPD Phase Parallelization"
|
|
181
|
+
agents:
|
|
182
|
+
- id: "phase1-architect"
|
|
183
|
+
provider: "anthropic"
|
|
184
|
+
model: "claude-opus-4"
|
|
185
|
+
phase: 1
|
|
186
|
+
focus: "Architecture design, project structure"
|
|
187
|
+
tasks: ["phase-1-*"]
|
|
188
|
+
|
|
189
|
+
- id: "phase2-feature-1"
|
|
190
|
+
provider: "anthropic"
|
|
191
|
+
model: "claude-sonnet-4"
|
|
192
|
+
phase: 2
|
|
193
|
+
focus: "Core features implementation"
|
|
194
|
+
tasks: ["phase-2-core-*"]
|
|
195
|
+
|
|
196
|
+
- id: "phase2-feature-2"
|
|
197
|
+
provider: "openai"
|
|
198
|
+
model: "gpt-4-turbo"
|
|
199
|
+
phase: 2
|
|
200
|
+
focus: "Secondary features implementation"
|
|
201
|
+
tasks: ["phase-2-secondary-*"]
|
|
202
|
+
|
|
203
|
+
- id: "phase3-testing"
|
|
204
|
+
provider: "google"
|
|
205
|
+
model: "gemini-2.5-pro"
|
|
206
|
+
phase: 3
|
|
207
|
+
focus: "Comprehensive testing suite"
|
|
208
|
+
tasks: ["phase-3-*"]
|
|
209
|
+
|
|
210
|
+
- id: "phase4-deployment"
|
|
211
|
+
provider: "anthropic"
|
|
212
|
+
model: "claude-sonnet-4"
|
|
213
|
+
phase: 4
|
|
214
|
+
focus: "Deployment preparation, CI/CD"
|
|
215
|
+
tasks: ["phase-4-*"]
|
|
216
|
+
|
|
217
|
+
- id: "phase4-documentation"
|
|
218
|
+
provider: "perplexity"
|
|
219
|
+
model: "llama-3.1-sonar-large-128k-online"
|
|
220
|
+
phase: 4
|
|
221
|
+
focus: "Final documentation, user guides"
|
|
222
|
+
tasks: ["phase-4-docs-*"]
|
|
223
|
+
|
|
224
|
+
coordination:
|
|
225
|
+
phase_gating: true
|
|
226
|
+
wait_for_dependencies: true
|
|
227
|
+
sync_interval: 180
|
|
228
|
+
|
|
229
|
+
output:
|
|
230
|
+
directory: ".tmlpd-phases"
|
|
231
|
+
logs: "phase-logs.json"
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
---
|
|
235
|
+
|
|
236
|
+
## Implementation Workflow
|
|
237
|
+
|
|
238
|
+
### Step 1: Pre-Deployment Analysis
|
|
239
|
+
```bash
|
|
240
|
+
# Analyze project complexity and task count
|
|
241
|
+
cd /path/to/project
|
|
242
|
+
|
|
243
|
+
# If using TaskMaster
|
|
244
|
+
task-master analyze-complexity --research
|
|
245
|
+
|
|
246
|
+
# Get task count
|
|
247
|
+
task-master list --status=pending | wc -l
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Step 2: Create Deployment Plan
|
|
251
|
+
```bash
|
|
252
|
+
# Generate deployment config based on project
|
|
253
|
+
cat > .tmlpd-plan.yaml << EOF
|
|
254
|
+
deployment:
|
|
255
|
+
project_name: "brain-spark-analysis"
|
|
256
|
+
total_tasks: 25
|
|
257
|
+
parallel_strategy: "category"
|
|
258
|
+
agents_required: 4
|
|
259
|
+
estimated_duration: "45 minutes"
|
|
260
|
+
EOF
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Step 3: Deploy Parallel Agents
|
|
264
|
+
```bash
|
|
265
|
+
# Launch parallel deployment
|
|
266
|
+
treequest-parallel \
|
|
267
|
+
--config=.tmlpd-plan.yaml \
|
|
268
|
+
--background \
|
|
269
|
+
--monitor
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### Step 4: Monitor Execution
|
|
273
|
+
```bash
|
|
274
|
+
# Real-time monitoring
|
|
275
|
+
watch -n 10 'treequest status'
|
|
276
|
+
|
|
277
|
+
# View agent logs
|
|
278
|
+
tail -f .tmlpd-output/tmlpd-logs.json
|
|
279
|
+
|
|
280
|
+
# Check progress
|
|
281
|
+
treequest-parallel --status
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
### Step 5: Merge & Validate
|
|
285
|
+
```bash
|
|
286
|
+
# Merge all agent outputs
|
|
287
|
+
treequest-parallel --merge
|
|
288
|
+
|
|
289
|
+
# Run validation
|
|
290
|
+
treequest-parallel --validate
|
|
291
|
+
|
|
292
|
+
# Generate completion report
|
|
293
|
+
treequest-parallel --report > completion-report.md
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## Advanced Features
|
|
299
|
+
|
|
300
|
+
### Dynamic Load Balancing
|
|
301
|
+
```yaml
|
|
302
|
+
coordination:
|
|
303
|
+
load_balancing: "dynamic"
|
|
304
|
+
rebalance_interval: 120 # 2 minutes
|
|
305
|
+
overload_threshold: 3 # tasks pending
|
|
306
|
+
strategy: "work-stealing"
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
### Cost Optimization
|
|
310
|
+
```yaml
|
|
311
|
+
cost_optimization:
|
|
312
|
+
enabled: true
|
|
313
|
+
budget_limit: 50.00 # USD
|
|
314
|
+
prefer_cached: true
|
|
315
|
+
fallback_models:
|
|
316
|
+
- provider: "groq"
|
|
317
|
+
model: "llama-3.3-70b-versatile"
|
|
318
|
+
cost_multiplier: 0.1
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
### Error Recovery
|
|
322
|
+
```yaml
|
|
323
|
+
error_handling:
|
|
324
|
+
retry_policy: "exponential_backoff"
|
|
325
|
+
max_retries: 3
|
|
326
|
+
fallback_on_failure: true
|
|
327
|
+
checkpoint_interval: 600 # 10 minutes
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
---
|
|
331
|
+
|
|
332
|
+
## Integration with Brain Spark Project
|
|
333
|
+
|
|
334
|
+
### Example: Brain Spark Mobile App Enhancement
|
|
335
|
+
```bash
|
|
336
|
+
cd ~/brain-spark-analysis-project
|
|
337
|
+
|
|
338
|
+
# Deploy for UI enhancement tasks
|
|
339
|
+
treequest-parallel \
|
|
340
|
+
--agents=5 \
|
|
341
|
+
--mode=category \
|
|
342
|
+
--tasks="task-ui-*,task-accessibility-*,task-i18n-*" \
|
|
343
|
+
--providers="anthropic,openai,google,groq,cerebras" \
|
|
344
|
+
--background
|
|
345
|
+
|
|
346
|
+
# Monitor progress
|
|
347
|
+
treequest-parallel --monitor --refresh=30
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
### TaskMaster Integration
|
|
351
|
+
```bash
|
|
352
|
+
# Combine with TaskMaster for project management
|
|
353
|
+
task-master parse-prd .taskmaster/docs/ui_enhancement_prd.txt
|
|
354
|
+
task-master expand --all --research
|
|
355
|
+
|
|
356
|
+
# Deploy TreeQuest agents on expanded tasks
|
|
357
|
+
treequest-parallel \
|
|
358
|
+
--source=taskmaster \
|
|
359
|
+
--agents=4 \
|
|
360
|
+
--config=.tmlpd-brainspark.yaml
|
|
361
|
+
```
|
|
362
|
+
|
|
363
|
+
---
|
|
364
|
+
|
|
365
|
+
## Performance Benchmarks
|
|
366
|
+
|
|
367
|
+
### Expected Performance Gains
|
|
368
|
+
|
|
369
|
+
| Scenario | Sequential Time | Parallel Time (4 agents) | Speedup |
|
|
370
|
+
|----------|----------------|--------------------------|---------|
|
|
371
|
+
| 25 tasks, mixed complexity | 120 min | 35 min | **3.4x** |
|
|
372
|
+
| 50 tasks, research-heavy | 240 min | 65 min | **3.7x** |
|
|
373
|
+
| 100 tasks, full-stack dev | 480 min | 120 min | **4.0x** |
|
|
374
|
+
|
|
375
|
+
### Cost Optimization
|
|
376
|
+
|
|
377
|
+
**Optimal Provider Selection:**
|
|
378
|
+
- Simple tasks (tests, docs) → Groq/Cerebras (10x cheaper)
|
|
379
|
+
- Complex reasoning → Claude Sonnet (balanced cost/performance)
|
|
380
|
+
- Critical architecture → Claude Opus (quality over cost)
|
|
381
|
+
- Research tasks → Perplexity Sonar (web access included)
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
## Troubleshooting
|
|
386
|
+
|
|
387
|
+
### Issue: Agent Failure
|
|
388
|
+
```bash
|
|
389
|
+
# Check failed agent logs
|
|
390
|
+
treequest-parallel --logs --agent=frontend-agent
|
|
391
|
+
|
|
392
|
+
# Restart failed agent
|
|
393
|
+
treequest-parallel --restart-agent=frontend-agent
|
|
394
|
+
|
|
395
|
+
# Resume from checkpoint
|
|
396
|
+
treequest-parallel --resume-checkpoint
|
|
397
|
+
```
|
|
398
|
+
|
|
399
|
+
### Issue: Resource Exhaustion
|
|
400
|
+
```bash
|
|
401
|
+
# Reduce agent count
|
|
402
|
+
treequest-parallel --config=.tmlpd-plan.yaml --agents=2
|
|
403
|
+
|
|
404
|
+
# Enable rate limiting
|
|
405
|
+
treequest-parallel --rate-limit=5 # requests per minute
|
|
406
|
+
```
|
|
407
|
+
|
|
408
|
+
### Issue: Merge Conflicts
|
|
409
|
+
```bash
|
|
410
|
+
# Auto-resolve with timestamp strategy
|
|
411
|
+
treequest-parallel --merge-conflicts --strategy=timestamp
|
|
412
|
+
|
|
413
|
+
# Manual resolution
|
|
414
|
+
treequest-parallel --merge-conflicts --strategy=manual
|
|
415
|
+
```
|
|
416
|
+
|
|
417
|
+
---
|
|
418
|
+
|
|
419
|
+
## Best Practices
|
|
420
|
+
|
|
421
|
+
1. **Start Small:** Begin with 2-3 agents, scale up based on success
|
|
422
|
+
2. **Monitor Closely:** Use real-time monitoring in first deployments
|
|
423
|
+
3. **Set Budgets:** Always configure cost limits to prevent overruns
|
|
424
|
+
4. **Use Checkpoints:** Enable checkpointing for long-running tasks
|
|
425
|
+
5. **Validate Outputs:** Always run validation after parallel execution
|
|
426
|
+
6. **Document Strategy:** Keep deployment configs in version control
|
|
427
|
+
7. **Profile First:** Run test deployment to measure actual throughput
|
|
428
|
+
|
|
429
|
+
---
|
|
430
|
+
|
|
431
|
+
## Example Commands for Brain Spark
|
|
432
|
+
|
|
433
|
+
### Quick 4-Agent Deployment
|
|
434
|
+
```bash
|
|
435
|
+
cd ~/brain-spark-analysis-project
|
|
436
|
+
|
|
437
|
+
# Deploy for pending testing tasks
|
|
438
|
+
treequest-parallel \
|
|
439
|
+
--agents=4 \
|
|
440
|
+
--mode=category \
|
|
441
|
+
--filter="status=pending,category=testing" \
|
|
442
|
+
--providers="anthropic,openai,google,groq" \
|
|
443
|
+
--output=.tmlpd-output \
|
|
444
|
+
--background
|
|
445
|
+
|
|
446
|
+
# Check progress
|
|
447
|
+
treequest-parallel --status
|
|
448
|
+
```
|
|
449
|
+
|
|
450
|
+
### Research & Documentation Sprint
|
|
451
|
+
```bash
|
|
452
|
+
# Deploy research-focused agents
|
|
453
|
+
treequest-parallel \
|
|
454
|
+
--agents=3 \
|
|
455
|
+
--mode=specialized \
|
|
456
|
+
--focus="research,documentation,analysis" \
|
|
457
|
+
--providers="perplexity,google,anthropic" \
|
|
458
|
+
--budget=30.00 \
|
|
459
|
+
--timeout=3600
|
|
460
|
+
```
|
|
461
|
+
|
|
462
|
+
---
|
|
463
|
+
|
|
464
|
+
## Monitoring & Metrics
|
|
465
|
+
|
|
466
|
+
### Real-Time Dashboard
|
|
467
|
+
```bash
|
|
468
|
+
# Launch monitoring dashboard
|
|
469
|
+
treequest-parallel --dashboard
|
|
470
|
+
|
|
471
|
+
# View metrics
|
|
472
|
+
treequest-parallel --metrics
|
|
473
|
+
|
|
474
|
+
# Export performance data
|
|
475
|
+
treequest-parallel --export-metrics > metrics-$(date +%s).json
|
|
476
|
+
```
|
|
477
|
+
|
|
478
|
+
### Key Metrics Tracked
|
|
479
|
+
- **Tasks Completed:** Total tasks finished per agent
|
|
480
|
+
- **Average Latency:** Response time per provider
|
|
481
|
+
- **Cost Accumulation:** Running cost total
|
|
482
|
+
- **Error Rate:** Failed task percentage
|
|
483
|
+
- **Throughput:** Tasks per minute per agent
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
## Exit Strategy
|
|
488
|
+
|
|
489
|
+
### Graceful Shutdown
|
|
490
|
+
```bash
|
|
491
|
+
# Stop all agents gracefully
|
|
492
|
+
treequest-parallel --shutdown --graceful
|
|
493
|
+
|
|
494
|
+
# Force shutdown (emergency)
|
|
495
|
+
treequest-parallel --shutdown --force
|
|
496
|
+
|
|
497
|
+
# Save partial progress
|
|
498
|
+
treequest-parallel --save-checkpoint
|
|
499
|
+
```
|
|
500
|
+
|
|
501
|
+
### Resume Operations
|
|
502
|
+
```bash
|
|
503
|
+
# Resume from last checkpoint
|
|
504
|
+
treequest-parallel --resume
|
|
505
|
+
|
|
506
|
+
# Resume specific agent
|
|
507
|
+
treequest-parallel --resume-agent=frontend-agent
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
---
|
|
511
|
+
|
|
512
|
+
## Configuration Templates
|
|
513
|
+
|
|
514
|
+
Copy these templates to your project for quick deployment:
|
|
515
|
+
|
|
516
|
+
```bash
|
|
517
|
+
# Copy category template
|
|
518
|
+
cp ~/.claude/skills/tmlpd-category.yaml ~/brain-spark-analysis-project/
|
|
519
|
+
|
|
520
|
+
# Copy phase template
|
|
521
|
+
cp ~/.claude/skills/tmlpd-phase.yaml ~/brain-spark-analysis-project/
|
|
522
|
+
|
|
523
|
+
# Copy monitoring config
|
|
524
|
+
cp ~/.claude/skills/tmlpd-monitoring.yaml ~/brain-spark-analysis-project/
|
|
525
|
+
```
|
|
526
|
+
|
|
527
|
+
---
|
|
528
|
+
|
|
529
|
+
## Support & Resources
|
|
530
|
+
|
|
531
|
+
- **TreeQuest Docs:** https://github.com/treequest-ai/treequest
|
|
532
|
+
- **Issue Tracker:** https://github.com/treequest-ai/issues
|
|
533
|
+
- **Config Examples:** `~/.config/treequest/examples/`
|
|
534
|
+
- **Logs:** `~/.treequest/logs/`
|
|
535
|
+
|
|
536
|
+
---
|
|
537
|
+
|
|
538
|
+
**Version:** 1.0.0
|
|
539
|
+
**Last Updated:** 2026-01-01
|
|
540
|
+
**Maintained By:** TreeQuest AI Community
|