create-agdf 0.7.0 → 0.7.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 (28) hide show
  1. package/README.md +43 -5
  2. package/bin/create-agdf.js +186 -10
  3. package/generated/.agdf/control/README.md +2 -1
  4. package/generated/.agdf/control/templates/AGDF_RUN.md +4 -3
  5. package/generated/.agdf/control/templates/RUN_STATE.md +2 -1
  6. package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +1 -1
  7. package/generated/.agdf/control/templates/artefacts/VERIFIED_CHANGE.md +48 -0
  8. package/generated/.github/skills/agdf-gate-check/SKILL.md +27 -0
  9. package/generated/.github/skills/agdf-runtime-contract.md +76 -5
  10. package/generated/.opencode/AGDF.md +5 -4
  11. package/generated/.opencode/README.md +2 -1
  12. package/generated/.opencode/agdf-runtime-contract.md +76 -5
  13. package/generated/.opencode/skills/agdf-gate-check/SKILL.md +27 -0
  14. package/generated/AGENTS.md +3 -3
  15. package/generated/opencode.json +1 -0
  16. package/generated/plugins/agdf/.codex-plugin/plugin.json +2 -2
  17. package/generated/plugins/agdf/control/README.md +2 -1
  18. package/generated/plugins/agdf/control/templates/AGDF_RUN.md +4 -3
  19. package/generated/plugins/agdf/control/templates/RUN_STATE.md +2 -1
  20. package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +1 -1
  21. package/generated/plugins/agdf/control/templates/artefacts/VERIFIED_CHANGE.md +48 -0
  22. package/generated/plugins/agdf/meta/agdf-agent-router.md +3 -3
  23. package/generated/plugins/agdf/meta/agdf-constitution.md +3 -3
  24. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +32 -2
  25. package/generated/plugins/agdf/meta/agdf-runtime-contract.md +76 -5
  26. package/generated/plugins/agdf/meta/agdf-tenets.md +5 -0
  27. package/generated/plugins/agdf/skills/gate-check/SKILL.md +27 -0
  28. package/package.json +4 -2
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.7.0",
4
+ "version": "0.7.2",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "Arndt Gold",
7
7
  "description": "Codex-first operating system for governed AI-assisted delivery.",
@@ -35,7 +35,7 @@
35
35
  "Write"
36
36
  ],
37
37
  "defaultPrompt": [
38
- "Evaluate whether AGDF is appropriate for this repository and request. Explain its purpose, practical value, governance overhead, and fit for the project's risk level. Recommend the smallest suitable AGDF path before proposing implementation.",
38
+ "Assess whether AGDF is proportionate for this repository and request before proposing any implementation. Explain AGDF's purpose and practical benefits, weigh governance overhead against the project's delivery risk, and recommend the lightest suitable path — or explicitly advise against AGDF where it would add more process than value.",
39
39
  "Start this request under AGDF governance.",
40
40
  "Create durable AGDF control state for this repository.",
41
41
  "Close this delivery run with an auditable AGDF report."
@@ -57,6 +57,7 @@
57
57
  "instructionsFileName": "AGDF.md",
58
58
  "npmPackage": "create-agdf",
59
59
  "permissions": {
60
+ "question": "allow",
60
61
  "edit": "ask",
61
62
  "bash": "ask",
62
63
  "skill": {
@@ -64,6 +65,35 @@
64
65
  }
65
66
  }
66
67
  },
