create-agdf 0.4.0 → 0.4.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 (38) hide show
  1. package/README.md +37 -0
  2. package/bin/create-agdf.js +249 -8
  3. package/generated/.agdf/control/templates/AGDF_RUN.md +1 -0
  4. package/generated/.agdf/control/templates/artefacts/OR.md +1 -0
  5. package/generated/.github/copilot-instructions.md +1 -0
  6. package/generated/.github/skills/README.md +1 -0
  7. package/generated/.github/skills/agdf-delivery-closeout/SKILL.md +9 -4
  8. package/generated/.github/skills/agdf-delivery-path-search/SKILL.md +75 -0
  9. package/generated/.github/skills/agdf-release-or/SKILL.md +8 -4
  10. package/generated/.github/skills/agdf-runtime-contract.md +24 -0
  11. package/generated/.opencode/AGDF.md +3 -0
  12. package/generated/.opencode/README.md +3 -0
  13. package/generated/.opencode/agdf-runtime-contract.md +24 -0
  14. package/generated/.opencode/agents/agdf-delivery-closeout.md +9 -4
  15. package/generated/.opencode/agents/agdf-delivery-path-search.md +76 -0
  16. package/generated/.opencode/agents/agdf-release-or.md +8 -4
  17. package/generated/AGENTS.md +2 -0
  18. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  19. package/generated/plugins/agdf/control/templates/AGDF_RUN.md +1 -0
  20. package/generated/plugins/agdf/control/templates/artefacts/OR.md +1 -0
  21. package/generated/plugins/agdf/meta/agdf-agent-router.md +2 -0
  22. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +6 -1
  23. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +24 -0
  24. package/generated/plugins/agdf/skills/delivery-closeout/SKILL.md +9 -4
  25. package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +75 -0
  26. package/generated/plugins/agdf/skills/delivery-path-search/help.md +5 -0
  27. package/generated/plugins/agdf/skills/release-or/SKILL.md +8 -4
  28. package/lib/delivery-path-search/candidate-policy.js +34 -0
  29. package/lib/delivery-path-search/contracts.js +110 -0
  30. package/lib/delivery-path-search/evaluators/codex.js +67 -0
  31. package/lib/delivery-path-search/evaluators/protocol.js +13 -0
  32. package/lib/delivery-path-search/persistence.js +34 -0
  33. package/lib/delivery-path-search/scoring.js +21 -0
  34. package/lib/delivery-path-search/search-engine.js +92 -0
  35. package/lib/delivery-path-search/state-adapter.js +58 -0
  36. package/lib/delivery-path-search/surfaces/capabilities.js +14 -0
  37. package/opencode-plugin.js +17 -5
  38. package/package.json +4 -2
