empathy-framework 4.6.6__py3-none-any.whl → 4.7.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.
Files changed (247) hide show
  1. {empathy_framework-4.6.6.dist-info → empathy_framework-4.7.0.dist-info}/METADATA +7 -6
  2. empathy_framework-4.7.0.dist-info/RECORD +354 -0
  3. {empathy_framework-4.6.6.dist-info → empathy_framework-4.7.0.dist-info}/top_level.txt +0 -2
  4. empathy_healthcare_plugin/monitors/monitoring/__init__.py +9 -9
  5. empathy_llm_toolkit/agent_factory/__init__.py +6 -6
  6. empathy_llm_toolkit/agent_factory/adapters/wizard_adapter.py +7 -10
  7. empathy_llm_toolkit/agents_md/__init__.py +22 -0
  8. empathy_llm_toolkit/agents_md/loader.py +218 -0
  9. empathy_llm_toolkit/agents_md/parser.py +271 -0
  10. empathy_llm_toolkit/agents_md/registry.py +307 -0
  11. empathy_llm_toolkit/commands/__init__.py +51 -0
  12. empathy_llm_toolkit/commands/context.py +375 -0
  13. empathy_llm_toolkit/commands/loader.py +301 -0
  14. empathy_llm_toolkit/commands/models.py +231 -0
  15. empathy_llm_toolkit/commands/parser.py +371 -0
  16. empathy_llm_toolkit/commands/registry.py +429 -0
  17. empathy_llm_toolkit/config/__init__.py +8 -8
  18. empathy_llm_toolkit/config/unified.py +3 -7
  19. empathy_llm_toolkit/context/__init__.py +22 -0
  20. empathy_llm_toolkit/context/compaction.py +455 -0
  21. empathy_llm_toolkit/context/manager.py +434 -0
  22. empathy_llm_toolkit/hooks/__init__.py +24 -0
  23. empathy_llm_toolkit/hooks/config.py +306 -0
  24. empathy_llm_toolkit/hooks/executor.py +289 -0
  25. empathy_llm_toolkit/hooks/registry.py +302 -0
  26. empathy_llm_toolkit/hooks/scripts/__init__.py +39 -0
  27. empathy_llm_toolkit/hooks/scripts/evaluate_session.py +201 -0
  28. empathy_llm_toolkit/hooks/scripts/first_time_init.py +285 -0
  29. empathy_llm_toolkit/hooks/scripts/pre_compact.py +207 -0
  30. empathy_llm_toolkit/hooks/scripts/session_end.py +183 -0
  31. empathy_llm_toolkit/hooks/scripts/session_start.py +163 -0
  32. empathy_llm_toolkit/hooks/scripts/suggest_compact.py +225 -0
  33. empathy_llm_toolkit/learning/__init__.py +30 -0
  34. empathy_llm_toolkit/learning/evaluator.py +438 -0
  35. empathy_llm_toolkit/learning/extractor.py +514 -0
  36. empathy_llm_toolkit/learning/storage.py +560 -0
  37. empathy_llm_toolkit/providers.py +4 -11
  38. empathy_llm_toolkit/security/__init__.py +17 -17
  39. empathy_llm_toolkit/utils/tokens.py +2 -5
  40. empathy_os/__init__.py +202 -70
  41. empathy_os/cache_monitor.py +5 -3
  42. empathy_os/cli/__init__.py +11 -55
  43. empathy_os/cli/__main__.py +29 -15
  44. empathy_os/cli/commands/inspection.py +21 -12
  45. empathy_os/cli/commands/memory.py +4 -12
  46. empathy_os/cli/commands/profiling.py +198 -0
  47. empathy_os/cli/commands/utilities.py +27 -7
  48. empathy_os/cli.py +28 -57
  49. empathy_os/cli_unified.py +525 -1164
  50. empathy_os/cost_tracker.py +9 -3
  51. empathy_os/dashboard/server.py +200 -2
  52. empathy_os/hot_reload/__init__.py +7 -7
  53. empathy_os/hot_reload/config.py +6 -7
  54. empathy_os/hot_reload/integration.py +35 -35
  55. empathy_os/hot_reload/reloader.py +57 -57
  56. empathy_os/hot_reload/watcher.py +28 -28
  57. empathy_os/hot_reload/websocket.py +2 -2
  58. empathy_os/memory/__init__.py +11 -4
  59. empathy_os/memory/claude_memory.py +1 -1
  60. empathy_os/memory/cross_session.py +8 -12
  61. empathy_os/memory/edges.py +6 -6
  62. empathy_os/memory/file_session.py +770 -0
  63. empathy_os/memory/graph.py +30 -30
  64. empathy_os/memory/nodes.py +6 -6
  65. empathy_os/memory/short_term.py +15 -9
  66. empathy_os/memory/unified.py +606 -140
  67. empathy_os/meta_workflows/agent_creator.py +3 -9
  68. empathy_os/meta_workflows/cli_meta_workflows.py +113 -53
  69. empathy_os/meta_workflows/form_engine.py +6 -18
  70. empathy_os/meta_workflows/intent_detector.py +64 -24
  71. empathy_os/meta_workflows/models.py +3 -1
  72. empathy_os/meta_workflows/pattern_learner.py +13 -31
  73. empathy_os/meta_workflows/plan_generator.py +55 -47
  74. empathy_os/meta_workflows/session_context.py +2 -3
  75. empathy_os/meta_workflows/workflow.py +20 -51
  76. empathy_os/models/cli.py +2 -2
  77. empathy_os/models/tasks.py +1 -2
  78. empathy_os/models/telemetry.py +4 -1
  79. empathy_os/models/token_estimator.py +3 -1
  80. empathy_os/monitoring/alerts.py +938 -9
  81. empathy_os/monitoring/alerts_cli.py +346 -183
  82. empathy_os/orchestration/execution_strategies.py +12 -29
  83. empathy_os/orchestration/pattern_learner.py +20 -26
  84. empathy_os/orchestration/real_tools.py +6 -15
  85. empathy_os/platform_utils.py +2 -1
  86. empathy_os/plugins/__init__.py +2 -2
  87. empathy_os/plugins/base.py +64 -64
  88. empathy_os/plugins/registry.py +32 -32
  89. empathy_os/project_index/index.py +49 -15
  90. empathy_os/project_index/models.py +1 -2
  91. empathy_os/project_index/reports.py +1 -1
  92. empathy_os/project_index/scanner.py +1 -0
  93. empathy_os/redis_memory.py +10 -7
  94. empathy_os/resilience/__init__.py +1 -1
  95. empathy_os/resilience/health.py +10 -10
  96. empathy_os/routing/__init__.py +7 -7
  97. empathy_os/routing/chain_executor.py +37 -37
  98. empathy_os/routing/classifier.py +36 -36
  99. empathy_os/routing/smart_router.py +40 -40
  100. empathy_os/routing/{wizard_registry.py → workflow_registry.py} +47 -47
  101. empathy_os/scaffolding/__init__.py +8 -8
  102. empathy_os/scaffolding/__main__.py +1 -1
  103. empathy_os/scaffolding/cli.py +28 -28
  104. empathy_os/socratic/__init__.py +3 -19
  105. empathy_os/socratic/ab_testing.py +25 -36
  106. empathy_os/socratic/blueprint.py +38 -38
  107. empathy_os/socratic/cli.py +34 -20
  108. empathy_os/socratic/collaboration.py +30 -28
  109. empathy_os/socratic/domain_templates.py +9 -1
  110. empathy_os/socratic/embeddings.py +17 -13
  111. empathy_os/socratic/engine.py +135 -70
  112. empathy_os/socratic/explainer.py +70 -60
  113. empathy_os/socratic/feedback.py +24 -19
  114. empathy_os/socratic/forms.py +15 -10
  115. empathy_os/socratic/generator.py +51 -35
  116. empathy_os/socratic/llm_analyzer.py +25 -23
  117. empathy_os/socratic/mcp_server.py +99 -159
  118. empathy_os/socratic/session.py +19 -13
  119. empathy_os/socratic/storage.py +98 -67
  120. empathy_os/socratic/success.py +38 -27
  121. empathy_os/socratic/visual_editor.py +51 -39
  122. empathy_os/socratic/web_ui.py +99 -66
  123. empathy_os/telemetry/cli.py +3 -1
  124. empathy_os/telemetry/usage_tracker.py +1 -3
  125. empathy_os/test_generator/__init__.py +3 -3
  126. empathy_os/test_generator/cli.py +28 -28
  127. empathy_os/test_generator/generator.py +64 -66
  128. empathy_os/test_generator/risk_analyzer.py +11 -11
  129. empathy_os/vscode_bridge.py +173 -0
  130. empathy_os/workflows/__init__.py +212 -120
  131. empathy_os/workflows/batch_processing.py +8 -24
  132. empathy_os/workflows/bug_predict.py +1 -1
  133. empathy_os/workflows/code_review.py +20 -5
  134. empathy_os/workflows/code_review_pipeline.py +13 -8
  135. empathy_os/workflows/keyboard_shortcuts/workflow.py +6 -2
  136. empathy_os/workflows/manage_documentation.py +1 -0
  137. empathy_os/workflows/orchestrated_health_check.py +6 -11
  138. empathy_os/workflows/orchestrated_release_prep.py +3 -3
  139. empathy_os/workflows/pr_review.py +18 -10
  140. empathy_os/workflows/progressive/__init__.py +2 -12
  141. empathy_os/workflows/progressive/cli.py +14 -37
  142. empathy_os/workflows/progressive/core.py +12 -12
  143. empathy_os/workflows/progressive/orchestrator.py +166 -144
  144. empathy_os/workflows/progressive/reports.py +22 -31
  145. empathy_os/workflows/progressive/telemetry.py +8 -14
  146. empathy_os/workflows/progressive/test_gen.py +29 -48
  147. empathy_os/workflows/progressive/workflow.py +31 -70
  148. empathy_os/workflows/release_prep.py +21 -6
  149. empathy_os/workflows/release_prep_crew.py +1 -0
  150. empathy_os/workflows/secure_release.py +13 -6
  151. empathy_os/workflows/security_audit.py +8 -3
  152. empathy_os/workflows/test_coverage_boost_crew.py +3 -2
  153. empathy_os/workflows/test_maintenance_crew.py +1 -0
  154. empathy_os/workflows/test_runner.py +16 -12
  155. empathy_software_plugin/SOFTWARE_PLUGIN_README.md +25 -703
  156. empathy_software_plugin/cli.py +0 -122
  157. coach_wizards/__init__.py +0 -45
  158. coach_wizards/accessibility_wizard.py +0 -91
  159. coach_wizards/api_wizard.py +0 -91
  160. coach_wizards/base_wizard.py +0 -209
  161. coach_wizards/cicd_wizard.py +0 -91
  162. coach_wizards/code_reviewer_README.md +0 -60
  163. coach_wizards/code_reviewer_wizard.py +0 -180
  164. coach_wizards/compliance_wizard.py +0 -91
  165. coach_wizards/database_wizard.py +0 -91
  166. coach_wizards/debugging_wizard.py +0 -91
  167. coach_wizards/documentation_wizard.py +0 -91
  168. coach_wizards/generate_wizards.py +0 -347
  169. coach_wizards/localization_wizard.py +0 -173
  170. coach_wizards/migration_wizard.py +0 -91
  171. coach_wizards/monitoring_wizard.py +0 -91
  172. coach_wizards/observability_wizard.py +0 -91
  173. coach_wizards/performance_wizard.py +0 -91
  174. coach_wizards/prompt_engineering_wizard.py +0 -661
  175. coach_wizards/refactoring_wizard.py +0 -91
  176. coach_wizards/scaling_wizard.py +0 -90
  177. coach_wizards/security_wizard.py +0 -92
  178. coach_wizards/testing_wizard.py +0 -91
  179. empathy_framework-4.6.6.dist-info/RECORD +0 -410
  180. empathy_llm_toolkit/wizards/__init__.py +0 -43
  181. empathy_llm_toolkit/wizards/base_wizard.py +0 -364
  182. empathy_llm_toolkit/wizards/customer_support_wizard.py +0 -190
  183. empathy_llm_toolkit/wizards/healthcare_wizard.py +0 -378
  184. empathy_llm_toolkit/wizards/patient_assessment_README.md +0 -64
  185. empathy_llm_toolkit/wizards/patient_assessment_wizard.py +0 -193
  186. empathy_llm_toolkit/wizards/technology_wizard.py +0 -209
  187. empathy_os/wizard_factory_cli.py +0 -170
  188. empathy_software_plugin/wizards/__init__.py +0 -42
  189. empathy_software_plugin/wizards/advanced_debugging_wizard.py +0 -395
  190. empathy_software_plugin/wizards/agent_orchestration_wizard.py +0 -511
  191. empathy_software_plugin/wizards/ai_collaboration_wizard.py +0 -503
  192. empathy_software_plugin/wizards/ai_context_wizard.py +0 -441
  193. empathy_software_plugin/wizards/ai_documentation_wizard.py +0 -503
  194. empathy_software_plugin/wizards/base_wizard.py +0 -288
  195. empathy_software_plugin/wizards/book_chapter_wizard.py +0 -519
  196. empathy_software_plugin/wizards/code_review_wizard.py +0 -604
  197. empathy_software_plugin/wizards/debugging/__init__.py +0 -50
  198. empathy_software_plugin/wizards/debugging/bug_risk_analyzer.py +0 -414
  199. empathy_software_plugin/wizards/debugging/config_loaders.py +0 -446
  200. empathy_software_plugin/wizards/debugging/fix_applier.py +0 -469
  201. empathy_software_plugin/wizards/debugging/language_patterns.py +0 -385
  202. empathy_software_plugin/wizards/debugging/linter_parsers.py +0 -470
  203. empathy_software_plugin/wizards/debugging/verification.py +0 -369
  204. empathy_software_plugin/wizards/enhanced_testing_wizard.py +0 -537
  205. empathy_software_plugin/wizards/memory_enhanced_debugging_wizard.py +0 -816
  206. empathy_software_plugin/wizards/multi_model_wizard.py +0 -501
  207. empathy_software_plugin/wizards/pattern_extraction_wizard.py +0 -422
  208. empathy_software_plugin/wizards/pattern_retriever_wizard.py +0 -400
  209. empathy_software_plugin/wizards/performance/__init__.py +0 -9
  210. empathy_software_plugin/wizards/performance/bottleneck_detector.py +0 -221
  211. empathy_software_plugin/wizards/performance/profiler_parsers.py +0 -278
  212. empathy_software_plugin/wizards/performance/trajectory_analyzer.py +0 -429
  213. empathy_software_plugin/wizards/performance_profiling_wizard.py +0 -305
  214. empathy_software_plugin/wizards/prompt_engineering_wizard.py +0 -425
  215. empathy_software_plugin/wizards/rag_pattern_wizard.py +0 -461
  216. empathy_software_plugin/wizards/security/__init__.py +0 -32
  217. empathy_software_plugin/wizards/security/exploit_analyzer.py +0 -290
  218. empathy_software_plugin/wizards/security/owasp_patterns.py +0 -241
  219. empathy_software_plugin/wizards/security/vulnerability_scanner.py +0 -604
  220. empathy_software_plugin/wizards/security_analysis_wizard.py +0 -322
  221. empathy_software_plugin/wizards/security_learning_wizard.py +0 -740
  222. empathy_software_plugin/wizards/tech_debt_wizard.py +0 -726
  223. empathy_software_plugin/wizards/testing/__init__.py +0 -27
  224. empathy_software_plugin/wizards/testing/coverage_analyzer.py +0 -459
  225. empathy_software_plugin/wizards/testing/quality_analyzer.py +0 -525
  226. empathy_software_plugin/wizards/testing/test_suggester.py +0 -533
  227. empathy_software_plugin/wizards/testing_wizard.py +0 -274
  228. wizards/__init__.py +0 -82
  229. wizards/admission_assessment_wizard.py +0 -644
  230. wizards/care_plan.py +0 -321
  231. wizards/clinical_assessment.py +0 -769
  232. wizards/discharge_planning.py +0 -77
  233. wizards/discharge_summary_wizard.py +0 -468
  234. wizards/dosage_calculation.py +0 -497
  235. wizards/incident_report_wizard.py +0 -454
  236. wizards/medication_reconciliation.py +0 -85
  237. wizards/nursing_assessment.py +0 -171
  238. wizards/patient_education.py +0 -654
  239. wizards/quality_improvement.py +0 -705
  240. wizards/sbar_report.py +0 -324
  241. wizards/sbar_wizard.py +0 -608
  242. wizards/shift_handoff_wizard.py +0 -535
  243. wizards/soap_note_wizard.py +0 -679
  244. wizards/treatment_plan.py +0 -15
  245. {empathy_framework-4.6.6.dist-info → empathy_framework-4.7.0.dist-info}/WHEEL +0 -0
  246. {empathy_framework-4.6.6.dist-info → empathy_framework-4.7.0.dist-info}/entry_points.txt +0 -0
  247. {empathy_framework-4.6.6.dist-info → empathy_framework-4.7.0.dist-info}/licenses/LICENSE +0 -0
