create-agdf 0.30.0 → 0.31.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/generated/.agdf/control/README.md +5 -0
- package/generated/.agdf/control/templates/BRAND.md +28 -0
- package/generated/.agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/.agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/.opencode/agdf-interaction-locales.json +292 -2
- package/generated/.opencode/contracts/gate-artifact-preparation.md +9 -3
- package/generated/.opencode/contracts/interaction.md +10 -4
- package/generated/.opencode/contracts/modes.md +5 -0
- package/generated/.opencode/contracts/prd-definition.md +40 -1
- package/generated/.opencode/contracts/quality.md +35 -0
- package/generated/.opencode/contracts/request-activation.md +6 -3
- package/generated/.opencode/contracts/sd-definition.md +46 -0
- package/generated/.opencode/contracts/tp-definition.md +8 -0
- package/generated/.opencode/contracts/ur-definition.md +9 -5
- package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +31 -2
- package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/companion/events.mjs +117 -0
- package/generated/plugins/agdf/companion/figure.mjs +6 -6
- package/generated/plugins/agdf/companion/gate-bar.mjs +10 -28
- package/generated/plugins/agdf/companion/localization.mjs +10 -32
- package/generated/plugins/agdf/companion/notice.mjs +10 -8
- package/generated/plugins/agdf/companion/register.mjs +229 -43
- package/generated/plugins/agdf/companion/run-state.mjs +77 -90
- package/generated/plugins/agdf/companion/state.mjs +6 -32
- package/generated/plugins/agdf/companion/view.mjs +57 -12
- package/generated/plugins/agdf/control/README.md +5 -0
- package/generated/plugins/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/agdf/mcp/server/README.md +26 -2
- package/generated/plugins/agdf/mcp/server/package.json +3 -3
- package/generated/plugins/agdf/mcp/server/src/generation-runtime.js +11 -2
- package/generated/plugins/agdf/mcp/server/src/main.js +1 -0
- package/generated/plugins/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/agdf/mcp/server/src/server.js +139 -35
- package/generated/plugins/agdf/mcp/server/ui/cockpit.html +2 -2
- package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +3 -3
- package/generated/plugins/agdf/mcp/server/ui/decision.html +2 -2
- package/generated/plugins/agdf/mcp/server/ui/manifest.json +3 -3
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/plugins/agdf/meta/agdf-mcp-capability.json +1 -1
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
- package/generated/plugins/agdf/meta/contracts/modes.md +5 -0
- package/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/plugins/agdf/meta/contracts/quality.md +35 -0
- package/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/plugins/agdf/meta/distribution-profile-history.json +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +5 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +35 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +7 -4
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/project-read-command.js +29 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +32 -6
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +34 -6
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +86 -83
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +44 -6
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +4 -20
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +64 -24
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +6 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +32 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +7 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +4 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +10 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +9 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +35 -11
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +2 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +25 -7
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +84 -28
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +38 -20
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +37 -17
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +10 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +8 -5
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +8 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +26 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +30 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +5 -3
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +1 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +9 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +6 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +17 -4
- package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +4 -3
- package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +31 -2
- package/generated/plugins/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/plugins/agdf/submission/openai/availability.md +1 -1
- package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/plugins/agdf/submission/openai/release-notes.md +8 -8
- package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
- package/generated/plugins/agdf-planning/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf-planning/plugin.json +1 -1
- package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +332 -195
- package/generated/plugins/copilot/agdf/control/README.md +5 -0
- package/generated/plugins/copilot/agdf/control/templates/BRAND.md +28 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/PRD.md +11 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +4 -0
- package/generated/plugins/copilot/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
- package/generated/plugins/copilot/agdf/mcp/server/README.md +26 -2
- package/generated/plugins/copilot/agdf/mcp/server/package.json +3 -3
- package/generated/plugins/copilot/agdf/mcp/server/src/generation-runtime.js +11 -2
- package/generated/plugins/copilot/agdf/mcp/server/src/main.js +1 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/next-action.js +227 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/prepared-call-transport.js +306 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/safe-read-continuation.js +62 -0
- package/generated/plugins/copilot/agdf/mcp/server/src/server.js +139 -35
- package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +7 -0
- package/generated/plugins/copilot/agdf/plugin.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +5 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +35 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +7 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/project-read-command.js +29 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +32 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +34 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +81 -78
- package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +44 -6
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +64 -24
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +2 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +6 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +32 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +7 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +4 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +10 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +9 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +35 -11
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +2 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +25 -7
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +84 -28
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +38 -20
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +37 -17
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +10 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +8 -5
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +3 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +8 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +26 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +30 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +5 -3
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +1 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +9 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +6 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +17 -4
- package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
- package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -1
- package/generated/plugins/copilot/agdf/skills/agdf-ux-intent-definition/SKILL.md +31 -2
- package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +9 -3
- package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +10 -4
- package/generated/plugins/copilot/agdf/skills/contracts/modes.md +5 -0
- package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +40 -1
- package/generated/plugins/copilot/agdf/skills/contracts/quality.md +35 -0
- package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +6 -3
- package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +46 -0
- package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +8 -0
- package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +9 -5
- package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +292 -2
- package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/submissions/openai/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
- package/generated/submissions/openai/agdf/meta/contracts/interaction.md +10 -4
- package/generated/submissions/openai/agdf/meta/contracts/modes.md +5 -0
- package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +40 -1
- package/generated/submissions/openai/agdf/meta/contracts/quality.md +35 -0
- package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +6 -3
- package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +46 -0
- package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +8 -0
- package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +9 -5
- package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
- package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +7 -0
- package/generated/submissions/openai/agdf/plugin.json +1 -1
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +31 -2
- package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +8 -1
- package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
- package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/inventory.json +24 -24
- package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
- package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
- package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
- package/generated/submissions/openai/agdf/submission/openai/release-notes.md +8 -8
- package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
- package/lib/cli/command-registry.js +2 -1
- package/lib/cli/parse-args.js +7 -4
- package/lib/cli/project-read-command.js +29 -0
- package/lib/cli/validation-handlers.js +2 -1
- package/lib/mcp-dispatch-runtime.js +32 -6
- package/lib/mcp-lifecycle/package.js +7 -0
- package/lib/mcp-lifecycle/plugin-runtime.js +34 -6
- package/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
- package/lib/mcp-worker-runtime.js +86 -83
- package/lib/runtime/validator-application.js +2 -2
- package/lib/scaffold/plan.js +2 -0
- package/package.json +1 -1
- package/runtime/core/lib/companion/events.js +154 -0
- package/runtime/core/lib/companion/figure-state.js +36 -0
- package/runtime/core/lib/companion/journal.js +180 -0
- package/runtime/core/lib/companion/run-view.js +184 -0
- package/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
- package/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
- package/runtime/core/lib/control-evaluation/gate-check.js +44 -6
- package/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
- package/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
- package/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
- package/runtime/core/lib/control-evaluation/report-decision.js +9 -0
- package/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
- package/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
- package/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
- package/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
- package/runtime/core/lib/control-inspect/cockpit.js +4 -20
- package/runtime/core/lib/control-inspect/contract.js +64 -24
- package/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
- package/runtime/core/lib/control-inspect/project-state.js +2 -1
- package/runtime/core/lib/control-inspect/run-classification.js +31 -0
- package/runtime/core/lib/control-inspect/selection.js +6 -0
- package/runtime/core/lib/control-inspect/service.js +32 -5
- package/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
- package/runtime/core/lib/control-state/input-resolution.js +7 -5
- package/runtime/core/lib/control-state/material-limits.js +4 -0
- package/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
- package/runtime/core/lib/control-state/presentation-delivery.js +4 -1
- package/runtime/core/lib/control-state/run-command-contract.js +10 -4
- package/runtime/core/lib/control-state/run-command-schema.js +9 -3
- package/runtime/core/lib/control-state/run-command-service.js +35 -11
- package/runtime/core/lib/control-state/run-identity.js +2 -0
- package/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
- package/runtime/core/lib/control-state/run-material.js +25 -7
- package/runtime/core/lib/control-state/run-presentation-render.js +84 -28
- package/runtime/core/lib/control-state/run-revision.js +38 -20
- package/runtime/core/lib/control-state/run-source-revisions.js +37 -17
- package/runtime/core/lib/control-state/run-state-reader.js +10 -3
- package/runtime/core/lib/control-state/run-steps.js +8 -5
- package/runtime/core/lib/index.js +3 -1
- package/runtime/core/lib/interaction-catalog-validation.js +6 -1
- package/runtime/core/lib/interaction-catalog.js +8 -0
- package/runtime/core/lib/interaction-presentation.js +26 -1
- package/runtime/core/lib/mcp-input-hints.js +30 -1
- package/runtime/core/lib/mcp-tool-errors.js +5 -3
- package/runtime/core/lib/resources/canonical-init-plan.js +1 -1
- package/runtime/core/lib/runtime/plugin-provenance.js +9 -2
- package/runtime/core/lib/skill-dispatch/contract.js +6 -4
- package/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
- package/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
- package/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
- package/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
- package/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
- package/runtime/core/lib/skill-dispatch/service.js +17 -4
- package/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
- package/generated/plugins/agdf/companion/core.mjs +0 -16
- package/generated/plugins/agdf/companion/locales.json +0 -200
|
@@ -24,6 +24,24 @@ export function closeoutContext(text) {
|
|
|
24
24
|
}
|
|
25
25
|
export const closeoutContextDigest = text => digest(`agdf-closeout-context/1\0${canonicalJson(closeoutContext(text))}`);
|
|
26
26
|
|
|
27
|
+
// Bindings a structured OR states; the same tables drive the check and the
|
|
28
|
+
// expectations returned with a refusal.
|
|
29
|
+
const OR_SOURCE_FIELDS = Object.freeze({ related_ur: 'UR', related_prd: 'PRD', related_sd: 'SD', related_tp: 'TP', related_qa_report: 'QA' });
|
|
30
|
+
const OR_GATE_ROWS = Object.freeze(['UR', 'PRD', 'SD', 'TP', 'Brownfield Review', 'Brownfield Analysis', 'CD+Tests', 'CR', 'QA', 'UAT']);
|
|
31
|
+
const OR_MEMORY_TARGETS = Object.freeze(['context_graph', 'sot_registry', 'scope_artifact', 'open_questions', 'none']);
|
|
32
|
+
const gateRowExpectation = (state, type) => ({
|
|
33
|
+
status: state.approvals.has(type) ? state.approvals.get(type).status : state.artefacts.get(type)?.status,
|
|
34
|
+
reference: state.artefacts.get(type)?.path || state.approvals.get(type)?.evidence,
|
|
35
|
+
});
|
|
36
|
+
function structuredOrExpectations(state, route) {
|
|
37
|
+
return {
|
|
38
|
+
fields: { ...Object.fromEntries(Object.entries(OR_SOURCE_FIELDS).map(([field, type]) => [field, state.artefacts.get(type)?.path ?? null])),
|
|
39
|
+
mode_slice_decision: route, current_gate: 'OR', decision: 'pass', required_approval: 'none' },
|
|
40
|
+
gate_state_rows: Object.fromEntries(OR_GATE_ROWS.map(type => [type, gateRowExpectation(state, type)])),
|
|
41
|
+
memory_target: OR_MEMORY_TARGETS, memory_fields: 'memory_reason and memory_refs need concrete text',
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
|
|
27
45
|
// Shared observation of registered OR and prepared OR candidates. Legacy reports retain
|
|
28
46
|
// their documented formats; the new writer additionally requires the complete template.
|
|
29
47
|
export function evaluateCloseoutReadiness(state, report, readArtefact, { prepared = false } = {}) {
|
|
@@ -85,14 +103,13 @@ export function evaluateCloseoutReadiness(state, report, readArtefact, { prepare
|
|
|
85
103
|
...Object.keys(context), 'next_allowed_action', 'required_approval', 'forbidden_until_then']) {
|
|
86
104
|
if ([...report.matchAll(new RegExp(`^- ${field}:[ \\t]*(.*)$`, 'gmu'))].length !== 1) fail('or_field_ambiguous:' + field);
|
|
87
105
|
}
|
|
88
|
-
for (const [field, type] of Object.entries(
|
|
106
|
+
for (const [field, type] of Object.entries(OR_SOURCE_FIELDS)) {
|
|
89
107
|
if (value(report, field) !== state.artefacts.get(type)?.path) fail('or_source_reference_invalid:' + field);
|
|
90
108
|
}
|
|
91
109
|
if (value(report, 'mode_slice_decision') !== route || value(report, 'current_gate') !== 'OR' || value(report, 'decision') !== 'pass') fail('or_control_binding_invalid');
|
|
92
110
|
const gateRows = tableRows(markdownSection(report, 'Gate State')).filter(row => row[0] !== 'Gate or step');
|
|
93
|
-
for (const type of
|
|
94
|
-
const rows = gateRows.filter(row => row[0] === type), expected =
|
|
95
|
-
const reference = state.artefacts.get(type)?.path || state.approvals.get(type)?.evidence;
|
|
111
|
+
for (const type of OR_GATE_ROWS) {
|
|
112
|
+
const rows = gateRows.filter(row => row[0] === type), { status: expected, reference } = gateRowExpectation(state, type);
|
|
96
113
|
if (rows.length !== 1 || rows[0][1] !== expected || !concrete(rows[0][2])
|
|
97
114
|
|| cleanStatusCell(rows[0][2]) !== cleanStatusCell(reference)) fail('or_gate_state_unconfirmed:' + type);
|
|
98
115
|
}
|
|
@@ -101,11 +118,12 @@ export function evaluateCloseoutReadiness(state, report, readArtefact, { prepare
|
|
|
101
118
|
if (!concrete(text) || /<[^>]+>|\|[ \t]*\|/u.test(text)) fail('or_section_incomplete:' + section);
|
|
102
119
|
}
|
|
103
120
|
for (const section of ['Missing Evidence', 'Risks And Open Items']) if (/\|\s*(?:revise|block)\s*\|/u.test(markdownSection(report, section))) fail('or_required_obligation_open:' + section);
|
|
104
|
-
if (!
|
|
121
|
+
if (!OR_MEMORY_TARGETS.includes(context.memory_target)
|
|
105
122
|
|| !concrete(context.memory_reason) || !concrete(context.memory_refs)) fail('or_knowledge_decision_incomplete');
|
|
106
123
|
if (value(report, 'required_approval') !== 'none') fail('or_required_approval_open');
|
|
107
124
|
}
|
|
108
125
|
}
|
|
109
126
|
return { ready: findings.length === 0, findings, route, context_digest: closeoutContextDigest(report),
|
|
110
|
-
parent_reconciliation: parent ?? null, programme_aggregation: programme ?? null
|
|
127
|
+
parent_reconciliation: parent ?? null, programme_aggregation: programme ?? null,
|
|
128
|
+
...(prepared && structured && findings.length ? { expected: structuredOrExpectations(state, route) } : {}) };
|
|
111
129
|
}
|
|
@@ -9,7 +9,8 @@ import { isGateSatisfied, transitionDecisionForRunState } from "./gate-policy.js
|
|
|
9
9
|
import { effectiveNextAllowedAction } from "./next-action.js";
|
|
10
10
|
import { evaluateVerifiedChange, extractField, verifiedChangeEscalationTargets } from "./verified-change.js";
|
|
11
11
|
import { gateApprovalStatus, isInternalStepSatisfied, modeSliceDecision, readArtefactHeading, readRunState, resolvedArtefactFile } from "./run-state.js";
|
|
12
|
-
import { renderReviewableApproval } from "../control-state/run-presentation-render.js";
|
|
12
|
+
import { evaluateApprovalSummaryReadiness, renderApprovalSummaryIssue, renderReviewableApproval } from "../control-state/run-presentation-render.js";
|
|
13
|
+
import { readFileSync } from "../control-read/fs.js";
|
|
13
14
|
import { evaluateUrReadiness } from "./ur-readiness.js";
|
|
14
15
|
import { inspectDefinitionSources } from "./definition-sources.js";
|
|
15
16
|
import { evaluatePrdReadiness } from "./prd-readiness.js";
|
|
@@ -427,31 +428,58 @@ export function evaluateGateCheck(targetDir, selection = {}, dependencies = {})
|
|
|
427
428
|
if (status === "open" && prdReadiness && transitionDecision.next_operation?.type !== "reassess_source_analysis" && isGateSatisfied(runState, "UR") && isInternalStepSatisfied(runState, "Brownfield Review")
|
|
428
429
|
&& ["structured_delivery", "structured_slice"].includes(modeSliceDecision(runState))) {
|
|
429
430
|
const inputFacts = inspectDefinitionSources(targetDir, runState, extractField(runState.content, "run_id"), "PRD", ["UR", "Brownfield Review"]);
|
|
430
|
-
if (inputFacts.issue) prdReadiness = { ready: false, open_decisions: [...prdReadiness.open_decisions,
|
|
431
|
+
if (inputFacts.issue) prdReadiness = { ...prdReadiness, ready: false, source_issue: inputFacts.issue, open_decisions: [...prdReadiness.open_decisions,
|
|
431
432
|
renderDefinitionSourceRecovery(inputFacts.issue, { registry: interactionLocales, requestedLocale: presentationLocale })] };
|
|
432
433
|
}
|
|
433
434
|
if (status === "open" && currentGate === "PRD" && prdReadiness && !prdReadiness.ready) {
|
|
434
435
|
status = "blocked";
|
|
436
|
+
const checks = prdReadiness.readiness_checks;
|
|
435
437
|
blockingReason = "AGDF_PRD_DECISIONS_OPEN";
|
|
438
|
+
if (checks?.decisions_ready) {
|
|
439
|
+
const sourceCriteriaIncomplete = !checks.approval_summary.ready && [
|
|
440
|
+
"approval_summary_criterion_content_missing", "approval_summary_source_criteria_invalid",
|
|
441
|
+
"approval_summary_source_criteria_duplicate", "approval_summary_criteria_missing",
|
|
442
|
+
].includes(checks.approval_summary.reason);
|
|
443
|
+
blockingReason = prdReadiness.source_issue || !checks.preview_ready || !checks.criteria_ready || sourceCriteriaIncomplete
|
|
444
|
+
? "AGDF_PRD_READINESS_INCOMPLETE" : "AGDF_APPROVAL_SUMMARY_INCOMPLETE";
|
|
445
|
+
}
|
|
436
446
|
allowed = ["complete the listed PRD readiness items together and record a new run revision"];
|
|
437
447
|
forbidden = [...forbidden, "present or approve PRD before required decisions and acceptance criteria are ready"];
|
|
438
448
|
// Fixed text keeps the card localizable; detailed gaps travel separately in prd_readiness.open_decisions.
|
|
439
449
|
nextAllowedAction = "complete the open PRD readiness items together, then record the revision through the inspected current recording operation";
|
|
440
450
|
}
|
|
441
|
-
|
|
442
|
-
|
|
451
|
+
let sdReadiness = currentGate === "SD" && approvalArtefactReady ? evaluateSdReadiness(targetDir, runState) : null;
|
|
452
|
+
let traceabilityReadiness = status === "open" && approvalArtefactReady && currentGate === "SD"
|
|
443
453
|
? evaluateSdTraceability(targetDir, runState)
|
|
444
454
|
: status === "open" && approvalArtefactReady && currentGate === "TP"
|
|
445
455
|
? evaluateTpTraceability(targetDir, runState)
|
|
446
456
|
: null;
|
|
447
|
-
|
|
457
|
+
// Presentation readiness belongs to the existing authoring gate, not to the
|
|
458
|
+
// traceability grammar. Use the same summary owner as preflight and rendering
|
|
459
|
+
// before a registered SD/TP draft can bypass its author and request approval.
|
|
460
|
+
let approvalSummaryReadiness = null;
|
|
461
|
+
if (status === "open" && approvalArtefactReady && ["SD", "TP"].includes(currentGate)) {
|
|
462
|
+
const path = runState.artefacts.get(currentGate).path;
|
|
463
|
+
const file = resolvedArtefactFile(targetDir, path);
|
|
464
|
+
const languages = resolveArtifactPresentationLanguages(targetDir, presentationLocale);
|
|
465
|
+
const summary = evaluateApprovalSummaryReadiness(currentGate, readFileSync(file, "utf8"), languages, { path });
|
|
466
|
+
if (!summary.ready) {
|
|
467
|
+
approvalSummaryReadiness = summary;
|
|
468
|
+
const issue = renderApprovalSummaryIssue(summary, { path, presentationLanguage: presentationLocale });
|
|
469
|
+
if (currentGate === "SD") sdReadiness = { ...sdReadiness, ready: false, decisions_ready: sdReadiness.ready,
|
|
470
|
+
open_decisions: [...sdReadiness.open_decisions, issue] };
|
|
471
|
+
else traceabilityReadiness = { ...traceabilityReadiness, ready: false, traceability_ready: traceabilityReadiness.ready,
|
|
472
|
+
open_items: [...traceabilityReadiness.open_items, issue] };
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
if (status === "open" && sdReadiness && !sdReadiness.ready && sdReadiness.decisions_ready !== true) {
|
|
448
476
|
status = "blocked";
|
|
449
477
|
blockingReason = "AGDF_SD_DECISIONS_OPEN";
|
|
450
478
|
allowed = ["complete the listed SD readiness items together and record a new run revision"];
|
|
451
479
|
forbidden = [...forbidden, "present or approve SD before required design decisions are ready"];
|
|
452
480
|
nextAllowedAction = "complete the open SD readiness items together, then record the revision with the shared artefact writer";
|
|
453
481
|
}
|
|
454
|
-
if (status === "open" && traceabilityReadiness && !traceabilityReadiness.ready) {
|
|
482
|
+
if (status === "open" && traceabilityReadiness && !traceabilityReadiness.ready && traceabilityReadiness.traceability_ready !== true) {
|
|
455
483
|
status = "blocked";
|
|
456
484
|
blockingReason = currentGate === "SD" ? "AGDF_SD_TRACEABILITY_INCOMPLETE" : "AGDF_TP_TRACEABILITY_INCOMPLETE";
|
|
457
485
|
allowed = [currentGate === "SD"
|
|
@@ -462,6 +490,15 @@ export function evaluateGateCheck(targetDir, selection = {}, dependencies = {})
|
|
|
462
490
|
? "complete the listed SD traceability rows, then record the revision through the inspected current recording operation"
|
|
463
491
|
: "complete the listed TP traceability rows, then record the revision through the inspected current recording operation";
|
|
464
492
|
}
|
|
493
|
+
if (status === "open" && approvalSummaryReadiness) {
|
|
494
|
+
status = "blocked";
|
|
495
|
+
blockingReason = "AGDF_APPROVAL_SUMMARY_INCOMPLETE";
|
|
496
|
+
}
|
|
497
|
+
if (blockingReason === "AGDF_APPROVAL_SUMMARY_INCOMPLETE") {
|
|
498
|
+
allowed = ["complete the current artefact approval summary and record a new run revision"];
|
|
499
|
+
forbidden = [...forbidden, "present or approve the current artefact before its required approval summary is ready"];
|
|
500
|
+
nextAllowedAction = "complete the current artefact approval summary, then record the revision through the inspected current recording operation";
|
|
501
|
+
}
|
|
465
502
|
if (status === "open" && /^Approval: /u.test(missingApproval) && !approvalArtefactReady) {
|
|
466
503
|
allowed = allowed.filter((action) => !/^request exact .* approval$/iu.test(action));
|
|
467
504
|
if (/request exact approval: Approval: /iu.test(nextAllowedAction)) {
|
|
@@ -662,6 +699,7 @@ export function evaluateGateCheck(targetDir, selection = {}, dependencies = {})
|
|
|
662
699
|
...(prdReadiness ? { prd_readiness: prdReadiness } : {}),
|
|
663
700
|
...(sdReadiness ? { sd_readiness: sdReadiness } : {}),
|
|
664
701
|
...(traceabilityReadiness ? { traceability_readiness: traceabilityReadiness } : {}),
|
|
702
|
+
...(approvalSummaryReadiness ? { approval_summary_readiness: approvalSummaryReadiness } : {}),
|
|
665
703
|
next_gate_after_approval: postApproval.next_gate_after_approval,
|
|
666
704
|
allowed_after_approval: postApproval.allowed_after_approval,
|
|
667
705
|
allowed,
|
|
@@ -6,6 +6,8 @@ export function extractField(content, field) {
|
|
|
6
6
|
|
|
7
7
|
export const verifiedChangeEscalationTargets = new Set(["structured_slice", "structured_delivery"]);
|
|
8
8
|
export const STRUCTURED_REQUIRED_REVIEWS = Object.freeze(['TP Review', 'Clean Implementation Review']);
|
|
9
|
+
// The skill that owns each required review report.
|
|
10
|
+
export const REVIEW_SKILLS = Object.freeze({ 'TP Review': 'task-plan-review', 'Clean Implementation Review': 'clean-implementation-review' });
|
|
9
11
|
// `Clean Review` is the supported legacy name of the Clean Implementation Review row.
|
|
10
12
|
export const reviewArtefactType = (state, step) => step === 'Clean Implementation Review' && !state.artefacts.get(step)?.path
|
|
11
13
|
&& state.artefacts.get('Clean Review')?.path ? 'Clean Review' : step;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { extractField, verifiedChangeEscalationTargets } from "./gate-policy-inputs.js";
|
|
2
2
|
import { gateApprovalStatus, gateArtefactStatus, isDurableGateArtefactSatisfied, isInternalStepSatisfied, modeSliceDecision } from "./run-state-policy.js";
|
|
3
|
-
import { STRUCTURED_REQUIRED_REVIEWS, reviewArtefactType } from "./gate-policy-inputs.js";
|
|
3
|
+
import { REVIEW_SKILLS, STRUCTURED_REQUIRED_REVIEWS, reviewArtefactType } from "./gate-policy-inputs.js";
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
// Shared policy over prepared facts. The Core supplies its validated receipt reader;
|
|
@@ -310,8 +310,9 @@ function gateDecisionForRunState(runState, verifiedChange = null) {
|
|
|
310
310
|
const acceptedPlanDeviation = runState.qa_acceptance?.eligible || runState.qa_acceptance?.accepted;
|
|
311
311
|
const structuredBeforeQaApproval = ["structured_slice", "structured_delivery"].includes(modeSliceDecision(runState))
|
|
312
312
|
&& gateApprovalStatus(runState, "QA") !== "approved";
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
const pendingReview = structuredBeforeQaApproval && STRUCTURED_REQUIRED_REVIEWS.find(step => !isInternalStepSatisfied(runState, reviewArtefactType(runState, step))
|
|
314
|
+
&& !(step === "TP Review" && acceptedPlanDeviation && runState.artefacts.get(step)?.status === "revise"));
|
|
315
|
+
if (pendingReview) {
|
|
315
316
|
return {
|
|
316
317
|
status: "open",
|
|
317
318
|
current_gate: "QA",
|
|
@@ -320,6 +321,9 @@ function gateDecisionForRunState(runState, verifiedChange = null) {
|
|
|
320
321
|
allowed: ["record TP Review and Clean Implementation Review", "run QA gate"],
|
|
321
322
|
forbidden: ["request QA approval", "request UAT approval", "release", "claim delivery readiness"],
|
|
322
323
|
next_allowed_action: "Record TP Review and Clean Implementation Review before requesting Approval: QA.",
|
|
324
|
+
// Names the review owed next so authoring offers that report's forms, not the QA report's.
|
|
325
|
+
next_operation: { type: "record_required_review", skill_id: REVIEW_SKILLS[pendingReview], operation_key: "review.record",
|
|
326
|
+
actor: "agent", effect: "preparation", gate: "QA", internal_step: pendingReview },
|
|
323
327
|
};
|
|
324
328
|
}
|
|
325
329
|
// A QA report recorded before current evidence (for example reviews recorded after it)
|
|
@@ -22,7 +22,8 @@ export function evaluatePrdReadiness(targetDir, runState, { presentationLanguage
|
|
|
22
22
|
return { ready: false, open_decisions: ["Approval Decisions table is empty or malformed"] };
|
|
23
23
|
}
|
|
24
24
|
const open = [];
|
|
25
|
-
|
|
25
|
+
let previewReady = true, previewIssue;
|
|
26
|
+
try { previewForState(targetDir, runState); } catch (error) { previewReady = false; previewIssue = error.message; }
|
|
26
27
|
const seen = new Set();
|
|
27
28
|
const incomplete = (value) => !value || /^(?:<|tbd\b|to confirm\b)/iu.test(value);
|
|
28
29
|
for (const [decision, timing, status, resolution, owner, ...extra] of rows.slice(2)) {
|
|
@@ -38,6 +39,8 @@ export function evaluatePrdReadiness(targetDir, runState, { presentationLanguage
|
|
|
38
39
|
// [ \t] rather than \s: an empty Owner line must not capture the following line.
|
|
39
40
|
const owner = content.match(/^Owner:[ \t]*(.*)$/mu)?.[1]?.trim();
|
|
40
41
|
if (incomplete(owner) || /\bto confirm\b|named individual/iu.test(owner)) open.unshift("Named PRD owner");
|
|
42
|
+
const decisionsReady = open.length === 0;
|
|
43
|
+
if (!previewReady) open.unshift(previewIssue);
|
|
41
44
|
const criteria = evaluatePrdCriteriaReadiness(content);
|
|
42
45
|
open.push(...criteria.open_items);
|
|
43
46
|
// Use the presentation owner's validator before a registered draft can take the ready route.
|
|
@@ -47,5 +50,7 @@ export function evaluatePrdReadiness(targetDir, runState, { presentationLanguage
|
|
|
47
50
|
if (!summary.ready) open.push(renderApprovalSummaryIssue(summary, {
|
|
48
51
|
path, presentationLanguage: languages.presentation_language,
|
|
49
52
|
}));
|
|
50
|
-
return { ready: open.length === 0, open_decisions: open
|
|
53
|
+
return { ready: open.length === 0, open_decisions: open,
|
|
54
|
+
readiness_checks: { decisions_ready: decisionsReady, preview_ready: previewReady, criteria_ready: criteria.ready,
|
|
55
|
+
approval_summary: summary } };
|
|
51
56
|
}
|
|
@@ -222,6 +222,15 @@ export function readAuthoredContent(text, profile, { locale, sourceLanguage } =
|
|
|
222
222
|
return sections === 1 && (spec.paragraph ? lines.length : Object.keys(fields).length) ? spec.paragraph ? lines.join(' ') : fields : null;
|
|
223
223
|
}
|
|
224
224
|
|
|
225
|
+
// Authoring guidance owned next to the parser that enforces it. Only a level-1
|
|
226
|
+
// title's metadata or a level-2 "Decision" section carries the result; a
|
|
227
|
+
// "## Code Review" style heading closes the readable metadata block.
|
|
228
|
+
export const REPORT_DECISION_FORMAT = Object.freeze({
|
|
229
|
+
section: '## Decision',
|
|
230
|
+
field: '- decision: <pass|revise|block>',
|
|
231
|
+
instruction: 'State the result in a level-2 "## Decision" section whose first line is "- decision: <value>". The value must equal the decision supplied when recording. A result under any other heading is not read.',
|
|
232
|
+
});
|
|
233
|
+
|
|
225
234
|
// Observe an authored technical result, never decide or approve QA. The closed
|
|
226
235
|
// internal opt-in preserves analysis not_applicable; QA's domain stays unchanged.
|
|
227
236
|
export function readReportDecision(text, { allowNotApplicable = false } = {}) {
|
|
@@ -45,6 +45,49 @@ function designDecisionIds(value) {
|
|
|
45
45
|
return text.split(",").map((item) => item.trim().toUpperCase());
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
const JSON_TYPE_METAVARIABLE = /^<(?:uuid|string|non-empty string|number|integer|(?:positive|non-negative) (?:integer|number)|boolean|null|object|array)>$/iu;
|
|
49
|
+
|
|
50
|
+
// Only typed JSON string values in an explicitly labelled schema/example are
|
|
51
|
+
// metavariables. Literal JSON keys may name words such as "todo"; angle-bracket
|
|
52
|
+
// key prompts, unknown values, arbitrary code and author fields stay checked.
|
|
53
|
+
function schemaExampleText(code) {
|
|
54
|
+
let parsed;
|
|
55
|
+
try { parsed = JSON.parse(code); } catch { return code; }
|
|
56
|
+
if (parsed === null || typeof parsed !== 'object') return code;
|
|
57
|
+
return code.replace(/"(?:\\.|[^"\\])*"/gu, (quoted, offset) => {
|
|
58
|
+
const key = /^[ \t]*:/u.test(code.slice(offset + quoted.length));
|
|
59
|
+
const value = JSON.parse(quoted);
|
|
60
|
+
if (key && !/<[^>]+>/u.test(value)) return '"literal-key"';
|
|
61
|
+
return JSON.stringify(!key && JSON_TYPE_METAVARIABLE.test(value) ? value.slice(1, -1) : value);
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// A quoted command such as `done <id>` is concrete CLI syntax. Schema examples
|
|
66
|
+
// are permitted only in the decision clause, never instead of its rationale or
|
|
67
|
+
// consequence. The source text itself is never changed.
|
|
68
|
+
function unfinishedDecisionPrompts(value, { schemaExamples = false } = {}) {
|
|
69
|
+
const text = value.replace(/`([^`\n]+)`/gu, (span, code, offset) => {
|
|
70
|
+
if (/^[a-z][a-z0-9._/-]*(?:[ \t]+(?:--?[a-z0-9][a-z0-9_-]*|[a-z0-9._/-]+|<[a-z][a-z0-9_-]*>))+$/iu.test(code))
|
|
71
|
+
return code.replace(/<([a-z][a-z0-9_-]*)>/giu, '$1');
|
|
72
|
+
if (schemaExamples && /\b(?:(?:json[ \t]+)?schema(?:[ \t]+example)?|json[ \t]+example)[ \t]*[:=]?[ \t]*$/iu.test(value.slice(0, offset)))
|
|
73
|
+
return schemaExampleText(code);
|
|
74
|
+
return span;
|
|
75
|
+
});
|
|
76
|
+
// Preserve the original unfinished-field prefix guard even when an author
|
|
77
|
+
// has not closed its opening angle bracket yet.
|
|
78
|
+
return [...new Set(text.match(/<[^>]+>|^<[^>\s;]*|\b(?:tbd|to confirm|todo)\b/giu) ?? [])];
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
function decisionClauses(detail) {
|
|
82
|
+
// Semicolons or field-looking strings inside literal examples cannot declare
|
|
83
|
+
// the required author fields. Keep character offsets into the original text.
|
|
84
|
+
const labels = [...detail.replace(/`[^`\n]+`/gu, span => '_'.repeat(span.length))
|
|
85
|
+
.matchAll(/(?:^|;[ \t]*)(rationale|consequence|trade-off):[ \t]*/giu)];
|
|
86
|
+
return [{ field: 'decision', text: detail.slice(0, labels[0]?.index ?? detail.length).trim() },
|
|
87
|
+
...labels.map((label, index) => ({ field: label[1].toLowerCase() === 'rationale' ? 'rationale' : 'consequence',
|
|
88
|
+
text: detail.slice(label.index + label[0].length, labels[index + 1]?.index ?? detail.length).trim() }))];
|
|
89
|
+
}
|
|
90
|
+
|
|
48
91
|
function architectureDecisionIds(markdown) {
|
|
49
92
|
const body = section(markdown, "Architecture Decisions");
|
|
50
93
|
const openItems = [];
|
|
@@ -54,7 +97,7 @@ function architectureDecisionIds(markdown) {
|
|
|
54
97
|
for (const line of body.split("\n").map((item) => item.trim()).filter((item) => /^[-*]\s+/u.test(item))) {
|
|
55
98
|
const decision = line.replace(/^[-*]\s+/u, "").trim();
|
|
56
99
|
if (/^none\b/iu.test(decision)) {
|
|
57
|
-
if (!reasonedNone(decision) ||
|
|
100
|
+
if (!reasonedNone(decision) || unfinishedDecisionPrompts(decision).length) {
|
|
58
101
|
openItems.push("State why no binding SD decision is needed after 'none'");
|
|
59
102
|
}
|
|
60
103
|
if (none || ids.length) openItems.push("SD cannot combine 'none' with binding design decisions");
|
|
@@ -70,12 +113,18 @@ function architectureDecisionIds(markdown) {
|
|
|
70
113
|
if (none) openItems.push("SD cannot combine 'none' with binding design decisions");
|
|
71
114
|
if (ids.includes(id)) openItems.push(`Duplicate SD design decision ID: ${id}`);
|
|
72
115
|
ids.push(id);
|
|
73
|
-
const
|
|
74
|
-
const
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
116
|
+
const clauses = decisionClauses(match[2]);
|
|
117
|
+
for (const field of ['decision', 'rationale', 'consequence']) {
|
|
118
|
+
const declarations = clauses.filter(clause => clause.field === field);
|
|
119
|
+
if (declarations.length > 1)
|
|
120
|
+
openItems.push(`SD design decision ${id} needs exactly one nonempty ${field}: field; found ${declarations.length} declarations`);
|
|
121
|
+
else if (!declarations.length || !declarations[0].text)
|
|
122
|
+
openItems.push(field === 'decision' ? `SD design decision ${id} needs a concrete decision statement`
|
|
123
|
+
: `SD design decision ${id} is missing a nonempty ${field}: field`);
|
|
124
|
+
}
|
|
125
|
+
for (const clause of clauses) {
|
|
126
|
+
const prompts = unfinishedDecisionPrompts(clause.text, { schemaExamples: clause.field === 'decision' });
|
|
127
|
+
if (prompts.length) openItems.push(`SD design decision ${id} contains unresolved author prompts in ${clause.field}: ${prompts.slice(0, 8).map(token => JSON.stringify(token)).join(', ')}${prompts.length > 8 ? ` (${prompts.length - 8} more)` : ''}`);
|
|
79
128
|
}
|
|
80
129
|
}
|
|
81
130
|
if (!ids.length && !none) openItems.push("List binding SD decisions by SDD ID, or record a reasoned none");
|
|
@@ -192,7 +241,7 @@ export function evaluateTpTraceability(targetDir, runState) {
|
|
|
192
241
|
for (const column of ["expected_result", "evidence"]) if (unfinished(row[column])) openItems.push(`TP scenario ${scenario || "without id"} needs ${column}`);
|
|
193
242
|
const expectedDecisions = decisionsByCriterion.get(criterion) ?? [];
|
|
194
243
|
if (expectedDecisions.length) {
|
|
195
|
-
if (!expectedDecisions.includes(decision)) openItems.push(`TP scenario ${scenario || "without id"}
|
|
244
|
+
if (!expectedDecisions.includes(decision)) openItems.push(`TP scenario ${scenario || "without id"} for ${criterion} has design_decision_id ${decision || "empty"}; set that table column to one of the mapped SD IDs: ${expectedDecisions.join(", ")}. Scenario prose cannot replace this cell.`);
|
|
196
245
|
else {
|
|
197
246
|
if (!verifiedDecisions.has(criterion)) verifiedDecisions.set(criterion, new Set());
|
|
198
247
|
verifiedDecisions.get(criterion).add(decision);
|
|
@@ -37,10 +37,13 @@ export function evaluateUrContentReadiness(content, { languages, path = 'UR.md',
|
|
|
37
37
|
const [heading, ...body] = block.split(/\r?\n/u);
|
|
38
38
|
return { heading: heading.replace(/^\d+\.[ \t]*/u, "").trim(), body: body.join("\n").trim() };
|
|
39
39
|
});
|
|
40
|
+
const placeholders = {};
|
|
40
41
|
for (const section of sections) {
|
|
41
42
|
const matches = blocks.filter(block => block.heading === section);
|
|
42
43
|
const body = matches[0]?.body ?? "";
|
|
43
|
-
|
|
44
|
+
const unfinished = unfinishedPlaceholders(body);
|
|
45
|
+
if (unfinished.length) placeholders[section] = unfinished;
|
|
46
|
+
if (matches.length !== 1 || !body || templatePrompts.has(body) || unfinished.length || /^(?:tbd|todo|to confirm)[ \t]*$/imu.test(body)) open.push(section);
|
|
44
47
|
}
|
|
45
48
|
const summary = evaluateApprovalSummaryReadiness("UR", content, languages);
|
|
46
49
|
if (!summary.ready) open.push(summary.required_heading);
|
|
@@ -48,5 +51,15 @@ export function evaluateUrContentReadiness(content, { languages, path = 'UR.md',
|
|
|
48
51
|
if (summary.reason === "approval_summary_field_unreadable") open.push(renderApprovalSummaryIssue(summary, {
|
|
49
52
|
path, presentationLanguage: languages.presentation_language,
|
|
50
53
|
}));
|
|
51
|
-
return { ready: open.length === 0, legacy: false, open_items: open, approval_summary: summary
|
|
54
|
+
return { ready: open.length === 0, legacy: false, open_items: open, approval_summary: summary,
|
|
55
|
+
...(Object.keys(placeholders).length ? { unfinished_placeholders: placeholders } : {}) };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
// Inline code may name syntax metavariables, as in `node wordfreq.js <file>` or
|
|
59
|
+
// `<word> <count>`. A single identifier in angle brackets inside a code span is
|
|
60
|
+
// literal notation; prose placeholders and spaced prompts such as `<why ...>`
|
|
61
|
+
// stay unfinished. The UR template carries no code-span prompts to hide.
|
|
62
|
+
function unfinishedPlaceholders(body) {
|
|
63
|
+
const notation = body.replace(/`([^`\n]+)`/gu, (_span, code) => code.replace(/<[\p{L}][\p{L}\p{N}_-]*>/gu, ""));
|
|
64
|
+
return [...new Set(notation.match(/<[^>]+>/gu) ?? [])];
|
|
52
65
|
}
|
|
@@ -9,7 +9,7 @@ import { evaluateUrReadiness } from '../control-evaluation/ur-readiness.js';
|
|
|
9
9
|
import { evaluateSdReadiness } from '../control-evaluation/sd-readiness.js';
|
|
10
10
|
import { evaluateSdTraceability, evaluateTpTraceability } from '../control-evaluation/traceability-readiness.js';
|
|
11
11
|
import { resolveArtifactPresentationLanguages } from '../resources/context.js';
|
|
12
|
-
import { evaluateApprovalSummaryReadiness } from '../control-state/run-presentation-render.js';
|
|
12
|
+
import { evaluateApprovalSummaryReadiness, renderApprovalSummaryIssue } from '../control-state/run-presentation-render.js';
|
|
13
13
|
import { artefactFileDigest, runSealState } from '../control-state/run-seal.js';
|
|
14
14
|
import { containedRegularFile, hasSymlinkComponent } from '../control-state/contained-file.js';
|
|
15
15
|
import { extractField } from '../control-evaluation/verified-change.js';
|
|
@@ -26,7 +26,8 @@ export function describeArtifactReadiness(result) {
|
|
|
26
26
|
'approval_summary_criteria_incomplete', 'approval_summary_user_goal_missing', 'approval_summary_scope_missing',
|
|
27
27
|
'approval_summary_decisions_missing', 'approval_summary_criterion_content_missing', 'approval_summary_content_missing']);
|
|
28
28
|
let findings = result.diagnostics.filter(row => names.has(row.code));
|
|
29
|
-
const readinessOwner = { AGDF_UR_REQUIREMENTS_INCOMPLETE: 'ur', AGDF_PRD_DECISIONS_OPEN: 'prd',
|
|
29
|
+
const readinessOwner = { AGDF_UR_REQUIREMENTS_INCOMPLETE: 'ur', AGDF_PRD_DECISIONS_OPEN: 'prd', AGDF_PRD_READINESS_INCOMPLETE: 'prd',
|
|
30
|
+
AGDF_APPROVAL_SUMMARY_INCOMPLETE: { PRD: 'prd', SD: 'sd', TP: 'traceability' }[result.gate],
|
|
30
31
|
AGDF_SD_DECISIONS_OPEN: 'sd', AGDF_SD_TRACEABILITY_INCOMPLETE: 'traceability', AGDF_TP_TRACEABILITY_INCOMPLETE: 'traceability' };
|
|
31
32
|
const key = readinessOwner[result.blocking_reason];
|
|
32
33
|
const details = key && result.current_gate === result.gate && result.readiness_details?.[key];
|
|
@@ -88,7 +89,8 @@ export function projectArtifactReadiness(root, { runId, gate, expectedRevisionId
|
|
|
88
89
|
const languages = resolveArtifactPresentationLanguages(targetRoot, presentationLanguage);
|
|
89
90
|
const summary = evaluateApprovalSummaryReadiness(gate, content, languages);
|
|
90
91
|
checks.push({ name: 'approval_summary', ...summary });
|
|
91
|
-
if (!summary.ready) diagnostics.push({ code: summary.reason,
|
|
92
|
+
if (!summary.ready) diagnostics.push({ code: summary.reason,
|
|
93
|
+
message: renderApprovalSummaryIssue(summary, { path, presentationLanguage: languages.presentation_language }) });
|
|
92
94
|
// Supply only an in-memory draft pointer; no Run, approval or binding is written.
|
|
93
95
|
const candidate = { ...state, artefacts: new Map(state.artefacts) };
|
|
94
96
|
candidate.artefacts.set(gate, { path, status: 'draft' });
|