create-agdf 0.13.8 → 0.14.2

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 (134) hide show
  1. package/README.md +14 -10
  2. package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
  3. package/generated/plugins/agdf/.codex-plugin/plugin.json +2 -4
  4. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +26 -2
  5. package/generated/plugins/agdf/meta/copilot-payload-baseline.json +7 -0
  6. package/generated/plugins/agdf/runtime/agdf-local.js +1 -1
  7. package/generated/plugins/agdf/runtime/agdf-session-check.js +10 -5
  8. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +26 -2
  9. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +6 -7
  10. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/local-validator.js +29 -17
  11. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +50 -1
  12. package/generated/plugins/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +3 -1
  13. package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
  14. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  15. package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +32 -3
  16. package/generated/plugins/agdf/submission/openai/availability.md +1 -1
  17. package/generated/plugins/agdf/submission/openai/capability-matrix.json +1 -1
  18. package/generated/plugins/agdf/submission/openai/release-notes.md +1 -1
  19. package/generated/plugins/agdf/submission/openai/reviewer-cases.json +1 -1
  20. package/generated/plugins/copilot/agdf/.agdf-payload-inventory.json +771 -0
  21. package/generated/plugins/copilot/agdf/LICENSE +201 -0
  22. package/generated/plugins/copilot/agdf/hooks/copilot-hooks.json +15 -0
  23. package/generated/{AGENTS.md → plugins/copilot/agdf/meta/agdf-agent-router.md} +49 -33
  24. package/generated/plugins/copilot/agdf/meta/agdf-constitution.md +329 -0
  25. package/generated/plugins/copilot/agdf/meta/agdf-plugin.definition.json +331 -0
  26. package/generated/plugins/copilot/agdf/meta/agdf-runtime-contract.md +16 -0
  27. package/generated/plugins/copilot/agdf/plugin.json +22 -0
  28. package/generated/plugins/copilot/agdf/runtime/agdf-local.js +18 -0
  29. package/generated/plugins/copilot/agdf/runtime/agdf-session-check.js +97 -0
  30. package/generated/plugins/copilot/agdf/runtime/create-agdf/NOTICE +10 -0
  31. package/generated/plugins/copilot/agdf/runtime/create-agdf/bin/agdf-validator.js +11 -0
  32. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +512 -0
  33. package/generated/plugins/copilot/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +331 -0
  34. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/command-registry.js +144 -0
  35. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +139 -0
  36. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/parse-args.js +173 -0
  37. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/runtime-context.js +83 -0
  38. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +46 -0
  39. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/delivery-map.js +301 -0
  40. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/doctor.js +272 -0
  41. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +455 -0
  42. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/gate-policy.js +305 -0
  43. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/parent-reconciliation.js +284 -0
  44. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/required-files.js +9 -0
  45. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/run-state.js +217 -0
  46. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/shared.js +345 -0
  47. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-evaluation/verified-change.js +156 -0
  48. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/aggregate.js +18 -0
  49. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/gate-approval-validator.js +49 -0
  50. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/index.js +7 -0
  51. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/legacy-migration.js +95 -0
  52. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js +265 -0
  53. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +68 -0
  54. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-resolver.js +45 -0
  55. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +97 -0
  56. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/candidate-policy.js +99 -0
  57. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/contracts.js +237 -0
  58. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +35 -0
  59. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +44 -0
  60. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +234 -0
  61. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/prompt.js +13 -0
  62. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +13 -0
  63. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +40 -0
  64. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +38 -0
  65. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +12 -0
  66. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/persistence.js +39 -0
  67. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/scoring.js +21 -0
  68. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/search-engine.js +155 -0
  69. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/state-adapter.js +161 -0
  70. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +27 -0
  71. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +43 -0
  72. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/interaction-presentation.js +842 -0
  73. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/local-validator.js +239 -0
  74. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/plugin-provenance.js +255 -0
  75. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime/validator-application.js +40 -0
  76. package/generated/plugins/copilot/agdf/runtime/create-agdf/lib/runtime-check-consent/contract.js +73 -0
  77. package/generated/plugins/copilot/agdf/runtime/create-agdf/package.json +6 -0
  78. package/generated/plugins/copilot/agdf/runtime/runtime-manifest.json +8 -0
  79. package/generated/submissions/openai/agdf/.codex-plugin/plugin.json +1 -2
  80. package/generated/submissions/openai/agdf/meta/agdf-plugin.definition.json +26 -2
  81. package/generated/submissions/openai/agdf/meta/copilot-payload-baseline.json +7 -0
  82. package/generated/submissions/openai/agdf/submission/openai/availability.md +1 -1
  83. package/generated/submissions/openai/agdf/submission/openai/capability-matrix.json +1 -1
  84. package/generated/submissions/openai/agdf/submission/openai/inventory.json +13 -9
  85. package/generated/submissions/openai/agdf/submission/openai/listing.json +1 -1
  86. package/generated/submissions/openai/agdf/submission/openai/readiness.json +2 -2
  87. package/generated/submissions/openai/agdf/submission/openai/readiness.md +2 -2
  88. package/generated/submissions/openai/agdf/submission/openai/release-notes.md +1 -1
  89. package/generated/submissions/openai/agdf/submission/openai/reviewer-cases.json +1 -1
  90. package/lib/cli/application.js +64 -8
  91. package/lib/cli/command-registry.js +6 -7
  92. package/lib/installers/copilot-precedence.js +34 -0
  93. package/lib/installers/copilot-settings.js +84 -0
  94. package/lib/installers/local-marketplace.js +112 -30
  95. package/lib/installers/plugin-installers.js +184 -5
  96. package/lib/lifecycle/operations.js +3 -0
  97. package/lib/lifecycle/result.js +1 -0
  98. package/lib/lifecycle/status.js +3 -3
  99. package/lib/public-plugin/copilot-profile.js +126 -0
  100. package/lib/public-plugin/manifest.js +34 -2
  101. package/lib/public-plugin/validator.js +1 -1
  102. package/lib/release/version-coherence.js +4 -0
  103. package/lib/runtime/local-validator.js +29 -17
  104. package/lib/runtime/plugin-provenance.js +50 -1
  105. package/lib/runtime-check-consent/contract.js +3 -1
  106. package/lib/runtime-check-consent/coordinator.js +1 -0
  107. package/lib/runtime-check-consent/service.js +1 -1
  108. package/lib/runtime-check-consent/state.js +3 -3
  109. package/lib/scaffold/plan.js +3 -89
  110. package/lib/scaffold/presentation.js +3 -22
  111. package/package.json +6 -3
  112. package/generated/.github/copilot-instructions.md +0 -16
  113. package/generated/.github/instructions/agdf-governance.instructions.md +0 -14
  114. package/generated/.github/skills/README.md +0 -20
  115. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-brownfield-analysis/SKILL.md +0 -0
  116. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-clean-implementation-review/SKILL.md +0 -0
  117. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-code-review/SKILL.md +0 -0
  118. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-delivery-closeout/SKILL.md +0 -0
  119. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-delivery-path-search/SKILL.md +0 -0
  120. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-gate-check/SKILL.md +0 -0
  121. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-interaction-locales.json +0 -0
  122. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-qa-gate/SKILL.md +0 -0
  123. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-release-or/SKILL.md +0 -0
  124. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-runtime-contract.md +0 -0
  125. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-task-plan-review/SKILL.md +0 -0
  126. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/agdf-ux-intent-definition/SKILL.md +0 -0
  127. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/closeout.md +0 -0
  128. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/context-graph.md +0 -0
  129. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/control-scaffold.md +0 -0
  130. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/gate-transition.md +0 -0
  131. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/interaction.md +0 -0
  132. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/modes.md +0 -0
  133. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/quality.md +0 -0
  134. /package/generated/{.github/skills → plugins/copilot/agdf/copilot-skills}/contracts/task-target-resolution.md +0 -0
