create-agdf 0.11.2 → 0.11.4

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 (48) hide show
  1. package/README.md +5 -4
  2. package/generated/.agdf/control/templates/MASTER_BACKLOG.md +1 -1
  3. package/generated/.github/skills/agdf-gate-check/SKILL.md +9 -0
  4. package/generated/.github/skills/agdf-interaction-locales.json +38 -0
  5. package/generated/.github/skills/contracts/control-scaffold.md +2 -0
  6. package/generated/.github/skills/contracts/interaction.md +19 -0
  7. package/generated/.opencode/agdf-interaction-locales.json +38 -0
  8. package/generated/.opencode/contracts/control-scaffold.md +2 -0
  9. package/generated/.opencode/contracts/interaction.md +19 -0
  10. package/generated/.opencode/skills/agdf-gate-check/SKILL.md +9 -0
  11. package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
  12. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  13. package/generated/plugins/agdf/control/templates/MASTER_BACKLOG.md +1 -1
  14. package/generated/plugins/agdf/meta/agdf-interaction-locales.json +38 -0
  15. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +2 -1
  16. package/generated/plugins/agdf/meta/contracts/control-scaffold.md +2 -0
  17. package/generated/plugins/agdf/meta/contracts/interaction.md +19 -0
  18. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +38 -0
  19. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +2 -1
  20. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +2 -2
  21. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +78 -14
  22. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/shared.js +1 -0
  23. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +2 -11
  24. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +2 -11
  25. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/opencode.js +234 -0
  26. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/prompt.js +13 -0
  27. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/search-engine.js +1 -0
  28. package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +15 -2
  29. package/generated/plugins/agdf/runtime/create-agdf/lib/interaction-presentation.js +63 -0
  30. package/generated/plugins/agdf/runtime/create-agdf/package.json +3 -2
  31. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  32. package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +22 -0
  33. package/generated/plugins/agdf/skills/gate-check/SKILL.md +9 -0
  34. package/lib/cli/application.js +17 -2
  35. package/lib/cli/command-registry.js +2 -2
  36. package/lib/cli/delivery-path-search-command.js +78 -14
  37. package/lib/control-evaluation/shared.js +1 -0
  38. package/lib/delivery-path-search/evaluators/claude.js +2 -11
  39. package/lib/delivery-path-search/evaluators/codex.js +2 -11
  40. package/lib/delivery-path-search/evaluators/opencode.js +234 -0
  41. package/lib/delivery-path-search/evaluators/prompt.js +13 -0
  42. package/lib/delivery-path-search/search-engine.js +1 -0
  43. package/lib/delivery-path-search/surfaces/capabilities.js +15 -2
  44. package/lib/installers/opencode.js +214 -10
  45. package/lib/interaction-presentation.js +63 -0
  46. package/lib/lifecycle/operations.js +4 -0
  47. package/opencode-plugin.js +19 -2
  48. package/package.json +3 -2
package/README.md CHANGED
@@ -115,7 +115,7 @@ it does not localize the CLI lifecycle card.
115
115
  - `claude` installs the AGDF plugin globally for Claude Code
116
116
  - `copilot` writes `AGENTS.md`, Copilot custom instructions under `.github/`, visible repository skills under `.github/skills/`, and AGDF control templates under `.agdf/control/`
117
117
  - `opencode` installs the AGDF npm plugin and ten native skills as a user-wide OpenCode surface
118
- - `opencode-status` reports OpenCode global config, package loadability, global native-skill completeness, durable repository activation, legacy compatibility and observable session signals
118
+ - `opencode-status` reports OpenCode global config, package loadability, global native-skill completeness, installed host/plugin-SDK versions, declaration-level support for AGDF's two experimental hooks, durable repository activation, legacy compatibility and observable session signals
119
119
  - `status` reports installation, repository activation and delivery separately without mutating state
120
120
  - `disable` writes a supported repository-local opt-out while retaining global capability and durable control state
121
121
  - `uninstall` previews and, only with `--confirm`, applies a selected global removal through supported native/owned operations
@@ -149,7 +149,7 @@ Then verify the visible installation state:
149
149
  npx --yes @agdf/cli@latest opencode-status --json
150
150
  ```
151
151
 
152
- The status command reports global configuration, package loadability, global native-skill completeness, durable repository activation, legacy local-surface compatibility and session signals. It does not infer an active OpenCode session from config alone.
152
+ The status command reports global configuration, package loadability, global native-skill completeness, installed host/plugin-SDK version divergence, declaration-level support for both experimental hooks, durable repository activation, legacy local-surface compatibility and session signals. SDK declarations are not proof that a live host invoked a hook, and host/SDK divergence is warning-only rather than auto-aligned. The command does not infer an active OpenCode session from config alone.
153
153
  In JSON schema version 1, `repository_surface.gate_check_agent` remains a deprecated compatibility alias for the native `gate_check_skill` path so existing status consumers keep working during the agent-to-skill migration.
154
154
 
155
155
  Use the `opencode-repo` target when a repository should opt into the globally installed AGDF OpenCode runtime:
@@ -235,7 +235,7 @@ Use `delivery-path-search` only for high-impact planning decisions with several
235
235
  agdf delivery-path-search --surface codex --json
236
236
  ```