@@ -52,6 +52,18 @@ It must not introduce a second gate model or override `agdf-gate-check`, `delive
52
52
 
53
53
  `quality_outlook` must not unlock gates, imply QA pass, or substitute for missing evidence.
54
54
 
55
+ ## Delivery Path Search
56
+
57
+ Delivery Path Search is an optional read-only planning step for high-impact decisions with several materially different next actions.
58
+
59
+ - It consumes current AGDF state and must reject gate-illegal candidates before model evaluation.
60
+ - It returns one advisory recommendation or `no_safe_recommendation`.
61
+ - It must report budgets, stopping reason and `full | tool_enforced | instruction_only` enforcement.
62
+ - Model scores are judgements, not measurements.
63
+ - Search output is evidence only. Canonical `agdf-gate-check` independently decides what may proceed.
64
+ - The bounded first-release algorithm must not be labelled MCTS.
65
+ - Surface adapters may translate transport and presentation, but must not fork scoring, search or gate semantics.
66
+
55
67
  The field names above are the stable machine-readable contract used by JSON
56
68
  reports and automation. Human-facing Markdown must present the same projection
57
69
  with readable labels such as `Current gate`, `Allowed now`, `Blocked by`,
@@ -254,6 +266,7 @@ When a run affects project memory or a Context Graph, use:
254
266
  - `Situation:` short plain-language summary when the impact is non-trivial
255
267
  - `context_graph_impact`: `none | link_only | update_existing_node | new_node_required | sot_drift`
256
268
  - `context_graph_refs`
269
+ - `context_graph_reconciliation`: `resolved | not_applicable | open_gap`
257
270
  - `context_graph_required_action`: `none | link | update | create | resolve_drift`
258
271
  - `context_graph_gate_effect`: `none | warning | revise | block`
259
272
  - `context_graph_evidence`
@@ -261,6 +274,17 @@ When a run affects project memory or a Context Graph, use:
261
274
  Do not create a new node for a mere version, a general chat summary, or a local observation without a concrete next clean step.
262
275
  `sot_drift` must not pass silently as a warning.
263
276
 
277
+ ### Context Graph Reconciliation
278
+
279
+ Relevant-run closeout must reconcile Context Graph impact before presenting a clean delivery handoff.
280
+
281
+ - Use `not_applicable` only when `context_graph_impact: none` and no durable graph knowledge is claimed.
282
+ - Use `resolved` when required graph work is complete and concrete refs are present.
283
+ - Use `open_gap` when graph work remains pending, refs are missing, or a node/update must still be curated.
284
+ - `link`, `update`, `create` and `resolve_drift` require either `resolved` evidence or an explicit `open_gap`.
285
+ - Resolved `link_only`, `update_existing_node` and `new_node_required` states require concrete `context_graph_refs`; `none`, empty refs or vague future-action language are not enough.
286
+ - OR and delivery-closeout must not present commit-ready, release-ready or otherwise clean handoff while `context_graph_reconciliation: open_gap` remains.
287
+
264
288
  ## Control Scaffold
265
289
 
266
290
  When a repository needs durable AGDF state, use the plugin-local `control/` scaffold as the starting point.
@@ -11,6 +11,7 @@ OpenCode project agents do not have a plugin namespace.
11
11
 
12
12
  Therefore generated OpenCode agent names use the AGDF prefix:
13
13
 
14
+ - `agdf-delivery-path-search`
14
15
  - `agdf-brownfield-analysis`
15
16
  - `agdf-clean-implementation-review`
16
17
  - `agdf-code-review`
@@ -48,6 +49,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
48
49
  ## Skill Routing
49
50
  | Skill | Use For | Boundary |
50
51
  |---|---|---|
52
+ | `agdf-delivery-path-search` | high-impact planning decisions with several plausible next delivery steps before implementation | read-only advisory search; never grants gate permission or replaces gate-check |
51
53
  | `agdf-brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
52
54
  | `agdf-clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
53
55
  | `agdf-code-review` | mandatory CR step after code changes, focused on defects, regression and security findings | does not replace TP review, clean review or QA |
@@ -105,6 +107,7 @@ For relevant runs that change durable state, code, artefacts or gate status:
105
107
  - The generated AGDF agents are `mode: subagent` workflow controls for internal routing. They are not OpenCode Skills under `.opencode/skills/` and are not intended to appear as primary menu agents.
106
108
  - The visible user entry point is repository instruction loading plus direct subagent handoff, for example `@agdf-gate-check` for new build/change intent or unclear approval.
107
109
  - The AGDF OpenCode plugin is loaded from npm through `opencode.json` `plugin: ["create-agdf"]`.
110
+ - Use `npx --yes @agdf/cli@latest opencode-status --json` to verify global config, package loadability, active session signals and repository surface presence separately.
108
111
  - OpenCode permissions keep `edit` and `bash` on explicit approval by default.
109
112
  - Shared output and gate rules live in `.opencode/agdf-runtime-contract.md`.
110
113
  - Do not paste full control files, templates or artefact bodies into chat unless the user explicitly asks for the full content; summarize and link paths instead.
@@ -9,6 +9,8 @@ These files were generated from the AGDF source repository for OpenCode.
9
9
  - `.opencode/agents/` contains AGDF subagents generated from the canonical AGDF skills.
10
10
  - These files intentionally do not install OpenCode Skills under `.opencode/skills/`; the AGDF agents are background workflow controls, not primary menu agents.
11
11
  - Use `@agdf-gate-check` as the visible entry point for new build/change intent or unclear approval.
12
+ - Use `npx --yes @agdf/cli@latest opencode-status --json` to distinguish global hook configuration, package loadability, session activity and this repository surface.
13
+ - Use `npx --yes @agdf/cli@latest gate-check --status-card` for compact interactive gate state; reserve full `--json` output for automation or audit evidence.
12
14
  - `.opencode/agdf-runtime-contract.md` is the shared gate and output contract.
13
15
 
14
16
  ## Agents
@@ -17,6 +19,7 @@ These files were generated from the AGDF source repository for OpenCode.
17
19
  - `agdf-clean-implementation-review`
18
20
  - `agdf-code-review`
19
21
  - `agdf-delivery-closeout`
22
+ - `agdf-delivery-path-search`
20
23
  - `agdf-gate-check`
21
24
  - `agdf-qa-gate`
22
25
  - `agdf-release-or`
@@ -52,6 +52,18 @@ It must not introduce a second gate model or override `agdf-gate-check`, `delive
52
52
 