68
+ "interactions": {
69
+ "fallback": "exact_text",
70
+ "surfaces": {
71
+ "codex": {
72
+ "questionAdapter": "request_user_input",
73
+ "availability": "when_callable",
74
+ "gateSafety": "omit_auto_resolution",
75
+ "technicalPermissionOwner": "codex_host"
76
+ },
77
+ "claude": {
78
+ "questionAdapter": "AskUserQuestion",
79
+ "availability": "when_no_auto_continue_timeout",
80
+ "gateSafety": "no_timeout_or_hook_supplied_answer",
81
+ "technicalPermissionOwner": "claude_host"
82
+ },
83
+ "opencode": {
84
+ "questionAdapter": "question",
85
+ "availability": "when_permission_question_allows",
86
+ "gateSafety": "preserve_explicit_deny",
87
+ "technicalPermissionOwner": "opencode_host"
88
+ },
89
+ "fallback": {
90
+ "questionAdapter": "exact_text",
91
+ "availability": "always",
92
+ "gateSafety": "wait_for_deliberate_user_input",
93
+ "technicalPermissionOwner": "host_specific"
94
+ }
95
+ }
96
+ },
67
97
  "skillSet": [
68
98
  {
69
99
  "slug": "delivery-path-search",
@@ -27,6 +27,20 @@ Use this compact output shape when no formal gate artefact is required:
27
27
 
28
28
  Do not add a separate `Quality outlook` line for pure Quick Tasks unless the task became a relevant run.
29
29
 
30
+ ### Verified Change
31
+
32
+ `verified_change` is a compact, fail-closed path for a bounded user-visible change with one canonical owner and deterministic proof. It is neither a prose exception nor a new user approval gate.
33
+
34
+ After `Approval: UR`, Brownfield Review may select `verified_change` only when a durable `VERIFIED_CHANGE.md` record can prove all of the following before implementation:
35
+
36
+ 1. exactly one repository-relative canonical owner and bounded source/derived paths;
37
+ 2. no gate, permission, security, persistence, architecture, external API, CLI or release behavior impact;
38
+ 3. deterministic propagation when derived paths exist, plus at least one deterministic validation command;
39
+ 4. tracked and untracked worktree baseline paths captured before eligibility, with no candidate path already dirty; and
40
+ 5. an explicit `structured_slice` or `structured_delivery` escalation target.
41
+
42
+ The record is the compact eligibility, execution and mini-closeout artefact. A missing, failed, unknown or ambiguous field/check must fail closed: mark the record `escalated` and continue at its declared structured target. Unrelated paths already dirty at baseline remain isolated; newly introduced unlisted paths invalidate the compact path. An executed record requires passing validation evidence and, where applicable, passing propagation evidence.
43
+
30
44
  ### Non-Normative Trivial Change Boundary
31
45
 
32
46
  A `quick_task` whose entire diff stays fully outside all of the following paths may close using only
@@ -68,10 +82,10 @@ the full existing ceremony unchanged:
68
82
  When a run needs an operational status view, use the Run Status Card as a compact projection of existing control state.
69
83
  It must not introduce a second gate model or override `gate-check`, `delivery-map`, QA, OR, or user approvals.
70
84
 
71
- - `mode`: `quick_task | structured_delivery | unknown`
85
+ - `mode`: `quick_task | verified_change | structured_delivery | unknown`
72
86
  - `status`: `open | blocked | pass | warn | revise | block | in_progress`
73
87
  - `current_gate`: current user gate or internal step
74
- - `mode_slice_decision`: `undecided | quick_task | structured_slice | structured_delivery | block`
88
+ - `mode_slice_decision`: `undecided | quick_task | verified_change | structured_slice | structured_delivery | block`
75
89
  - `allowed_now`: outputs or actions currently permitted
76
90
  - `forbidden_now`: outputs or actions currently forbidden
77
91
  - `blocking_condition`: current blocker or `none`
@@ -232,7 +246,7 @@ section or any other existing line.
232
246
  ## Gate Rules
233
247
 
234
248
  - User gates: `UR -> PRD -> SD -> TP -> QA -> UAT`
235
- - Internal mandatory steps: `Brownfield Review -> Mode/Slice Decision -> Brownfield Analysis -> CD+Tests -> CR -> OR`
249
+ - Internal mandatory steps: `Brownfield Review -> Mode/Slice Decision -> Verified Change Execution | Brownfield Analysis -> CD+Tests -> CR -> OR`
236
250
  - On the approved-TP path, `CD+Tests` and `CR` are satisfied only by `done`; `not_applicable` may satisfy Brownfield Review or Brownfield Analysis, but it must not bypass implementation/test evidence or mandatory Code Review.
237
251
  - Exact approval formula: `Approval: <GateName>`
238
252
  - Legacy alias: `Freigabe: <GateName>` may be accepted when reviewing older German runs, but all new outputs must use `Approval: <GateName>`.
@@ -254,6 +268,58 @@ section or any other existing line.
254
268
  - `release-or` reports the run, but does not replace QA or produce the operative commit/PR handoff.
255
269
  - `delivery-closeout` owns the operative Git handoff text when QA/OR/UAT state allows it.
256
270
 
271
+ ## Native Interaction Contract
272
+
273
+ Native host controls improve how a decision is presented; they do not create a second approval model or authority source.
274
+
275
+ Every AGDF interaction belongs to exactly one semantic kind:
276
+
277
+ - `clarification`: asks for missing intent or a choice that does not itself authorize a gated transition.
278
+ - `tool_permission`: requests host-owned authority for a command, file change, network access, external path, app action or comparable technical side effect.
279
+ - `gate_approval`: requests deliberate user input for the one current AGDF user gate after its durable artefact and selected run are ready.
280
+
281
+ The semantic interaction envelope is:
282
+
283
+ ```text
284
+ interaction_kind: clarification | tool_permission | gate_approval
285
+ surface: codex | claude | opencode | fallback
286
+ run_id: required for gate_approval
287
+ current_gate: required for gate_approval
288
+ prompt: required
289
+ options: required for a structured question
290
+ effects: required when the interaction can cause side effects
291
+ required_evidence: required for gate_approval
292
+ auto_resolution: forbidden for gate_approval
293
+ response_origin: deliberate_user_input for gate_approval
294
+ ```
295
+
296
+ This envelope is not a new persisted record. The selected canonical `RUN_STATE.md` and existing artefact chain remain the durable authority.
297
+
298
+ Before presenting `gate_approval`, the agent must:
299
+
300
+ 1. resolve exactly one selected run;
301
+ 2. run the canonical gate evaluation and confirm that the current gate's durable artefact is present and ready;
302
+ 3. ask exactly one gate question that identifies `run_id` and `current_gate` and offers the exact approving value `Approval: <GateName>` plus bounded revise and cancel/decline outcomes;
303
+ 4. wait for deliberate user input without a timeout, default, preselection, hook-supplied answer or agent-to-agent substitute;
304
+ 5. re-run canonical gate evaluation against the same `run_id` and expected gate immediately before persistence;
305
+ 6. reject missing evidence, ambiguous or wrong run, wrong gate, stale state and any response that is no longer valid;
306
+ 7. persist an accepted approval only through the existing control-state workflow.
307
+
308
+ A free-form native response is valid only when the existing exact-approval validator accepts it for the current gate after revalidation. Revise, decline and cancel outcomes never advance a gate.
309
+
310
+ Surface adapter rules:
311
+
312
+ | Surface | Native question adapter | Gate-safe use | Technical permission boundary |
313
+ |---|---|---|---|
314
+ | Codex | native `request_user_input` or equivalent short-question control when callable | one gate question; omit auto-resolution; otherwise use exact text | Codex command, edit, network, external-directory and app-action approvals remain host-owned `tool_permission`. |
315
+ | Claude Code | `AskUserQuestion` | use only when no timeout can auto-continue and no hook supplies `answers` or `updatedInput`; otherwise use exact text | Claude permissions and `ExitPlanMode` are not AGDF approval. |
316
+ | OpenCode | built-in `question` | use with exact approval/revise/cancel options when `permission.question` permits it; explicit user deny selects exact-text fallback | `once`, `always`, `reject`, permission suggestions and auto mode are technical outcomes only. |
317
+ | Fallback or non-interactive | concise exact text | wait for a new explicit user response; never synthesize or auto-resolve one | Host-specific technical permission remains separate. |
318
+
319
+ Native structured questions are for real decision points. Prefer repository inspection over clarification and do not show them for status reporting, discoverable facts, routine read-only work or repeated non-ready gate prompts.
320
+
321
+ 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.
322
+
257
323
  ## Brownfield Review After G-00
258
324
 
259
325
  After an approved and durable UR, perform a lightweight `Brownfield Review` before PRD when Brownfield, UI, UX, admin, runtime, policy, persistence, architecture, ownership or source-of-truth impact is possible.
@@ -264,7 +330,7 @@ It is the sizing and routing step that decides how much later gate discipline is
264
330
  Its output is limited to:
265
331
 
266
332
  - workstream or follow-up-slice classification
267
- - `Mode/Slice Decision`: `quick_task | structured_slice | structured_delivery | block`
333
+ - `Mode/Slice Decision`: `quick_task | verified_change | structured_slice | structured_delivery | block`
268
334
  - affected existing owners, source-of-truth artefacts, contracts, policies, runtime paths or tests
269
335
  - reuse-before-create risks and parallel-structure risks
270
336
  - open questions that PRD or SD must resolve
@@ -273,6 +339,7 @@ Its output is limited to:
273
339
  Mode/Slice Decision rules:
274
340
 
275
341
  - `quick_task`: use only when Brownfield Review shows a narrow local change, no new product semantics beyond the approved UR, no architecture/policy/persistence/contract expansion, and evidence is sufficient to proceed with a small implementation plus relevant checks.
342
+ - `verified_change`: use only when the compact record can prove one canonical owner, bounded clean-at-baseline paths, no prohibited impact, deterministic propagation/validation and a structured escalation target. It skips later approvals only after every condition is evidenced and machine-validated.
276
343
  - `structured_slice`: use when some formal artefacts are needed, but they can stay intentionally small and scoped to the approved slice.
277
344
  - `structured_delivery`: use when the change has broad product, architecture, runtime, policy, persistence, release or cross-owner impact.
278
345
  - `block`: use when ownership, SoT, impact, evidence or product direction is not clear enough to choose a safe path.
@@ -287,8 +354,12 @@ This table is the canonical transition model. Skills may reference it, but must
287
354
  |---|---|---|---|---|
288
355
  | No approved UR | `UR` | clarify user need, formulate and persist UR, request `Approval: UR` | PRD, SD, TP, Brownfield Analysis, implementation, QA, release | `Approval: UR` |
289
356
  | `UR` approved and UR artefact persisted or linked, Brownfield Review missing | `Brownfield Review` | classify workstream, existing owners, SoT, reuse risks, change size and PRD/SD open questions; mark review done or not_applicable | PRD, SD, TP, implementation, QA, release | none |
290
- | Brownfield Review done or not_applicable, Mode/Slice Decision missing or incomplete | `Mode/Slice Decision` | decide `quick_task`, `structured_slice`, `structured_delivery` or `block`; record scope reason, evidence and required next gate depth | PRD, SD, TP, implementation, QA, release | none |
357
+ | Brownfield Review done or not_applicable, Mode/Slice Decision missing or incomplete | `Mode/Slice Decision` | decide `quick_task`, `verified_change`, `structured_slice`, `structured_delivery` or `block`; record scope reason, evidence and required next gate depth | PRD, SD, TP, implementation, QA, release | none |
291
358
  | Mode/Slice Decision is `quick_task` | `Quick Task Execution` | implement only the narrow approved UR scope, run relevant checks, record evidence and OR-lite when the run is relevant | broad PRD/SD/TP by ritual, scope expansion, QA or release claims without evidence | none |
359
+ | Mode/Slice Decision is `verified_change`, record missing/draft/invalid | `Verified Change Execution` | create or repair compact record, capture baseline and prove eligibility with doctor/gate-check | implementation, QA, UAT, release | none |
360
+ | Verified Change record is `eligible` | `Verified Change Execution` | implement only declared paths, run declared propagation/validation, record mini-closeout | unlisted paths, prohibited impacts, QA/UAT/release claims | none |
361
+ | Verified Change record is `executed` | `OR` | use mini-closeout and offer delivery closeout when requested | PRD/SD/TP/QA/UAT by ritual; automatic VCS actions | none |
362
+ | Verified Change record is `escalated` | `PRD` | draft the PRD for declared `structured_slice` or `structured_delivery` escalation target | implementation through Verified Change | `Approval: PRD` |
292
363
  | Mode/Slice Decision is `structured_slice` or `structured_delivery`, PRD missing or draft | `PRD` | draft/refine PRD at the smallest justified depth, define scope, acceptance criteria and non-goals, persist/link PRD, request `Approval: PRD` | SD, TP, implementation-preparation Brownfield Analysis, implementation, QA, release | `Approval: PRD` |
293
364
  | `PRD` approved and PRD artefact persisted or linked, SD missing or draft | `SD` | draft/refine Solution Design, ownership and architecture, persist/link SD, request `Approval: SD` | TP, implementation, QA, release | `Approval: SD` |
294
365
  | `SD` approved and SD artefact persisted or linked, TP missing or draft | `TP` | draft/refine Task/Test Plan, task IDs, evidence plan, persist/link TP, request `Approval: TP` | implementation, QA, release | `Approval: TP` |
@@ -23,6 +23,11 @@ you *MUST* honor the following **GENERIC TENETS**:
23
23
  and tooling maintenance when no new product meaning, user capability,
24
24
  architecture, policy or persistence decision is introduced.
25
25
 
26
+ Verified Change may handle a bounded user-visible canonical metadata or
27
+ copy change only after approved UR and Brownfield Review when the Runtime
28
+ Contract record proves one owner, clean-at-baseline paths, no prohibited
29
+ impact and deterministic validation; every uncertainty escalates.
30
+
26
31
  - **Fail Closed**:
27
32
  When a necessary approval, input, or quality statement is missing,
28
33
  the process must stop or demand revision.
@@ -52,6 +52,32 @@ npx --yes @agdf/cli@latest delivery-map --json
52
52
 
53
53
  The CLI reports are validators and JSON evidence, not the primary user experience, not a required ritual for normal work and not a second rule system. If a report says `blocked`, do not continue with later-gate artefacts until the reported blocker is resolved.
54
54
 
55
+ ## Native Interaction Path
56
+
57
+ Use the Runtime Contract's Native Interaction Contract to classify every candidate interaction as `clarification`, `tool_permission` or `gate_approval` before selecting a host control.
58
+
59
+ Prefer inspection over asking. Do not invoke a structured question for status reporting, facts available in the repository, routine read-only work or a gate that is not ready. Do not repeatedly prompt for the same non-ready gate.
60
+
61
+ For a ready `gate_approval`:
62
+
63
+ 1. Resolve exactly one selected run and evaluate the current gate.
64
+ 2. Confirm the required durable artefact is present and ready before presenting a question.
65
+ 3. Ask exactly one question that names the selected `run_id` and `current_gate`.
66
+ 4. Offer the exact approving option `Approval: <GateName>` plus bounded revise and cancel/decline outcomes.
67
+ 5. Use the surface adapter declared in the canonical plugin definition only when it can wait for deliberate input without auto-resolution; otherwise request the same exact approval in concise text.
68
+ 6. Re-run gate evaluation for the same run and expected gate after the response and immediately before persistence.
69
+ 7. Reject a missing artefact, ambiguous or wrong run, wrong gate, stale expected gate, timeout/default, hook-supplied answer, agent message, technical permission outcome or plan approval.
70
+ 8. Persist accepted input only through the existing control-state workflow.
71
+
72
+ Surface behavior:
73
+
74
+ - Codex: use the native short-question/request-user-input control when callable, ask one gate question and omit auto-resolution.
75
+ - Claude Code: use `AskUserQuestion` only when no timeout can auto-continue and no hook supplies `answers` or `updatedInput`; otherwise use exact text. Claude permissions and `ExitPlanMode` remain separate.
76
+ - OpenCode: use built-in `question` when permitted. Preserve explicit `permission.question` denial and use exact text in that case. `once`, `always`, `reject` and auto mode never become gate input.
77
+ - Other, unavailable or non-interactive surfaces: use exact textual approval and wait for a new explicit user response.
78
+
79
+ A free-form response must still exactly match the current gate's approval formula after revalidation. Revise, decline and cancel never advance the gate. Native presentation, host permission and plan approval are inputs or separate authority domains, never durable AGDF authority.
80
+
55
81
  ## Rules
56
82
  1. Fail closed when a required approval or artefact status is missing.
57
83
  2. The earliest blocking gate wins.
@@ -72,6 +98,7 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
72
98
  17. If multiple active scopes are plausible, list the evidenced competing lines and keep the current step at scope clarification or the earliest common safe gate.
73
99
  18. When maintaining `MASTER_BACKLOG.md`, use its canonical compact columns, readable status labels and document-relative Markdown links. Do not expose raw long paths or internal snake_case statuses in the human-facing table. The canonical status/artefact label vocabulary is defined in the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section; do not invent other labels.
74
100
  19. Preserve legacy backlog compatibility through the CLI parser; do not create a second surface-specific backlog format.
101
+ 20. Native interaction must follow the Runtime Contract's interaction envelope, readiness check, deliberate-user-input requirement and post-response revalidation boundary.
75
102
 
76
103
  ## Gate Evaluation
77
104
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "description": "Bootstrap AGDF repository-local plugin files, Copilot/OpenCode instructions, skills, control files and machine-readable checks.",
5
5
  "type": "module",
6
6
  "files": [
@@ -25,9 +25,11 @@
25
25
  "test:delivery-path-search-unit": "node ./scripts/delivery-path-search-unit-test.js",
26
26
  "test:delivery-path-search-generator": "node ./scripts/delivery-path-search-generator-test.js",
27
27
  "test:control-state": "node ./scripts/control-state-test.js",
28
+ "test:verified-change": "node ./scripts/verified-change-test.js",
29
+ "test:runtime-integrity-negative": "node ./scripts/runtime-integrity-negative-test.js",
28
30
  "test:release-bootstrap": "node ./scripts/release-bootstrap-smoke-test.js",
29
31
  "test:routing": "npm run sync-package-assets && node ./scripts/test-routing.js",
30
- "smoke-test": "npm run sync-package-assets && npm run test:control-state && npm run test:delivery-path-search && npm run test:delivery-path-search-unit && npm run test:delivery-path-search-generator && node ./scripts/smoke-test.js && node ./scripts/test-routing.js",
32
+ "smoke-test": "npm run sync-package-assets && npm run test:control-state && npm run test:verified-change && npm run test:runtime-integrity-negative && npm run test:delivery-path-search && npm run test:delivery-path-search-unit && npm run test:delivery-path-search-generator && node ./scripts/smoke-test.js && node ./scripts/test-routing.js",
31
33
  "prepack": "npm run sync-package-assets"
32
34
  },
33
35
  "keywords": [