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.
Files changed (195) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +146 -66
  3. package/dist/index.d.ts +1 -1
  4. package/dist/index.js +1 -1
  5. package/dist/integrations/airtable.js +20 -0
  6. package/dist/integrations/discord.js +18 -0
  7. package/dist/integrations/github.js +23 -0
  8. package/dist/integrations/gmail.js +19 -0
  9. package/dist/integrations/google-calendar.js +18 -0
  10. package/dist/integrations/index.js +61 -0
  11. package/dist/integrations/jira.js +21 -0
  12. package/dist/integrations/linear.js +19 -0
  13. package/dist/integrations/notion.js +19 -0
  14. package/dist/integrations/slack.js +18 -0
  15. package/dist/integrations/telegram.js +19 -0
  16. package/dist/providers/registry.js +7 -3
  17. package/docs/ARCHITECTURAL-IMPROVEMENTS-2025.md +1391 -0
  18. package/docs/ARCHITECTURAL-IMPROVEMENTS-REVISED-2025.md +1051 -0
  19. package/docs/CONFIGURATION.md +476 -0
  20. package/docs/COUNCIL_DECISION.json +308 -0
  21. package/docs/COUNCIL_SUMMARY.md +265 -0
  22. package/docs/COUNCIL_V2.2_DECISION.md +416 -0
  23. package/docs/IMPROVEMENT_ROADMAP.md +515 -0
  24. package/docs/LLM_COUNCIL_DECISION.md +508 -0
  25. package/docs/QUICK_START_VISIBILITY.md +782 -0
  26. package/docs/REDDIT_GAP_ANALYSIS.md +299 -0
  27. package/docs/RESEARCH_BACKED_IMPROVEMENTS.md +1180 -0
  28. package/docs/TMLPD_QNA.md +751 -0
  29. package/docs/TMLPD_V2.1_COMPLETE.md +763 -0
  30. package/docs/TMLPD_V2.2_RESEARCH_ROADMAP.md +754 -0
  31. package/docs/V2.2_IMPLEMENTATION_COMPLETE.md +446 -0
  32. package/docs/V2_IMPLEMENTATION_GUIDE.md +388 -0
  33. package/docs/VISIBILITY_ADOPTION_PLAN.md +1005 -0
  34. package/docs/launch-content/LAUNCH_EXECUTION_CHECKLIST.md +421 -0
  35. package/docs/launch-content/README.md +457 -0
  36. package/docs/launch-content/assets/cost_comparison_100_tasks.png +0 -0
  37. package/docs/launch-content/assets/cumulative_savings.png +0 -0
  38. package/docs/launch-content/assets/parallel_speedup.png +0 -0
  39. package/docs/launch-content/assets/provider_pricing_comparison.png +0 -0
  40. package/docs/launch-content/assets/task_breakdown_comparison.png +0 -0
  41. package/docs/launch-content/generate_charts.py +313 -0
  42. package/docs/launch-content/hn_show_post.md +139 -0
  43. package/docs/launch-content/partner_outreach_templates.md +745 -0
  44. package/docs/launch-content/reddit_posts.md +467 -0
  45. package/docs/launch-content/twitter_thread.txt +460 -0
  46. package/examples/QUICKSTART.md +1 -1
  47. package/openclaw-alexa-bridge/ALL_REMAINING_FIXES_PLAN.md +313 -0
  48. package/openclaw-alexa-bridge/REMAINING_FIXES_SUMMARY.md +277 -0
  49. package/openclaw-alexa-bridge/src/alexa_handler_no_tmlpd.js +1234 -0
  50. package/openclaw-alexa-bridge/test_fixes.js +77 -0
  51. package/package.json +120 -29
  52. package/package.json.tmp +0 -0
  53. package/qna/TMLPD_QNA.md +3 -3
  54. package/skill/SKILL.md +2 -2
  55. package/src/__tests__/integration/tmpld_integration.test.py +540 -0
  56. package/src/agents/skill_enhanced_agent.py +318 -0
  57. package/src/memory/__init__.py +15 -0
  58. package/src/memory/agentic_memory.py +353 -0
  59. package/src/memory/semantic_memory.py +444 -0
  60. package/src/memory/simple_memory.py +466 -0
  61. package/src/memory/working_memory.py +447 -0
  62. package/src/orchestration/__init__.py +52 -0
  63. package/src/orchestration/execution_engine.py +353 -0
  64. package/src/orchestration/halo_orchestrator.py +367 -0
  65. package/src/orchestration/mcts_workflow.py +498 -0
  66. package/src/orchestration/role_assigner.py +473 -0
  67. package/src/orchestration/task_planner.py +522 -0
  68. package/src/providers/__init__.py +67 -0
  69. package/src/providers/anthropic.py +304 -0
  70. package/src/providers/base.py +241 -0
  71. package/src/providers/cerebras.py +373 -0
  72. package/src/providers/registry.py +476 -0
  73. package/src/routing/__init__.py +30 -0
  74. package/src/routing/universal_router.py +621 -0
  75. package/src/skills/TMLPD-QUICKREF.md +210 -0
  76. package/src/skills/TMLPD-SETUP-SUMMARY.md +157 -0
  77. package/src/skills/TMLPD.md +540 -0
  78. package/src/skills/__tests__/skill_manager.test.ts +328 -0
  79. package/src/skills/skill_manager.py +385 -0
  80. package/src/skills/test-tmlpd.sh +108 -0
  81. package/src/skills/tmlpd-category.yaml +67 -0
  82. package/src/skills/tmlpd-monitoring.yaml +188 -0
  83. package/src/skills/tmlpd-phase.yaml +132 -0
  84. package/src/state/__init__.py +17 -0
  85. package/src/state/simple_checkpoint.py +508 -0
  86. package/src/tmlpd_agent.py +464 -0
  87. package/src/tmpld_v2.py +427 -0
  88. package/src/workflows/__init__.py +18 -0
  89. package/src/workflows/advanced_difficulty_classifier.py +377 -0
  90. package/src/workflows/chaining_executor.py +417 -0
  91. package/src/workflows/difficulty_integration.py +209 -0
  92. package/src/workflows/orchestrator.py +469 -0
  93. package/src/workflows/orchestrator_executor.py +456 -0
  94. package/src/workflows/parallelization_executor.py +382 -0
  95. package/src/workflows/router.py +311 -0
  96. package/test_integration_simple.py +86 -0
  97. package/test_mcts_workflow.py +150 -0
  98. package/test_templd_integration.py +262 -0
  99. package/test_universal_router.py +275 -0
  100. package/tmlpd-pi-extension/README.md +36 -0
  101. package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts +114 -0
  102. package/tmlpd-pi-extension/dist/cache/prefixCache.d.ts.map +1 -0
  103. package/tmlpd-pi-extension/dist/cache/prefixCache.js +285 -0
  104. package/tmlpd-pi-extension/dist/cache/prefixCache.js.map +1 -0
  105. package/tmlpd-pi-extension/dist/cache/responseCache.d.ts +58 -0
  106. package/tmlpd-pi-extension/dist/cache/responseCache.d.ts.map +1 -0
  107. package/tmlpd-pi-extension/dist/cache/responseCache.js +153 -0
  108. package/tmlpd-pi-extension/dist/cache/responseCache.js.map +1 -0
  109. package/tmlpd-pi-extension/dist/cli.js +59 -0
  110. package/tmlpd-pi-extension/dist/cost/costTracker.d.ts +95 -0
  111. package/tmlpd-pi-extension/dist/cost/costTracker.d.ts.map +1 -0
  112. package/tmlpd-pi-extension/dist/cost/costTracker.js +240 -0
  113. package/tmlpd-pi-extension/dist/cost/costTracker.js.map +1 -0
  114. package/tmlpd-pi-extension/dist/index.d.ts +723 -0
  115. package/tmlpd-pi-extension/dist/index.d.ts.map +1 -0
  116. package/tmlpd-pi-extension/dist/index.js +239 -0
  117. package/tmlpd-pi-extension/dist/index.js.map +1 -0
  118. package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts +82 -0
  119. package/tmlpd-pi-extension/dist/memory/episodicMemory.d.ts.map +1 -0
  120. package/tmlpd-pi-extension/dist/memory/episodicMemory.js +145 -0
  121. package/tmlpd-pi-extension/dist/memory/episodicMemory.js.map +1 -0
  122. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts +102 -0
  123. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.d.ts.map +1 -0
  124. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js +207 -0
  125. package/tmlpd-pi-extension/dist/orchestration/haloOrchestrator.js.map +1 -0
  126. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts +85 -0
  127. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.d.ts.map +1 -0
  128. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js +210 -0
  129. package/tmlpd-pi-extension/dist/orchestration/mctsWorkflow.js.map +1 -0
  130. package/tmlpd-pi-extension/dist/providers/localProvider.d.ts +102 -0
  131. package/tmlpd-pi-extension/dist/providers/localProvider.d.ts.map +1 -0
  132. package/tmlpd-pi-extension/dist/providers/localProvider.js +338 -0
  133. package/tmlpd-pi-extension/dist/providers/localProvider.js.map +1 -0
  134. package/tmlpd-pi-extension/dist/providers/registry.d.ts +55 -0
  135. package/tmlpd-pi-extension/dist/providers/registry.d.ts.map +1 -0
  136. package/tmlpd-pi-extension/dist/providers/registry.js +138 -0
  137. package/tmlpd-pi-extension/dist/providers/registry.js.map +1 -0
  138. package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts +68 -0
  139. package/tmlpd-pi-extension/dist/routing/advancedRouter.d.ts.map +1 -0
  140. package/tmlpd-pi-extension/dist/routing/advancedRouter.js +332 -0
  141. package/tmlpd-pi-extension/dist/routing/advancedRouter.js.map +1 -0
  142. package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts +101 -0
  143. package/tmlpd-pi-extension/dist/tools/tmlpdTools.d.ts.map +1 -0
  144. package/tmlpd-pi-extension/dist/tools/tmlpdTools.js +368 -0
  145. package/tmlpd-pi-extension/dist/tools/tmlpdTools.js.map +1 -0
  146. package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts +96 -0
  147. package/tmlpd-pi-extension/dist/utils/batchProcessor.d.ts.map +1 -0
  148. package/tmlpd-pi-extension/dist/utils/batchProcessor.js +170 -0
  149. package/tmlpd-pi-extension/dist/utils/batchProcessor.js.map +1 -0
  150. package/tmlpd-pi-extension/dist/utils/compression.d.ts +61 -0
  151. package/tmlpd-pi-extension/dist/utils/compression.d.ts.map +1 -0
  152. package/tmlpd-pi-extension/dist/utils/compression.js +281 -0
  153. package/tmlpd-pi-extension/dist/utils/compression.js.map +1 -0
  154. package/tmlpd-pi-extension/dist/utils/reliability.d.ts +74 -0
  155. package/tmlpd-pi-extension/dist/utils/reliability.d.ts.map +1 -0
  156. package/tmlpd-pi-extension/dist/utils/reliability.js +177 -0
  157. package/tmlpd-pi-extension/dist/utils/reliability.js.map +1 -0
  158. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts +117 -0
  159. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.d.ts.map +1 -0
  160. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js +246 -0
  161. package/tmlpd-pi-extension/dist/utils/speculativeDecoding.js.map +1 -0
  162. package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts +50 -0
  163. package/tmlpd-pi-extension/dist/utils/tokenUtils.d.ts.map +1 -0
  164. package/tmlpd-pi-extension/dist/utils/tokenUtils.js +124 -0
  165. package/tmlpd-pi-extension/dist/utils/tokenUtils.js.map +1 -0
  166. package/tmlpd-pi-extension/examples/QUICKSTART.md +183 -0
  167. package/tmlpd-pi-extension/package-lock.json +75 -0
  168. package/tmlpd-pi-extension/package.json +172 -0
  169. package/tmlpd-pi-extension/python/examples.py +53 -0
  170. package/tmlpd-pi-extension/python/integrations.py +330 -0
  171. package/tmlpd-pi-extension/python/setup.py +28 -0
  172. package/tmlpd-pi-extension/python/tmlpd.py +369 -0
  173. package/tmlpd-pi-extension/qna/REDDIT_GAP_ANALYSIS.md +299 -0
  174. package/tmlpd-pi-extension/qna/TMLPD_QNA.md +751 -0
  175. package/tmlpd-pi-extension/skill/SKILL.md +238 -0
  176. package/{src → tmlpd-pi-extension/src}/index.ts +1 -1
  177. package/tmlpd-pi-extension/tsconfig.json +18 -0
  178. package/demo/research-demo.js +0 -266
  179. package/notebooks/quickstart.ipynb +0 -157
  180. package/rust/tmlpd.h +0 -268
  181. package/src/cache/prefixCache.ts +0 -365
  182. package/src/routing/advancedRouter.ts +0 -406
  183. package/src/utils/speculativeDecoding.ts +0 -344
  184. /package/{src → tmlpd-pi-extension/src}/cache/responseCache.ts +0 -0
  185. /package/{src → tmlpd-pi-extension/src}/cost/costTracker.ts +0 -0
  186. /package/{src → tmlpd-pi-extension/src}/memory/episodicMemory.ts +0 -0
  187. /package/{src → tmlpd-pi-extension/src}/orchestration/haloOrchestrator.ts +0 -0
  188. /package/{src → tmlpd-pi-extension/src}/orchestration/mctsWorkflow.ts +0 -0
  189. /package/{src → tmlpd-pi-extension/src}/providers/localProvider.ts +0 -0
  190. /package/{src → tmlpd-pi-extension/src}/providers/registry.ts +0 -0
  191. /package/{src → tmlpd-pi-extension/src}/tools/tmlpdTools.ts +0 -0
  192. /package/{src → tmlpd-pi-extension/src}/utils/batchProcessor.ts +0 -0
  193. /package/{src → tmlpd-pi-extension/src}/utils/compression.ts +0 -0
  194. /package/{src → tmlpd-pi-extension/src}/utils/reliability.ts +0 -0
  195. /package/{src → tmlpd-pi-extension/src}/utils/tokenUtils.ts +0 -0
