@agentikos/omega-os 0.2.0 → 0.19.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -3
- package/bootstrap/lib/__pycache__/claude-code-settings.cpython-313.pyc +0 -0
- package/bootstrap/lib/__pycache__/llm-clis.cpython-313.pyc +0 -0
- package/bootstrap/lib/__pycache__/manifest-helpers.cpython-313.pyc +0 -0
- package/bootstrap/lib/claude-code-settings.py +176 -0
- package/bootstrap/lib/common.sh +457 -1
- package/bootstrap/lib/llm-clis.py +341 -0
- package/bootstrap/lib/manifest-helpers.py +384 -0
- package/bootstrap/lib/steps.sh +790 -21
- package/bootstrap/manifest.example.yaml +87 -1
- package/bootstrap/templates/aisb/CLAUDE.md +305 -0
- package/bootstrap/templates/aisb/architect.md +204 -0
- package/bootstrap/templates/aisb/checkers/CLAUDE.md +9 -0
- package/bootstrap/templates/aisb/checkers/checker-architect.md +151 -0
- package/bootstrap/templates/aisb/checkers/checker-common.md +171 -0
- package/bootstrap/templates/aisb/checkers/checker-construct.md +129 -0
- package/bootstrap/templates/aisb/checkers/checker-keymaker.md +204 -0
- package/bootstrap/templates/aisb/checkers/checker-link.md +205 -0
- package/bootstrap/templates/aisb/checkers/checker-merovingian.md +219 -0
- package/bootstrap/templates/aisb/checkers/checker-morpheus.md +211 -0
- package/bootstrap/templates/aisb/checkers/checker-neo.md +177 -0
- package/bootstrap/templates/aisb/checkers/checker-niobe.md +156 -0
- package/bootstrap/templates/aisb/checkers/checker-oracle.md +164 -0
- package/bootstrap/templates/aisb/checkers/checker-seraph.md +187 -0
- package/bootstrap/templates/aisb/checkers/checker-smith.md +195 -0
- package/bootstrap/templates/aisb/checkers/checker-zion.md +113 -0
- package/bootstrap/templates/aisb/construct.md +135 -0
- package/bootstrap/templates/aisb/keymaker.md +227 -0
- package/bootstrap/templates/aisb/link.md +170 -0
- package/bootstrap/templates/aisb/lmc-protocol.md +57 -0
- package/bootstrap/templates/aisb/merovingian.md +159 -0
- package/bootstrap/templates/aisb/morpheus.md +243 -0
- package/bootstrap/templates/aisb/neo.md +147 -0
- package/bootstrap/templates/aisb/niobe.md +197 -0
- package/bootstrap/templates/aisb/oracle.md +244 -0
- package/bootstrap/templates/aisb/protocols/handoff-templates.md +204 -0
- package/bootstrap/templates/aisb/protocols/shared-protocol.md +248 -0
- package/bootstrap/templates/aisb/pythia.md +153 -0
- package/bootstrap/templates/aisb/seraph.md +315 -0
- package/bootstrap/templates/aisb/smith.md +202 -0
- package/bootstrap/templates/aisb/zion.md +172 -0
- package/bootstrap/templates/autonomous/audit-patrol.yaml +41 -0
- package/bootstrap/templates/autonomous/smith-reflect.yaml +43 -0
- package/bootstrap/templates/autonomous/ssh-key-rotate.yaml +46 -0
- package/bootstrap/templates/autonomous/support-agent.yaml +38 -0
- package/docs/AUDITS.md +85 -0
- package/docs/GAP-ANALYSIS.md +214 -0
- package/docs/INSTALL.md +47 -9
- package/docs/MCP-AND-PLUGINS.md +31 -4
- package/docs/SIMULATION.md +171 -0
- package/docs/simulate.sh +211 -0
- package/install.sh +164 -17
- package/omega/Agentik_Engine/README.md +4 -2
- package/omega/Agentik_Engine/omega_engine/__init__.py +147 -1
- package/omega/Agentik_Engine/omega_engine/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/account.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/agent_messages.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/aisb_chat.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit_arsenal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit_diff.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/audit_gate.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/auto_update.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/autonomous.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/backup.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/barrier.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/bus.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/cadence.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/classifier.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/cleanup.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/cli.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/completions.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/costs.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/done_signal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/envelope.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/events.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/executor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/handoff.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/hermes.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/hermes_bootstrap.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/hermes_desktop.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/learning.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/managed_agent.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/memory.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/menu.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/mission.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/plan.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/progress.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/project.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/prompts.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/provider.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/prune.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/pursue.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/reducer.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/report.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/router.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/skill_routing.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/smoke.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/store.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/supervisor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/sync.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/task.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/telegram.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/telegram_history.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/tmux.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/tools.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/understand_anything.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/updater.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/validate.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/vault.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/webhooks.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/__pycache__/worker.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/account.py +28 -31
- package/omega/Agentik_Engine/omega_engine/agent_messages.py +167 -0
- package/omega/Agentik_Engine/omega_engine/aisb_chat.py +128 -0
- package/omega/Agentik_Engine/omega_engine/audit_diff.py +99 -0
- package/omega/Agentik_Engine/omega_engine/audit_gate.py +149 -0
- package/omega/Agentik_Engine/omega_engine/audits/__init__.py +60 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/batcher.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/dispatcher.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/generator.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/history.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/__pycache__/pipeline.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/audits/batcher.py +218 -0
- package/omega/Agentik_Engine/omega_engine/audits/dispatcher.py +92 -0
- package/omega/Agentik_Engine/omega_engine/audits/generator.py +234 -0
- package/omega/Agentik_Engine/omega_engine/audits/history.py +168 -0
- package/omega/Agentik_Engine/omega_engine/audits/pipeline.py +198 -0
- package/omega/Agentik_Engine/omega_engine/auto_update.py +339 -0
- package/omega/Agentik_Engine/omega_engine/backup.py +215 -0
- package/omega/Agentik_Engine/omega_engine/cadence.py +158 -0
- package/omega/Agentik_Engine/omega_engine/classifier.py +215 -0
- package/omega/Agentik_Engine/omega_engine/cleanup.py +673 -0
- package/omega/Agentik_Engine/omega_engine/cli.py +4156 -86
- package/omega/Agentik_Engine/omega_engine/completions.py +260 -0
- package/omega/Agentik_Engine/omega_engine/costs.py +100 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/autonomous.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/engine.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/__pycache__/telegram.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/daemons/engine.py +53 -4
- package/omega/Agentik_Engine/omega_engine/daemons/telegram.py +101 -17
- package/omega/Agentik_Engine/omega_engine/done_signal.py +154 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/artifact.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/automation.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/base.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/claudecode.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/connection.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/coworker.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/loop.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/prompt.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/educators/__pycache__/skill.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/envelope.py +219 -0
- package/omega/Agentik_Engine/omega_engine/executor.py +149 -10
- package/omega/Agentik_Engine/omega_engine/genesis/__init__.py +134 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/orchestrator.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/phases.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/stack.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/__pycache__/state.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/genesis/orchestrator.py +262 -0
- package/omega/Agentik_Engine/omega_engine/genesis/phases.py +950 -0
- package/omega/Agentik_Engine/omega_engine/genesis/stack.py +324 -0
- package/omega/Agentik_Engine/omega_engine/genesis/state.py +353 -0
- package/omega/Agentik_Engine/omega_engine/handoff.py +459 -0
- package/omega/Agentik_Engine/omega_engine/hermes.py +426 -0
- package/omega/Agentik_Engine/omega_engine/hermes_bootstrap.py +382 -0
- package/omega/Agentik_Engine/omega_engine/hermes_desktop.py +469 -0
- package/omega/Agentik_Engine/omega_engine/integrations/__init__.py +30 -0
- package/omega/Agentik_Engine/omega_engine/integrations/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/integrations/__pycache__/graphify.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/integrations/graphify.py +234 -0
- package/omega/Agentik_Engine/omega_engine/learning.py +268 -0
- package/omega/Agentik_Engine/omega_engine/managed_agent.py +467 -0
- package/omega/Agentik_Engine/omega_engine/memory.py +271 -0
- package/omega/Agentik_Engine/omega_engine/menu.py +1065 -0
- package/omega/Agentik_Engine/omega_engine/migrations/__init__.py +144 -0
- package/omega/Agentik_Engine/omega_engine/migrations/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/migrations/__pycache__/v0_14_0.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/migrations/v0_14_0.py +29 -0
- package/omega/Agentik_Engine/omega_engine/mission.py +16 -13
- package/omega/Agentik_Engine/omega_engine/plan.py +846 -0
- package/omega/Agentik_Engine/omega_engine/prompts.py +158 -0
- package/omega/Agentik_Engine/omega_engine/provider.py +161 -12
- package/omega/Agentik_Engine/omega_engine/prune.py +151 -0
- package/omega/Agentik_Engine/omega_engine/pursue.py +205 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/agentic.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/base.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/corrective.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/graph.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/hybrid.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/multimodal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/rag/__pycache__/router.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/router.py +28 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__init__.py +48 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/__init__.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/auditor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/finder.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/installer.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/__pycache__/marketplaces.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/auditor.py +232 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/finder.py +94 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/installer.py +129 -0
- package/omega/Agentik_Engine/omega_engine/skill_discovery/marketplaces.py +80 -0
- package/omega/Agentik_Engine/omega_engine/skill_routing.py +388 -0
- package/omega/Agentik_Engine/omega_engine/smoke.py +81 -0
- package/omega/Agentik_Engine/omega_engine/store.py +88 -41
- package/omega/Agentik_Engine/omega_engine/sync.py +142 -1
- package/omega/Agentik_Engine/omega_engine/telegram_history.py +260 -0
- package/omega/Agentik_Engine/omega_engine/tmux.py +526 -0
- package/omega/Agentik_Engine/omega_engine/understand_anything.py +275 -0
- package/omega/Agentik_Engine/omega_engine/updater.py +70 -0
- package/omega/Agentik_Engine/omega_engine/validate.py +186 -0
- package/omega/Agentik_Engine/omega_engine/vault.py +342 -0
- package/omega/Agentik_Engine/omega_engine/webhooks.py +262 -0
- package/omega/Agentik_Engine/omega_engine/worker.py +526 -0
- package/omega/Agentik_Engine/pyproject.toml +1 -1
- package/omega/Agentik_Engine/tests/__pycache__/test_account.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_account.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_adversarial.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_adversarial.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_agents_envelope.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_agents_envelope.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audit_arsenal.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audit_arsenal.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audits_pipeline.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_audits_pipeline.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_auto_update_and_migrations.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_auto_update_and_migrations.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_autonomous.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_autonomous.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_educators.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_educators.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_executor.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_executor.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_genesis_and_plan.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_genesis_and_plan.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_graphify.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_graphify.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_handoff.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_handoff.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_and_ua.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_and_ua.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_bootstrap_and_desktop.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_hermes_bootstrap_and_desktop.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_steps.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_steps.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_ux.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_install_ux.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_installer_wiring.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_installer_wiring.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_intelligence.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_intelligence.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_llm_clis_and_uninstall.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_llm_clis_and_uninstall.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_managed_agent.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_managed_agent.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_max_provider_and_menu.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_max_provider_and_menu.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_menu_coverage.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_menu_coverage.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_mission.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_mission.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_progress.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_progress.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_project.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_project.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_pursue_cadence.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_pursue_cadence.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_rag.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_rag.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_reducer.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_reducer.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_report.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_report.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_role_aliases_and_ssot.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_role_aliases_and_ssot.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_discovery_and_gate.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_discovery_and_gate.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_power.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_power.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_routing.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_skill_routing.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_snapshot_partial.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_snapshot_partial.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_telegram_history.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_telegram_history.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tmux_and_aisb_chat.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tmux_and_aisb_chat.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tools_and_sync.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_tools_and_sync.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_v06_features.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_v06_features.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_vault.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_vault.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_webhooks_and_readiness.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_webhooks_and_readiness.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_worker_and_cleanup.cpython-313-pytest-8.4.2.pyc +0 -0
- package/omega/Agentik_Engine/tests/__pycache__/test_worker_and_cleanup.cpython-313.pyc +0 -0
- package/omega/Agentik_Engine/tests/test_account.py +8 -3
- package/omega/Agentik_Engine/tests/test_adversarial.py +351 -0
- package/omega/Agentik_Engine/tests/test_agents_envelope.py +274 -0
- package/omega/Agentik_Engine/tests/test_audits_pipeline.py +348 -0
- package/omega/Agentik_Engine/tests/test_auto_update_and_migrations.py +394 -0
- package/omega/Agentik_Engine/tests/test_genesis_and_plan.py +573 -0
- package/omega/Agentik_Engine/tests/test_graphify.py +190 -0
- package/omega/Agentik_Engine/tests/test_handoff.py +311 -0
- package/omega/Agentik_Engine/tests/test_hermes_and_ua.py +387 -0
- package/omega/Agentik_Engine/tests/test_hermes_bootstrap_and_desktop.py +358 -0
- package/omega/Agentik_Engine/tests/test_install_steps.py +359 -0
- package/omega/Agentik_Engine/tests/test_install_ux.py +151 -0
- package/omega/Agentik_Engine/tests/test_installer_wiring.py +496 -0
- package/omega/Agentik_Engine/tests/test_intelligence.py +285 -0
- package/omega/Agentik_Engine/tests/test_llm_clis_and_uninstall.py +228 -0
- package/omega/Agentik_Engine/tests/test_managed_agent.py +363 -0
- package/omega/Agentik_Engine/tests/test_max_provider_and_menu.py +231 -0
- package/omega/Agentik_Engine/tests/test_menu_coverage.py +72 -0
- package/omega/Agentik_Engine/tests/test_pursue_cadence.py +217 -0
- package/omega/Agentik_Engine/tests/test_role_aliases_and_ssot.py +207 -0
- package/omega/Agentik_Engine/tests/test_skill_discovery_and_gate.py +337 -0
- package/omega/Agentik_Engine/tests/test_skill_power.py +259 -0
- package/omega/Agentik_Engine/tests/test_skill_routing.py +189 -0
- package/omega/Agentik_Engine/tests/test_telegram_history.py +209 -0
- package/omega/Agentik_Engine/tests/test_tmux_and_aisb_chat.py +223 -0
- package/omega/Agentik_Engine/tests/test_v06_features.py +370 -0
- package/omega/Agentik_Engine/tests/test_vault.py +173 -0
- package/omega/Agentik_Engine/tests/test_webhooks_and_readiness.py +277 -0
- package/omega/Agentik_Engine/tests/test_worker_and_cleanup.py +541 -0
- package/omega/Agentik_Extra/etc/secrets/.vault-key +3 -0
- package/omega/Agentik_Extra/etc/secrets/.vault-pub +1 -0
- package/omega/Agentik_Runtime/audits.db +0 -0
- package/omega/Agentik_SSOT/VERSION +1 -1
- package/omega/Agentik_SSOT/claude-plugins/claude-plugins.yaml +100 -0
- package/omega/Agentik_SSOT/docs/LAYERS.md +90 -0
- package/omega/Agentik_SSOT/docs/USER-JOURNEY.md +283 -0
- package/omega/Agentik_SSOT/marketplaces/design-discipline.yaml +86 -0
- package/omega/Agentik_SSOT/skills/a11yaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/apiaudit/SKILL.md +157 -0
- package/omega/Agentik_SSOT/skills/automationaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/cadence/SKILL.md +76 -0
- package/omega/Agentik_SSOT/skills/codeaudit/SKILL.md +153 -0
- package/omega/Agentik_SSOT/skills/copyaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/dataaudit/SKILL.md +157 -0
- package/omega/Agentik_SSOT/skills/debugaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/dispatch/SKILL.md +79 -0
- package/omega/Agentik_SSOT/skills/dxaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/featureaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/flowaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/genesis/SKILL.md +116 -0
- package/omega/Agentik_SSOT/skills/handoff/SKILL.md +117 -0
- package/omega/Agentik_SSOT/skills/logicaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/motionaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/perfaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/plan/SKILL.md +127 -0
- package/omega/Agentik_SSOT/skills/pursue/SKILL.md +68 -0
- package/omega/Agentik_SSOT/skills/rag-route.md +9 -0
- package/omega/Agentik_SSOT/skills/refontaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/retentionaudit/SKILL.md +165 -0
- package/omega/Agentik_SSOT/skills/secaudit/SKILL.md +157 -0
- package/omega/Agentik_SSOT/skills/seoaudit/SKILL.md +161 -0
- package/omega/Agentik_SSOT/skills/skill-auditor/SKILL.md +83 -0
- package/omega/Agentik_SSOT/skills/skill-finder/SKILL.md +116 -0
- package/omega/Agentik_SSOT/skills/uiuxaudit/SKILL.md +165 -0
- package/package.json +2 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"""Genesis — programmatic project genesis pipeline.
|
|
2
|
+
|
|
3
|
+
The Genesis module owns the *upstream half* of a new project: from a one-line
|
|
4
|
+
intent ("a SaaS for X") through to a complete docs tree + DAG-aware feature
|
|
5
|
+
backlog ready for the v0.19 Plan executor to run for days.
|
|
6
|
+
|
|
7
|
+
Why a programmatic pipeline, not a markdown skill
|
|
8
|
+
-------------------------------------------------
|
|
9
|
+
|
|
10
|
+
The pre-v0.18 ``/new`` / ``/prd`` / ``/planner`` skills were prompt-only.
|
|
11
|
+
That worked for one-off demos but broke at scale:
|
|
12
|
+
|
|
13
|
+
* No isolation between concurrent projects (shared CWD heuristics).
|
|
14
|
+
* No state machine — the agent re-did already-done phases on restart.
|
|
15
|
+
* No DAG on features — chronological order was implicit in the markdown
|
|
16
|
+
filename, easily violated by a context-saturated agent.
|
|
17
|
+
* No quality gate — a half-written PRD landed in the same folder as a
|
|
18
|
+
finished one.
|
|
19
|
+
|
|
20
|
+
Genesis fixes the four root causes:
|
|
21
|
+
|
|
22
|
+
1. **Strict project isolation.** Every file lands under
|
|
23
|
+
``$OMEGA_HOME/Agentik_Coding/projects/<slug>/`` and nowhere else.
|
|
24
|
+
There is no ambient CWD leakage — every helper takes ``slug``
|
|
25
|
+
explicitly.
|
|
26
|
+
2. **State machine in PROJECT.yaml.** Phases are recorded; ``resume``
|
|
27
|
+
reads the file and picks up where the previous run stopped.
|
|
28
|
+
3. **DAG with explicit ``depends_on``.** Features carry a real
|
|
29
|
+
dependency graph; the v0.19 Plan reducer enforces it.
|
|
30
|
+
4. **Verified completion per phase.** Each phase has a verify_command;
|
|
31
|
+
the orchestrator refuses to advance the state until it passes.
|
|
32
|
+
|
|
33
|
+
Phases
|
|
34
|
+
------
|
|
35
|
+
|
|
36
|
+
Phase 0 Stack — pick the technical + programmatic stack
|
|
37
|
+
Phase 1 Vision — one-page product identity
|
|
38
|
+
Phase 2 Market — 5 research files (competitors, ICP, pricing,
|
|
39
|
+
channels, positioning)
|
|
40
|
+
Phase 3 Branding — 3 files (identity, design system, motion)
|
|
41
|
+
Phase 4 PRD — 9 files (PRD, tech, design, layouts, data,
|
|
42
|
+
agent playbook, testing, changelog, glossary)
|
|
43
|
+
Phase 5 Features — N files with explicit ``depends_on`` + wave +
|
|
44
|
+
estimated_minutes + files_owned + verify_cmd
|
|
45
|
+
Phase 6 Plan — handoff to v0.19 ``omega plan build``
|
|
46
|
+
|
|
47
|
+
Output tree (per project, strictly isolated)
|
|
48
|
+
--------------------------------------------
|
|
49
|
+
|
|
50
|
+
::
|
|
51
|
+
|
|
52
|
+
$OMEGA_HOME/Agentik_Coding/projects/<slug>/
|
|
53
|
+
PROJECT.yaml state machine + stack config
|
|
54
|
+
HANDOFF.md created by v0.15 handoff
|
|
55
|
+
docs/
|
|
56
|
+
00-VISION.md
|
|
57
|
+
10-market/
|
|
58
|
+
11-COMPETITORS.md
|
|
59
|
+
12-ICP.md
|
|
60
|
+
13-PRICING-STRATEGY.md
|
|
61
|
+
14-GTM-CHANNELS.md
|
|
62
|
+
15-POSITIONING.md
|
|
63
|
+
20-brand/
|
|
64
|
+
21-BRAND-IDENTITY.md
|
|
65
|
+
22-DESIGN-SYSTEM.md
|
|
66
|
+
23-MOTION-LANGUAGE.md
|
|
67
|
+
30-prd/
|
|
68
|
+
31-PRD.md
|
|
69
|
+
32-TECH-ARCHITECTURE.md
|
|
70
|
+
33-DESIGN-SYSTEM-DETAIL.md
|
|
71
|
+
34-LAYOUTS.md
|
|
72
|
+
35-DATA-MODEL.md
|
|
73
|
+
36-AGENT-PLAYBOOK.md
|
|
74
|
+
37-TESTING-STRATEGY.md
|
|
75
|
+
38-CHANGELOG.md
|
|
76
|
+
39-GLOSSARY.md
|
|
77
|
+
40-features/
|
|
78
|
+
F-001-<slug>.md
|
|
79
|
+
F-002-<slug>.md
|
|
80
|
+
...
|
|
81
|
+
plan/
|
|
82
|
+
DAG.json features → DAG for v0.19
|
|
83
|
+
|
|
84
|
+
Public API
|
|
85
|
+
----------
|
|
86
|
+
|
|
87
|
+
* :class:`GenesisState` — the dataclass mirroring PROJECT.yaml
|
|
88
|
+
* :func:`init_project` — create the skeleton + PROJECT.yaml
|
|
89
|
+
* :func:`load_state` / :func:`save_state` — atomic read/write of state
|
|
90
|
+
* :class:`GenesisOrchestrator` — runs phases sequentially with verify
|
|
91
|
+
* :func:`project_root` — strict resolver for the per-project directory
|
|
92
|
+
|
|
93
|
+
The CLI surface lives in :mod:`omega_engine.cli` as ``omega genesis``.
|
|
94
|
+
"""
|
|
95
|
+
from __future__ import annotations
|
|
96
|
+
|
|
97
|
+
from omega_engine.genesis.state import (
|
|
98
|
+
PHASES,
|
|
99
|
+
GenesisState,
|
|
100
|
+
StackConfig,
|
|
101
|
+
init_project,
|
|
102
|
+
load_state,
|
|
103
|
+
project_root,
|
|
104
|
+
save_state,
|
|
105
|
+
)
|
|
106
|
+
from omega_engine.genesis.stack import (
|
|
107
|
+
Stack,
|
|
108
|
+
StackQuestion,
|
|
109
|
+
default_stack,
|
|
110
|
+
pick_stack,
|
|
111
|
+
stack_questions,
|
|
112
|
+
)
|
|
113
|
+
from omega_engine.genesis.orchestrator import (
|
|
114
|
+
GenesisOrchestrator,
|
|
115
|
+
PhaseResult,
|
|
116
|
+
)
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
__all__ = [
|
|
120
|
+
"PHASES",
|
|
121
|
+
"GenesisState",
|
|
122
|
+
"StackConfig",
|
|
123
|
+
"Stack",
|
|
124
|
+
"StackQuestion",
|
|
125
|
+
"GenesisOrchestrator",
|
|
126
|
+
"PhaseResult",
|
|
127
|
+
"init_project",
|
|
128
|
+
"load_state",
|
|
129
|
+
"save_state",
|
|
130
|
+
"project_root",
|
|
131
|
+
"pick_stack",
|
|
132
|
+
"stack_questions",
|
|
133
|
+
"default_stack",
|
|
134
|
+
]
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"""Genesis orchestrator — walks the state machine, writes the files,
|
|
2
|
+
flips PROJECT.yaml after each phase.
|
|
3
|
+
|
|
4
|
+
Why this lives in a separate file from ``state.py`` + ``phases.py``
|
|
5
|
+
-------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
* ``state.py`` is pure data + atomic IO (testable without phases).
|
|
8
|
+
* ``phases.py`` is pure content generation (testable without IO).
|
|
9
|
+
* ``orchestrator.py`` is the boring glue that sequences them with
|
|
10
|
+
proper error handling, resume semantics, and progress reporting.
|
|
11
|
+
|
|
12
|
+
Resume semantics
|
|
13
|
+
----------------
|
|
14
|
+
|
|
15
|
+
Every call to :meth:`GenesisOrchestrator.run` reads PROJECT.yaml first,
|
|
16
|
+
picks the next unfinished phase via :func:`GenesisState.next_phase`,
|
|
17
|
+
runs it, persists the artifacts atomically, then flips the state. If
|
|
18
|
+
any phase raises, the state is NOT flipped — re-running picks up at the
|
|
19
|
+
same phase. This makes Genesis idempotent and crash-safe.
|
|
20
|
+
"""
|
|
21
|
+
from __future__ import annotations
|
|
22
|
+
|
|
23
|
+
import os
|
|
24
|
+
import threading
|
|
25
|
+
from dataclasses import dataclass, field
|
|
26
|
+
from pathlib import Path
|
|
27
|
+
from typing import Any, Callable
|
|
28
|
+
|
|
29
|
+
from omega_engine.genesis.state import (
|
|
30
|
+
GenesisState,
|
|
31
|
+
PHASES,
|
|
32
|
+
load_state,
|
|
33
|
+
project_root,
|
|
34
|
+
save_state,
|
|
35
|
+
)
|
|
36
|
+
from omega_engine.genesis import phases as _phases
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
# Phase → callable mapping. Each callable returns a list[FileSpec].
|
|
40
|
+
_PHASE_FUNCS: dict[str, Callable[[GenesisState], list[_phases.FileSpec]]] = {
|
|
41
|
+
# "stack" is handled separately because it needs operator answers,
|
|
42
|
+
# not deterministic content. The orchestrator calls into stack.pick_stack
|
|
43
|
+
# before this map is consulted.
|
|
44
|
+
"vision": _phases.phase_vision,
|
|
45
|
+
"market": _phases.phase_market,
|
|
46
|
+
"branding": _phases.phase_branding,
|
|
47
|
+
"prd": _phases.phase_prd,
|
|
48
|
+
"features": _phases.phase_features,
|
|
49
|
+
"plan": _phases.phase_plan,
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
# ---------------------------------------------------------------------------
|
|
54
|
+
# Phase result
|
|
55
|
+
# ---------------------------------------------------------------------------
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
@dataclass
|
|
59
|
+
class PhaseResult:
|
|
60
|
+
phase: str
|
|
61
|
+
files_written: list[str] = field(default_factory=list)
|
|
62
|
+
elapsed_s: float = 0.0
|
|
63
|
+
skipped: bool = False # phase was already done, we no-op'd
|
|
64
|
+
error: str = ""
|
|
65
|
+
|
|
66
|
+
@property
|
|
67
|
+
def ok(self) -> bool:
|
|
68
|
+
return not self.error
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# ---------------------------------------------------------------------------
|
|
72
|
+
# Atomic write helper — same pattern as state.py
|
|
73
|
+
# ---------------------------------------------------------------------------
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
def _atomic_write(path: Path, content: str) -> None:
|
|
77
|
+
path.parent.mkdir(parents=True, exist_ok=True)
|
|
78
|
+
tmp = path.with_suffix(
|
|
79
|
+
path.suffix + f".tmp.{os.getpid()}.{threading.get_ident()}"
|
|
80
|
+
)
|
|
81
|
+
fd = os.open(str(tmp), os.O_WRONLY | os.O_CREAT | os.O_TRUNC, 0o644)
|
|
82
|
+
with os.fdopen(fd, "w") as fh:
|
|
83
|
+
fh.write(content)
|
|
84
|
+
fh.flush()
|
|
85
|
+
try:
|
|
86
|
+
os.fsync(fh.fileno())
|
|
87
|
+
except OSError:
|
|
88
|
+
pass
|
|
89
|
+
os.replace(tmp, path)
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# ---------------------------------------------------------------------------
|
|
93
|
+
# Orchestrator
|
|
94
|
+
# ---------------------------------------------------------------------------
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
@dataclass
|
|
98
|
+
class GenesisOrchestrator:
|
|
99
|
+
"""Drives a Genesis pipeline for one project.
|
|
100
|
+
|
|
101
|
+
Construct with the slug + optional ``omega_home`` (defaults to
|
|
102
|
+
``$OMEGA_HOME``). Then call :meth:`run` to advance one phase or
|
|
103
|
+
:meth:`run_all` to walk to completion.
|
|
104
|
+
|
|
105
|
+
The orchestrator is single-project — to drive multiple, create one
|
|
106
|
+
orchestrator per slug. Per-project isolation is enforced by the
|
|
107
|
+
:func:`project_root` resolver in ``state.py``.
|
|
108
|
+
"""
|
|
109
|
+
|
|
110
|
+
slug: str
|
|
111
|
+
omega_home: str | Path | None = None
|
|
112
|
+
|
|
113
|
+
# ----- runtime helpers ------------------------------------------------
|
|
114
|
+
|
|
115
|
+
def _state(self) -> GenesisState:
|
|
116
|
+
return load_state(self.slug, omega_home=self.omega_home)
|
|
117
|
+
|
|
118
|
+
def _persist(self, state: GenesisState) -> None:
|
|
119
|
+
save_state(state, omega_home=self.omega_home)
|
|
120
|
+
|
|
121
|
+
def _root(self) -> Path:
|
|
122
|
+
return project_root(self.slug, omega_home=self.omega_home)
|
|
123
|
+
|
|
124
|
+
# ----- single-phase runner --------------------------------------------
|
|
125
|
+
|
|
126
|
+
def run(self, *, only: str | None = None) -> PhaseResult:
|
|
127
|
+
"""Advance ONE phase.
|
|
128
|
+
|
|
129
|
+
``only`` (optional) forces the orchestrator to run that specific
|
|
130
|
+
phase — even if it's already marked done. Useful for "regen the
|
|
131
|
+
PRD after I changed the vision".
|
|
132
|
+
|
|
133
|
+
Returns a :class:`PhaseResult`. On error, ``error`` is set and
|
|
134
|
+
the state is NOT flipped (the next call retries the same phase).
|
|
135
|
+
"""
|
|
136
|
+
import time as _t
|
|
137
|
+
started = _t.time()
|
|
138
|
+
state = self._state()
|
|
139
|
+
phase = only or state.next_phase()
|
|
140
|
+
if phase is None:
|
|
141
|
+
return PhaseResult(phase="(complete)", elapsed_s=0.0, skipped=True)
|
|
142
|
+
|
|
143
|
+
# Sanity: phase must be one of the known phases
|
|
144
|
+
if phase not in PHASES:
|
|
145
|
+
return PhaseResult(
|
|
146
|
+
phase=phase, error=f"unknown phase {phase!r}",
|
|
147
|
+
)
|
|
148
|
+
|
|
149
|
+
# Stack phase is special — it has no doc output; it just records
|
|
150
|
+
# the operator's stack choice (already done at init_project time
|
|
151
|
+
# OR via `omega genesis stack`). We just mark it done.
|
|
152
|
+
if phase == "stack":
|
|
153
|
+
if not state.is_phase_done("stack"):
|
|
154
|
+
state.mark_phase_done("stack")
|
|
155
|
+
self._persist(state)
|
|
156
|
+
return PhaseResult(
|
|
157
|
+
phase="stack",
|
|
158
|
+
files_written=[],
|
|
159
|
+
elapsed_s=round(_t.time() - started, 3),
|
|
160
|
+
skipped=False,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
fn = _PHASE_FUNCS.get(phase)
|
|
164
|
+
if fn is None:
|
|
165
|
+
return PhaseResult(
|
|
166
|
+
phase=phase, error=f"no generator for phase {phase!r}",
|
|
167
|
+
)
|
|
168
|
+
|
|
169
|
+
try:
|
|
170
|
+
specs = fn(state)
|
|
171
|
+
except Exception as exc: # noqa: BLE001
|
|
172
|
+
return PhaseResult(
|
|
173
|
+
phase=phase, error=f"generator raised: {exc!r}",
|
|
174
|
+
elapsed_s=round(_t.time() - started, 3),
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
root = self._root()
|
|
178
|
+
written: list[str] = []
|
|
179
|
+
for spec in specs:
|
|
180
|
+
dest = root / spec.rel_path
|
|
181
|
+
try:
|
|
182
|
+
_atomic_write(dest, spec.content)
|
|
183
|
+
except OSError as exc:
|
|
184
|
+
return PhaseResult(
|
|
185
|
+
phase=phase,
|
|
186
|
+
error=f"failed to write {dest}: {exc}",
|
|
187
|
+
files_written=written,
|
|
188
|
+
elapsed_s=round(_t.time() - started, 3),
|
|
189
|
+
)
|
|
190
|
+
written.append(spec.rel_path)
|
|
191
|
+
|
|
192
|
+
# Flip state ATOMICALLY only after every file was written.
|
|
193
|
+
state.mark_phase_done(phase)
|
|
194
|
+
self._persist(state)
|
|
195
|
+
|
|
196
|
+
return PhaseResult(
|
|
197
|
+
phase=phase,
|
|
198
|
+
files_written=written,
|
|
199
|
+
elapsed_s=round(_t.time() - started, 3),
|
|
200
|
+
skipped=False,
|
|
201
|
+
)
|
|
202
|
+
|
|
203
|
+
# ----- multi-phase runner ---------------------------------------------
|
|
204
|
+
|
|
205
|
+
def run_all(
|
|
206
|
+
self,
|
|
207
|
+
*,
|
|
208
|
+
max_phases: int | None = None,
|
|
209
|
+
stop_at: str | None = None,
|
|
210
|
+
) -> list[PhaseResult]:
|
|
211
|
+
"""Walk forward through every undone phase.
|
|
212
|
+
|
|
213
|
+
``max_phases`` caps the loop (useful for tests). ``stop_at`` stops
|
|
214
|
+
AFTER finishing the named phase (e.g. "branding" to halt before
|
|
215
|
+
PRD generation).
|
|
216
|
+
"""
|
|
217
|
+
out: list[PhaseResult] = []
|
|
218
|
+
steps = 0
|
|
219
|
+
while True:
|
|
220
|
+
res = self.run()
|
|
221
|
+
if res.skipped and res.phase == "(complete)":
|
|
222
|
+
break
|
|
223
|
+
out.append(res)
|
|
224
|
+
if not res.ok:
|
|
225
|
+
break
|
|
226
|
+
steps += 1
|
|
227
|
+
if max_phases is not None and steps >= max_phases:
|
|
228
|
+
break
|
|
229
|
+
if stop_at and res.phase == stop_at:
|
|
230
|
+
break
|
|
231
|
+
return out
|
|
232
|
+
|
|
233
|
+
# ----- read-only helpers ----------------------------------------------
|
|
234
|
+
|
|
235
|
+
def status(self) -> dict[str, Any]:
|
|
236
|
+
"""Snapshot of where this project is in the pipeline."""
|
|
237
|
+
try:
|
|
238
|
+
state = self._state()
|
|
239
|
+
except FileNotFoundError:
|
|
240
|
+
return {
|
|
241
|
+
"slug": self.slug,
|
|
242
|
+
"exists": False,
|
|
243
|
+
"phase": None,
|
|
244
|
+
"completed_phases": [],
|
|
245
|
+
"remaining_phases": list(PHASES),
|
|
246
|
+
}
|
|
247
|
+
return {
|
|
248
|
+
"slug": state.slug,
|
|
249
|
+
"name": state.name,
|
|
250
|
+
"exists": True,
|
|
251
|
+
"intent": state.intent,
|
|
252
|
+
"phase": state.phase,
|
|
253
|
+
"completed_phases": state.completed_phases,
|
|
254
|
+
"remaining_phases": [
|
|
255
|
+
p for p in PHASES if p not in state.completed_phases
|
|
256
|
+
],
|
|
257
|
+
"stack": state.stack.to_dict(),
|
|
258
|
+
"repo": state.repo.to_dict(),
|
|
259
|
+
"created_at": state.created_at,
|
|
260
|
+
"updated_at": state.updated_at,
|
|
261
|
+
"root": str(self._root()),
|
|
262
|
+
}
|