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.
Files changed (341) hide show
  1. package/generated/.agdf/control/README.md +5 -0
  2. package/generated/.agdf/control/templates/BRAND.md +28 -0
  3. package/generated/.agdf/control/templates/artefacts/PRD.md +11 -0
  4. package/generated/.agdf/control/templates/artefacts/SD.md +4 -0
  5. package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
  6. package/generated/.opencode/agdf-interaction-locales.json +292 -2
  7. package/generated/.opencode/contracts/gate-artifact-preparation.md +9 -3
  8. package/generated/.opencode/contracts/interaction.md +10 -4
  9. package/generated/.opencode/contracts/modes.md +5 -0
  10. package/generated/.opencode/contracts/prd-definition.md +40 -1
  11. package/generated/.opencode/contracts/quality.md +35 -0
  12. package/generated/.opencode/contracts/request-activation.md +6 -3
  13. package/generated/.opencode/contracts/sd-definition.md +46 -0
  14. package/generated/.opencode/contracts/tp-definition.md +8 -0
  15. package/generated/.opencode/contracts/ur-definition.md +9 -5
  16. package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +31 -2
  17. package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
  18. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  19. package/generated/plugins/agdf/companion/events.mjs +117 -0
  20. package/generated/plugins/agdf/companion/figure.mjs +6 -6
  21. package/generated/plugins/agdf/companion/gate-bar.mjs +10 -28
  22. package/generated/plugins/agdf/companion/localization.mjs +10 -32
  23. package/generated/plugins/agdf/companion/notice.mjs +10 -8
  24. package/generated/plugins/agdf/companion/register.mjs +229 -43
  25. package/generated/plugins/agdf/companion/run-state.mjs +77 -90
  26. package/generated/plugins/agdf/companion/state.mjs +6 -32
  27. package/generated/plugins/agdf/companion/view.mjs +57 -12
  28. package/generated/plugins/agdf/control/README.md +5 -0
  29. package/generated/plugins/agdf/control/templates/BRAND.md +28 -0
  30. package/generated/plugins/agdf/control/templates/artefacts/PRD.md +11 -0
  31. package/generated/plugins/agdf/control/templates/artefacts/SD.md +4 -0
  32. package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
  33. package/generated/plugins/agdf/mcp/server/README.md +26 -2
  34. package/generated/plugins/agdf/mcp/server/package.json +3 -3
  35. package/generated/plugins/agdf/mcp/server/src/generation-runtime.js +11 -2
  36. package/generated/plugins/agdf/mcp/server/src/main.js +1 -0
  37. package/generated/plugins/agdf/mcp/server/src/next-action.js +227 -0
  38. package/generated/plugins/agdf/mcp/server/src/prepared-call-transport.js +306 -0
  39. package/generated/plugins/agdf/mcp/server/src/safe-read-continuation.js +62 -0
  40. package/generated/plugins/agdf/mcp/server/src/server.js +139 -35
  41. package/generated/plugins/agdf/mcp/server/ui/cockpit.html +2 -2
  42. package/generated/plugins/agdf/mcp/server/ui/decision-manifest.json +3 -3
  43. package/generated/plugins/agdf/mcp/server/ui/decision.html +2 -2
  44. package/generated/plugins/agdf/mcp/server/ui/manifest.json +3 -3
  45. package/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
  46. package/generated/plugins/agdf/meta/agdf-mcp-capability.json +1 -1
  47. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  48. package/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
  49. package/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
  50. package/generated/plugins/agdf/meta/contracts/modes.md +5 -0
  51. package/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
  52. package/generated/plugins/agdf/meta/contracts/quality.md +35 -0
  53. package/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
  54. package/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
  55. package/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
  56. package/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
  57. package/generated/plugins/agdf/meta/copilot-payload-baseline.json +3 -3
  58. package/generated/plugins/agdf/meta/distribution-profile-history.json +7 -0
  59. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
  60. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  61. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
  62. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
  63. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +5 -0
  64. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
  65. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +35 -0
  66. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
  67. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
  68. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
  69. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
  70. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +2 -1
  71. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +7 -4
  72. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/project-read-command.js +29 -0
  73. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
  74. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +32 -6
  75. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +7 -0
  76. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +34 -6
  77. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
  78. package/generated/plugins/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +86 -83
  79. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
  80. package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
  81. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
  82. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
  83. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
  84. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
  85. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
  86. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
  87. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +44 -6
  88. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
  89. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
  90. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
  91. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
  92. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
  93. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
  94. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
  95. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
  96. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/cockpit.js +4 -20
  97. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +64 -24
  98. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
  99. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +2 -1
  100. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
  101. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +6 -0
  102. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +32 -5
  103. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
  104. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +7 -5
  105. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
  106. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
  107. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +4 -1
  108. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +10 -4
  109. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +9 -3
  110. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +35 -11
  111. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +2 -0
  112. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
  113. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +25 -7
  114. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +84 -28
  115. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +38 -20
  116. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +37 -17
  117. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +10 -3
  118. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +8 -5
  119. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/index.js +3 -1
  120. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
  121. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +8 -0
  122. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +26 -1
  123. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +30 -1
  124. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +5 -3
  125. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +1 -1
  126. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +9 -2
  127. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +6 -4
  128. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
  129. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
  130. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
  131. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
  132. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
  133. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +17 -4
  134. package/generated/plugins/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
  135. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  136. package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +4 -3
  137. package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +31 -2
  138. package/generated/plugins/agdf/skills/ux-intent-definition/help.md +8 -1
  139. package/generated/plugins/agdf/submission/openai/availability.md +1 -1
  140. package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
  141. package/generated/plugins/agdf/submission/openai/release-notes.md +8 -8
  142. package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
  143. package/generated/plugins/agdf-planning/.codex-plugin/plugin.json +1 -1
  144. package/generated/plugins/agdf-planning/plugin.json +1 -1
  145. package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +332 -195
  146. package/generated/plugins/copilot/agdf/control/README.md +5 -0
  147. package/generated/plugins/copilot/agdf/control/templates/BRAND.md +28 -0
  148. package/generated/plugins/copilot/agdf/control/templates/artefacts/PRD.md +11 -0
  149. package/generated/plugins/copilot/agdf/control/templates/artefacts/SD.md +4 -0
  150. package/generated/plugins/copilot/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +1 -1
  151. package/generated/plugins/copilot/agdf/mcp/server/README.md +26 -2
  152. package/generated/plugins/copilot/agdf/mcp/server/package.json +3 -3
  153. package/generated/plugins/copilot/agdf/mcp/server/src/generation-runtime.js +11 -2
  154. package/generated/plugins/copilot/agdf/mcp/server/src/main.js +1 -0
  155. package/generated/plugins/copilot/agdf/mcp/server/src/next-action.js +227 -0
  156. package/generated/plugins/copilot/agdf/mcp/server/src/prepared-call-transport.js +306 -0
  157. package/generated/plugins/copilot/agdf/mcp/server/src/safe-read-continuation.js +62 -0
  158. package/generated/plugins/copilot/agdf/mcp/server/src/server.js +139 -35
  159. package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +1 -1
  160. package/generated/plugins/copilot/agdf/meta/distribution-profile-history.json +7 -0
  161. package/generated/plugins/copilot/agdf/plugin.json +1 -1
  162. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +292 -2
  163. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
  164. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
  165. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/interaction.md +10 -4
  166. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/modes.md +5 -0
  167. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/prd-definition.md +40 -1
  168. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/quality.md +35 -0
  169. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/request-activation.md +6 -3
  170. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/sd-definition.md +46 -0
  171. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/tp-definition.md +8 -0
  172. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/contracts/ur-definition.md +9 -5
  173. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +2 -1
  174. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +7 -4
  175. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/project-read-command.js +29 -0
  176. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
  177. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-dispatch-runtime.js +32 -6
  178. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/package.js +7 -0
  179. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/plugin-runtime.js +34 -6
  180. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
  181. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/mcp-worker-runtime.js +81 -78
  182. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +2 -2
  183. package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +1 -1
  184. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/events.js +154 -0
  185. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/figure-state.js +36 -0
  186. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/journal.js +180 -0
  187. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/companion/run-view.js +184 -0
  188. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
  189. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
  190. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-check.js +44 -6
  191. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
  192. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
  193. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
  194. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/report-decision.js +9 -0
  195. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
  196. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
  197. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
  198. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
  199. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/contract.js +64 -24
  200. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
  201. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/project-state.js +2 -1
  202. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/run-classification.js +31 -0
  203. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/selection.js +6 -0
  204. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-inspect/service.js +32 -5
  205. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
  206. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/input-resolution.js +7 -5
  207. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/material-limits.js +4 -0
  208. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
  209. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/presentation-delivery.js +4 -1
  210. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-contract.js +10 -4
  211. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-schema.js +9 -3
  212. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-command-service.js +35 -11
  213. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-identity.js +2 -0
  214. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
  215. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-material.js +25 -7
  216. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-presentation-render.js +84 -28
  217. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-revision.js +38 -20
  218. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-source-revisions.js +37 -17
  219. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-state-reader.js +10 -3
  220. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/control-state/run-steps.js +8 -5
  221. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/index.js +3 -1
  222. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog-validation.js +6 -1
  223. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-catalog.js +8 -0
  224. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/interaction-presentation.js +26 -1
  225. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-input-hints.js +30 -1
  226. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/mcp-tool-errors.js +5 -3
  227. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/resources/canonical-init-plan.js +1 -1
  228. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/runtime/plugin-provenance.js +9 -2
  229. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/contract.js +6 -4
  230. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
  231. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
  232. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
  233. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
  234. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
  235. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/service.js +17 -4
  236. package/generated/plugins/copilot/agdf/runtime/create-agdf/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
  237. package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +2 -2
  238. package/generated/plugins/copilot/agdf/skills/agdf-interaction-locales.json +1 -1
  239. package/generated/plugins/copilot/agdf/skills/agdf-ux-intent-definition/SKILL.md +31 -2
  240. package/generated/plugins/copilot/agdf/skills/contracts/gate-artifact-preparation.md +9 -3
  241. package/generated/plugins/copilot/agdf/skills/contracts/interaction.md +10 -4
  242. package/generated/plugins/copilot/agdf/skills/contracts/modes.md +5 -0
  243. package/generated/plugins/copilot/agdf/skills/contracts/prd-definition.md +40 -1
  244. package/generated/plugins/copilot/agdf/skills/contracts/quality.md +35 -0
  245. package/generated/plugins/copilot/agdf/skills/contracts/request-activation.md +6 -3
  246. package/generated/plugins/copilot/agdf/skills/contracts/sd-definition.md +46 -0
  247. package/generated/plugins/copilot/agdf/skills/contracts/tp-definition.md +8 -0
  248. package/generated/plugins/copilot/agdf/skills/contracts/ur-definition.md +9 -5
  249. package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -1
  250. package/generated/submissions/openai/agdf/meta/agdf-interaction-locales.json +292 -2
  251. package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +1 -1
  252. package/generated/submissions/openai/agdf/meta/contracts/gate-artifact-preparation.md +9 -3
  253. package/generated/submissions/openai/agdf/meta/contracts/interaction.md +10 -4
  254. package/generated/submissions/openai/agdf/meta/contracts/modes.md +5 -0
  255. package/generated/submissions/openai/agdf/meta/contracts/prd-definition.md +40 -1
  256. package/generated/submissions/openai/agdf/meta/contracts/quality.md +35 -0
  257. package/generated/submissions/openai/agdf/meta/contracts/request-activation.md +6 -3
  258. package/generated/submissions/openai/agdf/meta/contracts/sd-definition.md +46 -0
  259. package/generated/submissions/openai/agdf/meta/contracts/tp-definition.md +8 -0
  260. package/generated/submissions/openai/agdf/meta/contracts/ur-definition.md +9 -5
  261. package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +3 -3
  262. package/generated/submissions/openai/agdf/meta/distribution-profile-history.json +7 -0
  263. package/generated/submissions/openai/agdf/plugin.json +1 -1
  264. package/generated/submissions/openai/agdf/skills/ux-intent-definition/SKILL.md +31 -2
  265. package/generated/submissions/openai/agdf/skills/ux-intent-definition/help.md +8 -1
  266. package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
  267. package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
  268. package/generated/submissions/openai/agdf/submission/openai/inventory.json +24 -24
  269. package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
  270. package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
  271. package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
  272. package/generated/submissions/openai/agdf/submission/openai/release-notes.md +8 -8
  273. package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
  274. package/lib/cli/command-registry.js +2 -1
  275. package/lib/cli/parse-args.js +7 -4
  276. package/lib/cli/project-read-command.js +29 -0
  277. package/lib/cli/validation-handlers.js +2 -1
  278. package/lib/mcp-dispatch-runtime.js +32 -6
  279. package/lib/mcp-lifecycle/package.js +7 -0
  280. package/lib/mcp-lifecycle/plugin-runtime.js +34 -6
  281. package/lib/mcp-lifecycle/prepared-call-journal.js +269 -0
  282. package/lib/mcp-worker-runtime.js +86 -83
  283. package/lib/runtime/validator-application.js +2 -2
  284. package/lib/scaffold/plan.js +2 -0
  285. package/package.json +1 -1
  286. package/runtime/core/lib/companion/events.js +154 -0
  287. package/runtime/core/lib/companion/figure-state.js +36 -0
  288. package/runtime/core/lib/companion/journal.js +180 -0
  289. package/runtime/core/lib/companion/run-view.js +184 -0
  290. package/runtime/core/lib/control-evaluation/acceptance-criteria.js +2 -0
  291. package/runtime/core/lib/control-evaluation/closeout-readiness.js +24 -6
  292. package/runtime/core/lib/control-evaluation/gate-check.js +44 -6
  293. package/runtime/core/lib/control-evaluation/gate-policy-inputs.js +2 -0
  294. package/runtime/core/lib/control-evaluation/gate-policy-pure.js +7 -3
  295. package/runtime/core/lib/control-evaluation/prd-readiness.js +7 -2
  296. package/runtime/core/lib/control-evaluation/report-decision.js +9 -0
  297. package/runtime/core/lib/control-evaluation/traceability-readiness.js +57 -8
  298. package/runtime/core/lib/control-evaluation/ur-readiness.js +15 -2
  299. package/runtime/core/lib/control-inspect/artifact-readiness.js +5 -3
  300. package/runtime/core/lib/control-inspect/authoring-inputs.js +107 -22
  301. package/runtime/core/lib/control-inspect/cockpit.js +4 -20
  302. package/runtime/core/lib/control-inspect/contract.js +64 -24
  303. package/runtime/core/lib/control-inspect/material-recording-calls.js +54 -0
  304. package/runtime/core/lib/control-inspect/project-state.js +2 -1
  305. package/runtime/core/lib/control-inspect/run-classification.js +31 -0
  306. package/runtime/core/lib/control-inspect/selection.js +6 -0
  307. package/runtime/core/lib/control-inspect/service.js +32 -5
  308. package/runtime/core/lib/control-state/authoring-text-handoff.js +3 -0
  309. package/runtime/core/lib/control-state/input-resolution.js +7 -5
  310. package/runtime/core/lib/control-state/material-limits.js +4 -0
  311. package/runtime/core/lib/control-state/prepared-control-calls.js +137 -0
  312. package/runtime/core/lib/control-state/presentation-delivery.js +4 -1
  313. package/runtime/core/lib/control-state/run-command-contract.js +10 -4
  314. package/runtime/core/lib/control-state/run-command-schema.js +9 -3
  315. package/runtime/core/lib/control-state/run-command-service.js +35 -11
  316. package/runtime/core/lib/control-state/run-identity.js +2 -0
  317. package/runtime/core/lib/control-state/run-inventory-reader.js +5 -3
  318. package/runtime/core/lib/control-state/run-material.js +25 -7
  319. package/runtime/core/lib/control-state/run-presentation-render.js +84 -28
  320. package/runtime/core/lib/control-state/run-revision.js +38 -20
  321. package/runtime/core/lib/control-state/run-source-revisions.js +37 -17
  322. package/runtime/core/lib/control-state/run-state-reader.js +10 -3
  323. package/runtime/core/lib/control-state/run-steps.js +8 -5
  324. package/runtime/core/lib/index.js +3 -1
  325. package/runtime/core/lib/interaction-catalog-validation.js +6 -1
  326. package/runtime/core/lib/interaction-catalog.js +8 -0
  327. package/runtime/core/lib/interaction-presentation.js +26 -1
  328. package/runtime/core/lib/mcp-input-hints.js +30 -1
  329. package/runtime/core/lib/mcp-tool-errors.js +5 -3
  330. package/runtime/core/lib/resources/canonical-init-plan.js +1 -1
  331. package/runtime/core/lib/runtime/plugin-provenance.js +9 -2
  332. package/runtime/core/lib/skill-dispatch/contract.js +6 -4
  333. package/runtime/core/lib/skill-dispatch/delivery-intake.js +3 -1
  334. package/runtime/core/lib/skill-dispatch/mcp-continuation.js +25 -2
  335. package/runtime/core/lib/skill-dispatch/prd-definition.js +3 -2
  336. package/runtime/core/lib/skill-dispatch/readiness-findings.js +7 -0
  337. package/runtime/core/lib/skill-dispatch/sd-definition.js +4 -2
  338. package/runtime/core/lib/skill-dispatch/service.js +17 -4
  339. package/runtime/core/lib/skill-dispatch/tp-definition.js +4 -2
  340. package/generated/plugins/agdf/companion/core.mjs +0 -16
  341. package/generated/plugins/agdf/companion/locales.json +0 -200