237
237
 
238
- The runtime uses bounded best-first Delivery Path Search, not MCTS. It is read-only and advisory: the result must be checked by canonical `gate-check`. Codex and Claude Code are executable, tool-enforced evaluator adapters and support opt-in `--generate-candidates`; generated proposals supplement the deterministic baseline and are deterministically validated before evaluation. Copilot and OpenCode reuse the same skill and contracts as instruction-only surfaces until conforming executable adapters are available.
238
+ The runtime uses bounded best-first Delivery Path Search, not MCTS. It is read-only and advisory: the result must be checked by canonical `gate-check`. Codex and Claude Code are executable, tool-enforced evaluator adapters and support opt-in `--generate-candidates`; generated proposals supplement the deterministic baseline and are deterministically validated before evaluation. OpenCode has an executable evaluator through `opencode run --pure --agent agdf-evaluator` only after the current invocation's capability preflight proves the command flags, owned agent and effective deny permissions. A failed preflight or evaluator transport returns `evaluator_unavailable`, reports `instruction_only` and directs the user to the existing instruction-only workflow. Copilot remains instruction-only.
239
239
 
240
240
  Requirements and boundaries:
241
241
 
@@ -243,10 +243,11 @@ Requirements and boundaries:
243
243
  - the current control state must expose legal next actions
244
244
  - Codex CLI must be installed and authenticated for `--surface codex`
245
245
  - Claude Code CLI must be installed and authenticated for `--surface claude`
246
+ - OpenCode must pass the per-invocation command, agent and effective-permission preflight for `--surface opencode`
246
247
  - `--model <id>` optionally selects the Codex or Claude evaluator model
247
248
  - `--persist` writes redacted `DELIVERY_PATH_SEARCH.json` and `.md` evidence under the current scope
248
249
  - `--fixture <path>` is for deterministic contract tests, not a production evaluator
249
- - Copilot and OpenCode have shared workflow mappings but no executable native evaluator in this release
250
+ - OpenCode candidate generation is intentionally unavailable; Copilot has no executable native evaluator
250
251
  - cost units are rubric values used for bounded comparison, not measured provider currency
251
252
 
252
253
  The result is either one recommendation or `no_safe_recommendation`. In both cases run canonical `gate-check` afterwards.
@@ -15,7 +15,7 @@ This file is the living control pointer for active AGDF delivery work. Detailed
15
15
  9. Historical artefacts remain linkable but do not override the current pointer.
16
16
  10. If an item is superseded, mark the replacement.
17
17
  11. If active work grows beyond roughly ten items, triage the backlog.
18
- 12. `Status` must be one of the human-readable labels normalized by `create-agdf/lib/control-evaluation/shared.js`: Needs UR, Awaiting Brownfield Review, Awaiting PRD, Awaiting PRD Approval, Awaiting SD, Awaiting SD Approval, Awaiting TP, Awaiting TP Approval, In Progress, Blocked, Awaiting QA, Awaiting UAT, Completed, Superseded, Abandoned. The parser module is authoritative; this list only mirrors it for readability.
18
+ 12. `Status` must be one of the human-readable labels normalized by `create-agdf/lib/control-evaluation/shared.js`: Needs UR, Awaiting Brownfield Review, Awaiting PRD, Awaiting PRD Approval, Awaiting SD, Awaiting SD Approval, Awaiting TP, Awaiting TP Approval, In Progress, Blocked, Awaiting QA, Awaiting UAT, Awaiting OR, Completed, Superseded, Abandoned. The parser module is authoritative; this list only mirrors it for readability.
19
19
  13. `Artefacts` link labels must be one of the labels normalized by the same parser module: `ur`, `brownfield`, `prd`, `sd`, `tp`, `qa`, `or` (case-insensitive). Do not invent other labels such as a raw artefact filename.
20
20
  14. After writing or updating this file, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before treating the edit as done.
21
21
  15. A `Work item` cell may optionally start with a bracketed scope tag, one of `[framework-maintenance]` or `[external-delivery]`, so the split between AGDF's own maintenance work and external product delivery stays visible at a glance. The tag is never required retroactively on `Completed / Superseded Pointers` rows. `create-agdf/lib/control-evaluation/shared.js` is authoritative for the accepted values.
@@ -169,6 +169,15 @@ If a status is not explicit, do not assume it is satisfied.
169
169
  11. When `.agdf/control/` is missing or incomplete, make the next allowed artefact action explicit. For a fresh request, that means draft the minimal UR in the response, then request `Approval: UR`. Do not write a full control scaffold unless durable control state was explicitly requested or is already the repository's live AGDF working state.
