empathy-framework 4.5.0__py3-none-any.whl → 4.6.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-4.5.0.dist-info → empathy_framework-4.6.0.dist-info}/METADATA +96 -6
- {empathy_framework-4.5.0.dist-info → empathy_framework-4.6.0.dist-info}/RECORD +14 -13
- empathy_os/__init__.py +1 -1
- empathy_os/meta_workflows/cli_meta_workflows.py +139 -1
- empathy_os/meta_workflows/pattern_learner.py +2 -0
- empathy_os/meta_workflows/plan_generator.py +376 -0
- empathy_os/socratic/__init__.py +1 -2
- empathy_os/socratic/blueprint.py +1 -0
- empathy_os/socratic/visual_editor.py +2 -5
- empathy_os/workflows/progressive/test_gen.py +5 -5
- {empathy_framework-4.5.0.dist-info → empathy_framework-4.6.0.dist-info}/WHEEL +0 -0
- {empathy_framework-4.5.0.dist-info → empathy_framework-4.6.0.dist-info}/entry_points.txt +0 -0
- {empathy_framework-4.5.0.dist-info → empathy_framework-4.6.0.dist-info}/licenses/LICENSE +0 -0
- {empathy_framework-4.5.0.dist-info → empathy_framework-4.6.0.dist-info}/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: empathy-framework
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.6.0
|
|
4
4
|
Summary: AI collaboration framework with real LLM agent execution, AskUserQuestion tool integration, Socratic agent generation, progressive tier escalation (70-85% cost savings), meta-orchestration, dynamic agent composition (6 patterns), intelligent caching (85% hit rate), semantic workflow discovery, visual workflow editor, MCP integration for Claude Code, and multi-agent orchestration.
|
|
5
5
|
Author-email: Patrick Roebuck <admin@smartaimemory.com>
|
|
6
6
|
Maintainer-email: Smart-AI-Memory <admin@smartaimemory.com>
|
|
@@ -359,10 +359,10 @@ Dynamic: license-file
|
|
|
359
359
|
|
|
360
360
|
**The AI collaboration framework with breakthrough meta-orchestration - agents that compose themselves.**
|
|
361
361
|
|
|
362
|
-
🎭 **v4.
|
|
362
|
+
🎭 **v4.6: $0 Cost AI Workflows** - Run agent teams free with any Claude Code subscription, Socratic agent creation, memory-enhanced learning.
|
|
363
363
|
|
|
364
364
|
[](https://pypi.org/project/empathy-framework/)
|
|
365
|
-
[](https://github.com/Smart-AI-Memory/empathy-framework/actions)
|
|
366
366
|
[](https://github.com/Smart-AI-Memory/empathy-framework)
|
|
367
367
|
[](LICENSE)
|
|
368
368
|
[](https://www.python.org)
|
|
@@ -372,11 +372,101 @@ Dynamic: license-file
|
|
|
372
372
|
pip install empathy-framework[developer] # Lightweight for individual developers
|
|
373
373
|
```
|
|
374
374
|
|
|
375
|
-
## What's New in v4.
|
|
375
|
+
## What's New in v4.6.0 💰 **$0 COST AI WORKFLOWS**
|
|
376
|
+
|
|
377
|
+
### **Run Agent Teams Free with Any Claude Code Subscription**
|
|
378
|
+
|
|
379
|
+
**v4.6** revolutionizes how you use Empathy Framework - all multi-agent workflows now run **at no additional cost** when you have any Claude Code subscription.
|
|
380
|
+
|
|
381
|
+
**Key Features:**
|
|
382
|
+
|
|
383
|
+
- 💰 **$0 Execution** - Agent teams use Claude Code's Task tool instead of API calls
|
|
384
|
+
- 🎓 **Socratic Agent Creation** - `/create-agent` and `/create-team` guide you through building custom agents
|
|
385
|
+
- 🧠 **Memory Enhancement** - Optional short-term and long-term memory for agents that learn
|
|
386
|
+
- 🧹 **Streamlined Skills** - 13 clean skills that work without API keys
|
|
387
|
+
|
|
388
|
+
**Quick Start (Claude Code):**
|
|
389
|
+
|
|
390
|
+
```
|
|
391
|
+
/create-agent # Walk through creating a custom AI agent
|
|
392
|
+
/create-team # Build a multi-agent team with guided questions
|
|
393
|
+
/release-prep # Run 4-agent release readiness check ($0)
|
|
394
|
+
/test-coverage # 3-agent coverage analysis ($0)
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
**Available Skills:**
|
|
398
|
+
|
|
399
|
+
| Skill | Description | Cost |
|
|
400
|
+
|-------|-------------|------|
|
|
401
|
+
| `/create-agent` | Socratic guide to build custom agents | $0 |
|
|
402
|
+
| `/create-team` | Build multi-agent teams interactively | $0 |
|
|
403
|
+
| `/release-prep` | Security, coverage, quality, docs check | $0 |
|
|
404
|
+
| `/test-coverage` | Coverage gap analysis + suggestions | $0 |
|
|
405
|
+
| `/test-maintenance` | Find stale/flaky tests | $0 |
|
|
406
|
+
| `/manage-docs` | Keep docs in sync with code | $0 |
|
|
407
|
+
| `/feature-overview` | Generate technical documentation | $0 |
|
|
408
|
+
|
|
409
|
+
**Enterprise API Mode** (optional):
|
|
410
|
+
|
|
411
|
+
```bash
|
|
412
|
+
# For CI/CD, cron jobs, or programmatic control
|
|
413
|
+
empathy meta-workflow run release-prep --real --use-defaults
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
---
|
|
417
|
+
|
|
418
|
+
## What's New in v4.5.0 🖥️ **VS CODE INTEGRATION**
|
|
419
|
+
|
|
420
|
+
### **Rich HTML Reports for Agent Team Execution**
|
|
421
|
+
|
|
422
|
+
**v4.5** adds VS Code webview integration with rich HTML reports, Quick Run mode, and JSON output for programmatic workflows.
|
|
423
|
+
|
|
424
|
+
**Key Features:**
|
|
425
|
+
|
|
426
|
+
- 📊 **MetaWorkflowReportPanel** - Rich HTML webview displaying agent results with collapsible sections
|
|
427
|
+
- ⚡ **Quick Run Mode** - Execute with defaults, see results in beautiful reports
|
|
428
|
+
- 🔧 **CLI JSON Output** - `--json` flag for programmatic consumption
|
|
429
|
+
- 🎨 **Agent Cards** - Tier badges, status indicators, cost breakdowns
|
|
430
|
+
|
|
431
|
+
**Quick Start (VS Code):**
|
|
432
|
+
|
|
433
|
+
1. Open Command Palette (`Cmd+Shift+P`)
|
|
434
|
+
2. Run "Empathy: Run Meta-Workflow"
|
|
435
|
+
3. Select "Quick Run (Webview Report)"
|
|
436
|
+
4. View rich HTML report with agent results
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
## What's New in v4.4.0 🚀 **PRODUCTION-READY AGENT TEAMS**
|
|
441
|
+
|
|
442
|
+
### **Real LLM Execution with Cost Tracking**
|
|
443
|
+
|
|
444
|
+
**v4.4** brings production-ready agent teams with real Claude model execution, accurate cost tracking, and skill-based invocation.
|
|
445
|
+
|
|
446
|
+
**Breakthrough Features:**
|
|
447
|
+
|
|
448
|
+
- 🤖 **Real LLM Execution** - Agents execute with actual Claude API calls
|
|
449
|
+
- 💰 **Accurate Cost Tracking** - Token counting from real API usage
|
|
450
|
+
- 📈 **Progressive Tier Escalation** - CHEAP → CAPABLE → PREMIUM with actual execution
|
|
451
|
+
- 🎯 **Skill-based Invocation** - Use `/release-prep`, `/test-coverage`, `/manage-docs` in Claude Code
|
|
452
|
+
|
|
453
|
+
**Quick Start (CLI):**
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
# Run release preparation agent team
|
|
457
|
+
empathy meta-workflow run release-prep --real
|
|
458
|
+
|
|
459
|
+
# Natural language - describe what you need
|
|
460
|
+
empathy meta-workflow ask "prepare my code for release" --auto
|
|
461
|
+
```
|
|
462
|
+
|
|
463
|
+
---
|
|
464
|
+
|
|
465
|
+
## Meta-Workflow System 🤖 (v4.2+)
|
|
376
466
|
|
|
377
467
|
### **Intelligent Workflow Orchestration Through Forms + Dynamic Agents**
|
|
378
468
|
|
|
379
|
-
**The breakthrough:**
|
|
469
|
+
**The breakthrough:** The meta-workflow system combines Socratic forms (interactive questions), dynamic agent team creation, and pattern learning for self-improving workflows.
|
|
380
470
|
|
|
381
471
|
**How it works:**
|
|
382
472
|
|
|
@@ -1422,7 +1512,7 @@ For those interested in the development history and architectural decisions:
|
|
|
1422
1512
|
|
|
1423
1513
|
- **[Development Logs](https://github.com/Smart-AI-Memory/empathy-framework/tree/main/docs/development-logs/)** — Execution plans, phase completions, and progress tracking
|
|
1424
1514
|
- **[Architecture Docs](https://github.com/Smart-AI-Memory/empathy-framework/tree/main/docs/architecture/)** — System design, memory architecture, and integration plans
|
|
1425
|
-
- **[
|
|
1515
|
+
- **[Claude Code Skills](.claude/commands/)** — AI-powered workflows and custom agent creation
|
|
1426
1516
|
- **[Guides](https://github.com/Smart-AI-Memory/empathy-framework/tree/main/docs/guides/)** — Publishing tutorials, MkDocs setup, and distribution policies
|
|
1427
1517
|
|
|
1428
1518
|
---
|
|
@@ -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-4.
|
|
23
|
+
empathy_framework-4.6.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
|
|
@@ -95,7 +95,7 @@ empathy_llm_toolkit/wizards/healthcare_wizard.py,sha256=B3NP7vYO2G4_TBgBxBX86OPc
|
|
|
95
95
|
empathy_llm_toolkit/wizards/patient_assessment_README.md,sha256=DInK_x7LgM8Qi9YSHgXtm7_sQupioJRf0M43_vml4ck,1586
|
|
96
96
|
empathy_llm_toolkit/wizards/patient_assessment_wizard.py,sha256=dsvoOq0AYCBigmn6HPoaSBnBPk9YV7IzAFZkJYx1iZQ,5423
|
|
97
97
|
empathy_llm_toolkit/wizards/technology_wizard.py,sha256=1c_7UQ8I64vib2eogDbHlVqfWzZVlqtHyhZ8SQKqb_M,8061
|
|
98
|
-
empathy_os/__init__.py,sha256=
|
|
98
|
+
empathy_os/__init__.py,sha256=kIfkC5EjEoMqUFQreDfbUzNsSIgqBNwYShMSM6mMG2I,5896
|
|
99
99
|
empathy_os/agent_monitoring.py,sha256=s4seLC_J4AtQ3PYWrRPO8YHM-Fbm0Q36kPEdlTHf2HI,13375
|
|
100
100
|
empathy_os/cache_monitor.py,sha256=DTR8xr9d63czGzzdfrBFWp8hkoWPFsL-hpihPGmkbEc,11072
|
|
101
101
|
empathy_os/cache_stats.py,sha256=rWJPBNFEfhuLwKYKy89D_Qa9GPIyVso2jdCKp_cdJhI,10232
|
|
@@ -163,11 +163,12 @@ empathy_os/memory/storage/__init__.py,sha256=sPLdecYJ1z6nZTIl8gmbozjdCPp0SZLKsKo
|
|
|
163
163
|
empathy_os/meta_workflows/__init__.py,sha256=REUdSgr5kRxPuzj1R3qy50_BEdImoNOry_UNwn2jRYo,1845
|
|
164
164
|
empathy_os/meta_workflows/agent_creator.py,sha256=f2Bc_Qm4bj7DFpGzhDf41RnUK4rG4jQRpRWYiQ_AdjE,8061
|
|
165
165
|
empathy_os/meta_workflows/builtin_templates.py,sha256=5yL7hEKi7hu20jQK3PxJkGfwppyqdEokJiJMnTzTiXk,20722
|
|
166
|
-
empathy_os/meta_workflows/cli_meta_workflows.py,sha256=
|
|
166
|
+
empathy_os/meta_workflows/cli_meta_workflows.py,sha256=XeKfcJQIZKh6gz6Szx5FnZ9josStBJ0LJiazyrQGCEY,64088
|
|
167
167
|
empathy_os/meta_workflows/form_engine.py,sha256=tUeSU_TofTS7ZjhWL5tIw4DxrleaHfFQf2mMDI4IaMg,10877
|
|
168
168
|
empathy_os/meta_workflows/intent_detector.py,sha256=heWc6nm-EyMz-Ru2TfaNnWSLqduhOxfTVK80Plf96y4,10126
|
|
169
169
|
empathy_os/meta_workflows/models.py,sha256=jtuAgSuY-vHbjqVOo4AIoq1SXfp-DxUhPyAcmwqjbcI,18909
|
|
170
|
-
empathy_os/meta_workflows/pattern_learner.py,sha256=
|
|
170
|
+
empathy_os/meta_workflows/pattern_learner.py,sha256=vvcYBpi16jaejPh4hgeHq78BKgi7on-ltgon5PuEvnI,26661
|
|
171
|
+
empathy_os/meta_workflows/plan_generator.py,sha256=K0v3nVO4U7fJRylka53sg-qo4TEnK7VklLWWnOaLOKk,11020
|
|
171
172
|
empathy_os/meta_workflows/session_context.py,sha256=WTdhWAKHq6cLJBLHT-jwjxOwQyUPId_F8GPjQlI7gvY,12366
|
|
172
173
|
empathy_os/meta_workflows/template_registry.py,sha256=eFv4rlHcsuk7tnpLCjTNytYipmgyuruW_VZKdXmSXSE,7488
|
|
173
174
|
empathy_os/meta_workflows/workflow.py,sha256=Sag47KtDACEAcFnQ30Lu834iNHo08GCx5dnMXL0ILcc,36015
|
|
@@ -233,9 +234,9 @@ empathy_os/scaffolding/README.md,sha256=VwSG36Cr0WH8Gep1-Dd9tPEzRLCra1KhqsNJQnjb
|
|
|
233
234
|
empathy_os/scaffolding/__init__.py,sha256=-fqOQ0E3lb--D-0vic8d_1I1xiHeJiyKEHWpZvhz-Rk,977
|
|
234
235
|
empathy_os/scaffolding/__main__.py,sha256=r-lWXicNLuTgliqw28yDV3PxX8SdX8fg4jm55RxmElo,280
|
|
235
236
|
empathy_os/scaffolding/cli.py,sha256=2UxU_JUgtAuCkMXe9f2zYFbkMMtjk5DIOae5NjPC3yo,6700
|
|
236
|
-
empathy_os/socratic/__init__.py,sha256=
|
|
237
|
+
empathy_os/socratic/__init__.py,sha256=A5Z7JW6-dioFqwsI_CkS-yYzm3M2u3SxIW3-XQWqXdQ,6065
|
|
237
238
|
empathy_os/socratic/ab_testing.py,sha256=uXRT1EhfDrDaqFJ0xI_C7K6bXEZ1b9Pj9F97q-bQLgk,30043
|
|
238
|
-
empathy_os/socratic/blueprint.py,sha256=
|
|
239
|
+
empathy_os/socratic/blueprint.py,sha256=EaBy4sDgmVwcMBXlvXFjKJeUegRJ4dliTLD-UuARSHI,17212
|
|
239
240
|
empathy_os/socratic/cli.py,sha256=-RR90BY4oXrgBPeuN6nXP30TXtvEliWki2SfJNRibPg,21103
|
|
240
241
|
empathy_os/socratic/collaboration.py,sha256=TpQRP0OHmCOWPDnQALmvZMYm6CNPGeFv2GgIJJzDcOU,33000
|
|
241
242
|
empathy_os/socratic/domain_templates.py,sha256=-qh-I8CemX-XkSDnki7VxlMvtpI1lgzDQ3OZto0sP9U,30138
|
|
@@ -250,7 +251,7 @@ empathy_os/socratic/mcp_server.py,sha256=HqziHg1TQcQk_jDyJY9wOG0OJGzdfUgbzh62xKO
|
|
|
250
251
|
empathy_os/socratic/session.py,sha256=9bwxlZpNaX1TiZEEPcN9uHCM5vWGcZqw9uGv5lrqYaU,9957
|
|
251
252
|
empathy_os/socratic/storage.py,sha256=x-17Nng2O5ghOX6j_5muZyoDCmAovClhT1gv2p0uBnQ,21054
|
|
252
253
|
empathy_os/socratic/success.py,sha256=8-EEyfRu_z9C14OSOJqzyBPEgq4fxKTEcnS81YGPFxc,24510
|
|
253
|
-
empathy_os/socratic/visual_editor.py,sha256=
|
|
254
|
+
empathy_os/socratic/visual_editor.py,sha256=3GN_fnV2gE82ACVMq33dcHIfmTdi4eGk08mdwSgwbXg,25541
|
|
254
255
|
empathy_os/socratic/web_ui.py,sha256=jW66CXea_dA-Kcj0ac6pCT9QuufmymXahzBDdJQXiNI,24760
|
|
255
256
|
empathy_os/telemetry/__init__.py,sha256=6ZFO0r4I-WIE9BByVsKwyGFsGg-UEy3-OZNofHSr54A,263
|
|
256
257
|
empathy_os/telemetry/cli.py,sha256=F-PktRoYEIzCrtoWLNZgKWvI0RzvC7YQagiDbmcXcfE,47167
|
|
@@ -326,7 +327,7 @@ empathy_os/workflows/progressive/core.py,sha256=891OttvWkFokBRVzvqVUxwpcNlgc7edl
|
|
|
326
327
|
empathy_os/workflows/progressive/orchestrator.py,sha256=FsLcoRC8jujRcOV87PyN-0jzlLvStIQQqMFisxWWg0I,26786
|
|
327
328
|
empathy_os/workflows/progressive/reports.py,sha256=F2p3HyInGH8fT9-e_BsOVcgeQBtOugYsSyBn49yhhmc,17588
|
|
328
329
|
empathy_os/workflows/progressive/telemetry.py,sha256=5ZjCmeGjtfESejocWdtvnm5iCTAQv5_3NRTYmuoIbVs,9427
|
|
329
|
-
empathy_os/workflows/progressive/test_gen.py,sha256=
|
|
330
|
+
empathy_os/workflows/progressive/test_gen.py,sha256=K3AJ8cgNw-uiw3EZpl-19ldWFEL7l6xHKbL-1ZvD8Yo,15894
|
|
330
331
|
empathy_os/workflows/progressive/workflow.py,sha256=bGXKmB9UFLfDw5c9MsW6Zw4GSbknCP-9HnaIEX36nhY,21597
|
|
331
332
|
empathy_software_plugin/SOFTWARE_PLUGIN_README.md,sha256=RXIOB9Mt-8JrfGAA3ZUuRPT34sThubrwUgg5iNcSKIc,22591
|
|
332
333
|
empathy_software_plugin/__init__.py,sha256=OceDhLoQrjD0jTPlI4418608l97OT48u4SCL5yEDPQc,309
|
|
@@ -395,8 +396,8 @@ workflow_scaffolding/__init__.py,sha256=UpX5vjjjPjIaAKyIV1D4GxJzLUZy5DzdzgSkePYM
|
|
|
395
396
|
workflow_scaffolding/__main__.py,sha256=0qspuNoadTDqyskXTlT8Sahqau-XIxN35NHTSGVW6z4,236
|
|
396
397
|
workflow_scaffolding/cli.py,sha256=yLgvMsPbqI-LHt7UKXMuj-Dc0-44EqWiChldysrw1YQ,6763
|
|
397
398
|
workflow_scaffolding/generator.py,sha256=9eEmm324kVzf8BCtXEML090pyke06o0U7aGATzZIaPM,8869
|
|
398
|
-
empathy_framework-4.
|
|
399
|
-
empathy_framework-4.
|
|
400
|
-
empathy_framework-4.
|
|
401
|
-
empathy_framework-4.
|
|
402
|
-
empathy_framework-4.
|
|
399
|
+
empathy_framework-4.6.0.dist-info/METADATA,sha256=TRZ-inv-0V9uIFrO6bStQ9sRJnRMzP5c5Cv_fR6GvDw,59411
|
|
400
|
+
empathy_framework-4.6.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
401
|
+
empathy_framework-4.6.0.dist-info/entry_points.txt,sha256=41rM9JgcKpkU8dr4VvPcbiPy2GQX68cEj10l3XMH0FQ,1519
|
|
402
|
+
empathy_framework-4.6.0.dist-info/top_level.txt,sha256=wrNU1aVMutVDACer58H-udv0P_171Dv6z_42sZtZ-xM,124
|
|
403
|
+
empathy_framework-4.6.0.dist-info/RECORD,,
|
empathy_os/__init__.py
CHANGED
|
@@ -215,6 +215,145 @@ def inspect_template(
|
|
|
215
215
|
raise typer.Exit(code=1)
|
|
216
216
|
|
|
217
217
|
|
|
218
|
+
# =============================================================================
|
|
219
|
+
# Plan Generation Commands (Claude Code Integration)
|
|
220
|
+
# =============================================================================
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
@meta_workflow_app.command("plan")
|
|
224
|
+
def generate_plan_cmd(
|
|
225
|
+
template_id: str = typer.Argument(..., help="Template ID to generate plan for"),
|
|
226
|
+
output_format: str = typer.Option(
|
|
227
|
+
"markdown",
|
|
228
|
+
"--format",
|
|
229
|
+
"-f",
|
|
230
|
+
help="Output format: markdown, skill, or json",
|
|
231
|
+
),
|
|
232
|
+
output_file: str = typer.Option(
|
|
233
|
+
None,
|
|
234
|
+
"--output",
|
|
235
|
+
"-o",
|
|
236
|
+
help="Output file path (default: stdout)",
|
|
237
|
+
),
|
|
238
|
+
use_defaults: bool = typer.Option(
|
|
239
|
+
True,
|
|
240
|
+
"--use-defaults/--interactive",
|
|
241
|
+
help="Use default values or ask interactively",
|
|
242
|
+
),
|
|
243
|
+
install_skill: bool = typer.Option(
|
|
244
|
+
False,
|
|
245
|
+
"--install",
|
|
246
|
+
"-i",
|
|
247
|
+
help="Install as Claude Code skill in .claude/commands/",
|
|
248
|
+
),
|
|
249
|
+
):
|
|
250
|
+
"""Generate execution plan for Claude Code (no API costs).
|
|
251
|
+
|
|
252
|
+
This generates a plan that can be executed by Claude Code using your
|
|
253
|
+
Max subscription instead of making API calls.
|
|
254
|
+
|
|
255
|
+
Output formats:
|
|
256
|
+
- markdown: Human-readable plan to paste into Claude Code
|
|
257
|
+
- skill: Claude Code skill format for .claude/commands/
|
|
258
|
+
- json: Structured format for programmatic use
|
|
259
|
+
|
|
260
|
+
Examples:
|
|
261
|
+
empathy meta-workflow plan release-prep
|
|
262
|
+
empathy meta-workflow plan release-prep --format skill --install
|
|
263
|
+
empathy meta-workflow plan test-coverage-boost -o plan.md
|
|
264
|
+
empathy meta-workflow plan manage-docs --format json
|
|
265
|
+
"""
|
|
266
|
+
try:
|
|
267
|
+
from empathy_os.meta_workflows.plan_generator import generate_plan
|
|
268
|
+
|
|
269
|
+
# Load template
|
|
270
|
+
console.print(f"\n[bold]Generating plan for:[/bold] {template_id}")
|
|
271
|
+
registry = TemplateRegistry()
|
|
272
|
+
template = registry.load_template(template_id)
|
|
273
|
+
|
|
274
|
+
if not template:
|
|
275
|
+
console.print(f"[red]Template not found:[/red] {template_id}")
|
|
276
|
+
raise typer.Exit(code=1)
|
|
277
|
+
|
|
278
|
+
# Collect responses if interactive
|
|
279
|
+
form_responses = None
|
|
280
|
+
if not use_defaults and template.form_schema.questions:
|
|
281
|
+
console.print("\n[bold]Configuration:[/bold]")
|
|
282
|
+
form_responses = {}
|
|
283
|
+
for question in template.form_schema.questions:
|
|
284
|
+
if question.options:
|
|
285
|
+
# Multiple choice
|
|
286
|
+
console.print(f"\n{question.text}")
|
|
287
|
+
for i, opt in enumerate(question.options, 1):
|
|
288
|
+
default_mark = " (default)" if opt == question.default else ""
|
|
289
|
+
console.print(f" {i}. {opt}{default_mark}")
|
|
290
|
+
choice = typer.prompt("Choice", default="1")
|
|
291
|
+
try:
|
|
292
|
+
idx = int(choice) - 1
|
|
293
|
+
form_responses[question.id] = question.options[idx]
|
|
294
|
+
except (ValueError, IndexError):
|
|
295
|
+
form_responses[question.id] = question.default or question.options[0]
|
|
296
|
+
else:
|
|
297
|
+
# Yes/No or text
|
|
298
|
+
default = question.default or "Yes"
|
|
299
|
+
response = typer.prompt(question.text, default=default)
|
|
300
|
+
form_responses[question.id] = response
|
|
301
|
+
|
|
302
|
+
# Generate plan
|
|
303
|
+
plan_content = generate_plan(
|
|
304
|
+
template_id=template_id,
|
|
305
|
+
form_responses=form_responses,
|
|
306
|
+
use_defaults=use_defaults,
|
|
307
|
+
output_format=output_format,
|
|
308
|
+
)
|
|
309
|
+
|
|
310
|
+
# Handle output
|
|
311
|
+
if install_skill:
|
|
312
|
+
# Install as Claude Code skill
|
|
313
|
+
skill_dir = Path(".claude/commands")
|
|
314
|
+
skill_dir.mkdir(parents=True, exist_ok=True)
|
|
315
|
+
skill_path = skill_dir / f"{template_id}.md"
|
|
316
|
+
|
|
317
|
+
# Convert to skill format if not already
|
|
318
|
+
if output_format != "skill":
|
|
319
|
+
plan_content = generate_plan(
|
|
320
|
+
template_id=template_id,
|
|
321
|
+
form_responses=form_responses,
|
|
322
|
+
use_defaults=use_defaults,
|
|
323
|
+
output_format="skill",
|
|
324
|
+
)
|
|
325
|
+
|
|
326
|
+
skill_path.write_text(plan_content)
|
|
327
|
+
console.print(f"\n[green]✓ Installed as Claude Code skill:[/green] {skill_path}")
|
|
328
|
+
console.print(f"\nRun with: [bold]/project:{template_id}[/bold]")
|
|
329
|
+
|
|
330
|
+
elif output_file:
|
|
331
|
+
# Write to file
|
|
332
|
+
Path(output_file).write_text(plan_content)
|
|
333
|
+
console.print(f"\n[green]✓ Plan saved to:[/green] {output_file}")
|
|
334
|
+
|
|
335
|
+
else:
|
|
336
|
+
# Print to stdout
|
|
337
|
+
console.print("\n" + "=" * 60)
|
|
338
|
+
console.print(plan_content)
|
|
339
|
+
console.print("=" * 60)
|
|
340
|
+
|
|
341
|
+
# Show usage hints
|
|
342
|
+
console.print("\n[bold]Usage Options:[/bold]")
|
|
343
|
+
console.print("1. Copy prompts into Claude Code conversation")
|
|
344
|
+
console.print("2. Install as skill with: --install")
|
|
345
|
+
console.print("3. Use with Claude Code Task tool")
|
|
346
|
+
console.print("\n[dim]Cost: $0 (uses your Max subscription)[/dim]")
|
|
347
|
+
|
|
348
|
+
except ImportError:
|
|
349
|
+
console.print("[red]Plan generator not available.[/red]")
|
|
350
|
+
console.print("This feature requires the plan_generator module.")
|
|
351
|
+
raise typer.Exit(code=1)
|
|
352
|
+
except Exception as e:
|
|
353
|
+
console.print(f"[red]Error generating plan:[/red] {e}")
|
|
354
|
+
raise typer.Exit(code=1)
|
|
355
|
+
|
|
356
|
+
|
|
218
357
|
# =============================================================================
|
|
219
358
|
# Execution Commands
|
|
220
359
|
# =============================================================================
|
|
@@ -459,7 +598,6 @@ def natural_language_run(
|
|
|
459
598
|
console.print(f"[bold]Running {best_match.template_id}...[/bold]\n")
|
|
460
599
|
|
|
461
600
|
# Run the workflow
|
|
462
|
-
ctx = typer.Context(run_workflow)
|
|
463
601
|
run_workflow(
|
|
464
602
|
template_id=best_match.template_id,
|
|
465
603
|
mock=mock,
|
|
@@ -21,6 +21,8 @@ from empathy_os.meta_workflows.workflow import list_execution_results, load_exec
|
|
|
21
21
|
|
|
22
22
|
if TYPE_CHECKING:
|
|
23
23
|
from empathy_os.memory.unified import UnifiedMemory
|
|
24
|
+
from empathy_os.meta_workflows.models import FormResponse
|
|
25
|
+
from empathy_os.meta_workflows.workflow import MetaWorkflowResult
|
|
24
26
|
|
|
25
27
|
logger = logging.getLogger(__name__)
|
|
26
28
|
|
|
@@ -0,0 +1,376 @@
|
|
|
1
|
+
"""Plan Generator for Meta-Workflows.
|
|
2
|
+
|
|
3
|
+
Generates execution plans from meta-workflow templates that can be executed
|
|
4
|
+
by Claude Code instead of making direct API calls.
|
|
5
|
+
|
|
6
|
+
This enables users to leverage their Claude Max subscription instead of
|
|
7
|
+
paying per-API-call costs.
|
|
8
|
+
|
|
9
|
+
Output formats:
|
|
10
|
+
- Markdown: Human-readable plan for interactive use
|
|
11
|
+
- Claude Code Skill: .claude/commands/ compatible format
|
|
12
|
+
- JSON: Programmatic consumption
|
|
13
|
+
|
|
14
|
+
Created: 2026-01-20
|
|
15
|
+
"""
|
|
16
|
+
|
|
17
|
+
from dataclasses import dataclass
|
|
18
|
+
from datetime import datetime
|
|
19
|
+
from typing import Literal
|
|
20
|
+
|
|
21
|
+
from empathy_os.meta_workflows.models import (
|
|
22
|
+
AgentCompositionRule,
|
|
23
|
+
MetaWorkflowTemplate,
|
|
24
|
+
TierStrategy,
|
|
25
|
+
)
|
|
26
|
+
from empathy_os.orchestration.agent_templates import get_template
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
@dataclass
|
|
30
|
+
class AgentStep:
|
|
31
|
+
"""A single step in the execution plan."""
|
|
32
|
+
|
|
33
|
+
order: int
|
|
34
|
+
role: str
|
|
35
|
+
tier_recommendation: str
|
|
36
|
+
tools: list[str]
|
|
37
|
+
prompt: str
|
|
38
|
+
success_criteria: list[str]
|
|
39
|
+
config: dict
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@dataclass
|
|
43
|
+
class ExecutionPlan:
|
|
44
|
+
"""Complete execution plan for a meta-workflow."""
|
|
45
|
+
|
|
46
|
+
template_id: str
|
|
47
|
+
template_name: str
|
|
48
|
+
generated_at: str
|
|
49
|
+
form_responses: dict
|
|
50
|
+
steps: list[AgentStep]
|
|
51
|
+
synthesis_prompt: str
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class PlanGenerator:
|
|
55
|
+
"""Generates execution plans from meta-workflow templates."""
|
|
56
|
+
|
|
57
|
+
# Map tier strategies to Claude Code model recommendations
|
|
58
|
+
TIER_TO_MODEL = {
|
|
59
|
+
TierStrategy.CHEAP_ONLY: "haiku",
|
|
60
|
+
TierStrategy.PROGRESSIVE: "sonnet (escalate to opus if needed)",
|
|
61
|
+
TierStrategy.CAPABLE_FIRST: "sonnet",
|
|
62
|
+
TierStrategy.PREMIUM_ONLY: "opus",
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
def __init__(self, template: MetaWorkflowTemplate):
|
|
66
|
+
"""Initialize with a template.
|
|
67
|
+
|
|
68
|
+
Args:
|
|
69
|
+
template: The meta-workflow template to generate a plan from
|
|
70
|
+
"""
|
|
71
|
+
self.template = template
|
|
72
|
+
|
|
73
|
+
def generate(
|
|
74
|
+
self,
|
|
75
|
+
form_responses: dict | None = None,
|
|
76
|
+
use_defaults: bool = True,
|
|
77
|
+
) -> ExecutionPlan:
|
|
78
|
+
"""Generate an execution plan.
|
|
79
|
+
|
|
80
|
+
Args:
|
|
81
|
+
form_responses: User responses to form questions
|
|
82
|
+
use_defaults: Whether to use default values for missing responses
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
ExecutionPlan ready for execution
|
|
86
|
+
"""
|
|
87
|
+
# Collect form responses
|
|
88
|
+
responses = self._collect_responses(form_responses, use_defaults)
|
|
89
|
+
|
|
90
|
+
# Build steps from composition rules
|
|
91
|
+
steps = self._build_steps(responses)
|
|
92
|
+
|
|
93
|
+
# Generate synthesis prompt
|
|
94
|
+
synthesis = self._build_synthesis_prompt(steps)
|
|
95
|
+
|
|
96
|
+
return ExecutionPlan(
|
|
97
|
+
template_id=self.template.template_id,
|
|
98
|
+
template_name=self.template.name,
|
|
99
|
+
generated_at=datetime.now().isoformat(),
|
|
100
|
+
form_responses=responses,
|
|
101
|
+
steps=steps,
|
|
102
|
+
synthesis_prompt=synthesis,
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
def _collect_responses(
|
|
106
|
+
self,
|
|
107
|
+
provided: dict | None,
|
|
108
|
+
use_defaults: bool,
|
|
109
|
+
) -> dict:
|
|
110
|
+
"""Collect form responses with defaults."""
|
|
111
|
+
responses = {}
|
|
112
|
+
provided = provided or {}
|
|
113
|
+
|
|
114
|
+
for question in self.template.form_schema.questions:
|
|
115
|
+
if question.id in provided:
|
|
116
|
+
responses[question.id] = provided[question.id]
|
|
117
|
+
elif use_defaults and question.default:
|
|
118
|
+
responses[question.id] = question.default
|
|
119
|
+
elif question.required:
|
|
120
|
+
raise ValueError(f"Missing required response: {question.id}")
|
|
121
|
+
|
|
122
|
+
return responses
|
|
123
|
+
|
|
124
|
+
def _build_steps(self, responses: dict) -> list[AgentStep]:
|
|
125
|
+
"""Build execution steps from composition rules."""
|
|
126
|
+
steps = []
|
|
127
|
+
order = 1
|
|
128
|
+
|
|
129
|
+
for rule in self.template.agent_composition_rules:
|
|
130
|
+
# Check if this agent should be included based on responses
|
|
131
|
+
if not self._should_include_agent(rule, responses):
|
|
132
|
+
continue
|
|
133
|
+
|
|
134
|
+
# Get base template for additional context
|
|
135
|
+
base_template = get_template(rule.base_template)
|
|
136
|
+
|
|
137
|
+
# Build the prompt
|
|
138
|
+
prompt = self._build_agent_prompt(rule, base_template, responses)
|
|
139
|
+
|
|
140
|
+
# Map config from responses
|
|
141
|
+
config = {}
|
|
142
|
+
for response_key, config_key in rule.config_mapping.items():
|
|
143
|
+
if response_key in responses:
|
|
144
|
+
config[config_key] = responses[response_key]
|
|
145
|
+
|
|
146
|
+
steps.append(
|
|
147
|
+
AgentStep(
|
|
148
|
+
order=order,
|
|
149
|
+
role=rule.role,
|
|
150
|
+
tier_recommendation=self.TIER_TO_MODEL.get(
|
|
151
|
+
rule.tier_strategy, "sonnet"
|
|
152
|
+
),
|
|
153
|
+
tools=rule.tools,
|
|
154
|
+
prompt=prompt,
|
|
155
|
+
success_criteria=rule.success_criteria,
|
|
156
|
+
config=config,
|
|
157
|
+
)
|
|
158
|
+
)
|
|
159
|
+
order += 1
|
|
160
|
+
|
|
161
|
+
return steps
|
|
162
|
+
|
|
163
|
+
def _should_include_agent(
|
|
164
|
+
self,
|
|
165
|
+
rule: AgentCompositionRule,
|
|
166
|
+
responses: dict,
|
|
167
|
+
) -> bool:
|
|
168
|
+
"""Check if agent should be included based on required responses."""
|
|
169
|
+
for key, required_value in rule.required_responses.items():
|
|
170
|
+
if responses.get(key) != required_value:
|
|
171
|
+
return False
|
|
172
|
+
return True
|
|
173
|
+
|
|
174
|
+
def _build_agent_prompt(
|
|
175
|
+
self,
|
|
176
|
+
rule: AgentCompositionRule,
|
|
177
|
+
base_template,
|
|
178
|
+
responses: dict,
|
|
179
|
+
) -> str:
|
|
180
|
+
"""Build the prompt for an agent."""
|
|
181
|
+
# Start with base template instructions
|
|
182
|
+
base_instructions = ""
|
|
183
|
+
if base_template:
|
|
184
|
+
base_instructions = base_template.default_instructions
|
|
185
|
+
|
|
186
|
+
# Build context from responses
|
|
187
|
+
context_lines = []
|
|
188
|
+
for key, value in rule.config_mapping.items():
|
|
189
|
+
if key in responses:
|
|
190
|
+
context_lines.append(f"- {value}: {responses[key]}")
|
|
191
|
+
|
|
192
|
+
context = "\n".join(context_lines) if context_lines else "Using default configuration."
|
|
193
|
+
|
|
194
|
+
# Build success criteria checklist
|
|
195
|
+
criteria = "\n".join(f"- [ ] {c}" for c in rule.success_criteria)
|
|
196
|
+
|
|
197
|
+
return f"""You are a {rule.role} analyzing this codebase.
|
|
198
|
+
|
|
199
|
+
{base_instructions}
|
|
200
|
+
|
|
201
|
+
Configuration:
|
|
202
|
+
{context}
|
|
203
|
+
|
|
204
|
+
Success Criteria:
|
|
205
|
+
{criteria}
|
|
206
|
+
|
|
207
|
+
Tools available: {', '.join(rule.tools)}
|
|
208
|
+
|
|
209
|
+
Provide a structured report with findings, issues by severity, and recommendations.
|
|
210
|
+
"""
|
|
211
|
+
|
|
212
|
+
def _build_synthesis_prompt(self, steps: list[AgentStep]) -> str:
|
|
213
|
+
"""Build the synthesis prompt that combines all agent outputs."""
|
|
214
|
+
roles = [f"- {step.role}" for step in steps]
|
|
215
|
+
roles_list = "\n".join(roles)
|
|
216
|
+
|
|
217
|
+
return f"""You are synthesizing the results from multiple agents.
|
|
218
|
+
|
|
219
|
+
Combine the outputs from:
|
|
220
|
+
{roles_list}
|
|
221
|
+
|
|
222
|
+
Create a comprehensive report:
|
|
223
|
+
|
|
224
|
+
## Summary
|
|
225
|
+
Overall assessment of the analysis.
|
|
226
|
+
|
|
227
|
+
## Critical Issues (must address)
|
|
228
|
+
List any blockers or critical problems.
|
|
229
|
+
|
|
230
|
+
## Recommendations (should address)
|
|
231
|
+
List improvements and fixes.
|
|
232
|
+
|
|
233
|
+
## Action Items
|
|
234
|
+
Prioritized list of next steps.
|
|
235
|
+
|
|
236
|
+
## Risk Assessment
|
|
237
|
+
What risks exist? What's the recommended path forward?
|
|
238
|
+
"""
|
|
239
|
+
|
|
240
|
+
def to_markdown(self, plan: ExecutionPlan) -> str:
|
|
241
|
+
"""Convert plan to markdown format."""
|
|
242
|
+
lines = [
|
|
243
|
+
f"# Execution Plan: {plan.template_name}",
|
|
244
|
+
"",
|
|
245
|
+
"> Generated by Empathy Framework",
|
|
246
|
+
f"> Template: {plan.template_id}",
|
|
247
|
+
f"> Generated: {plan.generated_at}",
|
|
248
|
+
"",
|
|
249
|
+
"## Configuration",
|
|
250
|
+
"",
|
|
251
|
+
]
|
|
252
|
+
|
|
253
|
+
for key, value in plan.form_responses.items():
|
|
254
|
+
lines.append(f"- **{key}**: {value}")
|
|
255
|
+
|
|
256
|
+
lines.extend(["", "---", "", "## Execution Steps", ""])
|
|
257
|
+
|
|
258
|
+
for step in plan.steps:
|
|
259
|
+
lines.extend([
|
|
260
|
+
f"### Step {step.order}: {step.role}",
|
|
261
|
+
"",
|
|
262
|
+
f"**Tier Recommendation**: {step.tier_recommendation}",
|
|
263
|
+
f"**Tools**: {', '.join(step.tools)}",
|
|
264
|
+
"",
|
|
265
|
+
"**Prompt:**",
|
|
266
|
+
"```",
|
|
267
|
+
step.prompt,
|
|
268
|
+
"```",
|
|
269
|
+
"",
|
|
270
|
+
"**Success Criteria:**",
|
|
271
|
+
])
|
|
272
|
+
for criterion in step.success_criteria:
|
|
273
|
+
lines.append(f"- [ ] {criterion}")
|
|
274
|
+
lines.extend(["", "---", ""])
|
|
275
|
+
|
|
276
|
+
lines.extend([
|
|
277
|
+
"## Synthesis",
|
|
278
|
+
"",
|
|
279
|
+
"After all steps complete, run this synthesis:",
|
|
280
|
+
"",
|
|
281
|
+
"```",
|
|
282
|
+
plan.synthesis_prompt,
|
|
283
|
+
"```",
|
|
284
|
+
])
|
|
285
|
+
|
|
286
|
+
return "\n".join(lines)
|
|
287
|
+
|
|
288
|
+
def to_claude_code_skill(self, plan: ExecutionPlan) -> str:
|
|
289
|
+
"""Convert plan to Claude Code skill format.
|
|
290
|
+
|
|
291
|
+
This generates content for .claude/commands/<template-id>.md
|
|
292
|
+
"""
|
|
293
|
+
steps_text = []
|
|
294
|
+
for step in plan.steps:
|
|
295
|
+
steps_text.append(f"""
|
|
296
|
+
### {step.role}
|
|
297
|
+
Use the Task tool with subagent_type="Explore" to:
|
|
298
|
+
{step.prompt}
|
|
299
|
+
""")
|
|
300
|
+
|
|
301
|
+
return f"""# {plan.template_name}
|
|
302
|
+
|
|
303
|
+
Execute the {plan.template_name} workflow for this codebase.
|
|
304
|
+
|
|
305
|
+
## Steps
|
|
306
|
+
|
|
307
|
+
{"".join(steps_text)}
|
|
308
|
+
|
|
309
|
+
## Synthesis
|
|
310
|
+
|
|
311
|
+
After completing all steps, synthesize the findings:
|
|
312
|
+
{plan.synthesis_prompt}
|
|
313
|
+
|
|
314
|
+
## Output
|
|
315
|
+
|
|
316
|
+
Provide a final report with:
|
|
317
|
+
1. Overall status (READY / NEEDS WORK / BLOCKED)
|
|
318
|
+
2. Critical issues found
|
|
319
|
+
3. Recommendations
|
|
320
|
+
4. Next steps
|
|
321
|
+
"""
|
|
322
|
+
|
|
323
|
+
|
|
324
|
+
def generate_plan(
|
|
325
|
+
template_id: str,
|
|
326
|
+
form_responses: dict | None = None,
|
|
327
|
+
use_defaults: bool = True,
|
|
328
|
+
output_format: Literal["markdown", "skill", "json"] = "markdown",
|
|
329
|
+
) -> str:
|
|
330
|
+
"""Generate an execution plan for a meta-workflow.
|
|
331
|
+
|
|
332
|
+
Args:
|
|
333
|
+
template_id: ID of the template to use
|
|
334
|
+
form_responses: Optional form responses
|
|
335
|
+
use_defaults: Whether to use default values
|
|
336
|
+
output_format: Output format (markdown, skill, or json)
|
|
337
|
+
|
|
338
|
+
Returns:
|
|
339
|
+
Plan in the requested format
|
|
340
|
+
"""
|
|
341
|
+
from empathy_os.meta_workflows.registry import get_template as get_workflow_template
|
|
342
|
+
|
|
343
|
+
template = get_workflow_template(template_id)
|
|
344
|
+
if not template:
|
|
345
|
+
raise ValueError(f"Template not found: {template_id}")
|
|
346
|
+
|
|
347
|
+
generator = PlanGenerator(template)
|
|
348
|
+
plan = generator.generate(form_responses, use_defaults)
|
|
349
|
+
|
|
350
|
+
if output_format == "markdown":
|
|
351
|
+
return generator.to_markdown(plan)
|
|
352
|
+
elif output_format == "skill":
|
|
353
|
+
return generator.to_claude_code_skill(plan)
|
|
354
|
+
elif output_format == "json":
|
|
355
|
+
import json
|
|
356
|
+
return json.dumps({
|
|
357
|
+
"template_id": plan.template_id,
|
|
358
|
+
"template_name": plan.template_name,
|
|
359
|
+
"generated_at": plan.generated_at,
|
|
360
|
+
"form_responses": plan.form_responses,
|
|
361
|
+
"steps": [
|
|
362
|
+
{
|
|
363
|
+
"order": s.order,
|
|
364
|
+
"role": s.role,
|
|
365
|
+
"tier_recommendation": s.tier_recommendation,
|
|
366
|
+
"tools": s.tools,
|
|
367
|
+
"prompt": s.prompt,
|
|
368
|
+
"success_criteria": s.success_criteria,
|
|
369
|
+
"config": s.config,
|
|
370
|
+
}
|
|
371
|
+
for s in plan.steps
|
|
372
|
+
],
|
|
373
|
+
"synthesis_prompt": plan.synthesis_prompt,
|
|
374
|
+
}, indent=2)
|
|
375
|
+
else:
|
|
376
|
+
raise ValueError(f"Unknown format: {output_format}")
|
empathy_os/socratic/__init__.py
CHANGED
|
@@ -51,7 +51,7 @@ from .blueprint import (
|
|
|
51
51
|
)
|
|
52
52
|
|
|
53
53
|
# CLI interface
|
|
54
|
-
from .cli import Console
|
|
54
|
+
from .cli import Console
|
|
55
55
|
|
|
56
56
|
# Collaboration
|
|
57
57
|
from .collaboration import (
|
|
@@ -199,7 +199,6 @@ __all__ = [
|
|
|
199
199
|
"SQLiteStorage",
|
|
200
200
|
"StorageManager",
|
|
201
201
|
# CLI interface
|
|
202
|
-
"SocraticCLI",
|
|
203
202
|
"Console",
|
|
204
203
|
# Web UI components
|
|
205
204
|
"ReactFormSchema",
|
empathy_os/socratic/blueprint.py
CHANGED
|
@@ -28,6 +28,7 @@ class AgentRole(Enum):
|
|
|
28
28
|
ANALYZER = "analyzer" # Examines input, identifies patterns
|
|
29
29
|
REVIEWER = "reviewer" # Evaluates quality, finds issues
|
|
30
30
|
AUDITOR = "auditor" # Deep-dive security/compliance checks
|
|
31
|
+
RESEARCHER = "researcher" # Gathers information and context
|
|
31
32
|
|
|
32
33
|
# Action agents
|
|
33
34
|
GENERATOR = "generator" # Creates new content/code
|
|
@@ -265,9 +265,6 @@ class WorkflowVisualizer:
|
|
|
265
265
|
stage_nodes = [n for n in state.nodes if n.node_type == NodeType.STAGE]
|
|
266
266
|
agent_nodes = [n for n in state.nodes if n.node_type == NodeType.AGENT]
|
|
267
267
|
|
|
268
|
-
# Build agent lookup from original
|
|
269
|
-
agents_by_id = {a.agent_id: a for a in original_blueprint.agents}
|
|
270
|
-
|
|
271
268
|
# Build edge lookup
|
|
272
269
|
edges_by_source: dict[str, list[str]] = {}
|
|
273
270
|
edges_by_target: dict[str, list[str]] = {}
|
|
@@ -410,8 +407,8 @@ class ASCIIVisualizer:
|
|
|
410
407
|
stages = []
|
|
411
408
|
for stage in blueprint.stages:
|
|
412
409
|
agents = ",".join(a[:8] for a in stage.agent_ids)
|
|
413
|
-
|
|
414
|
-
stages.append(f"[{stage.name}:{agents}]")
|
|
410
|
+
marker = "∥" if stage.parallel else "→"
|
|
411
|
+
stages.append(f"[{stage.name}{marker}:{agents}]")
|
|
415
412
|
|
|
416
413
|
return f" {' → '.join(stages)} "
|
|
417
414
|
|
|
@@ -163,15 +163,15 @@ class ProgressiveTestGenWorkflow(ProgressiveWorkflow):
|
|
|
163
163
|
"""
|
|
164
164
|
logger.info(f"Generating {len(items)} tests at {tier.value} tier")
|
|
165
165
|
|
|
166
|
-
# Build prompt for this tier
|
|
166
|
+
# Build prompt for this tier (prepared for future LLM integration)
|
|
167
167
|
base_task = self._build_test_gen_task(items)
|
|
168
|
-
|
|
168
|
+
_prompt = self.meta_orchestrator.build_tier_prompt( # noqa: F841
|
|
169
169
|
tier,
|
|
170
170
|
base_task,
|
|
171
171
|
context
|
|
172
172
|
)
|
|
173
173
|
|
|
174
|
-
# TODO: Call LLM API with
|
|
174
|
+
# TODO: Call LLM API with _prompt
|
|
175
175
|
# For now, simulate test generation
|
|
176
176
|
generated_tests = self._simulate_test_generation(tier, items)
|
|
177
177
|
|
|
@@ -228,8 +228,8 @@ class ProgressiveTestGenWorkflow(ProgressiveWorkflow):
|
|
|
228
228
|
"""
|
|
229
229
|
generated_tests = []
|
|
230
230
|
|
|
231
|
-
#
|
|
232
|
-
|
|
231
|
+
# Quality thresholds per tier (prepared for future LLM integration)
|
|
232
|
+
_base_quality = { # noqa: F841
|
|
233
233
|
Tier.CHEAP: 70,
|
|
234
234
|
Tier.CAPABLE: 85,
|
|
235
235
|
Tier.PREMIUM: 95
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|