53
53
  `quality_outlook` must not unlock gates, imply QA pass, or substitute for missing evidence.
54
54
 
55
+ ## Delivery Path Search
56
+
57
+ Delivery Path Search is an optional read-only planning step for high-impact decisions with several materially different next actions.
58
+
59
+ - It consumes current AGDF state and must reject gate-illegal candidates before model evaluation.
60
+ - It returns one advisory recommendation or `no_safe_recommendation`.
61
+ - It must report budgets, stopping reason and `full | tool_enforced | instruction_only` enforcement.
62
+ - Model scores are judgements, not measurements.
63
+ - Search output is evidence only. Canonical `agdf-gate-check` independently decides what may proceed.
64
+ - The bounded first-release algorithm must not be labelled MCTS.
65
+ - Surface adapters may translate transport and presentation, but must not fork scoring, search or gate semantics.
66
+
55
67
  The field names above are the stable machine-readable contract used by JSON
56
68
  reports and automation. Human-facing Markdown must present the same projection
57
69
  with readable labels such as `Current gate`, `Allowed now`, `Blocked by`,
@@ -254,6 +266,7 @@ When a run affects project memory or a Context Graph, use:
254
266
  - `Situation:` short plain-language summary when the impact is non-trivial
255
267
  - `context_graph_impact`: `none | link_only | update_existing_node | new_node_required | sot_drift`
256
268
  - `context_graph_refs`
269
+ - `context_graph_reconciliation`: `resolved | not_applicable | open_gap`
257
270
  - `context_graph_required_action`: `none | link | update | create | resolve_drift`
258
271
  - `context_graph_gate_effect`: `none | warning | revise | block`
259
272
  - `context_graph_evidence`
@@ -261,6 +274,17 @@ When a run affects project memory or a Context Graph, use:
261
274
  Do not create a new node for a mere version, a general chat summary, or a local observation without a concrete next clean step.
262
275
  `sot_drift` must not pass silently as a warning.
263
276
 
277
+ ### Context Graph Reconciliation
278
+
279
+ Relevant-run closeout must reconcile Context Graph impact before presenting a clean delivery handoff.
280
+
281
+ - Use `not_applicable` only when `context_graph_impact: none` and no durable graph knowledge is claimed.
282
+ - Use `resolved` when required graph work is complete and concrete refs are present.
283
+ - Use `open_gap` when graph work remains pending, refs are missing, or a node/update must still be curated.
284
+ - `link`, `update`, `create` and `resolve_drift` require either `resolved` evidence or an explicit `open_gap`.
285
+ - Resolved `link_only`, `update_existing_node` and `new_node_required` states require concrete `context_graph_refs`; `none`, empty refs or vague future-action language are not enough.
286
+ - OR and delivery-closeout must not present commit-ready, release-ready or otherwise clean handoff while `context_graph_reconciliation: open_gap` remains.
287
+
264
288
  ## Control Scaffold
265
289
 
266
290
  When a repository needs durable AGDF state, use the plugin-local `control/` scaffold as the starting point.
@@ -32,6 +32,7 @@ Use `../agdf-runtime-contract.md` for closeout discipline, gate terms, Context G
32
32
  4. `Approval: UAT` unlocks an active commit offer when code changes exist.
33
33
  5. No commit handoff for runs without code changes.
34
34
  6. Always include exactly one next step and one quality outlook.
35
+ 7. If OR, QA or current run state reports `context_graph_reconciliation: open_gap`, do not provide a clean commit-ready handoff; set the next step to resolve or explicitly retain the Context Graph gap.
35
36
 
36
37
  ## When To Use
37
38
  - after `QA pass` with code changes
@@ -62,8 +63,10 @@ If code-change status is unclear, do not claim a commit handoff.
62
63
  - `uat_approved_with_code`
63
64
  - `uat_approved_without_code`
64
65
  - `non_delivery_closeout`
65
- 2. Derive Git handoff only when code changes exist.
66
- 3. Set exactly one next delivery step:
66
+ 2. Check Context Graph reconciliation from OR, QA, review and current run state.
67
+ 3. If reconciliation is `open_gap`, report the delivery status as not cleanly handoff-ready and do not derive commit-ready Git text.
68
+ 4. Derive Git handoff only when code changes exist and no unresolved Context Graph gap remains.
69
+ 5. Set exactly one next delivery step:
67
70
  - offer commit
68
71
  - offer push
69
72
  - offer PR