@@ -56,9 +56,7 @@ class PatternLearner:
56
56
  If provided, insights will be stored in both files and memory
57
57
  """
58
58
  if executions_dir is None:
59
- executions_dir = str(
60
- Path.home() / ".empathy" / "meta_workflows" / "executions"
61
- )
59
+ executions_dir = str(Path.home() / ".empathy" / "meta_workflows" / "executions")
62
60
  self.executions_dir = Path(executions_dir)
63
61
  self.memory = memory
64
62
 
@@ -90,9 +88,7 @@ class PatternLearner:
90
88
  results = []
91
89
  for run_id in run_ids:
92
90
  try:
93
- result = load_execution_result(
94
- run_id, storage_dir=str(self.executions_dir)
95
- )
91
+ result = load_execution_result(run_id, storage_dir=str(self.executions_dir))
96
92
  if template_id is None or result.template_id == template_id:
97
93
  results.append(result)
98
94
  except Exception as e:
@@ -312,9 +308,7 @@ class PatternLearner:
312
308
 
313
309
  return insights
314
310
 
315
- def get_recommendations(
316
- self, template_id: str, min_confidence: float = 0.7
317
- ) -> list[str]:
311
+ def get_recommendations(self, template_id: str, min_confidence: float = 0.7) -> list[str]:
318
312
  """Get actionable recommendations for a template.
