agentic-orchestrator 0.1.28 → 0.2.0
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/.claude/settings.local.json +46 -1
- package/.cortexrc +28 -0
- package/.github/agents/copilot-instructions.md +29 -0
- package/.github/copilot-instructions.md +93 -0
- package/.vscode/settings.json +13 -0
- package/.vscode/tms.code-snippets +223 -0
- package/AGENTS.md +72 -1
- package/Agentic-Orchestrator.iml +12 -11
- package/CLAUDE.md +72 -1
- package/CONSTITUTION.md +504 -0
- package/FUTURE-ENHANCEMENTS.md +85 -0
- package/NEXT-TASKS.md +25 -0
- package/PROMPTS.md +161 -0
- package/README.md +126 -29
- package/agentic/orchestrator/agents.yaml +4 -3
- package/agentic/orchestrator/defaults/policy.defaults.yaml +39 -3
- package/agentic/orchestrator/gates.yaml +15 -3
- package/agentic/orchestrator/policy.yaml +47 -3
- package/agentic/orchestrator/prompts/builder.system.md +69 -20
- package/agentic/orchestrator/prompts/planner-intake.system.md +149 -0
- package/agentic/orchestrator/prompts/planner.system.md +113 -40
- package/agentic/orchestrator/prompts/qa.system.md +73 -18
- package/agentic/orchestrator/prompts/reconciler.system.md +119 -0
- package/agentic/orchestrator/schemas/agents.schema.json +89 -1
- package/agentic/orchestrator/schemas/execution-control.schema.json +242 -0
- package/agentic/orchestrator/schemas/index.schema.json +234 -0
- package/agentic/orchestrator/schemas/intake.review.schema.json +82 -0
- package/agentic/orchestrator/schemas/organizer-ordering-artifact.schema.json +75 -0
- package/agentic/orchestrator/schemas/plan.schema.json +44 -0
- package/agentic/orchestrator/schemas/policy.schema.json +238 -9
- package/agentic/orchestrator/schemas/policy.user.schema.json +129 -1
- package/agentic/orchestrator/schemas/spec.manifest.bootstrap.schema.json +101 -0
- package/agentic/orchestrator/schemas/spec.manifest.verified.schema.json +80 -0
- package/agentic/orchestrator/schemas/state.schema.json +298 -3
- package/agentic/orchestrator/tools/catalog.json +145 -15
- package/agentic/orchestrator/tools/schemas/input/doctor.run.input.schema.json +18 -0
- package/agentic/orchestrator/tools/schemas/input/evidence.latest.input.schema.json +4 -0
- package/agentic/orchestrator/tools/schemas/input/evidence.verify_chain.input.schema.json +13 -0
- package/agentic/orchestrator/tools/schemas/input/feature.intake_submit.input.schema.json +11 -0
- package/agentic/orchestrator/tools/schemas/input/feature.question_answer.input.schema.json +15 -0
- package/agentic/orchestrator/tools/schemas/input/feature.question_create.input.schema.json +21 -0
- package/agentic/orchestrator/tools/schemas/input/feature.question_list.input.schema.json +13 -0
- package/agentic/orchestrator/tools/schemas/input/feature.ready_to_merge.input.schema.json +5 -0
- package/agentic/orchestrator/tools/schemas/input/feature.send_message.input.schema.json +1 -1
- package/agentic/orchestrator/tools/schemas/input/replay.timeline_get.input.schema.json +32 -0
- package/agentic/orchestrator/tools/schemas/input/repo.conflict_abort.input.schema.json +16 -0
- package/agentic/orchestrator/tools/schemas/input/repo.conflict_files.input.schema.json +16 -0
- package/agentic/orchestrator/tools/schemas/input/repo.reconcile_mainline.input.schema.json +37 -0
- package/agentic/orchestrator/tools/schemas/input/repo.resolve_conflict.input.schema.json +40 -0
- package/agentic/orchestrator/tools/schemas/input/runtime.execution_request_list.input.schema.json +7 -0
- package/agentic/orchestrator/tools/schemas/input/runtime.execution_request_submit.input.schema.json +25 -0
- package/agentic/orchestrator/tools/schemas/output/doctor.run.output.schema.json +34 -0
- package/agentic/orchestrator/tools/schemas/output/evidence.verify_chain.output.schema.json +23 -0
- package/agentic/orchestrator/tools/schemas/output/feature.get_context.output.schema.json +62 -2
- package/agentic/orchestrator/tools/schemas/output/feature.intake_submit.output.schema.json +24 -0
- package/agentic/orchestrator/tools/schemas/output/feature.question_answer.output.schema.json +21 -0
- package/agentic/orchestrator/tools/schemas/output/feature.question_create.output.schema.json +12 -0
- package/agentic/orchestrator/tools/schemas/output/feature.question_list.output.schema.json +14 -0
- package/agentic/orchestrator/tools/schemas/output/feature.ready_to_merge.output.schema.json +31 -0
- package/agentic/orchestrator/tools/schemas/output/feature.send_message.output.schema.json +8 -18
- package/agentic/orchestrator/tools/schemas/output/replay.timeline_get.output.schema.json +64 -0
- package/agentic/orchestrator/tools/schemas/output/repo.conflict_abort.output.schema.json +16 -0
- package/agentic/orchestrator/tools/schemas/output/repo.conflict_files.output.schema.json +22 -0
- package/agentic/orchestrator/tools/schemas/output/repo.reconcile_mainline.output.schema.json +61 -0
- package/agentic/orchestrator/tools/schemas/output/repo.resolve_conflict.output.schema.json +19 -0
- package/agentic/orchestrator/tools/schemas/output/report.dashboard.output.schema.json +26 -0
- package/agentic/orchestrator/tools/schemas/output/runtime.execution_request_list.output.schema.json +17 -0
- package/agentic/orchestrator/tools/schemas/output/runtime.execution_request_submit.output.schema.json +24 -0
- package/agentic/orchestrator/tools.md +13 -0
- package/apps/control-plane/scripts/validate-mcp-contracts.ts +1 -1
- package/apps/control-plane/src/application/kernel-tool-wiring.ts +140 -2
- package/apps/control-plane/src/application/services/activity-monitor-service.ts +44 -1
- package/apps/control-plane/src/application/services/bootstrap-manifest-generator-service.ts +251 -0
- package/apps/control-plane/src/application/services/checkpoint-service.ts +87 -27
- package/apps/control-plane/src/application/services/collision-override-service.ts +906 -0
- package/apps/control-plane/src/application/services/collision-queue-service.ts +129 -38
- package/apps/control-plane/src/application/services/cost-tracking-service.ts +94 -0
- package/apps/control-plane/src/application/services/execution-control-service.ts +599 -0
- package/apps/control-plane/src/application/services/feature-deletion-service.ts +37 -1
- package/apps/control-plane/src/application/services/feature-lifecycle-service.ts +182 -4
- package/apps/control-plane/src/application/services/feature-send-message-service.ts +17 -8
- package/apps/control-plane/src/application/services/feature-state-service.ts +191 -6
- package/apps/control-plane/src/application/services/gate-service.ts +121 -2
- package/apps/control-plane/src/application/services/git-reconciliation-service.ts +1591 -0
- package/apps/control-plane/src/application/services/intake-service.ts +1468 -0
- package/apps/control-plane/src/application/services/merge-service.ts +308 -17
- package/apps/control-plane/src/application/services/notifier-service.ts +3 -1
- package/apps/control-plane/src/application/services/performance-analytics-service.ts +75 -0
- package/apps/control-plane/src/application/services/plan-service.ts +336 -20
- package/apps/control-plane/src/application/services/question-service.ts +693 -0
- package/apps/control-plane/src/application/services/reactions-service.ts +73 -17
- package/apps/control-plane/src/application/services/replay-timeline-service.ts +295 -0
- package/apps/control-plane/src/application/services/reporting-service.ts +194 -10
- package/apps/control-plane/src/application/services/run-lease-service.ts +121 -5
- package/apps/control-plane/src/application/services/worktree-watchdog-service.ts +95 -8
- package/apps/control-plane/src/application/tools/tool-metadata.ts +7 -0
- package/apps/control-plane/src/application/usage-types.ts +138 -0
- package/apps/control-plane/src/cli/add-command-handler.ts +162 -0
- package/apps/control-plane/src/cli/answer-command-handler.ts +113 -0
- package/apps/control-plane/src/cli/attach-command-handler.ts +12 -3
- package/apps/control-plane/src/cli/cli-argument-parser.ts +133 -11
- package/apps/control-plane/src/cli/collision-command-handler.ts +113 -0
- package/apps/control-plane/src/cli/command-catalog.ts +479 -0
- package/apps/control-plane/src/cli/complete-command-handler.ts +23 -0
- package/apps/control-plane/src/cli/completion-command-handler.ts +25 -0
- package/apps/control-plane/src/cli/completion-resolver.ts +319 -0
- package/apps/control-plane/src/cli/completion-shell-renderer.ts +58 -0
- package/apps/control-plane/src/cli/dashboard-command-handler.ts +110 -1
- package/apps/control-plane/src/cli/dashboard-runtime-runner.ts +1036 -0
- package/apps/control-plane/src/cli/dashboard-runtime.ts +31 -0
- package/apps/control-plane/src/cli/help-command-handler.ts +17 -185
- package/apps/control-plane/src/cli/init-command-handler.ts +51 -6
- package/apps/control-plane/src/cli/merge-command-handler.ts +200 -0
- package/apps/control-plane/src/cli/questions-command-handler.ts +70 -0
- package/apps/control-plane/src/cli/replay-command-handler.ts +98 -0
- package/apps/control-plane/src/cli/resume-command-handler.ts +231 -16
- package/apps/control-plane/src/cli/retry-command-handler.ts +229 -17
- package/apps/control-plane/src/cli/retry-resume-decision.ts +75 -0
- package/apps/control-plane/src/cli/rollback-command-handler.ts +4 -2
- package/apps/control-plane/src/cli/run-command-handler.ts +35 -1
- package/apps/control-plane/src/cli/spec-ingestion-service.ts +45 -55
- package/apps/control-plane/src/cli/spec-preparation.ts +114 -0
- package/apps/control-plane/src/cli/spec-utils.ts +90 -11
- package/apps/control-plane/src/cli/status-command-handler.ts +122 -0
- package/apps/control-plane/src/cli/types.ts +41 -3
- package/apps/control-plane/src/core/collisions.ts +150 -31
- package/apps/control-plane/src/core/constants.ts +18 -1
- package/apps/control-plane/src/core/error-codes.ts +39 -0
- package/apps/control-plane/src/core/execution-control.ts +56 -0
- package/apps/control-plane/src/core/feature-resume-phase.ts +118 -0
- package/apps/control-plane/src/core/gate-freshness.ts +359 -0
- package/apps/control-plane/src/core/gate-log-extractor.ts +97 -0
- package/apps/control-plane/src/core/gates.ts +90 -1
- package/apps/control-plane/src/core/intake-artifacts.ts +295 -0
- package/apps/control-plane/src/core/kernel-types.ts +11 -0
- package/apps/control-plane/src/core/kernel.ts +604 -16
- package/apps/control-plane/src/core/mainline-conflict.ts +22 -0
- package/apps/control-plane/src/core/merge-repair.ts +149 -0
- package/apps/control-plane/src/core/path-layout.ts +46 -2
- package/apps/control-plane/src/core/path-rules.ts +11 -3
- package/apps/control-plane/src/core/plan-submit-recovery.ts +130 -0
- package/apps/control-plane/src/core/questions.ts +49 -0
- package/apps/control-plane/src/core/runtime-sessions.ts +4 -0
- package/apps/control-plane/src/core/schemas.ts +40 -1
- package/apps/control-plane/src/core/tool-caller.ts +25 -1
- package/apps/control-plane/src/core/utils/index-normalizer.ts +25 -4
- package/apps/control-plane/src/core/worktree-diff.ts +66 -0
- package/apps/control-plane/src/index.ts +29 -1
- package/apps/control-plane/src/interfaces/cli/bootstrap.ts +300 -6
- package/apps/control-plane/src/mcp/kernel-tool-executor.ts +17 -0
- package/apps/control-plane/src/mcp/tool-runtime.ts +63 -4
- package/apps/control-plane/src/providers/api-worker-provider.ts +62 -15
- package/apps/control-plane/src/providers/cli-worker-provider.ts +1037 -61
- package/apps/control-plane/src/providers/output-parsers/generic-output-parser.ts +99 -1
- package/apps/control-plane/src/providers/output-parsers/types.ts +2 -0
- package/apps/control-plane/src/providers/provider-defaults.ts +116 -7
- package/apps/control-plane/src/providers/providers.ts +225 -21
- package/apps/control-plane/src/providers/worker-provider-factory.ts +26 -2
- package/apps/control-plane/src/supervisor/artifact-stager.ts +52 -0
- package/apps/control-plane/src/supervisor/build-wave-executor.ts +477 -166
- package/apps/control-plane/src/supervisor/execution-enrollment-service.ts +408 -0
- package/apps/control-plane/src/supervisor/organizer-enrollment-scheduler.ts +117 -0
- package/apps/control-plane/src/supervisor/organizer-sidecar-service.ts +394 -0
- package/apps/control-plane/src/supervisor/plan-conformance-scorer.ts +2 -5
- package/apps/control-plane/src/supervisor/planner-phase.ts +85 -0
- package/apps/control-plane/src/supervisor/planning-wave-executor.ts +993 -64
- package/apps/control-plane/src/supervisor/prompt-bundle-loader.ts +20 -1
- package/apps/control-plane/src/supervisor/qa-wave-executor.ts +384 -177
- package/apps/control-plane/src/supervisor/run-coordinator.ts +723 -20
- package/apps/control-plane/src/supervisor/runtime.ts +485 -9
- package/apps/control-plane/src/supervisor/session-orchestrator.ts +220 -1
- package/apps/control-plane/src/supervisor/types.ts +152 -1
- package/apps/control-plane/src/supervisor/worker-decision-loop.ts +1030 -92
- package/apps/control-plane/test/activity-monitor.spec.ts +76 -0
- package/apps/control-plane/test/add-command-handler.spec.ts +189 -0
- package/apps/control-plane/test/application/services/feature-state-service.spec.ts +208 -0
- package/apps/control-plane/test/artifact-stager.spec.ts +93 -0
- package/apps/control-plane/test/batch-operations.spec.ts +58 -0
- package/apps/control-plane/test/bootstrap-edge-cases.spec.ts +50 -2
- package/apps/control-plane/test/bootstrap-manifest-generator-service.spec.ts +99 -0
- package/apps/control-plane/test/bootstrap.spec.ts +177 -4
- package/apps/control-plane/test/checkpoint-service.spec.ts +977 -29
- package/apps/control-plane/test/cli-argument-parser.spec.ts +119 -0
- package/apps/control-plane/test/cli-helpers.spec.ts +1202 -12
- package/apps/control-plane/test/cli.unit.spec.ts +797 -16
- package/apps/control-plane/test/collision-command-handler.spec.ts +182 -0
- package/apps/control-plane/test/collision-override-service.spec.ts +878 -0
- package/apps/control-plane/test/collision-queue.spec.ts +430 -2
- package/apps/control-plane/test/collisions.spec.ts +209 -1
- package/apps/control-plane/test/core-utils.spec.ts +61 -0
- package/apps/control-plane/test/cost-tracking.spec.ts +224 -0
- package/apps/control-plane/test/dashboard-api.integration.spec.ts +185 -5
- package/apps/control-plane/test/dashboard-client.spec.ts +948 -0
- package/apps/control-plane/test/dashboard-command.spec.ts +138 -6
- package/apps/control-plane/test/dashboard-runtime-runner.spec.ts +1550 -0
- package/apps/control-plane/test/dashboard-runtime.spec.ts +138 -0
- package/apps/control-plane/test/dashboard-ui-utils.spec.ts +56 -12
- package/apps/control-plane/test/dependency-scheduler.spec.ts +7 -1
- package/apps/control-plane/test/env-file.spec.ts +76 -0
- package/apps/control-plane/test/execution-control-service.spec.ts +535 -0
- package/apps/control-plane/test/execution-enrollment-service.spec.ts +648 -0
- package/apps/control-plane/test/feature-lifecycle.spec.ts +126 -0
- package/apps/control-plane/test/feature-resume-phase.spec.ts +164 -0
- package/apps/control-plane/test/feature-send-message-service.spec.ts +161 -0
- package/apps/control-plane/test/feature-state-service.spec.ts +295 -0
- package/apps/control-plane/test/fs.spec.ts +80 -0
- package/apps/control-plane/test/gate-freshness.spec.ts +590 -0
- package/apps/control-plane/test/gate-log-extractor.spec.ts +170 -0
- package/apps/control-plane/test/gates.spec.ts +108 -0
- package/apps/control-plane/test/git-reconciliation-service.spec.ts +2307 -0
- package/apps/control-plane/test/helpers.ts +65 -0
- package/apps/control-plane/test/incremental-gates.spec.ts +271 -0
- package/apps/control-plane/test/index-normalizer.spec.ts +98 -0
- package/apps/control-plane/test/init-wizard.spec.ts +17 -0
- package/apps/control-plane/test/intake-artifacts.spec.ts +203 -0
- package/apps/control-plane/test/intake-service.spec.ts +3176 -0
- package/apps/control-plane/test/kernel-collision-replay.spec.ts +3 -2
- package/apps/control-plane/test/kernel-tool-executor.spec.ts +77 -0
- package/apps/control-plane/test/kernel-tool-wiring.spec.ts +279 -0
- package/apps/control-plane/test/kernel.branches.spec.ts +15 -2
- package/apps/control-plane/test/kernel.coverage.spec.ts +7 -3
- package/apps/control-plane/test/kernel.coverage2.spec.ts +731 -2
- package/apps/control-plane/test/kernel.spec.ts +464 -2
- package/apps/control-plane/test/mainline-conflict.spec.ts +66 -0
- package/apps/control-plane/test/mcp-helpers.spec.ts +79 -0
- package/apps/control-plane/test/mcp.spec.ts +177 -13
- package/apps/control-plane/test/merge-command-handler.spec.ts +531 -0
- package/apps/control-plane/test/merge-service.spec.ts +570 -4
- package/apps/control-plane/test/notifier-service.spec.ts +26 -0
- package/apps/control-plane/test/organizer-enrollment-scheduler.spec.ts +340 -0
- package/apps/control-plane/test/organizer-ordering-artifact.spec.ts +95 -0
- package/apps/control-plane/test/organizer-sidecar-service.spec.ts +468 -0
- package/apps/control-plane/test/output-loop-detector.spec.ts +6 -0
- package/apps/control-plane/test/path-layout.spec.ts +70 -0
- package/apps/control-plane/test/performance-analytics.spec.ts +124 -0
- package/apps/control-plane/test/plan-conformance-scorer.spec.ts +53 -0
- package/apps/control-plane/test/plan-service.spec.ts +686 -4
- package/apps/control-plane/test/planning-wave-executor.spec.ts +3272 -86
- package/apps/control-plane/test/policy-loader-service.spec.ts +5 -0
- package/apps/control-plane/test/prompt-overlay.spec.ts +65 -0
- package/apps/control-plane/test/provider-command-runner-epipe.spec.ts +64 -0
- package/apps/control-plane/test/providers/api-worker-provider.spec.ts +129 -0
- package/apps/control-plane/test/providers/cli-worker-provider.spec.ts +148 -0
- package/apps/control-plane/test/providers/usage-types.spec.ts +98 -0
- package/apps/control-plane/test/providers.spec.ts +293 -16
- package/apps/control-plane/test/question-command-handlers.spec.ts +156 -0
- package/apps/control-plane/test/question-service.spec.ts +1119 -0
- package/apps/control-plane/test/reactions.spec.ts +114 -0
- package/apps/control-plane/test/replay-command-handler.spec.ts +144 -0
- package/apps/control-plane/test/replay-timeline-service.spec.ts +459 -0
- package/apps/control-plane/test/response.spec.ts +31 -0
- package/apps/control-plane/test/resume-command.spec.ts +757 -9
- package/apps/control-plane/test/retry-resume-decision.spec.ts +133 -0
- package/apps/control-plane/test/rollback-command-handler.spec.ts +334 -0
- package/apps/control-plane/test/rollback-command.spec.ts +120 -0
- package/apps/control-plane/test/run-coordinator.spec.ts +3062 -404
- package/apps/control-plane/test/schemas/state.schema.spec.ts +71 -0
- package/apps/control-plane/test/service-retry-paths.spec.ts +112 -0
- package/apps/control-plane/test/services.spec.ts +472 -2
- package/apps/control-plane/test/session-management.spec.ts +346 -1
- package/apps/control-plane/test/spec-ingestion.spec.ts +102 -28
- package/apps/control-plane/test/spec-preparation.spec.ts +182 -0
- package/apps/control-plane/test/supervisor-collaborators.spec.ts +191 -3
- package/apps/control-plane/test/supervisor.calltool.spec.ts +198 -0
- package/apps/control-plane/test/supervisor.spec.ts +95 -16
- package/apps/control-plane/test/supervisor.unit.spec.ts +385 -18
- package/apps/control-plane/test/tool-runtime.spec.ts +122 -0
- package/apps/control-plane/test/worker-decision-loop.spec.ts +3479 -476
- package/apps/control-plane/test/worker-execution-policy.spec.ts +1416 -6
- package/apps/control-plane/test/worker-provider-adapters.spec.ts +1894 -37
- package/apps/control-plane/test/worker-provider-factory.spec.ts +81 -0
- package/apps/control-plane/test/worktree-watchdog-service.spec.ts +125 -0
- package/apps/control-plane/vitest.config.ts +5 -0
- package/config/agentic/orchestrator/agents.yaml +22 -1
- package/config/agentic/orchestrator/gates.yaml +24 -7
- package/config/agentic/orchestrator/policy.yaml +23 -1
- package/config/agentic/orchestrator/prompts/builder.system.md +69 -20
- package/config/agentic/orchestrator/prompts/organizer.system.md +85 -0
- package/config/agentic/orchestrator/prompts/overrides/builder.claude.md +28 -0
- package/config/agentic/orchestrator/prompts/overrides/builder.codex.md +28 -0
- package/config/agentic/orchestrator/prompts/overrides/planner.claude.md +20 -0
- package/config/agentic/orchestrator/prompts/overrides/planner.codex.md +20 -0
- package/config/agentic/orchestrator/prompts/planner-intake.system.md +149 -0
- package/config/agentic/orchestrator/prompts/planner.system.md +113 -40
- package/config/agentic/orchestrator/prompts/qa.system.md +75 -18
- package/config/agentic/orchestrator/prompts/reconciler.system.md +119 -0
- package/dist/apps/control-plane/application/kernel-tool-wiring.d.ts +26 -2
- package/dist/apps/control-plane/application/kernel-tool-wiring.js +40 -2
- package/dist/apps/control-plane/application/kernel-tool-wiring.js.map +1 -1
- package/dist/apps/control-plane/application/services/activity-monitor-service.js +37 -1
- package/dist/apps/control-plane/application/services/activity-monitor-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/bootstrap-manifest-generator-service.d.ts +4 -0
- package/dist/apps/control-plane/application/services/bootstrap-manifest-generator-service.js +188 -0
- package/dist/apps/control-plane/application/services/bootstrap-manifest-generator-service.js.map +1 -0
- package/dist/apps/control-plane/application/services/checkpoint-service.d.ts +5 -0
- package/dist/apps/control-plane/application/services/checkpoint-service.js +69 -24
- package/dist/apps/control-plane/application/services/checkpoint-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/collision-override-service.d.ts +139 -0
- package/dist/apps/control-plane/application/services/collision-override-service.js +568 -0
- package/dist/apps/control-plane/application/services/collision-override-service.js.map +1 -0
- package/dist/apps/control-plane/application/services/collision-queue-service.d.ts +15 -0
- package/dist/apps/control-plane/application/services/collision-queue-service.js +92 -33
- package/dist/apps/control-plane/application/services/collision-queue-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/cost-tracking-service.d.ts +11 -0
- package/dist/apps/control-plane/application/services/cost-tracking-service.js +75 -0
- package/dist/apps/control-plane/application/services/cost-tracking-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/execution-control-service.d.ts +75 -0
- package/dist/apps/control-plane/application/services/execution-control-service.js +421 -0
- package/dist/apps/control-plane/application/services/execution-control-service.js.map +1 -0
- package/dist/apps/control-plane/application/services/feature-deletion-service.d.ts +1 -0
- package/dist/apps/control-plane/application/services/feature-deletion-service.js +23 -1
- package/dist/apps/control-plane/application/services/feature-deletion-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/feature-lifecycle-service.d.ts +24 -1
- package/dist/apps/control-plane/application/services/feature-lifecycle-service.js +132 -3
- package/dist/apps/control-plane/application/services/feature-lifecycle-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/feature-send-message-service.js +16 -8
- package/dist/apps/control-plane/application/services/feature-send-message-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/feature-state-service.d.ts +36 -0
- package/dist/apps/control-plane/application/services/feature-state-service.js +163 -6
- package/dist/apps/control-plane/application/services/feature-state-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/gate-service.d.ts +2 -1
- package/dist/apps/control-plane/application/services/gate-service.js +95 -5
- package/dist/apps/control-plane/application/services/gate-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/git-reconciliation-service.d.ts +92 -0
- package/dist/apps/control-plane/application/services/git-reconciliation-service.js +1097 -0
- package/dist/apps/control-plane/application/services/git-reconciliation-service.js.map +1 -0
- package/dist/apps/control-plane/application/services/intake-service.d.ts +63 -0
- package/dist/apps/control-plane/application/services/intake-service.js +1050 -0
- package/dist/apps/control-plane/application/services/intake-service.js.map +1 -0
- package/dist/apps/control-plane/application/services/merge-service.d.ts +5 -1
- package/dist/apps/control-plane/application/services/merge-service.js +233 -18
- package/dist/apps/control-plane/application/services/merge-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/notifier-service.d.ts +1 -1
- package/dist/apps/control-plane/application/services/notifier-service.js +1 -0
- package/dist/apps/control-plane/application/services/notifier-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/performance-analytics-service.d.ts +11 -0
- package/dist/apps/control-plane/application/services/performance-analytics-service.js +59 -0
- package/dist/apps/control-plane/application/services/performance-analytics-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/plan-service.d.ts +5 -0
- package/dist/apps/control-plane/application/services/plan-service.js +254 -15
- package/dist/apps/control-plane/application/services/plan-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/question-service.d.ts +72 -0
- package/dist/apps/control-plane/application/services/question-service.js +507 -0
- package/dist/apps/control-plane/application/services/question-service.js.map +1 -0
- package/dist/apps/control-plane/application/services/reactions-service.d.ts +2 -0
- package/dist/apps/control-plane/application/services/reactions-service.js +60 -17
- package/dist/apps/control-plane/application/services/reactions-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/replay-timeline-service.d.ts +39 -0
- package/dist/apps/control-plane/application/services/replay-timeline-service.js +205 -0
- package/dist/apps/control-plane/application/services/replay-timeline-service.js.map +1 -0
- package/dist/apps/control-plane/application/services/reporting-service.d.ts +59 -0
- package/dist/apps/control-plane/application/services/reporting-service.js +121 -9
- package/dist/apps/control-plane/application/services/reporting-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/run-lease-service.d.ts +20 -0
- package/dist/apps/control-plane/application/services/run-lease-service.js +81 -4
- package/dist/apps/control-plane/application/services/run-lease-service.js.map +1 -1
- package/dist/apps/control-plane/application/services/worktree-watchdog-service.d.ts +10 -0
- package/dist/apps/control-plane/application/services/worktree-watchdog-service.js +65 -8
- package/dist/apps/control-plane/application/services/worktree-watchdog-service.js.map +1 -1
- package/dist/apps/control-plane/application/tools/tool-metadata.js +7 -0
- package/dist/apps/control-plane/application/tools/tool-metadata.js.map +1 -1
- package/dist/apps/control-plane/application/usage-types.d.ts +65 -0
- package/dist/apps/control-plane/application/usage-types.js +75 -0
- package/dist/apps/control-plane/application/usage-types.js.map +1 -0
- package/dist/apps/control-plane/cli/add-command-handler.d.ts +18 -0
- package/dist/apps/control-plane/cli/add-command-handler.js +110 -0
- package/dist/apps/control-plane/cli/add-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/answer-command-handler.d.ts +8 -0
- package/dist/apps/control-plane/cli/answer-command-handler.js +96 -0
- package/dist/apps/control-plane/cli/answer-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/attach-command-handler.js +8 -3
- package/dist/apps/control-plane/cli/attach-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/cli-argument-parser.js +131 -11
- package/dist/apps/control-plane/cli/cli-argument-parser.js.map +1 -1
- package/dist/apps/control-plane/cli/collision-command-handler.d.ts +8 -0
- package/dist/apps/control-plane/cli/collision-command-handler.js +90 -0
- package/dist/apps/control-plane/cli/collision-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/command-catalog.d.ts +21 -0
- package/dist/apps/control-plane/cli/command-catalog.js +416 -0
- package/dist/apps/control-plane/cli/command-catalog.js.map +1 -0
- package/dist/apps/control-plane/cli/complete-command-handler.d.ts +15 -0
- package/dist/apps/control-plane/cli/complete-command-handler.js +26 -0
- package/dist/apps/control-plane/cli/complete-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/completion-command-handler.d.ts +8 -0
- package/dist/apps/control-plane/cli/completion-command-handler.js +20 -0
- package/dist/apps/control-plane/cli/completion-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/completion-resolver.d.ts +1 -0
- package/dist/apps/control-plane/cli/completion-resolver.js +250 -0
- package/dist/apps/control-plane/cli/completion-resolver.js.map +1 -0
- package/dist/apps/control-plane/cli/completion-shell-renderer.d.ts +3 -0
- package/dist/apps/control-plane/cli/completion-shell-renderer.js +53 -0
- package/dist/apps/control-plane/cli/completion-shell-renderer.js.map +1 -0
- package/dist/apps/control-plane/cli/dashboard-command-handler.d.ts +1 -0
- package/dist/apps/control-plane/cli/dashboard-command-handler.js +83 -1
- package/dist/apps/control-plane/cli/dashboard-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/dashboard-runtime-runner.d.ts +81 -0
- package/dist/apps/control-plane/cli/dashboard-runtime-runner.js +724 -0
- package/dist/apps/control-plane/cli/dashboard-runtime-runner.js.map +1 -0
- package/dist/apps/control-plane/cli/dashboard-runtime.d.ts +1 -0
- package/dist/apps/control-plane/cli/dashboard-runtime.js +26 -0
- package/dist/apps/control-plane/cli/dashboard-runtime.js.map +1 -0
- package/dist/apps/control-plane/cli/help-command-handler.js +13 -172
- package/dist/apps/control-plane/cli/help-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/init-command-handler.js +51 -6
- package/dist/apps/control-plane/cli/init-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/merge-command-handler.d.ts +8 -0
- package/dist/apps/control-plane/cli/merge-command-handler.js +139 -0
- package/dist/apps/control-plane/cli/merge-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/questions-command-handler.d.ts +8 -0
- package/dist/apps/control-plane/cli/questions-command-handler.js +59 -0
- package/dist/apps/control-plane/cli/questions-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/replay-command-handler.d.ts +15 -0
- package/dist/apps/control-plane/cli/replay-command-handler.js +55 -0
- package/dist/apps/control-plane/cli/replay-command-handler.js.map +1 -0
- package/dist/apps/control-plane/cli/resume-command-handler.d.ts +2 -0
- package/dist/apps/control-plane/cli/resume-command-handler.js +180 -17
- package/dist/apps/control-plane/cli/resume-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/retry-command-handler.js +202 -16
- package/dist/apps/control-plane/cli/retry-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/retry-resume-decision.d.ts +26 -0
- package/dist/apps/control-plane/cli/retry-resume-decision.js +61 -0
- package/dist/apps/control-plane/cli/retry-resume-decision.js.map +1 -0
- package/dist/apps/control-plane/cli/rollback-command-handler.js +3 -2
- package/dist/apps/control-plane/cli/rollback-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/run-command-handler.js +26 -2
- package/dist/apps/control-plane/cli/run-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/spec-ingestion-service.d.ts +2 -0
- package/dist/apps/control-plane/cli/spec-ingestion-service.js +37 -48
- package/dist/apps/control-plane/cli/spec-ingestion-service.js.map +1 -1
- package/dist/apps/control-plane/cli/spec-preparation.d.ts +14 -0
- package/dist/apps/control-plane/cli/spec-preparation.js +81 -0
- package/dist/apps/control-plane/cli/spec-preparation.js.map +1 -0
- package/dist/apps/control-plane/cli/spec-utils.d.ts +4 -0
- package/dist/apps/control-plane/cli/spec-utils.js +70 -11
- package/dist/apps/control-plane/cli/spec-utils.js.map +1 -1
- package/dist/apps/control-plane/cli/status-command-handler.js +69 -0
- package/dist/apps/control-plane/cli/status-command-handler.js.map +1 -1
- package/dist/apps/control-plane/cli/types.d.ts +41 -4
- package/dist/apps/control-plane/cli/types.js +9 -1
- package/dist/apps/control-plane/cli/types.js.map +1 -1
- package/dist/apps/control-plane/core/collisions.d.ts +37 -19
- package/dist/apps/control-plane/core/collisions.js +87 -12
- package/dist/apps/control-plane/core/collisions.js.map +1 -1
- package/dist/apps/control-plane/core/constants.d.ts +17 -1
- package/dist/apps/control-plane/core/constants.js +18 -1
- package/dist/apps/control-plane/core/constants.js.map +1 -1
- package/dist/apps/control-plane/core/error-codes.d.ts +39 -0
- package/dist/apps/control-plane/core/error-codes.js +39 -0
- package/dist/apps/control-plane/core/error-codes.js.map +1 -1
- package/dist/apps/control-plane/core/execution-control.d.ts +45 -0
- package/dist/apps/control-plane/core/execution-control.js +2 -0
- package/dist/apps/control-plane/core/execution-control.js.map +1 -0
- package/dist/apps/control-plane/core/feature-resume-phase.d.ts +3 -0
- package/dist/apps/control-plane/core/feature-resume-phase.js +88 -0
- package/dist/apps/control-plane/core/feature-resume-phase.js.map +1 -0
- package/dist/apps/control-plane/core/gate-freshness.d.ts +48 -0
- package/dist/apps/control-plane/core/gate-freshness.js +267 -0
- package/dist/apps/control-plane/core/gate-freshness.js.map +1 -0
- package/dist/apps/control-plane/core/gate-log-extractor.d.ts +22 -0
- package/dist/apps/control-plane/core/gate-log-extractor.js +66 -0
- package/dist/apps/control-plane/core/gate-log-extractor.js.map +1 -0
- package/dist/apps/control-plane/core/gates.d.ts +11 -2
- package/dist/apps/control-plane/core/gates.js +67 -3
- package/dist/apps/control-plane/core/gates.js.map +1 -1
- package/dist/apps/control-plane/core/intake-artifacts.d.ts +109 -0
- package/dist/apps/control-plane/core/intake-artifacts.js +143 -0
- package/dist/apps/control-plane/core/intake-artifacts.js.map +1 -0
- package/dist/apps/control-plane/core/kernel-types.d.ts +8 -0
- package/dist/apps/control-plane/core/kernel.d.ts +256 -8
- package/dist/apps/control-plane/core/kernel.js +400 -14
- package/dist/apps/control-plane/core/kernel.js.map +1 -1
- package/dist/apps/control-plane/core/mainline-conflict.d.ts +7 -0
- package/dist/apps/control-plane/core/mainline-conflict.js +20 -0
- package/dist/apps/control-plane/core/mainline-conflict.js.map +1 -0
- package/dist/apps/control-plane/core/merge-repair.d.ts +35 -0
- package/dist/apps/control-plane/core/merge-repair.js +99 -0
- package/dist/apps/control-plane/core/merge-repair.js.map +1 -0
- package/dist/apps/control-plane/core/path-layout.d.ts +10 -0
- package/dist/apps/control-plane/core/path-layout.js +32 -2
- package/dist/apps/control-plane/core/path-layout.js.map +1 -1
- package/dist/apps/control-plane/core/path-rules.js +9 -3
- package/dist/apps/control-plane/core/path-rules.js.map +1 -1
- package/dist/apps/control-plane/core/plan-submit-recovery.d.ts +22 -0
- package/dist/apps/control-plane/core/plan-submit-recovery.js +78 -0
- package/dist/apps/control-plane/core/plan-submit-recovery.js.map +1 -0
- package/dist/apps/control-plane/core/questions.d.ts +40 -0
- package/dist/apps/control-plane/core/questions.js +2 -0
- package/dist/apps/control-plane/core/questions.js.map +1 -0
- package/dist/apps/control-plane/core/runtime-sessions.d.ts +4 -0
- package/dist/apps/control-plane/core/schemas.d.ts +2 -0
- package/dist/apps/control-plane/core/schemas.js +31 -1
- package/dist/apps/control-plane/core/schemas.js.map +1 -1
- package/dist/apps/control-plane/core/tool-caller.d.ts +18 -1
- package/dist/apps/control-plane/core/utils/index-normalizer.js +17 -4
- package/dist/apps/control-plane/core/utils/index-normalizer.js.map +1 -1
- package/dist/apps/control-plane/core/worktree-diff.d.ts +4 -0
- package/dist/apps/control-plane/core/worktree-diff.js +52 -0
- package/dist/apps/control-plane/core/worktree-diff.js.map +1 -0
- package/dist/apps/control-plane/index.d.ts +10 -2
- package/dist/apps/control-plane/index.js +9 -2
- package/dist/apps/control-plane/index.js.map +1 -1
- package/dist/apps/control-plane/interfaces/cli/bootstrap.js +236 -6
- package/dist/apps/control-plane/interfaces/cli/bootstrap.js.map +1 -1
- package/dist/apps/control-plane/mcp/kernel-tool-executor.js +16 -0
- package/dist/apps/control-plane/mcp/kernel-tool-executor.js.map +1 -1
- package/dist/apps/control-plane/mcp/tool-runtime.d.ts +5 -0
- package/dist/apps/control-plane/mcp/tool-runtime.js +40 -5
- package/dist/apps/control-plane/mcp/tool-runtime.js.map +1 -1
- package/dist/apps/control-plane/providers/api-worker-provider.d.ts +2 -2
- package/dist/apps/control-plane/providers/api-worker-provider.js +40 -9
- package/dist/apps/control-plane/providers/api-worker-provider.js.map +1 -1
- package/dist/apps/control-plane/providers/cli-worker-provider.d.ts +59 -3
- package/dist/apps/control-plane/providers/cli-worker-provider.js +758 -46
- package/dist/apps/control-plane/providers/cli-worker-provider.js.map +1 -1
- package/dist/apps/control-plane/providers/output-parsers/generic-output-parser.js +91 -1
- package/dist/apps/control-plane/providers/output-parsers/generic-output-parser.js.map +1 -1
- package/dist/apps/control-plane/providers/output-parsers/types.d.ts +2 -0
- package/dist/apps/control-plane/providers/provider-defaults.d.ts +12 -0
- package/dist/apps/control-plane/providers/provider-defaults.js +103 -7
- package/dist/apps/control-plane/providers/provider-defaults.js.map +1 -1
- package/dist/apps/control-plane/providers/providers.d.ts +50 -4
- package/dist/apps/control-plane/providers/providers.js +145 -14
- package/dist/apps/control-plane/providers/providers.js.map +1 -1
- package/dist/apps/control-plane/providers/worker-provider-factory.d.ts +2 -0
- package/dist/apps/control-plane/providers/worker-provider-factory.js +8 -1
- package/dist/apps/control-plane/providers/worker-provider-factory.js.map +1 -1
- package/dist/apps/control-plane/supervisor/artifact-stager.d.ts +5 -0
- package/dist/apps/control-plane/supervisor/artifact-stager.js +45 -0
- package/dist/apps/control-plane/supervisor/artifact-stager.js.map +1 -0
- package/dist/apps/control-plane/supervisor/build-wave-executor.d.ts +24 -1
- package/dist/apps/control-plane/supervisor/build-wave-executor.js +362 -150
- package/dist/apps/control-plane/supervisor/build-wave-executor.js.map +1 -1
- package/dist/apps/control-plane/supervisor/execution-enrollment-service.d.ts +41 -0
- package/dist/apps/control-plane/supervisor/execution-enrollment-service.js +311 -0
- package/dist/apps/control-plane/supervisor/execution-enrollment-service.js.map +1 -0
- package/dist/apps/control-plane/supervisor/organizer-enrollment-scheduler.d.ts +15 -0
- package/dist/apps/control-plane/supervisor/organizer-enrollment-scheduler.js +93 -0
- package/dist/apps/control-plane/supervisor/organizer-enrollment-scheduler.js.map +1 -0
- package/dist/apps/control-plane/supervisor/organizer-sidecar-service.d.ts +44 -0
- package/dist/apps/control-plane/supervisor/organizer-sidecar-service.js +311 -0
- package/dist/apps/control-plane/supervisor/organizer-sidecar-service.js.map +1 -0
- package/dist/apps/control-plane/supervisor/plan-conformance-scorer.js +2 -5
- package/dist/apps/control-plane/supervisor/plan-conformance-scorer.js.map +1 -1
- package/dist/apps/control-plane/supervisor/planner-phase.d.ts +3 -0
- package/dist/apps/control-plane/supervisor/planner-phase.js +70 -0
- package/dist/apps/control-plane/supervisor/planner-phase.js.map +1 -0
- package/dist/apps/control-plane/supervisor/planning-wave-executor.d.ts +42 -0
- package/dist/apps/control-plane/supervisor/planning-wave-executor.js +753 -55
- package/dist/apps/control-plane/supervisor/planning-wave-executor.js.map +1 -1
- package/dist/apps/control-plane/supervisor/prompt-bundle-loader.js +19 -1
- package/dist/apps/control-plane/supervisor/prompt-bundle-loader.js.map +1 -1
- package/dist/apps/control-plane/supervisor/qa-wave-executor.d.ts +21 -0
- package/dist/apps/control-plane/supervisor/qa-wave-executor.js +287 -156
- package/dist/apps/control-plane/supervisor/qa-wave-executor.js.map +1 -1
- package/dist/apps/control-plane/supervisor/run-coordinator.d.ts +30 -1
- package/dist/apps/control-plane/supervisor/run-coordinator.js +561 -17
- package/dist/apps/control-plane/supervisor/run-coordinator.js.map +1 -1
- package/dist/apps/control-plane/supervisor/runtime.d.ts +84 -0
- package/dist/apps/control-plane/supervisor/runtime.js +393 -3
- package/dist/apps/control-plane/supervisor/runtime.js.map +1 -1
- package/dist/apps/control-plane/supervisor/session-orchestrator.d.ts +54 -0
- package/dist/apps/control-plane/supervisor/session-orchestrator.js +176 -1
- package/dist/apps/control-plane/supervisor/session-orchestrator.js.map +1 -1
- package/dist/apps/control-plane/supervisor/types.d.ts +142 -1
- package/dist/apps/control-plane/supervisor/types.js.map +1 -1
- package/dist/apps/control-plane/supervisor/worker-decision-loop.d.ts +68 -2
- package/dist/apps/control-plane/supervisor/worker-decision-loop.js +723 -89
- package/dist/apps/control-plane/supervisor/worker-decision-loop.js.map +1 -1
- package/docs/core/ARCHITECTURE.md +227 -0
- package/docs/core/DECISIONS.md +94 -0
- package/docs/core/DOMAIN-LOGIC.md +60 -0
- package/docs/core/PATTERNS.md +201 -0
- package/docs/core/TROUBLESHOOTING.md +347 -0
- package/docs/core/intentgraph-dependencies.json +39860 -0
- package/docs/core/intentgraph.index.json +46580 -0
- package/docs/plans/2026-03-10-gate-failure-targeted-repair-design.md +224 -0
- package/docs/plans/2026-03-10-gate-failure-targeted-repair.md +1032 -0
- package/docs/superpowers/plans/2026-03-16-provider-cli-config.md +743 -0
- package/docs/superpowers/plans/2026-03-23-reconcile-divergence-fix.md +777 -0
- package/docs/superpowers/plans/2026-03-28-ordering-agent-implementation.md +1754 -0
- package/docs/superpowers/plans/2026-03-29-drop-zone-and-provider-optimization.md +1108 -0
- package/docs/superpowers/plans/2026-03-29-merge-target-feature-branch.md +685 -0
- package/docs/superpowers/plans/2026-03-29-organizer-sidecar-runtime-loop.md +1289 -0
- package/docs/superpowers/specs/2026-03-23-reconcile-divergence-fix-design.md +118 -0
- package/docs/superpowers/specs/2026-03-28-ordering-agent-spec-audit-design.md +50 -0
- package/docs/superpowers/specs/2026-03-29-drop-zone-and-provider-optimization-design.md +254 -0
- package/docs/superpowers/specs/2026-03-29-merge-target-feature-branch-design.md +152 -0
- package/docs/superpowers/specs/2026-03-29-organizer-sidecar-runtime-loop-design.md +225 -0
- package/package.json +3 -2
- package/packages/web-dashboard/package.json +2 -1
- package/packages/web-dashboard/src/app/analytics/page.tsx +36 -2
- package/packages/web-dashboard/src/app/api/actions/route.ts +274 -63
- package/packages/web-dashboard/src/app/api/actions/status/route.ts +35 -0
- package/packages/web-dashboard/src/app/api/analytics/provider/route.ts +18 -0
- package/packages/web-dashboard/src/app/api/collisions/approve/route.ts +58 -0
- package/packages/web-dashboard/src/app/api/features/[id]/checkpoint-diff/route.ts +36 -0
- package/packages/web-dashboard/src/app/api/features/[id]/checkpoints/route.ts +29 -0
- package/packages/web-dashboard/src/app/api/features/[id]/conflicts/abort/route.ts +29 -0
- package/packages/web-dashboard/src/app/api/features/[id]/conflicts/files/route.ts +30 -0
- package/packages/web-dashboard/src/app/api/features/[id]/conflicts/resolve/route.ts +51 -0
- package/packages/web-dashboard/src/app/api/features/[id]/conflicts/route.ts +75 -0
- package/packages/web-dashboard/src/app/api/features/[id]/diff/route.ts +16 -2
- package/packages/web-dashboard/src/app/api/features/[id]/files/route.ts +26 -0
- package/packages/web-dashboard/src/app/api/features/[id]/gate-history/route.ts +27 -0
- package/packages/web-dashboard/src/app/api/features/[id]/genealogy/route.ts +26 -0
- package/packages/web-dashboard/src/app/api/features/[id]/history/run/[runId]/route.ts +20 -0
- package/packages/web-dashboard/src/app/api/features/[id]/history/runs/route.ts +34 -0
- package/packages/web-dashboard/src/app/api/features/[id]/intake-workspace/route.ts +20 -0
- package/packages/web-dashboard/src/app/api/features/[id]/live-output/route.ts +74 -0
- package/packages/web-dashboard/src/app/api/features/[id]/plan/amend/route.ts +21 -0
- package/packages/web-dashboard/src/app/api/features/[id]/plan-progress/route.ts +20 -0
- package/packages/web-dashboard/src/app/api/features/[id]/planner-artifacts/[artifact]/route.ts +78 -0
- package/packages/web-dashboard/src/app/api/features/[id]/planner-lifecycle/route.ts +20 -0
- package/packages/web-dashboard/src/app/api/features/[id]/planning-workspace/route.ts +20 -0
- package/packages/web-dashboard/src/app/api/features/[id]/questions/[questionId]/answer/route.ts +27 -0
- package/packages/web-dashboard/src/app/api/features/[id]/questions/route.ts +18 -0
- package/packages/web-dashboard/src/app/api/features/[id]/review/route.ts +14 -7
- package/packages/web-dashboard/src/app/api/features/[id]/route.ts +57 -2
- package/packages/web-dashboard/src/app/api/features/[id]/spec/route.ts +30 -0
- package/packages/web-dashboard/src/app/api/features/[id]/triage/route.ts +83 -0
- package/packages/web-dashboard/src/app/api/features/[id]/worker-events/route.ts +40 -0
- package/packages/web-dashboard/src/app/api/launch/preview/route.ts +86 -0
- package/packages/web-dashboard/src/app/api/launch/submit/route.ts +180 -0
- package/packages/web-dashboard/src/app/api/mainline/status/route.ts +74 -0
- package/packages/web-dashboard/src/app/api/merge-queue/route.ts +13 -0
- package/packages/web-dashboard/src/app/api/policy/budget/route.ts +14 -0
- package/packages/web-dashboard/src/app/api/projects/route.ts +11 -7
- package/packages/web-dashboard/src/app/api/reconciler/queue/route.ts +47 -0
- package/packages/web-dashboard/src/app/api/run/route.ts +26 -2
- package/packages/web-dashboard/src/app/api/runtime/events/route.ts +227 -0
- package/packages/web-dashboard/src/app/api/runtime/operations/route.ts +269 -0
- package/packages/web-dashboard/src/app/api/runtime/questions/route.ts +11 -0
- package/packages/web-dashboard/src/app/api/runtime/runs/route.ts +80 -0
- package/packages/web-dashboard/src/app/api/status/route.ts +4 -2
- package/packages/web-dashboard/src/app/feature/[id]/page.tsx +32 -42
- package/packages/web-dashboard/src/app/globals.css +34 -3
- package/packages/web-dashboard/src/app/launch/page.tsx +357 -0
- package/packages/web-dashboard/src/app/layout.tsx +23 -1
- package/packages/web-dashboard/src/app/page.tsx +263 -272
- package/packages/web-dashboard/src/components/dashboard/attention-strip.tsx +52 -0
- package/packages/web-dashboard/src/components/dashboard/collision-approval-drawer.tsx +185 -0
- package/packages/web-dashboard/src/components/dashboard/command-center-header.tsx +102 -0
- package/packages/web-dashboard/src/components/dashboard/mainline-status-banner.tsx +84 -0
- package/packages/web-dashboard/src/components/dashboard/merged-archive.tsx +36 -0
- package/packages/web-dashboard/src/components/dashboard/prioritized-queues.tsx +98 -0
- package/packages/web-dashboard/src/components/dashboard/reconciler-queue-card.tsx +115 -0
- package/packages/web-dashboard/src/components/dashboard/secondary-diagnostics-rail.tsx +48 -0
- package/packages/web-dashboard/src/components/dashboard/task-filter-bar.tsx +74 -0
- package/packages/web-dashboard/src/components/dashboard/triage-drawer.tsx +455 -0
- package/packages/web-dashboard/src/components/diff-viewer.tsx +19 -3
- package/packages/web-dashboard/src/components/evidence-viewer.tsx +65 -51
- package/packages/web-dashboard/src/components/feature-card.tsx +90 -7
- package/packages/web-dashboard/src/components/feature-cost-panel.tsx +112 -11
- package/packages/web-dashboard/src/components/feature-list-view.tsx +25 -4
- package/packages/web-dashboard/src/components/features/runtime-inspector/EventsTimelineView.tsx +260 -0
- package/packages/web-dashboard/src/components/features/runtime-inspector/OperationsListView.tsx +172 -0
- package/packages/web-dashboard/src/components/features/runtime-inspector/RuntimeInspectorPanel.tsx +896 -0
- package/packages/web-dashboard/src/components/filter-bar.tsx +7 -39
- package/packages/web-dashboard/src/components/focus/ActionableRiskList.tsx +46 -0
- package/packages/web-dashboard/src/components/focus/AgentRolePerformanceCard.tsx +200 -0
- package/packages/web-dashboard/src/components/focus/BlockedGuidanceBanner.tsx +149 -0
- package/packages/web-dashboard/src/components/focus/CheckpointInspector.tsx +123 -0
- package/packages/web-dashboard/src/components/focus/CheckpointRail.tsx +118 -0
- package/packages/web-dashboard/src/components/focus/CheckpointScrubber.tsx +249 -0
- package/packages/web-dashboard/src/components/focus/CollisionApprovalBanner.tsx +192 -0
- package/packages/web-dashboard/src/components/focus/CollisionRadar.tsx +136 -0
- package/packages/web-dashboard/src/components/focus/ConflictStatusCard.tsx +52 -0
- package/packages/web-dashboard/src/components/focus/ContextSidebar.tsx +108 -0
- package/packages/web-dashboard/src/components/focus/DiagnosisPanel.tsx +68 -0
- package/packages/web-dashboard/src/components/focus/FeatureDecisionBanner.tsx +68 -0
- package/packages/web-dashboard/src/components/focus/FeatureQuestionAnswerPanel.tsx +167 -0
- package/packages/web-dashboard/src/components/focus/FocusHeader.tsx +54 -0
- package/packages/web-dashboard/src/components/focus/FocusLayout.tsx +283 -0
- package/packages/web-dashboard/src/components/focus/GateFlakinessSummary.tsx +144 -0
- package/packages/web-dashboard/src/components/focus/GenealogyTree.tsx +34 -0
- package/packages/web-dashboard/src/components/focus/HeroBlock.tsx +67 -0
- package/packages/web-dashboard/src/components/focus/LiveAgentConsole.tsx +277 -0
- package/packages/web-dashboard/src/components/focus/MergeQueueCard.tsx +78 -0
- package/packages/web-dashboard/src/components/focus/OperationalSummaryCard.tsx +227 -0
- package/packages/web-dashboard/src/components/focus/PinnedActions.tsx +96 -0
- package/packages/web-dashboard/src/components/focus/PlanAmendmentPanel.tsx +250 -0
- package/packages/web-dashboard/src/components/focus/PlanProgressPanel.tsx +133 -0
- package/packages/web-dashboard/src/components/focus/PlannerArtifactViewer.tsx +158 -0
- package/packages/web-dashboard/src/components/focus/PlannerLifecycleHeader.tsx +141 -0
- package/packages/web-dashboard/src/components/focus/ProgressSnapshotCard.tsx +113 -0
- package/packages/web-dashboard/src/components/focus/RecentMaterialChanges.tsx +69 -0
- package/packages/web-dashboard/src/components/focus/RoleLogViewer.tsx +436 -0
- package/packages/web-dashboard/src/components/focus/RunHistoryBrowser.tsx +62 -0
- package/packages/web-dashboard/src/components/focus/SpecViewer.tsx +172 -0
- package/packages/web-dashboard/src/components/focus/TabBar.tsx +33 -0
- package/packages/web-dashboard/src/components/focus/UsageBurnChart.tsx +212 -0
- package/packages/web-dashboard/src/components/focus/VerificationSummaryCard.tsx +122 -0
- package/packages/web-dashboard/src/components/focus/tabs/ChangesTab.tsx +325 -0
- package/packages/web-dashboard/src/components/focus/tabs/ConflictsTab.tsx +395 -0
- package/packages/web-dashboard/src/components/focus/tabs/GatesQaTab.tsx +38 -0
- package/packages/web-dashboard/src/components/focus/tabs/HistoryTab.tsx +213 -0
- package/packages/web-dashboard/src/components/focus/tabs/IntakeTab.tsx +429 -0
- package/packages/web-dashboard/src/components/focus/tabs/OverviewTab.tsx +217 -0
- package/packages/web-dashboard/src/components/focus/tabs/PlanningTab.tsx +390 -0
- package/packages/web-dashboard/src/components/focus/tabs/ReviewTab.tsx +497 -0
- package/packages/web-dashboard/src/components/focus/tabs/RuntimeTab.tsx +213 -0
- package/packages/web-dashboard/src/components/focus/tabs/TranscriptTab.tsx +315 -0
- package/packages/web-dashboard/src/components/gate-results.tsx +2 -2
- package/packages/web-dashboard/src/components/human-input-panel.tsx +33 -57
- package/packages/web-dashboard/src/components/kanban-board.tsx +4 -0
- package/packages/web-dashboard/src/components/launch/launch-draft-card.tsx +131 -0
- package/packages/web-dashboard/src/components/plan-viewer.tsx +147 -69
- package/packages/web-dashboard/src/components/quick-launch-panel.tsx +20 -47
- package/packages/web-dashboard/src/components/summary-bar.tsx +30 -76
- package/packages/web-dashboard/src/lib/aop-client.ts +2484 -36
- package/packages/web-dashboard/src/lib/blocked-state-guidance.ts +475 -0
- package/packages/web-dashboard/src/lib/collision-radar.ts +136 -0
- package/packages/web-dashboard/src/lib/dashboard-action-states.ts +204 -0
- package/packages/web-dashboard/src/lib/dashboard-runtime-client.ts +439 -0
- package/packages/web-dashboard/src/lib/dashboard-utils.ts +179 -18
- package/packages/web-dashboard/src/lib/drop-zone-utils.ts +92 -0
- package/packages/web-dashboard/src/lib/focus-detail-derivations.ts +958 -0
- package/packages/web-dashboard/src/lib/focus-view.ts +300 -0
- package/packages/web-dashboard/src/lib/health-diagnosis.ts +356 -0
- package/packages/web-dashboard/src/lib/launch-contracts.ts +77 -0
- package/packages/web-dashboard/src/lib/launch-markdown.ts +107 -0
- package/packages/web-dashboard/src/lib/launch-page-preview.ts +89 -0
- package/packages/web-dashboard/src/lib/live-feed.ts +1 -1
- package/packages/web-dashboard/src/lib/multi-project-config.ts +33 -0
- package/packages/web-dashboard/src/lib/orchestrator-tools.ts +845 -59
- package/packages/web-dashboard/src/lib/planner-workspace.ts +1285 -0
- package/packages/web-dashboard/src/lib/review-contracts.ts +5 -3
- package/packages/web-dashboard/src/lib/runtime-files.ts +285 -0
- package/packages/web-dashboard/src/lib/tool-catalog.ts +51 -0
- package/packages/web-dashboard/src/lib/types.ts +731 -3
- package/packages/web-dashboard/src/lib/usage-burn.ts +175 -0
- package/packages/web-dashboard/src/lib/worktree-diff.ts +128 -0
- package/packages/web-dashboard/src/styles/dashboard.module.css +1742 -459
- package/packages/web-dashboard/test/api/actions/route.spec.ts +675 -0
- package/packages/web-dashboard/test/api/features/diff.route.spec.ts +57 -0
- package/packages/web-dashboard/test/api/features/feature.route.spec.ts +99 -0
- package/packages/web-dashboard/test/api/features/live-output.route.spec.ts +123 -0
- package/packages/web-dashboard/test/api/features/plan-amend.route.spec.ts +95 -0
- package/packages/web-dashboard/test/api/features/planner-workspaces.route.spec.ts +162 -0
- package/packages/web-dashboard/test/api/features/question-answer.route.spec.ts +99 -0
- package/packages/web-dashboard/test/api/features/triage.route.spec.ts +195 -0
- package/packages/web-dashboard/test/api/launch/preview.route.spec.ts +149 -0
- package/packages/web-dashboard/test/api/launch/submit.route.spec.ts +382 -0
- package/packages/web-dashboard/test/api/runtime/events/route.spec.ts +164 -0
- package/packages/web-dashboard/test/api/runtime/operations/route.spec.ts +156 -0
- package/packages/web-dashboard/test/api/runtime/runs/route.spec.ts +112 -0
- package/packages/web-dashboard/test/components/changes-tab.spec.tsx +76 -0
- package/packages/web-dashboard/test/components/command-center-root.spec.tsx +87 -0
- package/packages/web-dashboard/test/components/diagnosis-panel.spec.tsx +59 -0
- package/packages/web-dashboard/test/components/feature-card.spec.tsx +45 -0
- package/packages/web-dashboard/test/components/focus-layout.spec.tsx +299 -0
- package/packages/web-dashboard/test/components/gate-results.spec.tsx +39 -0
- package/packages/web-dashboard/test/components/gates-qa-tab.spec.tsx +118 -0
- package/packages/web-dashboard/test/components/human-input-panel.spec.tsx +54 -0
- package/packages/web-dashboard/test/components/intake-tab.spec.tsx +210 -0
- package/packages/web-dashboard/test/components/kanban-board.spec.tsx +35 -0
- package/packages/web-dashboard/test/components/launch-draft-card.spec.tsx +54 -0
- package/packages/web-dashboard/test/components/launch-page.spec.tsx +79 -0
- package/packages/web-dashboard/test/components/overview-tab.spec.tsx +236 -0
- package/packages/web-dashboard/test/components/planning-tab.spec.tsx +202 -0
- package/packages/web-dashboard/test/components/review-tab.spec.tsx +169 -0
- package/packages/web-dashboard/test/components/role-log-viewer.spec.ts +42 -0
- package/packages/web-dashboard/test/components/runtime-inspector.spec.tsx +22 -0
- package/packages/web-dashboard/test/components/runtime-tab.spec.tsx +133 -0
- package/packages/web-dashboard/test/components/transcript-tab.spec.tsx +46 -0
- package/packages/web-dashboard/test/components/triage-drawer.spec.tsx +159 -0
- package/packages/web-dashboard/test/lib/aop-client.spec.ts +235 -0
- package/packages/web-dashboard/test/lib/dashboard-runtime-client.spec.ts +144 -0
- package/packages/web-dashboard/test/lib/focus-detail-derivations.spec.ts +314 -0
- package/packages/web-dashboard/test/lib/focus-view.spec.ts +248 -0
- package/packages/web-dashboard/test/lib/health-diagnosis.spec.ts +277 -0
- package/packages/web-dashboard/test/lib/launch-markdown.spec.ts +36 -0
- package/packages/web-dashboard/test/lib/multi-project-config.spec.ts +54 -0
- package/packages/web-dashboard/test/lib/orchestrator-tools.spec.ts +352 -0
- package/packages/web-dashboard/test/lib/planner-workspace.spec.ts +289 -0
- package/packages/web-dashboard/test/lib/worktree-diff.spec.ts +119 -0
- package/packages/web-dashboard/vitest.config.ts +2 -0
- package/spec-files/completed/agentic_orchestrator_add_feature_to_active_execution_spec.md +557 -0
- package/spec-files/completed/agentic_orchestrator_dashboard_command_center_redesign_spec.md +1147 -0
- package/spec-files/completed/agentic_orchestrator_execution_mode_spec.md +18 -16
- package/spec-files/completed/agentic_orchestrator_feature_focus_view_track_a_spec.md +672 -0
- package/spec-files/completed/agentic_orchestrator_feature_focus_view_track_b_spec.md +794 -0
- package/spec-files/completed/agentic_orchestrator_feature_focus_view_track_c_decision_centric_remediation_spec.md +1037 -0
- package/spec-files/completed/agentic_orchestrator_feature_focus_view_ux_redesign_spec.md +1432 -0
- package/spec-files/completed/agentic_orchestrator_focus_plan_tab_intake_planning_workspace_spec.md +921 -0
- package/spec-files/completed/agentic_orchestrator_intentional_collision_override_spec.md +584 -0
- package/spec-files/completed/agentic_orchestrator_interactive_planning_intake_and_requirements_verification_spec.md +1185 -0
- package/spec-files/completed/agentic_orchestrator_reactive_execution_enrollment_spec.md +864 -0
- package/spec-files/{outstanding → completed}/agentic_orchestrator_runtime_inspection_spec.md +92 -19
- package/spec-files/completed/agentic_orchestrator_scope_aware_run_lease_spec.md +408 -0
- package/spec-files/completed/git-reconciliation-engine.md +827 -0
- package/spec-files/outstanding/agentic_orchestrator_dashboard_quick_launch_and_control_surface_spec.md +331 -0
- package/spec-files/outstanding/agentic_orchestrator_enterprise_governance_dashboard_spec.md +16 -6
- package/spec-files/outstanding/agentic_orchestrator_evidence_integrity_doctor_spec.md +60 -9
- package/spec-files/outstanding/agentic_orchestrator_focus_plan_tab_execution_contract_workspace_spec.md +616 -0
- package/spec-files/outstanding/agentic_orchestrator_headless_standby_dashboard_runtime_spec.md +310 -0
- package/spec-files/outstanding/agentic_orchestrator_human_input_interaction_protocol_spec.md +175 -72
- package/spec-files/outstanding/agentic_orchestrator_interactive_rename_cleanup_spec.md +197 -0
- package/spec-files/outstanding/agentic_orchestrator_interactive_resume_and_reconciliation_disposition_spec.md +412 -0
- package/spec-files/outstanding/agentic_orchestrator_knowledge_canary_spec.md +166 -137
- package/spec-files/outstanding/agentic_orchestrator_observability_replay_spec.md +3 -3
- package/spec-files/outstanding/agentic_orchestrator_phase_specific_agent_profiles_and_token_telemetry_spec.md +303 -0
- package/spec-files/outstanding/agentic_orchestrator_planning_review_quality_spec.md +18 -5
- package/spec-files/outstanding/agentic_orchestrator_policy_stratification_spec.md +225 -0
- package/spec-files/outstanding/agentic_orchestrator_quality_adoption_execution_spec.md +77 -50
- package/spec-files/outstanding/agentic_orchestrator_ready_to_merge_branch_handoff_spec.md +724 -0
- package/spec-files/outstanding/agentic_orchestrator_remove_deterministic_mode_spec.md +263 -0
- package/spec-files/outstanding/agentic_orchestrator_request_more_context_and_dashboard_human_input_spec.md +456 -0
- package/spec-files/outstanding/agentic_orchestrator_spec_coverage_and_reconciliation_enforcement_spec.md +1411 -0
- package/spec-files/outstanding/agentic_orchestrator_spec_ordering_agent_spec.md +370 -0
- package/spec-files/outstanding/shadow_workspace_implementation_spec.md +1 -1
- package/spec-files/progress.md +2026 -120
- package/specs/001-runtime-inspection/checklists/requirements.md +35 -0
- package/specs/001-runtime-inspection/design.md +338 -0
- package/specs/001-runtime-inspection/spec.md +95 -0
- package/specs/002-scope-aware-lease/checklists/requirements.md +35 -0
- package/specs/002-scope-aware-lease/contracts/lease-registry.schema.json +101 -0
- package/specs/002-scope-aware-lease/data-model.md +236 -0
- package/specs/002-scope-aware-lease/plan.md +766 -0
- package/specs/002-scope-aware-lease/quickstart.md +150 -0
- package/specs/002-scope-aware-lease/research.md +135 -0
- package/specs/002-scope-aware-lease/spec.md +128 -0
- package/specs/002-scope-aware-lease/tasks.md +767 -0
- package/tsconfig.json +1 -1
- package/vitest.config.ts +28 -0
- package/ARCHITECTURE_ADHERENCE_ANALYSIS.md +0 -871
- package/packages/web-dashboard/next-env.d.ts +0 -6
- package/packages/web-dashboard/src/components/detail-panel.tsx +0 -1124
- package/packages/web-dashboard/src/components/review-workspace.tsx +0 -1162
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_artifact_database_publishing_spec.md +0 -0
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_cli_shell_tab_completion_spec.md +0 -0
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_dashboard_diff_and_agent_console_spec.md +0 -0
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_performance_improvements_spec.md +0 -0
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_persistent_worker_runtime_spec.md +0 -0
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_provider_auth_bootstrap_spec.md +0 -0
- /package/spec-files/{outstanding → completed}/agentic_orchestrator_real_worker_provider_execution_spec.md +0 -0
|
@@ -0,0 +1,1411 @@
|
|
|
1
|
+
# Feature Spec: Spec Coverage and Reconciliation Enforcement
|
|
2
|
+
|
|
3
|
+
> **Purpose of this document**: Define an implementation-ready, platform-agnostic design that closes the gap between `spec.md`, `plan.json`, and post-QA reconciliation by introducing a canonical obligation manifest, planner traceability, and runtime-owned coverage audits.
|
|
4
|
+
|
|
5
|
+
**Version:** 1.1
|
|
6
|
+
**Date:** 2026-03-16
|
|
7
|
+
**Status:** Draft
|
|
8
|
+
**Roadmap Mapping:** M58
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 0. Standards and Dependencies
|
|
13
|
+
|
|
14
|
+
### 0.1 Required Standards
|
|
15
|
+
|
|
16
|
+
All implementation MUST preserve:
|
|
17
|
+
|
|
18
|
+
- deterministic orchestration behavior and normalized error envelopes
|
|
19
|
+
- optimistic concurrency semantics for `plan.json`
|
|
20
|
+
- lock-safe artifact mutation for `state.md`, `plan.json`, and index artifacts
|
|
21
|
+
- MCP/in-process parity for planning behavior
|
|
22
|
+
- backward compatibility for existing features that already have persisted plans
|
|
23
|
+
- zero hidden prompt-only requirements for execution-critical correctness
|
|
24
|
+
- platform-agnostic validation semantics across implementation targets
|
|
25
|
+
|
|
26
|
+
### 0.2 Required Upstream Inputs
|
|
27
|
+
|
|
28
|
+
Implementing agents MUST read:
|
|
29
|
+
|
|
30
|
+
- `apps/control-plane/src/application/services/plan-service.ts`
|
|
31
|
+
- `apps/control-plane/src/application/services/feature-lifecycle-service.ts`
|
|
32
|
+
- `apps/control-plane/src/core/error-codes.ts`
|
|
33
|
+
- `apps/control-plane/src/supervisor/planning-wave-executor.ts`
|
|
34
|
+
- `apps/control-plane/src/supervisor/worker-decision-loop.ts`
|
|
35
|
+
- `apps/control-plane/src/cli/spec-preparation.ts`
|
|
36
|
+
- `apps/control-plane/src/cli/spec-utils.ts`
|
|
37
|
+
- `agentic/orchestrator/schemas/plan.schema.json`
|
|
38
|
+
- `agentic/orchestrator/prompts/planner.system.md`
|
|
39
|
+
- `config/agentic/orchestrator/prompts/planner.system.md`
|
|
40
|
+
- `docs/core/DOMAIN-LOGIC.md`
|
|
41
|
+
- `docs/core/ARCHITECTURE.md`
|
|
42
|
+
- `spec-files/outstanding/agentic_orchestrator_planning_review_quality_spec.md`
|
|
43
|
+
- representative specs from multiple implementation styles:
|
|
44
|
+
- `.aop/features/agentic_orchestrator_feature_focus_view_track_b_spec/spec.md`
|
|
45
|
+
- at least one backend/service-oriented spec
|
|
46
|
+
- at least one CLI or infrastructure-oriented spec
|
|
47
|
+
|
|
48
|
+
### 0.3 Scope
|
|
49
|
+
|
|
50
|
+
This spec implements:
|
|
51
|
+
|
|
52
|
+
- a canonical, deterministic obligation inventory for each spec
|
|
53
|
+
- explicit planner traceability from obligations to planned files/tests/verification
|
|
54
|
+
- hard validation at `plan.submit` and `plan.update`
|
|
55
|
+
- post-QA reconciliation that detects missing obligation coverage, not only gate failures
|
|
56
|
+
- prompt contract changes that reinforce, but do not solely guarantee, correct planner behavior
|
|
57
|
+
- cross-platform fixture coverage proving the model works for TypeScript, Python, Java, and similarly-structured targets
|
|
58
|
+
- rollout controls so this can ship safely in `report_only` mode before becoming blocking
|
|
59
|
+
|
|
60
|
+
Out of scope:
|
|
61
|
+
|
|
62
|
+
- generic semantic parsing of arbitrary prose
|
|
63
|
+
- AST- or symbol-level platform analyzers as a prerequisite for correctness
|
|
64
|
+
- ML or embedding-based similarity scoring
|
|
65
|
+
- builder/QA behavioral redesign outside the minimum hooks needed for coverage enforcement
|
|
66
|
+
- patch gating changes unrelated to plan/spec traceability
|
|
67
|
+
|
|
68
|
+
### 0.4 Problem Statement
|
|
69
|
+
|
|
70
|
+
The current system requires the planner prompt to preserve feature intent and reconcile implementation against the plan and spec. That instruction is necessary but insufficient.
|
|
71
|
+
|
|
72
|
+
Today:
|
|
73
|
+
|
|
74
|
+
- `plan.schema.json` validates structural correctness but does not require traceability from `spec.md` obligations to plan artifacts.
|
|
75
|
+
- `plan.submit` and `plan.update` accept a plan if it is schema-valid and collision-safe, even when concrete deliverables are absent from the plan.
|
|
76
|
+
- `postQaReconciliation` currently adds generic edge-case and QA-checkpoint criteria, but it does not deterministically check whether concrete spec obligations were ever planned.
|
|
77
|
+
|
|
78
|
+
This creates a failure class where:
|
|
79
|
+
|
|
80
|
+
1. `spec.md` names concrete deliverables.
|
|
81
|
+
2. The planner compresses those into a broad summary or incomplete file list.
|
|
82
|
+
3. Builder and QA stay within the accepted plan.
|
|
83
|
+
4. Gates may pass while original feature intent is still incomplete.
|
|
84
|
+
5. The feature merges with scope gaps.
|
|
85
|
+
|
|
86
|
+
### 0.5 Additional Constraint: Platform Agnosticism
|
|
87
|
+
|
|
88
|
+
The orchestrator may manage features targeting:
|
|
89
|
+
|
|
90
|
+
- a TypeScript package
|
|
91
|
+
- a Python package
|
|
92
|
+
- a Java package
|
|
93
|
+
- a shell utility
|
|
94
|
+
- infrastructure or config-only changes
|
|
95
|
+
|
|
96
|
+
The enforcement system MUST NOT depend on knowing platform semantics such as:
|
|
97
|
+
|
|
98
|
+
- whether a deliverable is a React component
|
|
99
|
+
- whether a symbol is a Java class
|
|
100
|
+
- whether a Python file contains a function with a specific name
|
|
101
|
+
|
|
102
|
+
The runtime may validate traceability, planned paths, observed file changes, and gate evidence. It must not require language-specific semantic understanding in order to be correct.
|
|
103
|
+
|
|
104
|
+
### 0.6 Design Principle
|
|
105
|
+
|
|
106
|
+
Execution-critical completeness MUST not depend on prompt obedience or free-form prose interpretation alone.
|
|
107
|
+
|
|
108
|
+
The deterministic boundary must be moved to an explicit obligation contract that the runtime can validate without knowing the implementation platform.
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## 1. Architectural Critique of the Prior Draft
|
|
113
|
+
|
|
114
|
+
### 1.1 Prompt Guidance Exists but Is Non-Authoritative
|
|
115
|
+
|
|
116
|
+
Prompt instructions help, but they do not create a machine-checkable artifact.
|
|
117
|
+
|
|
118
|
+
### 1.2 Raw-Prose Extraction Is Not a Safe Deterministic Boundary
|
|
119
|
+
|
|
120
|
+
The prior draft relied on deterministic extraction from headings, inline code, and success criteria. That is deterministic execution of an inferential parser, not a true deterministic contract.
|
|
121
|
+
|
|
122
|
+
Consequences:
|
|
123
|
+
|
|
124
|
+
- specs with different phrasing become harder or impossible to validate consistently
|
|
125
|
+
- formatting becomes execution-critical
|
|
126
|
+
- enforcement quality varies by writing style rather than requirement intent
|
|
127
|
+
|
|
128
|
+
### 1.3 `spec_coverage` Overloaded Ownership
|
|
129
|
+
|
|
130
|
+
The prior draft used one planner-authored field to represent:
|
|
131
|
+
|
|
132
|
+
- system-known obligations
|
|
133
|
+
- planner intent and mapping
|
|
134
|
+
- runtime coverage status
|
|
135
|
+
|
|
136
|
+
That conflates:
|
|
137
|
+
|
|
138
|
+
- source-of-truth requirements
|
|
139
|
+
- proposed implementation plan
|
|
140
|
+
- observed implementation state
|
|
141
|
+
|
|
142
|
+
These must be separated.
|
|
143
|
+
|
|
144
|
+
### 1.4 The Prior Draft Was Still JS/UI-Biased
|
|
145
|
+
|
|
146
|
+
Examples like `Component: Foo.tsx`, route handlers, tabs, and panels are useful fixtures, but they cannot define the core enforcement model.
|
|
147
|
+
|
|
148
|
+
If the runtime assumes those structures are normative, the feature becomes platform-coupled and fails the architecture requirement.
|
|
149
|
+
|
|
150
|
+
### 1.5 Post-QA Reconciliation Lacked a Deterministic Evidence Model
|
|
151
|
+
|
|
152
|
+
The prior draft asked reconciliation to detect:
|
|
153
|
+
|
|
154
|
+
- missing obligations
|
|
155
|
+
- unimplemented obligations
|
|
156
|
+
- untested obligations
|
|
157
|
+
|
|
158
|
+
but did not define the deterministic evidence sources needed to support those judgments across arbitrary platforms.
|
|
159
|
+
|
|
160
|
+
### 1.6 Rollout Was Too Aggressive
|
|
161
|
+
|
|
162
|
+
Making new fields immediately required at the schema level would break planner submissions during migration and would not account for:
|
|
163
|
+
|
|
164
|
+
- planner sanitizer updates
|
|
165
|
+
- old features
|
|
166
|
+
- old specs with no structured obligation inventory
|
|
167
|
+
- gradual calibration of false positives and false negatives
|
|
168
|
+
|
|
169
|
+
---
|
|
170
|
+
|
|
171
|
+
## 2. Revised Target Design
|
|
172
|
+
|
|
173
|
+
## 2.1 Ownership Model
|
|
174
|
+
|
|
175
|
+
Split the model into three artifacts:
|
|
176
|
+
|
|
177
|
+
1. **System-owned spec manifest**
|
|
178
|
+
- canonical list of obligations
|
|
179
|
+
- independent of the planner
|
|
180
|
+
2. **Planner-owned plan trace**
|
|
181
|
+
- planner’s mapping from obligations to planned scope
|
|
182
|
+
3. **Runtime-owned coverage audit**
|
|
183
|
+
- runtime-observed status during reconciliation
|
|
184
|
+
|
|
185
|
+
## 2.2 Canonical Source of Truth
|
|
186
|
+
|
|
187
|
+
The runtime MUST validate against a canonical obligation inventory, not against raw prose directly.
|
|
188
|
+
|
|
189
|
+
The canonical inventory may be supplied in one of two equivalent forms:
|
|
190
|
+
|
|
191
|
+
- `spec.manifest.json` sidecar adjacent to `spec.md`
|
|
192
|
+
- a structured `Obligation Inventory` block embedded in `spec.md` and materialized into the sidecar during spec preparation
|
|
193
|
+
|
|
194
|
+
At runtime, only the materialized manifest is authoritative.
|
|
195
|
+
|
|
196
|
+
## 2.3 Platform-Agnostic Contract Rule
|
|
197
|
+
|
|
198
|
+
The manifest and plan trace must be expressible without platform-specific semantics.
|
|
199
|
+
|
|
200
|
+
The core contract uses only:
|
|
201
|
+
|
|
202
|
+
- stable obligation IDs
|
|
203
|
+
- human-readable titles
|
|
204
|
+
- generic categories
|
|
205
|
+
- planned repository paths
|
|
206
|
+
- planned verification references
|
|
207
|
+
|
|
208
|
+
The validator may reason about:
|
|
209
|
+
|
|
210
|
+
- path membership
|
|
211
|
+
- path existence
|
|
212
|
+
- touched files in diffs/checkpoints
|
|
213
|
+
- planned test files
|
|
214
|
+
- gate evidence
|
|
215
|
+
- explicit verification references
|
|
216
|
+
|
|
217
|
+
The validator must not require:
|
|
218
|
+
|
|
219
|
+
- AST parsing
|
|
220
|
+
- symbol resolution
|
|
221
|
+
- framework-specific metadata
|
|
222
|
+
- language-specific naming conventions
|
|
223
|
+
|
|
224
|
+
## 2.4 Optional Adapter Rule
|
|
225
|
+
|
|
226
|
+
Platform-specific analyzers may be added later as optional evidence adapters.
|
|
227
|
+
|
|
228
|
+
Examples:
|
|
229
|
+
|
|
230
|
+
- Java test report adapter
|
|
231
|
+
- Python pytest result adapter
|
|
232
|
+
- TypeScript symbol inventory adapter
|
|
233
|
+
|
|
234
|
+
These adapters are advisory unless a future policy explicitly enables them. Core correctness must not depend on them.
|
|
235
|
+
|
|
236
|
+
## 2.5 Rollout Rule
|
|
237
|
+
|
|
238
|
+
This feature MUST ship with policy-controlled phases:
|
|
239
|
+
|
|
240
|
+
- `off`
|
|
241
|
+
- `report_only`
|
|
242
|
+
- `enforce`
|
|
243
|
+
|
|
244
|
+
New specs may opt into enforcement earlier than legacy specs, but the default rollout must be safe.
|
|
245
|
+
|
|
246
|
+
---
|
|
247
|
+
|
|
248
|
+
## 3. Contracts and Artifacts
|
|
249
|
+
|
|
250
|
+
## 3.1 New Artifact: `spec.manifest.json`
|
|
251
|
+
|
|
252
|
+
Location:
|
|
253
|
+
|
|
254
|
+
- `.aop/features/<feature_id>/spec.manifest.json`
|
|
255
|
+
|
|
256
|
+
This artifact is system-owned and deterministic.
|
|
257
|
+
|
|
258
|
+
Example:
|
|
259
|
+
|
|
260
|
+
```json
|
|
261
|
+
{
|
|
262
|
+
"feature_id": "example_feature",
|
|
263
|
+
"manifest_version": 1,
|
|
264
|
+
"obligations": [
|
|
265
|
+
{
|
|
266
|
+
"obligation_id": "OBL-001",
|
|
267
|
+
"title": "Provide collision-risk visualization",
|
|
268
|
+
"category": "artifact",
|
|
269
|
+
"source_ref": "§C",
|
|
270
|
+
"verification_hint": "unit_or_integration"
|
|
271
|
+
},
|
|
272
|
+
{
|
|
273
|
+
"obligation_id": "OBL-002",
|
|
274
|
+
"title": "Expose feature files endpoint",
|
|
275
|
+
"category": "endpoint",
|
|
276
|
+
"source_ref": "§C",
|
|
277
|
+
"verification_hint": "route_contract"
|
|
278
|
+
}
|
|
279
|
+
]
|
|
280
|
+
}
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
### 3.1.1 Required Fields
|
|
284
|
+
|
|
285
|
+
Each obligation MUST include:
|
|
286
|
+
|
|
287
|
+
- `obligation_id`
|
|
288
|
+
- `title`
|
|
289
|
+
- `category`
|
|
290
|
+
- `source_ref`
|
|
291
|
+
|
|
292
|
+
Optional:
|
|
293
|
+
|
|
294
|
+
- `verification_hint`
|
|
295
|
+
- `notes`
|
|
296
|
+
|
|
297
|
+
### 3.1.2 Allowed `category` Values
|
|
298
|
+
|
|
299
|
+
Use platform-agnostic values only:
|
|
300
|
+
|
|
301
|
+
- `artifact`
|
|
302
|
+
- `endpoint`
|
|
303
|
+
- `workflow`
|
|
304
|
+
- `behavior`
|
|
305
|
+
- `integration`
|
|
306
|
+
- `contract`
|
|
307
|
+
- `verification`
|
|
308
|
+
|
|
309
|
+
Do not use platform-coupled categories like `react_component`, `spring_controller`, or `python_function`.
|
|
310
|
+
|
|
311
|
+
## 3.2 `plan.json` Extension: `plan_trace`
|
|
312
|
+
|
|
313
|
+
Add planner-owned field:
|
|
314
|
+
|
|
315
|
+
```json
|
|
316
|
+
{
|
|
317
|
+
"plan_trace": [
|
|
318
|
+
{
|
|
319
|
+
"obligation_id": "OBL-001",
|
|
320
|
+
"disposition": "in_scope",
|
|
321
|
+
"planned_paths": ["packages/web-dashboard/src/components/focus/CollisionRadar.tsx"],
|
|
322
|
+
"planned_test_paths": [
|
|
323
|
+
"packages/web-dashboard/test/components/mission-control-panels.spec.tsx"
|
|
324
|
+
],
|
|
325
|
+
"planned_verification": ["full:test", "full:typecheck"],
|
|
326
|
+
"notes": "Implemented as an overview-panel artifact."
|
|
327
|
+
}
|
|
328
|
+
]
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
### 3.2.1 Required Fields
|
|
333
|
+
|
|
334
|
+
Each trace entry MUST include:
|
|
335
|
+
|
|
336
|
+
- `obligation_id`
|
|
337
|
+
- `disposition`
|
|
338
|
+
- `planned_paths`
|
|
339
|
+
- `notes`
|
|
340
|
+
|
|
341
|
+
Optional:
|
|
342
|
+
|
|
343
|
+
- `planned_test_paths`
|
|
344
|
+
- `planned_verification`
|
|
345
|
+
|
|
346
|
+
### 3.2.2 Allowed `disposition` Values
|
|
347
|
+
|
|
348
|
+
- `in_scope`
|
|
349
|
+
- `deferred`
|
|
350
|
+
- `out_of_scope`
|
|
351
|
+
|
|
352
|
+
### 3.2.3 Validation Rules
|
|
353
|
+
|
|
354
|
+
For `in_scope`:
|
|
355
|
+
|
|
356
|
+
- `planned_paths.length >= 1`
|
|
357
|
+
- at least one `planned_path` MUST appear in `files.create`, `files.modify`, or `files.delete`
|
|
358
|
+
|
|
359
|
+
For `deferred|out_of_scope`:
|
|
360
|
+
|
|
361
|
+
- `notes` MUST explain why
|
|
362
|
+
|
|
363
|
+
## 3.3 Runtime-Owned Artifact: `coverage-audit.json`
|
|
364
|
+
|
|
365
|
+
Location:
|
|
366
|
+
|
|
367
|
+
- `.aop/features/<feature_id>/coverage-audit.json`
|
|
368
|
+
|
|
369
|
+
Purpose:
|
|
370
|
+
|
|
371
|
+
- record runtime-observed traceability status
|
|
372
|
+
- support post-QA reconciliation deterministically
|
|
373
|
+
|
|
374
|
+
Example:
|
|
375
|
+
|
|
376
|
+
```json
|
|
377
|
+
{
|
|
378
|
+
"feature_id": "example_feature",
|
|
379
|
+
"audit_version": 1,
|
|
380
|
+
"entries": [
|
|
381
|
+
{
|
|
382
|
+
"obligation_id": "OBL-001",
|
|
383
|
+
"trace_status": "mapped",
|
|
384
|
+
"implementation_evidence": {
|
|
385
|
+
"planned_paths_exist": true,
|
|
386
|
+
"planned_paths_touched": true
|
|
387
|
+
},
|
|
388
|
+
"verification_evidence": {
|
|
389
|
+
"planned_test_paths_exist": true,
|
|
390
|
+
"gate_evidence_present": true
|
|
391
|
+
},
|
|
392
|
+
"audit_status": "covered"
|
|
393
|
+
}
|
|
394
|
+
]
|
|
395
|
+
}
|
|
396
|
+
```
|
|
397
|
+
|
|
398
|
+
Allowed `audit_status`:
|
|
399
|
+
|
|
400
|
+
- `covered`
|
|
401
|
+
- `missing_trace`
|
|
402
|
+
- `scope_only`
|
|
403
|
+
- `verification_missing`
|
|
404
|
+
- `evidence_missing`
|
|
405
|
+
|
|
406
|
+
## 3.4 Policy Additions
|
|
407
|
+
|
|
408
|
+
Add policy section:
|
|
409
|
+
|
|
410
|
+
```yaml
|
|
411
|
+
planning:
|
|
412
|
+
spec_traceability:
|
|
413
|
+
mode: report_only # off | report_only | enforce
|
|
414
|
+
require_manifest_for_new_specs: true
|
|
415
|
+
allow_legacy_specs_without_manifest: true
|
|
416
|
+
block_on_missing_trace: true
|
|
417
|
+
block_on_verification_missing: false
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
Normative behavior:
|
|
421
|
+
|
|
422
|
+
- `off`: no manifest/trace enforcement
|
|
423
|
+
- `report_only`: compute findings, log them, do not block
|
|
424
|
+
- `enforce`: reject plan admission and force reconciliation updates according to policy
|
|
425
|
+
|
|
426
|
+
## 3.5 Error Codes
|
|
427
|
+
|
|
428
|
+
Add typed errors:
|
|
429
|
+
|
|
430
|
+
- `SPEC_MANIFEST_MISSING`
|
|
431
|
+
- `SPEC_MANIFEST_INVALID`
|
|
432
|
+
- `PLAN_TRACE_MISSING`
|
|
433
|
+
- `PLAN_TRACE_INVALID`
|
|
434
|
+
- `PLAN_TRACE_INCOMPLETE`
|
|
435
|
+
|
|
436
|
+
These errors must include:
|
|
437
|
+
|
|
438
|
+
- `retryable`
|
|
439
|
+
- `requires_human`
|
|
440
|
+
- deterministic finding lists
|
|
441
|
+
- suggested next actions
|
|
442
|
+
|
|
443
|
+
---
|
|
444
|
+
|
|
445
|
+
## 4. Manifest Generation and Materialization
|
|
446
|
+
|
|
447
|
+
## 4.0 Architecture Decision: Separate Inference From Enforcement
|
|
448
|
+
|
|
449
|
+
Manifest creation from arbitrary `spec.md` is not intrinsically deterministic in the strong architectural sense.
|
|
450
|
+
|
|
451
|
+
The system may deterministically execute an extraction algorithm, but it cannot deterministically guarantee that the extracted obligations are the true, complete intent of arbitrary prose.
|
|
452
|
+
|
|
453
|
+
Therefore this feature MUST separate:
|
|
454
|
+
|
|
455
|
+
1. **bootstrap inference**
|
|
456
|
+
- infer candidate obligations from `spec.md`
|
|
457
|
+
- inherently heuristic / non-authoritative
|
|
458
|
+
2. **verified contract**
|
|
459
|
+
- explicit obligation artifact that runtime may enforce against
|
|
460
|
+
|
|
461
|
+
This distinction is mandatory.
|
|
462
|
+
|
|
463
|
+
Normative rules:
|
|
464
|
+
|
|
465
|
+
- do **not** model arbitrary-prose extraction as if it were guaranteed truth
|
|
466
|
+
- do **not** let an inferential bootstrap artifact masquerade as an enforceable manifest
|
|
467
|
+
- do **not** require a new long-lived `PromptIntakeAgent` for M58
|
|
468
|
+
- if future policy allows model-assisted extraction, it remains optional and non-authoritative until promotion
|
|
469
|
+
|
|
470
|
+
## 4.1 Generation Principle
|
|
471
|
+
|
|
472
|
+
The user provides only `spec.md`.
|
|
473
|
+
|
|
474
|
+
From that input, the control plane may generate a **bootstrap manifest proposal**, not an automatically-enforceable contract.
|
|
475
|
+
|
|
476
|
+
The generation pipeline is intentionally two-stage:
|
|
477
|
+
|
|
478
|
+
1. **bootstrap proposal generation**
|
|
479
|
+
- the system parses `spec.md`
|
|
480
|
+
- the system infers candidate obligations
|
|
481
|
+
- the output is persisted as a non-authoritative proposal artifact
|
|
482
|
+
2. **verification / promotion**
|
|
483
|
+
- the proposal is either:
|
|
484
|
+
- promoted by structured-spec evidence
|
|
485
|
+
- promoted by explicit review/acceptance
|
|
486
|
+
- or retained as bootstrap-only
|
|
487
|
+
- only after promotion does it become enforceable
|
|
488
|
+
|
|
489
|
+
This keeps user burden low without pretending that arbitrary prose can deterministically yield an authoritative manifest.
|
|
490
|
+
|
|
491
|
+
## 4.1.1 Actual System Flow
|
|
492
|
+
|
|
493
|
+
The concrete system flow should be:
|
|
494
|
+
|
|
495
|
+
1. user provides `spec.md`
|
|
496
|
+
2. feature is ingested / canonicalized into `.aop/features/<feature_id>/spec.md`
|
|
497
|
+
3. control plane checks for:
|
|
498
|
+
- bootstrap proposal artifact
|
|
499
|
+
- verified manifest artifact
|
|
500
|
+
4. if no bootstrap artifact exists, control plane runs proposal generation over `spec.md`
|
|
501
|
+
5. generator persists `spec.manifest.bootstrap.json`
|
|
502
|
+
6. control plane attempts promotion if policy and evidence allow it
|
|
503
|
+
7. planner receives:
|
|
504
|
+
- `spec.md`
|
|
505
|
+
- bootstrap manifest proposal
|
|
506
|
+
- verified manifest, if one exists
|
|
507
|
+
8. planner produces `plan.json` including `plan_trace`
|
|
508
|
+
9. `PlanService` validates:
|
|
509
|
+
- against `spec.manifest.verified.json` in `enforce` mode
|
|
510
|
+
- against bootstrap proposal only in `report_only` mode, unless policy explicitly allows auto-promotion
|
|
511
|
+
10. reconciliation later audits implementation and verification evidence against the same verified manifest when present, or against bootstrap proposal in advisory mode
|
|
512
|
+
|
|
513
|
+
This is the intended answer to:
|
|
514
|
+
|
|
515
|
+
- "How do we actually make the manifest in the first place within the system?"
|
|
516
|
+
|
|
517
|
+
Answer:
|
|
518
|
+
|
|
519
|
+
- **the control plane makes a bootstrap proposal automatically from `spec.md`, then promotes it only when it becomes trustworthy enough to enforce**
|
|
520
|
+
|
|
521
|
+
## 4.2 Where Generation Happens
|
|
522
|
+
|
|
523
|
+
Bootstrap proposal generation MUST occur at the earliest stable artifact boundary after spec ingestion and before plan enforcement.
|
|
524
|
+
|
|
525
|
+
Preferred insertion points:
|
|
526
|
+
|
|
527
|
+
- during spec preparation / canonical spec ingestion
|
|
528
|
+
- or immediately before the first `plan.submit` for a feature that has no manifest yet
|
|
529
|
+
|
|
530
|
+
Normative behavior:
|
|
531
|
+
|
|
532
|
+
- if `spec.manifest.verified.json` already exists, runtime uses it for enforcement
|
|
533
|
+
- else if `spec.manifest.bootstrap.json` exists, runtime uses it for advisory/report-only traceability unless policy allows promotion
|
|
534
|
+
- else runtime generates `spec.manifest.bootstrap.json` from `spec.md`
|
|
535
|
+
- runtime must persist generated artifacts rather than reparsing prose on every decision
|
|
536
|
+
|
|
537
|
+
Preferred integration points, in order:
|
|
538
|
+
|
|
539
|
+
1. spec ingestion / feature initialization path
|
|
540
|
+
2. first `feature.get_context` call for a feature with missing manifest
|
|
541
|
+
3. immediately before first `plan.submit`, as a fallback only
|
|
542
|
+
|
|
543
|
+
The earlier the bootstrap proposal is generated, the better, because the planner should see the same candidate obligations the runtime will later audit or enforce after promotion.
|
|
544
|
+
|
|
545
|
+
## 4.2.1 Required Runtime Ownership
|
|
546
|
+
|
|
547
|
+
The following responsibilities must be explicit in implementation:
|
|
548
|
+
|
|
549
|
+
- **Spec ingestion / bootstrap layer**
|
|
550
|
+
- ensure `spec.md` exists in canonical feature location
|
|
551
|
+
- trigger bootstrap proposal generation when needed
|
|
552
|
+
- **Bootstrap manifest proposal service**
|
|
553
|
+
- produce and persist `spec.manifest.bootstrap.json`
|
|
554
|
+
- **Manifest verification / promotion service**
|
|
555
|
+
- decide whether a bootstrap proposal may become `spec.manifest.verified.json`
|
|
556
|
+
- **Feature context provider**
|
|
557
|
+
- return `spec`, bootstrap proposal, and verified manifest to the planner
|
|
558
|
+
- **Plan validator**
|
|
559
|
+
- validate `plan_trace` against the verified manifest when enforcement applies
|
|
560
|
+
- **Reconciliation loop**
|
|
561
|
+
- audit implementation/verification progress against the verified manifest when present, or advisory bootstrap proposal when not
|
|
562
|
+
|
|
563
|
+
This avoids ambiguity about where the manifest “comes from.”
|
|
564
|
+
|
|
565
|
+
## 4.3 Bootstrap Proposal Service Responsibilities
|
|
566
|
+
|
|
567
|
+
Create a deterministic manifest-generation service, for example:
|
|
568
|
+
|
|
569
|
+
- `apps/control-plane/src/application/services/spec-manifest-proposal-service.ts`
|
|
570
|
+
|
|
571
|
+
Responsibilities:
|
|
572
|
+
|
|
573
|
+
- parse `spec.md`
|
|
574
|
+
- infer candidate obligations from high-signal spec structures
|
|
575
|
+
- normalize candidate obligations into generic categories
|
|
576
|
+
- assign stable obligation IDs
|
|
577
|
+
- emit confidence metadata and extraction provenance
|
|
578
|
+
- persist the materialized `spec.manifest.bootstrap.json`
|
|
579
|
+
|
|
580
|
+
## 4.3.1 Bootstrap Proposal Interface
|
|
581
|
+
|
|
582
|
+
The implementation should define a narrow system-owned interface along these lines:
|
|
583
|
+
|
|
584
|
+
```ts
|
|
585
|
+
interface SpecManifestProposalPort {
|
|
586
|
+
proposeFromSpec(input: {
|
|
587
|
+
featureId: string;
|
|
588
|
+
specText: string;
|
|
589
|
+
existingBootstrapManifest?: BootstrapManifest | null;
|
|
590
|
+
}): Promise<BootstrapManifestProposalResult>;
|
|
591
|
+
}
|
|
592
|
+
```
|
|
593
|
+
|
|
594
|
+
Where `BootstrapManifestProposalResult` contains:
|
|
595
|
+
|
|
596
|
+
- `bootstrapManifest`
|
|
597
|
+
- `created`
|
|
598
|
+
- `updated`
|
|
599
|
+
- `generation_mode`
|
|
600
|
+
- `findings`
|
|
601
|
+
|
|
602
|
+
The key architectural point is:
|
|
603
|
+
|
|
604
|
+
- this is an application service producing a proposal artifact, not an agent session and not an authoritative verifier
|
|
605
|
+
|
|
606
|
+
## 4.3.2 Manifest Verification Interface
|
|
607
|
+
|
|
608
|
+
The implementation should also define a distinct promotion interface:
|
|
609
|
+
|
|
610
|
+
```ts
|
|
611
|
+
interface ManifestVerificationPort {
|
|
612
|
+
promoteToVerified(input: {
|
|
613
|
+
featureId: string;
|
|
614
|
+
bootstrapManifest: BootstrapManifest;
|
|
615
|
+
specText: string;
|
|
616
|
+
policyMode: 'off' | 'report_only' | 'enforce';
|
|
617
|
+
}): Promise<ManifestVerificationResult>;
|
|
618
|
+
}
|
|
619
|
+
```
|
|
620
|
+
|
|
621
|
+
`ManifestVerificationResult` should include:
|
|
622
|
+
|
|
623
|
+
- `verifiedManifest` or `null`
|
|
624
|
+
- `promoted`
|
|
625
|
+
- `promotion_basis`
|
|
626
|
+
- `blocking_findings`
|
|
627
|
+
- `advisory_findings`
|
|
628
|
+
|
|
629
|
+
This makes the uncertainty boundary explicit in the API surface.
|
|
630
|
+
|
|
631
|
+
## 4.3.3 Initial Invocation Sites
|
|
632
|
+
|
|
633
|
+
The implementation plan should explicitly wire the generator into one of these existing seams:
|
|
634
|
+
|
|
635
|
+
- feature lifecycle / spec ingestion service
|
|
636
|
+
- feature bootstrap path
|
|
637
|
+
- context loading path before planner sees the feature
|
|
638
|
+
|
|
639
|
+
Preferred behavior:
|
|
640
|
+
|
|
641
|
+
- generate bootstrap proposal once eagerly when the feature is created
|
|
642
|
+
- regenerate bootstrap proposal only when `spec.md` changes or the proposal is missing/invalid
|
|
643
|
+
- attempt promotion only when policy or explicit workflow requests it
|
|
644
|
+
|
|
645
|
+
The system should not regenerate bootstrap or verified manifests opportunistically on every planner turn.
|
|
646
|
+
|
|
647
|
+
## 4.4 Inference Inputs
|
|
648
|
+
|
|
649
|
+
The generator may infer obligations only from deterministic textual structures already common in repo specs, such as:
|
|
650
|
+
|
|
651
|
+
- section headings
|
|
652
|
+
- subsection headings
|
|
653
|
+
- tables
|
|
654
|
+
- numbered implementation steps
|
|
655
|
+
- endpoint contract sections
|
|
656
|
+
- explicit “success criteria” sections
|
|
657
|
+
- inline code identifiers inside those structures
|
|
658
|
+
|
|
659
|
+
It must not rely on:
|
|
660
|
+
|
|
661
|
+
- implementation-language parsing
|
|
662
|
+
- repository ASTs
|
|
663
|
+
- framework-specific symbol resolution
|
|
664
|
+
- probabilistic embedding similarity
|
|
665
|
+
|
|
666
|
+
## 4.5 Initial Inference Rules
|
|
667
|
+
|
|
668
|
+
The initial generator should be intentionally narrow and platform-agnostic.
|
|
669
|
+
|
|
670
|
+
It SHOULD infer obligations from constructs such as:
|
|
671
|
+
|
|
672
|
+
- `### Component: \`Foo.tsx\``-> category`artifact`
|
|
673
|
+
- `### Pure Function: \`deriveCollisionRisk\``-> category`artifact`
|
|
674
|
+
- `### GET /api/...` -> category `endpoint`
|
|
675
|
+
- “Success Criteria” rows -> category `verification`
|
|
676
|
+
- numbered implementation/migration steps that name concrete deliverables -> category `workflow` or `artifact`
|
|
677
|
+
|
|
678
|
+
The important constraint is not the label itself; it is that the generator converts platform-flavored phrasing into platform-agnostic manifest categories.
|
|
679
|
+
|
|
680
|
+
## 4.6 Manifest Shape Additions
|
|
681
|
+
|
|
682
|
+
To make generation auditable, each manifest obligation SHOULD include:
|
|
683
|
+
|
|
684
|
+
- `generated_from`
|
|
685
|
+
- source line/section metadata
|
|
686
|
+
- `generation_rule`
|
|
687
|
+
- which extractor rule produced it
|
|
688
|
+
- `generation_confidence`
|
|
689
|
+
- `high | medium | low`
|
|
690
|
+
|
|
691
|
+
Example:
|
|
692
|
+
|
|
693
|
+
```json
|
|
694
|
+
{
|
|
695
|
+
"obligation_id": "OBL-002",
|
|
696
|
+
"title": "Expose feature files endpoint",
|
|
697
|
+
"category": "endpoint",
|
|
698
|
+
"source_ref": "§C",
|
|
699
|
+
"verification_hint": "route_contract",
|
|
700
|
+
"generated_from": {
|
|
701
|
+
"heading": "GET /api/features/[id]/files"
|
|
702
|
+
},
|
|
703
|
+
"generation_rule": "endpoint_heading",
|
|
704
|
+
"generation_confidence": "high"
|
|
705
|
+
}
|
|
706
|
+
```
|
|
707
|
+
|
|
708
|
+
This metadata is for auditability; the core planner/runtime contract still keys on `obligation_id`.
|
|
709
|
+
|
|
710
|
+
## 4.7 Stable ID Strategy
|
|
711
|
+
|
|
712
|
+
Obligation IDs MUST be generated deterministically from normalized source facts, then stabilized once persisted.
|
|
713
|
+
|
|
714
|
+
Recommended algorithm:
|
|
715
|
+
|
|
716
|
+
1. derive a normalized fingerprint from:
|
|
717
|
+
- `category`
|
|
718
|
+
- normalized title
|
|
719
|
+
- nearest section reference
|
|
720
|
+
2. map that fingerprint to a deterministic ordinal or short hash
|
|
721
|
+
3. persist the generated `obligation_id`
|
|
722
|
+
|
|
723
|
+
If the spec is revised:
|
|
724
|
+
|
|
725
|
+
- existing IDs should be preserved when normalized source facts still match
|
|
726
|
+
- new obligations get new IDs
|
|
727
|
+
- removed obligations disappear explicitly from regenerated manifest output
|
|
728
|
+
|
|
729
|
+
The system must prefer ID stability over cosmetic re-numbering.
|
|
730
|
+
|
|
731
|
+
## 4.8 Artifact Types and Promotion Modes
|
|
732
|
+
|
|
733
|
+
The system must distinguish two artifacts:
|
|
734
|
+
|
|
735
|
+
- `spec.manifest.bootstrap.json`
|
|
736
|
+
- inferred
|
|
737
|
+
- non-authoritative by default
|
|
738
|
+
- `spec.manifest.verified.json`
|
|
739
|
+
- authoritative
|
|
740
|
+
- may be used for enforcement
|
|
741
|
+
|
|
742
|
+
Example bootstrap artifact:
|
|
743
|
+
|
|
744
|
+
```json
|
|
745
|
+
{
|
|
746
|
+
"feature_id": "example_feature",
|
|
747
|
+
"manifest_version": 1,
|
|
748
|
+
"artifact_type": "bootstrap",
|
|
749
|
+
"obligations": []
|
|
750
|
+
}
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
Example verified artifact:
|
|
754
|
+
|
|
755
|
+
```json
|
|
756
|
+
{
|
|
757
|
+
"feature_id": "example_feature",
|
|
758
|
+
"manifest_version": 1,
|
|
759
|
+
"artifact_type": "verified",
|
|
760
|
+
"verification_basis": "policy_approved_auto_promotion",
|
|
761
|
+
"obligations": []
|
|
762
|
+
}
|
|
763
|
+
```
|
|
764
|
+
|
|
765
|
+
## 4.9 Enforcement Boundary
|
|
766
|
+
|
|
767
|
+
The runtime MUST NOT enforce directly against arbitrary bootstrap inference unless that inference has been promoted to a verified manifest.
|
|
768
|
+
|
|
769
|
+
Blocking behavior may apply only when one of the following is true:
|
|
770
|
+
|
|
771
|
+
- a `spec.manifest.verified.json` exists
|
|
772
|
+
- policy explicitly allows auto-promotion of qualifying bootstrap obligations into a verified manifest
|
|
773
|
+
|
|
774
|
+
Auto-promotion, if allowed, must be gated by policy-defined thresholds such as:
|
|
775
|
+
|
|
776
|
+
- `generation_confidence = high`
|
|
777
|
+
- extractor rule is on the approved list
|
|
778
|
+
- no conflicting findings were produced
|
|
779
|
+
|
|
780
|
+
Bootstrap-only obligations may appear in findings, but they should not hard-block until promotion occurs.
|
|
781
|
+
|
|
782
|
+
## 4.10 Legacy Spec Rule
|
|
783
|
+
|
|
784
|
+
Legacy specs without any manifest artifacts may still be onboarded automatically:
|
|
785
|
+
|
|
786
|
+
- runtime generates a bootstrap proposal from `spec.md`
|
|
787
|
+
- planner receives that bootstrap proposal immediately
|
|
788
|
+
- plan/reconciliation log findings against it
|
|
789
|
+
- blocking behavior remains policy-controlled
|
|
790
|
+
|
|
791
|
+
This preserves the requirement that users only provide `spec.md`, while still giving the system a materialized artifact to reason about.
|
|
792
|
+
|
|
793
|
+
## 4.11 Optional Future Extension: Model-Assisted Bootstrap
|
|
794
|
+
|
|
795
|
+
If a future version wants stronger initial extraction, it may add an optional model-assisted bootstrap pass.
|
|
796
|
+
|
|
797
|
+
That design would look like:
|
|
798
|
+
|
|
799
|
+
- deterministic generator runs first
|
|
800
|
+
- optional model-assisted extractor proposes supplemental obligations
|
|
801
|
+
- system merges only policy-approved, reviewable proposals into a bootstrap manifest
|
|
802
|
+
|
|
803
|
+
But this is explicitly a future extension.
|
|
804
|
+
|
|
805
|
+
For M58:
|
|
806
|
+
|
|
807
|
+
- no `PromptIntakeAgent`
|
|
808
|
+
- no mandatory LLM preprocessing role
|
|
809
|
+
- bootstrap proposal generation remains system-owned
|
|
810
|
+
- verified enforcement remains separate from proposal generation
|
|
811
|
+
|
|
812
|
+
---
|
|
813
|
+
|
|
814
|
+
## 5. Plan Admission Validation
|
|
815
|
+
|
|
816
|
+
## 5.1 Validation Inputs
|
|
817
|
+
|
|
818
|
+
`PlanService` must validate against:
|
|
819
|
+
|
|
820
|
+
- `spec.manifest.json`
|
|
821
|
+
- `plan.plan_trace`
|
|
822
|
+
- `plan.files`
|
|
823
|
+
- `plan.acceptance_criteria`
|
|
824
|
+
- policy mode
|
|
825
|
+
|
|
826
|
+
## 5.2 Validation Sequence
|
|
827
|
+
|
|
828
|
+
1. load and validate manifest
|
|
829
|
+
2. load and validate `plan_trace`
|
|
830
|
+
3. ensure each manifest obligation has exactly one trace entry
|
|
831
|
+
4. ensure each `in_scope` trace maps to planned paths
|
|
832
|
+
5. ensure no unknown `obligation_id` appears in `plan_trace`
|
|
833
|
+
6. in enforce mode, reject when required traceability is incomplete
|
|
834
|
+
|
|
835
|
+
## 5.3 Deterministic Rejection Rules
|
|
836
|
+
|
|
837
|
+
Reject plan in `enforce` mode when:
|
|
838
|
+
|
|
839
|
+
- manifest is required but missing
|
|
840
|
+
- manifest exists but is invalid
|
|
841
|
+
- any manifest obligation lacks a trace entry
|
|
842
|
+
- any trace entry references an unknown obligation
|
|
843
|
+
- any `in_scope` trace has no valid planned path mapping
|
|
844
|
+
- planner emits duplicate trace entries for one obligation
|
|
845
|
+
|
|
846
|
+
Do not reject based on language-specific implementation inference.
|
|
847
|
+
|
|
848
|
+
## 5.4 Planner-Facing Findings
|
|
849
|
+
|
|
850
|
+
On rejected submission, append a planner-visible note summarizing:
|
|
851
|
+
|
|
852
|
+
- total obligations
|
|
853
|
+
- in-scope obligations
|
|
854
|
+
- deferred/out-of-scope obligations
|
|
855
|
+
- missing trace entries
|
|
856
|
+
- invalid trace entries
|
|
857
|
+
|
|
858
|
+
---
|
|
859
|
+
|
|
860
|
+
## 6. Post-QA Reconciliation Hardening
|
|
861
|
+
|
|
862
|
+
## 6.0 End-to-End Deterministic Evaluation Model
|
|
863
|
+
|
|
864
|
+
The implementation must make the following transition explicit:
|
|
865
|
+
|
|
866
|
+
1. the system inferentially generates `spec.manifest.json` from `spec.md`
|
|
867
|
+
2. the planner maps each `obligation_id` into `plan_trace`
|
|
868
|
+
3. builder and QA produce deterministic runtime artifacts:
|
|
869
|
+
- updated worktree state
|
|
870
|
+
- checkpoint diffs
|
|
871
|
+
- patch history
|
|
872
|
+
- gate evidence
|
|
873
|
+
4. the runtime computes a `coverage-audit.json` by comparing:
|
|
874
|
+
- manifest obligations
|
|
875
|
+
- planner trace
|
|
876
|
+
- observed file/path evidence
|
|
877
|
+
- observed verification evidence
|
|
878
|
+
5. the runtime decides whether the feature is:
|
|
879
|
+
- complete enough to stay converged
|
|
880
|
+
- missing traceability only
|
|
881
|
+
- missing implementation work
|
|
882
|
+
- missing verification work
|
|
883
|
+
6. if gaps remain, the runtime forces the planner to revise the plan so the builder and QA have explicit next work
|
|
884
|
+
|
|
885
|
+
This is the core bridge from:
|
|
886
|
+
|
|
887
|
+
- "the AI gave us a manifest"
|
|
888
|
+
|
|
889
|
+
to:
|
|
890
|
+
|
|
891
|
+
- "the system can deterministically measure how much of that manifest is planned, implemented, and verified."
|
|
892
|
+
|
|
893
|
+
## 6.0.1 Deterministic Status Ladder Per Obligation
|
|
894
|
+
|
|
895
|
+
Each obligation in `coverage-audit.json` must be reduced to one of the following runtime states:
|
|
896
|
+
|
|
897
|
+
- `missing_trace`
|
|
898
|
+
- no `plan_trace` entry exists
|
|
899
|
+
- `planned_only`
|
|
900
|
+
- trace exists, but no implementation evidence has been observed
|
|
901
|
+
- `in_progress`
|
|
902
|
+
- trace exists and some implementation evidence exists, but verification evidence is incomplete
|
|
903
|
+
- `verified`
|
|
904
|
+
- trace exists, implementation evidence exists, and required verification evidence exists
|
|
905
|
+
- `deferred`
|
|
906
|
+
- planner explicitly marked it deferred
|
|
907
|
+
- `out_of_scope`
|
|
908
|
+
- planner explicitly marked it out of scope
|
|
909
|
+
|
|
910
|
+
These states must be computed from deterministic artifacts only.
|
|
911
|
+
|
|
912
|
+
## 6.0.2 Deterministic Evidence Inputs
|
|
913
|
+
|
|
914
|
+
For every `obligation_id`, the audit may use only the following evidence:
|
|
915
|
+
|
|
916
|
+
- manifest entry
|
|
917
|
+
- `plan_trace` entry
|
|
918
|
+
- accepted `plan.files`
|
|
919
|
+
- current worktree path existence
|
|
920
|
+
- touched paths from:
|
|
921
|
+
- checkpoint diffs
|
|
922
|
+
- accepted patches
|
|
923
|
+
- current feature diff
|
|
924
|
+
- current gate evidence by mode
|
|
925
|
+
- existence of `planned_test_paths`
|
|
926
|
+
- freshness/pass-fail status of gate evidence
|
|
927
|
+
|
|
928
|
+
The audit must not use:
|
|
929
|
+
|
|
930
|
+
- semantic interpretation of source code
|
|
931
|
+
- model self-reporting
|
|
932
|
+
- natural-language summary text from the planner/builder
|
|
933
|
+
|
|
934
|
+
## 6.0.3 Actual Audit Reduction Rules
|
|
935
|
+
|
|
936
|
+
For `disposition=in_scope`, compute:
|
|
937
|
+
|
|
938
|
+
1. `trace_valid`
|
|
939
|
+
- true when the trace entry exists and its `planned_paths` are within accepted plan scope
|
|
940
|
+
2. `implementation_evidence_present`
|
|
941
|
+
- true when at least one `planned_path` has deterministic implementation evidence
|
|
942
|
+
3. `verification_required`
|
|
943
|
+
- true when:
|
|
944
|
+
- manifest `verification_hint` indicates verification is required, or
|
|
945
|
+
- `planned_test_paths` / `planned_verification` are present
|
|
946
|
+
4. `verification_evidence_present`
|
|
947
|
+
- true when required verification artifacts exist and relevant gate evidence is fresh enough per policy
|
|
948
|
+
|
|
949
|
+
Reduction:
|
|
950
|
+
|
|
951
|
+
- if no trace entry: `missing_trace`
|
|
952
|
+
- if trace invalid: `missing_trace`
|
|
953
|
+
- if trace valid and no implementation evidence: `planned_only`
|
|
954
|
+
- if trace valid and implementation evidence exists but verification is still missing: `in_progress`
|
|
955
|
+
- if trace valid and implementation evidence exists and verification evidence exists: `verified`
|
|
956
|
+
|
|
957
|
+
For `deferred` and `out_of_scope`:
|
|
958
|
+
|
|
959
|
+
- preserve that status directly in the audit
|
|
960
|
+
- do not promote to `verified`
|
|
961
|
+
|
|
962
|
+
## 6.0.4 How Implementation Evidence Is Computed
|
|
963
|
+
|
|
964
|
+
Implementation evidence must be path-based and disposition-aware:
|
|
965
|
+
|
|
966
|
+
- for created paths:
|
|
967
|
+
- file currently exists and path appears in touched-path evidence
|
|
968
|
+
- for modified paths:
|
|
969
|
+
- path appears in touched-path evidence
|
|
970
|
+
- for deleted paths:
|
|
971
|
+
- path is listed in delete scope and no longer exists in worktree, with touched-path evidence showing deletion
|
|
972
|
+
|
|
973
|
+
Because this is platform-agnostic, "implementation evidence" means:
|
|
974
|
+
|
|
975
|
+
- the planned repository artifact changed in the expected way
|
|
976
|
+
|
|
977
|
+
not:
|
|
978
|
+
|
|
979
|
+
- the runtime has proven the business logic is semantically correct
|
|
980
|
+
|
|
981
|
+
## 6.0.5 How Verification Evidence Is Computed
|
|
982
|
+
|
|
983
|
+
Verification evidence is also platform-agnostic.
|
|
984
|
+
|
|
985
|
+
It is satisfied only by deterministic artifacts such as:
|
|
986
|
+
|
|
987
|
+
- `planned_test_paths` exist in the worktree
|
|
988
|
+
- relevant gate mode evidence is present, fresh, and passing
|
|
989
|
+
- explicitly named verification steps in `planned_verification` have corresponding gate/evidence support
|
|
990
|
+
|
|
991
|
+
The system is not trying to prove a specific test function ran; it is proving that the planned verification surface now exists and that required gates passed on current-enough evidence.
|
|
992
|
+
|
|
993
|
+
## 6.0.6 Feature-Level Performance Against the Manifest
|
|
994
|
+
|
|
995
|
+
The system should compute feature-level rollups from per-obligation audit states:
|
|
996
|
+
|
|
997
|
+
- `total_obligations`
|
|
998
|
+
- `verified_count`
|
|
999
|
+
- `in_progress_count`
|
|
1000
|
+
- `planned_only_count`
|
|
1001
|
+
- `missing_trace_count`
|
|
1002
|
+
- `deferred_count`
|
|
1003
|
+
- `out_of_scope_count`
|
|
1004
|
+
|
|
1005
|
+
Derived metrics:
|
|
1006
|
+
|
|
1007
|
+
- `traceability_ratio = (verified + in_progress + planned_only + deferred + out_of_scope) / total_obligations`
|
|
1008
|
+
- `implementation_ratio = (verified + in_progress) / total_in_scope_obligations`
|
|
1009
|
+
- `verification_ratio = verified / total_verification_required_obligations`
|
|
1010
|
+
|
|
1011
|
+
These metrics are for reporting and consistency tracking. Blocking decisions should still use discrete policy rules, not ratios alone.
|
|
1012
|
+
|
|
1013
|
+
## 6.1 Deterministic Evidence Sources
|
|
1014
|
+
|
|
1015
|
+
Reconciliation may only use platform-agnostic evidence:
|
|
1016
|
+
|
|
1017
|
+
- manifest obligations
|
|
1018
|
+
- accepted `plan_trace`
|
|
1019
|
+
- planned paths
|
|
1020
|
+
- checkpoint / patch touched paths
|
|
1021
|
+
- existence of planned test paths
|
|
1022
|
+
- gate evidence freshness and status
|
|
1023
|
+
- explicit verification references in the trace
|
|
1024
|
+
|
|
1025
|
+
## 6.2 What Reconciliation May Assert
|
|
1026
|
+
|
|
1027
|
+
Reconciliation may deterministically conclude:
|
|
1028
|
+
|
|
1029
|
+
- an obligation has no trace
|
|
1030
|
+
- an `in_scope` obligation has no planned path
|
|
1031
|
+
- planned paths were never touched
|
|
1032
|
+
- planned test paths do not exist
|
|
1033
|
+
- expected verification evidence is absent
|
|
1034
|
+
|
|
1035
|
+
Reconciliation may not deterministically conclude:
|
|
1036
|
+
|
|
1037
|
+
- a Java class is semantically complete
|
|
1038
|
+
- a Python function satisfies business logic
|
|
1039
|
+
- a UI component visually matches intent
|
|
1040
|
+
|
|
1041
|
+
Those remain QA and human-review concerns unless future adapters are explicitly enabled.
|
|
1042
|
+
|
|
1043
|
+
## 6.3 Coverage Audit Outcomes
|
|
1044
|
+
|
|
1045
|
+
Add reconciliation reasons such as:
|
|
1046
|
+
|
|
1047
|
+
- `manifest_missing`
|
|
1048
|
+
- `trace_missing:<n>`
|
|
1049
|
+
- `trace_invalid:<n>`
|
|
1050
|
+
- `implementation_evidence_missing:<n>`
|
|
1051
|
+
- `verification_evidence_missing:<n>`
|
|
1052
|
+
|
|
1053
|
+
## 6.4 Update Decision Rule
|
|
1054
|
+
|
|
1055
|
+
`planDecision` MUST be `update_required` in `enforce` mode when:
|
|
1056
|
+
|
|
1057
|
+
- any obligation lacks a trace
|
|
1058
|
+
- any required trace is invalid
|
|
1059
|
+
- any `in_scope` obligation has no path evidence
|
|
1060
|
+
- policy requires verification evidence and that evidence is missing
|
|
1061
|
+
|
|
1062
|
+
In `report_only` mode:
|
|
1063
|
+
|
|
1064
|
+
- findings are logged
|
|
1065
|
+
- `plan.update` is not forced solely by traceability findings
|
|
1066
|
+
|
|
1067
|
+
## 6.4.1 Gap Classification
|
|
1068
|
+
|
|
1069
|
+
Reconciliation must classify every gap into one of three actionable buckets:
|
|
1070
|
+
|
|
1071
|
+
- `planning_gap`
|
|
1072
|
+
- the manifest obligation is not represented correctly in `plan_trace`
|
|
1073
|
+
- action: planner must revise plan
|
|
1074
|
+
- `implementation_gap`
|
|
1075
|
+
- trace exists, but implementation evidence is missing
|
|
1076
|
+
- action: keep or revise plan so builder has explicit work
|
|
1077
|
+
- `verification_gap`
|
|
1078
|
+
- implementation evidence exists, but verification evidence is missing
|
|
1079
|
+
- action: keep or revise plan so QA/builder add the missing verification surface
|
|
1080
|
+
|
|
1081
|
+
This classification is critical. Without it, the system can detect a gap but still fail to say what should happen next.
|
|
1082
|
+
|
|
1083
|
+
## 6.4.2 Forced Gap-Closure Workflow
|
|
1084
|
+
|
|
1085
|
+
When reconciliation finds gaps, the runtime must do more than log them.
|
|
1086
|
+
|
|
1087
|
+
It must construct a deterministic remediation payload for the planner:
|
|
1088
|
+
|
|
1089
|
+
```json
|
|
1090
|
+
{
|
|
1091
|
+
"spec_traceability_audit": {
|
|
1092
|
+
"planning_gaps": [],
|
|
1093
|
+
"implementation_gaps": [],
|
|
1094
|
+
"verification_gaps": [],
|
|
1095
|
+
"rollup": {
|
|
1096
|
+
"total_obligations": 0,
|
|
1097
|
+
"verified_count": 0,
|
|
1098
|
+
"in_progress_count": 0,
|
|
1099
|
+
"planned_only_count": 0,
|
|
1100
|
+
"missing_trace_count": 0
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
```
|
|
1105
|
+
|
|
1106
|
+
Planner obligations on receipt:
|
|
1107
|
+
|
|
1108
|
+
- for `planning_gap`:
|
|
1109
|
+
- add or correct `plan_trace`
|
|
1110
|
+
- expand `files` / `allowed_areas` if needed
|
|
1111
|
+
- for `implementation_gap`:
|
|
1112
|
+
- keep the obligation `in_scope`
|
|
1113
|
+
- make the implementation work explicit in acceptance criteria, planned paths, or verification steps
|
|
1114
|
+
- for `verification_gap`:
|
|
1115
|
+
- add missing test paths or verification references
|
|
1116
|
+
- update acceptance criteria so QA can deterministically verify completion
|
|
1117
|
+
|
|
1118
|
+
The planner must not be allowed to resolve a real `implementation_gap` or `verification_gap` merely by relabeling it `out_of_scope` unless policy and spec intent permit that change.
|
|
1119
|
+
|
|
1120
|
+
## 6.4.3 Builder and QA Responsibilities After Reconciliation
|
|
1121
|
+
|
|
1122
|
+
The system must treat the revised plan as the closure mechanism:
|
|
1123
|
+
|
|
1124
|
+
- builder closes `implementation_gap` by producing deterministic path evidence against the revised trace
|
|
1125
|
+
- QA closes `verification_gap` by producing deterministic verification evidence against the revised trace
|
|
1126
|
+
|
|
1127
|
+
This makes the closure loop concrete:
|
|
1128
|
+
|
|
1129
|
+
1. manifest defines expected obligations
|
|
1130
|
+
2. audit identifies exact missing states
|
|
1131
|
+
3. planner revises plan to encode next required work
|
|
1132
|
+
4. builder/QA execute against that revision
|
|
1133
|
+
5. audit recomputes and checks whether the gap is now closed
|
|
1134
|
+
|
|
1135
|
+
## 6.5 No-Update Guardrail
|
|
1136
|
+
|
|
1137
|
+
`reconciled_no_gaps` is only valid when:
|
|
1138
|
+
|
|
1139
|
+
- gate/evidence checks pass
|
|
1140
|
+
- all required obligations are traced
|
|
1141
|
+
- all required trace entries are valid
|
|
1142
|
+
- all required evidence checks configured by policy are satisfied
|
|
1143
|
+
|
|
1144
|
+
---
|
|
1145
|
+
|
|
1146
|
+
## 7. Planner Prompt Revisions
|
|
1147
|
+
|
|
1148
|
+
Update:
|
|
1149
|
+
|
|
1150
|
+
- `agentic/orchestrator/prompts/planner.system.md`
|
|
1151
|
+
- `config/agentic/orchestrator/prompts/planner.system.md`
|
|
1152
|
+
|
|
1153
|
+
Add explicit sections:
|
|
1154
|
+
|
|
1155
|
+
### 7.1 During Initial Planning
|
|
1156
|
+
|
|
1157
|
+
- do not infer obligations from memory; read the materialized manifest or obligation inventory
|
|
1158
|
+
- trace every obligation ID into `plan_trace`
|
|
1159
|
+
- broad summaries do not satisfy obligation traceability
|
|
1160
|
+
- mark items `deferred` or `out_of_scope` explicitly when they are not being implemented
|
|
1161
|
+
|
|
1162
|
+
### 7.2 During Reconciliation
|
|
1163
|
+
|
|
1164
|
+
- audit current implementation against `plan_trace`
|
|
1165
|
+
- revise the plan when required obligation traces or evidence are missing
|
|
1166
|
+
- do not keep the plan unchanged merely because gates are green
|
|
1167
|
+
|
|
1168
|
+
### 7.3 Prompt Boundary
|
|
1169
|
+
|
|
1170
|
+
Prompt guidance is advisory. Runtime validation remains authoritative.
|
|
1171
|
+
|
|
1172
|
+
---
|
|
1173
|
+
|
|
1174
|
+
## 8. Implementation Plan
|
|
1175
|
+
|
|
1176
|
+
### M58.1 — Add manifest and trace schemas
|
|
1177
|
+
|
|
1178
|
+
Update:
|
|
1179
|
+
|
|
1180
|
+
- `agentic/orchestrator/schemas/plan.schema.json`
|
|
1181
|
+
- add new schema for `spec.manifest.json`
|
|
1182
|
+
- add policy schema/default updates for `planning.spec_traceability`
|
|
1183
|
+
|
|
1184
|
+
### M58.2 — Add manifest materialization support
|
|
1185
|
+
|
|
1186
|
+
Update/create:
|
|
1187
|
+
|
|
1188
|
+
- `apps/control-plane/src/cli/spec-preparation.ts`
|
|
1189
|
+
- any supporting utilities needed to materialize or validate obligation inventories
|
|
1190
|
+
|
|
1191
|
+
### M58.3 — Add `SpecTraceabilityService`
|
|
1192
|
+
|
|
1193
|
+
Create:
|
|
1194
|
+
|
|
1195
|
+
- `apps/control-plane/src/application/services/spec-traceability-service.ts`
|
|
1196
|
+
|
|
1197
|
+
Responsibilities:
|
|
1198
|
+
|
|
1199
|
+
- load and validate manifest
|
|
1200
|
+
- compare manifest to `plan_trace`
|
|
1201
|
+
- build deterministic coverage audit findings
|
|
1202
|
+
|
|
1203
|
+
### M58.4 — Enforce traceability in `PlanService`
|
|
1204
|
+
|
|
1205
|
+
Update:
|
|
1206
|
+
|
|
1207
|
+
- `apps/control-plane/src/application/services/plan-service.ts`
|
|
1208
|
+
- `apps/control-plane/src/core/error-codes.ts`
|
|
1209
|
+
|
|
1210
|
+
### M58.5 — Update planner-output sanitization
|
|
1211
|
+
|
|
1212
|
+
Update:
|
|
1213
|
+
|
|
1214
|
+
- `apps/control-plane/src/supervisor/worker-decision-loop.ts`
|
|
1215
|
+
|
|
1216
|
+
Reason:
|
|
1217
|
+
|
|
1218
|
+
- planner sanitizer must preserve `plan_trace` during rollout
|
|
1219
|
+
|
|
1220
|
+
### M58.6 — Add post-QA coverage audit
|
|
1221
|
+
|
|
1222
|
+
Update:
|
|
1223
|
+
|
|
1224
|
+
- `apps/control-plane/src/supervisor/planning-wave-executor.ts`
|
|
1225
|
+
- `apps/control-plane/src/application/services/feature-lifecycle-service.ts` if additional context payload is needed
|
|
1226
|
+
|
|
1227
|
+
### M58.7 — Strengthen planner prompts
|
|
1228
|
+
|
|
1229
|
+
Update:
|
|
1230
|
+
|
|
1231
|
+
- `agentic/orchestrator/prompts/planner.system.md`
|
|
1232
|
+
- `config/agentic/orchestrator/prompts/planner.system.md`
|
|
1233
|
+
|
|
1234
|
+
### M58.8 — Add fixtures and tests
|
|
1235
|
+
|
|
1236
|
+
Add/extend:
|
|
1237
|
+
|
|
1238
|
+
- `apps/control-plane/test/spec-traceability-service.spec.ts`
|
|
1239
|
+
- `apps/control-plane/test/plan-service.spec.ts`
|
|
1240
|
+
- reconciliation tests for the planning wave executor
|
|
1241
|
+
- prompt contract tests
|
|
1242
|
+
- fixture corpus for TypeScript, Python, Java, CLI/config specs
|
|
1243
|
+
|
|
1244
|
+
---
|
|
1245
|
+
|
|
1246
|
+
## 9. Testing Plan
|
|
1247
|
+
|
|
1248
|
+
## 9.1 Unit Tests
|
|
1249
|
+
|
|
1250
|
+
Add:
|
|
1251
|
+
|
|
1252
|
+
- manifest validation tests
|
|
1253
|
+
- trace validation tests
|
|
1254
|
+
- coverage-audit reduction tests
|
|
1255
|
+
- policy-mode tests for `off`, `report_only`, `enforce`
|
|
1256
|
+
- deterministic status-ladder tests covering:
|
|
1257
|
+
- `missing_trace`
|
|
1258
|
+
- `planned_only`
|
|
1259
|
+
- `in_progress`
|
|
1260
|
+
- `verified`
|
|
1261
|
+
- `deferred`
|
|
1262
|
+
- `out_of_scope`
|
|
1263
|
+
|
|
1264
|
+
## 9.2 Plan Service Tests
|
|
1265
|
+
|
|
1266
|
+
Coverage:
|
|
1267
|
+
|
|
1268
|
+
- reject plan missing `plan_trace` in enforce mode
|
|
1269
|
+
- reject plan with unknown obligation IDs
|
|
1270
|
+
- reject `in_scope` trace without valid planned path
|
|
1271
|
+
- accept plan when all manifest obligations are traced
|
|
1272
|
+
- accept `deferred` and `out_of_scope` dispositions with rationale
|
|
1273
|
+
|
|
1274
|
+
## 9.3 Reconciliation Tests
|
|
1275
|
+
|
|
1276
|
+
Coverage:
|
|
1277
|
+
|
|
1278
|
+
- reconciliation logs findings in `report_only`
|
|
1279
|
+
- reconciliation forces `plan.update` in `enforce` mode when trace is incomplete
|
|
1280
|
+
- `reconciled_no_gaps` is not emitted when required traceability gaps remain
|
|
1281
|
+
- remediation payload classifies gaps into `planning_gap`, `implementation_gap`, and `verification_gap`
|
|
1282
|
+
- planner revisions are required to encode explicit closure work for each unresolved obligation category
|
|
1283
|
+
|
|
1284
|
+
## 9.4 Cross-Platform Fixture Corpus
|
|
1285
|
+
|
|
1286
|
+
Add fixtures representing:
|
|
1287
|
+
|
|
1288
|
+
- a TypeScript UI spec
|
|
1289
|
+
- a Python service/library spec
|
|
1290
|
+
- a Java backend/package spec
|
|
1291
|
+
- a CLI or config-oriented spec
|
|
1292
|
+
|
|
1293
|
+
Each fixture must have:
|
|
1294
|
+
|
|
1295
|
+
- `spec.md`
|
|
1296
|
+
- `spec.manifest.json`
|
|
1297
|
+
- example `plan.json`
|
|
1298
|
+
- expected validation outcome
|
|
1299
|
+
|
|
1300
|
+
## 9.5 Golden Tests
|
|
1301
|
+
|
|
1302
|
+
Manifest and trace validation must run against golden fixtures so that:
|
|
1303
|
+
|
|
1304
|
+
- rule changes are explicit
|
|
1305
|
+
- false positives are visible
|
|
1306
|
+
- drift across spec-writing styles is measurable
|
|
1307
|
+
|
|
1308
|
+
---
|
|
1309
|
+
|
|
1310
|
+
## 10. Quality and Consistency Controls
|
|
1311
|
+
|
|
1312
|
+
Quality consistency requires more than passing unit tests.
|
|
1313
|
+
|
|
1314
|
+
## 10.1 Quality Gates for This Feature
|
|
1315
|
+
|
|
1316
|
+
Track these metrics in CI:
|
|
1317
|
+
|
|
1318
|
+
- total obligations per fixture
|
|
1319
|
+
- missing trace count
|
|
1320
|
+
- invalid trace count
|
|
1321
|
+
- report-only findings count
|
|
1322
|
+
- fixture false-positive count
|
|
1323
|
+
- fixture false-negative count
|
|
1324
|
+
- obligation status distribution drift across fixtures
|
|
1325
|
+
- ratio drift for:
|
|
1326
|
+
- traceability
|
|
1327
|
+
- implementation
|
|
1328
|
+
- verification
|
|
1329
|
+
|
|
1330
|
+
## 10.2 Change Management
|
|
1331
|
+
|
|
1332
|
+
Any change to:
|
|
1333
|
+
|
|
1334
|
+
- manifest schema
|
|
1335
|
+
- trace schema
|
|
1336
|
+
- validation rules
|
|
1337
|
+
- bootstrap extractor
|
|
1338
|
+
|
|
1339
|
+
must update:
|
|
1340
|
+
|
|
1341
|
+
- golden fixtures
|
|
1342
|
+
- expected findings
|
|
1343
|
+
- prompt contract tests if planner payload shape changes
|
|
1344
|
+
|
|
1345
|
+
## 10.3 Review Standard
|
|
1346
|
+
|
|
1347
|
+
No rule may move from `report_only` to `enforce` until:
|
|
1348
|
+
|
|
1349
|
+
- cross-platform fixtures are green
|
|
1350
|
+
- false-positive rate is understood
|
|
1351
|
+
- at least one real-world legacy spec has been exercised in dry-run mode
|
|
1352
|
+
|
|
1353
|
+
## 10.4 Human Override Principle
|
|
1354
|
+
|
|
1355
|
+
If a spec lacks a valid manifest and policy allows legacy fallback:
|
|
1356
|
+
|
|
1357
|
+
- emit findings
|
|
1358
|
+
- do not silently fabricate authoritative obligations
|
|
1359
|
+
|
|
1360
|
+
The system must prefer an explicit “cannot enforce yet” state over false determinism.
|
|
1361
|
+
|
|
1362
|
+
---
|
|
1363
|
+
|
|
1364
|
+
## 11. Risks and Mitigations
|
|
1365
|
+
|
|
1366
|
+
| Risk | Impact | Mitigation |
|
|
1367
|
+
| --------------------------------------------------- | ------ | ----------------------------------------------------------------------------------------------------- |
|
|
1368
|
+
| Manifest authoring adds friction to spec creation | Medium | Support spec-preparation helpers and bootstrap materialization in `report_only` mode. |
|
|
1369
|
+
| Legacy specs lack structured obligations | High | Allow legacy fallback in `report_only`; require manifests only for new or revised specs under policy. |
|
|
1370
|
+
| Teams want semantic platform validation immediately | Medium | Keep adapters optional and advisory until separately specified and policy-enabled. |
|
|
1371
|
+
| Planner/output drift breaks trace payloads | Medium | Add prompt contract tests and update planner sanitizer in lockstep. |
|
|
1372
|
+
| Reconciliation findings become noisy | Medium | Restrict enforced findings to manifest/trace/path/evidence facts only. |
|
|
1373
|
+
|
|
1374
|
+
---
|
|
1375
|
+
|
|
1376
|
+
## 12. Acceptance Criteria
|
|
1377
|
+
|
|
1378
|
+
This feature is complete when all of the following are true:
|
|
1379
|
+
|
|
1380
|
+
1. New specs can materialize a canonical `spec.manifest.json` with stable obligation IDs.
|
|
1381
|
+
2. `plan.json` supports planner-authored `plan_trace` entries keyed by `obligation_id`.
|
|
1382
|
+
3. `PlanService` can validate manifest-to-trace completeness in `report_only` and `enforce` modes.
|
|
1383
|
+
4. Validation rules remain platform-agnostic and do not require language-specific semantic analysis.
|
|
1384
|
+
5. Post-QA reconciliation computes a runtime-owned coverage audit from manifest, trace, path evidence, and gate evidence.
|
|
1385
|
+
6. In `enforce` mode, missing required traceability forces plan rejection or plan revision as configured by policy.
|
|
1386
|
+
7. In `report_only` mode, findings are logged without blocking execution.
|
|
1387
|
+
8. The runtime reduces every obligation deterministically into one of: `missing_trace`, `planned_only`, `in_progress`, `verified`, `deferred`, or `out_of_scope`.
|
|
1388
|
+
9. Reconciliation emits deterministic remediation payloads that classify unresolved work into `planning_gap`, `implementation_gap`, and `verification_gap`.
|
|
1389
|
+
10. Cross-platform fixtures for at least TypeScript, Python, and Java style specs pass consistently.
|
|
1390
|
+
11. Prompt contract tests and planner sanitizer updates preserve the new trace payload shape.
|
|
1391
|
+
12. `npm run typecheck`, `npm run lint`, and relevant Vitest suites pass.
|
|
1392
|
+
|
|
1393
|
+
---
|
|
1394
|
+
|
|
1395
|
+
## 13. Explicit Non-Requirements
|
|
1396
|
+
|
|
1397
|
+
This spec does not require:
|
|
1398
|
+
|
|
1399
|
+
- semantic parsing of every sentence in the spec
|
|
1400
|
+
- platform-specific AST analyzers
|
|
1401
|
+
- a new CLI command
|
|
1402
|
+
- dashboard changes
|
|
1403
|
+
- embedding-based similarity ranking
|
|
1404
|
+
- changing builder patch admission rules beyond existing plan/file scope protections
|
|
1405
|
+
|
|
1406
|
+
The purpose is narrower and stricter:
|
|
1407
|
+
|
|
1408
|
+
- define canonical obligations
|
|
1409
|
+
- require planner traceability to those obligations
|
|
1410
|
+
- audit that traceability deterministically and platform-agnostically
|
|
1411
|
+
- keep runtime enforcement honest about what it can and cannot prove
|