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
|
@@ -9,15 +9,21 @@ import { readRunState } from '../run-state/run-state.js';
|
|
|
9
9
|
import { listAgentExecutionRecords, listTeamSessionRecords } from '../execution/agent-execution-records.js';
|
|
10
10
|
import { listResidentWorkerRuntimes } from '../execution/resident-worker.js';
|
|
11
11
|
import { runDocumentStaleReasons } from '../sync-back/inspect.js';
|
|
12
|
-
import { resolveWorkflowState, type WorkflowLatestTaskRun } from '../workflow-state/resolve.js';
|
|
12
|
+
import { resolveWorkflowState, type WorkflowLatestTaskRun, type WorkflowNextIntent } from '../workflow-state/resolve.js';
|
|
13
13
|
import type { WorkflowAffectedFileConflict } from '../workflow-state/affected-file-conflicts.js';
|
|
14
14
|
import type { WorkflowDependencyBlocker } from '../workflow-state/dependencies.js';
|
|
15
|
+
import type { LatestEligibleRunSelection } from '../workflow-state/latest-eligible-run.js';
|
|
15
16
|
import { buildTaskRiskProfile } from '../task-risk-profile.js';
|
|
16
17
|
import { listRuntimeProjections } from '../storage/runtime-store.js';
|
|
17
18
|
import { inspectLifecycleRiskDecisionForModel, type LifecycleRiskConsumerDiagnostic } from '../risk.js';
|
|
18
19
|
import { inspectWorkflowStageHandoff, type WorkflowStageHandoffDiagnostic } from '../stage-runtime.js';
|
|
19
20
|
import { inspectContextOffloadRuntime, type ContextRuntimeDiagnostic } from '../context-offload.js';
|
|
20
21
|
import { inspectSubagentDispatches, type SubagentDispatchDiagnostic } from '../subagents.js';
|
|
22
|
+
import { inspectAgentCapabilityCatalog, REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS, type AgentCapabilityDomain, type ProfessionalCapabilityDomain } from '../registries/agent-capability-catalog.js';
|
|
23
|
+
import { validateAgentSkillTeamRuntime } from '../router/runtime-validation.js';
|
|
24
|
+
import { listRuntimeDurableGaps, listRuntimeFanInEvidenceSets, listRuntimeLlmAdvisorAssessments, listRuntimeStageRoleResults, listRuntimeStageTeamSessions, listRuntimeTestRuns, listRuntimeWorkflowGateDecisions, type RuntimeDurableGapRecord } from '../storage/runtime-store.js';
|
|
25
|
+
import type { CapabilityEvidenceClassification } from '../evidence-runtime.js';
|
|
26
|
+
import type { WorkflowGateDecision, WorkflowGateDecisionKind } from '../workflow-gate/types.js';
|
|
21
27
|
|
|
22
28
|
const execFileAsync = promisify(execFile);
|
|
23
29
|
|
|
@@ -50,6 +56,53 @@ export interface TokenRuntimeProjection {
|
|
|
50
56
|
pressureReasons: string[];
|
|
51
57
|
}
|
|
52
58
|
|
|
59
|
+
export type CapabilityHealthStatus = 'absent' | 'pass' | 'warn' | 'blocked';
|
|
60
|
+
|
|
61
|
+
export interface CapabilityHealthProjection {
|
|
62
|
+
status: CapabilityHealthStatus;
|
|
63
|
+
requiredProfessionalDomains: ProfessionalCapabilityDomain[];
|
|
64
|
+
baselineDomains: ProfessionalCapabilityDomain[];
|
|
65
|
+
missingBaselineDomains: ProfessionalCapabilityDomain[];
|
|
66
|
+
materialPacks: number;
|
|
67
|
+
activeDomains: AgentCapabilityDomain[];
|
|
68
|
+
activePacks: string[];
|
|
69
|
+
sources: {
|
|
70
|
+
total: number;
|
|
71
|
+
quarantined: number;
|
|
72
|
+
denied: number;
|
|
73
|
+
futureAdapters: number;
|
|
74
|
+
};
|
|
75
|
+
evidence: {
|
|
76
|
+
accepted: number;
|
|
77
|
+
candidate: number;
|
|
78
|
+
quarantined: number;
|
|
79
|
+
diagnostic: number;
|
|
80
|
+
blocked: number;
|
|
81
|
+
};
|
|
82
|
+
warnings: string[];
|
|
83
|
+
releaseCriticalGaps: ProfessionalCapabilityDomain[];
|
|
84
|
+
reasons: string[];
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export interface StageTeamHealthProjection {
|
|
88
|
+
sessions: number;
|
|
89
|
+
roleResults: number;
|
|
90
|
+
advisorAssessments: number;
|
|
91
|
+
fanInEvidenceSets: number;
|
|
92
|
+
highConcernAdvisors: number;
|
|
93
|
+
lifecycleProfiles: string[];
|
|
94
|
+
directProfileRequiresNoTeam: boolean;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface WorkflowGateHealthProjection {
|
|
98
|
+
decisions: number;
|
|
99
|
+
blocked: number;
|
|
100
|
+
warnings: number;
|
|
101
|
+
humanRequired: number;
|
|
102
|
+
latestDecision: WorkflowGateDecision | null;
|
|
103
|
+
statusesByKind: Partial<Record<WorkflowGateDecisionKind, WorkflowGateDecision['status']>>;
|
|
104
|
+
}
|
|
105
|
+
|
|
53
106
|
export interface ProjectStatus {
|
|
54
107
|
branch: string;
|
|
55
108
|
workflowStatus: 'active' | 'not_started';
|
|
@@ -69,17 +122,23 @@ export interface ProjectStatus {
|
|
|
69
122
|
taskRisk: TaskRiskSummary;
|
|
70
123
|
latestRun: RunSummary | null;
|
|
71
124
|
latestRunsByTask: WorkflowLatestTaskRun[];
|
|
125
|
+
latestEligibleRunsByTask: LatestEligibleRunSelection[];
|
|
72
126
|
latestRunEvidence: RunEvidenceSummary | null;
|
|
73
127
|
latestRunStaleReasons: string[];
|
|
74
128
|
affectedFileConflicts: WorkflowAffectedFileConflict[];
|
|
75
129
|
dependencyBlockers: WorkflowDependencyBlocker[];
|
|
76
130
|
recommendedNextCommand: string;
|
|
131
|
+
nextIntent: WorkflowNextIntent;
|
|
77
132
|
tokenProjection: TokenRuntimeProjection;
|
|
78
133
|
contextRuntime: ContextRuntimeDiagnostic;
|
|
79
134
|
subagentDispatches: SubagentDispatchDiagnostic;
|
|
80
135
|
lifecycleRisk: LifecycleRiskConsumerDiagnostic;
|
|
136
|
+
capabilityHealth: CapabilityHealthProjection;
|
|
81
137
|
workflowHandoff: WorkflowStageHandoffDiagnostic;
|
|
82
138
|
gaps: SddTaskGap[];
|
|
139
|
+
durableGaps: RuntimeDurableGapRecord[];
|
|
140
|
+
stageTeamHealth: StageTeamHealthProjection;
|
|
141
|
+
workflowGateHealth: WorkflowGateHealthProjection;
|
|
83
142
|
}
|
|
84
143
|
|
|
85
144
|
export interface StatuslineProjection {
|
|
@@ -95,6 +154,7 @@ export interface StatuslineProjection {
|
|
|
95
154
|
contextAction: ProjectStatus['contextRuntime']['action'];
|
|
96
155
|
subagentHealth: ProjectStatus['subagentDispatches']['status'];
|
|
97
156
|
evidenceHealth: 'none' | 'pass' | 'warn' | 'blocked';
|
|
157
|
+
capabilityHealth: ProjectStatus['capabilityHealth']['status'];
|
|
98
158
|
latestRunId: string | null;
|
|
99
159
|
counts: {
|
|
100
160
|
tasks: ProjectStatus['tasks'];
|
|
@@ -107,6 +167,13 @@ export interface StatuslineProjection {
|
|
|
107
167
|
affectedFileConflicts: number;
|
|
108
168
|
subagentDispatches: number;
|
|
109
169
|
blockingSubagents: number;
|
|
170
|
+
capabilityWarnings: number;
|
|
171
|
+
durableGaps: number;
|
|
172
|
+
stageTeamSessions: number;
|
|
173
|
+
stageRoleResults: number;
|
|
174
|
+
advisorAssessments: number;
|
|
175
|
+
fanInEvidenceSets: number;
|
|
176
|
+
workflowGateDecisions: number;
|
|
110
177
|
};
|
|
111
178
|
taskRisk: TaskRiskSummary;
|
|
112
179
|
next: string;
|
|
@@ -127,6 +194,10 @@ export async function getProjectStatus(projectRoot: string, options: { branch?:
|
|
|
127
194
|
const workflowHandoff = await inspectWorkflowStageHandoff(projectRoot, workflow.branch);
|
|
128
195
|
const contextRuntime = await inspectContextOffloadRuntime(projectRoot, workflow.branch);
|
|
129
196
|
const subagentDispatches = await inspectSubagentDispatches(projectRoot, workflow.branch);
|
|
197
|
+
const capabilityHealth = await inspectCapabilityHealth(projectRoot, latestRun?.runId ?? null, workflow.model.tasks);
|
|
198
|
+
const durableGaps = await listRuntimeDurableGaps(projectRoot, { partition: workflow.branch, status: 'open_terminal' });
|
|
199
|
+
const stageTeamHealth = await inspectStageTeamHealth(projectRoot, workflow.branch, latestRun?.runId ?? null);
|
|
200
|
+
const workflowGateHealth = await inspectWorkflowGateHealth(projectRoot, workflow.branch, latestRun?.runId ?? null);
|
|
130
201
|
|
|
131
202
|
return {
|
|
132
203
|
branch: workflow.branch,
|
|
@@ -138,17 +209,23 @@ export async function getProjectStatus(projectRoot: string, options: { branch?:
|
|
|
138
209
|
taskRisk,
|
|
139
210
|
latestRun,
|
|
140
211
|
latestRunsByTask: workflow.latestRunsByTask,
|
|
212
|
+
latestEligibleRunsByTask: workflow.latestEligibleRunsByTask,
|
|
141
213
|
latestRunEvidence: enrichedLatestRunEvidence,
|
|
142
214
|
latestRunStaleReasons,
|
|
143
215
|
affectedFileConflicts: workflow.affectedFileConflicts,
|
|
144
216
|
dependencyBlockers: workflow.dependencyBlockers,
|
|
145
217
|
recommendedNextCommand: workflow.recommendedNextCommand,
|
|
218
|
+
nextIntent: workflow.nextIntent,
|
|
146
219
|
tokenProjection,
|
|
147
220
|
contextRuntime,
|
|
148
221
|
subagentDispatches,
|
|
149
222
|
lifecycleRisk,
|
|
150
223
|
workflowHandoff,
|
|
151
|
-
|
|
224
|
+
capabilityHealth,
|
|
225
|
+
gaps: workflow.visibleGaps,
|
|
226
|
+
durableGaps,
|
|
227
|
+
stageTeamHealth,
|
|
228
|
+
workflowGateHealth
|
|
152
229
|
};
|
|
153
230
|
}
|
|
154
231
|
|
|
@@ -170,12 +247,13 @@ export function statuslineProjectionFromStatus(status: ProjectStatus): Statuslin
|
|
|
170
247
|
taskHealth: taskHealth(status),
|
|
171
248
|
runtimeHealth,
|
|
172
249
|
testHealth: testHealth(status),
|
|
173
|
-
teamHealth: (evidence?.teamSessions ?? 0) > 0 ? 'active' : 'none',
|
|
250
|
+
teamHealth: (evidence?.teamSessions ?? 0) > 0 || status.stageTeamHealth.sessions > 0 || status.stageTeamHealth.roleResults > 0 ? 'active' : 'none',
|
|
174
251
|
tokenHealth: status.tokenProjection.health,
|
|
175
252
|
contextLoad: status.contextRuntime.level,
|
|
176
253
|
contextAction: status.contextRuntime.action,
|
|
177
254
|
subagentHealth: status.subagentDispatches.status,
|
|
178
255
|
evidenceHealth: evidenceHealth(status, runtimeHealth),
|
|
256
|
+
capabilityHealth: status.capabilityHealth.status,
|
|
179
257
|
latestRunId: status.latestRun?.runId ?? null,
|
|
180
258
|
counts: {
|
|
181
259
|
tasks: status.tasks,
|
|
@@ -187,13 +265,53 @@ export function statuslineProjectionFromStatus(status: ProjectStatus): Statuslin
|
|
|
187
265
|
staleReasons,
|
|
188
266
|
affectedFileConflicts,
|
|
189
267
|
subagentDispatches: status.subagentDispatches.dispatches,
|
|
190
|
-
blockingSubagents: status.subagentDispatches.blockingOpen
|
|
268
|
+
blockingSubagents: status.subagentDispatches.blockingOpen,
|
|
269
|
+
capabilityWarnings: status.capabilityHealth.warnings.length,
|
|
270
|
+
durableGaps: status.durableGaps.length,
|
|
271
|
+
stageTeamSessions: status.stageTeamHealth.sessions,
|
|
272
|
+
stageRoleResults: status.stageTeamHealth.roleResults,
|
|
273
|
+
advisorAssessments: status.stageTeamHealth.advisorAssessments,
|
|
274
|
+
fanInEvidenceSets: status.stageTeamHealth.fanInEvidenceSets,
|
|
275
|
+
workflowGateDecisions: status.workflowGateHealth.decisions
|
|
191
276
|
},
|
|
192
277
|
taskRisk: status.taskRisk,
|
|
193
278
|
next: status.recommendedNextCommand
|
|
194
279
|
};
|
|
195
280
|
}
|
|
196
281
|
|
|
282
|
+
async function inspectStageTeamHealth(projectRoot: string, partition: string, runId: string | null): Promise<StageTeamHealthProjection> {
|
|
283
|
+
const query = runId ? { partition, runId } : { partition };
|
|
284
|
+
const [sessions, roleResults, advisorAssessments, fanInEvidenceSets] = await Promise.all([
|
|
285
|
+
listRuntimeStageTeamSessions(projectRoot, query),
|
|
286
|
+
listRuntimeStageRoleResults(projectRoot, query),
|
|
287
|
+
listRuntimeLlmAdvisorAssessments(projectRoot, query),
|
|
288
|
+
listRuntimeFanInEvidenceSets(projectRoot, query)
|
|
289
|
+
]);
|
|
290
|
+
return {
|
|
291
|
+
sessions: sessions.length,
|
|
292
|
+
roleResults: roleResults.length,
|
|
293
|
+
advisorAssessments: advisorAssessments.length,
|
|
294
|
+
fanInEvidenceSets: fanInEvidenceSets.length,
|
|
295
|
+
highConcernAdvisors: advisorAssessments.filter((assessment) => assessment.concern === 'high').length,
|
|
296
|
+
lifecycleProfiles: [...new Set(sessions.map((session) => session.lifecycleProfile))].sort(),
|
|
297
|
+
directProfileRequiresNoTeam: !sessions.some((session) => session.lifecycleProfile === 'direct' && session.assignments.some((assignment) => assignment.required))
|
|
298
|
+
};
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
async function inspectWorkflowGateHealth(projectRoot: string, partition: string, runId: string | null): Promise<WorkflowGateHealthProjection> {
|
|
302
|
+
const query = runId ? { partition, runId } : { partition };
|
|
303
|
+
const decisions = await listRuntimeWorkflowGateDecisions(projectRoot, query);
|
|
304
|
+
const statusesByKind = Object.fromEntries(decisions.map((decision) => [decision.decisionKind, decision.status])) as WorkflowGateHealthProjection['statusesByKind'];
|
|
305
|
+
return {
|
|
306
|
+
decisions: decisions.length,
|
|
307
|
+
blocked: decisions.filter((decision) => decision.status === 'BLOCKED').length,
|
|
308
|
+
warnings: decisions.filter((decision) => decision.status === 'WARN').length,
|
|
309
|
+
humanRequired: decisions.filter((decision) => decision.humanRequired).length,
|
|
310
|
+
latestDecision: decisions[0] ?? null,
|
|
311
|
+
statusesByKind
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
|
|
197
315
|
function summarizeTaskRisk(tasks: Array<Parameters<typeof buildTaskRiskProfile>[0]>): TaskRiskSummary {
|
|
198
316
|
const entries = tasks.map((task) => ({ taskId: task?.id ?? null, profile: buildTaskRiskProfile(task) }));
|
|
199
317
|
return {
|
|
@@ -210,7 +328,7 @@ function taskHealth(status: ProjectStatus): StatuslineProjection['taskHealth'] {
|
|
|
210
328
|
if (status.tasks.total === 0) {
|
|
211
329
|
return 'empty';
|
|
212
330
|
}
|
|
213
|
-
if (status.tasks.blocked > 0 || status.gaps.some((gap) => gap.severity === 'blocking') || status.dependencyBlockers.length > 0) {
|
|
331
|
+
if (status.tasks.blocked > 0 || status.gaps.some((gap) => gap.severity === 'blocking') || status.durableGaps.some((gap) => gap.severity === 'blocking') || status.dependencyBlockers.length > 0) {
|
|
214
332
|
return 'blocked';
|
|
215
333
|
}
|
|
216
334
|
if (status.tasks.completed === status.tasks.total) {
|
|
@@ -245,6 +363,151 @@ function evidenceHealth(status: ProjectStatus, runtimeHealth: StatuslineProjecti
|
|
|
245
363
|
return 'pass';
|
|
246
364
|
}
|
|
247
365
|
|
|
366
|
+
async function inspectCapabilityHealth(projectRoot: string, latestRunId: string | null, tasks: SddTaskModel['tasks']): Promise<CapabilityHealthProjection> {
|
|
367
|
+
try {
|
|
368
|
+
const [catalog, runtimeValidation, testRuns] = await Promise.all([
|
|
369
|
+
inspectAgentCapabilityCatalog(projectRoot),
|
|
370
|
+
validateAgentSkillTeamRuntime(projectRoot),
|
|
371
|
+
latestRunId ? listRuntimeTestRuns(projectRoot, latestRunId) : Promise.resolve([])
|
|
372
|
+
]);
|
|
373
|
+
const baselineDomains = uniqueSorted(catalog.capabilities
|
|
374
|
+
.filter((capability) => capability.domainGroup === 'professional' && capability.provenance.sourceId === 'sdd_professional_baseline')
|
|
375
|
+
.map((capability) => capability.domain)) as ProfessionalCapabilityDomain[];
|
|
376
|
+
const missingBaselineDomains = REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS.filter((domain) => !baselineDomains.includes(domain));
|
|
377
|
+
const latestEvidence = capabilityEvidenceFromTestRuns(testRuns.map((run) => run.payload));
|
|
378
|
+
const acceptedProfessionalEvidence = latestEvidence.filter((item) => item.source === 'professional_capability' && item.class === 'accepted');
|
|
379
|
+
const activeDomains = uniqueSorted(acceptedProfessionalEvidence
|
|
380
|
+
.map((item) => item.domainOrSourceId)) as AgentCapabilityDomain[];
|
|
381
|
+
const activePacks = uniqueSorted(catalog.materialPacks
|
|
382
|
+
.filter((pack) => pack.domains.some((domain) => activeDomains.includes(domain)))
|
|
383
|
+
.map((pack) => pack.id));
|
|
384
|
+
const sources = runtimeValidation.inspection.capabilitySources;
|
|
385
|
+
const blocked = missingBaselineDomains.length > 0 || !runtimeValidation.valid;
|
|
386
|
+
const noEvidence = latestRunId !== null && latestEvidence.length === 0;
|
|
387
|
+
const releaseCriticalGaps = releaseCriticalCapabilityGaps(tasks, acceptedProfessionalEvidence);
|
|
388
|
+
const warnings = [
|
|
389
|
+
...missingBaselineDomains.map((domain) => `missing baseline professional domain ${domain}`),
|
|
390
|
+
...runtimeValidation.issues.map((issue) => issue.message),
|
|
391
|
+
...noCapabilityEvidenceWarnings(noEvidence),
|
|
392
|
+
...releaseCriticalGaps.map((domain) => `release-critical capability gap ${domain}`)
|
|
393
|
+
];
|
|
394
|
+
return {
|
|
395
|
+
status: blocked ? 'blocked' : warnings.length > 0 ? 'warn' : 'pass',
|
|
396
|
+
requiredProfessionalDomains: [...REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS],
|
|
397
|
+
baselineDomains,
|
|
398
|
+
missingBaselineDomains,
|
|
399
|
+
materialPacks: catalog.materialPacks.length,
|
|
400
|
+
activeDomains,
|
|
401
|
+
activePacks,
|
|
402
|
+
sources: {
|
|
403
|
+
total: sources.length,
|
|
404
|
+
quarantined: sources.filter((source) => source.quarantineRequired || source.quarantineStatus === 'quarantined').length,
|
|
405
|
+
denied: sources.filter((source) => source.quarantineStatus === 'denied').length,
|
|
406
|
+
futureAdapters: sources.filter((source) => source.hostCompatibility.some((item) => item.includes('future_adapter'))).length
|
|
407
|
+
},
|
|
408
|
+
evidence: capabilityEvidenceCounts(latestEvidence),
|
|
409
|
+
releaseCriticalGaps,
|
|
410
|
+
warnings: uniqueSorted(warnings),
|
|
411
|
+
reasons: capabilityHealthReasons(latestRunId, latestEvidence.length, blocked, warnings.length)
|
|
412
|
+
};
|
|
413
|
+
} catch (error) {
|
|
414
|
+
return {
|
|
415
|
+
status: 'absent',
|
|
416
|
+
requiredProfessionalDomains: [...REQUIRED_PROFESSIONAL_CAPABILITY_DOMAINS],
|
|
417
|
+
baselineDomains: [],
|
|
418
|
+
missingBaselineDomains: [],
|
|
419
|
+
materialPacks: 0,
|
|
420
|
+
activeDomains: [],
|
|
421
|
+
activePacks: [],
|
|
422
|
+
sources: { total: 0, quarantined: 0, denied: 0, futureAdapters: 0 },
|
|
423
|
+
evidence: { accepted: 0, candidate: 0, quarantined: 0, diagnostic: 0, blocked: 0 },
|
|
424
|
+
warnings: [],
|
|
425
|
+
releaseCriticalGaps: [],
|
|
426
|
+
reasons: [`capability health unavailable: ${error instanceof Error ? error.message : String(error)}`]
|
|
427
|
+
};
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
function capabilityEvidenceFromTestRuns(payloads: unknown[]): CapabilityEvidenceClassification[] {
|
|
432
|
+
return payloads.flatMap((payload) => isRecord(payload) && Array.isArray(payload.capabilityEvidence)
|
|
433
|
+
? payload.capabilityEvidence.filter(isCapabilityEvidenceClassification)
|
|
434
|
+
: []);
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
function isCapabilityEvidenceClassification(value: unknown): value is CapabilityEvidenceClassification {
|
|
438
|
+
return isRecord(value)
|
|
439
|
+
&& (value.class === 'accepted' || value.class === 'candidate' || value.class === 'quarantined' || value.class === 'diagnostic' || value.class === 'blocked')
|
|
440
|
+
&& (value.source === 'professional_capability' || value.source === 'external_source' || value.source === 'runtime_diagnostic')
|
|
441
|
+
&& typeof value.domainOrSourceId === 'string';
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
function capabilityEvidenceCounts(evidence: CapabilityEvidenceClassification[]): CapabilityHealthProjection['evidence'] {
|
|
445
|
+
return {
|
|
446
|
+
accepted: evidence.filter((item) => item.class === 'accepted').length,
|
|
447
|
+
candidate: evidence.filter((item) => item.class === 'candidate').length,
|
|
448
|
+
quarantined: evidence.filter((item) => item.class === 'quarantined').length,
|
|
449
|
+
diagnostic: evidence.filter((item) => item.class === 'diagnostic').length,
|
|
450
|
+
blocked: evidence.filter((item) => item.class === 'blocked').length
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
function releaseCriticalCapabilityGaps(tasks: SddTaskModel['tasks'], acceptedProfessionalEvidence: CapabilityEvidenceClassification[]): ProfessionalCapabilityDomain[] {
|
|
455
|
+
const required = releaseCriticalDomainsForTasks(tasks);
|
|
456
|
+
const acceptedEvidenceDomains = new Set(acceptedProfessionalEvidence.map((item) => item.domainOrSourceId));
|
|
457
|
+
return required.filter((domain) => !acceptedEvidenceDomains.has(domain));
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
function releaseCriticalDomainsForTasks(tasks: SddTaskModel['tasks']): ProfessionalCapabilityDomain[] {
|
|
461
|
+
const domains = new Set<ProfessionalCapabilityDomain>();
|
|
462
|
+
for (const task of tasks) {
|
|
463
|
+
const text = [task.title ?? '', ...task.risk, ...task.affectedFiles, ...task.validation, ...task.acceptance, task.boundary ?? ''].join('\n').toLowerCase();
|
|
464
|
+
if (/security|auth|permission|secret|token|安全/.test(text)) {
|
|
465
|
+
domains.add('security-engineering');
|
|
466
|
+
}
|
|
467
|
+
if (/performance|latency|throughput|benchmark|capacity|性能/.test(text)) {
|
|
468
|
+
domains.add('performance-engineering');
|
|
469
|
+
}
|
|
470
|
+
if (/observability|logging|metrics|tracing|diagnostic|可观测/.test(text)) {
|
|
471
|
+
domains.add('observability-engineering');
|
|
472
|
+
}
|
|
473
|
+
if (/release|deploy|rollback|ci|ship|发布/.test(text)) {
|
|
474
|
+
domains.add('release-engineering');
|
|
475
|
+
}
|
|
476
|
+
if (/database|schema|migration|query|data|db|数据/.test(text)) {
|
|
477
|
+
domains.add('db-data-engineering');
|
|
478
|
+
}
|
|
479
|
+
if (/ui|ux|frontend|browser|figma|accessibility|交互|前端/.test(text)) {
|
|
480
|
+
domains.add(text.includes('frontend') || text.includes('browser') || text.includes('前端') ? 'frontend-engineering' : 'ui-ux-product-design');
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
return [...domains].sort((left, right) => left.localeCompare(right));
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
function noCapabilityEvidenceWarnings(noEvidence: boolean): string[] {
|
|
487
|
+
return noEvidence ? ['latest run has no capability evidence classification'] : [];
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
function capabilityHealthReasons(latestRunId: string | null, evidenceCount: number, blocked: boolean, warnings: number): string[] {
|
|
491
|
+
if (blocked) {
|
|
492
|
+
return ['Capability catalog or runtime source validation has blocking issues.'];
|
|
493
|
+
}
|
|
494
|
+
if (latestRunId !== null && evidenceCount === 0) {
|
|
495
|
+
return ['Latest run has no recorded capability evidence classification.'];
|
|
496
|
+
}
|
|
497
|
+
if (warnings > 0) {
|
|
498
|
+
return ['Capability health has warnings; inspect status JSON for exact missing evidence or release-critical gaps.'];
|
|
499
|
+
}
|
|
500
|
+
return ['Professional capability baseline and source policy are visible.'];
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
function isRecord(value: unknown): value is Record<string, unknown> {
|
|
504
|
+
return Boolean(value) && typeof value === 'object';
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
function uniqueSorted<T extends string>(values: T[]): T[] {
|
|
508
|
+
return [...new Set(values)].sort((left, right) => left.localeCompare(right));
|
|
509
|
+
}
|
|
510
|
+
|
|
248
511
|
async function inspectTokenRuntimeProjection(projectRoot: string): Promise<TokenRuntimeProjection> {
|
|
249
512
|
const projections = await listRuntimeProjections(projectRoot, ['context_build', 'team_runtime_decision']);
|
|
250
513
|
const contextPackages = projections.filter((projection) => projection.projectionType === 'context_build');
|