319
313
 
320
314
  Args:
@@ -324,9 +318,7 @@ class PatternLearner:
324
318
  Returns:
325
319
  List of recommendation strings
326
320
  """
327
- insights = self.analyze_patterns(
328
- template_id=template_id, min_confidence=min_confidence
329
- )
321
+ insights = self.analyze_patterns(template_id=template_id, min_confidence=min_confidence)
330
322
 
331
323
  recommendations = []
332
324
 
@@ -347,9 +339,7 @@ class PatternLearner:
347
339
 
348
340
  elif insight.insight_type == "cost_analysis":
349
341
  avg_cost = insight.data["average"]
350
- recommendations.append(
351
- f"💰 Expected workflow cost: ${avg_cost:.2f}"
352
- )
342
+ recommendations.append(f"💰 Expected workflow cost: ${avg_cost:.2f}")
353
343
 
354
344
  elif insight.insight_type == "failure_analysis":
355
345
  role = insight.data["role"]
@@ -361,9 +351,7 @@ class PatternLearner:
361
351
 
362
352
  return recommendations
363
353
 
364
- def generate_analytics_report(
365
- self, template_id: str | None = None
366
- ) -> dict[str, Any]:
354
+ def generate_analytics_report(self, template_id: str | None = None) -> dict[str, Any]:
367
355
  """Generate comprehensive analytics report.
