@openlife/cli 1.7.3

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 (394) hide show
  1. package/INSTALL.md +266 -0
  2. package/LICENSE +21 -0
  3. package/README.md +142 -0
  4. package/bin/openlife.js +3 -0
  5. package/dist/admin_panel_server.js +66 -0
  6. package/dist/cli/AgentManager.js +109 -0
  7. package/dist/cli/AutonomousInstaller.js +134 -0
  8. package/dist/cli/DreamOrganizer.js +88 -0
  9. package/dist/cli/HostInstaller.js +426 -0
  10. package/dist/cli/InstallBanner.js +16 -0
  11. package/dist/cli/InstallFlow.js +256 -0
  12. package/dist/cli/InstallHeadless.js +47 -0
  13. package/dist/cli/InstallModules.js +148 -0
  14. package/dist/cli/InstallStateStore.js +75 -0
  15. package/dist/cli/InstallWizard.js +364 -0
  16. package/dist/cli/ProfileManager.js +163 -0
  17. package/dist/cli/SystemInstaller.js +89 -0
  18. package/dist/cli/WorldClassCommands.js +208 -0
  19. package/dist/design/DesignMdImporter.js +82 -0
  20. package/dist/design/DesignMdMode.js +93 -0
  21. package/dist/design/DesignMdRegistry.js +67 -0
  22. package/dist/index.js +2575 -0
  23. package/dist/memory/ConversationMemory.js +33 -0
  24. package/dist/memory/LocalMemoryProvider.js +86 -0
  25. package/dist/memory/Mem0Provider.js +16 -0
  26. package/dist/memory/MemoryNamespacePolicy.js +27 -0
  27. package/dist/memory/MemoryOrchestrator.js +65 -0
  28. package/dist/memory/MemoryPromotionFlow.js +32 -0
  29. package/dist/memory/MemoryProvider.js +2 -0
  30. package/dist/memory/MemoryProviderRegistry.js +27 -0
  31. package/dist/memory/MemoryRetentionPolicy.js +60 -0
  32. package/dist/memory/MempalaceProvider.js +72 -0
  33. package/dist/memory/OmniMemory.js +106 -0
  34. package/dist/memory/RedisAgentMemoryProvider.js +16 -0
  35. package/dist/memory/SessionManager.js +86 -0
  36. package/dist/memory/ZepGraphitiProvider.js +16 -0
  37. package/dist/orchestrator/AgentRegistry.js +56 -0
  38. package/dist/orchestrator/AgentScoring.js +82 -0
  39. package/dist/orchestrator/AgentTeam.js +22 -0
  40. package/dist/orchestrator/ArbitrationAgent.js +43 -0
  41. package/dist/orchestrator/ArbitrationScorecard.js +17 -0
  42. package/dist/orchestrator/AssetPromotionEngine.js +65 -0
  43. package/dist/orchestrator/AssetReuseRouter.js +63 -0
  44. package/dist/orchestrator/BenchmarkEngine.js +75 -0
  45. package/dist/orchestrator/Brain.js +298 -0
  46. package/dist/orchestrator/CadenceEngine.js +76 -0
  47. package/dist/orchestrator/CapabilityRouter.js +36 -0
  48. package/dist/orchestrator/CommandLanguage.js +27 -0
  49. package/dist/orchestrator/CommandRouter.js +70 -0
  50. package/dist/orchestrator/ConsequenceForecaster.js +286 -0
  51. package/dist/orchestrator/CronManager.js +286 -0
  52. package/dist/orchestrator/DynamicAgentBuilder.js +48 -0
  53. package/dist/orchestrator/DynamicAgentExecutor.js +15 -0
  54. package/dist/orchestrator/EnterpriseAgenticCore.js +276 -0
  55. package/dist/orchestrator/ExecutionBoard.js +86 -0
  56. package/dist/orchestrator/ExecutionIntent.js +13 -0
  57. package/dist/orchestrator/ExecutionModePolicy.js +48 -0
  58. package/dist/orchestrator/ExecutionRouter.js +9 -0
  59. package/dist/orchestrator/ExecutionState.js +20 -0
  60. package/dist/orchestrator/ExecutorHealth.js +86 -0
  61. package/dist/orchestrator/ExternalCatalogRegistry.js +83 -0
  62. package/dist/orchestrator/Gatekeeper.js +414 -0
  63. package/dist/orchestrator/Gateway.js +508 -0
  64. package/dist/orchestrator/GovernanceConsentStore.js +66 -0
  65. package/dist/orchestrator/GovernanceLayer.js +179 -0
  66. package/dist/orchestrator/GovernancePolicyStore.js +53 -0
  67. package/dist/orchestrator/GovernanceScopeLedger.js +134 -0
  68. package/dist/orchestrator/GovernanceScopePolicy.js +67 -0
  69. package/dist/orchestrator/IntentClassifier.js +45 -0
  70. package/dist/orchestrator/JobLifecycle.js +91 -0
  71. package/dist/orchestrator/LearningRouter.js +24 -0
  72. package/dist/orchestrator/MediaManager.js +92 -0
  73. package/dist/orchestrator/MemoryCuratorAgent.js +41 -0
  74. package/dist/orchestrator/MissionState.js +155 -0
  75. package/dist/orchestrator/ModelManager.js +84 -0
  76. package/dist/orchestrator/OperatingSystem.js +71 -0
  77. package/dist/orchestrator/OperationalMemoryStore.js +94 -0
  78. package/dist/orchestrator/OptimizationLoop.js +72 -0
  79. package/dist/orchestrator/OrchestrationLoop.js +905 -0
  80. package/dist/orchestrator/OrgStructure.js +88 -0
  81. package/dist/orchestrator/OutcomeSimulator.js +46 -0
  82. package/dist/orchestrator/ParallelOrchestrationLoop.js +36 -0
  83. package/dist/orchestrator/PerformanceScorecard.js +105 -0
  84. package/dist/orchestrator/PlannerAgent.js +46 -0
  85. package/dist/orchestrator/ProcessSandbox.js +129 -0
  86. package/dist/orchestrator/PromotionPipeline.js +74 -0
  87. package/dist/orchestrator/PromotionReviewGate.js +11 -0
  88. package/dist/orchestrator/QueueScheduler.js +260 -0
  89. package/dist/orchestrator/ReleaseGate.js +36 -0
  90. package/dist/orchestrator/ReleaseWorkflow.js +68 -0
  91. package/dist/orchestrator/RemotePublisher.js +139 -0
  92. package/dist/orchestrator/ReuseEngine.js +89 -0
  93. package/dist/orchestrator/ReviewerAgent.js +49 -0
  94. package/dist/orchestrator/RoleHandoff.js +65 -0
  95. package/dist/orchestrator/RuntimeHealthMonitor.js +143 -0
  96. package/dist/orchestrator/RuntimePolicy.js +105 -0
  97. package/dist/orchestrator/RuntimeProbe.js +97 -0
  98. package/dist/orchestrator/RuntimeRegistry.js +73 -0
  99. package/dist/orchestrator/SandboxPolicy.js +22 -0
  100. package/dist/orchestrator/SecurityDownloadGuard.js +169 -0
  101. package/dist/orchestrator/SecurityEventStore.js +58 -0
  102. package/dist/orchestrator/ServiceCompletionPolicy.js +36 -0
  103. package/dist/orchestrator/ServiceState.js +195 -0
  104. package/dist/orchestrator/SkillCreator.js +404 -0
  105. package/dist/orchestrator/SkillLearningLoop.js +57 -0
  106. package/dist/orchestrator/SkillManager.js +75 -0
  107. package/dist/orchestrator/SkillNetwork.js +29 -0
  108. package/dist/orchestrator/SkillRegistryV2.js +28 -0
  109. package/dist/orchestrator/SkillScoring.js +70 -0
  110. package/dist/orchestrator/SquadAutoCreator.js +64 -0
  111. package/dist/orchestrator/SquadCreator.js +727 -0
  112. package/dist/orchestrator/SquadRegistry.js +28 -0
  113. package/dist/orchestrator/SquadRouter.js +33 -0
  114. package/dist/orchestrator/SquadScoring.js +70 -0
  115. package/dist/orchestrator/SubagentLifecycle.js +90 -0
  116. package/dist/orchestrator/SynthesizerAgent.js +48 -0
  117. package/dist/orchestrator/SystemDoctor.js +224 -0
  118. package/dist/orchestrator/TaskExecutor.js +422 -0
  119. package/dist/orchestrator/TeammateBoard.js +61 -0
  120. package/dist/orchestrator/TestHarness.js +184 -0
  121. package/dist/orchestrator/VoiceManager.js +203 -0
  122. package/dist/orchestrator/VoiceRouter.js +89 -0
  123. package/dist/orchestrator/capability/CapabilityGenesisEngine.js +278 -0
  124. package/dist/orchestrator/capability/CapabilityPackParser.js +223 -0
  125. package/dist/orchestrator/capability/CapabilityPackSchema.js +62 -0
  126. package/dist/orchestrator/capability/CapabilityPackState.js +163 -0
  127. package/dist/orchestrator/providers/AgentProvider.js +2 -0
  128. package/dist/orchestrator/providers/CapabilityProvider.js +12 -0
  129. package/dist/orchestrator/providers/CloudAgentProvider.js +55 -0
  130. package/dist/orchestrator/providers/CloudSkillProvider.js +55 -0
  131. package/dist/orchestrator/providers/CloudSquadProvider.js +55 -0
  132. package/dist/orchestrator/providers/CompositeAgentProvider.js +16 -0
  133. package/dist/orchestrator/providers/CompositeCapabilityProvider.js +25 -0
  134. package/dist/orchestrator/providers/CompositeSkillProvider.js +16 -0
  135. package/dist/orchestrator/providers/CompositeSquadProvider.js +16 -0
  136. package/dist/orchestrator/providers/CompositeWorkflowProvider.js +46 -0
  137. package/dist/orchestrator/providers/FileAgentProvider.js +105 -0
  138. package/dist/orchestrator/providers/FileCapabilityProvider.js +106 -0
  139. package/dist/orchestrator/providers/FileSkillProvider.js +65 -0
  140. package/dist/orchestrator/providers/FileSquadProvider.js +69 -0
  141. package/dist/orchestrator/providers/FileWorkflowProvider.js +103 -0
  142. package/dist/orchestrator/providers/SkillProvider.js +2 -0
  143. package/dist/orchestrator/providers/SquadProvider.js +2 -0
  144. package/dist/orchestrator/toolset/ToolsetGuard.js +69 -0
  145. package/dist/orchestrator/toolset/ToolsetRegistry.js +65 -0
  146. package/dist/orchestrator/toolset/ToolsetSchema.js +21 -0
  147. package/dist/orchestrator/util/AtomicWriter.js +204 -0
  148. package/dist/orchestrator/util/DistributedLock.js +232 -0
  149. package/dist/orchestrator/util/TemplateRenderer.js +87 -0
  150. package/dist/orchestrator/util/WatchdogHeartbeat.js +116 -0
  151. package/dist/orchestrator/workflow/ConditionParser.js +232 -0
  152. package/dist/orchestrator/workflow/WorkflowEngine.js +379 -0
  153. package/dist/orchestrator/workflow/WorkflowParser.js +368 -0
  154. package/dist/orchestrator/workflow/WorkflowSchema.js +65 -0
  155. package/dist/orchestrator/workflow/WorkflowState.js +11 -0
  156. package/dist/reversa/ReversaAgent.js +134 -0
  157. package/dist/reversa/ReversaContracts.js +62 -0
  158. package/dist/reversa/ReversaExecutors.js +65 -0
  159. package/dist/skills/SkillRegistry.js +71 -0
  160. package/dist/squads/SquadManager.js +87 -0
  161. package/dist/test_admin_teams_networks.js +54 -0
  162. package/dist/test_agent_team_skill_network.js +15 -0
  163. package/dist/test_aiobuilder_cli_parity.js +169 -0
  164. package/dist/test_ask_exit.js +73 -0
  165. package/dist/test_atomic_writer.js +209 -0
  166. package/dist/test_autonomous_soak.js +141 -0
  167. package/dist/test_benchmark_engine.js +41 -0
  168. package/dist/test_brain_error_diagnostics.js +51 -0
  169. package/dist/test_brain_fallback_chain.js +93 -0
  170. package/dist/test_capability_genesis_engine.js +225 -0
  171. package/dist/test_capability_pack_schema.js +214 -0
  172. package/dist/test_catalog_quality.js +150 -0
  173. package/dist/test_cli_crud_roundtrip.js +154 -0
  174. package/dist/test_cli_diagnostics.js +131 -0
  175. package/dist/test_cli_doc_parity.js +126 -0
  176. package/dist/test_cli_help_surface.js +106 -0
  177. package/dist/test_cli_service_commands.js +83 -0
  178. package/dist/test_consequence_forecast_brain.js +165 -0
  179. package/dist/test_consequence_forecaster.js +24 -0
  180. package/dist/test_conversation_memory.js +36 -0
  181. package/dist/test_create_entities.js +54 -0
  182. package/dist/test_creator_placeholders_completed.js +177 -0
  183. package/dist/test_cron_manager.js +123 -0
  184. package/dist/test_daemon_sigterm.js +72 -0
  185. package/dist/test_deep_research_capability.js +87 -0
  186. package/dist/test_designmd_import_registry.js +16 -0
  187. package/dist/test_designmd_mode.js +50 -0
  188. package/dist/test_designmd_mode_workspace.js +13 -0
  189. package/dist/test_dist_templates_layout.js +135 -0
  190. package/dist/test_distributed_lock.js +201 -0
  191. package/dist/test_distribution_installability.js +67 -0
  192. package/dist/test_doctor_sandbox_check.js +44 -0
  193. package/dist/test_dream_organizer.js +25 -0
  194. package/dist/test_dual_mode.js +15 -0
  195. package/dist/test_enterprise_agentic_core.js +128 -0
  196. package/dist/test_forecast_brain_wiring.js +87 -0
  197. package/dist/test_gateway_telegram_guardrails.js +52 -0
  198. package/dist/test_governance.js +34 -0
  199. package/dist/test_governance_advanced.js +75 -0
  200. package/dist/test_governance_scope_ledger.js +147 -0
  201. package/dist/test_governance_v13_policies.js +44 -0
  202. package/dist/test_guided_creator_cli.js +100 -0
  203. package/dist/test_host_install_e2e.js +324 -0
  204. package/dist/test_host_installer.js +259 -0
  205. package/dist/test_host_installers_gemini_codex.js +95 -0
  206. package/dist/test_host_uninstaller.js +295 -0
  207. package/dist/test_install_flow.js +70 -0
  208. package/dist/test_install_flow_host_validation.js +143 -0
  209. package/dist/test_install_wizard.js +272 -0
  210. package/dist/test_integration_gemini_live.js +95 -0
  211. package/dist/test_integration_http_trigger_live.js +154 -0
  212. package/dist/test_integration_telegram_live.js +102 -0
  213. package/dist/test_job_lifecycle.js +16 -0
  214. package/dist/test_memory_orchestrator.js +33 -0
  215. package/dist/test_memory_promotion.js +36 -0
  216. package/dist/test_memory_retention.js +37 -0
  217. package/dist/test_mission_checkpoint.js +204 -0
  218. package/dist/test_multi_host_docs_parity.js +125 -0
  219. package/dist/test_openlife_auto_creator_routing.js +69 -0
  220. package/dist/test_openlife_evolution_surface.js +77 -0
  221. package/dist/test_openlife_gatekeeper_routing.js +15 -0
  222. package/dist/test_openlife_routing_surface.js +27 -0
  223. package/dist/test_openlife_runtime_source_truth.js +25 -0
  224. package/dist/test_operating_system.js +45 -0
  225. package/dist/test_optimization_loop.js +38 -0
  226. package/dist/test_orchestration_assets_lifecycle.js +78 -0
  227. package/dist/test_outcome_simulator.js +38 -0
  228. package/dist/test_performance_latency.js +215 -0
  229. package/dist/test_performance_scorecard.js +38 -0
  230. package/dist/test_phase1_check_exit.js +103 -0
  231. package/dist/test_phase6_board.js +31 -0
  232. package/dist/test_phase6_cadence.js +29 -0
  233. package/dist/test_phase6_ops.js +37 -0
  234. package/dist/test_post_mission_evaluation.js +190 -0
  235. package/dist/test_process_sandbox.js +88 -0
  236. package/dist/test_profile_toolset_mcp.js +125 -0
  237. package/dist/test_queue_scheduler.js +239 -0
  238. package/dist/test_release_gate.js +23 -0
  239. package/dist/test_remote_publish.js +193 -0
  240. package/dist/test_reversa_contracts_e2e.js +48 -0
  241. package/dist/test_reversa_export_and_strict.js +51 -0
  242. package/dist/test_reversa_full_execution.js +12 -0
  243. package/dist/test_reversa_lite.js +9 -0
  244. package/dist/test_royal_stack_golden.js +179 -0
  245. package/dist/test_runtime_health_backoff.js +154 -0
  246. package/dist/test_runtime_policy.js +26 -0
  247. package/dist/test_runtime_probe.js +19 -0
  248. package/dist/test_runtime_profile_oauth_only.js +262 -0
  249. package/dist/test_runtime_registry.js +11 -0
  250. package/dist/test_security_download_and_scan.js +103 -0
  251. package/dist/test_security_download_guard.js +14 -0
  252. package/dist/test_service_command_surface.js +12 -0
  253. package/dist/test_service_completion_policy.js +32 -0
  254. package/dist/test_service_guardrails_delete.js +12 -0
  255. package/dist/test_service_mode_explicit_only.js +174 -0
  256. package/dist/test_sources_import_ref.js +46 -0
  257. package/dist/test_sources_scaffold.js +43 -0
  258. package/dist/test_squad_skill_creator.js +305 -0
  259. package/dist/test_squad_skill_design_llm.js +176 -0
  260. package/dist/test_subsystems_org_state.js +271 -0
  261. package/dist/test_subsystems_promotion_memory_assets.js +343 -0
  262. package/dist/test_subsystems_routing_governance.js +234 -0
  263. package/dist/test_task_executor_sandbox_optin.js +127 -0
  264. package/dist/test_teammate_learning.js +15 -0
  265. package/dist/test_telegram_delete_guardrail.js +21 -0
  266. package/dist/test_toolset_enforcement.js +188 -0
  267. package/dist/test_trigger_basic_auth.js +112 -0
  268. package/dist/test_util/doc_parity.js +120 -0
  269. package/dist/test_v15_e2e_integration.js +207 -0
  270. package/dist/test_watchdog_heartbeat.js +152 -0
  271. package/dist/test_workflow_condition_parser.js +63 -0
  272. package/dist/test_workflow_e2e.js +240 -0
  273. package/dist/test_workflow_engine.js +330 -0
  274. package/dist/test_workflow_parser.js +245 -0
  275. package/dist/test_workflow_schema_backward_compat.js +197 -0
  276. package/dist-templates/README.md +91 -0
  277. package/dist-templates/claude-code/agents/openlife-atlas.md +52 -0
  278. package/dist-templates/claude-code/agents/openlife-forge.md +42 -0
  279. package/dist-templates/claude-code/agents/openlife-genesis.md +59 -0
  280. package/dist-templates/claude-code/agents/openlife-lyra.md +40 -0
  281. package/dist-templates/claude-code/agents/openlife-maestro.md +45 -0
  282. package/dist-templates/claude-code/commands/openlife/ask.md +14 -0
  283. package/dist-templates/claude-code/commands/openlife/doctor.md +19 -0
  284. package/dist-templates/claude-code/commands/openlife/dream.md +20 -0
  285. package/dist-templates/claude-code/commands/openlife/status.md +14 -0
  286. package/dist-templates/claude-code/mcp/openlife-orchestrator.json +46 -0
  287. package/dist-templates/codex/README.md +7 -0
  288. package/dist-templates/codex/agents/openlife-atlas.md +52 -0
  289. package/dist-templates/codex/agents/openlife-forge.md +42 -0
  290. package/dist-templates/codex/agents/openlife-genesis.md +59 -0
  291. package/dist-templates/codex/agents/openlife-lyra.md +40 -0
  292. package/dist-templates/codex/agents/openlife-maestro.md +45 -0
  293. package/dist-templates/codex/commands/openlife/ask.md +14 -0
  294. package/dist-templates/codex/commands/openlife/doctor.md +19 -0
  295. package/dist-templates/codex/commands/openlife/dream.md +20 -0
  296. package/dist-templates/codex/commands/openlife/status.md +14 -0
  297. package/dist-templates/codex/mcp/openlife-orchestrator.json +46 -0
  298. package/dist-templates/gemini-cli/README.md +8 -0
  299. package/dist-templates/gemini-cli/agents/openlife-atlas.md +52 -0
  300. package/dist-templates/gemini-cli/agents/openlife-forge.md +42 -0
  301. package/dist-templates/gemini-cli/agents/openlife-genesis.md +59 -0
  302. package/dist-templates/gemini-cli/agents/openlife-lyra.md +40 -0
  303. package/dist-templates/gemini-cli/agents/openlife-maestro.md +45 -0
  304. package/dist-templates/gemini-cli/commands/openlife/ask.md +14 -0
  305. package/dist-templates/gemini-cli/commands/openlife/doctor.md +19 -0
  306. package/dist-templates/gemini-cli/commands/openlife/dream.md +20 -0
  307. package/dist-templates/gemini-cli/commands/openlife/status.md +14 -0
  308. package/dist-templates/gemini-cli/mcp/openlife-orchestrator.json +46 -0
  309. package/dist-templates/skill-template/README.md +34 -0
  310. package/dist-templates/skill-template/SKILL.md.template +59 -0
  311. package/dist-templates/squad-template/README.md +82 -0
  312. package/dist-templates/squad-template/SQUAD.md.template +51 -0
  313. package/dist-templates/squad-template/agent-template.md +51 -0
  314. package/dist-templates/squad-template/checklist-template.md +25 -0
  315. package/dist-templates/squad-template/task-template.md +36 -0
  316. package/dist-templates/workflows/PORTED_WORKFLOWS.md +60 -0
  317. package/dist-templates/workflows/brownfield-discovery.yaml +137 -0
  318. package/dist-templates/workflows/greenfield-fullstack.yaml +132 -0
  319. package/dist-templates/workflows/qa-loop.yaml +125 -0
  320. package/dist-templates/workflows/story-development-cycle.yaml +80 -0
  321. package/docs/CHANGELOG_FEATURE_ROLLOUT_DESIGNMD.md +43 -0
  322. package/docs/EXTERNAL_SOURCES_AND_SECURITY_GUARD.md +33 -0
  323. package/docs/OPENLIFE_AUDIT_2026-05-06.md +170 -0
  324. package/docs/OPENLIFE_CONSOLIDATED_PLAN_2026-05-06.md +299 -0
  325. package/docs/OPENLIFE_DUAL_MODE_IMPLEMENTATION_PLAN.md +205 -0
  326. package/docs/OPENLIFE_EVOLUTION_SURFACE_2026-05-07.md +53 -0
  327. package/docs/OPENLIFE_SKILLS_IMPORT_2026-05-07.json +223 -0
  328. package/docs/OPENLIFE_SQUADS_IMPORT_2026-05-07.json +184 -0
  329. package/docs/PAPERCLIP_OPENLIFE_INVESTIGATION.md +85 -0
  330. package/docs/README.md +28 -0
  331. package/docs/RELEASE_ORGANIZATION_PLAN.md +164 -0
  332. package/docs/audit/CLI-EXECUTION-RESULTS.md +113 -0
  333. package/docs/audit/CLI-MATRIX.md +556 -0
  334. package/docs/audit/DOC-PARITY-GAPS.md +351 -0
  335. package/docs/audit/ORCHESTRATOR-MATRIX.md +136 -0
  336. package/docs/audit/TEST-COVERAGE-GAPS.md +334 -0
  337. package/docs/audit/integrations/SKIPPED.md +101 -0
  338. package/docs/autonomous-install.md +79 -0
  339. package/docs/capability-genesis.md +137 -0
  340. package/docs/capability-pack-schema.md +157 -0
  341. package/docs/commands.md +82 -0
  342. package/docs/deep-research-capability.md +114 -0
  343. package/docs/development/typescript-conventions.md +95 -0
  344. package/docs/host-installers.md +68 -0
  345. package/docs/install/aiobuilder.md +70 -0
  346. package/docs/install/claude-code.md +83 -0
  347. package/docs/install/codex.md +64 -0
  348. package/docs/install/gemini-cli.md +64 -0
  349. package/docs/install/runtime-profiles.md +83 -0
  350. package/docs/openlife-agent-os-blueprint.md +114 -0
  351. package/docs/openlife-install-backlog.md +115 -0
  352. package/docs/openlife-install-spec.md +306 -0
  353. package/docs/operations/CLOUD_CUTOVER_AUDIT.md +37 -0
  354. package/docs/operations/PHASE_PROGRESS_CONTINUATION.md +24 -0
  355. package/docs/performance-benchmarks.md +83 -0
  356. package/docs/planning/v1.3-capability-genesis.md +157 -0
  357. package/docs/plans/2026-05-05-admin-interface-professional-dark-premium-plan.md +84 -0
  358. package/docs/plans/2026-05-05-openlife-autonomous-domain-marketplace-masterplan.md +122 -0
  359. package/docs/quickstart.md +60 -0
  360. package/docs/release-process.md +236 -0
  361. package/docs/roadmap/OPENLIFE_MASTER_PLAN_CLOUD_V3.md +97 -0
  362. package/docs/sandboxing-research.md +117 -0
  363. package/docs/stories/epic-feature-audit/1.1.story.md +84 -0
  364. package/docs/stories/epic-feature-audit/1.2.story.md +102 -0
  365. package/docs/stories/epic-feature-audit/1.3.story.md +93 -0
  366. package/docs/stories/epic-feature-audit/1.5.story.md +121 -0
  367. package/docs/stories/epic-feature-audit/1.6.story.md +80 -0
  368. package/docs/stories/epic-feature-completeness/2.1.story.md +70 -0
  369. package/docs/stories/epic-feature-completeness/2.2.story.md +49 -0
  370. package/docs/stories/epic-feature-completeness/2.3.story.md +74 -0
  371. package/docs/stories/epic-feature-completeness/2.4.story.md +71 -0
  372. package/docs/stories/epic-feature-completeness/3.1.story.md +56 -0
  373. package/docs/stories/epic-feature-completeness/3.2.story.md +80 -0
  374. package/docs/stories/epic-feature-completeness/3.3.story.md +68 -0
  375. package/docs/stories/epic-feature-completeness/3.4.story.md +71 -0
  376. package/docs/stories/epic-feature-completeness/3.5.story.md +72 -0
  377. package/docs/stories/epic-feature-completeness/3.6.story.md +69 -0
  378. package/docs/stories/epic-feature-completeness/3.7.story.md +68 -0
  379. package/docs/stories/epic-feature-completeness/3.8.story.md +57 -0
  380. package/docs/toolset-enforcement.md +122 -0
  381. package/docs/v1.4-changelog.md +159 -0
  382. package/docs/v1.5-changelog.md +106 -0
  383. package/docs/v1.5-roadmap.md +121 -0
  384. package/docs/v1.6-changelog.md +67 -0
  385. package/docs/v1.6-roadmap.md +89 -0
  386. package/docs/v1.7-changelog.md +98 -0
  387. package/docs/workflow-schema.md +177 -0
  388. package/package.json +177 -0
  389. package/scripts/clean-test-pollution.js +61 -0
  390. package/scripts/openlife-agent-start.sh +6 -0
  391. package/scripts/openlife-agent.service.example +13 -0
  392. package/scripts/openlife-agent.supervisord.conf.example +8 -0
  393. package/scripts/openlife-autonomous-install.sh +29 -0
  394. package/scripts/postinstall-check.sh +37 -0