@@ -71,13 +74,15 @@ If code-change status is unclear, do not claim a commit handoff.
71
74
  - run QA/review
72
75
  - obtain UAT/approval
73
76
  - perform documentation follow-up
74
- 4. Set quality outlook:
77
+ - resolve Context Graph gap
78
+ 6. Set quality outlook:
75
79
  - no further technical follow-up
76
80
  - more tests
77
81
  - refactoring
78
82
  - documentation sharpening
79
83
  - monitoring/runtime verification
80
- 5. If `Approval: UAT` exists and code changes were delivered, actively offer the commit but do not run it.
84
+ - Context Graph reconciliation
85
+ 7. If `Approval: UAT` exists, code changes were delivered, and no Context Graph gap remains, actively offer the commit but do not run it.
81
86
 
82
87
  ## Output
83
88
  For code-changing runs:
@@ -0,0 +1,76 @@
1
+ ---
2
+ description: high-impact planning decisions with several plausible next delivery steps before implementation
3
+ mode: subagent
4
+ ---
5
+
6
+ # Delivery Path Search
7
+
8
+ ## Purpose
9
+
10
+ Search a bounded set of possible delivery paths before implementation and return one safest evidence-backed next step.
11
+
12
+ The search is advisory and read-only. Canonical AGDF `agdf-gate-check` remains the only authority for whether the recommended step may proceed.
13
+
14
+ ## Runtime Contract
15
+
16
+ Use `../agdf-runtime-contract.md` for canonical gate state, output discipline and Delivery Path Search boundaries. This skill must not maintain a second gate or scoring model.
17
+
18
+ ## Trigger
19
+
20
+ Use only when at least one applies:
21
+
22
+ - high product, architecture, security, policy, persistence or release impact
23
+ - several materially different next actions are plausible
24
+ - a wrong decision would cause expensive rework
25
+ - the best evidence-gathering or test action is unclear
26
+
27
+ Skip for routine questions, obvious local fixes and approved implementation with one clear next action.
28
+
29
+ ## Workflow
30
+
31
+ 1. Run AGDF gate-check and inspect durable control state.
32
+ 2. Confirm that search is allowed and implementation is not occurring during exploration.
33
+ 3. Declare the active surface and its enforcement level.
34
+ 4. Invoke the shared CLI runtime:
35
+
36
+ ```bash
37
+ npx --yes @agdf/cli@latest delivery-path-search --surface <surface> --json
38
+ ```
39
+
40
+ 5. Treat facts, repository evidence, assumptions and model judgements separately.
41
+ 6. Return exactly one recommendation or `no_safe_recommendation`.
42
+ 7. Run canonical AGDF gate-check after search. Never translate a recommendation into permission.
43
+
44
+ ## Enforcement
45
+
46
+ Report exactly one:
47
+
48
+ - `full`: trusted lifecycle controls prevent writes
49
+ - `tool_enforced`: the evaluator receives read/evaluation tools only
50
+ - `instruction_only`: write prevention is instructional and not technically proven
51
+
52
+ Do not overstate the surface's guarantee.
53
+
54
+ ## Output
55
+
56
+ Keep chat output compact:
57
+
58
+ - recommendation or `no_safe_recommendation`
59
+ - current gate
60
+ - enforcement level
61
+ - decisive evidence and assumptions
62
+ - rejected alternatives and reasons
63
+ - budgets and stopping reason
64
+ - next AGDF gate action
65
+
66
+ Persist only the redacted decision summary when durable evidence is required. Do not persist raw prompts, hidden reasoning, secrets or source snapshots.
67
+
68
+ ## Boundaries
69
+
70
+ - This is bounded Delivery Path Search, not MCTS.
71
+ - Do not modify repository files during search.
72
+ - Do not execute evaluator-returned commands.
73
+ - Do not invent default scores for invalid evaluator output.
74
+ - Do not implement, approve or release based on search output.
75
+ - Do not create agent-specific scoring, gate logic or skill copies.
76
+
@@ -44,6 +44,8 @@ Use the Runtime Contract definition of `Relevant Run` to decide whether OR is ma
44
44
  10. `CD+Tests` is not completion.
45
45
  11. When moving a backlog item to Completed or Superseded, use the canonical human-readable table and link the final OR with a document-relative Markdown link.
46
46
  12. Keep machine status normalization in the CLI; do not write internal snake_case status values into the human-facing backlog.
47
+ 13. Reconcile Context Graph impact before clean closeout: report `context_graph_reconciliation: resolved | not_applicable | open_gap`.
48
+ 14. If Context Graph work remains unresolved, report it as an explicit open gap and do not describe the run as cleanly handoff-ready.
47
49
 