368
356
 
369
357
  Args:
@@ -384,9 +372,7 @@ class PatternLearner:
384
372
  results = []
385
373
  for run_id in run_ids:
386
374
  try:
387
- result = load_execution_result(
388
- run_id, storage_dir=str(self.executions_dir)
389
- )
375
+ result = load_execution_result(run_id, storage_dir=str(self.executions_dir))
390
376
  if template_id is None or result.template_id == template_id:
391
377
  results.append(result)
392
378
  except Exception:
@@ -412,9 +398,7 @@ class PatternLearner:
412
398
  insight_type: [i.to_dict() for i in insights_list]
413
399
  for insight_type, insights_list in insights_by_type.items()
414
400
  },
415
- "recommendations": self.get_recommendations(template_id)
416
- if template_id
417
- else [],
401
+ "recommendations": self.get_recommendations(template_id) if template_id else [],
418
402
  }
419
403
 
420
404
  return report
@@ -465,7 +449,7 @@ class PatternLearner:
465
449
  # Create searchable content
466
450
  content = f"""Meta-workflow execution: {result.template_id}
467
451
  Run ID: {result.run_id}
468
- Status: {'SUCCESS' if result.success else 'FAILED'}
452
+ Status: {"SUCCESS" if result.success else "FAILED"}
469
453
  Agents created: {len(result.agents_created)}
470
454
  Total cost: ${result.total_cost:.2f}
471
455
  Duration: {result.total_duration:.1f}s
@@ -574,9 +558,7 @@ Form Responses:
574
558
 
575
559
  # Load full result from files
576
560
  try:
577
- result = load_execution_result(
578
- run_id, storage_dir=str(self.executions_dir)
579
- )
561
+ result = load_execution_result(run_id, storage_dir=str(self.executions_dir))
580
562
  results.append(result)
581
563
  except FileNotFoundError:
582
564
  logger.warning(f"Result file not found for run_id: {run_id}")
@@ -670,9 +652,9 @@ Form Responses:
670
652
 
671
653
  # Generate memory-enhanced recommendations
672
654
  if similar_executions:
673
- success_rate = sum(
674
- 1 for e in similar_executions if e.success
675
- ) / len(similar_executions)
655
+ success_rate = sum(1 for e in similar_executions if e.success) / len(
656
+ similar_executions
657
+ )
676
658
 
677
659
  if success_rate >= 0.8:
678
660
  base_recs.insert(
@@ -147,9 +147,7 @@ class PlanGenerator:
147
147
  AgentStep(
148
148
  order=order,
149
149
  role=rule.role,
150
- tier_recommendation=self.TIER_TO_MODEL.get(
151
- rule.tier_strategy, "sonnet"
152
- ),
150
+ tier_recommendation=self.TIER_TO_MODEL.get(rule.tier_strategy, "sonnet"),
153
151
  tools=rule.tools,
154
152
  prompt=prompt,
155
153
  success_criteria=rule.success_criteria,
@@ -204,7 +202,7 @@ Configuration:
204
202
  Success Criteria:
205
203
  {criteria}
206
204
 
207
- Tools available: {', '.join(rule.tools)}
205
+ Tools available: {", ".join(rule.tools)}
208
206
 
209
207
  Provide a structured report with findings, issues by severity, and recommendations.
210
208
  """