@@ -0,0 +1,331 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "id": "agdf",
4
+ "version": "0.14.2",
5
+ "displayName": "AI Governance & Delivery Framework",
6
+ "developerName": "Arndt Gold",
7
+ "description": "Control layer for governed AI-assisted delivery.",
8
+ "longDescription": "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.",
9
+ "homepage": "https://agdf.iself.eu",
10
+ "repository": "https://github.com/arndtgold/ai-native-governance-delivery-framework",
11
+ "license": "Apache-2.0",
12
+ "keywords": [
13
+ "agentic",
14
+ "governance",
15
+ "delivery",
16
+ "ai-native",
17
+ "brownfield"
18
+ ],
19
+ "category": "Productivity",
20
+ "brandColor": "#14B8A6",
21
+ "author": {
22
+ "name": "Arndt Gold",
23
+ "url": "https://agdf.iself.eu"
24
+ },
25
+ "codex": {
26
+ "skills": "./skills/",
27
+ "skillPrefix": "",
28
+ "agentRouter": "meta/agdf-agent-router.md",
29
+ "composerIcon": "./assets/agdf-icon.svg",
30
+ "logo": "./assets/agdf-logo.svg",
31
+ "capabilities": [
32
+ "Read",
33
+ "Write"
34
+ ],
35
+ "defaultPrompt": [
36
+ "Assess whether AGDF fits this request and recommend the lightest safe path before proposing implementation.",
37
+ "Start this request under AGDF governance.",
38
+ "Close this delivery run with an auditable AGDF report."
39
+ ],
40
+ "hooks": "hooks/hooks.json"
41
+ },
42
+ "claude": {
43
+ "skillPrefix": "",
44
+ "agentRouter": "meta/agdf-agent-router.md",
45
+ "defaultPrompt": [
46
+ "Assess whether AGDF fits this request and recommend the lightest safe path before proposing implementation.",
47
+ "Start this request under AGDF governance.",
48
+ "Close this delivery run with an auditable AGDF report."
49
+ ]
50
+ },
51
+ "copilot": {
52
+ "skillPrefix": "agdf-",
53
+ "runtimeContractFileName": "agdf-runtime-contract.md",
54
+ "pluginManifest": "plugin.json",
55
+ "skills": "copilot-skills/",
56
+ "hooks": "hooks/copilot-hooks.json"
57
+ },
58
+ "opencode": {
59
+ "skillPrefix": "agdf-",
60
+ "globalSkillPrefix": "agdf-global-",
61
+ "evaluatorAgentName": "agdf-evaluator",
62
+ "runtimeContractFileName": "agdf-runtime-contract.md",
63
+ "instructionsFileName": "AGDF.md",
64
+ "npmPackage": "create-agdf",
65
+ "permissions": {
66
+ "question": "allow",
67
+ "edit": "ask",
68
+ "bash": "ask",
69
+ "skill": {
70
+ "agdf-*": "allow"
71
+ }
72
+ }
73
+ },
74
+ "automaticRuntimeChecks": {
75
+ "schemaVersion": 1,
76
+ "capabilityId": "automatic-runtime-checks",
77
+ "adapterContractVersion": 1,
78
+ "entrypoint": "runtime/agdf-session-check.js",
79
+ "operations": [
80
+ "resolve-local-runtime",
81
+ "inspect-control-state",
82
+ "render-bounded-orientation"
83
+ ],
84
+ "constraints": {
85
+ "arguments": "forbidden",
86
+ "filesystemWrites": "forbidden",
87
+ "network": "forbidden",
88
+ "gateAuthority": "none"
89
+ },
90
+ "surfaces": {
91
+ "codex": "native-hook-review",
92
+ "claude": "exact-command-rule",
93
+ "copilot": "plugin-hook-review",
94
+ "opencode": "plugin-internal",
95
+ "portable-skills": "manual-external-required"
96
+ }
97
+ },
98
+ "interactions": {
99
+ "fallback": "exact_text",
100
+ "localeRegistry": "meta/agdf-interaction-locales.json",
101
+ "fallbackLocale": "en",
102
+ "optionOrder": [
103
+ "approve",
104
+ "revise",
105
+ "decline",
106
+ "cancel"
107
+ ],
108
+ "outcomes": [
109
+ "approve",
110
+ "revise",
111
+ "decline",
112
+ "cancel",
113
+ "no_response",
114
+ "timeout",
115
+ "empty",
116
+ "invalid",
117
+ "stale"
118
+ ],
119
+ "surfaces": {
120
+ "codex": {
121
+ "questionAdapter": "request_user_input",
122
+ "availability": "when_callable",
123
+ "gateSafety": "omit_auto_resolution",
124
+ "explicitOutcomes": [
125
+ "approve",
126
+ "revise",
127
+ "decline"
128
+ ],
129
+ "dismissOutcome": "cancel",
130
+ "approvalValueTransport": "exact_option_value",
131
+ "waitSafety": "deliberate_no_auto_resolution",
132
+ "authorizationPath": "exact_text",
133
+ "technicalPermissionOwner": "codex_host"
134
+ },
135
+ "claude": {
136
+ "questionAdapter": "AskUserQuestion",
137
+ "availability": "when_no_auto_continue_timeout",
138
+ "gateSafety": "no_timeout_or_hook_supplied_answer",
139
+ "explicitOutcomes": [
140
+ "approve",
141
+ "revise",
142
+ "decline"
143
+ ],
144
+ "dismissOutcome": "cancel",
145
+ "approvalValueTransport": "exact_option_value",
146
+ "waitSafety": "deliberate_no_auto_resolution",
147
+ "authorizationPath": "exact_text",
148
+ "technicalPermissionOwner": "claude_host"
149
+ },
150
+ "copilot": {
151
+ "questionAdapter": "exact_text",
152
+ "availability": "always",
153
+ "gateSafety": "wait_for_deliberate_user_input",
154
+ "explicitOutcomes": [
155
+ "approve",
156
+ "revise",
157
+ "decline",
158
+ "cancel"
159
+ ],
160
+ "approvalValueTransport": "exact_option_value",
161
+ "waitSafety": "deliberate_no_auto_resolution",
162
+ "authorizationPath": "exact_text",
163
+ "technicalPermissionOwner": "copilot_host"
164
+ },
165
+ "opencode": {
166
+ "questionAdapter": "question",
167
+ "availability": "when_permission_question_allows",
168
+ "gateSafety": "preserve_explicit_deny",
169
+ "explicitOutcomes": [
170
+ "approve",
171
+ "revise",
172
+ "decline"
173
+ ],
174
+ "dismissOutcome": "cancel",
175
+ "approvalValueTransport": "exact_option_value",
176
+ "waitSafety": "deliberate_no_auto_resolution",
177
+ "authorizationPath": "exact_text",
178
+ "technicalPermissionOwner": "opencode_host"
179
+ },
180
+ "fallback": {
181
+ "questionAdapter": "exact_text",
182
+ "availability": "always",
183
+ "gateSafety": "wait_for_deliberate_user_input",
184
+ "explicitOutcomes": [
185
+ "approve",
186
+ "revise",
187
+ "decline",
188
+ "cancel"
189
+ ],
190
+ "approvalValueTransport": "exact_option_value",
191
+ "waitSafety": "deliberate_no_auto_resolution",
192
+ "authorizationPath": "exact_text",
193
+ "technicalPermissionOwner": "host_specific"
194
+ }
195
+ }
196
+ },
197
+ "publicDistribution": {
198
+ "schemaVersion": 1,
199
+ "submissionType": "skills",
200
+ "technicalId": "agdf",
201
+ "publicDisplayName": "AGDF",
202
+ "fullDisplayName": "AI Governance & Delivery Framework (AGDF)",
203
+ "shortDescription": "Governed AI delivery controls",
204
+ "developerName": "Arndt Gold",
205
+ "publisher": {
206
+ "target": "Arndt Gold",
207
+ "verificationState": "unverified"
208
+ },
209
+ "category": "Productivity",
210
+ "urls": {
211
+ "website": "https://agdf.iself.eu",
212
+ "privacy": "https://agdf.iself.eu/privacy",
213
+ "terms": "https://agdf.iself.eu/terms",
214
+ "support": "https://agdf.iself.eu/support"
215
+ },
216
+ "defaultPrompt": [
217
+ "Assess whether AGDF fits this work and recommend the lightest safe delivery path.",
218
+ "Start this request under AGDF governance.",
219
+ "Review the active AGDF run and explain the next allowed step."
220
+ ],
221
+ "availability": {
222
+ "decisionState": "pending",
223
+ "countries": [],
224
+ "regions": [],
225
+ "workspaceContexts": [],
226
+ "decisionOwner": "verified publisher"
227
+ },
228
+ "submissionSources": {
229
+ "capabilityMatrix": "submission/openai/capability-matrix.json",
230
+ "reviewerCases": "submission/openai/reviewer-cases.json",
231
+ "releaseNotes": "submission/openai/release-notes.md",
232
+ "availabilityDecision": "submission/openai/availability.md"
233
+ }
234
+ },
235
+ "skillSet": [
236
+ {
237
+ "slug": "delivery-path-search",
238
+ "discovery": "optional",
239
+ "useFor": "high-impact planning decisions with several plausible next delivery steps before implementation",
240
+ "boundary": "read-only advisory search; never grants gate permission or replaces gate-check"
241
+ },
242
+ {
243
+ "slug": "brownfield-analysis",
244
+ "discovery": "automatic",
245
+ "useFor": "after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems",
246
+ "boundary": "clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission"
247
+ },
248
+ {
249
+ "slug": "ux-intent-definition",
250
+ "discovery": "automatic",
251
+ "useFor": "after approved UR and post-UR routing for medium/high UI/UX impact or ambiguous low-impact product semantics before PRD readiness",
252
+ "boundary": "non-authorizing analytical PRD input; never creates product intent, gate permission, technical design or a parallel product source of truth"
253
+ },
254
+ {
255
+ "slug": "clean-implementation-review",
256
+ "discovery": "automatic",
257
+ "useFor": "evidence dimension: inspect whether the solution is structurally clean",
258
+ "boundary": "supports Quality Readiness; not a TP or QA substitute"
259
+ },
260
+ {
261
+ "slug": "code-review",
262
+ "discovery": "automatic",
263
+ "useFor": "evidence dimension: review the actual diff for defects, regression and security findings",
264
+ "boundary": "supports Quality Readiness; does not replace QA"
265
+ },
266
+ {
267
+ "slug": "delivery-closeout",
268
+ "discovery": "automatic",
269
+ "useFor": "commit/PR-near handoff after QA/OR/UAT",
270
+ "boundary": "never performs VCS actions automatically"
271
+ },
272
+ {
273
+ "slug": "gate-check",
274
+ "discovery": "start_here",
275
+ "useFor": "new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested",
276
+ "boundary": "does not create later artefacts or skip Mode/Slice Decision after Brownfield Review"
277
+ },
278
+ {
279
+ "slug": "qa-gate",
280
+ "discovery": "automatic",
281
+ "useFor": "sole final Quality Readiness decision",
282
+ "boundary": "only instance for `pass | revise | block`"
283
+ },
284
+ {
285
+ "slug": "release-or",
286
+ "discovery": "automatic",
287
+ "useFor": "auditable closeout for every relevant run",
288
+ "boundary": "not a QA substitute"
289
+ },
290
+ {
291
+ "slug": "task-plan-review",
292
+ "discovery": "automatic",
293
+ "useFor": "evidence dimension: verify whether the approved Task Plan was fulfilled",
294
+ "boundary": "supports Quality Readiness; no final QA decision"
295
+ }
296
+ ],
297
+ "distributionProfiles": {
298
+ "schemaVersion": 1,
299
+ "marketplaceIdentities": {
300
+ "durable": "agdf",
301
+ "generatedRepository": "agdf-repo"
302
+ },
303
+ "profiles": {
304
+ "source-development": {
305
+ "runtime": "absent",
306
+ "installable": false,
307
+ "machineValidation": "unavailable"
308
+ },
309
+ "runtime-plugin": {
310
+ "runtime": "required",
311
+ "installable": true,
312
+ "machineValidation": "local_exact_version_digest"
313
+ },
314
+ "copilot-runtime-plugin": {
315
+ "runtime": "required",
316
+ "installable": true,
317
+ "machineValidation": "local_exact_version_digest_inventory"
318
+ },
319
+ "opencode-config-local": {
320
+ "runtime": "config_local_package",
321
+ "installable": true,
322
+ "machineValidation": "local_exact_version"
323
+ },
324
+ "portable-skills": {
325
+ "runtime": "absent",
326
+ "installable": true,
327
+ "machineValidation": "unavailable_or_external_required"
328
+ }
329
+ }
330
+ }
331
+ }
@@ -0,0 +1,144 @@
1
+ function command(name, usages) {
2
+ return Object.freeze({
3
+ name,
4
+ handler: name,
5
+ groups: Object.freeze(Object.keys(usages)),
6
+ usages: Object.freeze(Object.fromEntries(
7
+ Object.entries(usages).map(([group, suffixes]) => [group, Object.freeze(suffixes)]),
8
+ )),
9
+ });
10
+ }
11
+
12
+ export const commandRegistry = Object.freeze([
13
+ command("codex", { preferred: [""], scaffold: [""] }),
14
+ command("codex-repo", { preferred: [""], scaffold: [""] }),
15
+ command("claude", { preferred: [""], scaffold: [""] }),
16
+ command("copilot", { preferred: [""] }),
17
+ command("opencode", { preferred: [""], scaffold: [""] }),
18
+ command("opencode-status", { preferred: [""], scaffold: [""] }),
19
+ command("status", { preferred: [" [--surface <surface>] [--run <run_id>] [--json]"] }),
20
+ command("runtime-checks", { preferred: [" <status|enable|manual> --surface <codex|claude|copilot|opencode> [--json]"] }),
21
+ command("disable", { preferred: [" --surface <surface> [--scope repository] [--dir <path>]"] }),
22
+ command("uninstall", { preferred: [" --surface <surface> --scope global [--confirm]"] }),
23
+ command("opencode-repo", { preferred: [""], scaffold: [""] }),
24
+ command("init", { preferred: [""], scaffold: [""] }),
25
+ command("config", { scaffold: [" --language de"] }),
26
+ command("doctor", { local: [""], scaffold: [""], legacy: [" --json"] }),
27
+ command("gate-check", { local: [" --approval-envelope", " --json"], scaffold: [""], legacy: [" --json"] }),
28
+ command("delivery-map", { local: [" --json"], scaffold: [""] }),
29
+ command("delivery-path-search", {
30
+ local: [" --surface codex --json", " --surface claude --json", " --surface opencode --json"],
31
+ scaffold: [" --surface codex", " --surface claude", " --surface opencode"],
32
+ }),
33
+ command("run-create", { local: [" --run <run_id>"] }),
34
+ command("run-migrate", { local: [" [--run <run_id>]"] }),
35
+ command("run-render-legacy", { local: [" --run <run_id>"] }),
36
+ ]);
37
+
38
+ const commandByName = new Map(commandRegistry.map((entry) => [entry.name, entry]));
39
+
40
+ export function resolveCommand(name) {
41
+ return commandByName.get(name) ?? null;
42
+ }
43
+
44
+ export function supportedCommandNames() {
45
+ return commandRegistry.map((entry) => entry.name);
46
+ }
47
+
48
+ export function validateCommandOptions(options) {
49
+ if (options.allActive && !["doctor", "delivery-map"].includes(options.target)) {
50
+ throw new Error("--all-active is supported only by doctor and delivery-map");
51
+ }
52
+ if (options.target === "run-create" && (!options.runId || options.allActive)) {
53
+ throw new Error("run-create requires --run and rejects --all-active");
54
+ }
55
+ if (options.target === "run-render-legacy" && !options.runId) {
56
+ throw new Error("run-render-legacy requires --run");
57
+ }
58
+ if (["disable", "uninstall"].includes(options.target) && ["", "generic", undefined].includes(options.surface)) {
59
+ throw new Error(`${options.target} requires an explicit --surface`);
60
+ }
61
+ if (options.target === "disable" && options.scope && options.scope !== "repository") {
62
+ throw new Error("disable supports repository scope only");
63
+ }
64
+ if (options.target === "uninstall" && options.scope !== "global") {
65
+ throw new Error("uninstall requires explicit --scope global");
66
+ }
67
+ if (options.confirm && options.target !== "uninstall") throw new Error("--confirm is supported only by uninstall");
68
+ if (options.runtimeChecksDecision && !["codex", "claude", "copilot", "opencode"].includes(options.target)) {
69
+ throw new Error("--runtime-checks is supported only by codex, claude, copilot and opencode installation commands");
70
+ }
71
+ if (options.target === "runtime-checks" && !["codex", "claude", "copilot", "opencode"].includes(options.surface)) {
72
+ throw new Error("runtime-checks requires --surface codex, claude, copilot or opencode");
73
+ }
74
+ if (options.approvalEnvelope && options.target !== "gate-check") throw new Error("--approval-envelope is supported only by gate-check");
75
+ if (options.approvalEnvelope && (options.json || options.statusCard || options.allActive)) {
76
+ throw new Error("--approval-envelope cannot be combined with --json, --status-card or --all-active");
77
+ }
78
+ return options;
79
+ }
80
+
81
+ function usageLines(group, prefix) {
82
+ return commandRegistry
83
+ .flatMap((entry) => (entry.usages[group] ?? []).map((suffix) => ` ${prefix}${entry.name}${suffix}`))
84
+ .join("\n");
85
+ }
86
+
87
+ export function renderUsage() {
88
+ return `AGDF CLI
89
+
90
+ Operating model:
91
+ Chat/skill is the normal interaction surface.
92
+ .agdf/control is the durable source of truth.
93
+ The CLI validates, renders deterministic gate output and supports automation.
94
+
95
+ Repeated local validation (after global installation):
96
+ ${usageLines("local", "agdf ")}
97
+
98
+ Bootstrap, installation and explicit refresh:
99
+
100
+ Bootstrap and lifecycle commands:
101
+ ${usageLines("preferred", "npx --yes @agdf/cli@latest ")}
102
+
103
+ Advanced / Compatibility
104
+
105
+ Scaffold-compatible npm create usage:
106
+ ${usageLines("scaffold", "npm create agdf@latest -- ")}
107
+
108
+ Backward-compatible create-agdf usage:
109
+ ${usageLines("legacy", "npx --yes create-agdf@latest ")}
110
+
111
+ Options:
112
+ --dir <path> Write files into a specific directory. With opencode, use this as the OpenCode config directory.
113
+ --force Overwrite existing generated files
114
+ --language <tag>
115
+ Set AGDF chat and artefact language. Defaults to detected system locale.
116
+ --lang <tag> Alias for --language
117
+ --json Print machine-readable command output as JSON
118
+ --verbose Print captured host command output and generated-file details
119
+ --status-card Print compact gate-check status-card output for interactive use
120
+ --approval-envelope
121
+ Print the deterministic ready-gate cards and exact-text request
122
+ --run <run_id> Select one canonical run
123
+ --all-active Evaluate every active run (doctor and delivery-map only)
124
+ --surface <codex|claude|copilot|opencode|generic>
125
+ Declare the active Delivery Path Search surface
126
+ --scope <repository|global>
127
+ Select the lifecycle mutation scope
128
+ --confirm Apply a previously previewed global uninstall plan
129
+ --runtime-checks <enable|manual|cancel>
130
+ Make the installation-time automatic-check decision explicitly; no TTY defaults to manual
131
+ --fixture <path>
132
+ Use deterministic evaluator/candidate fixtures instead of a live evaluator
133
+ --persist Persist the redacted Delivery Path Search result under the current scope
134
+ --model <id> Optional Codex evaluator model
135
+ --generate-candidates
136
+ Add one bounded AI-native candidate-generation call before evaluation
137
+ --generator-model <id>
138
+ Optional candidate-generator model override
139
+ --max-generated-candidates <1-5>
140
+ --generation-timeout-ms <1-30000>
141
+ --generation-cost-units <1-5>
142
+ --help Show this help
143
+ `;
144
+ }
@@ -0,0 +1,139 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import { searchInputFromControl } from '../delivery-path-search/state-adapter.js';
3
+ import { runDeliveryPathSearch } from '../delivery-path-search/search-engine.js';
4
+ import { codexEvaluator } from '../delivery-path-search/evaluators/codex.js';
5
+ import { claudeEvaluator } from '../delivery-path-search/evaluators/claude.js';
6
+ import { openCodeEvaluator, preflightOpenCodeEvaluator } from '../delivery-path-search/evaluators/opencode.js';
7
+ import { fixtureEvaluator } from '../delivery-path-search/evaluators/protocol.js';
8
+ import { codexGenerator } from '../delivery-path-search/generators/codex.js';
9
+ import { claudeGenerator } from '../delivery-path-search/generators/claude.js';
10
+ import { fixtureGenerator } from '../delivery-path-search/generators/protocol.js';
11
+ import { enforcementForSurface } from '../delivery-path-search/surfaces/capabilities.js';
12
+ import { persistSearchResult } from '../delivery-path-search/persistence.js';
13
+
14
+ function unavailableOpenCodeResult({ options, preflight, input = null, error = null }) {
15
+ const mutation = error?.code === "OPENCODE_EVALUATOR_MUTATION_DETECTED";
16
+ const attempted = Boolean(input);
17
+ const nextAction = mutation
18
+ ? "Investigate and revert the detected repository mutation before any evaluator fallback or retry."
19
+ : "Repair the reported OpenCode capability and retry, or use the existing instruction-only Delivery Path Search workflow.";
20
+ return {
21
+ contract_version: "1",
22
+ surface: "opencode",
23
+ scope_key: input?.scope_key ?? options.runId ?? null,
24
+ current_gate: input?.current_gate ?? null,
25
+ status: mutation ? "evaluator_error" : "evaluator_unavailable",
26
+ recommendation: null,
27
+ enforcement: enforcementForSurface("opencode"),
28
+ evaluator: {
29
+ name: "opencode",
30
+ preflight: preflight?.code ?? "not_run",
31
+ failure_code: error?.code ?? preflight?.code,
32
+ detail: error?.message ?? preflight?.detail,
33
+ evidence: preflight?.evidence ?? [],
34
+ },
35
+ executable_evaluator: {
36
+ attempted,
37
+ preflight: preflight?.status ?? "failed",
38
+ failure_code: error?.code ?? preflight?.code,
39
+ evidence: preflight?.evidence ?? [],
40
+ },
41
+ stopping_reason: mutation ? "opencode_mutation_detected" : attempted ? "opencode_evaluator_failed" : "opencode_preflight_failed",
42
+ next_action: nextAction,
43
+ next_gate_action: nextAction,
44
+ };
45
+ }
46
+
47
+ export async function executeDeliveryPathSearch(options, io = console, dependencies = {}) {
48
+ const fixture = options.fixture ? JSON.parse(readFileSync(options.fixture, "utf8")) : null;
49
+ const preflight = !fixture && options.surface === "opencode"
50
+ ? (dependencies.preflightOpenCodeEvaluator ?? preflightOpenCodeEvaluator)({ cwd: options.dir })
51
+ : null;
52
+ if (preflight?.status === "failed") {
53
+ const result = unavailableOpenCodeResult({ options, preflight });
54
+ printDeliveryPathSearchResult(result, options, io);
55
+ return result;
56
+ }
57
+ const enforcement = fixture?.input?.enforcement
58
+ ?? (preflight
59
+ ? enforcementForSurface("opencode", preflight.evidence, { preflight })
60
+ : enforcementForSurface(options.surface));
61
+ const fixtureGeneration = fixture?.generator_response;
62
+ const generationEnabled = Boolean(fixtureGeneration || options.generateCandidates);
63
+ const baseInput = fixture?.input ?? (dependencies.searchInputFromControl ?? searchInputFromControl)(options.dir, {
64
+ scopeKey: options.runId,
65
+ enforcement,
66
+ generation: generationEnabled ? {
67
+ enabled: true,
68
+ maxProposals: options.maxGeneratedCandidates,
69
+ maxDurationMs: options.generationTimeoutMs,
70
+ maxCostUnits: options.generationCostUnits,
71
+ } : undefined,
72
+ });
73
+ const input = generationEnabled && !baseInput.generation ? {
74
+ ...baseInput,
75
+ generation: {
76
+ enabled: true,
77
+ max_calls: 1,
78
+ max_proposals: options.maxGeneratedCandidates,
79
+ max_duration_ms: options.generationTimeoutMs,
80
+ max_cost_units: options.generationCostUnits,
81
+ },
82
+ } : baseInput;
83
+ const evaluator = fixture
84
+ ? fixtureEvaluator(fixture.evaluations ?? {})
85
+ : options.surface === "codex"
86
+ ? codexEvaluator({ cwd: options.dir, model: options.model })
87
+ : options.surface === "claude"
88
+ ? claudeEvaluator({ cwd: options.dir, model: options.model })
89
+ : options.surface === "opencode"
90
+ ? (dependencies.openCodeEvaluator ?? openCodeEvaluator)({ cwd: options.dir, model: options.model, preflight })
91
+ : null;
92
+ if (!evaluator) {
93
+ throw new Error(`${options.surface} has no executable evaluator in this release. Codex, Claude and preflight-qualified OpenCode are the executable adapters; --fixture is available for deterministic contract testing.`);
94
+ }
95
+ const generator = fixtureGeneration
96
+ ? fixtureGenerator(fixtureGeneration)
97
+ : options.generateCandidates && options.surface === "codex"
98
+ ? codexGenerator({ cwd: options.dir, model: options.generatorModel, timeoutMs: options.generationTimeoutMs })
99
+ : options.generateCandidates && options.surface === "claude"
100
+ ? claudeGenerator({ cwd: options.dir, model: options.generatorModel, timeoutMs: options.generationTimeoutMs })
101
+ : null;
102
+ if (options.generateCandidates && !generator) {
103
+ throw new Error(`${options.surface} has no executable candidate generator; Codex and Claude are tool-enforced reference transports.`);
104
+ }
105
+ let result;
106
+ try {
107
+ result = await (dependencies.runDeliveryPathSearch ?? runDeliveryPathSearch)(input, evaluator, { candidates: fixture?.candidates, generator });
108
+ if (!fixture && options.surface === "opencode" && result.budgets?.evaluations === 0) {
109
+ result.enforcement = enforcementForSurface("opencode");
110
+ }
111
+ } catch (error) {
112
+ if (!error?.fatalEvaluator || options.surface !== "opencode") throw error;
113
+ result = unavailableOpenCodeResult({ options, preflight, input, error });
114
+ }
115
+ if (options.persist && ["recommendation", "no_safe_recommendation"].includes(result.status)) {
116
+ result.persistence = (dependencies.persistSearchResult ?? persistSearchResult)(options.dir, result);
117
+ }
118
+ printDeliveryPathSearchResult(result, options, io);
119
+ return result;
120
+ }
121
+
122
+ function printDeliveryPathSearchResult(result, options, io) {
123
+ if (options.json) {
124
+ io.log(JSON.stringify(result, null, 2));
125
+ return;
126
+ }
127
+ io.log(`AGDF Delivery Path Search: ${result.status}`);
128
+ io.log(`Current gate: ${result.current_gate ?? "unknown"}`);
129
+ io.log(`Enforcement: ${result.enforcement.level}`);
130
+ io.log(`Recommendation: ${result.recommendation?.action ?? "none"}`);
131
+ if (result.budgets) io.log(`Evaluations: ${result.budgets.evaluations}`);
132
+ if (result.generation) {
133
+ io.log(`Generation: ${result.generation.status} (${result.generation.accepted}/${result.generation.returned} accepted)`);
134
+ io.log(`Generation budget: ${result.generation.cost_units} cost units, ${result.generation.duration_ms} ms`);
135
+ if (result.generation.failure_code) io.log(`Generation failure: ${result.generation.failure_code}`);
136
+ }
137
+ io.log(`Stopping reason: ${result.stopping_reason}`);
138
+ io.log(result.next_gate_action);
139
+ }