@@ -243,10 +243,13 @@ The requested effect, not discovery, decides AGDF activation.
243
243
  ### Delivery intent transport
244
244
 
245
245
  A delivery request without a confirmed run binding first dispatches gate-check with intake true
246
- and no run_id. Its resolve_delivery_run continuation supplies canonical UR scope evidence for the
246
+ and neither run_id nor intake_mode; null or invented IDs are not substitutes. Its resolve_delivery_run continuation supplies canonical UR scope evidence for the
247
247
  coding agent's assignment. One unequivocal same-scope continuation uses resume, its run_id and
248
- expected_revision_id; a clear independent scope uses new and an unused `run-<original-operation-uuid>` ID even when unrelated
249
- runs exist. Single-run count, recency, shared files and ambient AGDF_RUN_ID prove no scope match.
248
+ expected_revision_id. A clear independent scope follows the supplied new-Run operation even when
249
+ unrelated Runs exist: MCP uses agdf_run/run.create, then its returned Run/revision and resume call.
250
+ Never interpret intake_mode:new as MCP Run creation or invent an unused Run ID. The CLI fallback's
251
+ prospective ID is derived only from its original run-create operation UUID.
252
+ Single-run count, recency, shared files and ambient AGDF_RUN_ID prove no scope match.
250
253
  Overlapping plausible scopes require one question about the work, not a technical Run-ID choice.