@@ -256,32 +254,36 @@ What risks exist? What's the recommended path forward?
256
254
  lines.extend(["", "---", "", "## Execution Steps", ""])
257
255
 
258
256
  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
- ])
257
+ lines.extend(
258
+ [
259
+ f"### Step {step.order}: {step.role}",
260
+ "",
261
+ f"**Tier Recommendation**: {step.tier_recommendation}",
262
+ f"**Tools**: {', '.join(step.tools)}",
263
+ "",
264
+ "**Prompt:**",
265
+ "```",
266
+ step.prompt,
267
+ "```",
268
+ "",
269
+ "**Success Criteria:**",
270
+ ]
271
+ )
272
272
  for criterion in step.success_criteria:
273
273
  lines.append(f"- [ ] {criterion}")
274
274
  lines.extend(["", "---", ""])
275
275
 
276
- lines.extend([
277
- "## Synthesis",
278
- "",
279
- "After all steps complete, run this synthesis:",
280
- "",
281
- "```",
282
- plan.synthesis_prompt,
283
- "```",
284
- ])
276
+ lines.extend(
277
+ [
278
+ "## Synthesis",
279
+ "",
280
+ "After all steps complete, run this synthesis:",
281
+ "",
282
+ "```",
283
+ plan.synthesis_prompt,
284
+ "```",
285
+ ]
286
+ )
285
287
 