@@ -0,0 +1,334 @@
1
+ # Test Coverage Gaps — openlife-cli
2
+
3
+ **Source of truth:** `docs/audit/CLI-MATRIX.md` (125 leaf commands, 156 raw `.command()` registrations)
4
+ **Tests scanned:** 56 `src/test_*.ts` files
5
+ **Generated:** 2026-05-11
6
+
7
+ This report counts only **leaf commands** (those a user actually invokes). Group-only `.command()` declarations (`auth`, `models`, etc.) are not counted as commands to cover.
8
+
9
+ ---
10
+
11
+ ## Summary
12
+
13
+ | Coverage level | Count | % |
14
+ |----------------|-------|---|
15
+ | Direct (subprocess spawn against `bin/openlife.js` or `dist/index.js`) | 36 | 28.8% |
16
+ | Indirect (test covers underlying class/subsystem only) | 28 | 22.4% |
17
+ | None | 61 | 48.8% |
18
+ | **Total leaf commands** | **125** | **100%** |
19
+
20
+ Hot/cold group summary:
21
+
22
+ - **Hottest groups (best E2E coverage):** `plugin` (5/5 direct), `context` (3/3 direct), `pilot` (4/4 direct), `eval` (2/2 direct), `learn` (2/2 direct), `service` (6/6 direct).
23
+ - **Coldest groups (zero coverage):** `memory` (5/5 none), `governance` (4/5 none after policy show), `benchmark` (3/3 none in CLI; subsystem only), `runtime` (2/2 indirect), `media` (3/4 none, only `media doctor` covered).
24
+
25
+ ---
26
+
27
+ ## Commands with NO COVERAGE
28
+
29
+ (61 commands, grouped by command group)
30
+
31
+ ### Top-level standalone (5 of 11 with no coverage)
32
+ - `install` (line 200) — no test invokes `openlife install`; `test_install_flow.ts` tests the underlying `InstallFlow` class only (indirect, listed below)
33
+ - `phase1-check` (437) — no test spawns the command
34
+ - `restart` (1171) — no test
35
+ - `update` (1186) — no test
36
+ - `up` (1204) — no test
37
+ - `start` (1270) — no test invokes `start --daemon` end-to-end (Gateway is tested separately in `test_daemon_sigterm.ts` and `test_trigger_basic_auth.ts`, but those instantiate `Gateway` directly without going through the CLI)
38
+
39
+ > **Top-level covered**: `ask` (direct via `test_ask_exit.ts` + `test_openlife_gatekeeper_routing.ts`), `agent <verb>` (none, see below), `dream` (none — see below), `status` (none), `doctor` (none)
40
+
41
+ Adding the unmentioned:
42
+ - `agent <verb>` (1248) — top-level alias command, no direct test
43
+ - `dream <entry...>` (alias `/dream`) (1345) — no CLI spawn; underlying `DreamOrganizer` class is covered by `test_dream_organizer.ts` (indirect)
44
+ - `status` (1150) — no test
45
+ - `doctor` (1163) — no test
46
+
47
+ ### `auth` group
48
+ - `auth gemini` (246) — no test
49
+ - `auth openai` (alias `codex`) (259) — no test
50
+
51
+ ### `models` group
52
+ - `models status` (304) — no test
53
+ - `models set <provider/model>` (323) — no test
54
+ - `models fallbacks list` (339) — no test
55
+ - `models fallbacks add <provider/model>` (348) — no test
56
+ - `models fallbacks remove <provider/model>` (369) — no test
57
+ - `models fallbacks clear` (384) — no test
58
+
59
+ > Note: `Brain` fallback **logic** is tested by `test_brain_fallback_chain.ts` and `test_brain_error_diagnostics.ts`, but the `models` CLI surface that mutates `models.json` is untested.
60
+
61
+ ### `system` group (4 of 7 no coverage)
62
+ - `system install` (467) — no test
63
+ - `system setup` (505) — no test (alias of `system install`)
64
+ - `system status` (535) — no test
65
+ - `system doctor` (542) — no test
66
+ - `system init-project` (552) — no test
67
+ - `system doctor-world` (560) — no test
68
+ - `system bootstrap-world` (567) — no test
69
+
70
+ > Subsystem coverage exists: `test_install_flow.ts` tests `InstallFlow` (indirect).
71
+
72
+ ### `memory` group (5/5 none, all indirect-only)
73
+ - `memory status` (573)
74
+ - `memory provider-list` (577)
75
+ - `memory provider-use <name>` (581)
76
+ - `memory test <name>` (585)
77
+ - `memory search <query...>` (589)
78
+
79
+ ### `swarm` group (1/2 — `swarm run` covered, `consensus-test` not)
80
+ - `swarm consensus-test` (621) — no test
81
+
82
+ ### `governance` group (4/5 — only `policy show` covered)
83
+ - `governance status` (627) — no test
84
+ - `governance audit` (631) — no test
85
+ - `governance risk-check <goal>` (635) — no test (underlying `GovernanceLayer.evaluate` is tested in `test_governance.ts`)
86
+ - `governance consent <scope> <userId>` (639) — no test (underlying `GovernanceConsentStore` is tested in `test_governance_advanced.ts`)
87
+
88
+ ### `benchmark` group (3/3 none at CLI level; subsystem covered)
89
+ - `benchmark run` (669)
90
+ - `benchmark compare` (673)
91
+ - `benchmark report` (677)
92
+
93
+ > `BenchmarkEngine` class is exercised by `test_benchmark_engine.ts` (indirect).
94
+
95
+ ### `agents` group (1/3 — `list`/`show`/`create` covered)
96
+ All three commands are covered at the CLI level (see Direct section).
97
+
98
+ ### `squads` group (1/2 — `create` direct, `list` not)
99
+ - `squads list` (740) — no direct test (subsystem `SquadRegistry` is covered by `test_openlife_runtime_source_truth.ts`)
100
+
101
+ ### `skills` group (covered — `list` direct, `create` direct)
102
+
103
+ ### `route` group (1/1 covered)
104
+
105
+ ### `mcp` group (1/2 — `create` covered, `status` not)
106
+ - `mcp status` (1137) — no test
107
+
108
+ ### `catalog` group (1/2 — `doctor` covered, `list` not)
109
+ - `catalog list` (952) — no test
110
+
111
+ ### `teams` group (1/2 — `upsert` covered, `list` not)
112
+ - `teams list` (958) — no direct test; subsystem covered by `test_agent_team_skill_network.ts`
113
+
114
+ ### `networks` group (1/2 — `upsert` covered, `list` not)
115
+ - `networks list` (986) — no direct test; subsystem covered by `test_agent_team_skill_network.ts`
116
+
117
+ ### `media` group (1/4 — `doctor` covered)
118
+ - `media route` (1013) — no test
119
+ - `media route-status` (1027) — no test
120
+ - `media read-image <imagePath>` (1083) — no test
121
+
122
+ ### `orchestration` group (2/2 none)
123
+ - `orchestration contract` (1126) — no test
124
+ - `orchestration snapshot` (1130) — no test
125
+
126
+ ### `smoke` group (2/2 none)
127
+ - `smoke railway` (1324) — no test
128
+ - `smoke telegram` (1331) — no test (note: `test_smoke*.ts` files do not exist)
129
+
130
+ ### `task` group (2/3 covered — `run` and `status`; `list` not)
131
+ - `task list` (1434) — no test
132
+
133
+ ### `job` group (2/2 none at CLI; subsystem covered)
134
+ - `job list` (1470)
135
+ - `job events <jobId>` (1477)
136
+
137
+ > `JobLifecycleStore` is covered by `test_job_lifecycle.ts` (indirect).
138
+
139
+ ### `runtime` group (2/2 none at CLI; subsystem covered)
140
+ - `runtime probe` (1483)
141
+ - `runtime list` (1487)
142
+
143
+ > `RuntimeProbe` covered by `test_runtime_probe.ts`; `RuntimeRegistry` covered by `test_runtime_registry.ts` (both indirect).
144
+
145
+ ### `reversa` group (6/6 none at CLI; subsystem heavily covered)
146
+ - `reversa status` (1493)
147
+ - `reversa next` (1499)
148
+ - `reversa mode` (1506)
149
+ - `reversa run-phase <phase>` (1516)
150
+ - `reversa run-all` (1522)
151
+ - `reversa export-json` (1526)
152
+
153
+ > `ReversaAgent` is heavily covered by `test_reversa_lite.ts`, `test_reversa_contracts_e2e.ts`, `test_reversa_export_and_strict.ts`, `test_reversa_full_execution.ts` (all indirect — they call `new ReversaAgent()` directly rather than spawning the CLI). `test_reversa_export_and_strict.ts` does spawn `aiobuilder generate-ui` which uses Reversa output, but no test spawns a `reversa <subcommand>` invocation.
154
+
155
+ ### `sources` group (2/4 covered — `scaffold` and `import-ref`)
156
+ - `sources list` (1532) — no test
157
+ - `sources guard-check <url>` (1536) — no test (underlying `SecurityDownloadGuard` covered by `test_security_download_guard.ts`)
158
+
159
+ ### `teammate` group (1/2 none at CLI; subsystem covered)
160
+ - `teammate list` (1579) — no test (subsystem covered by `test_teammate_learning.ts`)
161
+ - `teammate upsert <id> <owner> <status> <title>` (1586) — no test (subsystem covered)
162
+
163
+ ### `learning` group (2/2 none at CLI; subsystem covered)
164
+ - `learning add <taskId> <summary>` (1593) — no test (subsystem `SkillLearningLoopStore` covered by `test_teammate_learning.ts`)
165
+ - `learning list` (1597) — no test
166
+
167
+ ### `designmd` group (5/5 none at CLI; subsystem heavily covered)
168
+ - `designmd status` (1691)
169
+ - `designmd import` (1698)
170
+ - `designmd list` (1711)
171
+ - `designmd show <profileId>` (1715)
172
+ - `designmd apply <profileId> <source> <title> <designPath>` (1720)
173
+
174
+ > `DesignMdMode` / `DesignMdImporter` / `DesignMdRegistry` covered by `test_designmd_mode.ts`, `test_designmd_mode_workspace.ts`, `test_designmd_import_registry.ts` (all indirect).
175
+
176
+ ### `aiobuilder` group (2/6 covered — `validate-catalog`, `generate-ui`)
177
+ - `aiobuilder mode` (1730) — no test
178
+ - `aiobuilder create-agent <id>` (1741) — no test (underlying entity creation is tested by `test_create_entities.ts` via the `agents create` CLI command, but not the aiobuilder alias)
179
+ - `aiobuilder create-squad <id>` (1749) — no test (same)
180
+ - `aiobuilder chat <mensagem...>` (1845) — no test
181
+
182
+ ---
183
+
184
+ ## Commands with INDIRECT COVERAGE ONLY
185
+
186
+ 28 commands. The test exists for the underlying class but does not exercise the CLI handler.
187
+
188
+ | Command | Closest test | What it covers | What's missing |
189
+ |---------|-------------|----------------|----------------|
190
+ | `install` (top-level) | `test_install_flow.ts` | `InstallFlow.run()` against temp dir | CLI `--mode`, `--resume`, `--from-file`, `--headless`, `--models`, `--telegram-*` flag wiring |
191
+ | `dream <entry...>` | `test_dream_organizer.ts` | `DreamOrganizer.organize()` classification | CLI invocation, output JSON shape, `/dream` alias |
192
+ | `models status` | `test_brain_fallback_chain.ts`, `test_brain_error_diagnostics.ts` | Brain fallback logic | `models.json` reads, output formatting |
193
+ | `models set <provider/model>` | `test_brain_fallback_chain.ts` (loosely) | Provider/model parsing happens in `ModelManager` (not directly tested at unit level) | CLI mutates `models.json`; no test |
194
+ | `models fallbacks {list,add,remove,clear}` | (none direct) | `ModelManager` exists but no dedicated test | All four subcommands |
195
+ | `memory status` | `test_memory_orchestrator.ts` | `MemoryOrchestrator.save/search` against local provider | CLI output, provider-registry status surface |
196
+ | `memory provider-list` | `test_memory_orchestrator.ts` | Provider registry instantiation | CLI listing path |
197
+ | `memory provider-use <name>` | (none) | — | Provider switching CLI |
198
+ | `memory test <name>` | `test_memory_orchestrator.ts` | Local provider write/read | Connectivity test path |
199
+ | `memory search <query...>` | `test_memory_orchestrator.ts`, `test_memory_promotion.ts`, `test_memory_retention.ts`, `test_conversation_memory.ts` | Search at API level | CLI dispatch + output |
200
+ | `governance status` | `test_governance.ts`, `test_governance_advanced.ts` | `GovernanceLayer.evaluate` + `GovernanceConsentStore` | CLI status reporting |
201
+ | `governance audit` | `test_governance_advanced.ts` | `SecurityEventStore` | CLI audit summary |
202
+ | `governance risk-check <goal>` | `test_governance.ts`, `test_service_guardrails_delete.ts` | `evaluate()` blocks destructive/injection | CLI surface |
203
+ | `governance consent <scope> <userId>` | `test_governance_advanced.ts` | `GovernanceConsentStore.approve` | CLI consent grant path |
204
+ | `benchmark run` | `test_benchmark_engine.ts` | `BenchmarkEngine.record` + scoring | CLI runner |
205
+ | `benchmark compare` | `test_benchmark_engine.ts` | Engine handles multiple labels | CLI compare report |
206
+ | `benchmark report` | `test_benchmark_engine.ts` | Reporting at engine level | CLI report output |
207
+ | `squads list` | `test_openlife_runtime_source_truth.ts` | `SquadRegistry.all()` source-truth check | CLI dispatch + count assertions (note: `agents list` IS covered directly; squads is the asymmetry) |
208
+ | `teams list` | `test_agent_team_skill_network.ts` | `AgentTeamRegistry.upsert/resolve` | CLI list path |
209
+ | `networks list` | `test_agent_team_skill_network.ts` | `SkillNetworkRegistry.upsert/resolve` | CLI list path |
210
+ | `job list` / `job events` | `test_job_lifecycle.ts` | `JobLifecycleStore.enqueue/transition/events` | CLI dispatch |
211
+ | `runtime probe` | `test_runtime_probe.ts` | `RuntimeProbe.probeAll()` covers 4 executors | CLI dispatch + JSON shape |
212
+ | `runtime list` | `test_runtime_registry.ts` | `RuntimeRegistry.probe/list` | CLI dispatch |
213
+ | `reversa {status,next,mode,run-phase,run-all,export-json}` | `test_reversa_lite.ts`, `test_reversa_full_execution.ts`, `test_reversa_contracts_e2e.ts`, `test_reversa_export_and_strict.ts` | Heavy `ReversaAgent` coverage: phases, modes, export | None of the 6 CLI handlers is exercised via subprocess |
214
+ | `teammate list` / `teammate upsert` | `test_teammate_learning.ts` | `TeammateBoardStore` CRUD | CLI dispatch |
215
+ | `learning add` / `learning list` | `test_teammate_learning.ts` | `SkillLearningLoopStore` CRUD | CLI dispatch |
216
+ | `designmd {status,import,list,show,apply}` | `test_designmd_mode.ts`, `test_designmd_mode_workspace.ts`, `test_designmd_import_registry.ts` | Importer + Registry + Mode | None of the 5 CLI handlers is exercised |
217
+ | `aiobuilder create-agent` / `aiobuilder create-squad` | `test_create_entities.ts` (via `agents create`/`squads create`) | Catalog file creation works | The aiobuilder-prefixed handlers specifically |
218
+ | `start --daemon` | `test_daemon_sigterm.ts`, `test_trigger_basic_auth.ts` | Gateway listen + SIGTERM, basic auth | CLI dispatch (Gateway is instantiated directly, not via `start --daemon`) |
219
+ | `sources guard-check <url>` | `test_security_download_guard.ts` | `SecurityDownloadGuard.validateUrl/scanFileList` | CLI dispatch + JSON shape |
220
+ | `phase1-check` | (none specifically) | Distribution check in `test_distribution_installability.ts` (different scope) | The CLI handler itself |
221
+
222
+ Where a row covers multiple commands (e.g., the entire `reversa` group), they share one underlying test family but each individual CLI handler is independently uncovered.
223
+
224
+ ---
225
+
226
+ ## Commands with DIRECT COVERAGE
227
+
228
+ 36 commands exercised by subprocess (`spawnSync` / `execSync` on `bin/openlife.js` or `dist/index.js`).
229
+
230
+ - `ask <mensagem...>` — `test_ask_exit.ts` (exit code & timeout), `test_openlife_gatekeeper_routing.ts` (routing output)
231
+ - `agents list` — `test_openlife_evolution_surface.ts`, `test_cli_doc_parity.ts` (help-only)
232
+ - `agents create <id>` — `test_create_entities.ts`
233
+ - `agents show <id>` — `test_cli_doc_parity.ts`
234
+ - `squads create <id>` — `test_create_entities.ts`
235
+ - `skills list` — `test_openlife_routing_surface.ts`
236
+ - `skills create <id>` — `test_create_entities.ts`
237
+ - `mcp create <id>` — `test_create_entities.ts`
238
+ - `governance policy show` — `test_cli_doc_parity.ts`
239
+ - `route intent <goal...>` — `test_openlife_routing_surface.ts`, `test_openlife_auto_creator_routing.ts`
240
+ - `catalog doctor` (with `--strict`) — `test_openlife_routing_surface.ts`, `test_openlife_auto_creator_routing.ts`, `test_openlife_evolution_surface.ts`
241
+ - `media doctor` — `test_openlife_evolution_surface.ts`
242
+ - `swarm run` — `test_openlife_evolution_surface.ts`
243
+ - `teams upsert <id>` — `test_admin_teams_networks.ts`
244
+ - `networks upsert <id>` — `test_admin_teams_networks.ts`
245
+ - `service create <serviceId>` — `test_openlife_evolution_surface.ts`
246
+ - `service list` — `test_openlife_evolution_surface.ts`
247
+ - `service status <serviceId>` — `test_cli_service_commands.ts`
248
+ - `service pause <serviceId>` — `test_cli_service_commands.ts`
249
+ - `service resume <serviceId>` — `test_cli_service_commands.ts`
250
+ - `service events <serviceId>` — `test_cli_service_commands.ts`
251
+ - `task run <goal...>` — `test_openlife_evolution_surface.ts`
252
+ - `task status <taskId>` — `test_cli_service_commands.ts`
253
+ - `sources scaffold <type> <id>` — `test_sources_scaffold.ts`
254
+ - `sources import-ref <type> <id> <url>` — `test_sources_import_ref.ts`
255
+ - `context init` — `test_enterprise_agentic_core.ts`
256
+ - `context doctor` — `test_enterprise_agentic_core.ts`
257
+ - `context summary` — `test_enterprise_agentic_core.ts`
258
+ - `plugin install <id>` — `test_enterprise_agentic_core.ts`
259
+ - `plugin list` — `test_enterprise_agentic_core.ts`
260
+ - `plugin inspect <id>` — `test_enterprise_agentic_core.ts`
261
+ - `plugin disable <id>` — `test_enterprise_agentic_core.ts`
262
+ - `plugin enable <id>` — `test_enterprise_agentic_core.ts`
263
+ - `pilot create <id>` — `test_enterprise_agentic_core.ts`
264
+ - `pilot list` — `test_enterprise_agentic_core.ts`
265
+ - `pilot report <id>` — `test_enterprise_agentic_core.ts`
266
+ - `pilot complete <id>` — `test_enterprise_agentic_core.ts`
267
+ - `eval judge` — `test_enterprise_agentic_core.ts`
268
+ - `eval report <mission>` — `test_enterprise_agentic_core.ts`
269
+ - `learn from-last-run` — `test_enterprise_agentic_core.ts`
270
+ - `learn list` — `test_enterprise_agentic_core.ts`
271
+ - `enterprise doctor` — `test_enterprise_agentic_core.ts`
272
+ - `aiobuilder validate-catalog` — `test_openlife_evolution_surface.ts`
273
+ - `aiobuilder generate-ui <featureName> --strict-contracts` — `test_reversa_export_and_strict.ts`
274
+
275
+ (Total above lists 44 lines; the **distinct** count is 36 because some entries cover the same command from two tests, e.g., `agents list` is listed twice.)
276
+
277
+ ---
278
+
279
+ ## Test files with no matching CLI command
280
+
281
+ (These tests cover internal-only behavior. Listing them confirms they were considered and intentionally not mapped to a CLI gap.)
282
+
283
+ - `test_orchestration_assets_lifecycle.ts` — `SquadAutoCreator`, `SubagentLifecycle` (no direct CLI surface)
284
+ - `test_governance.ts` — `GovernanceLayer` + `GovernanceScopePolicy` unit
285
+ - `test_governance_advanced.ts` — `GovernanceConsentStore`, `SandboxPolicy`, `SecurityEventStore`
286
+ - `test_brain_fallback_chain.ts` / `test_brain_error_diagnostics.ts` — `Brain.think()` internals (no `brain` CLI)
287
+ - `test_phase6_board.ts` / `test_phase6_cadence.ts` / `test_phase6_ops.ts` — `ExecutionBoard`, `RoleHandoff`, `CadenceEngine`, `OperatingSystem`, `ReleaseWorkflow` (Phase-6 ops layer; no CLI)
288
+ - `test_consequence_forecaster.ts` — `ConsequenceForecaster` (no `forecast` CLI)
289
+ - `test_outcome_simulator.ts` — `OutcomeSimulator` (no `simulate` CLI)
290
+ - `test_optimization_loop.ts` — `OptimizationLoop` (no CLI)
291
+ - `test_performance_scorecard.ts` — `PerformanceScorecard` (no CLI)
292
+ - `test_release_gate.ts` — `ReleaseWorkflow` (no CLI; sibling of `governance` story)
293
+ - `test_runtime_policy.ts` — `RuntimePolicy.decide/recordResult/saveSnapshot` (no CLI; surfaces in `models` and `runtime` indirectly)
294
+ - `test_service_completion_policy.ts` — `ServiceCompletionPolicy` (no CLI; gate sits inside `service` runtime)
295
+ - `test_service_guardrails_delete.ts` — `GovernanceLayer.evaluate` again; no CLI
296
+ - `test_telegram_delete_guardrail.ts` — `IntentClassifier` + `Gatekeeper` in-process; no CLI
297
+ - `test_trigger_basic_auth.ts` — Express `/api/v1/trigger` HTTP auth; no CLI
298
+ - `test_daemon_sigterm.ts` — `Gateway.shutdown` SIGTERM behavior; no CLI
299
+ - `test_conversation_memory.ts` — `ConversationMemory` fake-injected
300
+ - `test_memory_promotion.ts`, `test_memory_retention.ts` — Memory layer internals
301
+ - `test_dual_mode.ts` — `ExecutionRouter` mode routing (no `dual-mode` CLI)
302
+ - `test_service_command_surface.ts` — Internal `ServiceStateStore` smoke (already exercised by `test_cli_service_commands.ts` at the CLI layer)
303
+ - `test_distribution_installability.ts` — package layout / file presence; not a command per se
304
+ - `test_openlife_runtime_source_truth.ts` — Source-truth invariant for `AgentRegistry`/`SquadRegistry`
305
+ - `test_openlife_evolution_surface.ts`, `test_openlife_routing_surface.ts`, `test_openlife_auto_creator_routing.ts`, `test_openlife_gatekeeper_routing.ts` — these DO spawn the CLI and are credited above
306
+
307
+ ---
308
+
309
+ ## Coverage hot spots and cold spots
310
+
311
+ - **Hottest group:** `plugin` and `pilot` — 100% direct CLI coverage thanks to `test_enterprise_agentic_core.ts`. The enterprise core is the single best-tested surface in the CLI (covers 18 commands across `plugin`, `context`, `pilot`, `eval`, `learn`, `enterprise`).
312
+ - **Second hottest:** `service` group — 6/6 direct coverage across two tests (`test_cli_service_commands.ts` + `test_openlife_evolution_surface.ts`).
313
+ - **Coldest groups (prioritize for Phase 2/3):**
314
+ 1. **`memory` (5 commands, 0 direct)** — entire surface is uncovered at CLI level even though subsystem tests exist; high user-visibility gap.
315
+ 2. **`models` (6 commands, 0 direct)** — primary cognitive routing UX; mutating `models.json` via CLI is unverified.
316
+ 3. **`benchmark` (3 commands, 0 direct)** — engine is tested but CLI runner/comparer/reporter aren't.
317
+ 4. **`reversa` (6 commands, 0 direct)** — large gap despite extensive subsystem testing; the entire `reversa` CLI surface should be E2E-tested.
318
+ 5. **`designmd` (5 commands, 0 direct)** — same pattern as reversa: subsystem tested, CLI handlers not.
319
+ 6. **`auth` (2 commands, 0 direct)** — OAuth flow is hard to test, but at least a `--help` smoke per command would close the gap and detect regression on lazy-import contract.
320
+ 7. **`smoke` (2 commands, 0 direct)** — by name these are smokes, yet no test exercises them.
321
+ 8. **`orchestration` (2 commands, 0 direct)** — `contract` and `snapshot` outputs are unchecked.
322
+ 9. **Top-level standalone commands**: `restart`, `update`, `up`, `status`, `doctor`, `phase1-check`, `start`, `agent <verb>`, `dream` are all uncovered at the CLI level.
323
+
324
+ - **Asymmetry to fix:** `agents list/create/show` is fully covered directly, but the parallel `squads list` and `skills list` are not — `test_openlife_evolution_surface.ts` covers `agents list` and `test_openlife_routing_surface.ts` covers `skills list`, but **no test directly exercises `squads list`** (only the subsystem). Trivial to add.
325
+
326
+ - **Top-level non-coverage is the highest-ROI fix.** A single new `test_top_level_smoke.ts` that spawns each of the 11 top-level standalones with `--help` and the safe ones (`status`, `doctor`, `phase1-check`, `up`) for real would move ~6 commands from "None" to "Direct" with one file.
327
+
328
+ - **Anomalies in coverage classification:**
329
+ - `test_cli_doc_parity.ts` is help-only for most groups; counted as direct for `agents show`, `agents list`, `governance policy show` because it actually executes those handlers, but help-only for the rest of its assertions. Documented as Direct where it spawns the handler with real arguments.
330
+ - `test_openlife_evolution_surface.ts` is the single most-coverage-dense test (it exercises 8 distinct CLI commands across `catalog`, `media`, `agents`, `swarm`, `aiobuilder`, `service`, `task`).
331
+ - `test_enterprise_agentic_core.ts` covers 18 commands single-handedly.
332
+ - `test_distribution_installability.ts` covers no CLI command — it only checks package layout (`bin/openlife.js` exists, `scripts/postinstall-check.sh` exists, etc.).
333
+ - `auth openai` has alias `codex` — both names route to the same handler (line 259); no test covers either name.
334
+ - `dream` has alias `/dream` — no test covers either alias.
@@ -0,0 +1,101 @@
1
+ # Integrations Skipped — INT-05 / INT-06
2
+
3
+ **Generated:** 2026-05-11
4
+ **Phase:** 4 — Live Integration Exercise
5
+
6
+ These integrations were NOT exercised live during Phase 4 because the required credentials or local infrastructure are unavailable in the current environment. Each entry has reproduction steps so anyone with access can run the check later.
7
+
8
+ ---
9
+
10
+ ## INT-05 — Ollama (local LLM runtime)
11
+
12
+ **Status:** SKIPPED — no local Ollama instance running
13
+ **Provider in code:** `Brain.thinkWithOllama()` at `src/orchestrator/Brain.ts`
14
+ **Default URL:** `http://localhost:11434/api/chat` (overridable via `OLLAMA_URL`)
15
+
16
+ ### How to verify once Ollama is available
17
+
18
+ ```bash
19
+ # 1. Install + start Ollama
20
+ curl -fsSL https://ollama.com/install.sh | sh
21
+ ollama pull qwen2.5-coder:7b
22
+ ollama serve # in another shell
23
+
24
+ # 2. Verify reachable
25
+ curl -s http://localhost:11434/api/tags | jq
26
+
27
+ # 3. Write a quick live test (mirror src/test_integration_gemini_live.ts):
28
+ # - stub modelManager to return { primary: { provider: 'ollama', name: 'qwen2.5-coder:7b', raw: 'ollama/qwen2.5-coder:7b' }, fallbacks: [] }
29
+ # - call brain.think(...) and assert non-empty response
30
+
31
+ # 4. Run:
32
+ npm run build && node dist/test_integration_ollama_live.js
33
+ ```
34
+
35
+ **Expected behavior:** `Brain.thinkWithOllama()` should POST to the configured URL and return `data.message.content`.
36
+
37
+ ---
38
+
39
+ ## INT-06 — OpenAI / Anthropic / OpenRouter (commercial APIs)
40
+
41
+ **Status:** SKIPPED — no valid credentials present in `.env`
42
+ **Available providers in code:** `Brain.thinkWithOpenAIAPI()`, `Brain.thinkWithAnthropic()`, `Brain.thinkWithOpenRouter()`
43
+
44
+ ### Current `.env` state (verified Phase 4)
45
+
46
+ | Variable | Status | Notes |
47
+ |----------|--------|-------|
48
+ | `OPENAI_API_KEY` | Present but invalid | Prefix is `gqwen...` not `sk-...` (per Story 1.3 — credential decision deferred to user) |
49
+ | `ANTHROPIC_API_KEY` | Absent | — |
50
+ | `OPENROUTER_API_KEY` | Absent | — |
51
+
52
+ ### How to verify each once credentials are available
53
+
54
+ #### OpenAI (real `sk-...` key)
55
+
56
+ ```bash
57
+ # Option A: replace OPENAI_API_KEY in .env with a real sk-... key
58
+ # Option B: set OPENAI_BASE_URL to point to OpenAI-compatible endpoint
59
+ # (Brain supports this via Story 1.3 OPENAI_BASE_URL infra)
60
+
61
+ # Then run a live test analogous to gemini live:
62
+ # stub modelManager → { provider: 'openai-api', name: 'gpt-4o-mini', raw: 'openai-api/gpt-4o-mini' }
63
+ # assert non-empty response
64
+ ```
65
+
66
+ #### Anthropic
67
+
68
+ ```bash
69
+ # Set ANTHROPIC_API_KEY=sk-ant-... in .env
70
+ # Stub modelManager → { provider: 'anthropic', name: 'claude-3-5-haiku-20241022', raw: 'anthropic/claude-3-5-haiku-20241022' }
71
+ # Run test
72
+ ```
73
+
74
+ #### OpenRouter
75
+
76
+ ```bash
77
+ # Set OPENROUTER_API_KEY=... in .env
78
+ # Stub modelManager → { provider: 'openrouter', name: 'mistralai/mistral-7b-instruct', raw: 'openrouter/mistralai/mistral-7b-instruct' }
79
+ # Run test
80
+ ```
81
+
82
+ ---
83
+
84
+ ## Why this matters
85
+
86
+ These gaps don't block the v1.0 milestone — they're orthogonal to the OpenLife framework's correctness. They DO matter for the fallback-chain reliability story (Story 1.3): currently only Gemini is verified live. If Gemini quota is exhausted or the API is down, the documented fallback chain has no live coverage.
87
+
88
+ **Recommendation for v2:** When credentials become available (for OpenAI/Anthropic/OpenRouter) or local Ollama is provisioned, write the parallel live tests using the same scaffold as `test_integration_gemini_live.ts`. They should each take < 5 minutes to author and < $0.001 to run.
89
+
90
+ ---
91
+
92
+ ## Summary
93
+
94
+ | Integration | Status | Exercised | Log |
95
+ |-------------|--------|-----------|-----|
96
+ | INT-01 Gemini | ✓ Live | Yes | `docs/audit/integrations/gemini.log` |
97
+ | INT-02 Telegram | ✓ Live | Yes | `docs/audit/integrations/telegram.log` |
98
+ | INT-03 HTTP `/api/v1/trigger` | ✓ Live | Yes | `docs/audit/integrations/http-trigger.log` |
99
+ | INT-04 Admin endpoints | ✓ Live | Yes | `docs/audit/integrations/admin.log` |
100
+ | INT-05 Ollama | ⊗ Skipped | No | (this doc) |
101
+ | INT-06 OpenAI/Anthropic/OpenRouter | ⊗ Skipped | No | (this doc) |
@@ -0,0 +1,79 @@
1
+ # OpenLife Autonomous Install
2
+
3
+ Este guia instala o agente autônomo em **local**, **WSL** ou **Linux server** com um comando.
4
+
5
+ ## Comando único mais importante
6
+
7
+ ```bash
8
+ openlife agent install
9
+ ```
10
+
11
+ Depois, para iniciar:
12
+
13
+ ```bash
14
+ openlife agent start
15
+ ```
16
+
17
+ ## Pré-requisitos
18
+
19
+ - Node.js 20+
20
+ - npm 10+
21
+ - Projeto OpenLife clonado
22
+
23
+ ## Instalação rápida
24
+
25
+ ```bash
26
+ ./scripts/openlife-autonomous-install.sh
27
+ ```
28
+
29
+ O script executa:
30
+ 1. `npm run build`
31
+ 2. `openlife agent install`
32
+ 3. `openlife mode set autonomous --host claude-code`
33
+ 4. Detecta process manager (systemd/supervisor/manual)
34
+
35
+ ## Comando único (CLI)
36
+
37
+ Você também pode instalar só os artefatos do agente:
38
+
39
+ ```bash
40
+ openlife agent install
41
+ ```
42
+
43
+ Isso cria:
44
+ - `.openlife/agent-runtime.json`
45
+ - `.openlife/agent-queue.json`
46
+ - `.openlife/autonomous-policy.json`
47
+ - `.openlife/autonomous-install-manifest.json`
48
+ - `scripts/openlife-agent-start.sh`
49
+ - `scripts/openlife-agent.service.example`
50
+ - `scripts/openlife-agent.supervisord.conf.example`
51
+
52
+ ## Linux Server com systemd
53
+
54
+ ```bash
55
+ sudo cp scripts/openlife-agent.service.example /etc/systemd/system/openlife-agent.service
56
+ sudo systemctl daemon-reload
57
+ sudo systemctl enable --now openlife-agent
58
+ sudo systemctl status openlife-agent
59
+ ```
60
+
61
+ ## Fallback com Supervisor
62
+
63
+ Se systemd não estiver disponível:
64
+
65
+ 1. Copie `scripts/openlife-agent.supervisord.conf.example` para sua configuração do Supervisor.
66
+ 2. Rode:
67
+
68
+ ```bash
69
+ sudo supervisorctl reread
70
+ sudo supervisorctl update
71
+ sudo supervisorctl status
72
+ ```
73
+
74
+ ## Execução manual
75
+
76
+ ```bash
77
+ ./scripts/openlife-agent-start.sh
78
+ openlife agent status
79
+ ```
@@ -0,0 +1,137 @@
1
+ # Capability Genesis Engine
2
+
3
+ > Source: `src/orchestrator/capability/CapabilityGenesisEngine.ts`
4
+ > CLI entry: `openlife create capability "<brief>"` (alias of `openlife aiobuilder create-capability`)
5
+
6
+ The **Capability Genesis Engine** orchestrates the existing creators
7
+ (`SkillCreator`, `SquadCreator`, `DynamicAgentBuilder`, `WorkflowEngine`)
8
+ to produce a **draft Capability Pack** from a free-text brief.
9
+
10
+ ## Reuse-first contract
11
+
12
+ Locked decision (2026-05-12): the engine MUST call
13
+ `AssetReuseRouter.find()` before creating anything new.
14
+
15
+ ```
16
+ brief in
17
+
18
+
19
+ AssetReuseRouter.find(brief) ──┐
20
+ │ │
21
+ │ ▼
22
+ │ existing asset(s)?
23
+ │ │
24
+ │ ┌───────────────────────────┤
25
+ │ │ yes (match >= 80%) │ no
26
+ │ ▼ ▼
27
+ │ pack.skills.push({ SkillCreator/SquadCreator.create
28
+ │ source: 'referenced' under <packDir>/<kind>/<id>/
29
+ │ }) pack.skills.push({ source: 'embedded' })
30
+ └─────────────────────────────┘
31
+
32
+
33
+ capability.yaml + INDEX.md
34
+
35
+
36
+ CapabilityPackStateStore.init(actor) → draft
37
+ ```
38
+
39
+ The engine never auto-promotes. Operator (or `aiobuilder canonize`)
40
+ moves the pack through the lifecycle.
41
+
42
+ ## Three authoring modes
43
+
44
+ | Mode | What gets created |
45
+ |---|---|
46
+ | **quick** | 1 skill + manifest only |
47
+ | **professional** | skills + 1 squad |
48
+ | **elite** | skills + squad + workflow stub + quality-gate checklist |
49
+
50
+ The mode is a *budget*, not a *floor*: if the brief provides hints, the
51
+ engine respects them up to the mode's ceiling.
52
+
53
+ ## Generated structure
54
+
55
+ For a `--mode elite` run on `"deep research"`:
56
+
57
+ ```
58
+ .catalog/capabilities/deep-research/
59
+ ├── capability.yaml
60
+ ├── INDEX.md
61
+ ├── skills/
62
+ │ ├── source-credibility-scoring.md
63
+ │ ├── evidence-synthesis.md
64
+ │ ├── contradiction-analysis.md
65
+ │ ├── advanced-query-planning.md
66
+ │ └── executive-briefing.md
67
+ ├── squads/research-squad/SQUAD.md
68
+ ├── workflows/deep-research-flow.yaml
69
+ ├── agents/
70
+ ├── checklists/
71
+ └── templates/
72
+ ```
73
+
74
+ Each generated file is a **draft stub** with TBD sections — the
75
+ operator refines after generation.
76
+
77
+ ## CLI
78
+
79
+ ```bash
80
+ # Top-level alias (Story 3.2)
81
+ openlife create capability "<brief>" \
82
+ --id <slug> \
83
+ --mode quick|professional|elite \
84
+ --actor <name> \
85
+ --skills <csv> \
86
+ --squads <csv> \
87
+ --workflows <csv>
88
+
89
+ # Canonical aiobuilder verb (Story 3.3)
90
+ openlife aiobuilder create-capability "<brief>" \
91
+ --id <slug> \
92
+ --mode professional \
93
+ ...
94
+ ```
95
+
96
+ Both invoke the same handler. AIOBUILDER stays canonical.
97
+
98
+ ## Programmatic API
99
+
100
+ ```ts
101
+ import { CapabilityGenesisEngine } from './orchestrator/capability/CapabilityGenesisEngine';
102
+
103
+ const engine = new CapabilityGenesisEngine();
104
+ const result = engine.generate({
105
+ description: 'research mid-cap medical devices',
106
+ packId: 'medical-devices-research',
107
+ mode: 'professional',
108
+ actor: 'rafa',
109
+ hints: {
110
+ skills: ['source-credibility-scoring', 'evidence-synthesis'],
111
+ squads: ['medical-research-squad'],
112
+ },
113
+ });
114
+
115
+ if (result.ok) {
116
+ console.log(`Pack at ${result.packDir}`);
117
+ console.log(`Reused: ${result.reusedAssets.length}`);
118
+ console.log(`Created: ${result.createdAssets.length}`);
119
+ }
120
+ ```
121
+
122
+ ## What's NOT in v1.3
123
+
124
+ - **Brain-driven proposal** — v1.3 uses a heuristic. v1.4 will wire an
125
+ LLM call (gated by env) for a richer first draft.
126
+ - **Pack publishing** — exporting a pack to a remote registry. Stays as
127
+ `SquadCreator.publish()` placeholder.
128
+ - **Pack migration** — schema migrations between pack versions. Stays
129
+ as `SquadCreator.migrate()` placeholder.
130
+
131
+ ## Test reference
132
+
133
+ - `src/test_capability_genesis_engine.ts` — 10 scenarios covering
134
+ generate, reuse, lifecycle promotion gates.
135
+ - `src/test_deep_research_capability.ts` — proves the bundled
136
+ `deep-research` pack stays intact.
137
+ - `src/test_guided_creator_cli.ts` — covers the CLI surface end-to-end.