251
254
  Incomplete inventory is a technical failure, never evidence for a new scope. Read-only requests omit intake and
252
255
  continue_delivery. On a bound run, continue_delivery requests the next canonical internal
@@ -33,6 +33,22 @@ PRD criterion exactly once to realization, authoritative owner, stable SDD IDs o
33
33
  and compatibility/risk. Never duplicate acceptance, invent scope/users or claim implementation.
34
34
  Retain actual sources/draft and a reasoned derivation review; structure alone is not semantic proof.
35
35
 
36
+ Architecture Decisions use `SDD-...: decision; rationale: reason; consequence: trade-off`.
37
+ Each bullet has one concrete decision statement, exactly one nonempty `rationale:` field and
38
+ exactly one nonempty `consequence:` field (`trade-off:` is its alias, not an additional field).
39
+ The readiness check distinguishes absent decision/rationale/consequence fields from unresolved
40
+ author prompts and identifies the exact offending token and field. Quoted CLI syntax such as
41
+ `done <id>` stays literal. An inline, parseable JSON object/array introduced immediately by
42
+ `schema`, `JSON schema`, `schema example` or `JSON example` may use full quoted string values
43
+ `"<uuid>"`, `"<string>"`, `"<non-empty string>"`, `"<number>"`, `"<integer>"`,
44
+ `"<positive number>"`, `"<non-negative number>"`, `"<positive integer>"`,
45
+ `"<non-negative integer>"`, `"<boolean>"`, `"<null>"`, `"<object>"` or `"<array>"`.
46
+ This exception applies only to the decision clause, not type placeholders in JSON keys, arbitrary
47
+ inline code, malformed JSON, or the rationale/consequence. Regular JSON keys such as `"todo"`
48
+ are literal schema property names; angle-bracket prompts in keys remain unresolved.
49
+ Unknown prompts such as `<choose encoding>`,
50
+ `<why>`, `TBD` and `TODO` remain blockers; type notation cannot settle a material design choice.
51
+
36
52
  A decision that selects or changes a framework, library, external API, protocol, service or major