286
288
  return "\n".join(lines)
287
289
 
@@ -292,11 +294,13 @@ What risks exist? What's the recommended path forward?
292
294
  """
293
295
  steps_text = []
294
296
  for step in plan.steps:
295
- steps_text.append(f"""
297
+ steps_text.append(
298
+ f"""
296
299
  ### {step.role}
297
300
  Use the Task tool with subagent_type="Explore" to:
298
301
  {step.prompt}
299
- """)
302
+ """
303
+ )
300
304
 
301
305
  return f"""# {plan.template_name}
302
306
 
@@ -353,24 +357,28 @@ def generate_plan(
353
357
  return generator.to_claude_code_skill(plan)
354
358
  elif output_format == "json":
355
359
  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)
360
+
361
+ return json.dumps(
362
+ {
363
+ "template_id": plan.template_id,
364
+ "template_name": plan.template_name,
365
+ "generated_at": plan.generated_at,
366
+ "form_responses": plan.form_responses,
367
+ "steps": [
368
+ {
369
+ "order": s.order,
370
+ "role": s.role,
371
+ "tier_recommendation": s.tier_recommendation,
372
+ "tools": s.tools,
373
+ "prompt": s.prompt,
374
+ "success_criteria": s.success_criteria,
375
+ "config": s.config,
376
+ }
377
+ for s in plan.steps
378
+ ],
379
+ "synthesis_prompt": plan.synthesis_prompt,
380
+ },
381
+ indent=2,
382
+ )
375
383
  else:
376
384
  raise ValueError(f"Unknown format: {output_format}")
@@ -109,8 +109,7 @@ class SessionContext:
109
109
  self.memory.stash(key, value, ttl_seconds=ttl or self.default_ttl)
110
110
 
111
111
  logger.debug(
112
- f"Recorded choice: template={template_id}, "
113
- f"question={question_id}, choice={choice}"
112
+ f"Recorded choice: template={template_id}, question={question_id}, choice={choice}"
114
113
  )
115
114
  return True
116
115
 
@@ -336,7 +335,7 @@ class SessionContext:
336
335
  """
337
336
  try:
338
337
  # Basic validation - could be enhanced
339
- if hasattr(question, 'options') and question.options:
338
+ if hasattr(question, "options") and question.options:
340
339
  # Check if choice is in options (only if options are defined)
341
340
  if isinstance(choice, list):
342
341
  # Multi-select - all choices must be in options
@@ -119,9 +119,7 @@ class MetaWorkflow:
119
119
 
120
120
  # Set up storage
121
121
  if storage_dir is None:
122
- storage_dir = str(
123
- Path.home() / ".empathy" / "meta_workflows" / "executions"
124
- )
122
+ storage_dir = str(Path.home() / ".empathy" / "meta_workflows" / "executions")
125
123
  self.storage_dir = Path(storage_dir)
126
124
  self.storage_dir.mkdir(parents=True, exist_ok=True)
127
125
 
@@ -229,8 +227,7 @@ class MetaWorkflow:
229
227
  run_id=run_id,
230
228
  template_id=self.template.template_id,
231
229
  timestamp=datetime.now().isoformat(),
232
- form_responses=form_response
233
- or FormResponse(template_id=self.template.template_id),
230
+ form_responses=form_response or FormResponse(template_id=self.template.template_id),
234
231
  total_cost=0.0,
235
232
  total_duration=time.time() - start_time,
236
233
  success=False,
@@ -245,9 +242,7 @@ class MetaWorkflow:
245
242
 
246
243
  raise ValueError(f"Meta-workflow execution failed: {e}") from e
247
244
 
248
- def _execute_agents_mock(
249
- self, agents: list[AgentSpec]
250
- ) -> list[AgentExecutionResult]:
245
+ def _execute_agents_mock(self, agents: list[AgentSpec]) -> list[AgentExecutionResult]:
251
246
  """Execute agents with mock execution (for MVP).
252
247
 
253
248
  Args:
@@ -330,9 +325,7 @@ class MetaWorkflow:
330
325
  logger.info(f"Executing agent: {agent.role} ({agent.tier_strategy.value})")