48
50
  ## When To Use
49
51
  - at the end of every relevant run
@@ -89,10 +91,11 @@ If information is missing, state the gap instead of guessing.
89
91
  6. Summarize Brownfield fit and solution integrity if reviewed.
90
92
  7. Summarize tests and verification.
91
93
  8. Summarize documentation and Context Graph impact if relevant.
92
- 9. Name retained fallbacks and exit criteria.
93
- 10. Set exactly one next permissible step.
94
- 11. Set exactly one quality outlook.
95
- 12. State whether `agdf-delivery-closeout` is the next operational handoff step when code changes exist and the delivery state allows it.
94
+ 9. Record Context Graph reconciliation as `resolved`, `not_applicable`, or `open_gap`.
95
+ 10. Name retained fallbacks and exit criteria.
96
+ 11. Set exactly one next permissible step.
97
+ 12. Set exactly one quality outlook.
98
+ 13. State whether `agdf-delivery-closeout` is the next operational handoff step when code changes exist and the delivery state allows it.
96
99
 
97
100
  ## Output
98
101
  Use a compact structure:
@@ -114,6 +117,7 @@ Use a compact structure:
114
117
  ```
115
118
 
116
119
  When Context Graph impact is relevant, include the fields from `../agdf-runtime-contract.md`.
120
+ Include `context_graph_reconciliation` whenever Context Graph impact is present. If the value is `open_gap`, required next step must resolve or explicitly retain that gap before commit-ready or release-ready handoff.
117
121
 
118
122
  ## Forbidden
119
123
  This skill must not:
@@ -11,6 +11,7 @@ GitHub Copilot repository skills do not have a plugin namespace.
11
11
 
12
12
  Therefore generated Copilot skill names use the AGDF prefix:
13
13
 
14
+ - `agdf-delivery-path-search`
14
15
  - `agdf-brownfield-analysis`
15
16
  - `agdf-clean-implementation-review`
16
17
  - `agdf-code-review`
@@ -48,6 +49,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
48
49
  ## Skill Routing
49
50
  | Skill | Use For | Boundary |
50
51
  |---|---|---|
52
+ | `agdf-delivery-path-search` | high-impact planning decisions with several plausible next delivery steps before implementation | read-only advisory search; never grants gate permission or replaces gate-check |
51
53
  | `agdf-brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
52
54
  | `agdf-clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
53
55
  | `agdf-code-review` | mandatory CR step after code changes, focused on defects, regression and security findings | does not replace TP review, clean review or QA |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "description": "Codex-first workflow skills for gated, auditable AI-assisted software delivery.",
5
5
  "author": {
6
6
  "name": "AI-native Governance & Delivery Framework",
@@ -117,6 +117,7 @@ Keep the active work item traceable. A gate may open only when the previous gate
117
117
 
118
118
  - context_graph_impact: `none | link_only | update_existing_node | new_node_required | sot_drift`
119
119
  - context_graph_refs:
120
+ - context_graph_reconciliation: `resolved | not_applicable | open_gap`
120
121
  - context_graph_required_action: `none | link | update | create | resolve_drift`
121
122
  - context_graph_gate_effect: `none | warning | revise | block`
122
123
  - context_graph_evidence:
@@ -81,6 +81,7 @@ This is a compact projection of the control state. It does not replace gate-chec
81
81
 
82
82
  - context_graph_impact: `none | link_only | update_existing_node | new_node_required | sot_drift`
83
83
  - context_graph_refs:
84
+ - context_graph_reconciliation: `resolved | not_applicable | open_gap`
84
85
  - context_graph_required_action: `none | link | update | create | resolve_drift`
85
86
  - context_graph_gate_effect: `none | warning | revise | block`
86
87
  - context_graph_evidence:
@@ -12,6 +12,7 @@ Codex and Claude Code already provide the `agdf` plugin namespace.
12
12
  Therefore plugin skill names are intentionally unprefixed:
13
13
 
14
14
  - `gate-check`
15
+ - `delivery-path-search`
15
16
  - `brownfield-analysis`
16
17
  - `task-plan-review`
17
18
  - `clean-implementation-review`
@@ -49,6 +50,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
49
50
  ## Skill Routing
50
51
  | Skill | Use For | Boundary |
51
52
  |---|---|---|
53
+ | `delivery-path-search` | high-impact planning decisions with several plausible next delivery steps before implementation | read-only advisory search; never grants gate permission or replaces gate-check |
52
54
  | `brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