37
53
  version not already evidenced in the repository needs current authoritative sources through the
38
54
  host's available tools: official documentation/specification, release notes or migration guide of
@@ -60,8 +76,38 @@ A product-scope/acceptance conflict stays unresolved and returns to the earliest
60
76
  UR/PRD revision owner. Do not edit approved sources, invent a transition after downstream linking
61
77
  or manufacture answers; use supported revision/recovery and fresh source approval where required.
62
78
 
79
+ ### Realize brand-informed criteria
80
+
81
+ For applicable design work, read the adopted PRD criteria together with the exact project brand
82
+ source references retained by UX/PRD: path, version or content digest and relevant passages. Keep
83
+ that source identity in the existing Ownership And Source Of Truth and Constraints And Compatibility
84
+ sections and confirm the consumed version matches it. A framework example or another project's
85
+ brand file cannot replace the selected source; brand context cannot silently expand approved
86
+ product intent or acceptance.
87
+
88
+ SD owns the concrete realization: design tokens, typography, layout, information hierarchy and
89
+ controls. Record the relevant choices, reuse, rationale and trade-offs with the existing SDD IDs
90
+ and map each approved criterion once through Acceptance Traceability. Preserve the approved
91
+ perception and information priorities rather than inventing a parallel brand specification.
92
+
93
+ In Test And Evidence Strategy, identify representative states, observable checks and the evidence
94
+ needed to judge those criteria. Plan evidence for quality.md's UX Intent Fidelity matrix under the
95
+ same PRD criterion IDs; its existing review owner produces that matrix at the appropriate stage.
96
+ Add no second matrix, gate or automatic fidelity claim. A preview or source-file match is not
97
+ implementation evidence or independent human acceptance. Non-applicable work requires no new brand
98
+ file. Missing material design facts remain before_sd decisions below;
99
+ product conflicts return to the existing PRD/UR revision owner.
100
+
63
101
  ## Explicit revision and recording
64
102
 
103
+ A returned bound authoring continuation for an incomplete own unapproved draft already
104
+ selects its correction route. Consume its authoring-inputs/material_call/recording_calls
105
+ forms directly and use the supplied update_draft value. Do not dispatch this author again
106
+ or add another intake for that same snapshot. The *_action revise route below is only for
107
+ NEW editing intent on an already READY draft, and uses skill_id gate-check, never an author
108
+ skill ID or a host skill alias. After saving, follow the returned continuation once.
109
+
110
+
65
111
  Before recording, use the continuation's resolved language and summary fields with
66
112
  gate-artifact-preparation's Language and approval summary preparation. A translated summary
67
113
  must be part of the draft before presentation, not deferred until a renderer failure.
@@ -69,6 +69,14 @@ not independent proof of human provenance. Table headings may use levels two thr
69
69
 
70
70
  ## Recording and revision
71
71
 
72
+ A returned bound authoring continuation for an incomplete own unapproved draft already
73
+ selects its correction route. Consume its authoring-inputs/material_call/recording_calls
74
+ forms directly and use the supplied update_draft value. Do not dispatch this author again
75
+ or add another intake for that same snapshot. The *_action revise route below is only for
76
+ NEW editing intent on an already READY draft, and uses skill_id gate-check, never an author
77
+ skill ID or a host skill alias. After saving, follow the returned continuation once.
78
+
79
+
72
80
  A ready draft without new editing intent is presented unchanged. Explicit ready-draft revision uses
73
81
  gate-check intake true, intake_mode resume, exact run_id/expected_revision_id and tp_action revise
74
82
  (CLI --tp-action revise), exclusive of other source actions and continue_delivery. Approved changes
@@ -42,7 +42,7 @@ For `phase: ur_definition`, use only the returned governance_target, run_id, rev
42
42
  template_path is the absolute, version-matched template owned by the installed plugin runtime.
43
43
  Repository copies under `.agdf/control/templates/` are derived scaffold references and never
44
44
  override this authoring source. Read the template without rewriting it; persist only artifact_path.
45
- A direct invocation first dispatches ur-definition; without a bound run follow the existing
45
+ An already returned bound `ur_definition` continuation satisfies entry: consume its authoring inputs and writer forms directly. Do not repeat author dispatch or intake for that same snapshot. A direct invocation without such a continuation first dispatches ur-definition; without a bound run follow the existing
46
46
  resolve_delivery_run assignment, then gate-check intake/resume with its expected_revision_id.
47
47
  Never use AGDF_RUN_ID, cwd, discovery or a previous approval as authority. Missing, stale,
48
48
  foreign, invalid or approved bindings require fresh control routing; do not write.
@@ -104,7 +104,7 @@ follows its current-request language contract and does not change the artefact l
104
104
 
105
105
  Before recording a complete draft, when `approval_summary_required` is true, include exactly
106
106
  one `## <approval_summary_heading>` section using the supplied heading verbatim. Write a
107
- complete summary in the resolved presentation language covering problem, goal, affected users,
107
+ complete summary in the resolved presentation language. Read `approval_summary_format.required_fields` from authoring-inputs: those exact list field declarations need concrete authored values; prose or a heading alone is not a named field. Cover problem, goal, affected users,
108
108
  scope, non-goals, acceptance signals, source ownership, risks/unknowns and next step.
109
109
  Do not truncate decision-relevant content or use ellipses. The existing approval renderer's
110
110
  limits and validation apply. This summary is editorial; the UR remains authoritative.
@@ -116,9 +116,13 @@ is required merely to complete an unapproved incomplete draft.
116
116
 
117
117
  A new draft is recorded through existing run-step --step ur --title <short title>, using
118
118
  --dir <governance_target> --run <run_id> --revision <revision_id>.
119
- For an already registered unapproved draft, require explicit user revision intent. Resume
120
- through gate-check with intake true, intake_mode resume, run_id, expected_revision_id and
121
- ur_action revise (CLI --ur-action revise). Ordinary intake of a ready draft still presents it.
119
+ When this bound continuation returns a registered, incomplete unapproved draft, correct its
120
+ readiness gaps directly through the supplied `ur_draft.replace` form. The existing authoring
121
+ route already covers completing that same need; do not open another intake or dispatch.
122
+ A deliberate change to an already READY registered draft outside that continuation still
123
+ requires explicit user revision intent: enter via gate-check with intake true, intake_mode
124
+ resume, run_id, expected_revision_id and ur_action revise (CLI --ur-action revise).
125
+ Ordinary intake of a ready draft still presents it. Never substitute a field named revision.
122
126
  Stage the replacement and use ur_draft.replace with the current binding. The writer
123
127
  publishes the document and typed evidence atomically. Never edit bound bytes, reseal