331
326
 
332
327
  try:
333
- result = self._execute_single_agent_with_escalation(
334
- agent, router, tracker
335
- )
328
+ result = self._execute_single_agent_with_escalation(agent, router, tracker)
336
329
  results.append(result)
337
330
 
338
331
  logger.info(
@@ -408,20 +401,14 @@ class MetaWorkflow:
408
401
  return tier_result
409
402
 
410
403
  # Failed - try next tier
411
- logger.debug(
412
- f"Tier {tier.value} did not meet success criteria, "
413
- f"attempting escalation"
414
- )
404
+ logger.debug(f"Tier {tier.value} did not meet success criteria, attempting escalation")
415
405
  result = tier_result
416
406
 
417
407
  # All tiers exhausted - return final result (failed)
418
408
  if result:
419
409
  result.cost = total_cost
420
410
  result.duration = time.time() - start_time
421
- logger.warning(
422
- f"Agent {agent.role} failed at all tiers "
423
- f"(cost: ${total_cost:.4f})"
424
- )
411
+ logger.warning(f"Agent {agent.role} failed at all tiers (cost: ${total_cost:.4f})")
425
412
  return result
426
413
 
427
414
  # Should never reach here
@@ -587,9 +574,7 @@ class MetaWorkflow:
587
574
  instructions = base_template.default_instructions
588
575
  else:
589
576
  # Fallback if template not found - use role-based generic prompt
590
- logger.warning(
591
- f"Template {agent.base_template} not found, using generic prompt"
592
- )
577
+ logger.warning(f"Template {agent.base_template} not found, using generic prompt")
593
578
  instructions = self._get_generic_instructions(agent.role)
594
579
 
595
580
  # Build prompt
@@ -614,9 +599,7 @@ class MetaWorkflow:
614
599
 
615
600
  return "\n".join(prompt_parts)
616
601
 
617
- def _execute_llm_call(
618
- self, prompt: str, model_config: Any, tier: ModelTier
619
- ) -> dict[str, Any]:
602
+ def _execute_llm_call(self, prompt: str, model_config: Any, tier: ModelTier) -> dict[str, Any]:
620
603
  """Execute real LLM call via Anthropic or other providers.
621
604
 
622
605
  Uses the Anthropic client for Claude models, with fallback to
@@ -652,9 +635,7 @@ class MetaWorkflow:
652
635
  response = client.messages.create(
653
636
  model=model_config.model_id,
654
637
  max_tokens=2048,
655
- messages=[
656
- {"role": "user", "content": prompt}
657
- ],
638
+ messages=[{"role": "user", "content": prompt}],
658
639
  )
659
640
 
660
641
  # Extract response data
@@ -663,10 +644,9 @@ class MetaWorkflow:
663
644
  completion_tokens = response.usage.output_tokens
664
645
 
665
646
  # Calculate cost
666
- cost = (
667
- (prompt_tokens / 1000) * model_config.cost_per_1k_input
668
- + (completion_tokens / 1000) * model_config.cost_per_1k_output
669
- )
647
+ cost = (prompt_tokens / 1000) * model_config.cost_per_1k_input + (
648
+ completion_tokens / 1000
649
+ ) * model_config.cost_per_1k_output
670
650
 
671
651
  return {
672
652
  "cost": cost,
@@ -703,9 +683,7 @@ class MetaWorkflow:
703
683
  },
704
684
  }
705
685
 
706
- def _simulate_llm_call(
707
- self, prompt: str, model_config: Any, tier: ModelTier
708
- ) -> dict[str, Any]:
686
+ def _simulate_llm_call(self, prompt: str, model_config: Any, tier: ModelTier) -> dict[str, Any]:
709
687
  """Simulate LLM call with realistic cost/token estimates.
710
688
 
711
689
  Used as fallback when real LLM execution is not available
@@ -726,10 +704,9 @@ class MetaWorkflow:
726
704
  completion_tokens = 500 # Assume moderate response
727
705
 
728
706
  # Calculate cost
729
- cost = (
730
- (prompt_tokens / 1000) * model_config.cost_per_1k_input
731
- + (completion_tokens / 1000) * model_config.cost_per_1k_output
732
- )
707
+ cost = (prompt_tokens / 1000) * model_config.cost_per_1k_input + (
708
+ completion_tokens / 1000
709
+ ) * model_config.cost_per_1k_output
733
710
 
734
711
  # Simulate success rate based on tier
735
712
  # cheap: 80%, capable: 95%, premium: 99%
@@ -756,9 +733,7 @@ class MetaWorkflow:
756
733
  },
757
734
  }
758
735
 