53
55
  | `clean-implementation-review` | inspect workarounds, fallbacks, parallel structures or symptom fixes | not a TP or QA substitute |
54
56
  | `code-review` | mandatory CR step after code changes, focused on defects, regression and security findings | does not replace TP review, clean review or QA |
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.4.0",
4
+ "version": "0.4.2",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "AI-native Governance & Delivery Framework",
7
7
  "description": "Codex-first workflow skills for gated, auditable AI-assisted software delivery.",
@@ -61,6 +61,11 @@
61
61
  }
62
62
  },
63
63
  "skillSet": [
64
+ {
65
+ "slug": "delivery-path-search",
66
+ "useFor": "high-impact planning decisions with several plausible next delivery steps before implementation",
67
+ "boundary": "read-only advisory search; never grants gate permission or replaces gate-check"
68
+ },
64
69
  {
65
70
  "slug": "brownfield-analysis",
66
71
  "useFor": "after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems",
@@ -52,6 +52,18 @@ It must not introduce a second gate model or override `gate-check`, `delivery-ma
52
52
 
53
53
  `quality_outlook` must not unlock gates, imply QA pass, or substitute for missing evidence.
54
54
 
55
+ ## Delivery Path Search
56
+
57
+ Delivery Path Search is an optional read-only planning step for high-impact decisions with several materially different next actions.
58
+
59
+ - It consumes current AGDF state and must reject gate-illegal candidates before model evaluation.
60
+ - It returns one advisory recommendation or `no_safe_recommendation`.
61
+ - It must report budgets, stopping reason and `full | tool_enforced | instruction_only` enforcement.
62
+ - Model scores are judgements, not measurements.
63
+ - Search output is evidence only. Canonical `gate-check` independently decides what may proceed.
64
+ - The bounded first-release algorithm must not be labelled MCTS.
65
+ - Surface adapters may translate transport and presentation, but must not fork scoring, search or gate semantics.
66
+
55
67
  The field names above are the stable machine-readable contract used by JSON
56
68
  reports and automation. Human-facing Markdown must present the same projection
57
69
  with readable labels such as `Current gate`, `Allowed now`, `Blocked by`,
@@ -254,6 +266,7 @@ When a run affects project memory or a Context Graph, use:
254
266
  - `Situation:` short plain-language summary when the impact is non-trivial
255
267
  - `context_graph_impact`: `none | link_only | update_existing_node | new_node_required | sot_drift`
256
268
  - `context_graph_refs`
269
+ - `context_graph_reconciliation`: `resolved | not_applicable | open_gap`
257
270
  - `context_graph_required_action`: `none | link | update | create | resolve_drift`
258
271
  - `context_graph_gate_effect`: `none | warning | revise | block`
259
272
  - `context_graph_evidence`
@@ -261,6 +274,17 @@ When a run affects project memory or a Context Graph, use:
261
274
  Do not create a new node for a mere version, a general chat summary, or a local observation without a concrete next clean step.
262
275
  `sot_drift` must not pass silently as a warning.
263
276
 
277
+ ### Context Graph Reconciliation
278
+
279
+ Relevant-run closeout must reconcile Context Graph impact before presenting a clean delivery handoff.
280
+
281
+ - Use `not_applicable` only when `context_graph_impact: none` and no durable graph knowledge is claimed.
282
+ - Use `resolved` when required graph work is complete and concrete refs are present.
283
+ - Use `open_gap` when graph work remains pending, refs are missing, or a node/update must still be curated.
284
+ - `link`, `update`, `create` and `resolve_drift` require either `resolved` evidence or an explicit `open_gap`.
285
+ - Resolved `link_only`, `update_existing_node` and `new_node_required` states require concrete `context_graph_refs`; `none`, empty refs or vague future-action language are not enough.
286
+ - OR and delivery-closeout must not present commit-ready, release-ready or otherwise clean handoff while `context_graph_reconciliation: open_gap` remains.
287
+
264
288
  ## Control Scaffold
265
289
 
266
290
  When a repository needs durable AGDF state, use the plugin-local `control/` scaffold as the starting point.
@@ -32,6 +32,7 @@ Use `../../meta/agdf-runtime-contract.md` for closeout discipline, gate terms, C
32
32
  4. `Approval: UAT` unlocks an active commit offer when code changes exist.
33
33
  5. No commit handoff for runs without code changes.
34
34
  6. Always include exactly one next step and one quality outlook.
35
+ 7. If OR, QA or current run state reports `context_graph_reconciliation: open_gap`, do not provide a clean commit-ready handoff; set the next step to resolve or explicitly retain the Context Graph gap.
35
36
 
36
37
  ## When To Use
37
38
  - after `QA pass` with code changes
@@ -62,8 +63,10 @@ If code-change status is unclear, do not claim a commit handoff.
62
63
  - `uat_approved_with_code`
63
64
  - `uat_approved_without_code`
64
65
  - `non_delivery_closeout`
65
- 2. Derive Git handoff only when code changes exist.
66
- 3. Set exactly one next delivery step:
66
+ 2. Check Context Graph reconciliation from OR, QA, review and current run state.
67
+ 3. If reconciliation is `open_gap`, report the delivery status as not cleanly handoff-ready and do not derive commit-ready Git text.
68
+ 4. Derive Git handoff only when code changes exist and no unresolved Context Graph gap remains.
69
+ 5. Set exactly one next delivery step:
67
70
  - offer commit
68
71
  - offer push
69
72
  - offer PR
@@ -71,13 +74,15 @@ If code-change status is unclear, do not claim a commit handoff.
71
74
  - run QA/review
72
75
  - obtain UAT/approval
73
76
  - perform documentation follow-up
74
- 4. Set quality outlook:
77
+ - resolve Context Graph gap
78
+ 6. Set quality outlook:
75
79
  - no further technical follow-up
76
80
  - more tests
77
81
  - refactoring
78
82
  - documentation sharpening
79
83
  - monitoring/runtime verification
80
- 5. If `Approval: UAT` exists and code changes were delivered, actively offer the commit but do not run it.
84
+ - Context Graph reconciliation
85
+ 7. If `Approval: UAT` exists, code changes were delivered, and no Context Graph gap remains, actively offer the commit but do not run it.
81
86
 
82
87
  ## Output
83
88
  For code-changing runs:
@@ -0,0 +1,75 @@
1
+ ---
2
+ name: delivery-path-search
3
+ description: Use this skill for high-impact planning decisions when several materially different next delivery steps are plausible and comparing scope, risk, evidence, tests, cost and gate readiness would reduce expensive rework. Do not use for routine tasks, during implementation, or as gate permission.
4
+ ---
5
+
6
+ # Delivery Path Search
7
+
8
+ ## Purpose
9
+
10
+ Search a bounded set of possible delivery paths before implementation and return one safest evidence-backed next step.
11
+
12
+ The search is advisory and read-only. Canonical AGDF `gate-check` remains the only authority for whether the recommended step may proceed.
13
+
14
+ ## Runtime Contract
15
+
16
+ Use `../../meta/agdf-runtime-contract.md` for canonical gate state, output discipline and Delivery Path Search boundaries. This skill must not maintain a second gate or scoring model.
17
+
18
+ ## Trigger
19
+
20
+ Use only when at least one applies:
21
+
22
+ - high product, architecture, security, policy, persistence or release impact
23
+ - several materially different next actions are plausible
24
+ - a wrong decision would cause expensive rework
25
+ - the best evidence-gathering or test action is unclear
26
+
27
+ Skip for routine questions, obvious local fixes and approved implementation with one clear next action.
28
+
29
+ ## Workflow
30
+
31
+ 1. Run AGDF gate-check and inspect durable control state.
32
+ 2. Confirm that search is allowed and implementation is not occurring during exploration.
33
+ 3. Declare the active surface and its enforcement level.
34
+ 4. Invoke the shared CLI runtime:
35
+
36
+ ```bash
37
+ npx --yes @agdf/cli@latest delivery-path-search --surface <surface> --json
38
+ ```
39
+
40
+ 5. Treat facts, repository evidence, assumptions and model judgements separately.
41
+ 6. Return exactly one recommendation or `no_safe_recommendation`.
42
+ 7. Run canonical AGDF gate-check after search. Never translate a recommendation into permission.
43
+
44
+ ## Enforcement
45
+
46
+ Report exactly one:
47
+
48
+ - `full`: trusted lifecycle controls prevent writes
49
+ - `tool_enforced`: the evaluator receives read/evaluation tools only
50
+ - `instruction_only`: write prevention is instructional and not technically proven
51
+
52
+ Do not overstate the surface's guarantee.
53
+
54
+ ## Output
55
+
56
+ Keep chat output compact:
57
+
58
+ - recommendation or `no_safe_recommendation`
59
+ - current gate
60
+ - enforcement level
61
+ - decisive evidence and assumptions
62
+ - rejected alternatives and reasons
63
+ - budgets and stopping reason
64
+ - next AGDF gate action
65
+
66
+ Persist only the redacted decision summary when durable evidence is required. Do not persist raw prompts, hidden reasoning, secrets or source snapshots.
67
+
68
+ ## Boundaries
69
+
70
+ - This is bounded Delivery Path Search, not MCTS.
71
+ - Do not modify repository files during search.
72
+ - Do not execute evaluator-returned commands.
73
+ - Do not invent default scores for invalid evaluator output.
74
+ - Do not implement, approve or release based on search output.
75
+ - Do not create agent-specific scoring, gate logic or skill copies.
@@ -0,0 +1,5 @@
1
+ # Delivery Path Search
2
+
3
+ Use this workflow before implementation when competing high-impact delivery paths need an evidence-backed comparison.
4
+
5
+ It is read-only and advisory. The canonical AGDF gate-check still decides what may happen next.
@@ -44,6 +44,8 @@ Use the Runtime Contract definition of `Relevant Run` to decide whether OR is ma
44
44
  10. `CD+Tests` is not completion.
45
45
  11. When moving a backlog item to Completed or Superseded, use the canonical human-readable table and link the final OR with a document-relative Markdown link.
46
46
  12. Keep machine status normalization in the CLI; do not write internal snake_case status values into the human-facing backlog.
47
+ 13. Reconcile Context Graph impact before clean closeout: report `context_graph_reconciliation: resolved | not_applicable | open_gap`.
48
+ 14. If Context Graph work remains unresolved, report it as an explicit open gap and do not describe the run as cleanly handoff-ready.
47
49
 
48
50
  ## When To Use
49
51
  - at the end of every relevant run
@@ -89,10 +91,11 @@ If information is missing, state the gap instead of guessing.
89
91
  6. Summarize Brownfield fit and solution integrity if reviewed.
90
92
  7. Summarize tests and verification.
91
93
  8. Summarize documentation and Context Graph impact if relevant.
92
- 9. Name retained fallbacks and exit criteria.
93
- 10. Set exactly one next permissible step.
94
- 11. Set exactly one quality outlook.
95
- 12. State whether `delivery-closeout` is the next operational handoff step when code changes exist and the delivery state allows it.
94
+ 9. Record Context Graph reconciliation as `resolved`, `not_applicable`, or `open_gap`.
95
+ 10. Name retained fallbacks and exit criteria.
96
+ 11. Set exactly one next permissible step.
97
+ 12. Set exactly one quality outlook.
98
+ 13. State whether `delivery-closeout` is the next operational handoff step when code changes exist and the delivery state allows it.
96
99
 
97
100
  ## Output
98
101
  Use a compact structure:
@@ -114,6 +117,7 @@ Use a compact structure:
114
117
  ```
115
118
 
116
119
  When Context Graph impact is relevant, include the fields from `../../meta/agdf-runtime-contract.md`.
120
+ Include `context_graph_reconciliation` whenever Context Graph impact is present. If the value is `open_gap`, required next step must resolve or explicitly retain that gap before commit-ready or release-ready handoff.
117
121
 
118
122
  ## Forbidden
119
123
  This skill must not:
@@ -0,0 +1,34 @@
1
+ import { validateCandidate } from "./contracts.js";
2
+
3
+ function normalized(value) {
4
+ return String(value).toLowerCase().replace(/[`*_]/g, "").replace(/\s+/g, " ").trim();
5
+ }
6
+
7
+ export function candidateLegality(candidateValue, input) {
8
+ const candidate = validateCandidate(candidateValue);
9
+ const action = normalized(candidate.action);
10
+ const forbiddenMatch = input.forbidden_actions.find((item) => {
11
+ const forbidden = normalized(item);
12
+ return forbidden && action === forbidden;
13
+ });
14
+ if (forbiddenMatch) return { legal: false, reason: `forbidden_by_gate: ${forbiddenMatch}`, candidate };
15
+
16
+ const allowedMatch = input.allowed_actions.some((item) => {
17
+ const allowed = normalized(item);
18
+ return allowed && action === allowed;
19
+ });
20
+ if (!allowedMatch) return { legal: false, reason: "not_in_allowed_actions", candidate };
21
+ return { legal: true, reason: "allowed_by_current_gate", candidate };
22
+ }
23
+
24
+ export function candidatesFromInput(input) {
25
+ return input.allowed_actions.slice(0, input.budgets.max_candidates).map((action, index) => ({
26
+ id: `candidate-${index + 1}`,
27
+ action,
28
+ expected_evidence: input.evidence_refs,
29
+ tests: [],
30
+ assumptions: [],
31
+ depth: 0,
32
+ parent_id: null,
33
+ }));
34
+ }