sdd-agent-platform 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -23
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js +31 -28
- package/node_modules/@sdd-agent-platform/core/dist/ai-tools.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js +3 -2
- package/node_modules/@sdd-agent-platform/core/dist/config/init-project.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.d.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js +14 -5
- package/node_modules/@sdd-agent-platform/core/dist/config/starter-documents.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/contracts.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/contracts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js +3 -3
- package/node_modules/@sdd-agent-platform/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js +155 -1
- package/node_modules/@sdd-agent-platform/core/dist/doctor/doctor.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.d.ts +23 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js +54 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence/lookup.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/evidence-runtime/contracts.d.ts +11 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js +15 -8
- package/node_modules/@sdd-agent-platform/core/dist/execution/agent-execution-records.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js +14 -6
- package/node_modules/@sdd-agent-platform/core/dist/execution/resident-worker.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js +145 -0
- package/node_modules/@sdd-agent-platform/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js +36 -36
- package/node_modules/@sdd-agent-platform/core/dist/instructions.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js +37 -17
- package/node_modules/@sdd-agent-platform/core/dist/lifecycle/ship.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.d.ts +16 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js +174 -16
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-registry.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js +31 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.d.ts +2 -17
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js +222 -10
- package/node_modules/@sdd-agent-platform/core/dist/registries/capability-sources.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js +5 -5
- package/node_modules/@sdd-agent-platform/core/dist/registries/workflow-gates.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js +27 -12
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime-config.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/agent-runtime.d.ts +59 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js +191 -0
- package/node_modules/@sdd-agent-platform/core/dist/router/route-projection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js +32 -6
- package/node_modules/@sdd-agent-platform/core/dist/router/routing.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js +11 -4
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-inspection.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js +31 -3
- package/node_modules/@sdd-agent-platform/core/dist/router/runtime-validation.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js +48 -15
- package/node_modules/@sdd-agent-platform/core/dist/run-state/artifacts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/events.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.d.ts +3 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js +15 -49
- package/node_modules/@sdd-agent-platform/core/dist/run-state/inspect-run.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js +2 -2
- package/node_modules/@sdd-agent-platform/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/model.d.ts +25 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js +21 -14
- package/node_modules/@sdd-agent-platform/core/dist/run-state/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.d.ts +62 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js +130 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state/task-evidence.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.d.ts +10 -0
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js +44 -14
- package/node_modules/@sdd-agent-platform/core/dist/runtime-paths.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/context.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js +189 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js +12 -3
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.d.ts +20 -0
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js +101 -21
- package/node_modules/@sdd-agent-platform/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.d.ts +62 -1
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js +192 -4
- package/node_modules/@sdd-agent-platform/core/dist/status/project-status.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.d.ts +195 -2
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js +499 -2
- package/node_modules/@sdd-agent-platform/core/dist/storage/runtime-store.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js +23 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/apply.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.d.ts +19 -0
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js +114 -12
- package/node_modules/@sdd-agent-platform/core/dist/sync-back/inspect.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js +21 -0
- package/node_modules/@sdd-agent-platform/core/dist/test-support/fixtures.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js +16 -2
- package/node_modules/@sdd-agent-platform/core/dist/test-support/run-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/tsconfig.tsbuildinfo +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js +34 -2
- package/node_modules/@sdd-agent-platform/core/dist/verification/goal-verify.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js +15 -5
- package/node_modules/@sdd-agent-platform/core/dist/verification/rendering.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.d.ts +22 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js +53 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/review-gate.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js +102 -9
- package/node_modules/@sdd-agent-platform/core/dist/verification/single-task-loop.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.d.ts +16 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js +355 -69
- package/node_modules/@sdd-agent-platform/core/dist/verification/test-runtime.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.d.ts +58 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js +428 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/validation-wave.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js +116 -18
- package/node_modules/@sdd-agent-platform/core/dist/verification/verify-contract.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/verification.d.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/verification.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js +182 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js +130 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.d.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js +146 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/policy.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.d.ts +89 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js +2 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-gate/types.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js +16 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js +25 -11
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/dependencies.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.d.ts +38 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js +122 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.d.ts +27 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js +166 -37
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state/resolve.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.d.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js +1 -0
- package/node_modules/@sdd-agent-platform/core/dist/workflow-state.js.map +1 -1
- package/node_modules/@sdd-agent-platform/core/package.json +1 -1
- package/node_modules/@sdd-agent-platform/core/src/ai-tools.ts +31 -28
- package/node_modules/@sdd-agent-platform/core/src/artifacts/sdd-result.test.ts +50 -4
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.test.ts +13 -10
- package/node_modules/@sdd-agent-platform/core/src/config/init-project.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/config/starter-documents.ts +15 -5
- package/node_modules/@sdd-agent-platform/core/src/contracts.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/doctor/checks/run-evidence.ts +3 -3
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.test.ts +117 -5
- package/node_modules/@sdd-agent-platform/core/src/doctor/doctor.ts +164 -1
- package/node_modules/@sdd-agent-platform/core/src/evidence/lookup.ts +80 -0
- package/node_modules/@sdd-agent-platform/core/src/evidence-runtime/contracts.ts +12 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/agent-execution-records.ts +16 -11
- package/node_modules/@sdd-agent-platform/core/src/execution/background-executor.test.ts +7 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.test.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/resident-worker.ts +14 -6
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.test.ts +102 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/stage-team-runtime.ts +271 -0
- package/node_modules/@sdd-agent-platform/core/src/execution/wave-executor.test.ts +4 -0
- package/node_modules/@sdd-agent-platform/core/src/governance/policy.test.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/instructions.test.ts +11 -5
- package/node_modules/@sdd-agent-platform/core/src/instructions.ts +36 -36
- package/node_modules/@sdd-agent-platform/core/src/lifecycle/ship.ts +39 -17
- package/node_modules/@sdd-agent-platform/core/src/phase8-contracts.test.ts +3 -2
- package/node_modules/@sdd-agent-platform/core/src/phase8-risk-kernel.test.ts +5 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/task-graph.test.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/planning/wave-plan.test.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-capability-catalog.ts +269 -17
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-registry.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/agent-runtime-static.ts +41 -1
- package/node_modules/@sdd-agent-platform/core/src/registries/capability-sources.ts +238 -15
- package/node_modules/@sdd-agent-platform/core/src/registries/registries.test.ts +27 -2
- package/node_modules/@sdd-agent-platform/core/src/registries/workflow-gates.ts +5 -5
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime-config.ts +31 -12
- package/node_modules/@sdd-agent-platform/core/src/router/agent-runtime.ts +66 -1
- package/node_modules/@sdd-agent-platform/core/src/router/route-projection.ts +211 -0
- package/node_modules/@sdd-agent-platform/core/src/router/route-sdd-task.test.ts +151 -3
- package/node_modules/@sdd-agent-platform/core/src/router/routing.ts +35 -6
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-inspection.ts +11 -4
- package/node_modules/@sdd-agent-platform/core/src/router/runtime-validation.ts +32 -3
- package/node_modules/@sdd-agent-platform/core/src/run-state/artifacts.ts +48 -15
- package/node_modules/@sdd-agent-platform/core/src/run-state/events.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/inspect-run.ts +17 -52
- package/node_modules/@sdd-agent-platform/core/src/run-state/invocation-ledger.ts +2 -2
- package/node_modules/@sdd-agent-platform/core/src/run-state/model.ts +28 -1
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.test.ts +3 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state/run-state.ts +22 -18
- package/node_modules/@sdd-agent-platform/core/src/run-state/task-evidence.ts +206 -0
- package/node_modules/@sdd-agent-platform/core/src/run-state.ts +1 -0
- package/node_modules/@sdd-agent-platform/core/src/runtime-paths.ts +54 -14
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/context.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/document-hashes.ts +207 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/run-binding.ts +12 -3
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.test.ts +139 -0
- package/node_modules/@sdd-agent-platform/core/src/sdd-docs/task-parser.ts +137 -24
- package/node_modules/@sdd-agent-platform/core/src/status/project-status.ts +268 -5
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.test.ts +368 -4
- package/node_modules/@sdd-agent-platform/core/src/storage/runtime-store.ts +697 -2
- package/node_modules/@sdd-agent-platform/core/src/sync-back/apply.ts +23 -1
- package/node_modules/@sdd-agent-platform/core/src/sync-back/inspect.ts +145 -12
- package/node_modules/@sdd-agent-platform/core/src/sync-back/sync-back.test.ts +132 -9
- package/node_modules/@sdd-agent-platform/core/src/test-support/fixtures.ts +21 -0
- package/node_modules/@sdd-agent-platform/core/src/test-support/run-state.ts +16 -2
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/verification/goal-verify.ts +38 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/rendering.ts +15 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.test.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/review-gate.ts +77 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.test.ts +64 -4
- package/node_modules/@sdd-agent-platform/core/src/verification/single-task-loop.ts +110 -12
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.test.ts +72 -25
- package/node_modules/@sdd-agent-platform/core/src/verification/test-runtime.ts +402 -77
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.test.ts +341 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/validation-wave.ts +513 -0
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.test.ts +144 -5
- package/node_modules/@sdd-agent-platform/core/src/verification/verify-contract.ts +129 -18
- package/node_modules/@sdd-agent-platform/core/src/verification.ts +2 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/evidence-packet.ts +196 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.test.ts +171 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/hard-checks.ts +143 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.test.ts +137 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/policy.ts +155 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-gate/types.ts +114 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/affected-file-conflicts.ts +18 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.test.ts +1 -1
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/dependencies.ts +33 -11
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/latest-eligible-run.ts +156 -0
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.test.ts +351 -2
- package/node_modules/@sdd-agent-platform/core/src/workflow-state/resolve.ts +227 -39
- package/node_modules/@sdd-agent-platform/core/src/workflow-state.ts +1 -0
- package/package.json +1 -1
- package/packages/cli/dist/commands/status.js +2 -2
- package/packages/cli/dist/commands/status.js.map +1 -1
- package/packages/cli/dist/commands/sync-back.js +1 -1
- package/packages/cli/dist/commands/sync-back.js.map +1 -1
- package/packages/cli/dist/commands/tasks.js +4 -4
- package/packages/cli/dist/commands/tasks.js.map +1 -1
- package/packages/cli/dist/commands/test.js +94 -5
- package/packages/cli/dist/commands/test.js.map +1 -1
- package/packages/cli/dist/commands/verifies.js +5 -3
- package/packages/cli/dist/commands/verifies.js.map +1 -1
- package/packages/cli/dist/commands/verify.js +48 -7
- package/packages/cli/dist/commands/verify.js.map +1 -1
- package/packages/cli/dist/help.js +32 -18
- package/packages/cli/dist/help.js.map +1 -1
- package/packages/cli/dist/renderers/artifacts.js +1 -1
- package/packages/cli/dist/renderers/artifacts.js.map +1 -1
- package/packages/cli/dist/renderers/registry-runtime.js +7 -2
- package/packages/cli/dist/renderers/registry-runtime.js.map +1 -1
- package/packages/cli/dist/renderers/router.js +4 -2
- package/packages/cli/dist/renderers/router.js.map +1 -1
- package/packages/cli/dist/renderers/workflow.js +33 -12
- package/packages/cli/dist/renderers/workflow.js.map +1 -1
- package/packages/cli/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/cli/package.json +2 -2
- package/packages/core/dist/ai-tools.js +31 -28
- package/packages/core/dist/ai-tools.js.map +1 -1
- package/packages/core/dist/config/init-project.js +3 -2
- package/packages/core/dist/config/init-project.js.map +1 -1
- package/packages/core/dist/config/starter-documents.d.ts +1 -1
- package/packages/core/dist/config/starter-documents.js +14 -5
- package/packages/core/dist/config/starter-documents.js.map +1 -1
- package/packages/core/dist/contracts.d.ts +2 -0
- package/packages/core/dist/contracts.js +2 -0
- package/packages/core/dist/contracts.js.map +1 -1
- package/packages/core/dist/doctor/checks/run-evidence.js +3 -3
- package/packages/core/dist/doctor/checks/run-evidence.js.map +1 -1
- package/packages/core/dist/doctor/doctor.js +155 -1
- package/packages/core/dist/doctor/doctor.js.map +1 -1
- package/packages/core/dist/evidence/lookup.d.ts +23 -0
- package/packages/core/dist/evidence/lookup.js +54 -0
- package/packages/core/dist/evidence/lookup.js.map +1 -0
- package/packages/core/dist/evidence-runtime/contracts.d.ts +11 -0
- package/packages/core/dist/execution/agent-execution-records.js +15 -8
- package/packages/core/dist/execution/agent-execution-records.js.map +1 -1
- package/packages/core/dist/execution/resident-worker.js +14 -6
- package/packages/core/dist/execution/resident-worker.js.map +1 -1
- package/packages/core/dist/execution/stage-team-runtime.d.ts +112 -0
- package/packages/core/dist/execution/stage-team-runtime.js +145 -0
- package/packages/core/dist/execution/stage-team-runtime.js.map +1 -0
- package/packages/core/dist/instructions.js +36 -36
- package/packages/core/dist/instructions.js.map +1 -1
- package/packages/core/dist/lifecycle/ship.d.ts +2 -0
- package/packages/core/dist/lifecycle/ship.js +37 -17
- package/packages/core/dist/lifecycle/ship.js.map +1 -1
- package/packages/core/dist/registries/agent-capability-catalog.d.ts +16 -1
- package/packages/core/dist/registries/agent-capability-catalog.js +174 -16
- package/packages/core/dist/registries/agent-capability-catalog.js.map +1 -1
- package/packages/core/dist/registries/agent-registry.js +2 -2
- package/packages/core/dist/registries/agent-registry.js.map +1 -1
- package/packages/core/dist/registries/agent-runtime-static.d.ts +10 -0
- package/packages/core/dist/registries/agent-runtime-static.js +31 -1
- package/packages/core/dist/registries/agent-runtime-static.js.map +1 -1
- package/packages/core/dist/registries/capability-sources.d.ts +2 -17
- package/packages/core/dist/registries/capability-sources.js +222 -10
- package/packages/core/dist/registries/capability-sources.js.map +1 -1
- package/packages/core/dist/registries/workflow-gates.js +5 -5
- package/packages/core/dist/registries/workflow-gates.js.map +1 -1
- package/packages/core/dist/router/agent-runtime-config.js +27 -12
- package/packages/core/dist/router/agent-runtime-config.js.map +1 -1
- package/packages/core/dist/router/agent-runtime.d.ts +59 -1
- package/packages/core/dist/router/route-projection.d.ts +3 -1
- package/packages/core/dist/router/route-projection.js +191 -0
- package/packages/core/dist/router/route-projection.js.map +1 -1
- package/packages/core/dist/router/routing.js +32 -6
- package/packages/core/dist/router/routing.js.map +1 -1
- package/packages/core/dist/router/runtime-inspection.js +11 -4
- package/packages/core/dist/router/runtime-inspection.js.map +1 -1
- package/packages/core/dist/router/runtime-validation.js +31 -3
- package/packages/core/dist/router/runtime-validation.js.map +1 -1
- package/packages/core/dist/run-state/artifacts.js +48 -15
- package/packages/core/dist/run-state/artifacts.js.map +1 -1
- package/packages/core/dist/run-state/events.js +2 -2
- package/packages/core/dist/run-state/events.js.map +1 -1
- package/packages/core/dist/run-state/inspect-run.d.ts +3 -1
- package/packages/core/dist/run-state/inspect-run.js +15 -49
- package/packages/core/dist/run-state/inspect-run.js.map +1 -1
- package/packages/core/dist/run-state/invocation-ledger.js +2 -2
- package/packages/core/dist/run-state/invocation-ledger.js.map +1 -1
- package/packages/core/dist/run-state/model.d.ts +25 -1
- package/packages/core/dist/run-state/run-state.js +21 -14
- package/packages/core/dist/run-state/run-state.js.map +1 -1
- package/packages/core/dist/run-state/task-evidence.d.ts +62 -0
- package/packages/core/dist/run-state/task-evidence.js +130 -0
- package/packages/core/dist/run-state/task-evidence.js.map +1 -0
- package/packages/core/dist/run-state.d.ts +1 -0
- package/packages/core/dist/run-state.js +1 -0
- package/packages/core/dist/run-state.js.map +1 -1
- package/packages/core/dist/runtime-paths.d.ts +10 -0
- package/packages/core/dist/runtime-paths.js +44 -14
- package/packages/core/dist/runtime-paths.js.map +1 -1
- package/packages/core/dist/sdd-docs/context.js +1 -1
- package/packages/core/dist/sdd-docs/context.js.map +1 -1
- package/packages/core/dist/sdd-docs/document-hashes.d.ts +4 -0
- package/packages/core/dist/sdd-docs/document-hashes.js +189 -0
- package/packages/core/dist/sdd-docs/document-hashes.js.map +1 -0
- package/packages/core/dist/sdd-docs/run-binding.js +12 -3
- package/packages/core/dist/sdd-docs/run-binding.js.map +1 -1
- package/packages/core/dist/sdd-docs/task-parser.d.ts +20 -0
- package/packages/core/dist/sdd-docs/task-parser.js +101 -21
- package/packages/core/dist/sdd-docs/task-parser.js.map +1 -1
- package/packages/core/dist/status/project-status.d.ts +62 -1
- package/packages/core/dist/status/project-status.js +192 -4
- package/packages/core/dist/status/project-status.js.map +1 -1
- package/packages/core/dist/storage/runtime-store.d.ts +195 -2
- package/packages/core/dist/storage/runtime-store.js +499 -2
- package/packages/core/dist/storage/runtime-store.js.map +1 -1
- package/packages/core/dist/sync-back/apply.js +23 -1
- package/packages/core/dist/sync-back/apply.js.map +1 -1
- package/packages/core/dist/sync-back/inspect.d.ts +19 -0
- package/packages/core/dist/sync-back/inspect.js +114 -12
- package/packages/core/dist/sync-back/inspect.js.map +1 -1
- package/packages/core/dist/test-support/fixtures.js +21 -0
- package/packages/core/dist/test-support/fixtures.js.map +1 -1
- package/packages/core/dist/test-support/run-state.js +16 -2
- package/packages/core/dist/test-support/run-state.js.map +1 -1
- package/packages/core/dist/tsconfig.tsbuildinfo +1 -1
- package/packages/core/dist/verification/goal-verify.js +34 -2
- package/packages/core/dist/verification/goal-verify.js.map +1 -1
- package/packages/core/dist/verification/rendering.js +15 -5
- package/packages/core/dist/verification/rendering.js.map +1 -1
- package/packages/core/dist/verification/review-gate.d.ts +22 -0
- package/packages/core/dist/verification/review-gate.js +53 -0
- package/packages/core/dist/verification/review-gate.js.map +1 -0
- package/packages/core/dist/verification/single-task-loop.js +102 -9
- package/packages/core/dist/verification/single-task-loop.js.map +1 -1
- package/packages/core/dist/verification/test-runtime.d.ts +16 -1
- package/packages/core/dist/verification/test-runtime.js +355 -69
- package/packages/core/dist/verification/test-runtime.js.map +1 -1
- package/packages/core/dist/verification/validation-wave.d.ts +58 -0
- package/packages/core/dist/verification/validation-wave.js +428 -0
- package/packages/core/dist/verification/validation-wave.js.map +1 -0
- package/packages/core/dist/verification/verify-contract.d.ts +2 -0
- package/packages/core/dist/verification/verify-contract.js +116 -18
- package/packages/core/dist/verification/verify-contract.js.map +1 -1
- package/packages/core/dist/verification.d.ts +2 -0
- package/packages/core/dist/verification.js +2 -0
- package/packages/core/dist/verification.js.map +1 -1
- package/packages/core/dist/workflow-gate/evidence-packet.d.ts +24 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js +182 -0
- package/packages/core/dist/workflow-gate/evidence-packet.js.map +1 -0
- package/packages/core/dist/workflow-gate/hard-checks.d.ts +4 -0
- package/packages/core/dist/workflow-gate/hard-checks.js +130 -0
- package/packages/core/dist/workflow-gate/hard-checks.js.map +1 -0
- package/packages/core/dist/workflow-gate/policy.d.ts +4 -0
- package/packages/core/dist/workflow-gate/policy.js +146 -0
- package/packages/core/dist/workflow-gate/policy.js.map +1 -0
- package/packages/core/dist/workflow-gate/types.d.ts +89 -0
- package/packages/core/dist/workflow-gate/types.js +2 -0
- package/packages/core/dist/workflow-gate/types.js.map +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.d.ts +1 -0
- package/packages/core/dist/workflow-state/affected-file-conflicts.js +16 -1
- package/packages/core/dist/workflow-state/affected-file-conflicts.js.map +1 -1
- package/packages/core/dist/workflow-state/dependencies.d.ts +8 -4
- package/packages/core/dist/workflow-state/dependencies.js +25 -11
- package/packages/core/dist/workflow-state/dependencies.js.map +1 -1
- package/packages/core/dist/workflow-state/latest-eligible-run.d.ts +38 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js +122 -0
- package/packages/core/dist/workflow-state/latest-eligible-run.js.map +1 -0
- package/packages/core/dist/workflow-state/resolve.d.ts +27 -0
- package/packages/core/dist/workflow-state/resolve.js +166 -37
- package/packages/core/dist/workflow-state/resolve.js.map +1 -1
- package/packages/core/dist/workflow-state.d.ts +1 -0
- package/packages/core/dist/workflow-state.js +1 -0
- package/packages/core/dist/workflow-state.js.map +1 -1
- package/packages/core/package.json +1 -1
|
@@ -3,6 +3,7 @@ import path from 'node:path';
|
|
|
3
3
|
import { doctor } from '../doctor/doctor.js';
|
|
4
4
|
import type { DoctorLevel, DoctorReport } from '../doctor/model.js';
|
|
5
5
|
import { getProjectStatus, type ProjectStatus } from '../status/project-status.js';
|
|
6
|
+
import { evaluateAndRecordWorkflowGateDecision } from '../workflow-gate/evidence-packet.js';
|
|
6
7
|
|
|
7
8
|
export interface ShipReadinessCheck {
|
|
8
9
|
name: string;
|
|
@@ -32,6 +33,8 @@ export interface ShipResult {
|
|
|
32
33
|
dependencyBlockers: number;
|
|
33
34
|
tokenProjection: ProjectStatus['tokenProjection'];
|
|
34
35
|
lifecycleRisk: ProjectStatus['lifecycleRisk'];
|
|
36
|
+
capabilityHealth: ProjectStatus['capabilityHealth'];
|
|
37
|
+
workflowGateHealth: ProjectStatus['workflowGateHealth'];
|
|
35
38
|
};
|
|
36
39
|
doctor: {
|
|
37
40
|
status: DoctorLevel;
|
|
@@ -46,12 +49,16 @@ export async function runShip(projectRoot: string, options: { branch?: string |
|
|
|
46
49
|
const checkedAt = new Date().toISOString();
|
|
47
50
|
const projectStatus = await getProjectStatus(projectRoot, { branch: options.branch ?? undefined, branchSource: options.branch ? 'cli_option' : undefined });
|
|
48
51
|
const doctorReport = await doctor(projectRoot, { latestOnly: true, branch: projectStatus.branch });
|
|
49
|
-
const
|
|
52
|
+
const gateDecision = projectStatus.latestRun?.taskId
|
|
53
|
+
? (await evaluateAndRecordWorkflowGateDecision(projectRoot, { branch: projectStatus.branch, taskId: projectStatus.latestRun.taskId, runId: projectStatus.latestRun.runId, decisionKind: 'ship' })).decision
|
|
54
|
+
: null;
|
|
55
|
+
const projectStatusWithGate = gateDecision ? await getProjectStatus(projectRoot, { branch: options.branch ?? undefined, branchSource: options.branch ? 'cli_option' : undefined }) : projectStatus;
|
|
56
|
+
const checks = buildShipChecks(projectStatusWithGate, doctorReport, gateDecision);
|
|
50
57
|
const blocked = checks.some((check) => check.status === 'BLOCKED');
|
|
51
58
|
const status = blocked ? 'BLOCKED' : 'PASS';
|
|
52
59
|
const releasePath = path.join(projectStatus.context.specDir, 'release.md');
|
|
53
60
|
const nextActions = shipNextActions(projectStatus.branch, checks);
|
|
54
|
-
const releaseDocument = renderReleaseDocument({ checkedAt, projectStatus, doctorReport, checks, nextActions, status });
|
|
61
|
+
const releaseDocument = renderReleaseDocument({ checkedAt, projectStatus: projectStatusWithGate, doctorReport, checks, nextActions, status });
|
|
55
62
|
const dryRun = options.dryRun === true;
|
|
56
63
|
if (!dryRun) {
|
|
57
64
|
const absoluteReleasePath = path.join(projectRoot, releasePath);
|
|
@@ -69,29 +76,31 @@ export async function runShip(projectRoot: string, options: { branch?: string |
|
|
|
69
76
|
checks,
|
|
70
77
|
nextActions,
|
|
71
78
|
projectStatus: {
|
|
72
|
-
workflowStatus:
|
|
73
|
-
tasks:
|
|
74
|
-
taskRisk:
|
|
75
|
-
latestRun:
|
|
76
|
-
latestRunEvidence:
|
|
77
|
-
staleReasons:
|
|
78
|
-
affectedFileConflicts:
|
|
79
|
-
dependencyBlockers:
|
|
80
|
-
tokenProjection:
|
|
81
|
-
lifecycleRisk:
|
|
79
|
+
workflowStatus: projectStatusWithGate.workflowStatus,
|
|
80
|
+
tasks: projectStatusWithGate.tasks,
|
|
81
|
+
taskRisk: projectStatusWithGate.taskRisk,
|
|
82
|
+
latestRun: projectStatusWithGate.latestRun,
|
|
83
|
+
latestRunEvidence: projectStatusWithGate.latestRunEvidence,
|
|
84
|
+
staleReasons: projectStatusWithGate.latestRunStaleReasons,
|
|
85
|
+
affectedFileConflicts: projectStatusWithGate.affectedFileConflicts.length,
|
|
86
|
+
dependencyBlockers: projectStatusWithGate.dependencyBlockers.length,
|
|
87
|
+
tokenProjection: projectStatusWithGate.tokenProjection,
|
|
88
|
+
lifecycleRisk: projectStatusWithGate.lifecycleRisk,
|
|
89
|
+
capabilityHealth: projectStatusWithGate.capabilityHealth,
|
|
90
|
+
workflowGateHealth: projectStatusWithGate.workflowGateHealth
|
|
82
91
|
},
|
|
83
92
|
doctor: summarizeDoctor(doctorReport),
|
|
84
93
|
releaseDocument
|
|
85
94
|
};
|
|
86
95
|
}
|
|
87
96
|
|
|
88
|
-
function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorReport): ShipReadinessCheck[] {
|
|
97
|
+
function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorReport, gateDecision: ProjectStatus['workflowGateHealth']['latestDecision']): ShipReadinessCheck[] {
|
|
89
98
|
const checks: ShipReadinessCheck[] = [];
|
|
90
99
|
checks.push({
|
|
91
100
|
name: 'documents',
|
|
92
101
|
status: projectStatus.documents.specExists && projectStatus.documents.planExists && projectStatus.documents.tasksExists && projectStatus.documents.verifyExists ? 'PASS' : 'BLOCKED',
|
|
93
102
|
message: `spec=${projectStatus.documents.specExists} plan=${projectStatus.documents.planExists} tasks=${projectStatus.documents.tasksExists} verify=${projectStatus.documents.verifyExists}`,
|
|
94
|
-
nextAction:
|
|
103
|
+
nextAction: `Run missing document stages for ${projectStatus.branch}: sdd spec, sdd plan, then sdd tasks so verify.md is regenerated from the frozen tasks contract.`
|
|
95
104
|
});
|
|
96
105
|
checks.push({
|
|
97
106
|
name: 'workflow_gaps',
|
|
@@ -107,7 +116,7 @@ function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorRepor
|
|
|
107
116
|
});
|
|
108
117
|
checks.push({
|
|
109
118
|
name: 'doctor_fast',
|
|
110
|
-
status: doctorReport.status === '
|
|
119
|
+
status: doctorReport.status === 'FAIL' ? 'BLOCKED' : 'PASS',
|
|
111
120
|
message: `doctor_status=${doctorReport.status}`,
|
|
112
121
|
nextAction: `sdd doctor fast --branch ${projectStatus.branch}`
|
|
113
122
|
});
|
|
@@ -155,6 +164,18 @@ function buildShipChecks(projectStatus: ProjectStatus, doctorReport: DoctorRepor
|
|
|
155
164
|
message: `status=${projectStatus.subagentDispatches.status} blocking_open=${projectStatus.subagentDispatches.blockingOpen} failed=${projectStatus.subagentDispatches.failed} archived=${projectStatus.subagentDispatches.archived} superseded=${projectStatus.subagentDispatches.superseded}`,
|
|
156
165
|
nextAction: subagentDispatchesReady(projectStatus) ? undefined : projectStatus.subagentDispatches.reasons.join(' ')
|
|
157
166
|
});
|
|
167
|
+
checks.push({
|
|
168
|
+
name: 'capability_health',
|
|
169
|
+
status: projectStatus.capabilityHealth.status === 'blocked' ? 'BLOCKED' : 'PASS',
|
|
170
|
+
message: `status=${projectStatus.capabilityHealth.status} baseline=${projectStatus.capabilityHealth.baselineDomains.length}/${projectStatus.capabilityHealth.requiredProfessionalDomains.length} release_critical_gaps=${projectStatus.capabilityHealth.releaseCriticalGaps.join(',') || 'none'} evidence_candidate=${projectStatus.capabilityHealth.evidence.candidate} evidence_quarantined=${projectStatus.capabilityHealth.evidence.quarantined} evidence_blocked=${projectStatus.capabilityHealth.evidence.blocked}` ,
|
|
171
|
+
nextAction: projectStatus.capabilityHealth.status === 'blocked' ? `Run sdd test task, sdd test batch, or sdd test wave for ${projectStatus.branch} to record accepted runtime evidence; capability output remains advisory.` : undefined
|
|
172
|
+
});
|
|
173
|
+
checks.push({
|
|
174
|
+
name: 'workflow_gate',
|
|
175
|
+
status: gateDecision && gateDecision.status !== 'PASS' ? 'BLOCKED' : 'PASS',
|
|
176
|
+
message: gateDecision ? `decision=${gateDecision.decisionId} status=${gateDecision.status} hard_blocks=${gateDecision.hardBlocks.length} warnings=${gateDecision.warnings.length} human_required=${gateDecision.humanRequired}` : 'decision=none',
|
|
177
|
+
nextAction: gateDecision && gateDecision.status !== 'PASS' ? gateDecision.allowedNextActions.join(', ') : undefined
|
|
178
|
+
});
|
|
158
179
|
return checks;
|
|
159
180
|
}
|
|
160
181
|
|
|
@@ -163,8 +184,7 @@ function latestRunReady(projectStatus: ProjectStatus): boolean {
|
|
|
163
184
|
return false;
|
|
164
185
|
}
|
|
165
186
|
return projectStatus.latestRun.status === 'completed'
|
|
166
|
-
&& projectStatus.latestRun.validationStatus === 'pass'
|
|
167
|
-
&& projectStatus.latestRun.syncBackStatus === 'applied';
|
|
187
|
+
&& projectStatus.latestRun.validationStatus === 'pass';
|
|
168
188
|
}
|
|
169
189
|
|
|
170
190
|
function lifecycleRiskReady(projectStatus: ProjectStatus): boolean {
|
|
@@ -231,6 +251,8 @@ function renderReleaseDocument(input: {
|
|
|
231
251
|
evidence ? `- latest_run_evidence: route_preflight=${evidence.routePreflight} agent_executions=${evidence.agentExecutions} team_sessions=${evidence.teamSessions} worker_runtimes=${evidence.workerRuntimes} stale_worker_runtimes=${evidence.staleWorkerRuntimes} artifact_ingestions=${evidence.artifactIngestions}` : '- latest_run_evidence: none',
|
|
232
252
|
`- token_health: ${input.projectStatus.tokenProjection.health} estimated_tokens=${input.projectStatus.tokenProjection.estimatedTokens ?? 'unknown'} context_packages=${input.projectStatus.tokenProjection.contextPackages} team_runtime_decisions=${input.projectStatus.tokenProjection.teamRuntimeDecisions}`,
|
|
233
253
|
`- lifecycle_risk: status=${input.projectStatus.lifecycleRisk.status} profile=${input.projectStatus.lifecycleRisk.profile ?? 'none'} approval=${input.projectStatus.lifecycleRisk.approvalPolicy ?? 'none'} input=${input.projectStatus.lifecycleRisk.inputHash ?? 'none'} expected=${input.projectStatus.lifecycleRisk.expectedInputHash}`,
|
|
254
|
+
`- capability_health: status=${input.projectStatus.capabilityHealth.status} baseline=${input.projectStatus.capabilityHealth.baselineDomains.length}/${input.projectStatus.capabilityHealth.requiredProfessionalDomains.length} active=${input.projectStatus.capabilityHealth.activeDomains.join(',') || 'none'} release_critical_gaps=${input.projectStatus.capabilityHealth.releaseCriticalGaps.join(',') || 'none'} evidence_candidate=${input.projectStatus.capabilityHealth.evidence.candidate} evidence_quarantined=${input.projectStatus.capabilityHealth.evidence.quarantined} evidence_blocked=${input.projectStatus.capabilityHealth.evidence.blocked}`,
|
|
255
|
+
`- workflow_gate: decisions=${input.projectStatus.workflowGateHealth.decisions} latest=${input.projectStatus.workflowGateHealth.latestDecision ? `${input.projectStatus.workflowGateHealth.latestDecision.decisionKind}:${input.projectStatus.workflowGateHealth.latestDecision.status}:${input.projectStatus.workflowGateHealth.latestDecision.decisionId}` : 'none'}`,
|
|
234
256
|
`- doctor_fast: status=${input.doctorReport.status} checks=${input.doctorReport.checks.length}`,
|
|
235
257
|
'',
|
|
236
258
|
'## Next actions',
|
|
@@ -208,9 +208,10 @@ test('work units, subagents, context offload, evidence, and model artifacts stay
|
|
|
208
208
|
policyJudgment: 'PASS',
|
|
209
209
|
commands: [],
|
|
210
210
|
acceptanceCoverage: [],
|
|
211
|
-
|
|
211
|
+
capabilityEvidence: [],
|
|
212
|
+
syncBackReady: false,
|
|
212
213
|
gaps: [],
|
|
213
|
-
next: 'sdd
|
|
214
|
+
next: 'sdd ship --branch master --dry-run',
|
|
214
215
|
generatedAt: now
|
|
215
216
|
};
|
|
216
217
|
|
|
@@ -244,6 +244,11 @@ function task(): SddTask {
|
|
|
244
244
|
title: 'Integrate lifecycle risk diagnostics',
|
|
245
245
|
status: 'pending',
|
|
246
246
|
wave: null,
|
|
247
|
+
implementationWave: null,
|
|
248
|
+
validationBatch: null,
|
|
249
|
+
validationTiming: 'task_end',
|
|
250
|
+
requiresVerifyBeforeNext: true,
|
|
251
|
+
changeSurface: 'unknown',
|
|
247
252
|
dependsOn: [],
|
|
248
253
|
affectedFiles: ['packages/core/src/status/project-status.ts'],
|
|
249
254
|
validation: ['npm test'],
|
|
@@ -7,6 +7,7 @@ import path from 'node:path';
|
|
|
7
7
|
import { initProject } from '../config/init-project.js';
|
|
8
8
|
import { doctor } from '../doctor/doctor.js';
|
|
9
9
|
import { graphTaskMarkdown, harnessTaskMarkdown, writeBranchDocs } from '../test-support/fixtures.js';
|
|
10
|
+
import { writeVerifyContract } from '../verification/verify-contract.js';
|
|
10
11
|
import { inspectTaskGraph } from './task-graph.js';
|
|
11
12
|
|
|
12
13
|
test('task graph planner builds dependency and file overlap graph', async () => {
|
|
@@ -14,6 +15,7 @@ test('task graph planner builds dependency and file overlap graph', async () =>
|
|
|
14
15
|
try {
|
|
15
16
|
await initProject(root);
|
|
16
17
|
await writeBranchDocs(root, 'master', `# Tasks\n\n${graphTaskMarkdown('G1', [], ['src/a.ts'], [])}\n${graphTaskMarkdown('G2', ['G1'], ['./src/a.ts', 'src/b.ts'], ['security'])}`);
|
|
18
|
+
await writeVerifyContract(root, { branch: 'master', branchSource: 'cli_option', force: true });
|
|
17
19
|
|
|
18
20
|
const graph = await inspectTaskGraph(root, { branch: 'master' });
|
|
19
21
|
|
|
@@ -7,6 +7,7 @@ import path from 'node:path';
|
|
|
7
7
|
import { initProject } from '../config/init-project.js';
|
|
8
8
|
import { doctor } from '../doctor/doctor.js';
|
|
9
9
|
import { graphTaskMarkdown, writeBranchDocs } from '../test-support/fixtures.js';
|
|
10
|
+
import { writeVerifyContract } from '../verification/verify-contract.js';
|
|
10
11
|
import { inspectWavePlan } from './wave-plan.js';
|
|
11
12
|
|
|
12
13
|
test('wave planner builds dependency waves and separates file overlaps', async () => {
|
|
@@ -14,6 +15,7 @@ test('wave planner builds dependency waves and separates file overlaps', async (
|
|
|
14
15
|
try {
|
|
15
16
|
await initProject(root);
|
|
16
17
|
await writeBranchDocs(root, 'master', `# Tasks\n\n${graphTaskMarkdown('W1', [], ['src/a.ts'], [])}\n${graphTaskMarkdown('W2', [], ['./src/a.ts'], [])}\n${graphTaskMarkdown('W3', ['W1'], ['src/c.ts'], [])}`);
|
|
18
|
+
await writeVerifyContract(root, { branch: 'master', branchSource: 'cli_option', force: true });
|
|
17
19
|
|
|
18
20
|
const plan = await inspectWavePlan(root, { branch: 'master', capabilityId: 'native-file-edit' });
|
|
19
21
|
|
|
@@ -32,6 +34,7 @@ test('wave planner routes manual gates and downstream blocked tasks', async () =
|
|
|
32
34
|
try {
|
|
33
35
|
await initProject(root);
|
|
34
36
|
await writeBranchDocs(root, 'master', `# Tasks\n\n${graphTaskMarkdown('DB1', [], ['db/schema.sql'], ['database'])}\n${graphTaskMarkdown('APP1', ['DB1'], ['src/app.ts'], [])}`);
|
|
37
|
+
await writeVerifyContract(root, { branch: 'master', branchSource: 'cli_option', force: true });
|
|
35
38
|
|
|
36
39
|
const plan = await inspectWavePlan(root, { branch: 'master', capabilityId: 'native-file-edit' });
|
|
37
40
|
|
|
@@ -3,29 +3,56 @@ import { parseProjectConfig } from '../config/project-config.js';
|
|
|
3
3
|
import { getProjectConfigPath } from '../runtime-paths.js';
|
|
4
4
|
import { readFile } from 'node:fs/promises';
|
|
5
5
|
|
|
6
|
-
export type
|
|
6
|
+
export type WorkflowCapabilityDomain = 'norm_discovery' | 'uncertainty_resolution' | 'performance_planning' | 'verification_design' | 'evidence_collection' | 'sync_back_risk_review' | 'release_summary' | 'context_curation';
|
|
7
|
+
export type ProfessionalCapabilityDomain = 'solution-design' | 'architecture-design' | 'backend-engineering' | 'frontend-engineering' | 'db-data-engineering' | 'testing-quality-engineering' | 'security-engineering' | 'performance-engineering' | 'observability-engineering' | 'release-engineering' | 'ui-ux-product-design';
|
|
8
|
+
export type AgentCapabilityDomain = WorkflowCapabilityDomain | ProfessionalCapabilityDomain;
|
|
9
|
+
export type AgentCapabilityDomainGroup = 'workflow' | 'professional';
|
|
10
|
+
export const REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS: ProfessionalCapabilityDomain[] = [
|
|
11
|
+
'solution-design',
|
|
12
|
+
'architecture-design',
|
|
13
|
+
'backend-engineering',
|
|
14
|
+
'frontend-engineering',
|
|
15
|
+
'db-data-engineering',
|
|
16
|
+
'testing-quality-engineering',
|
|
17
|
+
'security-engineering',
|
|
18
|
+
'performance-engineering',
|
|
19
|
+
'observability-engineering',
|
|
20
|
+
'release-engineering',
|
|
21
|
+
'ui-ux-product-design'
|
|
22
|
+
];
|
|
7
23
|
export type AgentCapabilityStage = 'spec' | 'plan' | 'tasks' | 'verifies' | 'test' | 'do' | 'verify' | 'sync-back' | 'ship';
|
|
8
24
|
export type AgentCapabilityAuthority = 'advisory_only' | 'gate_evidence' | 'validation_runner';
|
|
9
25
|
export type MaterialPackLoadPolicy = 'route_when_triggered' | 'summary_only' | 'never_inline';
|
|
26
|
+
export type AgentCapabilityMaterialPolicy = 'metadata_only' | 'route_baseline_pack' | 'runtime_evidence_required';
|
|
27
|
+
export type AgentCapabilityEvidenceExpectation = 'advisory_note' | 'candidate_evidence' | 'accepted_runtime_evidence';
|
|
28
|
+
export type MaterialPackSourceKind = 'sdd_runtime_contract' | 'sdd_native_baseline';
|
|
10
29
|
|
|
11
30
|
export interface AgentCapabilityMaterialPack {
|
|
12
31
|
id: string;
|
|
13
32
|
summary: string;
|
|
33
|
+
domains: AgentCapabilityDomain[];
|
|
14
34
|
triggerStages: AgentCapabilityStage[];
|
|
15
35
|
triggerKeywords: string[];
|
|
16
36
|
loadPolicy: MaterialPackLoadPolicy;
|
|
17
37
|
sourceId: string;
|
|
38
|
+
sourceVersion: string;
|
|
39
|
+
sourceKind: MaterialPackSourceKind;
|
|
18
40
|
contextBudget: 'tiny' | 'small' | 'medium';
|
|
41
|
+
expectedOutputs: string[];
|
|
42
|
+
forbiddenUses: string[];
|
|
19
43
|
}
|
|
20
44
|
|
|
21
45
|
export interface AgentCapabilityCatalogEntry {
|
|
22
46
|
version: typeof AGENT_CAPABILITY_CATALOG_CONTRACT_VERSION;
|
|
23
47
|
id: string;
|
|
24
48
|
domain: AgentCapabilityDomain;
|
|
49
|
+
domainGroup: AgentCapabilityDomainGroup;
|
|
25
50
|
stages: AgentCapabilityStage[];
|
|
26
51
|
inputs: string[];
|
|
27
52
|
outputs: string[];
|
|
28
53
|
authority: AgentCapabilityAuthority;
|
|
54
|
+
materialPolicy: AgentCapabilityMaterialPolicy;
|
|
55
|
+
evidenceExpectation: AgentCapabilityEvidenceExpectation;
|
|
29
56
|
routing: {
|
|
30
57
|
riskTags: string[];
|
|
31
58
|
projectStackTags: string[];
|
|
@@ -62,22 +89,104 @@ export interface AgentCapabilityCatalogValidation {
|
|
|
62
89
|
}
|
|
63
90
|
|
|
64
91
|
const MATERIAL_PACKS: AgentCapabilityMaterialPack[] = [
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
92
|
+
materialPack(
|
|
93
|
+
'project-norms',
|
|
94
|
+
['norm_discovery', 'context_curation'],
|
|
95
|
+
'Project conventions, coding standards, and existing-spec alignment cues.',
|
|
96
|
+
['spec', 'plan', 'tasks'],
|
|
97
|
+
['规范', 'convention', 'standard', 'style', 'compatibility'],
|
|
98
|
+
'route_when_triggered',
|
|
99
|
+
'project_context_pack',
|
|
100
|
+
'sdd_runtime_contract',
|
|
101
|
+
'small',
|
|
102
|
+
['norm alignment note', 'coding convention cue'],
|
|
103
|
+
['lifecycle gate authority', 'stage completion decision', 'sync-back apply decision', 'ship readiness pass']
|
|
104
|
+
),
|
|
105
|
+
materialPack(
|
|
106
|
+
'uncertainty-map',
|
|
107
|
+
['uncertainty_resolution', 'context_curation'],
|
|
108
|
+
'Decision-boundary prompts for resolving unknowns from repo evidence before asking the user.',
|
|
109
|
+
['spec', 'plan'],
|
|
110
|
+
['uncertain', 'unknown', 'ambiguous', '不确定', '边界'],
|
|
111
|
+
'summary_only',
|
|
112
|
+
'harness_learning',
|
|
113
|
+
'sdd_runtime_contract',
|
|
114
|
+
'tiny',
|
|
115
|
+
['resolved assumption note', 'question checkpoint'],
|
|
116
|
+
['lifecycle gate authority', 'stage completion decision', 'sync-back apply decision', 'ship readiness pass']
|
|
117
|
+
),
|
|
118
|
+
materialPack(
|
|
119
|
+
'performance-risk',
|
|
120
|
+
['performance_planning', 'context_curation'],
|
|
121
|
+
'Planning checks for token, context, IO, runtime, and validation cost risks.',
|
|
122
|
+
['plan', 'tasks'],
|
|
123
|
+
['performance', 'token', 'context', 'latency', 'cost', '性能'],
|
|
124
|
+
'summary_only',
|
|
125
|
+
'skill_agent_eval',
|
|
126
|
+
'sdd_runtime_contract',
|
|
127
|
+
'tiny',
|
|
128
|
+
['performance risk note', 'context budget note'],
|
|
129
|
+
['lifecycle gate authority', 'stage completion decision', 'sync-back apply decision', 'ship readiness pass']
|
|
130
|
+
),
|
|
131
|
+
materialPack(
|
|
132
|
+
'verification-design',
|
|
133
|
+
['verification_design', 'evidence_collection'],
|
|
134
|
+
'Acceptance-to-evidence design patterns for verify.md and runtime evidence handoff.',
|
|
135
|
+
['verifies', 'test', 'verify'],
|
|
136
|
+
['verify', 'evidence', 'validation', 'acceptance', '验收'],
|
|
137
|
+
'route_when_triggered',
|
|
138
|
+
'verify_contract',
|
|
139
|
+
'sdd_runtime_contract',
|
|
140
|
+
'small',
|
|
141
|
+
['verification matrix', 'evidence requirement'],
|
|
142
|
+
['lifecycle gate authority', 'stage completion decision', 'sync-back apply decision', 'ship readiness pass']
|
|
143
|
+
),
|
|
144
|
+
materialPack(
|
|
145
|
+
'sync-back-risk',
|
|
146
|
+
['sync_back_risk_review', 'release_summary'],
|
|
147
|
+
'Risk checks for applying semantic completion back into tasks and release state.',
|
|
148
|
+
['sync-back', 'ship'],
|
|
149
|
+
['sync-back', 'ship', 'release', 'apply', '发布'],
|
|
150
|
+
'summary_only',
|
|
151
|
+
'governance_policy',
|
|
152
|
+
'sdd_runtime_contract',
|
|
153
|
+
'tiny',
|
|
154
|
+
['apply risk note', 'release readiness concern'],
|
|
155
|
+
['lifecycle gate authority', 'stage completion decision', 'sync-back apply decision', 'ship readiness pass']
|
|
156
|
+
),
|
|
157
|
+
professionalMaterialPack('baseline-solution-design', 'solution-design', 'Problem framing, option tradeoff, scope boundary, and success criteria review.', ['spec', 'plan'], ['solution', 'scope', 'tradeoff', 'goal', '方案'], ['problem framing', 'option tradeoff', 'scope boundary'], 'small'),
|
|
158
|
+
professionalMaterialPack('baseline-architecture-design', 'architecture-design', 'System boundary, component responsibility, integration, and runtime constraint review.', ['plan', 'tasks'], ['architecture', 'boundary', 'integration', 'component', '架构'], ['architecture decision note', 'component boundary note', 'handoff risk'], 'small'),
|
|
159
|
+
professionalMaterialPack('baseline-backend-engineering', 'backend-engineering', 'API, service, domain logic, error handling, and backend validation review.', ['plan', 'tasks', 'do', 'test'], ['backend', 'api', 'service', 'domain', '后端'], ['backend implementation note', 'API risk note', 'validation need'], 'small'),
|
|
160
|
+
professionalMaterialPack('baseline-frontend-engineering', 'frontend-engineering', 'Component boundary, UI state, browser behavior, accessibility, and frontend validation review.', ['plan', 'tasks', 'do', 'test'], ['frontend', 'component', 'browser', 'accessibility', '前端'], ['frontend implementation note', 'interaction state risk', 'browser validation need'], 'small'),
|
|
161
|
+
professionalMaterialPack('baseline-db-data-engineering', 'db-data-engineering', 'Schema, query, migration, data integrity, rollback, and data-safety review.', ['plan', 'tasks', 'do', 'test', 'ship'], ['database', 'schema', 'migration', 'query', '数据'], ['data safety note', 'migration risk', 'rollback consideration'], 'small'),
|
|
162
|
+
professionalMaterialPack('baseline-testing-quality-engineering', 'testing-quality-engineering', 'Acceptance coverage, test strategy, evidence quality, and regression-risk review.', ['verifies', 'test', 'verify'], ['test', 'quality', 'coverage', 'acceptance', '测试'], ['test strategy', 'coverage gap', 'evidence requirement'], 'small'),
|
|
163
|
+
professionalMaterialPack('baseline-security-engineering', 'security-engineering', 'Trust boundary, secret handling, permissions, abuse case, and security evidence review.', ['spec', 'plan', 'tasks', 'do', 'test', 'ship'], ['security', 'secret', 'permission', 'auth', '安全'], ['security risk note', 'abuse case', 'security evidence requirement'], 'small'),
|
|
164
|
+
professionalMaterialPack('baseline-performance-engineering', 'performance-engineering', 'Hot path, latency, resource use, benchmark, and capacity-risk review.', ['plan', 'tasks', 'do', 'test', 'ship'], ['performance', 'latency', 'resource', 'benchmark', '性能'], ['performance risk note', 'benchmark need', 'capacity consideration'], 'small'),
|
|
165
|
+
professionalMaterialPack('baseline-observability-engineering', 'observability-engineering', 'Logging, metrics, tracing, diagnostic signal, and operator-readiness review.', ['plan', 'tasks', 'do', 'test', 'ship'], ['observability', 'logging', 'metrics', 'tracing', '可观测'], ['logging/metrics/tracing need', 'diagnostic gap', 'operability note'], 'small'),
|
|
166
|
+
professionalMaterialPack('baseline-release-engineering', 'release-engineering', 'Release scope, CI state, deployment risk, rollback, and readiness review.', ['tasks', 'test', 'sync-back', 'ship'], ['release', 'ci', 'deploy', 'rollback', '发布'], ['release readiness note', 'deployment risk', 'ship blocker'], 'small'),
|
|
167
|
+
professionalMaterialPack('baseline-ui-ux-product-design', 'ui-ux-product-design', 'User journey, interaction state, UX acceptance, accessibility, and design evidence review.', ['spec', 'plan', 'tasks', 'do', 'test'], ['ui', 'ux', 'design', 'figma', '交互'], ['UX acceptance note', 'interaction gap', 'design evidence requirement'], 'small')
|
|
70
168
|
];
|
|
71
169
|
|
|
72
170
|
const CAPABILITIES: AgentCapabilityCatalogEntry[] = [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
171
|
+
workflowCapability('cap.norm-discovery', 'norm_discovery', ['spec', 'plan', 'tasks'], ['user request', 'project docs', 'existing specs', 'affected files'], ['norm alignment finding', 'scope constraint'], 'advisory_only', ['compatibility', 'style', 'architecture'], ['project-norms'], 'project_context_pack'),
|
|
172
|
+
workflowCapability('cap.uncertainty-resolution', 'uncertainty_resolution', ['spec', 'plan'], ['user request', 'repo evidence', 'open gaps'], ['resolved assumption', 'question checkpoint', 'blocked gap'], 'advisory_only', ['ambiguous', 'high_risk'], ['uncertainty-map'], 'harness_learning'),
|
|
173
|
+
workflowCapability('cap.performance-planning', 'performance_planning', ['plan', 'tasks'], ['target design', 'runtime path', 'context usage', 'validation cost'], ['performance impact note', 'token risk note', 'validation cost control'], 'advisory_only', ['performance', 'context_budget', 'token_risk'], ['performance-risk'], 'skill_agent_eval'),
|
|
174
|
+
workflowCapability('cap.verification-design', 'verification_design', ['verifies', 'test', 'verify'], ['tasks.md', 'verify.md', 'acceptance refs', 'runtime evidence'], ['verification matrix', 'evidence requirement', 'policy boundary'], 'gate_evidence', ['acceptance', 'evidence', 'policy'], ['verification-design'], 'verify_contract'),
|
|
175
|
+
workflowCapability('cap.evidence-collection', 'evidence_collection', ['test', 'do', 'verify'], ['validation command', 'artifact refs', 'run state'], ['command evidence', 'artifact ref', 'provenance ref'], 'validation_runner', ['validation', 'runtime_evidence'], ['verification-design'], 'test_runtime'),
|
|
176
|
+
workflowCapability('cap.sync-back-risk-review', 'sync_back_risk_review', ['sync-back'], ['verify decision', 'sync-back proposal', 'tasks.md'], ['apply risk note', 'approval requirement'], 'gate_evidence', ['shared_state', 'semantic_update'], ['sync-back-risk'], 'governance_policy'),
|
|
177
|
+
workflowCapability('cap.release-summary', 'release_summary', ['ship'], ['task status', 'doctor report', 'pack output', 'git state'], ['release readiness summary', 'blocked release gap'], 'advisory_only', ['release', 'external_state'], ['sync-back-risk'], 'governance_policy'),
|
|
178
|
+
workflowCapability('cap.context-curation', 'context_curation', ['spec', 'plan', 'do', 'verify', 'ship'], ['material packs', 'context budget', 'run summaries'], ['context pack selection', 'excluded material list'], 'advisory_only', ['context_budget', 'prompt_bloat'], ['project-norms', 'uncertainty-map', 'performance-risk'], 'project_context_pack'),
|
|
179
|
+
professionalCapability('cap.solution-design', 'solution-design', ['spec', 'plan'], ['user goal', 'constraints', 'success criteria'], ['problem framing', 'solution option tradeoff', 'scope boundary'], ['architecture', 'ambiguous'], ['baseline-solution-design', 'project-norms', 'uncertainty-map']),
|
|
180
|
+
professionalCapability('cap.architecture-design', 'architecture-design', ['plan', 'tasks'], ['system boundaries', 'integration points', 'runtime constraints'], ['architecture decision', 'component boundary', 'handoff risk'], ['architecture', 'source_boundary'], ['baseline-architecture-design', 'project-norms', 'performance-risk']),
|
|
181
|
+
professionalCapability('cap.backend-engineering', 'backend-engineering', ['plan', 'tasks', 'do', 'test'], ['API contracts', 'service logic', 'runtime path'], ['backend implementation note', 'API risk note', 'validation need'], ['api-schema', 'runtime_state'], ['baseline-backend-engineering', 'project-norms', 'verification-design']),
|
|
182
|
+
professionalCapability('cap.frontend-engineering', 'frontend-engineering', ['plan', 'tasks', 'do', 'test'], ['UI state', 'component boundary', 'browser behavior'], ['frontend implementation note', 'interaction state risk', 'browser validation need'], ['frontend', 'accessibility'], ['baseline-frontend-engineering', 'project-norms', 'verification-design']),
|
|
183
|
+
professionalCapability('cap.db-data-engineering', 'db-data-engineering', ['plan', 'tasks', 'do', 'test', 'ship'], ['schema change', 'query path', 'migration plan'], ['data safety note', 'migration risk', 'rollback consideration'], ['database', 'data-loss'], ['baseline-db-data-engineering', 'project-norms', 'verification-design']),
|
|
184
|
+
professionalCapability('cap.testing-quality-engineering', 'testing-quality-engineering', ['verifies', 'test', 'verify'], ['acceptance refs', 'test command', 'quality risk'], ['test strategy', 'coverage gap', 'evidence requirement'], ['validation', 'acceptance'], ['baseline-testing-quality-engineering', 'verification-design']),
|
|
185
|
+
professionalCapability('cap.security-engineering', 'security-engineering', ['spec', 'plan', 'tasks', 'do', 'test', 'ship'], ['trust boundary', 'secret handling', 'permission model'], ['security risk note', 'abuse case', 'security evidence requirement'], ['security', 'token_secret'], ['baseline-security-engineering', 'project-norms', 'verification-design']),
|
|
186
|
+
professionalCapability('cap.performance-engineering', 'performance-engineering', ['plan', 'tasks', 'do', 'test', 'ship'], ['hot path', 'resource use', 'latency constraint'], ['performance risk note', 'benchmark need', 'capacity consideration'], ['performance', 'context_budget'], ['baseline-performance-engineering', 'performance-risk', 'verification-design']),
|
|
187
|
+
professionalCapability('cap.observability-engineering', 'observability-engineering', ['plan', 'tasks', 'do', 'test', 'ship'], ['runtime signal', 'failure mode', 'operator need'], ['logging/metrics/tracing need', 'diagnostic gap', 'operability note'], ['observability', 'runtime_state'], ['baseline-observability-engineering', 'project-norms', 'verification-design']),
|
|
188
|
+
professionalCapability('cap.release-engineering', 'release-engineering', ['tasks', 'test', 'sync-back', 'ship'], ['release scope', 'CI state', 'rollback need'], ['release readiness note', 'deployment risk', 'ship blocker'], ['release', 'ci-build'], ['baseline-release-engineering', 'sync-back-risk', 'verification-design']),
|
|
189
|
+
professionalCapability('cap.ui-ux-product-design', 'ui-ux-product-design', ['spec', 'plan', 'tasks', 'do', 'test'], ['user journey', 'interaction state', 'design constraint'], ['UX acceptance note', 'interaction gap', 'design evidence requirement'], ['ui-ux', 'accessibility'], ['baseline-ui-ux-product-design', 'project-norms', 'uncertainty-map'])
|
|
81
190
|
];
|
|
82
191
|
|
|
83
192
|
const COMMAND_MAPPINGS: CapabilityCommandMapping[] = [
|
|
@@ -111,18 +220,29 @@ export async function validateAgentCapabilityCatalog(projectRoot: string): Promi
|
|
|
111
220
|
};
|
|
112
221
|
}
|
|
113
222
|
|
|
114
|
-
function
|
|
223
|
+
function workflowCapability(id: string, domain: WorkflowCapabilityDomain, stages: AgentCapabilityStage[], inputs: string[], outputs: string[], authority: AgentCapabilityAuthority, riskTags: string[], materialPackIds: string[], sourceId: string): AgentCapabilityCatalogEntry {
|
|
224
|
+
return capability(id, domain, 'workflow', stages, inputs, outputs, authority, riskTags, materialPackIds, sourceId);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
function professionalCapability(id: string, domain: ProfessionalCapabilityDomain, stages: AgentCapabilityStage[], inputs: string[], outputs: string[], riskTags: string[], materialPackIds: string[]): AgentCapabilityCatalogEntry {
|
|
228
|
+
return capability(id, domain, 'professional', stages, inputs, outputs, 'advisory_only', riskTags, materialPackIds, 'sdd_professional_baseline');
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
function capability(id: string, domain: AgentCapabilityDomain, domainGroup: AgentCapabilityDomainGroup, stages: AgentCapabilityStage[], inputs: string[], outputs: string[], authority: AgentCapabilityAuthority, riskTags: string[], materialPackIds: string[], sourceId: string): AgentCapabilityCatalogEntry {
|
|
115
232
|
return {
|
|
116
233
|
version: AGENT_CAPABILITY_CATALOG_CONTRACT_VERSION,
|
|
117
234
|
id,
|
|
118
235
|
domain,
|
|
236
|
+
domainGroup,
|
|
119
237
|
stages,
|
|
120
238
|
inputs,
|
|
121
239
|
outputs,
|
|
122
240
|
authority,
|
|
241
|
+
materialPolicy: capabilityMaterialPolicy(authority),
|
|
242
|
+
evidenceExpectation: capabilityEvidenceExpectation(authority),
|
|
123
243
|
routing: {
|
|
124
244
|
riskTags,
|
|
125
|
-
projectStackTags:
|
|
245
|
+
projectStackTags: projectStackTagsForDomain(domain),
|
|
126
246
|
confidenceThreshold: 0.65,
|
|
127
247
|
materialPackIds
|
|
128
248
|
},
|
|
@@ -134,10 +254,112 @@ function capability(id: string, domain: AgentCapabilityDomain, stages: AgentCapa
|
|
|
134
254
|
};
|
|
135
255
|
}
|
|
136
256
|
|
|
257
|
+
function capabilityMaterialPolicy(authority: AgentCapabilityAuthority): AgentCapabilityMaterialPolicy {
|
|
258
|
+
return authority === 'validation_runner' ? 'runtime_evidence_required' : 'route_baseline_pack';
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
function capabilityEvidenceExpectation(authority: AgentCapabilityAuthority): AgentCapabilityEvidenceExpectation {
|
|
262
|
+
if (authority === 'validation_runner' || authority === 'gate_evidence') {
|
|
263
|
+
return 'accepted_runtime_evidence';
|
|
264
|
+
}
|
|
265
|
+
return 'candidate_evidence';
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function projectStackTagsForDomain(domain: AgentCapabilityDomain): string[] {
|
|
269
|
+
if (domain === 'frontend-engineering' || domain === 'ui-ux-product-design') {
|
|
270
|
+
return ['frontend', 'browser', 'component', 'tsx', 'jsx', 'css'];
|
|
271
|
+
}
|
|
272
|
+
if (domain === 'backend-engineering') {
|
|
273
|
+
return ['backend', 'api', 'controller', 'service', 'java', 'go', 'python'];
|
|
274
|
+
}
|
|
275
|
+
if (domain === 'db-data-engineering') {
|
|
276
|
+
return ['sql', 'database', 'migration', 'prisma'];
|
|
277
|
+
}
|
|
278
|
+
if (domain === 'testing-quality-engineering') {
|
|
279
|
+
return ['test', 'spec', 'playwright', 'vitest', 'jest'];
|
|
280
|
+
}
|
|
281
|
+
if (domain === 'security-engineering') {
|
|
282
|
+
return ['security', 'auth', 'secret', 'permission'];
|
|
283
|
+
}
|
|
284
|
+
if (domain === 'performance-engineering') {
|
|
285
|
+
return ['performance', 'latency', 'benchmark', 'resource'];
|
|
286
|
+
}
|
|
287
|
+
if (domain === 'observability-engineering') {
|
|
288
|
+
return ['observability', 'logging', 'metrics', 'tracing'];
|
|
289
|
+
}
|
|
290
|
+
if (domain === 'release-engineering') {
|
|
291
|
+
return ['release', 'ci', 'deploy', 'rollback'];
|
|
292
|
+
}
|
|
293
|
+
return ['generic'];
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
function materialPack(id: string, domains: AgentCapabilityDomain[], summary: string, triggerStages: AgentCapabilityStage[], triggerKeywords: string[], loadPolicy: MaterialPackLoadPolicy, sourceId: string, sourceKind: MaterialPackSourceKind, contextBudget: AgentCapabilityMaterialPack['contextBudget'], expectedOutputs: string[], forbiddenUses: string[]): AgentCapabilityMaterialPack {
|
|
297
|
+
return {
|
|
298
|
+
id,
|
|
299
|
+
summary,
|
|
300
|
+
domains,
|
|
301
|
+
triggerStages,
|
|
302
|
+
triggerKeywords,
|
|
303
|
+
loadPolicy,
|
|
304
|
+
sourceId,
|
|
305
|
+
sourceVersion: '0.4.1',
|
|
306
|
+
sourceKind,
|
|
307
|
+
contextBudget,
|
|
308
|
+
expectedOutputs,
|
|
309
|
+
forbiddenUses
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
function professionalMaterialPack(id: string, domain: ProfessionalCapabilityDomain, summary: string, triggerStages: AgentCapabilityStage[], triggerKeywords: string[], expectedOutputs: string[], contextBudget: AgentCapabilityMaterialPack['contextBudget']): AgentCapabilityMaterialPack {
|
|
314
|
+
return materialPack(
|
|
315
|
+
id,
|
|
316
|
+
[domain],
|
|
317
|
+
summary,
|
|
318
|
+
triggerStages,
|
|
319
|
+
triggerKeywords,
|
|
320
|
+
'route_when_triggered',
|
|
321
|
+
'sdd_professional_baseline',
|
|
322
|
+
'sdd_native_baseline',
|
|
323
|
+
contextBudget,
|
|
324
|
+
expectedOutputs,
|
|
325
|
+
['lifecycle gate authority', 'stage completion decision', 'sync-back apply decision', 'ship readiness pass', 'host-specific skill projection']
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
|
|
137
330
|
function validateCatalog(catalog: AgentCapabilityCatalog): string[] {
|
|
138
331
|
const issues: string[] = [];
|
|
139
|
-
const
|
|
332
|
+
const packById = new Map(catalog.materialPacks.map((pack) => [pack.id, pack]));
|
|
333
|
+
const packIds = new Set(packById.keys());
|
|
140
334
|
const domains = new Set(catalog.capabilities.map((entry) => entry.domain));
|
|
335
|
+
const professionalDomains = new Set(catalog.capabilities.filter((entry) => entry.domainGroup === 'professional').map((entry) => entry.domain));
|
|
336
|
+
const professionalBaselineDomains = new Set<ProfessionalCapabilityDomain>();
|
|
337
|
+
for (const pack of catalog.materialPacks) {
|
|
338
|
+
if (pack.domains.length === 0) {
|
|
339
|
+
issues.push(`${pack.id}: domains are required.`);
|
|
340
|
+
}
|
|
341
|
+
if (pack.triggerStages.length === 0 || pack.triggerKeywords.length === 0) {
|
|
342
|
+
issues.push(`${pack.id}: trigger stages and keywords are required.`);
|
|
343
|
+
}
|
|
344
|
+
if (!pack.sourceId || !pack.sourceVersion) {
|
|
345
|
+
issues.push(`${pack.id}: source provenance is required.`);
|
|
346
|
+
}
|
|
347
|
+
if (pack.expectedOutputs.length === 0 || pack.forbiddenUses.length === 0) {
|
|
348
|
+
issues.push(`${pack.id}: expected outputs and forbidden uses are required.`);
|
|
349
|
+
}
|
|
350
|
+
if (pack.sourceKind === 'sdd_native_baseline') {
|
|
351
|
+
if (!pack.forbiddenUses.includes('host-specific skill projection')) {
|
|
352
|
+
issues.push(`${pack.id}: SDD-native baseline packs must forbid host-specific skill projection.`);
|
|
353
|
+
}
|
|
354
|
+
for (const domain of pack.domains) {
|
|
355
|
+
if (isRequiredProfessionalDomain(domain)) {
|
|
356
|
+
professionalBaselineDomains.add(domain);
|
|
357
|
+
} else {
|
|
358
|
+
issues.push(`${pack.id}: SDD-native baseline packs must target professional domains.`);
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
}
|
|
141
363
|
for (const capability of catalog.capabilities) {
|
|
142
364
|
if (capability.stages.length === 0) {
|
|
143
365
|
issues.push(`${capability.id}: stages are required.`);
|
|
@@ -145,6 +367,12 @@ function validateCatalog(catalog: AgentCapabilityCatalog): string[] {
|
|
|
145
367
|
if (capability.inputs.length === 0 || capability.outputs.length === 0) {
|
|
146
368
|
issues.push(`${capability.id}: inputs and outputs are required.`);
|
|
147
369
|
}
|
|
370
|
+
if (!capability.materialPolicy || !capability.evidenceExpectation) {
|
|
371
|
+
issues.push(`${capability.id}: material policy and evidence expectation are required.`);
|
|
372
|
+
}
|
|
373
|
+
if (capability.routing.projectStackTags.length === 0) {
|
|
374
|
+
issues.push(`${capability.id}: project stack tags are required.`);
|
|
375
|
+
}
|
|
148
376
|
if (capability.routing.confidenceThreshold <= 0 || capability.routing.confidenceThreshold > 1) {
|
|
149
377
|
issues.push(`${capability.id}: confidence threshold must be within (0, 1].`);
|
|
150
378
|
}
|
|
@@ -153,6 +381,26 @@ function validateCatalog(catalog: AgentCapabilityCatalog): string[] {
|
|
|
153
381
|
issues.push(`${capability.id}: unknown material pack ${packId}.`);
|
|
154
382
|
}
|
|
155
383
|
}
|
|
384
|
+
if (capability.domainGroup === 'professional') {
|
|
385
|
+
if (capability.authority !== 'advisory_only') {
|
|
386
|
+
issues.push(`${capability.id}: professional capabilities must remain advisory_only.`);
|
|
387
|
+
}
|
|
388
|
+
const hasDomainBaselinePack = capability.routing.materialPackIds.some((packId) => {
|
|
389
|
+
const pack = packById.get(packId);
|
|
390
|
+
return pack?.sourceKind === 'sdd_native_baseline' && pack.domains.includes(capability.domain);
|
|
391
|
+
});
|
|
392
|
+
if (!hasDomainBaselinePack) {
|
|
393
|
+
issues.push(`${capability.id}: professional capability must reference an SDD-native baseline pack for ${capability.domain}.`);
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
}
|
|
397
|
+
for (const domain of REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS) {
|
|
398
|
+
if (!professionalDomains.has(domain)) {
|
|
399
|
+
issues.push(`required professional domain ${domain} is missing.`);
|
|
400
|
+
}
|
|
401
|
+
if (!professionalBaselineDomains.has(domain)) {
|
|
402
|
+
issues.push(`required professional domain ${domain} has no SDD-native baseline pack.`);
|
|
403
|
+
}
|
|
156
404
|
}
|
|
157
405
|
for (const mapping of catalog.commandMappings) {
|
|
158
406
|
for (const domain of mapping.requiredDomains) {
|
|
@@ -167,6 +415,10 @@ function validateCatalog(catalog: AgentCapabilityCatalog): string[] {
|
|
|
167
415
|
return issues;
|
|
168
416
|
}
|
|
169
417
|
|
|
418
|
+
function isRequiredProfessionalDomain(domain: AgentCapabilityDomain): domain is ProfessionalCapabilityDomain {
|
|
419
|
+
return REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS.includes(domain as ProfessionalCapabilityDomain);
|
|
420
|
+
}
|
|
421
|
+
|
|
170
422
|
async function assertProjectConfigReadable(projectRoot: string): Promise<void> {
|
|
171
423
|
const configPath = getProjectConfigPath(projectRoot);
|
|
172
424
|
const raw = await readFile(configPath, 'utf8');
|
|
@@ -115,14 +115,14 @@ const BUILT_IN_AGENT_REGISTRY: AgentRegistryEntry[] = [
|
|
|
115
115
|
id: 'validator',
|
|
116
116
|
role: 'Map acceptance criteria to review, diff, and command evidence.',
|
|
117
117
|
allowedStages: ['verify'],
|
|
118
|
-
capabilities: ['run declared validation', 'acceptance mapping', '
|
|
118
|
+
capabilities: ['run declared validation', 'acceptance mapping', 'evidence sufficiency summary'],
|
|
119
119
|
readBoundary: ['task acceptance', 'review artifact', 'validation outputs'],
|
|
120
120
|
writeBoundary: ['artifacts/validation-<task>.md'],
|
|
121
121
|
toolAllowlist: ['read', 'validation command'],
|
|
122
122
|
requiredArtifact: 'artifacts/validation-<task>.md',
|
|
123
123
|
verificationExpectation: 'PASS requires acceptance evidence, not just command success.',
|
|
124
124
|
autonomyCeiling: 'validation_only',
|
|
125
|
-
stopCondition: 'Stop when acceptance mapping and
|
|
125
|
+
stopCondition: 'Stop when acceptance evidence mapping and unresolved gaps are clear.'
|
|
126
126
|
}
|
|
127
127
|
];
|
|
128
128
|
|