agentic-orchestrator 0.1.6 → 0.1.7
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/.prettierignore +10 -0
- package/.prettierrc.json +24 -0
- package/CLAUDE.md +3 -2
- package/README.md +47 -46
- package/agentic/orchestrator/defaults/policy.defaults.yaml +1 -1
- package/agentic/orchestrator/prompts/planner.system.md +1 -0
- package/agentic/orchestrator/schemas/agents.schema.json +4 -21
- package/agentic/orchestrator/schemas/gates.schema.json +4 -19
- package/agentic/orchestrator/schemas/index.schema.json +3 -14
- package/agentic/orchestrator/schemas/multi-project.schema.json +2 -8
- package/agentic/orchestrator/schemas/plan.schema.json +6 -26
- package/agentic/orchestrator/schemas/policy.schema.json +19 -81
- package/agentic/orchestrator/schemas/policy.user.schema.json +1 -5
- package/agentic/orchestrator/schemas/qa_test_index.schema.json +5 -29
- package/agentic/orchestrator/schemas/state.schema.json +11 -61
- package/agentic/orchestrator/tools/catalog.json +33 -164
- package/agentic/orchestrator/tools/schemas/input/evidence.latest.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/feature.delete.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/feature.get_context.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/feature.init.input.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/input/feature.log_append.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/feature.ready_to_merge.input.schema.json +1 -6
- package/agentic/orchestrator/tools/schemas/input/feature.state_get.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/feature.state_patch.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/gates.run.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/locks.acquire.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/locks.release.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/performance.record_outcome.input.schema.json +10 -1
- package/agentic/orchestrator/tools/schemas/input/plan.get.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/plan.submit.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/plan.update.input.schema.json +1 -6
- package/agentic/orchestrator/tools/schemas/input/qa.test_index_get.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/qa.test_index_update.input.schema.json +1 -6
- package/agentic/orchestrator/tools/schemas/input/repo.apply_patch.input.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/input/repo.diff.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/repo.diff_bundle.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/repo.ensure_worktree.input.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/input/repo.read_file.input.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/input/repo.search.input.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/input/repo.status.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/input/report.feature_summary.input.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/output/collisions.scan.output.schema.json +1 -3
- package/agentic/orchestrator/tools/schemas/output/evidence.latest.output.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/output/feature.delete.output.schema.json +4 -20
- package/agentic/orchestrator/tools/schemas/output/feature.discover_specs.output.schema.json +2 -7
- package/agentic/orchestrator/tools/schemas/output/feature.get_context.output.schema.json +1 -8
- package/agentic/orchestrator/tools/schemas/output/feature.init.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/feature.log_append.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/feature.ready_to_merge.output.schema.json +1 -6
- package/agentic/orchestrator/tools/schemas/output/feature.state_get.output.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/output/feature.state_patch.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/gates.list.output.schema.json +2 -7
- package/agentic/orchestrator/tools/schemas/output/gates.run.output.schema.json +1 -8
- package/agentic/orchestrator/tools/schemas/output/locks.acquire.output.schema.json +1 -7
- package/agentic/orchestrator/tools/schemas/output/locks.release.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/performance.get_analytics.output.schema.json +22 -2
- package/agentic/orchestrator/tools/schemas/output/plan.get.output.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/output/plan.submit.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/plan.update.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/qa.test_index_get.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/qa.test_index_update.output.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/output/repo.apply_patch.output.schema.json +1 -6
- package/agentic/orchestrator/tools/schemas/output/repo.diff.output.schema.json +1 -4
- package/agentic/orchestrator/tools/schemas/output/repo.diff_bundle.output.schema.json +1 -7
- package/agentic/orchestrator/tools/schemas/output/repo.ensure_worktree.output.schema.json +1 -6
- package/agentic/orchestrator/tools/schemas/output/repo.read_file.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/repo.search.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/repo.status.output.schema.json +1 -5
- package/agentic/orchestrator/tools/schemas/output/report.dashboard.output.schema.json +1 -4
- package/apps/control-plane/scripts/validate-architecture-rules.mjs +16 -5
- package/apps/control-plane/scripts/validate-docker-mcp-contract.mjs +30 -8
- package/apps/control-plane/scripts/validate-mcp-contracts.ts +13 -7
- package/apps/control-plane/src/application/adapters/adapter-registry.ts +35 -15
- package/apps/control-plane/src/application/multi-project-loader.ts +27 -10
- package/apps/control-plane/src/application/services/activity-monitor-service.ts +26 -14
- package/apps/control-plane/src/application/services/collision-queue-service.ts +31 -17
- package/apps/control-plane/src/application/services/cost-tracking-service.ts +23 -16
- package/apps/control-plane/src/application/services/dependency-scheduler-service.ts +12 -4
- package/apps/control-plane/src/application/services/feature-deletion-service.ts +94 -58
- package/apps/control-plane/src/application/services/feature-lifecycle-service.ts +19 -13
- package/apps/control-plane/src/application/services/feature-state-service.ts +29 -19
- package/apps/control-plane/src/application/services/gate-interpolation-service.ts +7 -2
- package/apps/control-plane/src/application/services/gate-service.ts +64 -41
- package/apps/control-plane/src/application/services/instance-isolation-service.ts +1 -1
- package/apps/control-plane/src/application/services/issue-tracker-service.ts +49 -38
- package/apps/control-plane/src/application/services/lock-service.ts +75 -49
- package/apps/control-plane/src/application/services/merge-service.ts +91 -50
- package/apps/control-plane/src/application/services/notifier-service.ts +42 -20
- package/apps/control-plane/src/application/services/patch-service.ts +73 -44
- package/apps/control-plane/src/application/services/performance-analytics-service.ts +8 -6
- package/apps/control-plane/src/application/services/plan-service.ts +148 -89
- package/apps/control-plane/src/application/services/policy-loader-service.ts +10 -4
- package/apps/control-plane/src/application/services/pr-monitor-service.ts +33 -14
- package/apps/control-plane/src/application/services/qa-index-service.ts +20 -16
- package/apps/control-plane/src/application/services/reactions-service.ts +30 -15
- package/apps/control-plane/src/application/services/reporting-service.ts +16 -12
- package/apps/control-plane/src/application/services/run-lease-service.ts +138 -81
- package/apps/control-plane/src/application/tools/tool-metadata.ts +5 -5
- package/apps/control-plane/src/application/tools/tool-router.ts +6 -3
- package/apps/control-plane/src/cli/aop.ts +2 -2
- package/apps/control-plane/src/cli/attach-command-handler.ts +9 -9
- package/apps/control-plane/src/cli/cleanup-command-handler.ts +16 -11
- package/apps/control-plane/src/cli/cli-argument-parser.ts +6 -3
- package/apps/control-plane/src/cli/dashboard-command-handler.ts +28 -8
- package/apps/control-plane/src/cli/delete-command-handler.ts +7 -7
- package/apps/control-plane/src/cli/help-command-handler.ts +61 -32
- package/apps/control-plane/src/cli/init-command-handler.ts +110 -54
- package/apps/control-plane/src/cli/io.ts +7 -3
- package/apps/control-plane/src/cli/resume-command-handler.ts +21 -13
- package/apps/control-plane/src/cli/retry-command-handler.ts +12 -11
- package/apps/control-plane/src/cli/run-command-handler.ts +12 -8
- package/apps/control-plane/src/cli/send-command-handler.ts +6 -6
- package/apps/control-plane/src/cli/spec-ingestion-service.ts +14 -8
- package/apps/control-plane/src/cli/spec-input-resolver.ts +6 -1
- package/apps/control-plane/src/cli/spec-utils.ts +2 -2
- package/apps/control-plane/src/cli/status-command-handler.ts +13 -12
- package/apps/control-plane/src/cli/tooling.ts +3 -3
- package/apps/control-plane/src/cli/types.ts +1 -1
- package/apps/control-plane/src/core/collisions.ts +27 -10
- package/apps/control-plane/src/core/constants.ts +13 -7
- package/apps/control-plane/src/core/error-codes.ts +1 -1
- package/apps/control-plane/src/core/fs.ts +11 -5
- package/apps/control-plane/src/core/gates.ts +53 -27
- package/apps/control-plane/src/core/git.ts +18 -6
- package/apps/control-plane/src/core/kernel.ts +515 -227
- package/apps/control-plane/src/core/patch.ts +7 -3
- package/apps/control-plane/src/core/path-layout.ts +5 -1
- package/apps/control-plane/src/core/path-rules.ts +19 -5
- package/apps/control-plane/src/core/qa-index.ts +26 -12
- package/apps/control-plane/src/core/response.ts +9 -6
- package/apps/control-plane/src/core/schemas.ts +29 -10
- package/apps/control-plane/src/core/tool-caller.ts +1 -1
- package/apps/control-plane/src/core/workspace-hooks.ts +5 -5
- package/apps/control-plane/src/index.ts +3 -9
- package/apps/control-plane/src/interfaces/cli/bootstrap.ts +69 -32
- package/apps/control-plane/src/mcp/kernel-tool-executor.ts +7 -3
- package/apps/control-plane/src/mcp/mcp-server-adapter.ts +12 -10
- package/apps/control-plane/src/mcp/operation-ledger.ts +18 -8
- package/apps/control-plane/src/mcp/protocol-contract.ts +2 -2
- package/apps/control-plane/src/mcp/runtime-factory.ts +15 -6
- package/apps/control-plane/src/mcp/token-auth-verifier.ts +3 -2
- package/apps/control-plane/src/mcp/token-claims-validator.ts +11 -7
- package/apps/control-plane/src/mcp/tool-authorizer.ts +1 -3
- package/apps/control-plane/src/mcp/tool-client.ts +17 -5
- package/apps/control-plane/src/mcp/tool-contract-validator.ts +17 -8
- package/apps/control-plane/src/mcp/tool-registry-loader.ts +7 -3
- package/apps/control-plane/src/mcp/tool-runtime.ts +66 -39
- package/apps/control-plane/src/mcp/tools-markdown-generator.ts +6 -1
- package/apps/control-plane/src/providers/providers.ts +72 -48
- package/apps/control-plane/src/supervisor/build-wave-executor.ts +44 -25
- package/apps/control-plane/src/supervisor/planning-wave-executor.ts +46 -33
- package/apps/control-plane/src/supervisor/prompt-bundle-loader.ts +1 -1
- package/apps/control-plane/src/supervisor/qa-wave-executor.ts +38 -23
- package/apps/control-plane/src/supervisor/run-coordinator.ts +71 -36
- package/apps/control-plane/src/supervisor/runtime.ts +59 -35
- package/apps/control-plane/src/supervisor/session-orchestrator.ts +48 -31
- package/apps/control-plane/src/supervisor/types.ts +22 -7
- package/apps/control-plane/src/supervisor/worker-decision-loop.ts +30 -20
- package/apps/control-plane/test/activity-monitor.spec.ts +54 -30
- package/apps/control-plane/test/adapter-registry.spec.ts +5 -5
- package/apps/control-plane/test/aop.spec.ts +4 -4
- package/apps/control-plane/test/batch-operations.spec.ts +20 -18
- package/apps/control-plane/test/bootstrap-attach.spec.ts +52 -19
- package/apps/control-plane/test/bootstrap-edge-cases.spec.ts +58 -27
- package/apps/control-plane/test/bootstrap.spec.ts +72 -40
- package/apps/control-plane/test/cleanup-command.spec.ts +86 -32
- package/apps/control-plane/test/cli-helpers.spec.ts +119 -66
- package/apps/control-plane/test/cli.spec.ts +1 -1
- package/apps/control-plane/test/cli.unit.spec.ts +226 -167
- package/apps/control-plane/test/collision-queue.spec.ts +49 -40
- package/apps/control-plane/test/collisions.spec.ts +30 -30
- package/apps/control-plane/test/core-utils.spec.ts +29 -15
- package/apps/control-plane/test/cost-tracking.spec.ts +38 -22
- package/apps/control-plane/test/dashboard-api.integration.spec.ts +68 -36
- package/apps/control-plane/test/dashboard-client.spec.ts +18 -12
- package/apps/control-plane/test/dashboard-command.spec.ts +11 -7
- package/apps/control-plane/test/delete-command-handler.spec.ts +49 -41
- package/apps/control-plane/test/dependency-scheduler.spec.ts +47 -20
- package/apps/control-plane/test/epoch-tracking.spec.ts +9 -9
- package/apps/control-plane/test/feature-deletion-service.spec.ts +60 -52
- package/apps/control-plane/test/feature-lifecycle.spec.ts +36 -17
- package/apps/control-plane/test/gates.spec.ts +101 -81
- package/apps/control-plane/test/git-spawn-error.spec.ts +1 -1
- package/apps/control-plane/test/helpers.ts +10 -6
- package/apps/control-plane/test/incremental-gates.spec.ts +59 -20
- package/apps/control-plane/test/init-wizard.spec.ts +162 -67
- package/apps/control-plane/test/instance-isolation.spec.ts +43 -10
- package/apps/control-plane/test/issue-tracker.spec.ts +368 -128
- package/apps/control-plane/test/kernel-collision-replay.spec.ts +50 -29
- package/apps/control-plane/test/kernel.branches.spec.ts +64 -40
- package/apps/control-plane/test/kernel.coverage.spec.ts +85 -49
- package/apps/control-plane/test/kernel.coverage2.spec.ts +109 -65
- package/apps/control-plane/test/kernel.spec.ts +134 -51
- package/apps/control-plane/test/lock-service.spec.ts +92 -68
- package/apps/control-plane/test/mcp-helpers.spec.ts +53 -39
- package/apps/control-plane/test/mcp.spec.ts +231 -115
- package/apps/control-plane/test/merge-service.spec.ts +142 -94
- package/apps/control-plane/test/multi-project.spec.ts +28 -22
- package/apps/control-plane/test/notifier-service.spec.ts +136 -92
- package/apps/control-plane/test/parallel-gates.spec.ts +51 -35
- package/apps/control-plane/test/patch-service.spec.ts +128 -48
- package/apps/control-plane/test/performance-analytics.spec.ts +99 -63
- package/apps/control-plane/test/plan-service.spec.ts +50 -39
- package/apps/control-plane/test/planning-wave-executor.spec.ts +95 -71
- package/apps/control-plane/test/policy-loader-service.spec.ts +41 -19
- package/apps/control-plane/test/pr-monitor.spec.ts +113 -64
- package/apps/control-plane/test/providers.spec.ts +133 -102
- package/apps/control-plane/test/qa-index-service.spec.ts +31 -33
- package/apps/control-plane/test/qa-index.spec.ts +58 -61
- package/apps/control-plane/test/reactions.spec.ts +88 -45
- package/apps/control-plane/test/response.spec.ts +5 -5
- package/apps/control-plane/test/resume-command.spec.ts +121 -80
- package/apps/control-plane/test/run-coordinator.spec.ts +205 -136
- package/apps/control-plane/test/schema-date-time.spec.ts +49 -41
- package/apps/control-plane/test/service-retry-paths.spec.ts +77 -57
- package/apps/control-plane/test/services.spec.ts +147 -129
- package/apps/control-plane/test/session-management.spec.ts +136 -74
- package/apps/control-plane/test/spec-ingestion.spec.ts +23 -21
- package/apps/control-plane/test/spec-input-resolver.spec.ts +11 -10
- package/apps/control-plane/test/supervisor-collaborators.spec.ts +168 -121
- package/apps/control-plane/test/supervisor.calltool.spec.ts +21 -18
- package/apps/control-plane/test/supervisor.spec.ts +67 -43
- package/apps/control-plane/test/supervisor.unit.spec.ts +195 -126
- package/apps/control-plane/test/token-auth-verifier.spec.ts +29 -14
- package/apps/control-plane/test/tool-registry-loader.spec.ts +51 -27
- package/apps/control-plane/test/tool-runtime.spec.ts +63 -46
- package/apps/control-plane/test/worker-decision-loop.spec.ts +143 -122
- package/apps/control-plane/test/workspace-hooks.spec.ts +61 -23
- package/apps/control-plane/tsconfig.build.json +2 -7
- package/apps/control-plane/tsconfig.json +1 -5
- package/apps/control-plane/vitest.config.ts +7 -7
- package/dist/apps/control-plane/application/adapters/adapter-registry.js +12 -5
- package/dist/apps/control-plane/application/adapters/adapter-registry.js.map +1 -1
- package/dist/apps/control-plane/application/multi-project-loader.js +26 -9
- package/dist/apps/control-plane/application/multi-project-loader.js.map +1 -1
- package/dist/apps/control-plane/application/services/activity-monitor-service.js +7 -7
- package/dist/apps/control-plane/application/services/activity-monitor-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/collision-queue-service.js +7 -7
- package/dist/apps/control-plane/application/services/collision-queue-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/cost-tracking-service.js +6 -8
- package/dist/apps/control-plane/application/services/cost-tracking-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/dependency-scheduler-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/feature-deletion-service.js +37 -29
- package/dist/apps/control-plane/application/services/feature-deletion-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/feature-lifecycle-service.js +10 -10
- package/dist/apps/control-plane/application/services/feature-lifecycle-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/feature-state-service.js +11 -11
- package/dist/apps/control-plane/application/services/feature-state-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/gate-interpolation-service.js +3 -1
- package/dist/apps/control-plane/application/services/gate-interpolation-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/gate-service.js +26 -26
- package/dist/apps/control-plane/application/services/gate-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/instance-isolation-service.js +1 -1
- package/dist/apps/control-plane/application/services/instance-isolation-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/issue-tracker-service.js +25 -15
- package/dist/apps/control-plane/application/services/issue-tracker-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/lock-service.js +32 -32
- package/dist/apps/control-plane/application/services/lock-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/merge-service.js +41 -27
- package/dist/apps/control-plane/application/services/merge-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/notifier-service.js +29 -15
- package/dist/apps/control-plane/application/services/notifier-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/patch-service.js +21 -19
- package/dist/apps/control-plane/application/services/patch-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/performance-analytics-service.js +4 -4
- package/dist/apps/control-plane/application/services/performance-analytics-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/plan-service.js +33 -33
- package/dist/apps/control-plane/application/services/plan-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/policy-loader-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/pr-monitor-service.js +23 -11
- package/dist/apps/control-plane/application/services/pr-monitor-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/qa-index-service.js +11 -11
- package/dist/apps/control-plane/application/services/qa-index-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/reactions-service.js +13 -9
- package/dist/apps/control-plane/application/services/reactions-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/reporting-service.js +11 -9
- package/dist/apps/control-plane/application/services/reporting-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/run-lease-service.js +34 -33
- package/dist/apps/control-plane/application/services/run-lease-service.js.map +1 -1
- package/dist/apps/control-plane/application/tools/tool-metadata.js +2 -2
- package/dist/apps/control-plane/application/tools/tool-router.js.map +1 -1
- package/dist/apps/control-plane/cli/attach-command-handler.js +9 -9
- package/dist/apps/control-plane/cli/cleanup-command-handler.js +11 -9
- package/dist/apps/control-plane/cli/cleanup-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/cli-argument-parser.js +4 -3
- package/dist/apps/control-plane/cli/cli-argument-parser.js.map +1 -1
- package/dist/apps/control-plane/cli/dashboard-command-handler.js +23 -7
- package/dist/apps/control-plane/cli/dashboard-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/delete-command-handler.js +7 -7
- package/dist/apps/control-plane/cli/help-command-handler.js +58 -30
- package/dist/apps/control-plane/cli/help-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/init-command-handler.js +44 -33
- package/dist/apps/control-plane/cli/init-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/io.js +2 -2
- package/dist/apps/control-plane/cli/io.js.map +1 -1
- package/dist/apps/control-plane/cli/resume-command-handler.js +9 -9
- package/dist/apps/control-plane/cli/resume-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/retry-command-handler.js +12 -11
- package/dist/apps/control-plane/cli/retry-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/run-command-handler.js +12 -8
- package/dist/apps/control-plane/cli/run-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/send-command-handler.js +6 -6
- package/dist/apps/control-plane/cli/spec-ingestion-service.js +10 -8
- package/dist/apps/control-plane/cli/spec-ingestion-service.js.map +1 -1
- package/dist/apps/control-plane/cli/spec-input-resolver.js.map +1 -1
- package/dist/apps/control-plane/cli/spec-utils.js.map +1 -1
- package/dist/apps/control-plane/cli/status-command-handler.js +8 -8
- package/dist/apps/control-plane/cli/status-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/tooling.js +1 -1
- package/dist/apps/control-plane/core/collisions.js +11 -8
- package/dist/apps/control-plane/core/collisions.js.map +1 -1
- package/dist/apps/control-plane/core/constants.js +13 -7
- package/dist/apps/control-plane/core/constants.js.map +1 -1
- package/dist/apps/control-plane/core/error-codes.js +1 -1
- package/dist/apps/control-plane/core/fs.js.map +1 -1
- package/dist/apps/control-plane/core/gates.d.ts +2 -2
- package/dist/apps/control-plane/core/gates.js +26 -19
- package/dist/apps/control-plane/core/gates.js.map +1 -1
- package/dist/apps/control-plane/core/git.js +3 -3
- package/dist/apps/control-plane/core/git.js.map +1 -1
- package/dist/apps/control-plane/core/kernel.d.ts +1 -0
- package/dist/apps/control-plane/core/kernel.js +134 -81
- package/dist/apps/control-plane/core/kernel.js.map +1 -1
- package/dist/apps/control-plane/core/patch.js +7 -3
- package/dist/apps/control-plane/core/patch.js.map +1 -1
- package/dist/apps/control-plane/core/path-layout.d.ts +1 -0
- package/dist/apps/control-plane/core/path-layout.js +4 -1
- package/dist/apps/control-plane/core/path-layout.js.map +1 -1
- package/dist/apps/control-plane/core/path-rules.js +3 -1
- package/dist/apps/control-plane/core/path-rules.js.map +1 -1
- package/dist/apps/control-plane/core/qa-index.js +5 -5
- package/dist/apps/control-plane/core/qa-index.js.map +1 -1
- package/dist/apps/control-plane/core/response.js +3 -3
- package/dist/apps/control-plane/core/response.js.map +1 -1
- package/dist/apps/control-plane/core/schemas.js +10 -6
- package/dist/apps/control-plane/core/schemas.js.map +1 -1
- package/dist/apps/control-plane/core/workspace-hooks.js +3 -3
- package/dist/apps/control-plane/index.d.ts +1 -1
- package/dist/apps/control-plane/index.js +1 -1
- package/dist/apps/control-plane/index.js.map +1 -1
- package/dist/apps/control-plane/interfaces/cli/bootstrap.js +31 -20
- package/dist/apps/control-plane/interfaces/cli/bootstrap.js.map +1 -1
- package/dist/apps/control-plane/mcp/kernel-tool-executor.js +1 -1
- package/dist/apps/control-plane/mcp/kernel-tool-executor.js.map +1 -1
- package/dist/apps/control-plane/mcp/mcp-server-adapter.js +6 -7
- package/dist/apps/control-plane/mcp/mcp-server-adapter.js.map +1 -1
- package/dist/apps/control-plane/mcp/operation-ledger.js +5 -5
- package/dist/apps/control-plane/mcp/operation-ledger.js.map +1 -1
- package/dist/apps/control-plane/mcp/protocol-contract.js +2 -2
- package/dist/apps/control-plane/mcp/runtime-factory.js +2 -2
- package/dist/apps/control-plane/mcp/runtime-factory.js.map +1 -1
- package/dist/apps/control-plane/mcp/token-auth-verifier.js +1 -1
- package/dist/apps/control-plane/mcp/token-auth-verifier.js.map +1 -1
- package/dist/apps/control-plane/mcp/token-claims-validator.js +5 -5
- package/dist/apps/control-plane/mcp/token-claims-validator.js.map +1 -1
- package/dist/apps/control-plane/mcp/tool-authorizer.js +1 -3
- package/dist/apps/control-plane/mcp/tool-authorizer.js.map +1 -1
- package/dist/apps/control-plane/mcp/tool-client.js +2 -2
- package/dist/apps/control-plane/mcp/tool-client.js.map +1 -1
- package/dist/apps/control-plane/mcp/tool-contract-validator.js +3 -3
- package/dist/apps/control-plane/mcp/tool-contract-validator.js.map +1 -1
- package/dist/apps/control-plane/mcp/tool-registry-loader.js +1 -1
- package/dist/apps/control-plane/mcp/tool-registry-loader.js.map +1 -1
- package/dist/apps/control-plane/mcp/tool-runtime.js +17 -17
- package/dist/apps/control-plane/mcp/tool-runtime.js.map +1 -1
- package/dist/apps/control-plane/mcp/tools-markdown-generator.js +6 -1
- package/dist/apps/control-plane/mcp/tools-markdown-generator.js.map +1 -1
- package/dist/apps/control-plane/providers/providers.d.ts +1 -1
- package/dist/apps/control-plane/providers/providers.js +31 -34
- package/dist/apps/control-plane/providers/providers.js.map +1 -1
- package/dist/apps/control-plane/supervisor/build-wave-executor.js +12 -12
- package/dist/apps/control-plane/supervisor/build-wave-executor.js.map +1 -1
- package/dist/apps/control-plane/supervisor/planning-wave-executor.js +19 -16
- package/dist/apps/control-plane/supervisor/planning-wave-executor.js.map +1 -1
- package/dist/apps/control-plane/supervisor/prompt-bundle-loader.js +1 -1
- package/dist/apps/control-plane/supervisor/qa-wave-executor.js +13 -13
- package/dist/apps/control-plane/supervisor/qa-wave-executor.js.map +1 -1
- package/dist/apps/control-plane/supervisor/run-coordinator.js +37 -20
- package/dist/apps/control-plane/supervisor/run-coordinator.js.map +1 -1
- package/dist/apps/control-plane/supervisor/runtime.js +25 -21
- package/dist/apps/control-plane/supervisor/runtime.js.map +1 -1
- package/dist/apps/control-plane/supervisor/session-orchestrator.js +29 -23
- package/dist/apps/control-plane/supervisor/session-orchestrator.js.map +1 -1
- package/dist/apps/control-plane/supervisor/types.d.ts +3 -3
- package/dist/apps/control-plane/supervisor/types.js.map +1 -1
- package/dist/apps/control-plane/supervisor/worker-decision-loop.js +14 -16
- package/dist/apps/control-plane/supervisor/worker-decision-loop.js.map +1 -1
- package/eslint.config.mjs +20 -20
- package/example-configurations/README.md +1 -1
- package/example-configurations/java/agents.yaml +3 -3
- package/example-configurations/java/policy.yaml +1 -1
- package/example-configurations/node/agents.yaml +3 -3
- package/example-configurations/node/policy.yaml +1 -1
- package/package.json +10 -5
- package/packages/web-dashboard/next.config.js +2 -2
- package/packages/web-dashboard/src/app/api/actions/route.ts +25 -9
- package/packages/web-dashboard/src/app/api/events/route.ts +20 -6
- package/packages/web-dashboard/src/app/api/features/[id]/checkout/route.ts +88 -37
- package/packages/web-dashboard/src/app/api/features/[id]/evidence/[artifact]/route.ts +8 -5
- package/packages/web-dashboard/src/app/api/features/[id]/review/route.ts +27 -9
- package/packages/web-dashboard/src/app/api/features/[id]/route.ts +5 -2
- package/packages/web-dashboard/src/app/api/projects/route.ts +5 -5
- package/packages/web-dashboard/src/app/globals.css +10 -2
- package/packages/web-dashboard/src/app/page.tsx +100 -37
- package/packages/web-dashboard/src/lib/aop-client.ts +68 -37
- package/packages/web-dashboard/src/lib/multi-project-config.ts +28 -7
- package/packages/web-dashboard/src/lib/orchestrator-tools.ts +59 -36
- package/packages/web-dashboard/tsconfig.json +3 -11
- package/scripts/nx-safe.mjs +10 -10
- package/spec-files/completed/agentic_orchestrator_cli_delete_command_spec.md +5 -0
- package/spec-files/completed/agentic_orchestrator_feature_gaps_closure_spec.md +187 -90
- package/spec-files/completed/agentic_orchestrator_init_policy_ux_simplification_spec.md +49 -16
- package/spec-files/completed/agentic_orchestrator_mcp_formalization_spec.md +24 -1
- package/spec-files/completed/agentic_orchestrator_single_global_orchestrator_spec.md +9 -0
- package/spec-files/completed/agentic_orchestrator_spec.md +171 -75
- package/spec-files/completed/agentic_orchestrator_validator_hardening_spec.md +25 -17
- package/spec-files/outstanding/agentic_orchestrator_artifact_database_publishing_spec.md +40 -5
- package/spec-files/outstanding/agentic_orchestrator_enterprise_governance_dashboard_spec.md +23 -12
- package/spec-files/outstanding/agentic_orchestrator_knowledge_canary_spec.md +16 -4
- package/spec-files/outstanding/agentic_orchestrator_observability_integrity_diagnostics_spec.md +42 -2
- package/spec-files/outstanding/agentic_orchestrator_performance_improvements_spec.md +209 -130
- package/spec-files/outstanding/agentic_orchestrator_planning_review_quality_spec.md +56 -3
- package/spec-files/outstanding/agentic_orchestrator_productization_commercial_spec.md +77 -10
- package/spec-files/outstanding/agentic_orchestrator_quality_adoption_execution_spec.md +29 -14
- package/spec-files/progress.md +186 -175
- package/tsconfig.json +2 -8
|
@@ -12,9 +12,11 @@
|
|
|
12
12
|
### 0.1 Testing Standards
|
|
13
13
|
|
|
14
14
|
All new code MUST follow the testing standards defined in:
|
|
15
|
+
|
|
15
16
|
- **`prompts/vitest-testing-standards.instructions.md`**
|
|
16
17
|
|
|
17
18
|
Key requirements:
|
|
19
|
+
|
|
18
20
|
- Use Vitest (`describe/it/expect`, `vi` mocks/spies)
|
|
19
21
|
- Match existing repo conventions (test files in `apps/control-plane/test/*.spec.ts`)
|
|
20
22
|
- Use **Given / When / Then** naming: `GIVEN_<context>_WHEN_<action>_THEN_<expected>`
|
|
@@ -25,6 +27,7 @@ Key requirements:
|
|
|
25
27
|
### 0.2 Reference Implementation Repository
|
|
26
28
|
|
|
27
29
|
The ComposioHQ Agent Orchestrator implementation serves as the reference for feature implementations:
|
|
30
|
+
|
|
28
31
|
- **Repository:** https://github.com/ComposioHQ/agent-orchestrator
|
|
29
32
|
- **Tech stack:** TypeScript ESM, pnpm workspaces, Commander.js CLI, Next.js 15 + React 19 dashboard, Zod validation, Vitest + Playwright tests, tmux-based agent runtime
|
|
30
33
|
- **Key directories to study:**
|
|
@@ -43,6 +46,7 @@ The ComposioHQ Agent Orchestrator implementation serves as the reference for fea
|
|
|
43
46
|
### 0.3 Package Dependencies (Required Additions)
|
|
44
47
|
|
|
45
48
|
New dependencies to add to `apps/control-plane/package.json`:
|
|
49
|
+
|
|
46
50
|
```json
|
|
47
51
|
{
|
|
48
52
|
"dependencies": {
|
|
@@ -57,6 +61,7 @@ New dependencies to add to `apps/control-plane/package.json`:
|
|
|
57
61
|
```
|
|
58
62
|
|
|
59
63
|
New package for dashboard (`packages/web-dashboard/package.json`):
|
|
64
|
+
|
|
60
65
|
```json
|
|
61
66
|
{
|
|
62
67
|
"name": "@aop/web-dashboard",
|
|
@@ -87,21 +92,25 @@ This specification defines a roadmap to close identified functionality gaps betw
|
|
|
87
92
|
### 2.1 Priority Tiers
|
|
88
93
|
|
|
89
94
|
**P0 (Critical - Implement First):**
|
|
95
|
+
|
|
90
96
|
- Features that eliminate major UX friction
|
|
91
97
|
- Features that enable production deployment
|
|
92
98
|
- Features required for multi-project workflows
|
|
93
99
|
|
|
94
100
|
**P1 (High Value - Implement Soon):**
|
|
101
|
+
|
|
95
102
|
- Features that significantly improve observability
|
|
96
103
|
- Features that reduce manual configuration burden
|
|
97
104
|
- Features that enable common use cases
|
|
98
105
|
|
|
99
106
|
**P2 (Nice to Have - Future Consideration):**
|
|
107
|
+
|
|
100
108
|
- Features that improve edge cases
|
|
101
109
|
- Features with viable workarounds
|
|
102
110
|
- Features with unclear ROI
|
|
103
111
|
|
|
104
112
|
**P3 (Low Priority - Deferred):**
|
|
113
|
+
|
|
105
114
|
- Features that conflict with core architecture
|
|
106
115
|
- Features with marginal benefit
|
|
107
116
|
- Features that require major redesigns
|
|
@@ -121,6 +130,7 @@ This specification defines a roadmap to close identified functionality gaps betw
|
|
|
121
130
|
**AOP Design Alignment:** HIGH - Monitoring does not conflict with deterministic model.
|
|
122
131
|
|
|
123
132
|
**Reference Implementation (ComposioHQ):**
|
|
133
|
+
|
|
124
134
|
- SSE endpoint: `packages/web/src/app/api/events/route.ts`
|
|
125
135
|
- Dashboard components: `packages/web/src/components/Dashboard.tsx`, `SessionCard.tsx`, `SessionDetail.tsx`
|
|
126
136
|
- Hooks: `packages/web/src/hooks/` (real-time state management)
|
|
@@ -128,6 +138,7 @@ This specification defines a roadmap to close identified functionality gaps betw
|
|
|
128
138
|
**Specification:**
|
|
129
139
|
|
|
130
140
|
**Directory Structure:**
|
|
141
|
+
|
|
131
142
|
```
|
|
132
143
|
packages/web-dashboard/
|
|
133
144
|
├── package.json
|
|
@@ -173,9 +184,10 @@ packages/web-dashboard/
|
|
|
173
184
|
```
|
|
174
185
|
|
|
175
186
|
**SSE Implementation (Reference: ComposioHQ `packages/web/src/app/api/events/route.ts`):**
|
|
187
|
+
|
|
176
188
|
```typescript
|
|
177
189
|
// packages/web-dashboard/src/app/api/events/route.ts
|
|
178
|
-
export const dynamic =
|
|
190
|
+
export const dynamic = 'force-dynamic';
|
|
179
191
|
|
|
180
192
|
export async function GET(): Promise<Response> {
|
|
181
193
|
const encoder = new TextEncoder();
|
|
@@ -187,7 +199,7 @@ export async function GET(): Promise<Response> {
|
|
|
187
199
|
// Send initial snapshot
|
|
188
200
|
void (async () => {
|
|
189
201
|
const features = await readFeaturesIndex();
|
|
190
|
-
const event = { type:
|
|
202
|
+
const event = { type: 'snapshot', features };
|
|
191
203
|
controller.enqueue(encoder.encode(`data: ${JSON.stringify(event)}\n\n`));
|
|
192
204
|
})();
|
|
193
205
|
|
|
@@ -205,7 +217,7 @@ export async function GET(): Promise<Response> {
|
|
|
205
217
|
updates = setInterval(() => {
|
|
206
218
|
void (async () => {
|
|
207
219
|
const features = await readFeaturesIndex();
|
|
208
|
-
const event = { type:
|
|
220
|
+
const event = { type: 'snapshot', features };
|
|
209
221
|
controller.enqueue(encoder.encode(`data: ${JSON.stringify(event)}\n\n`));
|
|
210
222
|
})();
|
|
211
223
|
}, 2000);
|
|
@@ -218,16 +230,17 @@ export async function GET(): Promise<Response> {
|
|
|
218
230
|
|
|
219
231
|
return new Response(stream, {
|
|
220
232
|
headers: {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
Connection:
|
|
224
|
-
|
|
233
|
+
'Content-Type': 'text/event-stream',
|
|
234
|
+
'Cache-Control': 'no-cache',
|
|
235
|
+
Connection: 'keep-alive',
|
|
236
|
+
'X-Accel-Buffering': 'no',
|
|
225
237
|
},
|
|
226
238
|
});
|
|
227
239
|
}
|
|
228
240
|
```
|
|
229
241
|
|
|
230
242
|
**useSSE Hook Implementation:**
|
|
243
|
+
|
|
231
244
|
```typescript
|
|
232
245
|
// packages/web-dashboard/src/hooks/useSSE.ts
|
|
233
246
|
import { useState, useEffect, useCallback } from 'react';
|
|
@@ -248,12 +261,12 @@ export function useSSE({ url, onMessage, reconnectInterval = 5000 }: SSEOptions)
|
|
|
248
261
|
|
|
249
262
|
const connect = () => {
|
|
250
263
|
eventSource = new EventSource(url);
|
|
251
|
-
|
|
264
|
+
|
|
252
265
|
eventSource.onopen = () => {
|
|
253
266
|
setConnected(true);
|
|
254
267
|
setError(null);
|
|
255
268
|
};
|
|
256
|
-
|
|
269
|
+
|
|
257
270
|
eventSource.onmessage = (event) => {
|
|
258
271
|
try {
|
|
259
272
|
const data = JSON.parse(event.data);
|
|
@@ -262,7 +275,7 @@ export function useSSE({ url, onMessage, reconnectInterval = 5000 }: SSEOptions)
|
|
|
262
275
|
console.error('SSE parse error:', e);
|
|
263
276
|
}
|
|
264
277
|
};
|
|
265
|
-
|
|
278
|
+
|
|
266
279
|
eventSource.onerror = () => {
|
|
267
280
|
setConnected(false);
|
|
268
281
|
eventSource?.close();
|
|
@@ -283,6 +296,7 @@ export function useSSE({ url, onMessage, reconnectInterval = 5000 }: SSEOptions)
|
|
|
283
296
|
```
|
|
284
297
|
|
|
285
298
|
**CLI Integration:**
|
|
299
|
+
|
|
286
300
|
```typescript
|
|
287
301
|
// apps/control-plane/src/cli/dashboard-command-handler.ts
|
|
288
302
|
import { spawn } from 'node:child_process';
|
|
@@ -292,13 +306,13 @@ export class DashboardCommandHandler {
|
|
|
292
306
|
async execute(options: { port?: number; foreground?: boolean }): Promise<void> {
|
|
293
307
|
const port = options.port ?? 3000;
|
|
294
308
|
const dashboardPath = resolve(__dirname, '../../../../packages/web-dashboard');
|
|
295
|
-
|
|
309
|
+
|
|
296
310
|
const env = {
|
|
297
311
|
...process.env,
|
|
298
312
|
PORT: String(port),
|
|
299
313
|
AOP_ROOT: process.cwd(),
|
|
300
314
|
};
|
|
301
|
-
|
|
315
|
+
|
|
302
316
|
if (options.foreground) {
|
|
303
317
|
// Run in foreground
|
|
304
318
|
const child = spawn('npm', ['run', 'dev'], {
|
|
@@ -323,6 +337,7 @@ export class DashboardCommandHandler {
|
|
|
323
337
|
```
|
|
324
338
|
|
|
325
339
|
**Testing Requirements (per `prompts/vitest-testing-standards.instructions.md`):**
|
|
340
|
+
|
|
326
341
|
```typescript
|
|
327
342
|
// packages/web-dashboard/src/__tests__/api-status.test.ts
|
|
328
343
|
import { describe, it, expect, vi, beforeEach } from 'vitest';
|
|
@@ -336,16 +351,18 @@ describe('GET /api/status', () => {
|
|
|
336
351
|
it('GIVEN_valid_aop_directory_WHEN_status_requested_THEN_returns_features_list', async () => {
|
|
337
352
|
// Mock file reading
|
|
338
353
|
vi.mock('node:fs/promises', () => ({
|
|
339
|
-
readFile: vi.fn().mockResolvedValue(
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
354
|
+
readFile: vi.fn().mockResolvedValue(
|
|
355
|
+
JSON.stringify({
|
|
356
|
+
active: ['feature_a'],
|
|
357
|
+
blocked: [],
|
|
358
|
+
merged: ['feature_b'],
|
|
359
|
+
}),
|
|
360
|
+
),
|
|
344
361
|
}));
|
|
345
|
-
|
|
362
|
+
|
|
346
363
|
const response = await GET();
|
|
347
364
|
const data = await response.json();
|
|
348
|
-
|
|
365
|
+
|
|
349
366
|
expect(response.status).toBe(200);
|
|
350
367
|
expect(data.active).toContain('feature_a');
|
|
351
368
|
});
|
|
@@ -354,10 +371,10 @@ describe('GET /api/status', () => {
|
|
|
354
371
|
vi.mock('node:fs/promises', () => ({
|
|
355
372
|
readFile: vi.fn().mockRejectedValue(new Error('ENOENT')),
|
|
356
373
|
}));
|
|
357
|
-
|
|
374
|
+
|
|
358
375
|
const response = await GET();
|
|
359
376
|
const data = await response.json();
|
|
360
|
-
|
|
377
|
+
|
|
361
378
|
expect(response.status).toBe(200);
|
|
362
379
|
expect(data.active).toEqual([]);
|
|
363
380
|
});
|
|
@@ -365,6 +382,7 @@ describe('GET /api/status', () => {
|
|
|
365
382
|
```
|
|
366
383
|
|
|
367
384
|
**Dashboard Routes:**
|
|
385
|
+
|
|
368
386
|
- `GET /` — Dashboard UI
|
|
369
387
|
- `GET /api/status` — Global status snapshot (same as `aop status` JSON)
|
|
370
388
|
- `GET /api/events` — SSE stream
|
|
@@ -396,11 +414,12 @@ The dashboard serves as the primary human review interface. When a feature reach
|
|
|
396
414
|
// POST /api/features/:id/review
|
|
397
415
|
interface ReviewRequest {
|
|
398
416
|
decision: 'approve' | 'deny' | 'request_changes';
|
|
399
|
-
approval_token?: string;
|
|
400
|
-
reason?: string;
|
|
401
|
-
message?: string;
|
|
417
|
+
approval_token?: string; // required for approve
|
|
418
|
+
reason?: string; // required for deny
|
|
419
|
+
message?: string; // required for request_changes
|
|
402
420
|
}
|
|
403
421
|
```
|
|
422
|
+
|
|
404
423
|
- `approve` → calls `ToolClient.call('feature.ready_to_merge', { feature_id, approval_token })`
|
|
405
424
|
- `deny` → calls `ToolClient.call('feature.state_patch', { feature_id, patch: { status: 'blocked' } })` + `ToolClient.call('feature.log_append', { feature_id, entry: reason })`
|
|
406
425
|
- `request_changes` → calls `ToolClient.call('feature.log_append', { feature_id, entry: message })` + triggers `changes_requested` reaction to inject feedback into agent
|
|
@@ -417,20 +436,21 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
417
436
|
- On confirm, calls `POST /api/features/:id/checkout`
|
|
418
437
|
|
|
419
438
|
3. **API Implementation:**
|
|
439
|
+
|
|
420
440
|
```typescript
|
|
421
441
|
// POST /api/features/:id/checkout
|
|
422
442
|
interface CheckoutRequest {
|
|
423
|
-
stash_changes?: boolean;
|
|
424
|
-
restore_after?: boolean;
|
|
443
|
+
stash_changes?: boolean; // default: true — auto-stash uncommitted work
|
|
444
|
+
restore_after?: boolean; // default: false — if true, remember original branch for later restore
|
|
425
445
|
}
|
|
426
446
|
|
|
427
447
|
interface CheckoutResponse {
|
|
428
448
|
ok: boolean;
|
|
429
449
|
data?: {
|
|
430
|
-
branch: string;
|
|
450
|
+
branch: string; // the branch checked out
|
|
431
451
|
previous_branch: string; // the branch before checkout (for restore)
|
|
432
|
-
stashed: boolean;
|
|
433
|
-
stash_ref?: string;
|
|
452
|
+
stashed: boolean; // whether changes were stashed
|
|
453
|
+
stash_ref?: string; // stash reference if stashed
|
|
434
454
|
};
|
|
435
455
|
error?: { code: string; message: string };
|
|
436
456
|
}
|
|
@@ -455,11 +475,13 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
455
475
|
- Only one checkout active at a time (tracked in `.aop/runtime/checkout-restore.json`)
|
|
456
476
|
|
|
457
477
|
**Launch Integration:**
|
|
478
|
+
|
|
458
479
|
- New CLI command: `aop dashboard [--port 3000] [--foreground]`
|
|
459
480
|
- Starts dashboard server in background or foreground
|
|
460
481
|
- Dashboard reads config from `agentic/orchestrator/policy.yaml` for port, auth settings
|
|
461
482
|
|
|
462
483
|
**Acceptance Criteria:**
|
|
484
|
+
|
|
463
485
|
- [ ] Dashboard displays all active/blocked/merged features with live updates
|
|
464
486
|
- [ ] Clicking feature shows state, plan, diff, evidence
|
|
465
487
|
- [ ] SSE updates within 2s of state file changes
|
|
@@ -487,9 +509,11 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
487
509
|
**Specification:**
|
|
488
510
|
|
|
489
511
|
**Architecture:**
|
|
512
|
+
|
|
490
513
|
1. **Notifier Service** (`apps/control-plane/src/application/services/notifier-service.ts`)
|
|
491
514
|
- Abstract `NotifierChannel` interface (desktop, slack, webhook, email)
|
|
492
515
|
- Config in `agentic/orchestrator/policy.yaml`:
|
|
516
|
+
|
|
493
517
|
```yaml
|
|
494
518
|
notifications:
|
|
495
519
|
enabled: true
|
|
@@ -499,17 +523,17 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
499
523
|
slack:
|
|
500
524
|
enabled: true
|
|
501
525
|
webhook: ${SLACK_WEBHOOK_URL}
|
|
502
|
-
channel:
|
|
526
|
+
channel: '#aop-alerts'
|
|
503
527
|
webhook:
|
|
504
528
|
enabled: false
|
|
505
529
|
url: ${CUSTOM_WEBHOOK_URL}
|
|
506
530
|
method: POST
|
|
507
531
|
headers:
|
|
508
|
-
Authorization:
|
|
532
|
+
Authorization: 'Bearer ${WEBHOOK_TOKEN}'
|
|
509
533
|
routing:
|
|
510
|
-
critical: [desktop, slack]
|
|
511
|
-
warning: [slack]
|
|
512
|
-
info: [slack]
|
|
534
|
+
critical: [desktop, slack] # Gate failures, collisions
|
|
535
|
+
warning: [slack] # Stale leases, retry exhaustion
|
|
536
|
+
info: [slack] # Feature merged, gates passed
|
|
513
537
|
```
|
|
514
538
|
|
|
515
539
|
2. **Notification Events:**
|
|
@@ -532,6 +556,7 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
532
556
|
- Failures logged but do not block orchestration
|
|
533
557
|
|
|
534
558
|
**Acceptance Criteria:**
|
|
559
|
+
|
|
535
560
|
- [ ] Desktop notification on gate failure with feature ID + error summary
|
|
536
561
|
- [ ] Slack notification includes clickable link to dashboard (if running)
|
|
537
562
|
- [ ] Webhook payload includes full event context (feature_id, status, evidence summary)
|
|
@@ -553,6 +578,7 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
553
578
|
**Specification:**
|
|
554
579
|
|
|
555
580
|
**Wizard Flow:**
|
|
581
|
+
|
|
556
582
|
1. **Detect repository context:**
|
|
557
583
|
- Check for `.git/` in current directory
|
|
558
584
|
- Parse git remote URL → derive repo owner/name
|
|
@@ -580,9 +606,10 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
580
606
|
|
|
581
607
|
5. **Post-init instructions:**
|
|
582
608
|
- Print next steps:
|
|
609
|
+
|
|
583
610
|
```
|
|
584
611
|
✅ Configuration created successfully!
|
|
585
|
-
|
|
612
|
+
|
|
586
613
|
Next steps:
|
|
587
614
|
1. Review config files in agentic/orchestrator/
|
|
588
615
|
2. Add feature specs to .aop/features/<feature_id>/spec.md
|
|
@@ -591,6 +618,7 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
591
618
|
```
|
|
592
619
|
|
|
593
620
|
**Acceptance Criteria:**
|
|
621
|
+
|
|
594
622
|
- [ ] Wizard detects git repo and parses remote URL
|
|
595
623
|
- [ ] Generated config files pass schema validation
|
|
596
624
|
- [ ] Wizard handles non-git directories gracefully (prompts for manual values)
|
|
@@ -612,9 +640,10 @@ The dashboard provides a one-click checkout so the reviewer can spin up a local
|
|
|
612
640
|
**Specification:**
|
|
613
641
|
|
|
614
642
|
**Config Schema Extension:**
|
|
643
|
+
|
|
615
644
|
```yaml
|
|
616
645
|
# agentic/orchestrator/multi-project.yaml (new file)
|
|
617
|
-
version:
|
|
646
|
+
version: '1.0'
|
|
618
647
|
|
|
619
648
|
defaults:
|
|
620
649
|
max_active_features: 5
|
|
@@ -625,17 +654,17 @@ defaults:
|
|
|
625
654
|
channels: [desktop, slack]
|
|
626
655
|
|
|
627
656
|
projects:
|
|
628
|
-
- name:
|
|
657
|
+
- name: 'backend'
|
|
629
658
|
path: ~/repos/backend
|
|
630
|
-
repo:
|
|
659
|
+
repo: 'myorg/backend'
|
|
631
660
|
branch: main
|
|
632
|
-
policy: agentic/orchestrator/policy.yaml
|
|
661
|
+
policy: agentic/orchestrator/policy.yaml # per-project override
|
|
633
662
|
gates: agentic/orchestrator/gates-backend.yaml
|
|
634
|
-
dashboard_port: 3001
|
|
635
|
-
|
|
636
|
-
- name:
|
|
663
|
+
dashboard_port: 3001 # override default
|
|
664
|
+
|
|
665
|
+
- name: 'frontend'
|
|
637
666
|
path: ~/repos/frontend
|
|
638
|
-
repo:
|
|
667
|
+
repo: 'myorg/frontend'
|
|
639
668
|
branch: main
|
|
640
669
|
policy: agentic/orchestrator/policy.yaml
|
|
641
670
|
gates: agentic/orchestrator/gates-frontend.yaml
|
|
@@ -643,6 +672,7 @@ projects:
|
|
|
643
672
|
```
|
|
644
673
|
|
|
645
674
|
**Implementation:**
|
|
675
|
+
|
|
646
676
|
1. **Multi-Project Loader** (`src/application/multi-project-loader.ts`)
|
|
647
677
|
- Parses `multi-project.yaml` (optional; single-project mode remains default)
|
|
648
678
|
- Validates each project config against schema
|
|
@@ -665,6 +695,7 @@ projects:
|
|
|
665
695
|
- Global view showing status across all projects
|
|
666
696
|
|
|
667
697
|
**Acceptance Criteria:**
|
|
698
|
+
|
|
668
699
|
- [ ] Multi-project config validated against schema
|
|
669
700
|
- [ ] Can run orchestrator for specific project via `--project` flag
|
|
670
701
|
- [ ] Run leases isolated per project (parallel orchestration safe)
|
|
@@ -688,40 +719,43 @@ projects:
|
|
|
688
719
|
**Specification:**
|
|
689
720
|
|
|
690
721
|
**Reaction Policy Config:**
|
|
722
|
+
|
|
691
723
|
```yaml
|
|
692
724
|
# agentic/orchestrator/policy.yaml
|
|
693
725
|
reactions:
|
|
694
726
|
gate_failed:
|
|
695
727
|
enabled: true
|
|
696
728
|
max_retries: 2
|
|
697
|
-
action: retry_with_agent_repair
|
|
698
|
-
escalate_after: 2
|
|
729
|
+
action: retry_with_agent_repair # or 'notify_only'
|
|
730
|
+
escalate_after: 2 # escalate to human after N failures
|
|
699
731
|
retry_delay: 30s
|
|
700
|
-
|
|
732
|
+
|
|
701
733
|
collision_detected:
|
|
702
734
|
enabled: true
|
|
703
|
-
action: notify_only
|
|
704
|
-
|
|
735
|
+
action: notify_only # no auto-resolution
|
|
736
|
+
|
|
705
737
|
ready_to_merge:
|
|
706
738
|
enabled: true
|
|
707
|
-
action: notify_only
|
|
739
|
+
action: notify_only # never auto-merge
|
|
708
740
|
```
|
|
709
741
|
|
|
710
742
|
**Retry Flow:**
|
|
743
|
+
|
|
711
744
|
1. **Gate failure detected** (QA wave or build wave)
|
|
712
745
|
2. **Check reaction policy:** If `reactions.gate_failed.enabled` and retry count < max_retries
|
|
713
746
|
3. **Agent repair loop:**
|
|
714
747
|
- Load gate failure evidence + logs
|
|
715
748
|
- Inject repair prompt to builder/QA agent:
|
|
749
|
+
|
|
716
750
|
```
|
|
717
751
|
Gate execution failed. Review the error logs below and apply fixes.
|
|
718
|
-
|
|
752
|
+
|
|
719
753
|
Gate: {gate_name}
|
|
720
754
|
Exit Code: {exit_code}
|
|
721
|
-
|
|
755
|
+
|
|
722
756
|
Logs:
|
|
723
757
|
{logs}
|
|
724
|
-
|
|
758
|
+
|
|
725
759
|
Evidence:
|
|
726
760
|
{evidence_summary}
|
|
727
761
|
```
|
|
@@ -731,11 +765,13 @@ reactions:
|
|
|
731
765
|
7. **Failure:** Increment retry count, repeat or escalate
|
|
732
766
|
|
|
733
767
|
**Escalation:**
|
|
768
|
+
|
|
734
769
|
- After `escalate_after` failures → notification to all critical channels
|
|
735
770
|
- Feature remains in current phase (does not auto-advance)
|
|
736
771
|
- User can manually intervene via dashboard or `aop send <feature_id> <instruction>`
|
|
737
772
|
|
|
738
773
|
**Acceptance Criteria:**
|
|
774
|
+
|
|
739
775
|
- [ ] Gate failure triggers retry if policy enabled
|
|
740
776
|
- [ ] Retry count tracked in feature state (`gate_retry_count`)
|
|
741
777
|
- [ ] Agent receives failure context in prompt
|
|
@@ -770,7 +806,9 @@ reactions:
|
|
|
770
806
|
- Exit with `Ctrl-D` or type `/exit`
|
|
771
807
|
|
|
772
808
|
**Implementation:**
|
|
809
|
+
|
|
773
810
|
1. **Provider Interface Extension:**
|
|
811
|
+
|
|
774
812
|
```typescript
|
|
775
813
|
interface WorkerProvider {
|
|
776
814
|
sendMessage(sessionId: string, message: string): Promise<void>;
|
|
@@ -791,6 +829,7 @@ reactions:
|
|
|
791
829
|
- Terminal streams stdin/stdout until exit
|
|
792
830
|
|
|
793
831
|
**Acceptance Criteria:**
|
|
832
|
+
|
|
794
833
|
- [ ] `aop send` delivers message to active orchestrator session
|
|
795
834
|
- [ ] `aop attach` launches interactive session for supported providers
|
|
796
835
|
- [ ] Error handling: feature not found, session not active, provider unsupported
|
|
@@ -830,12 +869,13 @@ reactions:
|
|
|
830
869
|
reactions:
|
|
831
870
|
agent_stuck:
|
|
832
871
|
enabled: true
|
|
833
|
-
action: notify_and_restart
|
|
872
|
+
action: notify_and_restart # or: notify_only
|
|
834
873
|
idle_threshold: 300s
|
|
835
874
|
escalate_after: 2
|
|
836
875
|
```
|
|
837
876
|
|
|
838
877
|
**Acceptance Criteria:**
|
|
878
|
+
|
|
839
879
|
- [ ] Activity state detected for at least Claude Code and generic providers
|
|
840
880
|
- [ ] `aop status` displays activity state per feature
|
|
841
881
|
- [ ] Agent stuck beyond threshold triggers notification
|
|
@@ -869,6 +909,7 @@ reactions:
|
|
|
869
909
|
- Configurable in policy: `cleanup.auto_after_merge: true`, `cleanup.grace_period: 3600s`
|
|
870
910
|
|
|
871
911
|
**Acceptance Criteria:**
|
|
912
|
+
|
|
872
913
|
- [ ] `aop cleanup --dry-run` lists features eligible for cleanup
|
|
873
914
|
- [ ] `aop cleanup --yes` removes terminal features + orphan worktrees
|
|
874
915
|
- [ ] Auto-cleanup triggers after merge when enabled
|
|
@@ -899,6 +940,7 @@ reactions:
|
|
|
899
940
|
- `aop status --summary` — One-line-per-feature compact view
|
|
900
941
|
|
|
901
942
|
**Acceptance Criteria:**
|
|
943
|
+
|
|
902
944
|
- [ ] Batch run deduplicates against existing features
|
|
903
945
|
- [ ] Failed spawns don't block remaining features
|
|
904
946
|
- [ ] Summary output reports counts
|
|
@@ -918,13 +960,14 @@ reactions:
|
|
|
918
960
|
**Specification:**
|
|
919
961
|
|
|
920
962
|
1. **Policy Extension:**
|
|
963
|
+
|
|
921
964
|
```yaml
|
|
922
965
|
# agentic/orchestrator/policy.yaml
|
|
923
966
|
worktree:
|
|
924
967
|
base_branch: main
|
|
925
968
|
post_create:
|
|
926
|
-
-
|
|
927
|
-
-
|
|
969
|
+
- 'npm ci'
|
|
970
|
+
- 'cp .env.example .env'
|
|
928
971
|
symlinks:
|
|
929
972
|
- .env
|
|
930
973
|
- .claude
|
|
@@ -937,6 +980,7 @@ reactions:
|
|
|
937
980
|
- Schema extension in `policy.schema.json`
|
|
938
981
|
|
|
939
982
|
**Acceptance Criteria:**
|
|
983
|
+
|
|
940
984
|
- [ ] `post_create` commands execute in new worktree directory
|
|
941
985
|
- [ ] Symlinks created before post_create commands run
|
|
942
986
|
- [ ] Command failures logged but don't block initialization
|
|
@@ -969,12 +1013,13 @@ reactions:
|
|
|
969
1013
|
- PR info stored in feature state: `pr_number`, `pr_url`, `ci_status`, `review_decision`
|
|
970
1014
|
|
|
971
1015
|
2. **Feature State Extension:**
|
|
1016
|
+
|
|
972
1017
|
```yaml
|
|
973
1018
|
pr:
|
|
974
1019
|
number: 42
|
|
975
|
-
url:
|
|
976
|
-
ci_status: passing
|
|
977
|
-
review_decision: approved
|
|
1020
|
+
url: 'https://github.com/org/repo/pull/42'
|
|
1021
|
+
ci_status: passing # passing | failing | pending | none
|
|
1022
|
+
review_decision: approved # approved | changes_requested | pending | none
|
|
978
1023
|
merge_ready: true
|
|
979
1024
|
```
|
|
980
1025
|
|
|
@@ -988,7 +1033,7 @@ reactions:
|
|
|
988
1033
|
reactions:
|
|
989
1034
|
ci_failed_upstream:
|
|
990
1035
|
enabled: true
|
|
991
|
-
action: notify_only
|
|
1036
|
+
action: notify_only # or: retry_with_agent_repair
|
|
992
1037
|
changes_requested:
|
|
993
1038
|
enabled: true
|
|
994
1039
|
action: send_review_context_to_agent
|
|
@@ -996,6 +1041,7 @@ reactions:
|
|
|
996
1041
|
```
|
|
997
1042
|
|
|
998
1043
|
**Acceptance Criteria:**
|
|
1044
|
+
|
|
999
1045
|
- [ ] PR detected automatically after feature creates a branch with open PR
|
|
1000
1046
|
- [ ] CI status and review decisions reflected in feature state
|
|
1001
1047
|
- [ ] Dashboard shows PR info with merge score
|
|
@@ -1044,6 +1090,7 @@ reactions:
|
|
|
1044
1090
|
**Specification:**
|
|
1045
1091
|
|
|
1046
1092
|
**Tracker Abstraction:**
|
|
1093
|
+
|
|
1047
1094
|
```typescript
|
|
1048
1095
|
interface IssueTracker {
|
|
1049
1096
|
getIssue(issueId: string): Promise<Issue>;
|
|
@@ -1053,16 +1100,18 @@ interface IssueTracker {
|
|
|
1053
1100
|
```
|
|
1054
1101
|
|
|
1055
1102
|
**Config Extension:**
|
|
1103
|
+
|
|
1056
1104
|
```yaml
|
|
1057
1105
|
# agentic/orchestrator/policy.yaml
|
|
1058
1106
|
issue_tracker:
|
|
1059
|
-
type: github
|
|
1107
|
+
type: github # or linear, jira
|
|
1060
1108
|
config:
|
|
1061
1109
|
token: ${GITHUB_TOKEN}
|
|
1062
1110
|
repo: myorg/myrepo
|
|
1063
1111
|
```
|
|
1064
1112
|
|
|
1065
1113
|
**Integration Points:**
|
|
1114
|
+
|
|
1066
1115
|
1. **Spec enrichment:** Fetch issue details, inject into planner context
|
|
1067
1116
|
2. **Status sync:** Update issue status when feature advances (planning → building → merged)
|
|
1068
1117
|
3. **Comment posting:** Post gate results, evidence links as issue comments
|
|
@@ -1096,6 +1145,7 @@ issue_tracker:
|
|
|
1096
1145
|
**Specification:**
|
|
1097
1146
|
|
|
1098
1147
|
**Instance Isolation Strategy:**
|
|
1148
|
+
|
|
1099
1149
|
1. Derive instance ID from config path hash (SHA256)
|
|
1100
1150
|
2. Namespace run lease file: `.aop/runtime/<instance_id>/run-lease.json`
|
|
1101
1151
|
3. Each instance has independent dashboard port, worktree paths
|
|
@@ -1124,6 +1174,7 @@ issue_tracker:
|
|
|
1124
1174
|
#### G13-G18: Deferred Gaps
|
|
1125
1175
|
|
|
1126
1176
|
**Deferred due to low ROI or architectural misalignment:**
|
|
1177
|
+
|
|
1127
1178
|
- **G13: Plugin System** - Conflicts with deterministic kernel design; provider abstraction sufficient
|
|
1128
1179
|
- **G14: Alternative Workspace Modes** - Worktrees optimal; clone/copy add complexity
|
|
1129
1180
|
- **G15: K8s/SSH Runtimes** - MCP transport abstraction sufficient
|
|
@@ -1142,6 +1193,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1142
1193
|
**Problem:** Both AOP and Composio run full test suites on every gate pass. For large codebases, this wastes minutes re-running unaffected tests.
|
|
1143
1194
|
|
|
1144
1195
|
**Specification:**
|
|
1196
|
+
|
|
1145
1197
|
- After `repo.apply_patch`, compute affected file set from diff
|
|
1146
1198
|
- Use test dependency graph (vitest `--changed`, jest `--changedSince`, pytest `--lf`) to select affected tests
|
|
1147
1199
|
- Gate config extension:
|
|
@@ -1152,10 +1204,10 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1152
1204
|
modes:
|
|
1153
1205
|
fast:
|
|
1154
1206
|
commands:
|
|
1155
|
-
-
|
|
1207
|
+
- 'npx vitest run --changed {base_branch}' # incremental
|
|
1156
1208
|
full:
|
|
1157
1209
|
commands:
|
|
1158
|
-
-
|
|
1210
|
+
- 'npx vitest run' # full suite
|
|
1159
1211
|
```
|
|
1160
1212
|
- `fast` mode uses incremental; `full` and `merge` modes run complete suite
|
|
1161
1213
|
- Evidence captures which tests were skipped and why
|
|
@@ -1171,6 +1223,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1171
1223
|
**Problem:** Gates run sequentially. Independent gates (lint, type-check, unit tests) could run concurrently.
|
|
1172
1224
|
|
|
1173
1225
|
**Specification:**
|
|
1226
|
+
|
|
1174
1227
|
- Gate config supports `parallel: true` flag per command group
|
|
1175
1228
|
- Commands within a parallel group execute concurrently via `Promise.allSettled`
|
|
1176
1229
|
- Evidence captured per-command; overall gate fails if any parallel command fails
|
|
@@ -1185,13 +1238,14 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1185
1238
|
**Problem:** Neither system tracks or limits LLM API costs per feature. Runaway agent loops can burn tokens.
|
|
1186
1239
|
|
|
1187
1240
|
**Specification:**
|
|
1241
|
+
|
|
1188
1242
|
- Track token usage per feature via operation ledger metadata
|
|
1189
1243
|
- Budget config:
|
|
1190
1244
|
```yaml
|
|
1191
1245
|
budget:
|
|
1192
|
-
per_feature_limit: 50.00
|
|
1246
|
+
per_feature_limit: 50.00 # USD
|
|
1193
1247
|
per_phase_limit: 20.00
|
|
1194
|
-
alert_threshold: 0.8
|
|
1248
|
+
alert_threshold: 0.8 # notify at 80% of budget
|
|
1195
1249
|
```
|
|
1196
1250
|
- Supervisor checks budget before each worker decision loop iteration
|
|
1197
1251
|
- Over-budget triggers notification + feature pause (not kill)
|
|
@@ -1206,6 +1260,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1206
1260
|
**Problem:** Neither system supports declaring that Feature B depends on Feature A. AOP's collision detection is file-path based, not semantic.
|
|
1207
1261
|
|
|
1208
1262
|
**Specification:**
|
|
1263
|
+
|
|
1209
1264
|
- Spec metadata supports `depends_on: [feature_a]`
|
|
1210
1265
|
- Scheduler defers dependent features to blocked queue until dependencies reach `merged` status
|
|
1211
1266
|
- Automatic promotion when dependency chain resolves
|
|
@@ -1220,6 +1275,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1220
1275
|
**Problem:** Neither system tracks which provider/model combinations succeed more often at which task types.
|
|
1221
1276
|
|
|
1222
1277
|
**Specification:**
|
|
1278
|
+
|
|
1223
1279
|
- Record per-feature outcome metrics: gate pass rate, retry count, time-to-merge, cost
|
|
1224
1280
|
- Aggregate by provider + model over time
|
|
1225
1281
|
- Optional: feed analytics into provider selection heuristics
|
|
@@ -1232,28 +1288,33 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1232
1288
|
|
|
1233
1289
|
**Problem:** AOP currently defines extension interfaces ad-hoc per feature (G2 introduces `NotifierChannel`, G6 extends `WorkerProvider`, G9 defines `IssueTracker`, G6a adds `ActivityMonitor`, G6e adds `PrMonitor`). Each is a standalone interface with its own discovery, configuration, and error handling. This leads to duplicated patterns, inconsistent adapter lifecycle, and a codebase that gets harder to extend with every new concern axis. Meanwhile the existing `ProviderSelection` in `providers.ts` uses a hardcoded union type (`'codex' | 'claude' | ... | 'copilot'`) — adding a new provider means editing the union, the resolution logic, and every switch that touches it.
|
|
1234
1290
|
|
|
1235
|
-
**Relationship to Plugin Systems:** This is
|
|
1291
|
+
**Relationship to Plugin Systems:** This is _not_ a plugin system. Plugins imply runtime discovery, dynamic loading, and third-party code running inside the process boundary — all of which undermine AOP's deterministic guarantees. An adapter registry is a **compile-time contract** with **config-driven selection**: the kernel knows every adapter that exists at build time, validates adapter configuration against schemas, and routes through the same deterministic pipeline (RBAC, validation, audit) as everything else. Adapters don't own state — the kernel does. Adapters don't make decisions — the kernel does. Adapters just answer "how do I talk to Slack" or "how do I parse Claude Code's session files."
|
|
1236
1292
|
|
|
1237
1293
|
**Specification:**
|
|
1238
1294
|
|
|
1239
1295
|
1. **Core Abstraction** (`apps/control-plane/src/application/adapters/adapter-registry.ts`):
|
|
1296
|
+
|
|
1240
1297
|
```typescript
|
|
1241
1298
|
/** A typed slot that adapters can fill. */
|
|
1242
1299
|
interface AdapterSlot<TContract> {
|
|
1243
|
-
readonly name: string;
|
|
1244
|
-
readonly contract: TContract;
|
|
1300
|
+
readonly name: string; // e.g. 'notification-channel', 'agent-provider'
|
|
1301
|
+
readonly contract: TContract; // the interface adapters must implement
|
|
1245
1302
|
}
|
|
1246
1303
|
|
|
1247
1304
|
/** Metadata every adapter must declare. */
|
|
1248
1305
|
interface AdapterManifest {
|
|
1249
|
-
readonly slot: string;
|
|
1250
|
-
readonly name: string;
|
|
1251
|
-
readonly configSchema?: JsonSchema;
|
|
1306
|
+
readonly slot: string; // which slot this fills
|
|
1307
|
+
readonly name: string; // unique adapter name within slot (e.g. 'slack', 'claude')
|
|
1308
|
+
readonly configSchema?: JsonSchema; // AJV schema for adapter-specific config
|
|
1252
1309
|
}
|
|
1253
1310
|
|
|
1254
1311
|
/** The registry: slot → (name → adapter instance). */
|
|
1255
1312
|
interface AdapterRegistry {
|
|
1256
|
-
register<T>(
|
|
1313
|
+
register<T>(
|
|
1314
|
+
slot: AdapterSlot<T>,
|
|
1315
|
+
manifest: AdapterManifest,
|
|
1316
|
+
factory: (config: unknown) => T,
|
|
1317
|
+
): void;
|
|
1257
1318
|
resolve<T>(slot: AdapterSlot<T>, name: string, config: unknown): T;
|
|
1258
1319
|
list(slot: string): ReadonlyArray<AdapterManifest>;
|
|
1259
1320
|
has(slot: string, name: string): boolean;
|
|
@@ -1262,13 +1323,13 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1262
1323
|
|
|
1263
1324
|
2. **Adapter Slots** (formalized concern axes):
|
|
1264
1325
|
|
|
1265
|
-
| Slot
|
|
1266
|
-
|
|
1267
|
-
| `agent-provider`
|
|
1268
|
-
| `notification-channel` | `NotifierChannel`
|
|
1269
|
-
| `scm-provider`
|
|
1270
|
-
| `issue-tracker`
|
|
1271
|
-
| `activity-detector`
|
|
1326
|
+
| Slot | Contract Interface | Built-in Adapters | Used By |
|
|
1327
|
+
| ---------------------- | ------------------ | ------------------------------------------------ | ---------------------------------- |
|
|
1328
|
+
| `agent-provider` | `WorkerProvider` | codex, claude, gemini, kiro-cli, copilot, custom | Supervisor runtime, G6 send/attach |
|
|
1329
|
+
| `notification-channel` | `NotifierChannel` | desktop, slack, webhook | G2 NotifierService |
|
|
1330
|
+
| `scm-provider` | `ScmProvider` | github (via `gh` CLI) | G6e PR lifecycle |
|
|
1331
|
+
| `issue-tracker` | `IssueTracker` | github, linear, jira | G9 tracker support |
|
|
1332
|
+
| `activity-detector` | `ActivityDetector` | claude-jsonl, codex-rpc, process-heuristic | G6a activity monitoring |
|
|
1272
1333
|
|
|
1273
1334
|
3. **Registration & Resolution:**
|
|
1274
1335
|
- All built-in adapters are registered at kernel boot time in a deterministic order
|
|
@@ -1278,17 +1339,18 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1278
1339
|
- No dynamic imports, no runtime discovery, no third-party code — every adapter is a known import at build time
|
|
1279
1340
|
|
|
1280
1341
|
4. **Config Integration:**
|
|
1342
|
+
|
|
1281
1343
|
```yaml
|
|
1282
1344
|
# agentic/orchestrator/policy.yaml
|
|
1283
1345
|
adapters:
|
|
1284
|
-
notification-channel: slack
|
|
1285
|
-
scm-provider: github
|
|
1286
|
-
issue-tracker: github
|
|
1287
|
-
activity-detector: claude-jsonl
|
|
1346
|
+
notification-channel: slack # selects the 'slack' adapter for this slot
|
|
1347
|
+
scm-provider: github # selects 'github' for SCM
|
|
1348
|
+
issue-tracker: github # selects 'github' for issue tracking
|
|
1349
|
+
activity-detector: claude-jsonl # selects Claude Code JSONL parser
|
|
1288
1350
|
|
|
1289
1351
|
# agentic/orchestrator/agents.yaml (existing, unchanged)
|
|
1290
1352
|
runtime:
|
|
1291
|
-
default_provider: claude
|
|
1353
|
+
default_provider: claude # selects 'claude' for agent-provider slot
|
|
1292
1354
|
```
|
|
1293
1355
|
|
|
1294
1356
|
5. **Schema Validation:**
|
|
@@ -1309,6 +1371,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1309
1371
|
- The kernel retains full authority over state, validation, RBAC, and audit. Adapters are leaf-node implementations behind the kernel's deterministic pipeline.
|
|
1310
1372
|
|
|
1311
1373
|
**Acceptance Criteria:**
|
|
1374
|
+
|
|
1312
1375
|
- [ ] `AdapterRegistry` supports register/resolve/list/has operations with type safety
|
|
1313
1376
|
- [ ] `agent-provider` slot migrated from hardcoded union to registry (no config changes required)
|
|
1314
1377
|
- [ ] Adapter config validated against adapter-declared `configSchema` at boot
|
|
@@ -1323,9 +1386,11 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1323
1386
|
## 4. Implementation Roadmap
|
|
1324
1387
|
|
|
1325
1388
|
### Phase 1: Critical UX Improvements (M29)
|
|
1389
|
+
|
|
1326
1390
|
**Duration:** 5-6 weeks
|
|
1327
1391
|
|
|
1328
1392
|
**Deliverables:**
|
|
1393
|
+
|
|
1329
1394
|
1. **G1: Web Dashboard** (2 weeks)
|
|
1330
1395
|
- Next.js dashboard with SSE updates
|
|
1331
1396
|
- Feature cards, diff viewer, evidence viewer
|
|
@@ -1367,6 +1432,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1367
1432
|
- No config changes required — existing `agents.yaml` `default_provider` resolves through registry
|
|
1368
1433
|
|
|
1369
1434
|
**Milestone Acceptance:**
|
|
1435
|
+
|
|
1370
1436
|
- [ ] Dashboard displays live feature status with SSE updates + Kanban view
|
|
1371
1437
|
- [ ] Dashboard review panel: approve/deny/request-changes with merge control
|
|
1372
1438
|
- [ ] Dashboard checkout: one-click switch to feature branch for local testing with stash/restore
|
|
@@ -1381,9 +1447,11 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1381
1447
|
---
|
|
1382
1448
|
|
|
1383
1449
|
### Phase 2: Autonomous Operations & Observability (M30)
|
|
1450
|
+
|
|
1384
1451
|
**Duration:** 4-5 weeks
|
|
1385
1452
|
|
|
1386
1453
|
**Deliverables:**
|
|
1454
|
+
|
|
1387
1455
|
1. **G5: CI Failure Auto-Remediation** (2 weeks)
|
|
1388
1456
|
- Reaction policy config
|
|
1389
1457
|
- Retry loop with agent repair
|
|
@@ -1413,6 +1481,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1413
1481
|
- Fast mode uses incremental, full/merge modes run complete suite
|
|
1414
1482
|
|
|
1415
1483
|
**Milestone Acceptance:**
|
|
1484
|
+
|
|
1416
1485
|
- [ ] Gate failures trigger automatic retry with agent repair + time-based escalation
|
|
1417
1486
|
- [ ] Agent activity state visible in `aop status` and dashboard
|
|
1418
1487
|
- [ ] `aop send` delivers messages to active agents with idle-wait
|
|
@@ -1422,9 +1491,11 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1422
1491
|
---
|
|
1423
1492
|
|
|
1424
1493
|
### Phase 3: Ecosystem Integration (M31)
|
|
1494
|
+
|
|
1425
1495
|
**Duration:** 3-4 weeks
|
|
1426
1496
|
|
|
1427
1497
|
**Deliverables:**
|
|
1498
|
+
|
|
1428
1499
|
1. **G9: Multi-Tracker Support** (2 weeks)
|
|
1429
1500
|
- Register `issue-tracker` adapter slot (N6): github, linear, jira adapters
|
|
1430
1501
|
- Issue context enrichment
|
|
@@ -1446,6 +1517,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1446
1517
|
- Circular dependency detection
|
|
1447
1518
|
|
|
1448
1519
|
**Milestone Acceptance:**
|
|
1520
|
+
|
|
1449
1521
|
- [ ] Planner receives issue context from GitHub/Linear
|
|
1450
1522
|
- [ ] Feature status updates sync to issue tracker
|
|
1451
1523
|
- [ ] Multiple orchestrator instances run safely with isolated leases
|
|
@@ -1457,6 +1529,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1457
1529
|
## 5. Testing Strategy
|
|
1458
1530
|
|
|
1459
1531
|
### 5.1 Unit Tests
|
|
1532
|
+
|
|
1460
1533
|
- **Dashboard:** SSE event emission, API route handlers, file polling, Kanban column assignment, review decision dispatch (approve/deny/request_changes → tool client calls), checkout flow (stash detection, branch switch, restore state tracking)
|
|
1461
1534
|
- **Notifications:** Channel routing (4-tier), message formatting, failure handling, throttle/batch
|
|
1462
1535
|
- **Init Wizard:** Git detection, template generation, schema validation, `--auto` mode
|
|
@@ -1470,6 +1543,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1470
1543
|
- **Cost Tracking:** Token accumulation, budget threshold detection, pause logic
|
|
1471
1544
|
|
|
1472
1545
|
### 5.2 Integration Tests
|
|
1546
|
+
|
|
1473
1547
|
- **Dashboard E2E:** Feature status updates → SSE events → UI refresh
|
|
1474
1548
|
- **Dashboard Review E2E:** Feature reaches ready_to_merge → reviewer approves via dashboard → merge executes → feature moves to merged
|
|
1475
1549
|
- **Dashboard Checkout E2E:** Reviewer clicks checkout → stash created → branch switched → restore returns to original branch + stash pop
|
|
@@ -1480,6 +1554,7 @@ These features emerged from analyzing both codebases and represent opportunities
|
|
|
1480
1554
|
- **PR Lifecycle E2E:** Branch push → PR detected → CI status tracked → review feedback → agent fix
|
|
1481
1555
|
|
|
1482
1556
|
### 5.3 Manual Acceptance Tests
|
|
1557
|
+
|
|
1483
1558
|
- Dashboard visual inspection (UI polish, responsiveness)
|
|
1484
1559
|
- `aop init` wizard flow (user-friendly prompts, error messages)
|
|
1485
1560
|
- `aop send` / `aop attach` interactive sessions (terminal streaming)
|
|
@@ -1503,7 +1578,7 @@ notifications:
|
|
|
1503
1578
|
slack:
|
|
1504
1579
|
enabled: true
|
|
1505
1580
|
webhook: ${SLACK_WEBHOOK_URL}
|
|
1506
|
-
channel:
|
|
1581
|
+
channel: '#aop-alerts'
|
|
1507
1582
|
webhook:
|
|
1508
1583
|
enabled: false
|
|
1509
1584
|
url: ${CUSTOM_WEBHOOK_URL}
|
|
@@ -1532,12 +1607,12 @@ dashboard:
|
|
|
1532
1607
|
enabled: true
|
|
1533
1608
|
port: 3000
|
|
1534
1609
|
auth:
|
|
1535
|
-
enabled: false
|
|
1610
|
+
enabled: false # future: API key auth
|
|
1536
1611
|
|
|
1537
1612
|
# NEW: Issue Tracker (optional)
|
|
1538
1613
|
issue_tracker:
|
|
1539
1614
|
enabled: false
|
|
1540
|
-
type: github
|
|
1615
|
+
type: github # or linear, jira
|
|
1541
1616
|
config:
|
|
1542
1617
|
token: ${GITHUB_TOKEN}
|
|
1543
1618
|
repo: myorg/myrepo
|
|
@@ -1547,7 +1622,7 @@ issue_tracker:
|
|
|
1547
1622
|
|
|
1548
1623
|
```yaml
|
|
1549
1624
|
# agentic/orchestrator/multi-project.yaml (NEW FILE)
|
|
1550
|
-
version:
|
|
1625
|
+
version: '1.0'
|
|
1551
1626
|
|
|
1552
1627
|
defaults:
|
|
1553
1628
|
max_active_features: 5
|
|
@@ -1557,13 +1632,13 @@ defaults:
|
|
|
1557
1632
|
enabled: true
|
|
1558
1633
|
|
|
1559
1634
|
projects:
|
|
1560
|
-
- name:
|
|
1635
|
+
- name: 'project_a'
|
|
1561
1636
|
path: ~/repos/project_a
|
|
1562
|
-
repo:
|
|
1637
|
+
repo: 'org/project_a'
|
|
1563
1638
|
branch: main
|
|
1564
1639
|
policy: agentic/orchestrator/policy.yaml
|
|
1565
1640
|
gates: agentic/orchestrator/gates-project-a.yaml
|
|
1566
|
-
dashboard_port: 3001
|
|
1641
|
+
dashboard_port: 3001 # override
|
|
1567
1642
|
```
|
|
1568
1643
|
|
|
1569
1644
|
---
|
|
@@ -1571,6 +1646,7 @@ projects:
|
|
|
1571
1646
|
## 7. Acceptance Criteria (Phase 1 - M29)
|
|
1572
1647
|
|
|
1573
1648
|
### Dashboard (G1)
|
|
1649
|
+
|
|
1574
1650
|
- [ ] Dashboard displays features in real-time via SSE
|
|
1575
1651
|
- [ ] Feature detail page shows state, plan, diff, evidence
|
|
1576
1652
|
- [ ] Diff viewer renders syntax-highlighted diffs
|
|
@@ -1581,18 +1657,21 @@ projects:
|
|
|
1581
1657
|
- [ ] Checkout safety: blocked when no worktree/branch or repo has conflicts
|
|
1582
1658
|
|
|
1583
1659
|
### Notifications (G2)
|
|
1660
|
+
|
|
1584
1661
|
- [ ] Desktop notification on gate failure (macOS/Linux)
|
|
1585
1662
|
- [ ] Slack webhook receives formatted messages with links
|
|
1586
1663
|
- [ ] Notification config validated on startup
|
|
1587
1664
|
- [ ] Notification failures logged but do not crash orchestrator
|
|
1588
1665
|
|
|
1589
1666
|
### Init Wizard (G3)
|
|
1667
|
+
|
|
1590
1668
|
- [ ] Wizard detects git repo and parses remote URL
|
|
1591
1669
|
- [ ] Generated config files pass schema validation
|
|
1592
1670
|
- [ ] Template selection generates correct gates.yaml for test framework
|
|
1593
1671
|
- [ ] Wizard handles non-git directories gracefully
|
|
1594
1672
|
|
|
1595
1673
|
### Multi-Project (G4)
|
|
1674
|
+
|
|
1596
1675
|
- [ ] Multi-project config validates against schema
|
|
1597
1676
|
- [ ] `--project` flag selects correct project
|
|
1598
1677
|
- [ ] Run leases isolated per project (parallel safe)
|
|
@@ -1603,6 +1682,7 @@ projects:
|
|
|
1603
1682
|
## 8. Non-Goals
|
|
1604
1683
|
|
|
1605
1684
|
**Features explicitly excluded from this spec:**
|
|
1685
|
+
|
|
1606
1686
|
1. **Auto-merge on green CI** — Conflicts with explicit merge control. AOP requires human approval before merge.
|
|
1607
1687
|
2. **Plugin system** — Conflicts with deterministic kernel design. Provider abstraction + MCP tool registry provide sufficient extensibility.
|
|
1608
1688
|
3. **K8s/SSH runtimes** — MCP transport abstraction already supports remote MCP servers for distributed execution.
|
|
@@ -1611,6 +1691,7 @@ projects:
|
|
|
1611
1691
|
6. **Meta-agent orchestration pattern** — Composio's approach (AI agent as orchestrator using CLI) is innovative but trades determinism for flexibility. AOP's code-driven supervisor provides stronger guarantees. Noted as architectural divergence, not a gap.
|
|
1612
1692
|
|
|
1613
1693
|
**Revised from v1.1:**
|
|
1694
|
+
|
|
1614
1695
|
- **Review comment auto-handling (G7)** — PROMOTED from Non-Goal to P1. Pragmatic implementation (forward review comments to agent) is compatible with AOP's review model. Subsumed into G6e (PR Lifecycle Integration).
|
|
1615
1696
|
|
|
1616
1697
|
---
|
|
@@ -1620,12 +1701,14 @@ projects:
|
|
|
1620
1701
|
### 9.1 Backward Compatibility
|
|
1621
1702
|
|
|
1622
1703
|
**Existing Features Unaffected:**
|
|
1704
|
+
|
|
1623
1705
|
- All core MCP tools remain unchanged
|
|
1624
1706
|
- Existing CLI commands (`run`, `status`, `resume`, `delete`) backward compatible
|
|
1625
1707
|
- Existing config files work without changes (new fields optional)
|
|
1626
1708
|
- Feature state/plan/index schemas unchanged
|
|
1627
1709
|
|
|
1628
1710
|
**New Features Opt-In:**
|
|
1711
|
+
|
|
1629
1712
|
- Dashboard: Launch via `aop dashboard` (opt-in)
|
|
1630
1713
|
- Notifications: Disabled by default; enable in policy.yaml
|
|
1631
1714
|
- Reactions: Disabled by default; enable in policy.yaml
|
|
@@ -1636,6 +1719,7 @@ projects:
|
|
|
1636
1719
|
**No deprecations in M29-M31.**
|
|
1637
1720
|
|
|
1638
1721
|
Future consideration (M32+):
|
|
1722
|
+
|
|
1639
1723
|
- Deprecate `--transport mcp` in favor of remote MCP server URLs
|
|
1640
1724
|
- Deprecate in-process transport in favor of local MCP server
|
|
1641
1725
|
|
|
@@ -1646,17 +1730,20 @@ Future consideration (M32+):
|
|
|
1646
1730
|
### 10.1 Quantitative Metrics
|
|
1647
1731
|
|
|
1648
1732
|
**M29 (Phase 1):**
|
|
1733
|
+
|
|
1649
1734
|
- Dashboard page load < 2s
|
|
1650
1735
|
- SSE event latency < 2s (file change → UI update)
|
|
1651
1736
|
- `aop init` completion time < 60s
|
|
1652
1737
|
- Notification delivery latency < 5s
|
|
1653
1738
|
|
|
1654
1739
|
**M30 (Phase 2):**
|
|
1740
|
+
|
|
1655
1741
|
- Retry success rate > 60% (gate failures auto-resolved)
|
|
1656
1742
|
- Escalation rate < 20% (most failures resolved before human intervention)
|
|
1657
1743
|
- `aop send` message delivery < 1s
|
|
1658
1744
|
|
|
1659
1745
|
**M31 (Phase 3):**
|
|
1746
|
+
|
|
1660
1747
|
- Multi-project config validation time < 5s
|
|
1661
1748
|
- Issue tracker sync latency < 10s
|
|
1662
1749
|
- Multi-instance run lease acquisition < 1s
|
|
@@ -1664,11 +1751,13 @@ Future consideration (M32+):
|
|
|
1664
1751
|
### 10.2 Qualitative Metrics
|
|
1665
1752
|
|
|
1666
1753
|
**User Experience:**
|
|
1754
|
+
|
|
1667
1755
|
- Dashboard intuitive for first-time users (user testing)
|
|
1668
1756
|
- Init wizard reduces setup time from 30min → 5min
|
|
1669
1757
|
- Notifications reduce "poll for status" behavior
|
|
1670
1758
|
|
|
1671
1759
|
**Operational Excellence:**
|
|
1760
|
+
|
|
1672
1761
|
- Auto-remediation reduces manual intervention by 50%
|
|
1673
1762
|
- Multi-project support enables single-dashboard management
|
|
1674
1763
|
- Session commands reduce workflow restarts by 70%
|
|
@@ -1680,32 +1769,39 @@ Future consideration (M32+):
|
|
|
1680
1769
|
### 11.1 Technical Risks
|
|
1681
1770
|
|
|
1682
1771
|
**Risk 1: SSE Scalability**
|
|
1772
|
+
|
|
1683
1773
|
- **Impact:** Dashboard becomes unresponsive with >10 features
|
|
1684
1774
|
- **Mitigation:** Implement event batching, debounce updates, connection pooling
|
|
1685
1775
|
|
|
1686
1776
|
**Risk 2: Provider API Changes**
|
|
1777
|
+
|
|
1687
1778
|
- **Impact:** `aop send` / `aop attach` break when Claude/Codex updates
|
|
1688
1779
|
- **Mitigation:** Version provider interface, graceful fallback, release notes monitoring
|
|
1689
1780
|
|
|
1690
1781
|
**Risk 3: Notification Delivery Failures**
|
|
1782
|
+
|
|
1691
1783
|
- **Impact:** Critical alerts lost (gate failures, collisions)
|
|
1692
1784
|
- **Mitigation:** Log all notification attempts, retry failed deliveries, fallback to desktop
|
|
1693
1785
|
|
|
1694
1786
|
**Risk 4: Multi-Project Config Complexity**
|
|
1787
|
+
|
|
1695
1788
|
- **Impact:** Users misconfigure run leases → orchestrator conflicts
|
|
1696
1789
|
- **Mitigation:** Schema validation, init wizard guidance, clear error messages
|
|
1697
1790
|
|
|
1698
1791
|
### 11.2 Operational Risks
|
|
1699
1792
|
|
|
1700
1793
|
**Risk 1: Dashboard Security**
|
|
1794
|
+
|
|
1701
1795
|
- **Impact:** Unauthorized access to feature diffs, evidence
|
|
1702
1796
|
- **Mitigation:** Add API key auth (P2), limit to localhost by default
|
|
1703
1797
|
|
|
1704
1798
|
**Risk 2: Retry Loop Abuse**
|
|
1799
|
+
|
|
1705
1800
|
- **Impact:** Infinite retry loops consume resources
|
|
1706
1801
|
- **Mitigation:** Hard cap on retries (max 5), exponential backoff, manual override required
|
|
1707
1802
|
|
|
1708
1803
|
**Risk 3: Slack Webhook Rate Limits**
|
|
1804
|
+
|
|
1709
1805
|
- **Impact:** Notifications dropped during high activity
|
|
1710
1806
|
- **Mitigation:** Implement rate limiting, batch notifications, queue overflow alerts
|
|
1711
1807
|
|
|
@@ -1753,6 +1849,7 @@ This specification (v2.0) significantly expands the gap analysis based on a deep
|
|
|
1753
1849
|
**Phase 3 (M31)** integrates with external ecosystems (issue trackers, multi-instance isolation, cost tracking, dependency scheduling) for enterprise workflows.
|
|
1754
1850
|
|
|
1755
1851
|
**Key Principles:**
|
|
1852
|
+
|
|
1756
1853
|
1. Every new feature is opt-in, backward compatible, and does not compromise deterministic guarantees or explicit merge control.
|
|
1757
1854
|
2. AOP's code-driven supervisor is an intentional architectural choice, not a gap. Meta-agent orchestration (Composio's pattern) trades determinism for flexibility — AOP chooses determinism.
|
|
1758
1855
|
3. Novel features (N1-N5) represent competitive differentiation opportunities that neither package currently offers.
|