170
170
  12. If branch, workspace and durable artefacts disagree, do not choose a scope silently; report the ambiguity and ask for the smallest clarifying gate action.
171
171
 
172
+ ### Scope Classification Output
173
+ When this skill classifies a fresh scope as ungated (Quick Task or Trivial Change Boundary), consume
174
+ `scope_classification.markdown` verbatim from `renderScopeClassificationCard` in
175
+ `../contracts/interaction.md` § Scope Classification Card. The card is a compact, localized,
176
+ non-authorizing projection: mode, boundary, UR-trigger evaluation, one allowed line, one forbidden
177
+ line, escalation triggers and the challenge path. Do not maintain or render a skill-local
178
+ classification card template. If the renderer returns `null`, fail closed to the existing ceremony
179
+ and do not model-reconstruct Markdown.
180
+
172
181
  ## Output
173
182
  Keep the result short and operational. For a status-only response, consume the Runtime Contract's
174
183
  code-owned `status_presentation.markdown` verbatim. It is the compact localized operational Run
@@ -39,6 +39,25 @@
39
39
  "breadcrumbOpen": "\u25cb",
40
40
  "breadcrumbSeparator": " \u00b7 "
41
41
  },
42
+ "scopeClassification": {
43
+ "title": "AGDF scope classification",
44
+ "field": "Field",
45
+ "value": "Value",
46
+ "classification": "Classification",
47
+ "mode": {
48
+ "quick_task": "Quick Task",
49
+ "verified_change": "Verified Change"
50
+ },
51
+ "boundary": {
52
+ "inside": "Trivial change boundary satisfied",
53
+ "outside": "Outside trivial change boundary"
54
+ },
55
+ "grounds": "UR trigger evaluation",
56
+ "allowed": "Currently allowed",
57
+ "forbidden": "Remains forbidden",
58
+ "escalation": "Escalation triggers",
59
+ "challenge": "Challenge path"
60
+ },
42
61
  "internalStateLabels": {
43
62
  "verifiedChange": "Compact change under review",
44
63
  "verifiedChangeEscalated": "Escalated to structured delivery",
@@ -246,6 +265,25 @@
246
265
  "breadcrumbOpen": "\u25cb",
247
266
  "breadcrumbSeparator": " \u00b7 "
248
267
  },
268
+ "scopeClassification": {
269
+ "title": "AGDF-Scope-Klassifizierung",
270
+ "field": "Feld",
271
+ "value": "Wert",
272
+ "classification": "Klassifizierung",
273
+ "mode": {
274
+ "quick_task": "Quick Task",
275
+ "verified_change": "Verified Change"
276
+ },
277
+ "boundary": {
278
+ "inside": "Trivial-Change-Boundary erfüllt",
279
+ "outside": "Außerhalb der Trivial-Change-Boundary"
280
+ },
281
+ "grounds": "UR-Trigger-Evaluation",
282
+ "allowed": "Aktuell erlaubt",
283
+ "forbidden": "Bleibt verboten",
284
+ "escalation": "Eskalationsauslöser",
285
+ "challenge": "Widerspruchspfad"
286
+ },
249
287
  "internalStateLabels": {
250
288
  "verifiedChange": "Kompakte Änderung wird geprüft",
251
289
  "verifiedChangeEscalated": "Eskaliert zu structured delivery",
@@ -17,6 +17,8 @@ Delivery Path Search is an optional read-only planning step for high-impact deci
17
17
  - External generation receives only bounded normalized control summaries and references, never secrets, full artefacts, raw prompts, hidden reasoning or source snapshots.
18
18
  - Generator status, provenance, accepted/rejected counts, separate budget use and typed failure must remain visible. Failure retains the deterministic baseline; automatic provider fallback is forbidden.
19
19
  - Codex and Claude Code may provide tool-enforced generator transports. Copilot, OpenCode and generic surfaces remain instruction-only without conforming evidence.
20
+ - OpenCode may provide a tool-enforced evaluator only for an invocation whose capability preflight proves `opencode run --pure --agent`, the owned evaluator agent and effective executable-tool denies. Preflight or transport failure must return `evaluator_unavailable` with `instruction_only` enforcement and point to the existing instruction-only workflow; it must not continue through a weaker subprocess.
21
+ - OpenCode candidate generation remains unavailable.
20
22
 
21
23
  The field names above are the stable machine-readable contract used by JSON
22
24
  reports and automation. Human-facing Markdown must present the same projection
@@ -338,6 +338,25 @@ repeat the sentence later in the same request. Existing-run status inspection re
338
338
  uses the existing status projection; this branch must not create a second status-card or narration
339
339
  owner.
340
340
 
341
+ ### Scope Classification Card
342
+
343
+ When `agdf-gate-check` classifies a fresh scope as ungated (Quick Task or Trivial Change Boundary),
344
+ the agent consumes the canonical `scope_classification.markdown` verbatim from
345
+ `renderScopeClassificationCard` in `create-agdf/lib/interaction-presentation.js`. The card is a
346
+ compact, localized, non-authorizing projection of the classification: mode, boundary result,
347
+ UR-trigger evaluation, one currently-allowed line, one remains-forbidden line, escalation triggers
348
+ and the challenge path. It carries `authorizes: false` and never renders approval controls.
349
+
350
+ The card renders exactly once per fresh-scope ungated classification, before work proceeds. It must
351
+ not appear for gated scopes, internal steps of a selected run, or as a substitute for the two-card
352
+ approval envelope. Read-only requests keep the single read-only orientation sentence above; the
353
+ scope classification card and the read-only orientation are mutually exclusive for the same request.
354
+
355
+ If the classification input is missing, unknown, contradictory or the locale section is incomplete,
356
+ the renderer returns `null` and the agent fails closed to the existing ceremony — never
357
+ model-reconstructed Markdown. The card introduces no gate, no approval value, no persistence and no
358
+ second presentation owner. `agdf-gate-check` must not maintain a skill-local card template.
359
+
341
360
  Exact textual approvals remain canonical and fully supported on every surface. If native capability availability or safety is unknown, use the textual fallback. Host permission, plan approval, native question presentation, timeout/default behavior, hook output and agent messages never carry AGDF gate authority by themselves.
342
361
 
343
362
  ### Interaction Locale Contract
@@ -39,6 +39,25 @@
39
39
  "breadcrumbOpen": "\u25cb",
40
40
  "breadcrumbSeparator": " \u00b7 "
41
41
  },
