empathy-framework 3.11.0__py3-none-any.whl → 4.0.0__py3-none-any.whl
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.
- {empathy_framework-3.11.0.dist-info → empathy_framework-4.0.0.dist-info}/METADATA +105 -26
- {empathy_framework-3.11.0.dist-info → empathy_framework-4.0.0.dist-info}/RECORD +14 -7
- empathy_os/cli.py +229 -0
- empathy_os/orchestration/__init__.py +32 -0
- empathy_os/orchestration/agent_templates.py +516 -0
- empathy_os/orchestration/config_store.py +499 -0
- empathy_os/orchestration/execution_strategies.py +632 -0
- empathy_os/orchestration/meta_orchestrator.py +621 -0
- empathy_os/workflows/orchestrated_release_prep.py +582 -0
- empathy_os/workflows/test_coverage_boost.py +433 -0
- {empathy_framework-3.11.0.dist-info → empathy_framework-4.0.0.dist-info}/WHEEL +0 -0
- {empathy_framework-3.11.0.dist-info → empathy_framework-4.0.0.dist-info}/entry_points.txt +0 -0
- {empathy_framework-3.11.0.dist-info → empathy_framework-4.0.0.dist-info}/licenses/LICENSE +0 -0
- {empathy_framework-3.11.0.dist-info → empathy_framework-4.0.0.dist-info}/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: empathy-framework
|
|
3
|
-
Version:
|
|
4
|
-
Summary: AI collaboration framework with intelligent caching (
|
|
3
|
+
Version: 4.0.0
|
|
4
|
+
Summary: AI collaboration framework with breakthrough meta-orchestration system enabling dynamic agent composition (6 composition patterns), intelligent caching (85% hit rate), tier routing (34-86% cost savings), performance optimizations (46% faster scans), XML-enhanced prompts, persistent memory, and multi-agent orchestration. Production workflows: Release Prep, Test Coverage Boost.
|
|
5
5
|
Author-email: Patrick Roebuck <admin@smartaimemory.com>
|
|
6
6
|
Maintainer-email: Smart-AI-Memory <admin@smartaimemory.com>
|
|
7
7
|
License: # Fair Source License, version 0.9
|
|
@@ -254,6 +254,9 @@ Provides-Extra: dev
|
|
|
254
254
|
Requires-Dist: pytest<9.0,>=7.0; extra == "dev"
|
|
255
255
|
Requires-Dist: pytest-asyncio<1.0,>=0.21; extra == "dev"
|
|
256
256
|
Requires-Dist: pytest-cov<5.0,>=4.0; extra == "dev"
|
|
257
|
+
Requires-Dist: pytest-xdist<4.0,>=3.5.0; extra == "dev"
|
|
258
|
+
Requires-Dist: pytest-testmon<3.0,>=2.1.0; extra == "dev"
|
|
259
|
+
Requires-Dist: pytest-picked<1.0,>=0.5.0; extra == "dev"
|
|
257
260
|
Requires-Dist: black<26.0,>=24.3.0; extra == "dev"
|
|
258
261
|
Requires-Dist: mypy<2.0,>=1.0; extra == "dev"
|
|
259
262
|
Requires-Dist: ruff<1.0,>=0.1; extra == "dev"
|
|
@@ -355,7 +358,9 @@ Dynamic: license-file
|
|
|
355
358
|
|
|
356
359
|
# Empathy Framework
|
|
357
360
|
|
|
358
|
-
**The AI collaboration framework
|
|
361
|
+
**The AI collaboration framework with breakthrough meta-orchestration - agents that compose themselves.**
|
|
362
|
+
|
|
363
|
+
🎭 **v4.0: The Meta-Orchestration Era** - Dynamic agent teams, intelligent composition, self-learning systems.
|
|
359
364
|
|
|
360
365
|
[](https://pypi.org/project/empathy-framework/)
|
|
361
366
|
[](https://github.com/Smart-AI-Memory/empathy-framework/actions)
|
|
@@ -368,39 +373,113 @@ Dynamic: license-file
|
|
|
368
373
|
pip install empathy-framework[developer] # Lightweight for individual developers
|
|
369
374
|
```
|
|
370
375
|
|
|
371
|
-
## What's New in
|
|
376
|
+
## What's New in v4.0.0 🎭 **PARADIGM SHIFT**
|
|
377
|
+
|
|
378
|
+
### **Meta-Orchestration: AI Agents That Compose Themselves**
|
|
379
|
+
|
|
380
|
+
**The breakthrough:** Instead of manually wiring agent workflows, v4.0 introduces a meta-orchestration system that analyzes tasks, selects optimal agent teams, chooses composition patterns, and learns from outcomes.
|
|
381
|
+
|
|
382
|
+
**What this means:**
|
|
383
|
+
|
|
384
|
+
- 🧠 **Automatic task analysis** → Determines complexity, domain, required capabilities
|
|
385
|
+
- 🤝 **Dynamic team composition** → Selects optimal agents from 7 pre-built templates
|
|
386
|
+
- 📐 **Intelligent strategy selection** → Chooses from 6 composition patterns (Sequential, Parallel, Debate, Teaching, Refinement, Adaptive)
|
|
387
|
+
- 📚 **Self-learning** → Saves successful compositions and improves over time
|
|
388
|
+
- ⚡ **Production-ready workflows** → Release Prep (parallel validation), Test Coverage Boost (sequential improvement)
|
|
389
|
+
|
|
390
|
+
### Quick Start
|
|
391
|
+
|
|
392
|
+
**Release preparation with 4 parallel agents:**
|
|
393
|
+
|
|
394
|
+
```bash
|
|
395
|
+
empathy orchestrate release-prep
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Automatically runs:
|
|
399
|
+
|
|
400
|
+
- **Security Auditor** (vulnerability scan)
|
|
401
|
+
- **Test Coverage Analyzer** (gap analysis)
|
|
402
|
+
- **Code Quality Reviewer** (best practices)
|
|
403
|
+
- **Documentation Writer** (completeness check)
|
|
404
|
+
|
|
405
|
+
**Boost test coverage to 90%:**
|
|
406
|
+
|
|
407
|
+
```bash
|
|
408
|
+
empathy orchestrate test-coverage --target 90
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
Sequential workflow:
|
|
372
412
|
|
|
373
|
-
|
|
413
|
+
1. **Coverage Analyzer** → Identify gaps
|
|
414
|
+
2. **Test Generator** → Create tests
|
|
415
|
+
3. **Test Validator** → Verify coverage
|
|
374
416
|
|
|
375
|
-
|
|
417
|
+
### Python API
|
|
376
418
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
419
|
+
```python
|
|
420
|
+
from empathy_os.workflows.orchestrated_release_prep import (
|
|
421
|
+
OrchestratedReleasePrepWorkflow
|
|
422
|
+
)
|
|
423
|
+
|
|
424
|
+
# Create workflow with custom quality gates
|
|
425
|
+
workflow = OrchestratedReleasePrepWorkflow(
|
|
426
|
+
quality_gates={
|
|
427
|
+
"min_coverage": 90.0,
|
|
428
|
+
"max_critical_issues": 0,
|
|
429
|
+
}
|
|
430
|
+
)
|
|
431
|
+
|
|
432
|
+
# Execute
|
|
433
|
+
report = await workflow.execute(path=".")
|
|
434
|
+
|
|
435
|
+
if report.approved:
|
|
436
|
+
print(f"✅ Release approved! (confidence: {report.confidence})")
|
|
437
|
+
else:
|
|
438
|
+
for blocker in report.blockers:
|
|
439
|
+
print(f"❌ {blocker}")
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
### 6 Composition Patterns
|
|
443
|
+
|
|
444
|
+
The meta-orchestrator automatically selects the best pattern:
|
|
445
|
+
|
|
446
|
+
1. **Sequential** (A → B → C) - Pipeline processing
|
|
447
|
+
2. **Parallel** (A ‖ B ‖ C) - Independent validation
|
|
448
|
+
3. **Debate** (A ⇄ B ⇄ C → Synthesis) - Consensus building
|
|
449
|
+
4. **Teaching** (Junior → Expert) - Cost optimization
|
|
450
|
+
5. **Refinement** (Draft → Review → Polish) - Iterative improvement
|
|
451
|
+
6. **Adaptive** (Classifier → Specialist) - Right-sizing
|
|
452
|
+
|
|
453
|
+
### Learning System
|
|
454
|
+
|
|
455
|
+
Successful compositions are saved and improved over time:
|
|
382
456
|
|
|
383
457
|
```python
|
|
384
|
-
from empathy_os.
|
|
458
|
+
from empathy_os.orchestration.config_store import ConfigurationStore
|
|
459
|
+
|
|
460
|
+
store = ConfigurationStore()
|
|
385
461
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
462
|
+
# Find best composition for task
|
|
463
|
+
best = store.get_best_for_task("release_prep")
|
|
464
|
+
print(f"Success rate: {best.success_rate:.1%}")
|
|
465
|
+
|
|
466
|
+
# Reuse proven composition
|
|
467
|
+
agents = [get_template(a["role"]) for a in best.agents]
|
|
389
468
|
```
|
|
390
469
|
|
|
391
|
-
**
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
470
|
+
**Documentation:**
|
|
471
|
+
|
|
472
|
+
- [Meta-Orchestration User Guide](docs/ORCHESTRATION_USER_GUIDE.md) - Complete guide with examples
|
|
473
|
+
- [API Reference](docs/ORCHESTRATION_API.md) - All classes and methods
|
|
474
|
+
- [Examples](examples/orchestration/) - Working code samples
|
|
396
475
|
|
|
397
|
-
**
|
|
398
|
-
- File categorization: **5x faster**
|
|
399
|
-
- Verdict merging: **3.5x faster**
|
|
400
|
-
- Progress tracking: **5.8x faster**
|
|
401
|
-
- GC cycles: **-50%** (4 → 2 for large operations)
|
|
476
|
+
**Features:**
|
|
402
477
|
|
|
403
|
-
|
|
478
|
+
- ✅ **7 pre-built agent templates** (security, testing, docs, etc.)
|
|
479
|
+
- ✅ **Automatic strategy selection** based on task analysis
|
|
480
|
+
- ✅ **Quality gates enforcement** with detailed reporting
|
|
481
|
+
- ✅ **Configuration store** learns from outcomes
|
|
482
|
+
- ✅ **Cost optimization** via tier selection (CHEAP → CAPABLE → PREMIUM)
|
|
404
483
|
|
|
405
484
|
---
|
|
406
485
|
|
|
@@ -20,7 +20,7 @@ coach_wizards/refactoring_wizard.py,sha256=X0MTx3BHpOlOMAYDow-3HX5GyryY70JGAF5vA
|
|
|
20
20
|
coach_wizards/scaling_wizard.py,sha256=n1RLtpWmj1RSEGSWssMiUPwCdpskO3z2Z3yhLlTdXro,2598
|
|
21
21
|
coach_wizards/security_wizard.py,sha256=19SOClSxo6N-QqUc_QsFXOE7yEquiZF4kLi7jRomA7g,2605
|
|
22
22
|
coach_wizards/testing_wizard.py,sha256=vKFgFG4uJfAVFmCIQbkrWNvZhIfLC6ve_XbvWZKrPg4,2563
|
|
23
|
-
empathy_framework-
|
|
23
|
+
empathy_framework-4.0.0.dist-info/licenses/LICENSE,sha256=IJ9eeI5KSrD5P7alsn7sI_6_1bDihxBA5S4Sen4jf2k,4937
|
|
24
24
|
empathy_healthcare_plugin/__init__.py,sha256=4NioL1_86UXzkd-QNkQZUSZ8rKTQGSP0TC9VXP32kQs,295
|
|
25
25
|
empathy_healthcare_plugin/monitors/__init__.py,sha256=Udp8qfZR504QAq5_eQjvtIaE7v06Yguc7nuF40KllQc,196
|
|
26
26
|
empathy_healthcare_plugin/monitors/clinical_protocol_monitor.py,sha256=MWE5t8tW9HWZn_SNo-inx8-0nhdTNGhbcB8ZeDWyXa0,11648
|
|
@@ -97,7 +97,7 @@ empathy_os/__init__.py,sha256=zAvie0wQFlSpv7thmNNtdrPy0YY1NUaQfb1oD_hKmns,5896
|
|
|
97
97
|
empathy_os/agent_monitoring.py,sha256=s4seLC_J4AtQ3PYWrRPO8YHM-Fbm0Q36kPEdlTHf2HI,13375
|
|
98
98
|
empathy_os/cache_monitor.py,sha256=DTR8xr9d63czGzzdfrBFWp8hkoWPFsL-hpihPGmkbEc,11072
|
|
99
99
|
empathy_os/cache_stats.py,sha256=rWJPBNFEfhuLwKYKy89D_Qa9GPIyVso2jdCKp_cdJhI,10232
|
|
100
|
-
empathy_os/cli.py,sha256=
|
|
100
|
+
empathy_os/cli.py,sha256=27C4UBk4ZzxdLj54YcYz3ijBHGYQgUWU677vh4Z9l58,125075
|
|
101
101
|
empathy_os/cli_unified.py,sha256=o6l1nokC5Ku8nvEDAEBJoP_p63g5xbVWz_JKTSFNsgE,27181
|
|
102
102
|
empathy_os/config.py,sha256=jsFQuXpZP_jt6UrZtfLlkBZwPUSNbnW5VVtMS5JIhbA,16276
|
|
103
103
|
empathy_os/coordination.py,sha256=E2HvHxKk1xbYswtgxhnVKB6DRxfXUV5pCt-XWHOvNKM,28509
|
|
@@ -1756,6 +1756,11 @@ empathy_os/monitoring/multi_backend.py,sha256=3w8TYUezwUtcieA9p4lWrsyIp_jVYAsPaY
|
|
|
1756
1756
|
empathy_os/monitoring/otel_backend.py,sha256=dqCgiw79bYTeVFSRV3raYk-Mpnu8sNoqik3KBNl7ZXA,13503
|
|
1757
1757
|
empathy_os/optimization/__init__.py,sha256=p9dPGmci7MIASss38ctLpKTl_tV8ApkcyPZovE1EUMA,422
|
|
1758
1758
|
empathy_os/optimization/context_optimizer.py,sha256=lPWXuG7K1OMVNZKOdQT2SlZhLfjMREKSp5pCPQibXpk,8048
|
|
1759
|
+
empathy_os/orchestration/__init__.py,sha256=BuIuXDQ2MWPOIkhVkjFCkKjbiDwAqCmrL096ou2NYFE,876
|
|
1760
|
+
empathy_os/orchestration/agent_templates.py,sha256=t8LxeqiTdgqYvW1BE8IXswAFamVTrScycb2VnG0qBCM,16283
|
|
1761
|
+
empathy_os/orchestration/config_store.py,sha256=TZLjzCr1g0nAP1eEZA9fMUy3OjF6XsWIQaJnX_PpLDY,16774
|
|
1762
|
+
empathy_os/orchestration/execution_strategies.py,sha256=zoUyjJrfjrast4My688xCRLkvaLNT3oLrV97g6hTtAg,20999
|
|
1763
|
+
empathy_os/orchestration/meta_orchestrator.py,sha256=wlGeuKtmrgSSo2m-JD7yRq4Zczik_iWwM-1lj1Nop3Q,19343
|
|
1759
1764
|
empathy_os/patterns/refactoring_memory.json,sha256=nk7Bh2QE8Zm4iz3nxzARYiqzBWqZrKXhypDHPC63f_U,2995
|
|
1760
1765
|
empathy_os/patterns/debugging/all_patterns.json,sha256=0nxtlmJzqAn2fV162OgoTWtWXiJNzcZ04_uIRaUqC6U,2283
|
|
1761
1766
|
empathy_os/patterns/debugging/workflow_20260107_1770825e.json,sha256=hfXZX3baBGXrVfESgze6JcIDL60TCQdE8k_4uZ0fKcw,1951
|
|
@@ -1826,6 +1831,7 @@ empathy_os/workflows/manage_docs_README.md,sha256=0v-DOpTdfXQ5qIFzVCtV2IY-QBNw5s
|
|
|
1826
1831
|
empathy_os/workflows/manage_documentation.py,sha256=gknIse4MzTLxRowIAS07WSXNqWAoWCfxmoIJSbTYBNM,29419
|
|
1827
1832
|
empathy_os/workflows/new_sample_workflow1.py,sha256=W59znXxsq5kgk4ZI3psC41KtzkLo5lmQ08SbMYXcJVg,4103
|
|
1828
1833
|
empathy_os/workflows/new_sample_workflow1_README.md,sha256=bzLyqukgaKilG1OnCdLsc5GNWsYEagI7mn3n80BPMHY,2366
|
|
1834
|
+
empathy_os/workflows/orchestrated_release_prep.py,sha256=D7ABvuYwQFAmu1Jdc6TNLiriQXonB0pmKbHjeUOPLr0,19490
|
|
1829
1835
|
empathy_os/workflows/perf_audit.py,sha256=5FW6BACMjRX5y-OmTxZBlzsqiEq-godaPISJXwy_BNY,25294
|
|
1830
1836
|
empathy_os/workflows/pr_review.py,sha256=I-FPHHxo-WpqHtaAjdnJAtNj95opJK-Ybz3p2eb0niE,26221
|
|
1831
1837
|
empathy_os/workflows/progress.py,sha256=J1ooVZp6WoaKz9IwDsoYFtfJGFTtSDU3kHewkGMjCJ8,15929
|
|
@@ -1839,6 +1845,7 @@ empathy_os/workflows/security_audit.py,sha256=LtGel4Tu5Nc3QGRr69w-UjMONmcVyXg8No
|
|
|
1839
1845
|
empathy_os/workflows/step_config.py,sha256=CdRNAQ1SiPsuAl10s58ioyk5w8XCArecSS9AjyHWQJM,7213
|
|
1840
1846
|
empathy_os/workflows/test5.py,sha256=6o_sFk4dAIyOIVY9nDilgQWaJIGjl551wzphbcnXwTI,3767
|
|
1841
1847
|
empathy_os/workflows/test5_README.md,sha256=bnYhbwyNVGN0dbIcnAUhEJbwSf4cE-UAkD09p_gvThc,2406
|
|
1848
|
+
empathy_os/workflows/test_coverage_boost.py,sha256=a3_ScZR66YDPKpF47-JUHUz8p8wHwVKLzPH_Zsk-MJU,14824
|
|
1842
1849
|
empathy_os/workflows/test_gen.py,sha256=Lw9Hh-feqiM9GCjWUJzlNyEPMqxP34LSNEscbuOUZjU,70621
|
|
1843
1850
|
empathy_os/workflows/test_lifecycle.py,sha256=c6UDSd6kOQdCHmaJviwAnUVceVQuSdLNQ9eKbVooiMY,16890
|
|
1844
1851
|
empathy_os/workflows/test_maintenance.py,sha256=jiMeYX7Qg3CnRU5xW8LuOXnARxV7uqfygDKkIsEgL0s,22941
|
|
@@ -2241,8 +2248,8 @@ workflow_scaffolding/__init__.py,sha256=UpX5vjjjPjIaAKyIV1D4GxJzLUZy5DzdzgSkePYM
|
|
|
2241
2248
|
workflow_scaffolding/__main__.py,sha256=0qspuNoadTDqyskXTlT8Sahqau-XIxN35NHTSGVW6z4,236
|
|
2242
2249
|
workflow_scaffolding/cli.py,sha256=yLgvMsPbqI-LHt7UKXMuj-Dc0-44EqWiChldysrw1YQ,6763
|
|
2243
2250
|
workflow_scaffolding/generator.py,sha256=9eEmm324kVzf8BCtXEML090pyke06o0U7aGATzZIaPM,8869
|
|
2244
|
-
empathy_framework-
|
|
2245
|
-
empathy_framework-
|
|
2246
|
-
empathy_framework-
|
|
2247
|
-
empathy_framework-
|
|
2248
|
-
empathy_framework-
|
|
2251
|
+
empathy_framework-4.0.0.dist-info/METADATA,sha256=tH2U4Uw3SXIrG6xAMdZtcjNnrdXhyx04C0a_Vw4uy1A,53904
|
|
2252
|
+
empathy_framework-4.0.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
2253
|
+
empathy_framework-4.0.0.dist-info/entry_points.txt,sha256=zMu7sKCiLndbEEXjTecltS-1P_JZoEUKrifuRBBbroc,1268
|
|
2254
|
+
empathy_framework-4.0.0.dist-info/top_level.txt,sha256=wrNU1aVMutVDACer58H-udv0P_171Dv6z_42sZtZ-xM,124
|
|
2255
|
+
empathy_framework-4.0.0.dist-info/RECORD,,
|
empathy_os/cli.py
CHANGED
|
@@ -764,6 +764,182 @@ def cmd_tier_stats(args):
|
|
|
764
764
|
print()
|
|
765
765
|
|
|
766
766
|
|
|
767
|
+
def cmd_orchestrate(args):
|
|
768
|
+
"""Run meta-orchestration workflows.
|
|
769
|
+
|
|
770
|
+
Orchestrates teams of agents to accomplish complex tasks through
|
|
771
|
+
intelligent composition patterns.
|
|
772
|
+
"""
|
|
773
|
+
import asyncio
|
|
774
|
+
import json
|
|
775
|
+
|
|
776
|
+
from empathy_os.workflows.orchestrated_release_prep import OrchestratedReleasePrepWorkflow
|
|
777
|
+
from empathy_os.workflows.test_coverage_boost import TestCoverageBoostWorkflow
|
|
778
|
+
|
|
779
|
+
# Get workflow type
|
|
780
|
+
workflow_type = args.workflow
|
|
781
|
+
|
|
782
|
+
print()
|
|
783
|
+
print("=" * 60)
|
|
784
|
+
print(f" META-ORCHESTRATION: {workflow_type.upper()}")
|
|
785
|
+
print("=" * 60)
|
|
786
|
+
print()
|
|
787
|
+
|
|
788
|
+
if workflow_type == "release-prep":
|
|
789
|
+
# Release Preparation workflow
|
|
790
|
+
path = args.path or "."
|
|
791
|
+
quality_gates = {}
|
|
792
|
+
|
|
793
|
+
# Collect custom quality gates
|
|
794
|
+
if hasattr(args, "min_coverage") and args.min_coverage is not None:
|
|
795
|
+
quality_gates["min_coverage"] = args.min_coverage
|
|
796
|
+
if hasattr(args, "min_quality") and args.min_quality is not None:
|
|
797
|
+
quality_gates["min_quality_score"] = args.min_quality
|
|
798
|
+
if hasattr(args, "max_critical") and args.max_critical is not None:
|
|
799
|
+
quality_gates["max_critical_issues"] = args.max_critical
|
|
800
|
+
|
|
801
|
+
print(f" Project Path: {path}")
|
|
802
|
+
if quality_gates:
|
|
803
|
+
print(f" Quality Gates: {quality_gates}")
|
|
804
|
+
print()
|
|
805
|
+
print(" 🔍 Parallel Validation Agents:")
|
|
806
|
+
print(" • Security Auditor (vulnerability scan)")
|
|
807
|
+
print(" • Test Coverage Analyzer (gap analysis)")
|
|
808
|
+
print(" • Code Quality Reviewer (best practices)")
|
|
809
|
+
print(" • Documentation Writer (completeness)")
|
|
810
|
+
print()
|
|
811
|
+
|
|
812
|
+
# Create workflow
|
|
813
|
+
workflow = OrchestratedReleasePrepWorkflow(
|
|
814
|
+
quality_gates=quality_gates if quality_gates else None
|
|
815
|
+
)
|
|
816
|
+
|
|
817
|
+
try:
|
|
818
|
+
# Execute workflow
|
|
819
|
+
report = asyncio.run(workflow.execute(path=path))
|
|
820
|
+
|
|
821
|
+
# Display results
|
|
822
|
+
if hasattr(args, "json") and args.json:
|
|
823
|
+
print(json.dumps(report.to_dict(), indent=2))
|
|
824
|
+
else:
|
|
825
|
+
print(report.format_console_output())
|
|
826
|
+
|
|
827
|
+
# Return appropriate exit code
|
|
828
|
+
return 0 if report.approved else 1
|
|
829
|
+
|
|
830
|
+
except Exception as e:
|
|
831
|
+
print(f" ❌ Error executing release prep workflow: {e}")
|
|
832
|
+
print()
|
|
833
|
+
logger.exception("Release prep workflow failed")
|
|
834
|
+
return 1
|
|
835
|
+
|
|
836
|
+
elif workflow_type == "test-coverage":
|
|
837
|
+
# Test Coverage Boost workflow
|
|
838
|
+
target_coverage = args.target or 80.0
|
|
839
|
+
project_root = args.project_root or "."
|
|
840
|
+
|
|
841
|
+
print(f" Target Coverage: {target_coverage}%")
|
|
842
|
+
print(f" Project Root: {project_root}")
|
|
843
|
+
print()
|
|
844
|
+
print(" 🔍 Stage 1: Coverage Gap Analysis")
|
|
845
|
+
print(" 🔨 Stage 2: Test Generation")
|
|
846
|
+
print(" ✅ Stage 3: Test Validation")
|
|
847
|
+
print()
|
|
848
|
+
|
|
849
|
+
# Create workflow
|
|
850
|
+
workflow = TestCoverageBoostWorkflow(
|
|
851
|
+
target_coverage=target_coverage,
|
|
852
|
+
project_root=project_root,
|
|
853
|
+
save_patterns=True,
|
|
854
|
+
)
|
|
855
|
+
|
|
856
|
+
# Execute workflow
|
|
857
|
+
context = {
|
|
858
|
+
"current_coverage": args.current_coverage or 0.0,
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
try:
|
|
862
|
+
result = asyncio.run(workflow.execute(context))
|
|
863
|
+
|
|
864
|
+
# Display results
|
|
865
|
+
print()
|
|
866
|
+
print(" 📊 RESULTS")
|
|
867
|
+
print(" " + "-" * 56)
|
|
868
|
+
print()
|
|
869
|
+
|
|
870
|
+
# Analysis stage
|
|
871
|
+
print(" ✓ Stage 1: Coverage Analysis")
|
|
872
|
+
print(f" Current Coverage: {result.analysis.current_coverage:.1f}%")
|
|
873
|
+
print(f" Gaps Identified: {len(result.analysis.gaps)}")
|
|
874
|
+
print(f" Recommendations: {len(result.analysis.recommendations)}")
|
|
875
|
+
print()
|
|
876
|
+
|
|
877
|
+
# Generation stage
|
|
878
|
+
print(" ✓ Stage 2: Test Generation")
|
|
879
|
+
print(f" Tests Generated: {result.generation.tests_generated}")
|
|
880
|
+
print(f" Expected Delta: +{result.generation.coverage_delta:.1f}%")
|
|
881
|
+
print(f" Test Files: {len(result.generation.test_files)}")
|
|
882
|
+
print()
|
|
883
|
+
|
|
884
|
+
# Validation stage
|
|
885
|
+
print(" ✓ Stage 3: Test Validation")
|
|
886
|
+
print(f" All Tests Passed: {'✅ Yes' if result.validation.all_passed else '❌ No'}")
|
|
887
|
+
print(f" Final Coverage: {result.validation.final_coverage:.1f}%")
|
|
888
|
+
print(f" Improvement: +{result.validation.coverage_improvement:.1f}%")
|
|
889
|
+
print()
|
|
890
|
+
|
|
891
|
+
# Quality gates
|
|
892
|
+
print(" 🎯 QUALITY GATES")
|
|
893
|
+
print(" " + "-" * 56)
|
|
894
|
+
if result.quality_gates_passed:
|
|
895
|
+
print(" ✅ All quality gates passed!")
|
|
896
|
+
else:
|
|
897
|
+
print(" ❌ Quality gates not met")
|
|
898
|
+
if result.validation.final_coverage < target_coverage:
|
|
899
|
+
print(
|
|
900
|
+
f" - Coverage below target ({result.validation.final_coverage:.1f}% < {target_coverage}%)"
|
|
901
|
+
)
|
|
902
|
+
if not result.validation.all_passed:
|
|
903
|
+
print(f" - {len(result.validation.failures)} tests failed")
|
|
904
|
+
if result.validation.coverage_improvement < 10.0:
|
|
905
|
+
print(
|
|
906
|
+
f" - Improvement too small ({result.validation.coverage_improvement:.1f}% < 10%)"
|
|
907
|
+
)
|
|
908
|
+
print()
|
|
909
|
+
|
|
910
|
+
# Execution time
|
|
911
|
+
print(f" ⏱️ Execution Time: {result.execution_time:.1f}s")
|
|
912
|
+
print()
|
|
913
|
+
|
|
914
|
+
if result.success:
|
|
915
|
+
print(" ✅ Workflow completed successfully!")
|
|
916
|
+
else:
|
|
917
|
+
print(" ❌ Workflow failed")
|
|
918
|
+
if result.errors:
|
|
919
|
+
print(f" Errors: {', '.join(result.errors)}")
|
|
920
|
+
|
|
921
|
+
except Exception as e:
|
|
922
|
+
print(f" ❌ Error executing workflow: {e}")
|
|
923
|
+
print()
|
|
924
|
+
logger.exception("Orchestration workflow failed")
|
|
925
|
+
return 1
|
|
926
|
+
|
|
927
|
+
else:
|
|
928
|
+
print(f" ❌ Unknown workflow type: {workflow_type}")
|
|
929
|
+
print()
|
|
930
|
+
print(" Available workflows:")
|
|
931
|
+
print(" - release-prep: Release readiness validation (parallel agents)")
|
|
932
|
+
print(" - test-coverage: Boost test coverage through sequential agent composition")
|
|
933
|
+
print()
|
|
934
|
+
return 1
|
|
935
|
+
|
|
936
|
+
print()
|
|
937
|
+
print("=" * 60)
|
|
938
|
+
print()
|
|
939
|
+
|
|
940
|
+
return 0
|
|
941
|
+
|
|
942
|
+
|
|
767
943
|
def cmd_init(args):
|
|
768
944
|
"""Initialize a new Empathy Framework project
|
|
769
945
|
|
|
@@ -3293,6 +3469,59 @@ def main():
|
|
|
3293
3469
|
)
|
|
3294
3470
|
parser_tier_stats.set_defaults(func=cmd_tier_stats)
|
|
3295
3471
|
|
|
3472
|
+
# Orchestrate command (meta-orchestration workflows)
|
|
3473
|
+
parser_orchestrate = subparsers.add_parser(
|
|
3474
|
+
"orchestrate",
|
|
3475
|
+
help="Run meta-orchestration workflows (test-coverage, release-prep)",
|
|
3476
|
+
)
|
|
3477
|
+
parser_orchestrate.add_argument(
|
|
3478
|
+
"workflow",
|
|
3479
|
+
choices=["test-coverage", "release-prep"],
|
|
3480
|
+
help="Workflow to execute",
|
|
3481
|
+
)
|
|
3482
|
+
parser_orchestrate.add_argument(
|
|
3483
|
+
"--target",
|
|
3484
|
+
type=float,
|
|
3485
|
+
help="Target coverage percentage (for test-coverage workflow, default: 80)",
|
|
3486
|
+
)
|
|
3487
|
+
parser_orchestrate.add_argument(
|
|
3488
|
+
"--current-coverage",
|
|
3489
|
+
type=float,
|
|
3490
|
+
help="Current coverage percentage (default: 0)",
|
|
3491
|
+
)
|
|
3492
|
+
parser_orchestrate.add_argument(
|
|
3493
|
+
"--project-root",
|
|
3494
|
+
default=".",
|
|
3495
|
+
help="Project root directory (default: current directory)",
|
|
3496
|
+
)
|
|
3497
|
+
# Release-prep workflow arguments
|
|
3498
|
+
parser_orchestrate.add_argument(
|
|
3499
|
+
"--path",
|
|
3500
|
+
default=".",
|
|
3501
|
+
help="Path to codebase to analyze (for release-prep, default: current directory)",
|
|
3502
|
+
)
|
|
3503
|
+
parser_orchestrate.add_argument(
|
|
3504
|
+
"--min-coverage",
|
|
3505
|
+
type=float,
|
|
3506
|
+
help="Minimum test coverage threshold (for release-prep, default: 80.0)",
|
|
3507
|
+
)
|
|
3508
|
+
parser_orchestrate.add_argument(
|
|
3509
|
+
"--min-quality",
|
|
3510
|
+
type=float,
|
|
3511
|
+
help="Minimum code quality score (for release-prep, default: 7.0)",
|
|
3512
|
+
)
|
|
3513
|
+
parser_orchestrate.add_argument(
|
|
3514
|
+
"--max-critical",
|
|
3515
|
+
type=float,
|
|
3516
|
+
help="Maximum critical security issues (for release-prep, default: 0)",
|
|
3517
|
+
)
|
|
3518
|
+
parser_orchestrate.add_argument(
|
|
3519
|
+
"--json",
|
|
3520
|
+
action="store_true",
|
|
3521
|
+
help="Output results as JSON",
|
|
3522
|
+
)
|
|
3523
|
+
parser_orchestrate.set_defaults(func=cmd_orchestrate)
|
|
3524
|
+
|
|
3296
3525
|
# Wizard Factory commands (create wizards 12x faster)
|
|
3297
3526
|
add_wizard_factory_commands(subparsers)
|
|
3298
3527
|
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""Meta-orchestration system for dynamic agent composition.
|
|
2
|
+
|
|
3
|
+
This package provides the infrastructure for dynamically composing
|
|
4
|
+
agent teams based on task requirements. It enables intelligent task
|
|
5
|
+
analysis, agent spawning, and execution strategy selection.
|
|
6
|
+
|
|
7
|
+
Example:
|
|
8
|
+
>>> from empathy_os.orchestration import AgentTemplate, get_template
|
|
9
|
+
>>> template = get_template("test_coverage_analyzer")
|
|
10
|
+
>>> print(template.role)
|
|
11
|
+
Test Coverage Expert
|
|
12
|
+
"""
|
|
13
|
+
|
|
14
|
+
from empathy_os.orchestration.agent_templates import (
|
|
15
|
+
AgentCapability,
|
|
16
|
+
AgentTemplate,
|
|
17
|
+
ResourceRequirements,
|
|
18
|
+
get_all_templates,
|
|
19
|
+
get_template,
|
|
20
|
+
get_templates_by_capability,
|
|
21
|
+
get_templates_by_tier,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
__all__ = [
|
|
25
|
+
"AgentTemplate",
|
|
26
|
+
"AgentCapability",
|
|
27
|
+
"ResourceRequirements",
|
|
28
|
+
"get_template",
|
|
29
|
+
"get_all_templates",
|
|
30
|
+
"get_templates_by_capability",
|
|
31
|
+
"get_templates_by_tier",
|
|
32
|
+
]
|