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,108 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
# TMLPD Test Script - Verify TreeQuest Multi-LLM Parallel Deployment setup
|
|
3
|
+
|
|
4
|
+
set -e
|
|
5
|
+
|
|
6
|
+
echo "🚀 TMLPD Skill Verification"
|
|
7
|
+
echo "=============================="
|
|
8
|
+
echo ""
|
|
9
|
+
|
|
10
|
+
# Colors
|
|
11
|
+
GREEN='\033[0;32m'
|
|
12
|
+
YELLOW='\033[1;33m'
|
|
13
|
+
RED='\033[0;31m'
|
|
14
|
+
NC='\033[0m' # No Color
|
|
15
|
+
|
|
16
|
+
# Check TreeQuest installation
|
|
17
|
+
echo -n "📦 Checking TreeQuest installation... "
|
|
18
|
+
if command -v treequest &> /dev/null; then
|
|
19
|
+
echo -e "${GREEN}✓ Installed${NC}"
|
|
20
|
+
treequest version 2>/dev/null || treequest --version 2>/dev/null || echo "Version: unknown"
|
|
21
|
+
else
|
|
22
|
+
echo -e "${RED}✗ TreeQuest CLI not found${NC}"
|
|
23
|
+
echo " Install with: pip install treequest-ai"
|
|
24
|
+
exit 1
|
|
25
|
+
fi
|
|
26
|
+
|
|
27
|
+
echo ""
|
|
28
|
+
echo "🔍 Testing Providers..."
|
|
29
|
+
echo "----------------------"
|
|
30
|
+
|
|
31
|
+
# Test if treequest test works
|
|
32
|
+
echo -n " Running provider tests... "
|
|
33
|
+
if treequest test &> /dev/null; then
|
|
34
|
+
echo -e "${GREEN}✓ Test command works${NC}"
|
|
35
|
+
else
|
|
36
|
+
echo -e "${YELLOW}⚠ Test completed with warnings${NC}"
|
|
37
|
+
fi
|
|
38
|
+
|
|
39
|
+
# Check configuration
|
|
40
|
+
echo ""
|
|
41
|
+
echo -n "⚙️ Checking TreeQuest configuration... "
|
|
42
|
+
if [ -f ~/.config/treequest/config.yaml ]; then
|
|
43
|
+
echo -e "${GREEN}✓ Config file exists${NC}"
|
|
44
|
+
echo " Location: ~/.config/treequest/config.yaml"
|
|
45
|
+
else
|
|
46
|
+
echo -e "${YELLOW}⚠ Config not found${NC}"
|
|
47
|
+
echo " Run: treequest init"
|
|
48
|
+
fi
|
|
49
|
+
|
|
50
|
+
# Verify skill files
|
|
51
|
+
echo ""
|
|
52
|
+
echo "📝 Verifying TMLPD Skill Files..."
|
|
53
|
+
echo "--------------------------------"
|
|
54
|
+
|
|
55
|
+
SKILL_FILES=(
|
|
56
|
+
"~/.claude/skills/TMLPD.md"
|
|
57
|
+
"~/.claude/skills/TMLPD-QUICKREF.md"
|
|
58
|
+
"~/.claude/skills/tmlpd-category.yaml"
|
|
59
|
+
"~/.claude/skills/tmlpd-phase.yaml"
|
|
60
|
+
"~/.claude/skills/tmlpd-monitoring.yaml"
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
for file in "${SKILL_FILES[@]}"; do
|
|
64
|
+
expanded_file="${file/#\~/$HOME}"
|
|
65
|
+
if [ -f "$expanded_file" ]; then
|
|
66
|
+
echo -e "${GREEN}✓${NC} $file"
|
|
67
|
+
else
|
|
68
|
+
echo -e "${RED}✗${NC} $file (missing)"
|
|
69
|
+
fi
|
|
70
|
+
done
|
|
71
|
+
|
|
72
|
+
echo ""
|
|
73
|
+
echo "💡 Quick Start Commands:"
|
|
74
|
+
echo "----------------------"
|
|
75
|
+
echo ""
|
|
76
|
+
echo " # From any project:"
|
|
77
|
+
echo " cd /path/to/project"
|
|
78
|
+
echo " /TMLPD"
|
|
79
|
+
echo ""
|
|
80
|
+
echo " # Or use treequest directly:"
|
|
81
|
+
echo " treequest-parallel --agents=4 --mode=category"
|
|
82
|
+
echo ""
|
|
83
|
+
echo " # Check system status:"
|
|
84
|
+
echo " treequest status"
|
|
85
|
+
echo ""
|
|
86
|
+
|
|
87
|
+
echo "📚 Documentation:"
|
|
88
|
+
echo "---------------"
|
|
89
|
+
echo " Full Guide: ~/.claude/skills/TMLPD.md"
|
|
90
|
+
echo " Quick Ref: ~/.claude/skills/TMLPD-QUICKREF.md"
|
|
91
|
+
echo " Configs: ~/.claude/skills/tmlpd-*.yaml"
|
|
92
|
+
echo ""
|
|
93
|
+
|
|
94
|
+
# Get provider count
|
|
95
|
+
if command -v treequest &> /dev/null; then
|
|
96
|
+
echo "🔌 Provider Status:"
|
|
97
|
+
echo "-----------------"
|
|
98
|
+
treequest status 2>/dev/null || echo " Run 'treequest status' for details"
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
echo ""
|
|
102
|
+
echo -e "${GREEN}✓ TMLPD Skill Ready!${NC}"
|
|
103
|
+
echo ""
|
|
104
|
+
echo "Next Steps:"
|
|
105
|
+
echo " 1. Copy a config template to your project"
|
|
106
|
+
echo " 2. Customize for your needs"
|
|
107
|
+
echo " 3. Run: treequest-parallel --config=tmlpd-config.yaml"
|
|
108
|
+
echo ""
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
deployment:
|
|
2
|
+
name: "TMLPD Category Parallelization"
|
|
3
|
+
description: "Split tasks by category across specialized LLM providers"
|
|
4
|
+
|
|
5
|
+
agents:
|
|
6
|
+
- id: "frontend-agent"
|
|
7
|
+
provider: "anthropic"
|
|
8
|
+
model: "claude-sonnet-4-20250514"
|
|
9
|
+
focus: "UI components, styling, animations, responsive design"
|
|
10
|
+
task_pattern: "task-frontend-*|task-ui-*|task-accessibility-*"
|
|
11
|
+
priority: "high"
|
|
12
|
+
max_concurrent: 3
|
|
13
|
+
|
|
14
|
+
- id: "backend-agent"
|
|
15
|
+
provider: "openai"
|
|
16
|
+
model: "gpt-4-turbo"
|
|
17
|
+
focus: "API endpoints, database operations, business logic"
|
|
18
|
+
task_pattern: "task-backend-*|task-api-*|task-database-*"
|
|
19
|
+
priority: "high"
|
|
20
|
+
max_concurrent: 3
|
|
21
|
+
|
|
22
|
+
- id: "testing-agent"
|
|
23
|
+
provider: "google"
|
|
24
|
+
model: "gemini-2.0-flash-exp"
|
|
25
|
+
focus: "Unit tests, integration tests, e2e tests, test coverage"
|
|
26
|
+
task_pattern: "task-testing-*|task-test-*|task-validation-*"
|
|
27
|
+
priority: "medium"
|
|
28
|
+
max_concurrent: 5
|
|
29
|
+
|
|
30
|
+
- id: "docs-agent"
|
|
31
|
+
provider: "perplexity"
|
|
32
|
+
model: "llama-3.1-sonar-large-128k-online"
|
|
33
|
+
focus: "Documentation, README files, API docs, guides"
|
|
34
|
+
task_pattern: "task-docs-*|task-documentation-*|task-readme-*"
|
|
35
|
+
priority: "low"
|
|
36
|
+
max_concurrent: 4
|
|
37
|
+
|
|
38
|
+
coordination:
|
|
39
|
+
sync_interval: 300 # 5 minutes between syncs
|
|
40
|
+
conflict_resolution: "timestamp"
|
|
41
|
+
merge_strategy: "git-merge"
|
|
42
|
+
load_balancing: "dynamic"
|
|
43
|
+
checkpoint_interval: 600 # Save progress every 10 minutes
|
|
44
|
+
|
|
45
|
+
cost_optimization:
|
|
46
|
+
enabled: true
|
|
47
|
+
budget_limit: 50.00 # USD total budget
|
|
48
|
+
prefer_cached: true
|
|
49
|
+
alert_threshold: 0.80 # Alert at 80% of budget
|
|
50
|
+
|
|
51
|
+
error_handling:
|
|
52
|
+
retry_policy: "exponential_backoff"
|
|
53
|
+
max_retries: 3
|
|
54
|
+
fallback_on_failure: true
|
|
55
|
+
timeout_per_task: 300 # 5 minutes per task
|
|
56
|
+
|
|
57
|
+
output:
|
|
58
|
+
directory: ".tmlpd-output"
|
|
59
|
+
logs: "tmlpd-logs.json"
|
|
60
|
+
metrics: "tmlpd-metrics.json"
|
|
61
|
+
checkpoints: ".tmlpd-checkpoints"
|
|
62
|
+
verbose: true
|
|
63
|
+
|
|
64
|
+
monitoring:
|
|
65
|
+
dashboard_enabled: true
|
|
66
|
+
metrics_port: 8080
|
|
67
|
+
real_time_updates: true
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
deployment:
|
|
2
|
+
name: "TMLPD Monitoring Configuration"
|
|
3
|
+
description: "Advanced monitoring and metrics for TreeQuest parallel deployments"
|
|
4
|
+
|
|
5
|
+
monitoring:
|
|
6
|
+
# Real-time Dashboard
|
|
7
|
+
dashboard:
|
|
8
|
+
enabled: true
|
|
9
|
+
port: 8080
|
|
10
|
+
refresh_interval: 5 # seconds
|
|
11
|
+
auto_start: true
|
|
12
|
+
|
|
13
|
+
# Metrics Collection
|
|
14
|
+
metrics:
|
|
15
|
+
enabled: true
|
|
16
|
+
collection_interval: 10 # seconds
|
|
17
|
+
retention_days: 30
|
|
18
|
+
export_formats:
|
|
19
|
+
- json
|
|
20
|
+
- prometheus
|
|
21
|
+
|
|
22
|
+
# Performance Tracking
|
|
23
|
+
performance:
|
|
24
|
+
track_latency: true
|
|
25
|
+
track_throughput: true
|
|
26
|
+
track_cost: true
|
|
27
|
+
track_errors: true
|
|
28
|
+
track_success_rate: true
|
|
29
|
+
|
|
30
|
+
# Agent Health
|
|
31
|
+
agent_health:
|
|
32
|
+
check_interval: 30 # seconds
|
|
33
|
+
timeout_threshold: 120 # seconds
|
|
34
|
+
restart_on_failure: true
|
|
35
|
+
max_restart_attempts: 3
|
|
36
|
+
|
|
37
|
+
# Alerts & Notifications
|
|
38
|
+
alerts:
|
|
39
|
+
enabled: true
|
|
40
|
+
channels:
|
|
41
|
+
- type: "console"
|
|
42
|
+
enabled: true
|
|
43
|
+
- type: "file"
|
|
44
|
+
enabled: true
|
|
45
|
+
path: ".tmlpd-alerts.log"
|
|
46
|
+
- type: "webhook"
|
|
47
|
+
enabled: false
|
|
48
|
+
url: "https://hooks.example.com/alerts"
|
|
49
|
+
|
|
50
|
+
rules:
|
|
51
|
+
- name: "high_error_rate"
|
|
52
|
+
condition: "error_rate > 0.10"
|
|
53
|
+
severity: "warning"
|
|
54
|
+
message: "Error rate exceeds 10%"
|
|
55
|
+
|
|
56
|
+
- name: "budget_exceeded"
|
|
57
|
+
condition: "cost > budget_limit * 0.90"
|
|
58
|
+
severity: "critical"
|
|
59
|
+
message: "Approaching budget limit"
|
|
60
|
+
|
|
61
|
+
- name: "agent_unresponsive"
|
|
62
|
+
condition: "last_heartbeat > 180"
|
|
63
|
+
severity: "warning"
|
|
64
|
+
message: "Agent unresponsive for 3 minutes"
|
|
65
|
+
|
|
66
|
+
- name: "task_stalled"
|
|
67
|
+
condition: "task_duration > 1800"
|
|
68
|
+
severity: "info"
|
|
69
|
+
message: "Task running for 30+ minutes"
|
|
70
|
+
|
|
71
|
+
# Logging Configuration
|
|
72
|
+
logging:
|
|
73
|
+
level: "info" # debug, info, warn, error
|
|
74
|
+
format: "json"
|
|
75
|
+
outputs:
|
|
76
|
+
- type: "console"
|
|
77
|
+
enabled: true
|
|
78
|
+
colorize: true
|
|
79
|
+
- type: "file"
|
|
80
|
+
enabled: true
|
|
81
|
+
path: ".tmlpd-logs/deployment.log"
|
|
82
|
+
rotation:
|
|
83
|
+
enabled: true
|
|
84
|
+
max_size_mb: 100
|
|
85
|
+
max_files: 10
|
|
86
|
+
|
|
87
|
+
# Structured Logging Fields
|
|
88
|
+
fields:
|
|
89
|
+
- timestamp
|
|
90
|
+
- agent_id
|
|
91
|
+
- task_id
|
|
92
|
+
- provider
|
|
93
|
+
- model
|
|
94
|
+
- status
|
|
95
|
+
- duration_ms
|
|
96
|
+
- cost_usd
|
|
97
|
+
- error_message
|
|
98
|
+
|
|
99
|
+
# Metrics Export Configuration
|
|
100
|
+
export:
|
|
101
|
+
prometheus:
|
|
102
|
+
enabled: true
|
|
103
|
+
port: 9090
|
|
104
|
+
path: "/metrics"
|
|
105
|
+
|
|
106
|
+
json:
|
|
107
|
+
enabled: true
|
|
108
|
+
path: ".tmlpd-metrics/current-metrics.json"
|
|
109
|
+
pretty_print: true
|
|
110
|
+
|
|
111
|
+
csv:
|
|
112
|
+
enabled: false
|
|
113
|
+
path: ".tmlpd-metrics/history.csv"
|
|
114
|
+
|
|
115
|
+
# Visualization
|
|
116
|
+
visualization:
|
|
117
|
+
chart_types:
|
|
118
|
+
- "tasks_completed_over_time"
|
|
119
|
+
- "cost_accumulation"
|
|
120
|
+
- "agent_utilization"
|
|
121
|
+
- "error_rate_by_provider"
|
|
122
|
+
- "latency_distribution"
|
|
123
|
+
|
|
124
|
+
report_generation:
|
|
125
|
+
enabled: true
|
|
126
|
+
interval: 300 # every 5 minutes
|
|
127
|
+
output_dir: ".tmlpd-reports"
|
|
128
|
+
|
|
129
|
+
# Custom Metrics
|
|
130
|
+
custom_metrics:
|
|
131
|
+
- name: "tasks_per_minute"
|
|
132
|
+
type: "gauge"
|
|
133
|
+
description: "Tasks completed per minute per agent"
|
|
134
|
+
|
|
135
|
+
- name: "average_cost_per_task"
|
|
136
|
+
type: "gauge"
|
|
137
|
+
description: "Average cost per completed task"
|
|
138
|
+
|
|
139
|
+
- name: "provider_success_rate"
|
|
140
|
+
type: "gauge"
|
|
141
|
+
labels: ["provider"]
|
|
142
|
+
description: "Success rate by LLM provider"
|
|
143
|
+
|
|
144
|
+
- name: "parallel_efficiency"
|
|
145
|
+
type: "gauge"
|
|
146
|
+
description: "Ratio of parallel to sequential execution time"
|
|
147
|
+
|
|
148
|
+
# Performance Baselines
|
|
149
|
+
baselines:
|
|
150
|
+
established: false
|
|
151
|
+
calibration_runs: 5
|
|
152
|
+
auto_adjust: true
|
|
153
|
+
|
|
154
|
+
expected_metrics:
|
|
155
|
+
tasks_per_minute: 2.0
|
|
156
|
+
cost_per_task: 0.05
|
|
157
|
+
error_rate: 0.02
|
|
158
|
+
agent_utilization: 0.85
|
|
159
|
+
|
|
160
|
+
# Health Checks
|
|
161
|
+
health_checks:
|
|
162
|
+
enabled: true
|
|
163
|
+
interval: 60 # seconds
|
|
164
|
+
|
|
165
|
+
checks:
|
|
166
|
+
- name: "api_connectivity"
|
|
167
|
+
type: "external"
|
|
168
|
+
url: "https://api.anthropic.com/v1/messages"
|
|
169
|
+
|
|
170
|
+
- name: "disk_space"
|
|
171
|
+
type: "system"
|
|
172
|
+
threshold_gb: 5
|
|
173
|
+
|
|
174
|
+
- name: "memory_usage"
|
|
175
|
+
type: "system"
|
|
176
|
+
threshold_percent: 85
|
|
177
|
+
|
|
178
|
+
- name: "agent_heartbeat"
|
|
179
|
+
type: "internal"
|
|
180
|
+
timeout_seconds: 30
|
|
181
|
+
|
|
182
|
+
# Debug Mode
|
|
183
|
+
debug:
|
|
184
|
+
enabled: false
|
|
185
|
+
trace_requests: true
|
|
186
|
+
log_request_body: true
|
|
187
|
+
log_response_body: false
|
|
188
|
+
save_raw_responses: false
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
deployment:
|
|
2
|
+
name: "TMLPD Phase Parallelization"
|
|
3
|
+
description: "Execute project phases in parallel across multiple LLM providers"
|
|
4
|
+
|
|
5
|
+
agents:
|
|
6
|
+
- id: "phase1-architect"
|
|
7
|
+
provider: "anthropic"
|
|
8
|
+
model: "claude-opus-4"
|
|
9
|
+
phase: 1
|
|
10
|
+
phase_name: "Architecture & Planning"
|
|
11
|
+
focus: "System architecture, project structure, design patterns"
|
|
12
|
+
task_pattern: "phase-1-*|arch-*|design-*"
|
|
13
|
+
dependencies: []
|
|
14
|
+
priority: "critical"
|
|
15
|
+
max_concurrent: 2
|
|
16
|
+
|
|
17
|
+
- id: "phase2-core-features"
|
|
18
|
+
provider: "anthropic"
|
|
19
|
+
model: "claude-sonnet-4-20250514"
|
|
20
|
+
phase: 2
|
|
21
|
+
phase_name: "Core Features"
|
|
22
|
+
focus: "Primary feature implementation, core logic"
|
|
23
|
+
task_pattern: "phase-2-core-*|feature-*"
|
|
24
|
+
dependencies: ["phase1-architect"]
|
|
25
|
+
priority: "high"
|
|
26
|
+
max_concurrent: 3
|
|
27
|
+
|
|
28
|
+
- id: "phase2-secondary-features"
|
|
29
|
+
provider: "openai"
|
|
30
|
+
model: "gpt-4-turbo"
|
|
31
|
+
phase: 2
|
|
32
|
+
phase_name: "Secondary Features"
|
|
33
|
+
focus: "Secondary features, utilities, helpers"
|
|
34
|
+
task_pattern: "phase-2-secondary-*|utility-*"
|
|
35
|
+
dependencies: ["phase1-architect"]
|
|
36
|
+
priority: "medium"
|
|
37
|
+
max_concurrent: 4
|
|
38
|
+
|
|
39
|
+
- id: "phase3-testing"
|
|
40
|
+
provider: "google"
|
|
41
|
+
model: "gemini-2.5-pro"
|
|
42
|
+
phase: 3
|
|
43
|
+
phase_name: "Testing & Validation"
|
|
44
|
+
focus: "Comprehensive testing suite, validation, quality assurance"
|
|
45
|
+
task_pattern: "phase-3-*|test-*|validate-*"
|
|
46
|
+
dependencies: ["phase2-core-features", "phase2-secondary-features"]
|
|
47
|
+
priority: "high"
|
|
48
|
+
max_concurrent: 5
|
|
49
|
+
|
|
50
|
+
- id: "phase4-deployment"
|
|
51
|
+
provider: "anthropic"
|
|
52
|
+
model: "claude-sonnet-4-20250514"
|
|
53
|
+
phase: 4
|
|
54
|
+
phase_name: "Deployment & DevOps"
|
|
55
|
+
focus: "CI/CD, deployment scripts, production readiness"
|
|
56
|
+
task_pattern: "phase-4-deploy-*|devops-*|ci-cd-*"
|
|
57
|
+
dependencies: ["phase3-testing"]
|
|
58
|
+
priority: "critical"
|
|
59
|
+
max_concurrent: 2
|
|
60
|
+
|
|
61
|
+
- id: "phase4-documentation"
|
|
62
|
+
provider: "perplexity"
|
|
63
|
+
model: "llama-3.1-sonar-large-128k-online"
|
|
64
|
+
phase: 4
|
|
65
|
+
phase_name: "Documentation"
|
|
66
|
+
focus: "User guides, API documentation, README files"
|
|
67
|
+
task_pattern: "phase-4-docs-*|doc-*|guide-*"
|
|
68
|
+
dependencies: ["phase3-testing"]
|
|
69
|
+
priority: "medium"
|
|
70
|
+
max_concurrent: 3
|
|
71
|
+
|
|
72
|
+
coordination:
|
|
73
|
+
phase_gating: true # Wait for phase completion
|
|
74
|
+
wait_for_dependencies: true # Respect task dependencies
|
|
75
|
+
sync_interval: 180 # 3 minutes between syncs
|
|
76
|
+
conflict_resolution: "priority-based"
|
|
77
|
+
merge_strategy: "sequential-phases"
|
|
78
|
+
load_balancing: "work-stealing"
|
|
79
|
+
checkpoint_interval: 420 # 7 minutes
|
|
80
|
+
|
|
81
|
+
cost_optimization:
|
|
82
|
+
enabled: true
|
|
83
|
+
budget_limit: 100.00 # USD for full project
|
|
84
|
+
per_phase_budget:
|
|
85
|
+
phase-1: 15.00
|
|
86
|
+
phase-2: 40.00
|
|
87
|
+
phase-3: 25.00
|
|
88
|
+
phase-4: 20.00
|
|
89
|
+
prefer_cached: true
|
|
90
|
+
alert_threshold: 0.75
|
|
91
|
+
|
|
92
|
+
error_handling:
|
|
93
|
+
retry_policy: "exponential_backoff"
|
|
94
|
+
max_retries: 3
|
|
95
|
+
fallback_on_failure: true
|
|
96
|
+
timeout_per_task: 600 # 10 minutes per task
|
|
97
|
+
rollback_on_failure: false # Don't rollback entire phase on single failure
|
|
98
|
+
|
|
99
|
+
output:
|
|
100
|
+
directory: ".tmlpd-phases"
|
|
101
|
+
logs: "phase-logs.json"
|
|
102
|
+
metrics: "phase-metrics.json"
|
|
103
|
+
checkpoints: ".tmlpd-phase-checkpoints"
|
|
104
|
+
phase_reports: "phase-reports"
|
|
105
|
+
verbose: true
|
|
106
|
+
|
|
107
|
+
monitoring:
|
|
108
|
+
dashboard_enabled: true
|
|
109
|
+
metrics_port: 8080
|
|
110
|
+
real_time_updates: true
|
|
111
|
+
phase_progress_tracking: true
|
|
112
|
+
|
|
113
|
+
quality_gates:
|
|
114
|
+
phase_1_exit_criteria:
|
|
115
|
+
- "Architecture document approved"
|
|
116
|
+
- "Project structure created"
|
|
117
|
+
- "Dependencies identified"
|
|
118
|
+
|
|
119
|
+
phase_2_exit_criteria:
|
|
120
|
+
- "All features implemented"
|
|
121
|
+
- "Code coverage > 80%"
|
|
122
|
+
- "No critical bugs"
|
|
123
|
+
|
|
124
|
+
phase_3_exit_criteria:
|
|
125
|
+
- "Test suite passes"
|
|
126
|
+
- "All tests passing"
|
|
127
|
+
- "Performance benchmarks met"
|
|
128
|
+
|
|
129
|
+
phase_4_exit_criteria:
|
|
130
|
+
- "Deployment scripts tested"
|
|
131
|
+
- "Documentation complete"
|
|
132
|
+
- "Production ready"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""
|
|
2
|
+
TMLPD State Module
|
|
3
|
+
|
|
4
|
+
This module provides lightweight JSON-based checkpointing for state management.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .simple_checkpoint import (
|
|
8
|
+
SimpleCheckpoint,
|
|
9
|
+
save_checkpoint,
|
|
10
|
+
load_checkpoint
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
__all__ = [
|
|
14
|
+
"SimpleCheckpoint",
|
|
15
|
+
"save_checkpoint",
|
|
16
|
+
"load_checkpoint"
|
|
17
|
+
]
|