@@ -0,0 +1,476 @@
1
+ # TMLPD Configuration Guide
2
+
3
+ Complete guide for configuring TMLPD deployments.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Basic Configuration](#basic-configuration)
8
+ - [Agent Configuration](#agent-configuration)
9
+ - [Coordination Settings](#coordination-settings)
10
+ - [Cost Optimization](#cost-optimization)
11
+ - [Error Handling](#error-handling)
12
+ - [Monitoring & Logging](#monitoring--logging)
13
+ - [Advanced Features](#advanced-features)
14
+
15
+ ## Basic Configuration
16
+
17
+ ### Minimal Configuration
18
+
19
+ ```yaml
20
+ deployment:
21
+ name: "My Deployment"
22
+ agents:
23
+ - id: "agent-1"
24
+ provider: "anthropic"
25
+ model: "claude-sonnet-4"
26
+ focus: "General development"
27
+ ```
28
+
29
+ ### Complete Configuration
30
+
31
+ ```yaml
32
+ deployment:
33
+ name: "Production Deployment"
34
+ description: "Full production deployment with monitoring"
35
+
36
+ agents: [...] # See Agent Configuration
37
+
38
+ coordination: ... # See Coordination Settings
39
+ cost_optimization: ... # See Cost Optimization
40
+ error_handling: ... # See Error Handling
41
+ output: ... # See Output Configuration
42
+ monitoring: ... # See Monitoring Configuration
43
+ ```
44
+
45
+ ## Agent Configuration
46
+
47
+ ### Basic Agent
48
+
49
+ ```yaml
50
+ - id: "my-agent"
51
+ provider: "anthropic"
52
+ model: "claude-sonnet-4"
53
+ focus: "Development tasks"
54
+ ```
55
+
56
+ ### Advanced Agent
57
+
58
+ ```yaml
59
+ - id: "frontend-specialist"
60
+ provider: "anthropic"
61
+ model: "claude-sonnet-4-20250514"
62
+ focus: "React components, TypeScript, styling"
63
+
64
+ # Task filtering
65
+ task_pattern: "task-ui-*|task-frontend-*|task-component-*"
66
+ priority: "high" # critical, high, medium, low
67
+
68
+ # Concurrency
69
+ max_concurrent: 3
70
+
71
+ # Phase (for phase-based deployment)
72
+ phase: 2
73
+ phase_name: "Implementation"
74
+
75
+ # Dependencies
76
+ dependencies: ["phase1-architect"]
77
+
78
+ # Budget (optional)
79
+ budget_limit: 20.00
80
+ ```
81
+
82
+ ### Supported Providers
83
+
84
+ | Provider | Models | Best For |
85
+ |----------|--------|----------|
86
+ | `anthropic` | `claude-opus-4`, `claude-sonnet-4` | Complex reasoning, UI/UX |
87
+ | `openai` | `gpt-4-turbo`, `gpt-4o` | Code generation, debugging |
88
+ | `google` | `gemini-2.0-flash`, `gemini-2.5-pro` | Fast testing, research |
89
+ | `perplexity` | `llama-3.1-sonar-large` | Web-connected research |
90
+ | `groq` | `llama-3.3-70b` | Fast, cost-effective tasks |
91
+ | `cerebras` | `llama-3.3-70b` | High-speed execution |
92
+
93
+ ## Coordination Settings
94
+
95
+ ### Synchronization
96
+
97
+ ```yaml
98
+ coordination:
99
+ # How often agents sync progress (seconds)
100
+ sync_interval: 300 # 5 minutes
101
+
102
+ # How to resolve conflicts
103
+ conflict_resolution: "timestamp" # timestamp, priority-based, manual
104
+
105
+ # How to merge results
106
+ merge_strategy: "git-merge" # git-merge, sequential-phases
107
+
108
+ # Load balancing
109
+ load_balancing: "dynamic" # dynamic, work-stealing, none
110
+
111
+ # Checkpoint frequency
112
+ checkpoint_interval: 600 # 10 minutes
113
+ ```
114
+
115
+ ### Phase Gating
116
+
117
+ ```yaml
118
+ coordination:
119
+ # Wait for phases to complete before starting next
120
+ phase_gating: true
121
+
122
+ # Respect task dependencies
123
+ wait_for_dependencies: true
124
+
125
+ # Rebalance work between agents
126
+ rebalance_interval: 120 # 2 minutes
127
+
128
+ # When to consider an agent overloaded
129
+ overload_threshold: 3 # tasks pending
130
+ ```
131
+
132
+ ## Cost Optimization
133
+
134
+ ### Basic Budget Limits
135
+
136
+ ```yaml
137
+ cost_optimization:
138
+ enabled: true
139
+ budget_limit: 50.00 # USD total
140
+ ```
141
+
142
+ ### Per-Agent Budgets
143
+
144
+ ```yaml
145
+ cost_optimization:
146
+ enabled: true
147
+ budget_limit: 100.00
148
+
149
+ per_agent_budget:
150
+ frontend-agent: 20.00
151
+ backend-agent: 30.00
152
+ testing-agent: 25.00
153
+ docs-agent: 10.00
154
+ remaining: 15.00
155
+ ```
156
+
157
+ ### Cost Optimization Features
158
+
159
+ ```yaml
160
+ cost_optimization:
161
+ enabled: true
162
+ budget_limit: 50.00
163
+
164
+ # Prefer cached responses when available
165
+ prefer_cached: true
166
+
167
+ # Alert when approaching budget
168
+ alert_threshold: 0.80 # Alert at 80% of budget
169
+
170
+ # Stop when budget exceeded
171
+ stop_on_exceed: true
172
+
173
+ # Use fallback models for cost savings
174
+ use_fallback_models: true
175
+ ```
176
+
177
+ ## Error Handling
178
+
179
+ ### Retry Policies
180
+
181
+ ```yaml
182
+ error_handling:
183
+ # Exponential backoff between retries
184
+ retry_policy: "exponential_backoff" # exponential_backoff, linear, none
185
+
186
+ # Maximum retry attempts
187
+ max_retries: 3
188
+
189
+ # Fallback to different model on failure
190
+ fallback_on_failure: true
191
+ ```
192
+
193
+ ### Timeouts
194
+
195
+ ```yaml
196
+ error_handling:
197
+ # Timeout per task (seconds)
198
+ timeout_per_task: 300 # 5 minutes
199
+
200
+ # Timeout for entire deployment
201
+ timeout_total: 3600 # 1 hour
202
+
203
+ # Grace period before force shutdown
204
+ shutdown_grace_period: 60 # 1 minute
205
+ ```
206
+
207
+ ### Checkpointing
208
+
209
+ ```yaml
210
+ error_handling:
211
+ # Save progress periodically
212
+ checkpoint_interval: 600 # 10 minutes
213
+
214
+ # Resume from last checkpoint on failure
215
+ auto_resume: true
216
+
217
+ # Keep checkpoint history
218
+ checkpoint_retention: 5 # Keep last 5 checkpoints
219
+ ```
220
+
221
+ ## Monitoring & Logging
222
+
223
+ ### Basic Logging
224
+
225
+ ```yaml
226
+ logging:
227
+ level: "info" # debug, info, warn, error
228
+ format: "json" # json, text
229
+
230
+ outputs:
231
+ - type: "console"
232
+ enabled: true
233
+
234
+ - type: "file"
235
+ enabled: true
236
+ path: ".tmlpd-logs/deployment.log"
237
+ ```
238
+
239
+ ### Advanced Logging
240
+
241
+ ```yaml
242
+ logging:
243
+ level: "debug"
244
+ format: "json"
245
+
246
+ outputs:
247
+ - type: "console"
248
+ enabled: true
249
+ colorize: true
250
+
251
+ - type: "file"
252
+ enabled: true
253
+ path: ".tmlpd-logs/deployment.log"
254
+ rotation:
255
+ enabled: true
256
+ max_size_mb: 100
257
+ max_files: 10
258
+
259
+ # Structured logging fields
260
+ fields:
261
+ - timestamp
262
+ - agent_id
263
+ - task_id
264
+ - provider
265
+ - model
266
+ - status
267
+ - duration_ms
268
+ - cost_usd
269
+ ```
270
+
271
+ ### Metrics Collection
272
+
273
+ ```yaml
274
+ monitoring:
275
+ metrics:
276
+ enabled: true
277
+ collection_interval: 10 # seconds
278
+ retention_days: 30
279
+
280
+ export_formats:
281
+ - json
282
+ - prometheus
283
+
284
+ # Performance tracking
285
+ performance:
286
+ track_latency: true
287
+ track_throughput: true
288
+ track_cost: true
289
+ track_errors: true
290
+ track_success_rate: true
291
+ ```
292
+
293
+ ### Alerts
294
+
295
+ ```yaml
296
+ monitoring:
297
+ alerts:
298
+ enabled: true
299
+
300
+ channels:
301
+ - type: "console"
302
+ enabled: true
303
+
304
+ - type: "file"
305
+ enabled: true
306
+ path: ".tmlpd-alerts.log"
307
+
308
+ - type: "webhook"
309
+ enabled: false
310
+ url: "https://hooks.example.com/alerts"
311
+
312
+ rules:
313
+ - name: "high_error_rate"
314
+ condition: "error_rate > 0.10"
315
+ severity: "warning"
316
+ message: "Error rate exceeds 10%"
317
+
318
+ - name: "budget_alert"
319
+ condition: "cost > budget_limit * 0.90"
320
+ severity: "critical"
321
+ message: "Approaching budget limit"
322
+ ```
323
+
324
+ ## Advanced Features
325
+
326
+ ### Dynamic Load Balancing
327
+
328
+ ```yaml
329
+ coordination:
330
+ load_balancing: "dynamic"
331
+ rebalance_interval: 120
332
+ overload_threshold: 3
333
+ strategy: "work-stealing"
334
+ ```
335
+
336
+ ### Quality Gates
337
+
338
+ ```yaml
339
+ quality_gates:
340
+ phase_1_complete:
341
+ - "Architecture document approved"
342
+ - "Project structure created"
343
+ - "All dependencies identified"
344
+
345
+ phase_2_complete:
346
+ - "All features implemented"
347
+ - "Code coverage > 80%"
348
+ - "No critical bugs"
349
+
350
+ testing_complete:
351
+ - "Test suite passes"
352
+ - "All tests passing"
353
+ - "Performance benchmarks met"
354
+ ```
355
+
356
+ ### Custom Metrics
357
+
358
+ ```yaml
359
+ monitoring:
360
+ custom_metrics:
361
+ - name: "tasks_per_minute"
362
+ type: "gauge"
363
+ description: "Tasks completed per minute"
364
+
365
+ - name: "average_cost_per_task"
366
+ type: "gauge"
367
+ description: "Average cost per completed task"
368
+
369
+ - name: "provider_success_rate"
370
+ type: "gauge"
371
+ labels: ["provider"]
372
+ description: "Success rate by LLM provider"
373
+ ```
374
+
375
+ ### Health Checks
376
+
377
+ ```yaml
378
+ health_checks:
379
+ enabled: true
380
+ interval: 60 # seconds
381
+
382
+ checks:
383
+ - name: "api_connectivity"
384
+ type: "external"
385
+ url: "https://api.anthropic.com/v1/messages"
386
+
387
+ - name: "disk_space"
388
+ type: "system"
389
+ threshold_gb: 5
390
+
391
+ - name: "memory_usage"
392
+ type: "system"
393
+ threshold_percent: 85
394
+ ```
395
+
396
+ ## Complete Example
397
+
398
+ ```yaml
399
+ deployment:
400
+ name: "Production Deployment"
401
+
402
+ agents:
403
+ - id: "frontend-agent"
404
+ provider: "anthropic"
405
+ model: "claude-sonnet-4"
406
+ focus: "Frontend development"
407
+ max_concurrent: 3
408
+ budget_limit: 20.00
409
+
410
+ - id: "backend-agent"
411
+ provider: "openai"
412
+ model: "gpt-4-turbo"
413
+ focus: "Backend development"
414
+ max_concurrent: 3
415
+ budget_limit: 25.00
416
+
417
+ coordination:
418
+ sync_interval: 300
419
+ conflict_resolution: "timestamp"
420
+ load_balancing: "dynamic"
421
+ checkpoint_interval: 600
422
+
423
+ cost_optimization:
424
+ enabled: true
425
+ budget_limit: 50.00
426
+ alert_threshold: 0.80
427
+
428
+ error_handling:
429
+ retry_policy: "exponential_backoff"
430
+ max_retries: 3
431
+ timeout_per_task: 300
432
+
433
+ logging:
434
+ level: "info"
435
+ format: "json"
436
+ outputs:
437
+ - type: "console"
438
+ enabled: true
439
+ - type: "file"
440
+ enabled: true
441
+ path: ".tmlpd-logs/deployment.log"
442
+
443
+ monitoring:
444
+ metrics:
445
+ enabled: true
446
+ collection_interval: 10
447
+ alerts:
448
+ enabled: true
449
+ ```
450
+
451
+ ## Configuration Validation
452
+
453
+ Validate your configuration before deployment:
454
+
455
+ ```bash
456
+ # Validate YAML syntax
457
+ treequest-parallel --validate-config tmlpd-config.yaml
458
+
459
+ # Dry run (show what would happen)
460
+ treequest-parallel --dry-run --config=tmlpd-config.yaml
461
+
462
+ # Test configuration
463
+ treequest-parallel --test-config tmlpd-config.yaml
464
+ ```
465
+
466
+ ## Best Practices
467
+
468
+ 1. **Start Simple** - Begin with basic configuration, add features gradually
469
+ 2. **Set Budgets** - Always configure budget limits
470
+ 3. **Enable Checkpointing** - For long-running deployments
471
+ 4. **Monitor Closely** - Use alerts for early problem detection
472
+ 5. **Test Locally** - Validate configurations before production use
473
+ 6. **Document Changes** - Keep config files in version control
474
+ 7. **Review Regularly** - Update configurations based on usage patterns
475
+
476
+ For more examples, see the [examples/](../examples/) directory.