759
- def _evaluate_success_criteria(
760
- self, result: AgentExecutionResult, agent: AgentSpec
761
- ) -> bool:
736
+ def _evaluate_success_criteria(self, result: AgentExecutionResult, agent: AgentSpec) -> bool:
762
737
  """Evaluate if agent result meets success criteria.
763
738
 
764
739
  Args:
@@ -779,9 +754,7 @@ class MetaWorkflow:
779
754
  # success_criteria is a list of descriptive strings (e.g., ["code reviewed", "tests pass"])
780
755
  # These are informational criteria - if result.success is True, we consider the criteria met
781
756
  # The criteria serve as documentation of what success means for this agent
782
- logger.debug(
783
- f"Agent succeeded with criteria: {agent.success_criteria}"
784
- )
757
+ logger.debug(f"Agent succeeded with criteria: {agent.success_criteria}")
785
758
  return True
786
759
 
787
760
  def _save_execution(self, result: MetaWorkflowResult) -> Path:
@@ -883,9 +856,7 @@ class MetaWorkflow:
883
856
  lines.append("## Summary")
884
857
  lines.append("")
885
858
  lines.append(f"- **Agents Created**: {len(result.agents_created)}")
886
- lines.append(
887
- f"- **Agents Executed**: {len(result.agent_results)}"
888
- )
859
+ lines.append(f"- **Agents Executed**: {len(result.agent_results)}")
889
860
  lines.append(f"- **Total Cost**: ${result.total_cost:.2f}")
890
861
  lines.append(f"- **Total Duration**: {result.total_duration:.1f}s")
891
862
  lines.append("")
@@ -918,9 +889,7 @@ class MetaWorkflow:
918
889
  for i, agent_result in enumerate(result.agent_results, 1):
919
890
  lines.append(f"### {i}. {agent_result.role}")
920
891
  lines.append("")
921
- lines.append(
922
- f"- **Status**: {'✅ Success' if agent_result.success else '❌ Failed'}"
923
- )
892
+ lines.append(f"- **Status**: {'✅ Success' if agent_result.success else '❌ Failed'}")
924
893
  lines.append(f"- **Tier Used**: {agent_result.tier_used}")
925
894
  lines.append(f"- **Cost**: ${agent_result.cost:.2f}")
926
895
  lines.append(f"- **Duration**: {agent_result.duration:.1f}s")
empathy_os/models/cli.py CHANGED
@@ -541,7 +541,7 @@ Examples:
541
541
  %(prog)s provider Show current provider config
542
542
  %(prog)s provider --set anthropic Set Anthropic as primary
543
543
  %(prog)s provider --set hybrid Enable hybrid mode
544
- %(prog)s provider --interactive Interactive setup wizard
544
+ %(prog)s provider --interactive Interactive setup workflow
545
545
  """,
546
546
  )
547
547
 
@@ -600,7 +600,7 @@ Examples:
600
600
  "--interactive",
601
601
  "-i",
602
602
  action="store_true",
603
- help="Interactive configuration wizard",
603
+ help="Interactive configuration workflow",
604
604
  )
605
605
  prov_parser.add_argument("--format", "-f", choices=["table", "json"], default="table")
606
606
 
@@ -3,7 +3,6 @@
3
3
  Provides a unified vocabulary for task types across:
4
4
  - empathy_llm_toolkit.routing.ModelRouter
5
5
  - src/empathy_os/workflows.WorkflowBase
6
- - empathy_software_plugin.wizards.MultiModelWizard
7
6
 
8
7
  This module defines:
9
8
  - TaskType enum with canonical task names
@@ -184,7 +183,7 @@ REALTIME_REQUIRED_TASKS: frozenset[str] = frozenset(
184
183
  "interactive_debug",
185
184
  "live_coding",
186
185
  "user_query",
187
- "wizard_step",
186
+ "workflow_step",
188
187
  # Urgent Actions
189
188
  "critical_fix",
190
189
  "security_incident",
@@ -1053,7 +1053,10 @@ class TelemetryStore:
1053
1053
  continue
1054
1054
  if not stale_only and not failed_only:
1055
1055
  # Return all files needing attention (stale OR failed OR no_tests)
1056
- if record.last_test_result not in ("failed", "error", "no_tests") and not record.is_stale:
1056
+ if (
1057
+ record.last_test_result not in ("failed", "error", "no_tests")
1058
+ and not record.is_stale
1059
+ ):
1057
1060
  continue
1058
1061
  results.append(record)
1059
1062
 
@@ -210,7 +210,9 @@ def estimate_workflow_cost(
210
210
  try:
211
211
  filepath = os.path.join(root, file)
212
212
  validated_filepath = _validate_file_path(filepath)
213
- with open(validated_filepath, encoding="utf-8", errors="ignore") as f:
213
+ with open(
214
+ validated_filepath, encoding="utf-8", errors="ignore"
215
+ ) as f:
214
216
  total_chars += len(f.read())
215
217
  except (ValueError, OSError):
216
218
  pass