124
128
  an unknown change or alter an approved UR or its approval.
@@ -63,12 +63,14 @@ and approved as PRD content. Technical storage, derivation and component ownersh
63
63
  - requested clarification deliverables, preview scenarios, interaction needs and timing in UR scope;
64
64
  - post-UR `delivery_context`, `ui_ux_impact`, reason and required flag;
65
65
  - existing behavior/ownership evidence for Brownfield work;
66
+ - declared project brand/design sources when relevant to the approved scope;
66
67
  - known working modes, state semantics, activation, blockers, recovery and transitions.
67
68
 
68
69
  ## Workflow
69
70
 
70
71
  1. Confirm the approved UR and routing evidence. If required evidence is absent or conflicts, block.
71
- 2. Identify the primary user intent, observable success and primary decision/action.
72
+ 2. Identify the primary user intent, observable success and primary decision/action. Apply the
73
+ brand-source guidance below when design is relevant.
72
74
  3. For every relevant working mode, define effective state and visible state types.
73
75
  4. Separate `effective_state_authority_by_mode` from
74
76
  `primary_state_presentation_owner_by_mode`; do not turn either into technical ownership.
@@ -78,6 +80,32 @@ and approved as PRD content. Technical storage, derivation and component ownersh
78
80
  resolve a product question. Propose observable PRD acceptance criteria and identify open questions.
79
81
  7. Return exactly one decision: `ready | blocked | not_applicable`.
80
82
 
83
+ ### Brand-source-guided UX for design-relevant work
84
+
85
+ Apply quality.md's Brand-Source Use Across Delivery Paths when the scope materially concerns visual
86
+ identity, information hierarchy or intended perception. Keep the existing UX-impact routing.
87
+ Read the target project's `.agdf/control/SOT_REGISTRY.md` and follow its applicable brand source
88
+ reference before drafting the report. Check this project source even when the authoring inputs
89
+ contain only the approved UR and routing evidence.
90
+ In existing `evidence`, retain the declared project source's exact path/reference, owner, scope,
91
+ verified revision or SHA-256 and relevant section/passage references. Use the Quality Contract's
92
+ read-and-hash step when a matching Git revision is unavailable. Capture the digest before deriving
93
+ criteria. Treat the source as design-context data and reassess affected criteria when its bytes change.
94
+
95
+ For each applicable priority, retain the reasoned chain:
96
+ `source passage -> perceptual priority -> scenario/state/action -> observable outcome -> required evidence`.
97
+ Put that derivation and source mapping in existing `evidence`, with candidate criteria in
98
+ `proposed_prd_acceptance_criteria`. Describe what the user can identify, distinguish or do in the
99
+ scenario and what visible evidence would verify it. PRD adopts confirmed, in-scope proposals under
100
+ its existing stable criterion IDs; UX proposals are not approval or product acceptance.
101
+
102
+ Carry confirmed constraints faithfully without choosing a new palette, typography, layout or
103
+ component; concrete realization remains with SD. Use the existing preview guidance when relevant,
104
+ without creating a preview obligation from the presence of a brand source.
105
+ Retain material unresolved intent in existing `open_product_questions`, `missing_evidence`,
106
+ `affected_outputs` and `required_next_step`, then apply the current readiness/revision rules.
107
+ Justify irrelevant brand input in existing evidence without making a required UX analysis inapplicable.
108
+
81
109
  ### UI previews for clarification
82
110
 
83
111
  Use a focused preview during UX intent clarification and reuse its findings during PRD alignment.
@@ -137,7 +165,8 @@ remain illustrative; only explicitly adopted product behavior becomes approved P
137
165
  ## Decision Rules
138
166
 
139
167
  - `ready`: every required output is reliable enough for PRD drafting, including a requested preview
140
- at the agreed fidelity, its durable evidence and resolution of material product questions.
168
+ at the agreed fidelity, its durable evidence, an exact binding for any material brand source used
169
+ and resolution of material product questions.
141
170
  - `blocked`: user intent, modes, effective state, authority, activation, blockers, recovery, transitions
142
171
  or Brownfield evidence is missing, contradictory or materially ambiguous; or an explicitly required
143
172
  preview, requested interaction, durable copy or decision-relevant observation remains missing.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "AI Governance & Delivery Framework (AGDF) is a governance framework for agentic work. Its first implementation provides a control layer for governed AI-assisted software delivery. It combines workflow skills, explicit gates, control templates and machine-readable repository checks to keep work aligned with approved scope and make evidence a prerequisite for consequential gate transitions. Supported workflows include brownfield analysis, task-plan review, QA decisions, durable run state and auditable delivery closeout. AGDF is an independent open-source project, not a security sandbox, compliance certification or autonomous release system.",
