agentic-orchestrator 0.1.6 → 0.1.8
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 +71 -48
- 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 +5 -22
- 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/env-file.ts +115 -0
- package/apps/control-plane/src/cli/help-command-handler.ts +61 -32
- package/apps/control-plane/src/cli/init-command-handler.ts +182 -56
- 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 +513 -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 +79 -35
- 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 +137 -54
- 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 +328 -68
- 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 +208 -104
- 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/config/agentic/orchestrator/adapters.yaml +3 -0
- package/config/agentic/orchestrator/agents.yaml +14 -0
- package/config/agentic/orchestrator/gates.yaml +28 -0
- package/config/agentic/orchestrator/policy.yaml +22 -0
- package/config/agentic/orchestrator/prompts/builder.system.md +1 -0
- package/config/agentic/orchestrator/prompts/planner.system.md +16 -0
- package/config/agentic/orchestrator/prompts/qa.system.md +1 -0
- 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/env-file.d.ts +4 -0
- package/dist/apps/control-plane/cli/env-file.js +89 -0
- package/dist/apps/control-plane/cli/env-file.js.map +1 -0
- 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 +97 -37
- 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 +40 -23
- 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 +3 -2
- package/dist/apps/control-plane/providers/providers.js +81 -39
- 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 +189 -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_provider_auth_bootstrap_spec.md +384 -0
- 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
|
@@ -46,18 +46,21 @@
|
|
|
46
46
|
|
|
47
47
|
### 3.1 Processes
|
|
48
48
|
|
|
49
|
-
**A) MCP Server (inside Docker, bind-mounted repo)**
|
|
49
|
+
**A) MCP Server (inside Docker, bind-mounted repo)**
|
|
50
|
+
|
|
50
51
|
- Exposes tools via MCP.
|
|
51
52
|
- Runs git and gate commands inside bind mount.
|
|
52
53
|
- Enforces schemas, policies, locks, collisions, and patch constraints.
|
|
53
54
|
- Writes canonical state and evidence.
|
|
54
55
|
|
|
55
|
-
**B) Supervisor Runtime (outside MCP, vendor-agnostic)**
|
|
56
|
+
**B) Supervisor Runtime (outside MCP, vendor-agnostic)**
|
|
57
|
+
|
|
56
58
|
- Responsible for “spinning up agents” (Orchestrator + workers).
|
|
57
59
|
- Applies role-scoped tool permissions.
|
|
58
60
|
- Runs orchestration algorithm across features and clusters.
|
|
59
61
|
|
|
60
|
-
**C) Agent Runtime(s) (Claude Code, Codex CLI, etc.)**
|
|
62
|
+
**C) Agent Runtime(s) (Claude Code, Codex CLI, etc.)**
|
|
63
|
+
|
|
61
64
|
- Connect to MCP tools.
|
|
62
65
|
- Generate structured artifacts and diffs under Supervisor control.
|
|
63
66
|
|
|
@@ -164,7 +167,7 @@ agentic/
|
|
|
164
167
|
- Use Ralph Loop by reacting to MCP gate outputs.
|
|
165
168
|
- Orchestrator chooses collision resolution strategy and merge order.
|
|
166
169
|
|
|
167
|
-
### 5.3 Supervisor Runtime MUST do (enforcement that is
|
|
170
|
+
### 5.3 Supervisor Runtime MUST do (enforcement that is _not_ MCP)
|
|
168
171
|
|
|
169
172
|
- Spawn/maintain sessions for orchestrator + workers.
|
|
170
173
|
- Enforce role tool permissions (tool-call firewall).
|
|
@@ -181,6 +184,7 @@ agentic/
|
|
|
181
184
|
### 6.0 MCP Tool Contract Schemas
|
|
182
185
|
|
|
183
186
|
In addition to runtime state schemas, the MCP boundary MUST be formalized with:
|
|
187
|
+
|
|
184
188
|
- `agentic/orchestrator/tools/catalog.json` as the single source of truth for tool metadata and schema references.
|
|
185
189
|
- `agentic/orchestrator/tools/protocol.json` for pinned MCP protocol/SDK/transports.
|
|
186
190
|
- `agentic/orchestrator/tools/errors.schema.json` for normalized error envelopes.
|
|
@@ -191,6 +195,7 @@ Contract validation MUST fail CI when protocol pins drift or when `catalog.json`
|
|
|
191
195
|
### 6.1 `plan.json` JSON Schema (`plan.schema.json`)
|
|
192
196
|
|
|
193
197
|
**Required fields**:
|
|
198
|
+
|
|
194
199
|
- `feature_id` (string, derived from spec filename; pattern `^[a-z0-9_][a-z0-9_-]*$` recommended)
|
|
195
200
|
- `plan_version` (integer, starts at `1`, increments by `+1` on each accepted update)
|
|
196
201
|
- `summary` (string, min 5 chars)
|
|
@@ -214,11 +219,13 @@ Contract validation MUST fail CI when protocol pins drift or when `catalog.json`
|
|
|
214
219
|
- Optional: `revision_reason` (string)
|
|
215
220
|
|
|
216
221
|
**Verification overrides** (optional):
|
|
222
|
+
|
|
217
223
|
- `modes.fast.steps` array of gate step overrides (rare; discourage)
|
|
218
224
|
- `modes.full.steps` overrides
|
|
219
|
-
Default behavior is use `gates.yaml`.
|
|
225
|
+
Default behavior is use `gates.yaml`.
|
|
220
226
|
|
|
221
227
|
**Plan revision rules**:
|
|
228
|
+
|
|
222
229
|
- First accepted plan MUST have `plan_version=1` and no `revision_of`.
|
|
223
230
|
- `plan.update` MUST require `expected_plan_version` and reject stale updates.
|
|
224
231
|
- MCP MUST re-run schema, policy, lock, and collision checks for every revision.
|
|
@@ -230,6 +237,7 @@ Default behavior is use `gates.yaml`.
|
|
|
230
237
|
State file is Markdown with YAML front matter. MCP validates the front matter object.
|
|
231
238
|
|
|
232
239
|
Required fields:
|
|
240
|
+
|
|
233
241
|
- `feature_id` (string)
|
|
234
242
|
- `version` (integer, monotonic)
|
|
235
243
|
- `branch` (string)
|
|
@@ -250,6 +258,7 @@ Required fields:
|
|
|
250
258
|
Tracks global orchestration status.
|
|
251
259
|
|
|
252
260
|
Required fields:
|
|
261
|
+
|
|
253
262
|
- `version` integer (monotonic)
|
|
254
263
|
- `active` array of feature ids
|
|
255
264
|
- `blocked` array
|
|
@@ -264,6 +273,7 @@ Required fields:
|
|
|
264
273
|
YAML is validated by loading and validating against JSON schema equivalent.
|
|
265
274
|
|
|
266
275
|
Required fields:
|
|
276
|
+
|
|
267
277
|
- `version` number
|
|
268
278
|
- `profiles` object:
|
|
269
279
|
- profile name → profile object
|
|
@@ -278,6 +288,7 @@ Required fields:
|
|
|
278
288
|
- Optional: `timeout_seconds` number
|
|
279
289
|
|
|
280
290
|
Optional:
|
|
291
|
+
|
|
281
292
|
- `parsers.coverage` with:
|
|
282
293
|
- `type`: `none|lcov|junit_xml|jacoco_xml|cobertura_xml|custom`
|
|
283
294
|
- `path` string
|
|
@@ -290,6 +301,7 @@ Optional:
|
|
|
290
301
|
### 6.5 `policy.yaml` Schema (`policy.schema.json`)
|
|
291
302
|
|
|
292
303
|
Required fields:
|
|
304
|
+
|
|
293
305
|
- `version`
|
|
294
306
|
- `commit_policy.allow_commit` boolean
|
|
295
307
|
- `commit_policy.allow_merge` boolean
|
|
@@ -333,6 +345,7 @@ Required fields:
|
|
|
333
345
|
- Optional additional thresholds (coverage, performance, repo-specific gates) beyond the required testing minima above.
|
|
334
346
|
|
|
335
347
|
Policy interpretation notes:
|
|
348
|
+
|
|
336
349
|
- `commit_policy.*` controls direct low-level commit tools (`repo.commit`).
|
|
337
350
|
- `merge_policy.*` controls high-level merge promotion (`feature.ready_to_merge`), including the commit created as part of merge promotion.
|
|
338
351
|
- `implementation.workspace` and `testing.*` constrain the orchestrator codebase implementation; they do not remove platform-agnostic support for managed target repositories.
|
|
@@ -352,6 +365,7 @@ Policy interpretation notes:
|
|
|
352
365
|
Repo-level worker prompt configuration.
|
|
353
366
|
|
|
354
367
|
Required fields:
|
|
368
|
+
|
|
355
369
|
- `version`
|
|
356
370
|
- `roles` object:
|
|
357
371
|
- `planner.system_prompt_path` (optional)
|
|
@@ -365,6 +379,7 @@ Required fields:
|
|
|
365
379
|
- `role_provider_overrides` object (optional per-role provider/model overrides)
|
|
366
380
|
|
|
367
381
|
Prompt loading rules:
|
|
382
|
+
|
|
368
383
|
- If configured prompt path exists, Supervisor MUST load and inject it as the role system prompt.
|
|
369
384
|
- If path is absent or file missing and `missing_prompt_behavior=ignore`, Supervisor uses built-in defaults.
|
|
370
385
|
- Prompt paths MUST be repo-relative and validated with path rules (§6.6).
|
|
@@ -375,6 +390,7 @@ Prompt loading rules:
|
|
|
375
390
|
Per-feature QA execution index used to keep QA agent context small and resumable.
|
|
376
391
|
|
|
377
392
|
Required fields:
|
|
393
|
+
|
|
378
394
|
- `feature_id`
|
|
379
395
|
- `version` (integer, monotonic)
|
|
380
396
|
- `source_diff_ref` (string identifying diff snapshot)
|
|
@@ -387,6 +403,7 @@ Required fields:
|
|
|
387
403
|
- optional `evidence_refs` array
|
|
388
404
|
|
|
389
405
|
Rules:
|
|
406
|
+
|
|
390
407
|
- MCP MUST update file/hunk entries after every successful `repo.apply_patch`.
|
|
391
408
|
- MCP MUST compute `required_tests` deterministically from configured gate steps and changed paths/hunks so QA sees exact pending test obligations at any time.
|
|
392
409
|
- QA agent MUST update statuses/evidence after each executed test batch.
|
|
@@ -398,6 +415,7 @@ Rules:
|
|
|
398
415
|
### 7.1 Tool Contract Norms
|
|
399
416
|
|
|
400
417
|
All tools MUST:
|
|
418
|
+
|
|
401
419
|
- Accept `actor_type` (`orchestrator|planner|builder|qa|system`) and `actor_id` (string).
|
|
402
420
|
- Return JSON with at least:
|
|
403
421
|
- `ok` boolean
|
|
@@ -422,29 +440,38 @@ Authorization MUST be deny-by-default; any disallowed role/tool attempt fails wi
|
|
|
422
440
|
### 7.2 Required Tools (V1)
|
|
423
441
|
|
|
424
442
|
#### Feature lifecycle
|
|
425
|
-
|
|
443
|
+
|
|
444
|
+
1. `feature.discover_specs()`
|
|
445
|
+
|
|
426
446
|
- Returns list of `{feature_id, spec_path}` under `agentic/features/*/spec.md`.
|
|
427
447
|
|
|
428
|
-
2
|
|
448
|
+
2. `feature.init(feature_id)`
|
|
449
|
+
|
|
429
450
|
- Creates feature folder structure if missing.
|
|
430
451
|
- Creates/ensures branch + worktree (see `repo.ensure_worktree`).
|
|
431
452
|
- Writes `state.md` default with `status=planning`.
|
|
432
453
|
|
|
433
|
-
3
|
|
454
|
+
3. `feature.get_context(feature_id)`
|
|
455
|
+
|
|
434
456
|
- Returns: spec.md text, parsed state front matter, plan.json (if exists), latest evidence summary, and current `qa_test_index.json`.
|
|
435
457
|
|
|
436
|
-
4
|
|
458
|
+
4. `feature.state_get(feature_id)`
|
|
459
|
+
|
|
437
460
|
- Returns parsed state front matter + raw markdown body.
|
|
438
461
|
|
|
439
|
-
5
|
|
462
|
+
5. `feature.state_patch(feature_id, expected_version, patch)`
|
|
463
|
+
|
|
440
464
|
- Restricted: allowed only for `actor_type=system|orchestrator` by policy; typically MCP internal.
|
|
441
465
|
- Validates against schema before writing.
|
|
442
466
|
|
|
443
|
-
6
|
|
467
|
+
6. `feature.log_append(feature_id, note)`
|
|
468
|
+
|
|
444
469
|
- Appends to `decisions.md` or `state.md` body section; includes `actor` stamp.
|
|
445
470
|
|
|
446
471
|
#### Plan
|
|
447
|
-
|
|
472
|
+
|
|
473
|
+
7. `plan.submit(feature_id, plan_json, expected_version?)`
|
|
474
|
+
|
|
448
475
|
- Validates plan schema.
|
|
449
476
|
- Enforces `policy.yaml` constraints:
|
|
450
477
|
- required fields
|
|
@@ -454,9 +481,10 @@ Authorization MUST be deny-by-default; any disallowed role/tool attempt fails wi
|
|
|
454
481
|
- Persists `plan.json`.
|
|
455
482
|
- Updates `state.md` gates: `plan=pass` and status to `building` if allowed.
|
|
456
483
|
|
|
457
|
-
8
|
|
484
|
+
8. `plan.get(feature_id)`
|
|
485
|
+
|
|
486
|
+
9. `plan.update(feature_id, expected_plan_version, plan_json)`
|
|
458
487
|
|
|
459
|
-
9) `plan.update(feature_id, expected_plan_version, plan_json)`
|
|
460
488
|
- Requires `plan_json.plan_version = expected_plan_version + 1`.
|
|
461
489
|
- Requires `plan_json.revision_of = expected_plan_version`.
|
|
462
490
|
- Re-runs full validation, lock checks, and collision scan.
|
|
@@ -464,12 +492,15 @@ Authorization MUST be deny-by-default; any disallowed role/tool attempt fails wi
|
|
|
464
492
|
- Existing worktree diffs are retained, but all subsequent `repo.apply_patch` operations MUST validate against the latest accepted plan.
|
|
465
493
|
|
|
466
494
|
#### Repo/worktree
|
|
467
|
-
|
|
495
|
+
|
|
496
|
+
10. `repo.ensure_worktree(feature_id)`
|
|
497
|
+
|
|
468
498
|
- Ensures `.worktrees/<feature_id>` exists and is checked out to `<feature_id>` branch.
|
|
469
499
|
- If branch is newly created, cut it from `policy.worktree.base_branch` at the current head SHA.
|
|
470
500
|
- Must store branch name in state.
|
|
471
501
|
|
|
472
|
-
11
|
|
502
|
+
11. `repo.apply_patch(feature_id, unified_diff)`
|
|
503
|
+
|
|
473
504
|
- Validates: plan exists (unless policy allows).
|
|
474
505
|
- Parses patch to determine touched paths.
|
|
475
506
|
- Enforces:
|
|
@@ -482,22 +513,26 @@ Authorization MUST be deny-by-default; any disallowed role/tool attempt fails wi
|
|
|
482
513
|
- Returns updated `git status --porcelain` plus list of changed files.
|
|
483
514
|
- Rebuilds or incrementally updates `qa_test_index.json` for changed files/hunks.
|
|
484
515
|
|
|
485
|
-
12
|
|
486
|
-
13
|
|
516
|
+
12. `repo.status(feature_id)`
|
|
517
|
+
13. `repo.diff(feature_id, options?)`
|
|
518
|
+
|
|
487
519
|
- Options: `--stat`, `--name-only`, etc.
|
|
488
520
|
|
|
489
|
-
14
|
|
490
|
-
15
|
|
521
|
+
14. `repo.read_file(feature_id, path)`
|
|
522
|
+
15. `repo.search(feature_id, query)`
|
|
523
|
+
|
|
491
524
|
- Wrapper around `rg` with safe defaults; returns file/line matches.
|
|
492
525
|
|
|
493
|
-
16
|
|
526
|
+
16. `repo.diff_bundle(feature_id)`
|
|
527
|
+
|
|
494
528
|
- Returns a “review bundle”:
|
|
495
529
|
- diff stat
|
|
496
530
|
- full diff (or path to stored diff)
|
|
497
531
|
- touched file list
|
|
498
532
|
- last gate summary
|
|
499
533
|
|
|
500
|
-
17
|
|
534
|
+
17. `feature.ready_to_merge(feature_id, commit_message, merge_strategy, user_approval_token)`
|
|
535
|
+
|
|
501
536
|
- Preconditions:
|
|
502
537
|
- feature status is `ready_to_merge`
|
|
503
538
|
- required `full` + `merge` modes pass (policy-controlled)
|
|
@@ -508,14 +543,13 @@ Authorization MUST be deny-by-default; any disallowed role/tool attempt fails wi
|
|
|
508
543
|
- appends merge evidence (commit SHA, merge SHA, strategy, gate snapshot)
|
|
509
544
|
- releases held locks.
|
|
510
545
|
|
|
511
|
-
> Low-level git tools MAY exist for debugging but SHOULD be blocked by RBAC for non-system roles:
|
|
512
|
-
18) `repo.commit(feature_id, message)` (internal/optional)
|
|
513
|
-
19) `repo.rebase_onto_main(feature_id)` (internal/optional)
|
|
514
|
-
20) `repo.merge(feature_id)` (internal/optional)
|
|
546
|
+
> Low-level git tools MAY exist for debugging but SHOULD be blocked by RBAC for non-system roles: 18) `repo.commit(feature_id, message)` (internal/optional) 19) `repo.rebase_onto_main(feature_id)` (internal/optional) 20) `repo.merge(feature_id)` (internal/optional)
|
|
515
547
|
|
|
516
548
|
#### Gates/evidence
|
|
517
|
-
|
|
518
|
-
|
|
549
|
+
|
|
550
|
+
21. `gates.list(profile?)`
|
|
551
|
+
22. `gates.run(feature_id, profile, mode)`
|
|
552
|
+
|
|
519
553
|
- Loads `gates.yaml`, selects profile and mode.
|
|
520
554
|
- Runs steps sequentially (or optionally parallel if configured, but default sequential for determinism).
|
|
521
555
|
- Captures stdout/stderr per step to `logs/`.
|
|
@@ -526,36 +560,46 @@ Authorization MUST be deny-by-default; any disallowed role/tool attempt fails wi
|
|
|
526
560
|
- overall mode result
|
|
527
561
|
- evidence pointers
|
|
528
562
|
|
|
529
|
-
23
|
|
563
|
+
23. `evidence.latest(feature_id)`
|
|
564
|
+
|
|
530
565
|
- Returns last gate run summary with key log excerpt tail.
|
|
531
566
|
|
|
532
567
|
#### QA context / test index
|
|
533
|
-
|
|
568
|
+
|
|
569
|
+
24. `qa.test_index_get(feature_id)`
|
|
570
|
+
|
|
534
571
|
- Returns parsed `qa_test_index.json`, summary counts by status, and exact pending `required_tests` grouped by file/hunk.
|
|
535
572
|
|
|
536
|
-
25
|
|
573
|
+
25. `qa.test_index_update(feature_id, expected_version, updates, evidence_refs?)`
|
|
574
|
+
|
|
537
575
|
- Allowed for `qa|system|orchestrator`.
|
|
538
576
|
- Applies status updates to index entries and increments index version.
|
|
539
577
|
- Requires line-hunk references when marking entries `passed|failed|waived`.
|
|
540
578
|
- MUST be called by QA agent after each test batch.
|
|
541
579
|
|
|
542
580
|
#### Locks/collisions
|
|
543
|
-
|
|
581
|
+
|
|
582
|
+
26. `locks.acquire(resource, feature_id, wait_timeout_seconds?)`
|
|
583
|
+
|
|
544
584
|
- Resource names from policy.
|
|
545
585
|
- Stores in `index.json` and feature state.
|
|
546
586
|
- Enforces ownership.
|
|
547
587
|
- MUST create lease metadata (`lease_id`, `expires_at`) and renew while holder is healthy.
|
|
548
588
|
|
|
549
|
-
27
|
|
589
|
+
27. `locks.release(resource, feature_id)`
|
|
590
|
+
|
|
591
|
+
28. `collisions.scan()`
|
|
550
592
|
|
|
551
|
-
28) `collisions.scan()`
|
|
552
593
|
- Returns global collision matrix based on accepted plans.
|
|
553
594
|
|
|
554
595
|
#### Reporting (for orchestrator UX)
|
|
555
|
-
|
|
596
|
+
|
|
597
|
+
29. `report.dashboard()`
|
|
598
|
+
|
|
556
599
|
- Returns summary of all features: status, blocks, locks, last gates.
|
|
557
600
|
|
|
558
|
-
30
|
|
601
|
+
30. `report.feature_summary(feature_id)`
|
|
602
|
+
|
|
559
603
|
- Returns state summary + diff summary + latest evidence links.
|
|
560
604
|
|
|
561
605
|
---
|
|
@@ -572,10 +616,12 @@ Authorization MUST be deny-by-default; any disallowed role/tool attempt fails wi
|
|
|
572
616
|
### 8.2 Collision Policy
|
|
573
617
|
|
|
574
618
|
Defined in `policy.yaml`:
|
|
619
|
+
|
|
575
620
|
- `collision_policy: reject|block`
|
|
576
|
-
Default: `reject` with structured report so orchestrator can revise.
|
|
621
|
+
Default: `reject` with structured report so orchestrator can revise.
|
|
577
622
|
|
|
578
623
|
If `collision_policy=block`:
|
|
624
|
+
|
|
579
625
|
- MCP MUST persist blocked plan requests in `index.json.blocked_queue`.
|
|
580
626
|
- Queue entries MUST include `{feature_id, plan_version, detected_at, collision_fingerprint, required_resources}`.
|
|
581
627
|
- MCP MUST re-evaluate queued entries when relevant locks are released or plans change.
|
|
@@ -584,6 +630,7 @@ If `collision_policy=block`:
|
|
|
584
630
|
### 8.3 Collision Report Format
|
|
585
631
|
|
|
586
632
|
On collision, MCP returns:
|
|
633
|
+
|
|
587
634
|
- collision items
|
|
588
635
|
- owning feature ids
|
|
589
636
|
- normalized path/resource identifiers
|
|
@@ -602,17 +649,20 @@ Orchestrator agent decides strategy; Supervisor updates states accordingly.
|
|
|
602
649
|
### 9.1 Lock Resources
|
|
603
650
|
|
|
604
651
|
Configured by `policy.yaml`, recommended defaults:
|
|
652
|
+
|
|
605
653
|
- `openapi`
|
|
606
654
|
- `events`
|
|
607
655
|
- `db_migrations`
|
|
608
656
|
- optionally: `protected:libs/core`
|
|
609
657
|
|
|
610
658
|
Contract-to-lock mapping MUST be explicit:
|
|
659
|
+
|
|
611
660
|
- `contracts.openapi=modify` requires lock `policy.locks.contract_to_resource.openapi` (default `openapi`).
|
|
612
661
|
- `contracts.events=modify` requires lock `policy.locks.contract_to_resource.events` (default `events`).
|
|
613
662
|
- `contracts.db=migration` requires lock `policy.locks.contract_to_resource.db` (default `db_migrations`).
|
|
614
663
|
|
|
615
664
|
Lease rules:
|
|
665
|
+
|
|
616
666
|
- Locks are leased, not perpetual.
|
|
617
667
|
- Lease TTL is `policy.locks.lease_ttl_seconds`.
|
|
618
668
|
- Supervisor/MCP heartbeat renews leases.
|
|
@@ -647,12 +697,12 @@ Lease rules:
|
|
|
647
697
|
- reconstruct state from `index.json` + feature states when sessions are unavailable
|
|
648
698
|
- re-drive blocked/retryable operations deterministically
|
|
649
699
|
- Run orchestration loop across features:
|
|
650
|
-
1
|
|
651
|
-
2
|
|
652
|
-
3
|
|
653
|
-
4
|
|
654
|
-
5
|
|
655
|
-
6
|
|
700
|
+
1. init
|
|
701
|
+
2. planning wave
|
|
702
|
+
3. collision arbitration
|
|
703
|
+
4. build wave
|
|
704
|
+
5. qa wave
|
|
705
|
+
6. readiness report (full gates)
|
|
656
706
|
|
|
657
707
|
### 10.2 Vendor-Agnostic Worker Interface
|
|
658
708
|
|
|
@@ -669,6 +719,7 @@ Supervisor must treat workers abstractly:
|
|
|
669
719
|
Supervisor routes outputs to MCP tools and returns results to worker.
|
|
670
720
|
|
|
671
721
|
Context bundle MUST include:
|
|
722
|
+
|
|
672
723
|
- current feature state + accepted plan
|
|
673
724
|
- latest evidence summary
|
|
674
725
|
- current diff summary
|
|
@@ -677,6 +728,7 @@ Context bundle MUST include:
|
|
|
677
728
|
### 10.3 Concurrency
|
|
678
729
|
|
|
679
730
|
Configurable:
|
|
731
|
+
|
|
680
732
|
- `max_active_features` default 5
|
|
681
733
|
- `max_parallel_gate_runs` default 2–3 (CPU dependent)
|
|
682
734
|
- `max_iterations_per_phase` default 5–10
|
|
@@ -708,17 +760,18 @@ Supervisor proposes transitions; MCP is source of truth and MUST validate transi
|
|
|
708
760
|
### 10.6 Crash Recovery and Resume Algorithm
|
|
709
761
|
|
|
710
762
|
On Supervisor or MCP restart:
|
|
711
|
-
|
|
712
|
-
|
|
763
|
+
|
|
764
|
+
1. Load and validate `index.json` and all active feature `state.md` files.
|
|
765
|
+
2. Reconcile lock leases:
|
|
713
766
|
- if holder heartbeat is fresh, preserve lease
|
|
714
767
|
- if stale, reclaim and mark affected features `blocked` with reason
|
|
715
|
-
3
|
|
768
|
+
3. Reconstruct pending work from:
|
|
716
769
|
- features not terminal (`merged|failed`)
|
|
717
770
|
- queued collisions (`blocked_queue`)
|
|
718
771
|
- gate runs with no terminal evidence record
|
|
719
772
|
- current `qa_test_index.json` entries not in terminal status (`passed|waived`)
|
|
720
|
-
4
|
|
721
|
-
5
|
|
773
|
+
4. Resume orchestration from the earliest incomplete phase per feature.
|
|
774
|
+
5. All tool retries MUST be idempotent and keyed by operation id; duplicate execution must not double-apply patches or merges.
|
|
722
775
|
|
|
723
776
|
### 10.7 Ephemeral QA Session Lifecycle (Context Control)
|
|
724
777
|
|
|
@@ -737,6 +790,7 @@ On Supervisor or MCP restart:
|
|
|
737
790
|
## 11. Orchestrator Agent Contract (User-Facing Behavior)
|
|
738
791
|
|
|
739
792
|
Orchestrator Agent must:
|
|
793
|
+
|
|
740
794
|
- Discover provided specs from CLI-resolved inputs (`-fi`/`-fl`) or canonical repo discovery and ask user which to run if more than N are present (optional; default pick first N).
|
|
741
795
|
- Report dashboard status periodically (using `report.dashboard`).
|
|
742
796
|
- Decide collision resolution (revise plan, wait, shared prerequisite).
|
|
@@ -755,6 +809,7 @@ Orchestrator must never claim gates passed without MCP results.
|
|
|
755
809
|
### 12.1 Command Execution
|
|
756
810
|
|
|
757
811
|
MCP executes `cmd` arrays from `gates.yaml` with:
|
|
812
|
+
|
|
758
813
|
- `cwd` set to the feature worktree root
|
|
759
814
|
- safe environment with secret scrubbing enabled by default
|
|
760
815
|
- environment variable pass-through restricted to `policy.execution.env_allowlist`
|
|
@@ -762,6 +817,7 @@ MCP executes `cmd` arrays from `gates.yaml` with:
|
|
|
762
817
|
### 12.2 Parsers / Metrics
|
|
763
818
|
|
|
764
819
|
Supported parsers (V1):
|
|
820
|
+
|
|
765
821
|
- `none`
|
|
766
822
|
- `lcov` (line coverage)
|
|
767
823
|
- `junit_xml` (pass/fail + counts)
|
|
@@ -773,10 +829,12 @@ If parser type is unrecognized: gate fails with `error=unsupported_parser` unles
|
|
|
773
829
|
### 12.3 Threshold Enforcement
|
|
774
830
|
|
|
775
831
|
If coverage threshold configured in policy or gates:
|
|
832
|
+
|
|
776
833
|
- MCP must parse coverage and compare.
|
|
777
834
|
- Failure sets `gates.coverage_* = fail`.
|
|
778
835
|
|
|
779
836
|
For this implementation:
|
|
837
|
+
|
|
780
838
|
- Minimum blocking thresholds are `line >= 0.90` and `branch >= 0.90`.
|
|
781
839
|
- Target thresholds are `line = 1.00` and `branch = 1.00` (reported as target attainment metrics).
|
|
782
840
|
|
|
@@ -790,9 +848,10 @@ For this implementation:
|
|
|
790
848
|
### 12.5 Configuration Precedence (Normative)
|
|
791
849
|
|
|
792
850
|
For any gate execution parameter, precedence is:
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
851
|
+
|
|
852
|
+
1. `policy.yaml` hard constraints (cannot be relaxed)
|
|
853
|
+
2. `gates.yaml` selected profile/mode defaults
|
|
854
|
+
3. `plan.json.verification_overrides` (may only narrow scope or tighten thresholds)
|
|
796
855
|
|
|
797
856
|
If a lower-priority source attempts to relax a higher-priority constraint, MCP MUST fail with `error=invalid_override_precedence`.
|
|
798
857
|
|
|
@@ -825,6 +884,7 @@ For this implementation, container/runtime environment MUST include Node.js and
|
|
|
825
884
|
## 14. Acceptance Criteria (Complete)
|
|
826
885
|
|
|
827
886
|
A) **Kernel correctness**
|
|
887
|
+
|
|
828
888
|
- Plan schema validation rejects invalid plans with actionable errors.
|
|
829
889
|
- Plan revisions are versioned and protected by optimistic concurrency.
|
|
830
890
|
- Patch enforcement prevents edits outside plan/allowed areas.
|
|
@@ -834,17 +894,20 @@ A) **Kernel correctness**
|
|
|
834
894
|
- State/index writes are atomic and race-safe under parallel runs.
|
|
835
895
|
|
|
836
896
|
B) **Parallelism and visibility**
|
|
897
|
+
|
|
837
898
|
- 5 features can run concurrently with 5 worktrees.
|
|
838
899
|
- User can open `.worktrees/<feature_id>` (for example `.worktrees/my_feature`) locally to review unmerged changes.
|
|
839
900
|
|
|
840
901
|
C) **Platform-agnostic gates**
|
|
902
|
+
|
|
841
903
|
- Same MCP works on managed target repositories:
|
|
842
904
|
- Nx repo (nx commands in gates.yaml)
|
|
843
905
|
- Java repo (mvn/gradle commands in gates.yaml)
|
|
844
906
|
- Rust repo (cargo commands in gates.yaml)
|
|
845
|
-
No MCP code changes required.
|
|
907
|
+
No MCP code changes required.
|
|
846
908
|
|
|
847
909
|
D) **Orchestrator/cluster architecture**
|
|
910
|
+
|
|
848
911
|
- User interacts only with Orchestrator Agent.
|
|
849
912
|
- Supervisor spawns worker sessions per feature.
|
|
850
913
|
- Tool-call firewall enforces role tool permissions.
|
|
@@ -854,6 +917,7 @@ D) **Orchestrator/cluster architecture**
|
|
|
854
917
|
- QA worker runs can be closed/restarted while preserving progress via MCP-backed `qa_test_index.json`.
|
|
855
918
|
|
|
856
919
|
E) **CLI entrypoint contract**
|
|
920
|
+
|
|
857
921
|
- `aop run -fi <file>` launches exactly one Agent Cluster for that file.
|
|
858
922
|
- `aop run -fl <folder>` launches one Agent Cluster per resolved spec file in the folder.
|
|
859
923
|
- `-fi` and `-fl` mutual exclusion is enforced with deterministic structured errors.
|
|
@@ -862,6 +926,7 @@ E) **CLI entrypoint contract**
|
|
|
862
926
|
- Feature branch/worktree folder names are derived from spec filenames using the `.spec` / `-spec` trimming rules.
|
|
863
927
|
|
|
864
928
|
F) **Implementation testing standards**
|
|
929
|
+
|
|
865
930
|
- Orchestrator control-plane implementation (CLI/Supervisor/MCP) is structured as an Nx monorepo.
|
|
866
931
|
- Automated tests for that control-plane implementation are executed with Vitest.
|
|
867
932
|
- Blocking coverage minimum is 90% for both line and branch.
|
|
@@ -877,6 +942,7 @@ F) **Implementation testing standards**
|
|
|
877
942
|
While implementing this spec, the implementing agent MUST maintain `spec-files/progress.md` used only for implementation continuity.
|
|
878
943
|
|
|
879
944
|
Required `spec-files/progress.md` contents:
|
|
945
|
+
|
|
880
946
|
- current milestone (`M0..M9`) and current task
|
|
881
947
|
- completed tasks since last update
|
|
882
948
|
- next tasks planned
|
|
@@ -885,47 +951,59 @@ Required `spec-files/progress.md` contents:
|
|
|
885
951
|
- last updated timestamp
|
|
886
952
|
|
|
887
953
|
Update policy:
|
|
954
|
+
|
|
888
955
|
- update `spec-files/progress.md` after each meaningful implementation step
|
|
889
956
|
- update `spec-files/progress.md` before ending/closing an agent session for context reset
|
|
890
957
|
- the next agent session MUST start by reading `spec-files/progress.md` before making changes
|
|
891
958
|
|
|
892
959
|
Scope note:
|
|
960
|
+
|
|
893
961
|
- `spec-files/progress.md` in this section is an implementation-process artifact only.
|
|
894
962
|
- It MUST NOT be required by, read by, or enforced by the orchestrator runtime (MCP/Supervisor/worker logic).
|
|
895
963
|
|
|
896
964
|
**M0: Implementation Handoff Tracking (non-runtime)**
|
|
965
|
+
|
|
897
966
|
- create and maintain `spec-files/progress.md` throughout implementation.
|
|
898
967
|
- keep milestone position and handoff notes current for session-to-session continuity.
|
|
899
968
|
|
|
900
969
|
**M1: MCP Kernel V1 (single feature)**
|
|
970
|
+
|
|
901
971
|
- feature.init, plan.submit validation, ensure_worktree, apply_patch enforcement, gates.run, evidence.latest, state updates.
|
|
902
972
|
|
|
903
973
|
**M2: Worktrees + Parallelism**
|
|
974
|
+
|
|
904
975
|
- worktree-per-feature, index.json, locks, collisions.
|
|
905
976
|
|
|
906
977
|
**M3: Supervisor Runtime**
|
|
978
|
+
|
|
907
979
|
- orchestrator + worker abstractions, role enforcement, orchestration loop, reporting tools.
|
|
908
980
|
|
|
909
981
|
**M4: Platform-Agnostic Profiles**
|
|
982
|
+
|
|
910
983
|
- gates.yaml profiles, multi-target gate runs, line/branch coverage parsing.
|
|
911
984
|
|
|
912
985
|
**M5: Review + Merge Control**
|
|
986
|
+
|
|
913
987
|
- diff bundles, dashboard summary, explicit user approval flow, `feature.ready_to_merge` commit+merge path.
|
|
914
988
|
|
|
915
989
|
**M6: Resilience and Recovery**
|
|
990
|
+
|
|
916
991
|
- lock leases + heartbeat, restart recovery, queued collision unblock processing.
|
|
917
992
|
|
|
918
993
|
**M7: Prompt + QA Context Management**
|
|
994
|
+
|
|
919
995
|
- repo-level worker prompt loading via `agents.yaml`.
|
|
920
996
|
- per-feature QA change/test index maintenance and short-lived QA worker resume flow.
|
|
921
997
|
|
|
922
998
|
**M8: Supervisor CLI Entrypoint**
|
|
999
|
+
|
|
923
1000
|
- implement `aop run` contract with `-fi` and `-fl`.
|
|
924
1001
|
- deterministic folder scan + spec ingestion to canonical feature layout.
|
|
925
1002
|
- derive `feature_id`/branch/worktree folder names from spec filename stems with `.spec` / `-spec` suffix trimming.
|
|
926
1003
|
- startup validation, provider selection resolution, structured errors, and dashboard streaming bootstrap.
|
|
927
1004
|
|
|
928
1005
|
**M9: Nx + Vitest Quality Gates**
|
|
1006
|
+
|
|
929
1007
|
- scaffold/organize orchestrator implementation as Nx monorepo projects.
|
|
930
1008
|
- implement Vitest-based test tasks and coverage artifact generation.
|
|
931
1009
|
- enforce 90% line/branch minimums with 100% line/branch target reporting.
|
|
@@ -936,18 +1014,18 @@ Scope note:
|
|
|
936
1014
|
|
|
937
1015
|
The following defaults are accepted and normative:
|
|
938
1016
|
|
|
939
|
-
1
|
|
940
|
-
2
|
|
941
|
-
3
|
|
942
|
-
4
|
|
943
|
-
5
|
|
944
|
-
6
|
|
945
|
-
7
|
|
946
|
-
8
|
|
947
|
-
9
|
|
948
|
-
10
|
|
949
|
-
11
|
|
950
|
-
12
|
|
1017
|
+
1. Lock operations are owned by `orchestrator|system`; worker roles submit `REQUEST`.
|
|
1018
|
+
2. Lock acquisition defaults to blocking/queued with timeout + jittered backoff.
|
|
1019
|
+
3. Plan revisions keep existing diffs in worktree; future patch applies are validated against latest accepted plan.
|
|
1020
|
+
4. Supervisor proposes state transitions, MCP validates legality and persists canonical state.
|
|
1021
|
+
5. `collision_policy=block` uses persistent `blocked_queue` with deterministic ordering.
|
|
1022
|
+
6. Precedence is `policy hard constraints > gates profile defaults > plan overrides (tighten-only)`.
|
|
1023
|
+
7. Gate timeout default is 600s when unspecified; transient retry default is 1; policy/schema violations are non-retryable.
|
|
1024
|
+
8. Review artifacts are unmerged worktree diffs; commit+merge happen only through explicit `feature.ready_to_merge`.
|
|
1025
|
+
9. Restart recovery uses lease heartbeats and stale-lease reclamation with deterministic unblock flow.
|
|
1026
|
+
10. Secret handling is default-on scrub/redaction with explicit env allowlist.
|
|
1027
|
+
11. Orchestrator implementation uses Nx + Vitest with 90% line/branch minimum coverage and 100% line/branch target.
|
|
1028
|
+
12. Agent provider/model selection precedence is CLI flags > env vars > `agents.yaml` runtime defaults.
|
|
951
1029
|
|
|
952
1030
|
---
|
|
953
1031
|
|
|
@@ -962,6 +1040,7 @@ aop run [options]
|
|
|
962
1040
|
```
|
|
963
1041
|
|
|
964
1042
|
Required behavior:
|
|
1043
|
+
|
|
965
1044
|
- Starts/attaches MCP connectivity.
|
|
966
1045
|
- Creates one user-facing Orchestrator session.
|
|
967
1046
|
- Resolves input specs (from `-fi`, `-fl`, or default discovery).
|
|
@@ -970,6 +1049,7 @@ Required behavior:
|
|
|
970
1049
|
### 17.2 Input Selection Options
|
|
971
1050
|
|
|
972
1051
|
Supported options:
|
|
1052
|
+
|
|
973
1053
|
- `-fi <path>`: file input. Treat the referenced file as one feature spec and spin up exactly one Agent Cluster.
|
|
974
1054
|
- `-fl <path>`: folder input. Treat all spec files in the folder as feature inputs and spin up one Agent Cluster per resolved file.
|
|
975
1055
|
- `--agent-provider <codex|claude|gemini|custom>`: selects agent runtime provider for orchestrator and worker sessions.
|
|
@@ -977,6 +1057,7 @@ Supported options:
|
|
|
977
1057
|
- `--provider-config-env <ENV_VAR>`: env var name carrying provider credentials/config reference.
|
|
978
1058
|
|
|
979
1059
|
Mutual exclusion and defaults:
|
|
1060
|
+
|
|
980
1061
|
- `-fi` and `-fl` are mutually exclusive.
|
|
981
1062
|
- If both are provided, CLI MUST fail with `error=invalid_cli_args`.
|
|
982
1063
|
- If neither is provided, use canonical discovery (`feature.discover_specs`).
|
|
@@ -997,21 +1078,26 @@ aop run -fl ./specfiles
|
|
|
997
1078
|
### 17.4 Spec Ingestion to Canonical Repo Layout
|
|
998
1079
|
|
|
999
1080
|
For inputs outside `agentic/features/*/spec.md`, Supervisor MUST ingest them into canonical layout:
|
|
1081
|
+
|
|
1000
1082
|
- Derive `feature_id` deterministically from spec filename using this algorithm:
|
|
1083
|
+
|
|
1001
1084
|
1. Start from filename stem (basename without final extension).
|
|
1002
1085
|
2. If the stem ends with `.spec`, remove that suffix.
|
|
1003
1086
|
3. Else if the stem ends with `-spec`, remove that suffix.
|
|
1004
1087
|
4. Resulting value is `feature_id` and MUST be used as both branch name and worktree folder name.
|
|
1005
1088
|
5. Resulting `feature_id` MUST match `^[a-z0-9_][a-z0-9_-]*$`.
|
|
1089
|
+
|
|
1006
1090
|
- Copy source content to `agentic/features/<feature_id>/spec.md`.
|
|
1007
1091
|
- Record source path and source hash in feature state metadata.
|
|
1008
1092
|
- If derived `feature_id` is empty or does not meet naming rules, fail with `error=invalid_feature_slug`.
|
|
1009
1093
|
- If multiple inputs resolve to the same `feature_id`, fail with `error=feature_slug_collision`.
|
|
1010
1094
|
|
|
1011
1095
|
If input path is already canonical (`agentic/features/<feature_id>/spec.md`):
|
|
1096
|
+
|
|
1012
1097
|
- Use existing `feature_id` from path and do not duplicate content.
|
|
1013
1098
|
|
|
1014
1099
|
Examples:
|
|
1100
|
+
|
|
1015
1101
|
- `my_feature.spec.md` -> `feature_id=my_feature`, branch `my_feature`, worktree `.worktrees/my_feature`
|
|
1016
1102
|
- `my_feature-spec.md` -> `feature_id=my_feature`, branch `my_feature`, worktree `.worktrees/my_feature`
|
|
1017
1103
|
- `my_feature.md` -> `feature_id=my_feature`, branch `my_feature`, worktree `.worktrees/my_feature`
|
|
@@ -1032,20 +1118,23 @@ Examples:
|
|
|
1032
1118
|
### 17.7 Agent Provider Selection Contract
|
|
1033
1119
|
|
|
1034
1120
|
Provider selection precedence (highest to lowest):
|
|
1035
|
-
|
|
1036
|
-
|
|
1121
|
+
|
|
1122
|
+
1. CLI flags: `--agent-provider`, `--agent-model`, `--provider-config-env`
|
|
1123
|
+
2. Environment variables:
|
|
1037
1124
|
- `AOP_AGENT_PROVIDER`
|
|
1038
1125
|
- `AOP_AGENT_MODEL`
|
|
1039
1126
|
- `AOP_PROVIDER_CONFIG_ENV`
|
|
1040
|
-
3
|
|
1127
|
+
3. `agentic/orchestrator/agents.yaml` `runtime.*` defaults
|
|
1041
1128
|
|
|
1042
1129
|
Rules:
|
|
1130
|
+
|
|
1043
1131
|
- If no provider can be resolved, CLI MUST fail with `error=agent_provider_not_configured`.
|
|
1044
1132
|
- If provider value is unsupported, CLI MUST fail with `error=unsupported_agent_provider`.
|
|
1045
1133
|
- If provider requires credentials/config and none is available, CLI MUST fail with `error=provider_auth_missing`.
|
|
1046
1134
|
- Supervisor MUST record resolved provider/model in run metadata for auditability.
|
|
1047
1135
|
|
|
1048
1136
|
Recommended additional commands (V1.1):
|
|
1137
|
+
|
|
1049
1138
|
- `aop status` (reads dashboard/status)
|
|
1050
1139
|
- `aop resume` (resume prior run state)
|
|
1051
1140
|
- `aop stop` (graceful shutdown)
|
|
@@ -1214,12 +1303,12 @@ Recommended additional commands (V1.1):
|
|
|
1214
1303
|
"worktree_path": { "type": "string" },
|
|
1215
1304
|
"status": {
|
|
1216
1305
|
"type": "string",
|
|
1217
|
-
"enum": ["planning","building","qa","blocked","ready_to_merge","merged","failed"]
|
|
1306
|
+
"enum": ["planning", "building", "qa", "blocked", "ready_to_merge", "merged", "failed"]
|
|
1218
1307
|
},
|
|
1219
1308
|
"gate_profile": { "type": "string" },
|
|
1220
1309
|
"gates": {
|
|
1221
1310
|
"type": "object",
|
|
1222
|
-
"additionalProperties": { "type": "string", "enum": ["pass","fail","na"] }
|
|
1311
|
+
"additionalProperties": { "type": "string", "enum": ["pass", "fail", "na"] }
|
|
1223
1312
|
},
|
|
1224
1313
|
"locks": {
|
|
1225
1314
|
"type": "object",
|
|
@@ -1230,7 +1319,7 @@ Recommended additional commands (V1.1):
|
|
|
1230
1319
|
},
|
|
1231
1320
|
"collisions": {
|
|
1232
1321
|
"type": "object",
|
|
1233
|
-
"required": ["files","areas","contracts"],
|
|
1322
|
+
"required": ["files", "areas", "contracts"],
|
|
1234
1323
|
"properties": {
|
|
1235
1324
|
"files": { "type": "array", "items": { "type": "object" } },
|
|
1236
1325
|
"areas": { "type": "array", "items": { "type": "object" } },
|
|
@@ -1239,7 +1328,12 @@ Recommended additional commands (V1.1):
|
|
|
1239
1328
|
},
|
|
1240
1329
|
"cluster": {
|
|
1241
1330
|
"type": "object",
|
|
1242
|
-
"required": [
|
|
1331
|
+
"required": [
|
|
1332
|
+
"orchestrator_session_id",
|
|
1333
|
+
"planner_session_id",
|
|
1334
|
+
"builder_session_id",
|
|
1335
|
+
"qa_session_id"
|
|
1336
|
+
],
|
|
1243
1337
|
"properties": {
|
|
1244
1338
|
"orchestrator_session_id": { "type": "string" },
|
|
1245
1339
|
"planner_session_id": { "type": "string" },
|
|
@@ -1249,11 +1343,11 @@ Recommended additional commands (V1.1):
|
|
|
1249
1343
|
},
|
|
1250
1344
|
"role_status": {
|
|
1251
1345
|
"type": "object",
|
|
1252
|
-
"required": ["planner","builder","qa"],
|
|
1346
|
+
"required": ["planner", "builder", "qa"],
|
|
1253
1347
|
"properties": {
|
|
1254
|
-
"planner": { "type": "string", "enum": ["ready","running","blocked","done"] },
|
|
1255
|
-
"builder": { "type": "string", "enum": ["ready","running","blocked","done"] },
|
|
1256
|
-
"qa": { "type": "string", "enum": ["ready","running","blocked","done"] }
|
|
1348
|
+
"planner": { "type": "string", "enum": ["ready", "running", "blocked", "done"] },
|
|
1349
|
+
"builder": { "type": "string", "enum": ["ready", "running", "blocked", "done"] },
|
|
1350
|
+
"qa": { "type": "string", "enum": ["ready", "running", "blocked", "done"] }
|
|
1257
1351
|
}
|
|
1258
1352
|
},
|
|
1259
1353
|
"last_updated": { "type": "string" },
|
|
@@ -1296,6 +1390,7 @@ All MCP tool failures must return:
|
|
|
1296
1390
|
```
|
|
1297
1391
|
|
|
1298
1392
|
Required error codes (minimum set):
|
|
1393
|
+
|
|
1299
1394
|
- `forbidden_tool_for_role`
|
|
1300
1395
|
- `version_conflict`
|
|
1301
1396
|
- `invalid_status_transition`
|
|
@@ -1328,6 +1423,7 @@ Required error codes (minimum set):
|
|
|
1328
1423
|
- `provider_auth_missing`
|
|
1329
1424
|
|
|
1330
1425
|
Error details SHOULD include:
|
|
1426
|
+
|
|
1331
1427
|
- `retryable` boolean
|
|
1332
1428
|
- `requires_human` boolean
|
|
1333
1429
|
- `conflicting_feature_ids` (when relevant)
|