42
+ "scopeClassification": {
43
+ "title": "AGDF scope classification",
44
+ "field": "Field",
45
+ "value": "Value",
46
+ "classification": "Classification",
47
+ "mode": {
48
+ "quick_task": "Quick Task",
49
+ "verified_change": "Verified Change"
50
+ },
51
+ "boundary": {
52
+ "inside": "Trivial change boundary satisfied",
53
+ "outside": "Outside trivial change boundary"
54
+ },
55
+ "grounds": "UR trigger evaluation",
56
+ "allowed": "Currently allowed",
57
+ "forbidden": "Remains forbidden",
58
+ "escalation": "Escalation triggers",
59
+ "challenge": "Challenge path"
60
+ },
42
61
  "internalStateLabels": {
43
62
  "verifiedChange": "Compact change under review",
44
63
  "verifiedChangeEscalated": "Escalated to structured delivery",
@@ -246,6 +265,25 @@
246
265
  "breadcrumbOpen": "\u25cb",
247
266
  "breadcrumbSeparator": " \u00b7 "
248
267
  },
268
+ "scopeClassification": {
269
+ "title": "AGDF-Scope-Klassifizierung",
270
+ "field": "Feld",
271
+ "value": "Wert",
272
+ "classification": "Klassifizierung",
273
+ "mode": {
274
+ "quick_task": "Quick Task",
275
+ "verified_change": "Verified Change"
276
+ },
277
+ "boundary": {
278
+ "inside": "Trivial-Change-Boundary erfüllt",
279
+ "outside": "Außerhalb der Trivial-Change-Boundary"
280
+ },
281
+ "grounds": "UR-Trigger-Evaluation",
282
+ "allowed": "Aktuell erlaubt",
283
+ "forbidden": "Bleibt verboten",
284
+ "escalation": "Eskalationsauslöser",
285
+ "challenge": "Widerspruchspfad"
286
+ },
249
287
  "internalStateLabels": {
250
288
  "verifiedChange": "Kompakte Änderung wird geprüft",
251
289
  "verifiedChangeEscalated": "Eskaliert zu structured delivery",
@@ -17,6 +17,8 @@ Delivery Path Search is an optional read-only planning step for high-impact deci
17
17
  - External generation receives only bounded normalized control summaries and references, never secrets, full artefacts, raw prompts, hidden reasoning or source snapshots.
18
18
  - Generator status, provenance, accepted/rejected counts, separate budget use and typed failure must remain visible. Failure retains the deterministic baseline; automatic provider fallback is forbidden.
19
19
  - Codex and Claude Code may provide tool-enforced generator transports. Copilot, OpenCode and generic surfaces remain instruction-only without conforming evidence.
20
+ - OpenCode may provide a tool-enforced evaluator only for an invocation whose capability preflight proves `opencode run --pure --agent`, the owned evaluator agent and effective executable-tool denies. Preflight or transport failure must return `evaluator_unavailable` with `instruction_only` enforcement and point to the existing instruction-only workflow; it must not continue through a weaker subprocess.
21
+ - OpenCode candidate generation remains unavailable.
20
22
 
21
23
  The field names above are the stable machine-readable contract used by JSON
22
24
  reports and automation. Human-facing Markdown must present the same projection
@@ -338,6 +338,25 @@ repeat the sentence later in the same request. Existing-run status inspection re
338
338
  uses the existing status projection; this branch must not create a second status-card or narration
339
339
  owner.
340
340
 
341
+ ### Scope Classification Card
342
+
343
+ When `agdf-gate-check` classifies a fresh scope as ungated (Quick Task or Trivial Change Boundary),
344
+ the agent consumes the canonical `scope_classification.markdown` verbatim from
345
+ `renderScopeClassificationCard` in `create-agdf/lib/interaction-presentation.js`. The card is a
346
+ compact, localized, non-authorizing projection of the classification: mode, boundary result,
347
+ UR-trigger evaluation, one currently-allowed line, one remains-forbidden line, escalation triggers
348
+ and the challenge path. It carries `authorizes: false` and never renders approval controls.
349
+
350
+ The card renders exactly once per fresh-scope ungated classification, before work proceeds. It must
351
+ not appear for gated scopes, internal steps of a selected run, or as a substitute for the two-card
352
+ approval envelope. Read-only requests keep the single read-only orientation sentence above; the
353
+ scope classification card and the read-only orientation are mutually exclusive for the same request.
354
+
355
+ If the classification input is missing, unknown, contradictory or the locale section is incomplete,
356
+ the renderer returns `null` and the agent fails closed to the existing ceremony — never
357
+ model-reconstructed Markdown. The card introduces no gate, no approval value, no persistence and no
358
+ second presentation owner. `agdf-gate-check` must not maintain a skill-local card template.
359
+
341
360
  Exact textual approvals remain canonical and fully supported on every surface. If native capability availability or safety is unknown, use the textual fallback. Host permission, plan approval, native question presentation, timeout/default behavior, hook output and agent messages never carry AGDF gate authority by themselves.
342
361
 
343
362
  ### Interaction Locale Contract
@@ -169,6 +169,15 @@ If a status is not explicit, do not assume it is satisfied.
169
169
  11. When `.agdf/control/` is missing or incomplete, make the next allowed artefact action explicit. For a fresh request, that means draft the minimal UR in the response, then request `Approval: UR`. Do not write a full control scaffold unless durable control state was explicitly requested or is already the repository's live AGDF working state.
170
170
  12. If branch, workspace and durable artefacts disagree, do not choose a scope silently; report the ambiguity and ask for the smallest clarifying gate action.
171
171
 
172
+ ### Scope Classification Output
173
+ When this skill classifies a fresh scope as ungated (Quick Task or Trivial Change Boundary), consume
174
+ `scope_classification.markdown` verbatim from `renderScopeClassificationCard` in
175
+ `../../contracts/interaction.md` § Scope Classification Card. The card is a compact, localized,
176
+ non-authorizing projection: mode, boundary, UR-trigger evaluation, one allowed line, one forbidden
177
+ line, escalation triggers and the challenge path. Do not maintain or render a skill-local
178
+ classification card template. If the renderer returns `null`, fail closed to the existing ceremony
179
+ and do not model-reconstruct Markdown.
180
+
172
181
  ## Output
173
182
  Keep the result short and operational. For a status-only response, consume the Runtime Contract's
174
183
  code-owned `status_presentation.markdown` verbatim. It is the compact localized operational Run
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "AI Governance & Delivery Framework (AGDF) brings an operating system for governed AI-assisted delivery to Claude Code, combining workflow skills, control templates and machine-readable repository checks for gate decisions, Brownfield analysis, task-plan review, QA decisions, durable run state and auditable closeout.",
5
5
  "keywords": [
6
6
  "agentic",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.11.2",
3
+ "version": "0.11.4",
4
4
  "description": "Operating system for governed AI-assisted delivery.",
5
5
  "author": {
6
6
  "name": "Arndt Gold",
@@ -15,7 +15,7 @@ This file is the living control pointer for active AGDF delivery work. Detailed
15
15
  9. Historical artefacts remain linkable but do not override the current pointer.
16
16
  10. If an item is superseded, mark the replacement.
17
17
  11. If active work grows beyond roughly ten items, triage the backlog.
18
- 12. `Status` must be one of the human-readable labels normalized by `create-agdf/lib/control-evaluation/shared.js`: Needs UR, Awaiting Brownfield Review, Awaiting PRD, Awaiting PRD Approval, Awaiting SD, Awaiting SD Approval, Awaiting TP, Awaiting TP Approval, In Progress, Blocked, Awaiting QA, Awaiting UAT, Completed, Superseded, Abandoned. The parser module is authoritative; this list only mirrors it for readability.
18
+ 12. `Status` must be one of the human-readable labels normalized by `create-agdf/lib/control-evaluation/shared.js`: Needs UR, Awaiting Brownfield Review, Awaiting PRD, Awaiting PRD Approval, Awaiting SD, Awaiting SD Approval, Awaiting TP, Awaiting TP Approval, In Progress, Blocked, Awaiting QA, Awaiting UAT, Awaiting OR, Completed, Superseded, Abandoned. The parser module is authoritative; this list only mirrors it for readability.
19
19
  13. `Artefacts` link labels must be one of the labels normalized by the same parser module: `ur`, `brownfield`, `prd`, `sd`, `tp`, `qa`, `or` (case-insensitive). Do not invent other labels such as a raw artefact filename.
20
20
  14. After writing or updating this file, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before treating the edit as done.
21
21
  15. A `Work item` cell may optionally start with a bracketed scope tag, one of `[framework-maintenance]` or `[external-delivery]`, so the split between AGDF's own maintenance work and external product delivery stays visible at a glance. The tag is never required retroactively on `Completed / Superseded Pointers` rows. `create-agdf/lib/control-evaluation/shared.js` is authoritative for the accepted values.
@@ -39,6 +39,25 @@
39
39
  "breadcrumbOpen": "\u25cb",
40
40
  "breadcrumbSeparator": " \u00b7 "
41
41
  },
42
+ "scopeClassification": {
43
+ "title": "AGDF scope classification",
44
+ "field": "Field",
45
+ "value": "Value",
46
+ "classification": "Classification",
47
+ "mode": {
48
+ "quick_task": "Quick Task",
49
+ "verified_change": "Verified Change"
50
+ },
51
+ "boundary": {
52
+ "inside": "Trivial change boundary satisfied",
53
+ "outside": "Outside trivial change boundary"
54
+ },
55
+ "grounds": "UR trigger evaluation",
56
+ "allowed": "Currently allowed",
57
+ "forbidden": "Remains forbidden",
58
+ "escalation": "Escalation triggers",
59
+ "challenge": "Challenge path"
60
+ },
42
61
  "internalStateLabels": {
43
62
  "verifiedChange": "Compact change under review",
44
63
  "verifiedChangeEscalated": "Escalated to structured delivery",
@@ -246,6 +265,25 @@
246
265
  "breadcrumbOpen": "\u25cb",
247
266
  "breadcrumbSeparator": " \u00b7 "
248
267
  },
268
+ "scopeClassification": {
269
+ "title": "AGDF-Scope-Klassifizierung",
270
+ "field": "Feld",
271
+ "value": "Wert",
272
+ "classification": "Klassifizierung",
273
+ "mode": {
274
+ "quick_task": "Quick Task",
275
+ "verified_change": "Verified Change"
276
+ },
277
+ "boundary": {
278
+ "inside": "Trivial-Change-Boundary erfüllt",
279
+ "outside": "Außerhalb der Trivial-Change-Boundary"
280
+ },
281
+ "grounds": "UR-Trigger-Evaluation",
282
+ "allowed": "Aktuell erlaubt",
283
+ "forbidden": "Bleibt verboten",
284
+ "escalation": "Eskalationsauslöser",
285
+ "challenge": "Widerspruchspfad"
286
+ },
249
287
  "internalStateLabels": {
250
288
  "verifiedChange": "Kompakte Änderung wird geprüft",
251
289
  "verifiedChangeEscalated": "Eskaliert zu structured delivery",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.11.2",
4
+ "version": "0.11.4",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "Arndt Gold",
7
7
  "description": "Operating system for governed AI-assisted delivery.",
@@ -59,6 +59,7 @@
59
59
  "opencode": {
60
60
  "skillPrefix": "agdf-",
61
61
  "globalSkillPrefix": "agdf-global-",
62
+ "evaluatorAgentName": "agdf-evaluator",
62
63
  "runtimeContractFileName": "agdf-runtime-contract.md",
63
64
  "instructionsFileName": "AGDF.md",
64
65
  "npmPackage": "create-agdf",
@@ -17,6 +17,8 @@ Delivery Path Search is an optional read-only planning step for high-impact deci
17
17
  - External generation receives only bounded normalized control summaries and references, never secrets, full artefacts, raw prompts, hidden reasoning or source snapshots.
18
18
  - Generator status, provenance, accepted/rejected counts, separate budget use and typed failure must remain visible. Failure retains the deterministic baseline; automatic provider fallback is forbidden.
19
19
  - Codex and Claude Code may provide tool-enforced generator transports. Copilot, OpenCode and generic surfaces remain instruction-only without conforming evidence.
20
+ - OpenCode may provide a tool-enforced evaluator only for an invocation whose capability preflight proves `opencode run --pure --agent`, the owned evaluator agent and effective executable-tool denies. Preflight or transport failure must return `evaluator_unavailable` with `instruction_only` enforcement and point to the existing instruction-only workflow; it must not continue through a weaker subprocess.
21
+ - OpenCode candidate generation remains unavailable.
20
22
 
21
23
  The field names above are the stable machine-readable contract used by JSON
22
24
  reports and automation. Human-facing Markdown must present the same projection
@@ -338,6 +338,25 @@ repeat the sentence later in the same request. Existing-run status inspection re
338
338
  uses the existing status projection; this branch must not create a second status-card or narration
339
339
  owner.
340
340
 
341
+ ### Scope Classification Card
342
+
343
+ When `gate-check` classifies a fresh scope as ungated (Quick Task or Trivial Change Boundary),
344
+ the agent consumes the canonical `scope_classification.markdown` verbatim from
345
+ `renderScopeClassificationCard` in `create-agdf/lib/interaction-presentation.js`. The card is a
346
+ compact, localized, non-authorizing projection of the classification: mode, boundary result,
347
+ UR-trigger evaluation, one currently-allowed line, one remains-forbidden line, escalation triggers
348
+ and the challenge path. It carries `authorizes: false` and never renders approval controls.
349
+
350
+ The card renders exactly once per fresh-scope ungated classification, before work proceeds. It must
351
+ not appear for gated scopes, internal steps of a selected run, or as a substitute for the two-card
352
+ approval envelope. Read-only requests keep the single read-only orientation sentence above; the
353
+ scope classification card and the read-only orientation are mutually exclusive for the same request.
354
+
355
+ If the classification input is missing, unknown, contradictory or the locale section is incomplete,
356
+ the renderer returns `null` and the agent fails closed to the existing ceremony — never
357
+ model-reconstructed Markdown. The card introduces no gate, no approval value, no persistence and no
358
+ second presentation owner. `gate-check` must not maintain a skill-local card template.
359
+
341
360
  Exact textual approvals remain canonical and fully supported on every surface. If native capability availability or safety is unknown, use the textual fallback. Host permission, plan approval, native question presentation, timeout/default behavior, hook output and agent messages never carry AGDF gate authority by themselves.
342
361
 
343
362
  ### Interaction Locale Contract
@@ -39,6 +39,25 @@
39
39
  "breadcrumbOpen": "\u25cb",
40
40
  "breadcrumbSeparator": " \u00b7 "
41
41
  },
42
+ "scopeClassification": {
43
+ "title": "AGDF scope classification",
44
+ "field": "Field",
45
+ "value": "Value",
46
+ "classification": "Classification",
47
+ "mode": {
48
+ "quick_task": "Quick Task",
49
+ "verified_change": "Verified Change"
50
+ },
51
+ "boundary": {
52
+ "inside": "Trivial change boundary satisfied",
53
+ "outside": "Outside trivial change boundary"
54
+ },
55
+ "grounds": "UR trigger evaluation",
56
+ "allowed": "Currently allowed",
57
+ "forbidden": "Remains forbidden",
58
+ "escalation": "Escalation triggers",
59
+ "challenge": "Challenge path"
60
+ },
42
61
  "internalStateLabels": {
43
62
  "verifiedChange": "Compact change under review",
44
63
  "verifiedChangeEscalated": "Escalated to structured delivery",
@@ -246,6 +265,25 @@
246
265
  "breadcrumbOpen": "\u25cb",
247
266
  "breadcrumbSeparator": " \u00b7 "
248
267
  },
268
+ "scopeClassification": {
269
+ "title": "AGDF-Scope-Klassifizierung",
270
+ "field": "Feld",
271
+ "value": "Wert",
272
+ "classification": "Klassifizierung",
273
+ "mode": {
274
+ "quick_task": "Quick Task",
275
+ "verified_change": "Verified Change"
276
+ },
277
+ "boundary": {
278
+ "inside": "Trivial-Change-Boundary erfüllt",
279
+ "outside": "Außerhalb der Trivial-Change-Boundary"
280
+ },
281
+ "grounds": "UR-Trigger-Evaluation",
282
+ "allowed": "Aktuell erlaubt",
283
+ "forbidden": "Bleibt verboten",
284
+ "escalation": "Eskalationsauslöser",
285
+ "challenge": "Widerspruchspfad"
286
+ },
249
287
  "internalStateLabels": {
250
288
  "verifiedChange": "Kompakte Änderung wird geprüft",
251
289
  "verifiedChangeEscalated": "Eskaliert zu structured delivery",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.11.2",
4
+ "version": "0.11.4",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "Arndt Gold",
7
7
  "description": "Operating system for governed AI-assisted delivery.",
@@ -59,6 +59,7 @@
59
59
  "opencode": {
60
60
  "skillPrefix": "agdf-",
61
61
  "globalSkillPrefix": "agdf-global-",
62
+ "evaluatorAgentName": "agdf-evaluator",
62
63
  "runtimeContractFileName": "agdf-runtime-contract.md",
63
64
  "instructionsFileName": "AGDF.md",
64
65
  "npmPackage": "create-agdf",
@@ -27,8 +27,8 @@ export const commandRegistry = Object.freeze([
27
27
  command("gate-check", { local: [" --approval-envelope", " --json"], scaffold: [""], legacy: [" --json"] }),
28
28
  command("delivery-map", { local: [" --json"], scaffold: [""] }),
29
29
  command("delivery-path-search", {
30
- local: [" --surface codex --json", " --surface claude --json"],
31
- scaffold: [" --surface codex", " --surface claude"],
30
+ local: [" --surface codex --json", " --surface claude --json", " --surface opencode --json"],
31
+ scaffold: [" --surface codex", " --surface claude", " --surface opencode"],
32
32
  }),
33
33
  command("run-create", { local: [" --run <run_id>"] }),
34
34
  command("run-migrate", { local: [" [--run <run_id>]"] }),
@@ -3,6 +3,7 @@ import { searchInputFromControl } from '../delivery-path-search/state-adapter.js
3
3
  import { runDeliveryPathSearch } from '../delivery-path-search/search-engine.js';
4
4
  import { codexEvaluator } from '../delivery-path-search/evaluators/codex.js';
5
5
  import { claudeEvaluator } from '../delivery-path-search/evaluators/claude.js';
6
+ import { openCodeEvaluator, preflightOpenCodeEvaluator } from '../delivery-path-search/evaluators/opencode.js';
6
7
  import { fixtureEvaluator } from '../delivery-path-search/evaluators/protocol.js';
7
8
  import { codexGenerator } from '../delivery-path-search/generators/codex.js';
8
9
  import { claudeGenerator } from '../delivery-path-search/generators/claude.js';
@@ -10,12 +11,56 @@ import { fixtureGenerator } from '../delivery-path-search/generators/protocol.js
10
11
  import { enforcementForSurface } from '../delivery-path-search/surfaces/capabilities.js';
11
12
  import { persistSearchResult } from '../delivery-path-search/persistence.js';
12
13
 
13
- export async function executeDeliveryPathSearch(options, io = console) {
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 = {}) {
14
48
  const fixture = options.fixture ? JSON.parse(readFileSync(options.fixture, "utf8")) : null;
15
- const enforcement = fixture?.input?.enforcement ?? enforcementForSurface(options.surface);
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));
16
61
  const fixtureGeneration = fixture?.generator_response;
17
62
  const generationEnabled = Boolean(fixtureGeneration || options.generateCandidates);
18
- const baseInput = fixture?.input ?? searchInputFromControl(options.dir, {
63
+ const baseInput = fixture?.input ?? (dependencies.searchInputFromControl ?? searchInputFromControl)(options.dir, {
19
64
  scopeKey: options.runId,
20
65
  enforcement,
21
66
  generation: generationEnabled ? {
@@ -41,9 +86,11 @@ export async function executeDeliveryPathSearch(options, io = console) {
41
86
  ? codexEvaluator({ cwd: options.dir, model: options.model })
42
87
  : options.surface === "claude"
43
88
  ? claudeEvaluator({ cwd: options.dir, model: options.model })
44
- : null;
89
+ : options.surface === "opencode"
90
+ ? (dependencies.openCodeEvaluator ?? openCodeEvaluator)({ cwd: options.dir, model: options.model, preflight })
91
+ : null;
45
92
  if (!evaluator) {
46
- throw new Error(`${options.surface} has no executable evaluator in this release. Codex and Claude are the reference adapters; --fixture is available for deterministic contract testing.`);
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.`);
47
94
  }
48
95
  const generator = fixtureGeneration
49
96
  ? fixtureGenerator(fixtureGeneration)
@@ -55,21 +102,38 @@ export async function executeDeliveryPathSearch(options, io = console) {
55
102
  if (options.generateCandidates && !generator) {
56
103
  throw new Error(`${options.surface} has no executable candidate generator; Codex and Claude are tool-enforced reference transports.`);
57
104
  }
58
- const result = await runDeliveryPathSearch(input, evaluator, { candidates: fixture?.candidates, generator });
59
- if (options.persist) result.persistence = persistSearchResult(options.dir, result);
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) {
60
123
  if (options.json) {
61
124
  io.log(JSON.stringify(result, null, 2));
62
- return result;
125
+ return;
63
126
  }
64
127
  io.log(`AGDF Delivery Path Search: ${result.status}`);
65
- io.log(`Current gate: ${result.current_gate}`);
128
+ io.log(`Current gate: ${result.current_gate ?? "unknown"}`);
66
129
  io.log(`Enforcement: ${result.enforcement.level}`);
67
130
  io.log(`Recommendation: ${result.recommendation?.action ?? "none"}`);
68
- io.log(`Evaluations: ${result.budgets.evaluations}`);
69
- io.log(`Generation: ${result.generation.status} (${result.generation.accepted}/${result.generation.returned} accepted)`);
70
- io.log(`Generation budget: ${result.generation.cost_units} cost units, ${result.generation.duration_ms} ms`);
71
- if (result.generation.failure_code) io.log(`Generation failure: ${result.generation.failure_code}`);
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
+ }
72
137
  io.log(`Stopping reason: ${result.stopping_reason}`);
73
138
  io.log(result.next_gate_action);
74
- return result;
75
139
  }
@@ -56,6 +56,7 @@ const backlogStatusLabels = new Map([
56
56
  ["blocked", "blocked"],
57
57
  ["awaiting qa", "awaiting_qa"],
58
58
  ["awaiting uat", "awaiting_uat"],
59
+ ["awaiting or", "awaiting_or"],
59
60
  ["completed", "completed"],
60
61
  ["superseded", "superseded"],
61
62
  ["abandoned", "abandoned"],