5
5
  "keywords": [
6
6
  "agentic",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Control layer for governed AI-assisted delivery.",
5
5
  "author": {
6
6
  "name": "Arndt Gold",
@@ -0,0 +1,117 @@
1
+ // Companion events (companion core SDD-007, decision P1): reads the MCP server's journal of final AGDF
2
+ // tool results (`companion-event/1`, written below the plugin data root) and turns the events of the
3
+ // current project root into toasts and pane entries. The journal is a notification channel only: the
4
+ // run view stays the source of every run state, and the companion never invents an event. It imports
5
+ // no Core module; the format is the versioned journal format of SDD-009.
6
+
7
+ export const EVENT_POLL_MS = 2_000;
8
+ export const EVENT_SCHEMA = 'companion-event/1';
9
+ export const JOURNAL_FILE = 'events.jsonl';
10
+ // The writer's one rotation file; read only when the cursor left the current file (CR finding B6).
11
+ export const JOURNAL_ROTATED_FILE = 'events.1.jsonl';
12
+ // The writer bounds the journal to 256 KiB; a larger file is not read (bounded read).
13
+ export const JOURNAL_READ_LIMIT = 512 * 1024;
14
+ export const EVENT_KINDS = Object.freeze(['approval_requested', 'approval_recorded', 'write_rejected', 'effect_unknown',
15
+ 'recovery_required', 'run_completed', 'material_staged', 'document_recorded']);
16
+ // Decision P1: these interrupt as a toast; approval recorded and write rejected stay in the pane.
17
+ export const TOAST_KINDS = Object.freeze(['approval_requested', 'effect_unknown', 'recovery_required', 'run_completed']);
18
+ // Durable facts are confirmed against the run view before they are shown as final (SD 2, CR finding B4).
19
+ export const CONFIRMED_KINDS = Object.freeze(['approval_recorded', 'run_completed']);
20
+ // Uncertain outcomes stay in the pane past the next turn until the run state recorded a later
21
+ // operation (PRD state transition "effect unknown or recovery required", CR finding B7).
22
+ export const STICKY_KINDS = Object.freeze(['effect_unknown', 'recovery_required']);
23
+ export const PANE_EVENTS = 5;
24
+
25
+ export const journalDirectory = dataDir => `${dataDir}/companion`;
26
+
27
+ // Whether the run view confirms an event's durable fact: the run completed, or the approved gate is
28
+ // fulfilled on its path. Other kinds need no confirmation. `runs` are the companion's runs.
29
+ export function isConfirmed(event, runs = []) {
30
+ if (!CONFIRMED_KINDS.includes(event.kind)) return true;
31
+ const run = runs.find(item => item.id === event.run_id);
32
+ if (!run) return false;
33
+ if (event.kind === 'run_completed') return run.lifecycle === 'completed';
34
+ return (run.path ?? []).some(step => step.gate === event.gate && step.status === 'fulfilled');
35
+ }
36
+
37
+ // Whether an uncertain outcome still stands: its run recorded no later operation in the run view.
38
+ export function isStillUncertain(event, runs = []) {
39
+ if (!STICKY_KINDS.includes(event.kind)) return false;
40
+ const run = runs.find(item => item.id === event.run_id);
41
+ return !run?.updatedAt || run.updatedAt <= event.at;
42
+ }
43
+
44
+ // One journal text as its valid events in file order; interleaved, cut or foreign lines are skipped.
45
+ export function parseJournal(text) {
46
+ const events = [];
47
+ for (const line of String(text ?? '').split('\n')) {
48
+ if (!line.trim()) continue;
49
+ try {
50
+ const value = JSON.parse(line);
51
+ if (value?.schema_version === EVENT_SCHEMA && EVENT_KINDS.includes(value.kind) && typeof value.id === 'string' && typeof value.at === 'string') events.push(value);
52
+ } catch { /* an interleaved or cut line */ }
53
+ }
54
+ return events;
55
+ }
56
+
57
+ // Roots compare after normalizing separators and a trailing separator, and case for a drive path.
58
+ export function normalizeRoot(root) {
59
+ const text = String(root ?? '').replaceAll('\\', '/').replace(/\/+$/u, '');
60
+ // Windows roots (drive letter or UNC) compare without case, like Core's sameRoot on win32 (CR finding CIR-04).
61
+ return /^(?:[a-z]:(?:\/|$)|\/\/)/iu.test(text) ? text.toLowerCase() : text;
62
+ }
63
+ export const sameRoot = (left, right) => Boolean(left) && Boolean(right) && normalizeRoot(left) === normalizeRoot(right);
64
+
65
+ // The events of `root` after the cursor ({ id, at } of the last event seen in the file). Without a
66
+ // cursor the read is a baseline: nothing is fresh. A cursor that left the file (rotation) falls back
67
+ // to the event time.
68
+ export function unseenEvents(events, { root, cursor }) {
69
+ const last = events.at(-1);
70
+ const next = last ? { id: last.id, at: last.at } : cursor;
71
+ if (!cursor) return { fresh: [], cursor: next };
72
+ const at = events.findIndex(event => event.id === cursor.id);
73
+ const after = at >= 0 ? events.slice(at + 1) : events.filter(event => event.at > cursor.at);
74
+ return { fresh: after.filter(event => sameRoot(event.root, root)), cursor: next };
75
+ }
76
+
77
+ // A run id as people read it: a generated `run-<uuid>` id keeps its first block, a chosen id stays whole.
78
+ export const shortRunId = id => String(id ?? '').replace(/^(run-[0-9a-f]{8})(?:-[0-9a-f]{4}){3}-[0-9a-f]{12}$/u, '$1');
79
+
80
+ // The name an event line gives its run, or null for the run the panel shows: the panel already names
81
+ // that run, so its events carry no second id (owner request of 2026-11-06, T-013). Another run is
82
+ // named by its objective from the run view, else by its short id. `naming` is { shownRunId, runs }.
83
+ export function eventRunLabel(runId, { shownRunId = null, runs = [] } = {}) {
84
+ if (!runId || runId === shownRunId) return null;
85
+ const objective = runs.find(item => item.id === runId)?.objective;
86
+ return typeof objective === 'string' && objective.trim() ? objective.trim() : shortRunId(runId);
87
+ }
88
+
89
+ // An event text with the name of a run other than the shown one after it, so a cut line keeps the event.
90
+ export function namedEventText(text, runId, t, naming = {}) {
91
+ const run = eventRunLabel(runId, naming);
92
+ return run ? t('events.ofRun', { text, run }) : text;
93
+ }
94
+
95
+ // The text of one event; gate titles and reasons come localized from the caller.
96
+ export function eventText(event, t, { gateTitle = gate => gate, shownRunId = null, runs = [] } = {}) {
97
+ const text = t(`events.${event.kind}`, { gate: event.gate ? gateTitle(event.gate) : '', reason: event.reason ?? '' });
98
+ return namedEventText(text, event.run_id, t, { shownRunId, runs });
99
+ }
100
+
101
+ const shortDigest = digest => (typeof digest === 'string' ? `${digest.slice(0, 15)}…` : '–');
102
+
103
+ // The review facts of the newest staging or recording event: summary, source match and the bounded
104
+ // preview (decision P2). Unknown values stay unavailable, never guessed.
105
+ export function latestReview(events, t) {
106
+ const event = events.find(item => Array.isArray(item.review) && item.review.length);
107
+ if (!event) return null;
108
+ const fact = event.review[0];
109
+ return {
110
+ summary: t('review.summary', { slot: fact.slot ?? event.gate ?? '', bytes: fact.bytes ?? '–', digest: shortDigest(fact.digest) }),
111
+ match: t(`review.${['match', 'mismatch', 'not_determinable'].includes(fact.source_match) ? fact.source_match : 'unavailable'}`),
112
+ preview: typeof fact.preview === 'string' ? fact.preview : null,
113
+ truncated: fact.truncated === true ? t('review.truncated') : null,
114
+ };
115
+ }
116
+
117
+ export { shortDigest };
@@ -13,7 +13,7 @@ export const ACCESSORY_BOUNDS = Object.freeze({
13
13
  wartet: { x: 8, y: 8, width: 32, height: 32 },
14
14
  blockiert: { x: 6, y: 6, width: 36, height: 36 },
15
15
  fertig: { x: 1, y: 1, width: 46, height: 46 },
16
- neutral: null,
16
+ bereit: null,
17
17
  });
18
18
  // The build accessory in region coordinates: a hammer swinging around the end of its handle between
19
19
  // the two angles (degrees, clockwise positive), and three bricks; strokes are at most 1.5 px wide.
@@ -28,7 +28,7 @@ const BODY = Object.freeze({
28
28
  wartet: { fill: '#E0A030', stroke: '#9A6A12' },
29
29
  blockiert: { fill: '#D9534F', stroke: '#8F2D2A' },
30
30
  fertig: { fill: '#3FA66A', stroke: '#23663F' },
31
- neutral: { fill: '#9AA3B2', stroke: '#5C6575' },
31
+ bereit: { fill: '#9AA3B2', stroke: '#5C6575' },
32
32
  });
33
33
  const INK = '#1F2430';
34
34
 
@@ -60,7 +60,7 @@ const MOUTH = Object.freeze({
60
60
  wartet: `<path d="M72 97 h16" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
61
61
  blockiert: `<path d="M70 101 q10 -9 20 0" fill="none" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
62
62
  fertig: `<path d="M68 93 q12 12 24 0" fill="none" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
63
- neutral: `<path d="M73 97 h14" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
63
+ bereit: `<path d="M73 97 h14" stroke="${INK}" stroke-width="3" stroke-linecap="round"/>`,
64
64
  });
65
65
 
66
66
  const MOTION = Object.freeze({
@@ -70,7 +70,7 @@ const MOTION = Object.freeze({
70
70
  wartet: '<animateTransform attributeName="transform" type="rotate" values="-4 80 124;4 80 124;-4 80 124" dur="2.6s" repeatCount="indefinite"/>',
71
71
  blockiert: '<animateTransform attributeName="transform" type="translate" values="0 0;-4 0;4 0;-4 0;4 0;0 0;0 0" keyTimes="0;0.04;0.08;0.12;0.16;0.2;1" dur="2.2s" repeatCount="indefinite"/>',
72
72
  fertig: '<animateTransform attributeName="transform" type="translate" values="0 0;0 0;0 -10;0 0" keyTimes="0;0.6;0.8;1" dur="2s" repeatCount="indefinite"/>',
73
- neutral: '',
73
+ bereit: '',
74
74
  });
75
75
 
76
76
  // Drawn in region coordinates (0..48); ACCESSORY_BOUNDS states each extent.
@@ -108,7 +108,7 @@ function accessory(mood, isMoving) {
108
108
  return '';
109
109
  }
110
110
 
111
- // mood: one of the five moods or 'neutral' (no run assigned, status unreadable).
111
+ // mood: one of the six moods; bereit also stands for no run assigned or an unreadable status.
112
112
  export function figureSvg(mood, { still = false, title = '' } = {}) {
113
113
  const isMoving = !still;
114
114
  const { fill, stroke } = BODY[mood];
@@ -133,5 +133,5 @@ export const FIGURE_TEXT = Object.freeze({
133
133
  wartet: '(-_-) ⧗',
134
134
  blockiert: '(x_x) !',
135
135
  fertig: '(^_^) ✓',
136
- neutral: '(·_·)',
136
+ bereit: '(·_·)',
137
137
  });
@@ -1,41 +1,23 @@
1
1
  // Single-line gate bar (SDD-02, AC-001, AC-003): ✓ done, ● current, ○ open, without separators. It
2
- // follows the status card's path for the run's route and adds the build phase as `CD+Tests` between
3
- // TP and QA on structured paths. Below the width the full bar needs, a condensed form keeps every
4
- // mark and still names the current gate.
2
+ // draws the status card's own path from the run view (SD SDD-001) and adds the build phase as
3
+ // `CD+Tests` between TP and QA on structured paths. Below the width the full bar needs, a condensed
4
+ // form keeps every mark and still names the current gate.
5
5
 
6
6
  import { BUILD_GATES, isStructured } from './run-state.mjs';
7
7
 
8
8
  const GLYPH = Object.freeze({ done: '✓', current: '●', open: '○' });
9
- const STRUCTURED = Object.freeze(['UR', 'PRD', 'SD', 'TP', 'QA', 'UAT', 'OR']);
10
- // The status card's paths (`BREADCRUMB_PATH_TEMPLATES`, gate-check.js); parity-tested.
11
- export const PATHS = Object.freeze({
12
- structured_delivery: STRUCTURED,
13
- structured_slice: STRUCTURED,
14
- verified_change: Object.freeze(['UR', 'Verified Change', 'OR']),
15
- quick_task: Object.freeze(['UR', 'Compact Delivery']),
16
- block: Object.freeze(['UR', 'Block']),
17
- undecided: Object.freeze(['UR']),
18
- });
19
9
  export const BUILD_MARK = 'CD+Tests';
20
- const USER_GATES = new Set(['UR', 'PRD', 'SD', 'TP', 'QA', 'UAT']);
10
+ // The status card's breadcrumb states; a blocked gate is the current one.
11
+ const MARK = Object.freeze({ fulfilled: 'done', current: 'current', blocked: 'current', open: 'open' });
21
12
  const AFTER_BUILD = new Set(['QA', 'UAT', 'OR']);
22
- const COMPACT = Object.freeze({ 'Verified Change': 'verified_change', 'Compact Delivery': 'quick_task', Block: 'block' });
23
-
24
- // One path entry's mark as `buildBreadcrumbPath` derives it; a completed run at OR has its closeout.
25
- function cardMark(gate, run) {
26
- if (USER_GATES.has(gate)) return run.approved.includes(gate) ? 'done' : gate === run.gate ? 'current' : 'open';
27
- if (gate === 'OR' && run.gate === 'OR' && run.lifecycle === 'completed') return 'done';
28
- if (gate === run.gate) return 'current';
29
- if ((gate === 'Verified Change' || gate === 'Compact Delivery') && run.gate === 'OR') return 'done';
30
- return Object.hasOwn(COMPACT, gate) && COMPACT[gate] === run.route ? 'current' : 'open';
31
- }
32
13
 
33
14
  export function gateMarks(run) {
34
- const path = Object.hasOwn(PATHS, run.route) ? PATHS[run.route] : PATHS.undecided;
35
- const marks = path.map(gate => ({ gate, mark: cardMark(gate, run) }));
36
- if (!isStructured(run.route)) return marks;
15
+ const path = run.path ?? [];
16
+ const marks = path.map(({ gate, status }) => ({ gate, mark: MARK[status] ?? 'open' }));
17
+ const qa = marks.findIndex(({ gate }) => gate === 'QA');
18
+ if (!isStructured(run.route) || qa < 0) return marks;
37
19
  const build = BUILD_GATES.includes(run.gate) ? 'current' : AFTER_BUILD.has(run.gate) || run.lifecycle === 'completed' ? 'done' : 'open';
38
- marks.splice(path.indexOf('QA'), 0, { gate: BUILD_MARK, mark: build });
20
+ marks.splice(qa, 0, { gate: BUILD_MARK, mark: build });
39
21
  return marks;
40
22
  }
41
23
 
@@ -1,8 +1,7 @@
1
- // Localization (SDD-05, AC-005) with the existing AGDF data: the chat language from config.json,
2
- // gate titles and next-step values from meta/agdf-interaction-locales.json (the registry), and the
3
- // companion's own labels from companion/locales.json. Mirrors resolveConfiguredChatLanguage
4
- // (packages/core/lib/resources/context.js) and localizedOperationalValue
5
- // (packages/core/lib/interaction-presentation.js); parity tests keep them equal.
1
+ // Localization (SDD-05, AC-005; SD SDD-004) with the existing AGDF data: the chat language from
2
+ // config.json and every text from meta/agdf-interaction-locales.json (the registry): gate titles and
3
+ // the companion section. Next steps and blocking texts arrive localized in the run view. Mirrors
4
+ // resolveConfiguredChatLanguage (packages/core/lib/resources/context.js); parity tests keep it equal.
6
5
 
7
6
  const TAG = /^[A-Za-z]{2,8}(?:-[A-Za-z0-9]{1,8})*$/u;
8
7
 
@@ -25,7 +24,7 @@ export function resolveLocale(registry, requested) {
25
24
  }
26
25
 
27
26
  // Claude's own `language` setting is free text: a supported language tag (exact or base language)
28
- // or one of a locale's `languageNames` in the companion's locales.json, compared without case;
27
+ // or one of a locale's `languageNames` in the catalog's companion section, compared without case;
29
28
  // anything else names no locale (null).
30
29
  export function settingLocale(registry, labels, value) {
31
30
  const text = typeof value === 'string' ? value.trim() : '';
@@ -34,7 +33,7 @@ export function settingLocale(registry, labels, value) {
34
33
  if (tag && (registry.locales[tag] || registry.locales[tag.split('-')[0]])) return resolveLocale(registry, tag);
35
34
  const name = text.toLowerCase();
36
35
  const match = Object.entries(labels?.locales ?? {})
37
- .find(([locale, pack]) => registry.locales[locale] && (pack.languageNames ?? []).some(entry => entry.toLowerCase() === name));
36
+ .find(([locale, pack]) => registry.locales[locale] && Object.values(pack.languageNames ?? {}).some(entry => String(entry).toLowerCase() === name));
38
37
  return match?.[0] ?? null;
39
38
  }
40
39
 
@@ -53,31 +52,10 @@ export function gateTitle(registry, locale, gate) {
53
52
  return registry.locales[locale]?.gateTitles?.[gate] ?? registry.locales[registry.fallbackLocale]?.gateTitles?.[gate] ?? gate;
54
53
  }
55
54
 
56
- // The localized status-card value for a next-step source text, or the source text itself
57
- // ({ text, isLocalized }); an empty or "none" value becomes the pack's "none".
58
- export function localizeNextStep(registry, locale, value) {
59
- const source = String(value ?? '').trim();
60
- const pack = registry.locales[locale];
61
- const fallback = registry.locales[registry.fallbackLocale];
62
- if (!source || source === 'none') return { text: pack.primary.none, isLocalized: true };
63
- if (locale === registry.fallbackLocale) return { text: source, isLocalized: true };
64
- const groups = [
65
- [fallback.operationalValues, pack.operationalValues],
66
- [fallback.primary.actions, pack.primary.actions],
67
- [fallback.primary.afterApproval, pack.primary.afterApproval],
68
- ];
69
- for (const [sources, targets] of groups) {
70
- for (const [key, text] of Object.entries(sources ?? {})) {
71
- if (text === source) {
72
- const localized = String(targets?.[key] ?? '').trim();
73
- return localized ? { text: localized, isLocalized: true } : { text: source, isLocalized: false };
74
- }
75
- }
76
- }
77
- if (fallback.primary.quality === source && String(pack.primary.quality ?? '').trim()) {
78
- return { text: pack.primary.quality.trim(), isLocalized: true };
79
- }
80
- return { text: source, isLocalized: false };
55
+ // The companion's labels: the catalog's companion section per locale, in the shape label() reads.
56
+ export function companionLabels(registry) {
57
+ return { fallbackLocale: registry.fallbackLocale,
58
+ locales: Object.fromEntries(Object.entries(registry.locales).map(([locale, pack]) => [locale, pack.companion ?? {}])) };
81
59
  }
82
60
 
83
61
  // A companion label by dotted path with {name} parameters; missing keys fall back to the
@@ -14,12 +14,13 @@ const NOTICE_MOODS = new Set(['wartet', 'blockiert']);
14
14
  // mention: the chat's named run (chat-run navigation SDD-06); browsing never changes what is observed.
15
15
  export function observedRun({ snapshot, sessionStartedAt, selection = null, mention = null }) {
16
16
  if (!snapshot) return { kind: 'idle' };
17
- if (snapshot.status === 'failed') return { kind: 'unreadable' };
17
+ if (snapshot.status === 'failed' || snapshot.status === 'unavailable') return { kind: 'unreadable' };
18
18
  if (snapshot.status !== 'ok') return { kind: 'idle' };
19
19
  const { run } = assignRun({ runs: snapshot.runs, sessionStartedAt, selection, mention });
20
20
  if (!run) return selection && snapshot.unreadable.some(item => item.id === selection) ? { kind: 'unreadable' } : { kind: 'idle' };
21
- const state = runState(run);
22
- return state.mood === null ? { kind: 'unreadable' } : { kind: 'run', runId: run.id, state };
21
+ const figure = runState(run);
22
+ // The blocking text arrives localized in the run view; the signature keeps the code.
23
+ return { kind: 'run', runId: run.id, state: { ...figure, reason: { ...figure.reason, decisionText: run.blockingText || undefined } } };
23
24
  }
24
25
 
25
26
  const signature = ({ mood, reason }) => [mood, reason.key, reason.gate ?? '', reason.decision ?? ''].join('|');
@@ -35,11 +36,12 @@ export function observeNotice(previous, observed) {
35
36
  return { observation, notice: changed && NOTICE_MOODS.has(observed.state.mood) ? observed.state : null };
36
37
  }
37
38
 
38
- // The toast for a notice, e.g. "<run> wartet auf Freigabe: Qualitätssicherung".
39
- export function noticeText(runId, state, { registry, labels, locale }) {
39
+ // The toast for a notice, e.g. "Wartet auf Freigabe: Qualitätssicherung". A notice always concerns
40
+ // the run the status line follows, so it names no run (owner request of 2026-11-06, T-013).
41
+ export function noticeText(state, { registry, labels, locale }) {
40
42
  const t = (path, params) => label(labels, locale, path, params);
41
- const params = { run: runId, gate: gateTitle(registry, locale, state.reason.gate) };
42
- if (state.reason.decision) params.decision = t(`decisions.${state.reason.decision}`);
43
+ const params = { gate: gateTitle(registry, locale, state.reason.gate) };
44
+ if (state.reason.decision) params.decision = state.reason.decisionText ?? state.reason.decision;
43
45
  return t(`notices.${state.reason.key}`, params);
44
46
  }
45
47
 
@@ -47,7 +49,7 @@ export function noticeText(runId, state, { registry, labels, locale }) {
47
49
  export function statusText(observed, { labels, locale }) {
48
50
  const t = path => label(labels, locale, path);
49
51
  if (observed.kind === 'unreadable') return `AGDF · ${t('statusStates.unreadable')}`;
50
- if (observed.kind !== 'run') return `AGDF · ${t('statusStates.neutral')}`;
52
+ if (observed.kind !== 'run') return `AGDF · ${t('statusStates.bereit')}`;
51
53
  const { mood, reason } = observed.state;
52
54
  return mood === 'fertig' || !reason.gate ? `AGDF · ${t(`statusStates.${mood}`)}` : `AGDF · ${reason.gate} · ${t(`statusStates.${mood}`)}`;
53
55
  }