create-agdf 0.9.7 → 0.9.9
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.
- package/README.md +11 -1
- package/generated/.github/copilot-instructions.md +1 -1
- package/generated/.github/skills/agdf-gate-check/SKILL.md +13 -7
- package/generated/.github/skills/agdf-interaction-locales.json +42 -12
- package/generated/.github/skills/contracts/control-scaffold.md +1 -1
- package/generated/.github/skills/contracts/interaction.md +43 -9
- package/generated/.opencode/README.md +1 -1
- package/generated/.opencode/agdf-interaction-locales.json +42 -12
- package/generated/.opencode/contracts/control-scaffold.md +1 -1
- package/generated/.opencode/contracts/interaction.md +43 -9
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +13 -7
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +42 -12
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/agdf/meta/contracts/control-scaffold.md +1 -1
- package/generated/plugins/agdf/meta/contracts/interaction.md +43 -9
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +13 -7
- package/lib/cli/application.js +16 -8
- package/lib/cli/command-registry.js +19 -1
- package/lib/cli/parse-args.js +3 -0
- package/lib/control-evaluation/gate-check.js +58 -3
- package/lib/interaction-presentation.js +114 -14
- package/lib/lifecycle/result.js +11 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,11 @@ AGDF is useful when AI-assisted work can affect an existing system and a team ne
|
|
|
6
6
|
|
|
7
7
|
## Quick start
|
|
8
8
|
|
|
9
|
+
AGDF's normal operating model has three roles: chat/skills provide the user interaction,
|
|
10
|
+
`.agdf/control/` owns durable state and the CLI validates or renders that state. The CLI is not a
|
|
11
|
+
second gate system. Use `npx ...@latest` below for installation and explicit refresh; after
|
|
12
|
+
`npm install -g @agdf/cli`, prefer `agdf ...` for repeated local checks.
|
|
13
|
+
|
|
9
14
|
If you use Codex, this is the recommended first installation:
|
|
10
15
|
|
|
11
16
|
```bash
|
|
@@ -46,6 +51,7 @@ npx --yes @agdf/cli@latest init
|
|
|
46
51
|
npx --yes @agdf/cli@latest config --language en
|
|
47
52
|
npx --yes @agdf/cli@latest doctor
|
|
48
53
|
npx --yes @agdf/cli@latest gate-check --status-card
|
|
54
|
+
npx --yes @agdf/cli@latest gate-check --approval-envelope
|
|
49
55
|
npx --yes @agdf/cli@latest gate-check --json
|
|
50
56
|
```
|
|
51
57
|
|
|
@@ -209,7 +215,11 @@ npx --yes create-agdf@latest gate-check --json
|
|
|
209
215
|
|
|
210
216
|
The gate check reports `open | blocked`, the current gate, blocking reason, missing exact approval, allowed outputs, forbidden outputs, next allowed action, evidence references and the embedded doctor report.
|
|
211
217
|
|
|
212
|
-
Use `gate-check --
|
|
218
|
+
Use an installed `agdf gate-check --approval-envelope` to print deterministic ready-gate cards and the
|
|
219
|
+
exact-text request without a fresh registry lookup. Use `gate-check --status-card` for compact
|
|
220
|
+
operational detail and keep `gate-check --json` for native-adapter input, automation, CI, regression
|
|
221
|
+
evidence and audit trails. The CLI output validates and renders the selected run; it does not replace
|
|
222
|
+
the agent-native workflow or approve a gate.
|
|
213
223
|
|
|
214
224
|
Use `delivery-path-search` only for high-impact planning decisions with several materially different next steps:
|
|
215
225
|
|
|
@@ -13,4 +13,4 @@ AGDF is active in this repository.
|
|
|
13
13
|
- Do not infer gate approval from generic consent such as "ok", "go ahead", "do it", "continue", "leg los" or "approved".
|
|
14
14
|
- Do not treat chat history as the source of truth for gate state, approvals, evidence or delivery status.
|
|
15
15
|
- 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.
|
|
16
|
-
- For
|
|
16
|
+
- For deterministic ready-gate rendering, prefer an installed `agdf gate-check --approval-envelope`; use `agdf gate-check --json` for native-adapter input, automation or audit evidence. Reserve `npx ...@latest` for bootstrap, installation, refresh or a missing local executable.
|
|
@@ -44,7 +44,7 @@ If required control files are missing, do not automatically create a full `.agdf
|
|
|
44
44
|
The default first action is to draft the minimal UR in the response and request `Approval: UR`.
|
|
45
45
|
Use `init` only when the user explicitly asks for durable AGDF control state, the repository already uses `.agdf/control/` as its live working state, or a deterministic CLI/CI setup path is being executed.
|
|
46
46
|
|
|
47
|
-
Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, when CI or PR evidence is needed, or when a repository-local automation needs JSON output:
|
|
47
|
+
Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, when CI or PR evidence is needed, when deterministic ready-gate rendering is required, or when a repository-local automation needs JSON output. Prefer an already installed `agdf` executable; use registry-resolved `npx ...@latest` only for bootstrap, installation, explicit refresh or when no local executable exists:
|
|
48
48
|
|
|
49
49
|
```bash
|
|
50
50
|
npx --yes @agdf/cli@latest init
|
|
@@ -53,6 +53,11 @@ npx --yes @agdf/cli@latest gate-check --json
|
|
|
53
53
|
npx --yes @agdf/cli@latest delivery-map --json
|
|
54
54
|
```
|
|
55
55
|
|
|
56
|
+
For repeated local checks, use `agdf doctor --json`, `agdf gate-check --json` or
|
|
57
|
+
`agdf gate-check --approval-envelope`. The last command prints the validated
|
|
58
|
+
two-card exact-text interaction; JSON exposes the same `approval_presentation`
|
|
59
|
+
for a native-capable adapter.
|
|
60
|
+
|
|
56
61
|
`init` creates the control scaffold. `doctor` checks whether `.agdf/control/` is actionable. `agdf-gate-check` consumes that result and the selected canonical run record to report the operative process decision: `open | blocked`, current gate, blocking reason, missing approval, allowed outputs, forbidden outputs, next allowed action and evidence references.
|
|
57
62
|
`delivery-map` reports the durable delivery picture: active artefacts, approvals, Artefact Chain relationships, evidence refs, missing evidence, risks, Context Graph gate effect and machine-readable findings.
|
|
58
63
|
|
|
@@ -73,15 +78,15 @@ For a ready `gate_approval`:
|
|
|
73
78
|
|
|
74
79
|
1. Resolve exactly one selected run and evaluate the current gate.
|
|
75
80
|
2. Confirm the required durable artefact is present and ready before presenting a question.
|
|
76
|
-
3.
|
|
77
|
-
4.
|
|
78
|
-
5.
|
|
79
|
-
6.
|
|
81
|
+
3. Consume the validated canonical `approval_presentation` for the same selected run, gate and revision. Do not compose or rewrite headings, fields, card order, locale copy or Markdown in the model.
|
|
82
|
+
4. Emit its complete `run_status_card` block first and `gate_transition_card` block second in one immediately preceding assistant message. The first heading is neutral; the five status fields are selected run, readiness, current gate, human-readable required decision and a neutral approve/revise/decline instruction. The exact approval value appears only in the transition card across these two blocks.
|
|
83
|
+
5. Never put either card only into the question, button description or hidden tool context. Do not invoke a native question until both rendered blocks are visible.
|
|
84
|
+
6. If the projection is absent or invalid, render no partial card and invoke no native control. Re-evaluate the gate. Use only the exact-text request when the same gate is still ready and its canonical value is independently valid; otherwise report the non-ready reason and request no decision.
|
|
80
85
|
7. Distinguish internal process steps from user decisions in natural language. For example, after `Approval: TP`, say that pre-implementation Brownfield Analysis runs next and that no further user action is required now; do not expose `next_user_gate: none` or `user_action_required: no`, and do not ask for a second approval for Brownfield Analysis.
|
|
81
86
|
8. Ask exactly one question that names the selected `run_id` and `current_gate`.
|
|
82
87
|
9. Offer options in stable order: exact `Approval: <GateName>`, localized revise and localized decline. Add explicit cancel only where supported after decline; otherwise host dismissal maps to cancel. Never preselect, skip, auto-submit or reorder an option.
|
|
83
88
|
10. Use the surface adapter declared in the canonical plugin definition only when it can wait for deliberate input without auto-resolution and can transport `exact_option_value` or `separate_label_and_value`; never invoke a `decorated_label_only` adapter. Otherwise request the same exact approval in concise text.
|
|
84
|
-
11. Render both cards once in that single complete assistant message. Never merge, reverse, omit or
|
|
89
|
+
11. Render both supplied cards once in that single complete assistant message. Never merge, reverse, omit, duplicate or reconstruct them; the decision heading does not replace either card. If the native attempt is unavailable or not applied, continue to exact text without repeating either card.
|
|
85
90
|
12. Re-run gate evaluation for the same run and expected gate after the response and immediately before persistence.
|
|
86
91
|
13. 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.
|
|
87
92
|
14. Persist accepted input only through the existing control-state workflow.
|
|
@@ -95,7 +100,7 @@ A hook, permission result or session context message cannot replace an eligible
|
|
|
95
100
|
|
|
96
101
|
Before composing the question, resolve the configured chat locale from `.agdf/control/config.json` through `../agdf-interaction-locales.json`: exact complete pack, language subtag, then English fallback. German and English are initial packs, not a closed language list. Keep `Approval: <GateName>` exactly unchanged in every language, and do not mix presentation languages within one interaction. Labels and descriptions use the same resolved locale; host-owned UI chrome remains host-owned and may use a different language.
|
|
97
102
|
|
|
98
|
-
|
|
103
|
+
The canonical renderer resolves the complete locale pack. The initial German pack includes `Bereit für deine Entscheidung`, `Jetzt freigeben` and `Danach`; the initial English pack includes `Ready for your decision`, `Approve now` and `Next`. Verify that the supplied blocks use one locale and a neutral decision heading while leaving the exact gate identifier and approval value unchanged. Do not model-edit the supplied Markdown.
|
|
99
104
|
|
|
100
105
|
The primary option is derived exactly as `Approval: <GateName>` from the evaluated current gate; only explanatory copy and non-authoritative outcome labels are localized. Concrete localized copy belongs to the user-facing interaction layer or the approved delivery artefact, not to English runtime rules.
|
|
101
106
|
|
|
@@ -116,6 +121,7 @@ Surface behavior:
|
|
|
116
121
|
- Codex: invoke the native short-question/request-user-input control only when preflight proves `exact_option_value` or `separate_label_and_value`, and omit auto-resolution. The canonical `decorated_label_only` capability must use exact text without invoking the adapter. `Approval: <GateName> (Recommended)` is never a valid option or approval.
|
|
117
122
|
- Claude Code: invoke `AskUserQuestion` on the first eligible attempt only when no timeout can auto-continue and no hook supplies `answers` or `updatedInput`; if it is not rendered or applied, use exact text immediately. Claude permissions and `ExitPlanMode` remain separate.
|
|
118
123
|
- 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.
|
|
124
|
+
- GitHub Copilot: the current repository-instruction surface has no conforming native approval adapter. Transmit the canonical rendered cards followed by the exact-text request; never claim or simulate a native control. Copilot tool confirmations, plan interactions and repository permissions remain separate.
|
|
119
125
|
- Other, unavailable or non-interactive surfaces: use exact textual approval and wait for a new explicit user response.
|
|
120
126
|
|
|
121
127
|
Localized labels such as `Überarbeiten`/`Revise`, `Ablehnen`/`Decline` and `Abbrechen`/`Cancel` are presentation mappings to stable non-approval outcomes only. A label, description, option position or recommendation never authorizes a gate. Host-provided free-text or `Überspringen`/`Skip` actions never advance an AGDF gate.
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"run": "Selected run",
|
|
15
15
|
"humanTitle": "Run title",
|
|
16
16
|
"gate": "Current gate",
|
|
17
|
+
"requiredDecision": "Required decision",
|
|
17
18
|
"blocked": "Blocked by",
|
|
18
19
|
"missing": "Missing approval",
|
|
19
20
|
"outcome": "Outcome after approval",
|
|
@@ -81,17 +82,31 @@
|
|
|
81
82
|
"Block": "Block"
|
|
82
83
|
},
|
|
83
84
|
"gateActionTitles": {
|
|
84
|
-
"UR": "
|
|
85
|
-
"PRD": "
|
|
86
|
-
"SD": "
|
|
87
|
-
"TP": "
|
|
88
|
-
"QA": "
|
|
89
|
-
"UAT": "
|
|
85
|
+
"UR": "Review and decide on user requirements",
|
|
86
|
+
"PRD": "Review and decide on product requirements",
|
|
87
|
+
"SD": "Review and decide on solution design",
|
|
88
|
+
"TP": "Review and decide on task and test plan",
|
|
89
|
+
"QA": "Review and decide on quality assurance",
|
|
90
|
+
"UAT": "Review and decide on user acceptance"
|
|
91
|
+
},
|
|
92
|
+
"gateRequiredDecisions": {
|
|
93
|
+
"UR": "User Requirements approval",
|
|
94
|
+
"PRD": "Product Requirements approval",
|
|
95
|
+
"SD": "Solution Design approval",
|
|
96
|
+
"TP": "Task and Test Plan approval",
|
|
97
|
+
"QA": "Quality Assurance approval",
|
|
98
|
+
"UAT": "User Acceptance decision"
|
|
90
99
|
},
|
|
91
100
|
"interaction": {
|
|
92
101
|
"ready": "Ready for your decision",
|
|
93
102
|
"approveHeading": "Approve now",
|
|
94
103
|
"nextHeading": "Next",
|
|
104
|
+
"decisionInstruction": "Choose approve, request revision or decline.",
|
|
105
|
+
"decisionPrompt": "Choose approve, request revision or decline for {gate} in run {run_id}.",
|
|
106
|
+
"exactTextRequest": "To approve, reply exactly with `{approval}`; otherwise request revision or decline.",
|
|
107
|
+
"decisionFollows": "will be the next user decision",
|
|
108
|
+
"presentationFailure": "Approval cards could not be rendered safely.",
|
|
109
|
+
"nonReadyDecision": "No decision requested: {reason}.",
|
|
95
110
|
"approveDescription": "Approve this gate with the exact authorization value.",
|
|
96
111
|
"reviseLabel": "Revise",
|
|
97
112
|
"reviseDescription": "Keep the gate open and request changes.",
|
|
@@ -201,6 +216,7 @@
|
|
|
201
216
|
"run": "Ausgewählter Run",
|
|
202
217
|
"humanTitle": "Run-Titel",
|
|
203
218
|
"gate": "Aktuelles Gate",
|
|
219
|
+
"requiredDecision": "Erforderliche Entscheidung",
|
|
204
220
|
"blocked": "Blockiert durch",
|
|
205
221
|
"missing": "Fehlende Freigabe",
|
|
206
222
|
"outcome": "Ergebnis nach Freigabe",
|
|
@@ -268,17 +284,31 @@
|
|
|
268
284
|
"Block": "Block"
|
|
269
285
|
},
|
|
270
286
|
"gateActionTitles": {
|
|
271
|
-
"UR": "
|
|
272
|
-
"PRD": "Produktanforderungen
|
|
273
|
-
"SD": "Lösungsdesign
|
|
274
|
-
"TP": "
|
|
275
|
-
"QA": "
|
|
276
|
-
"UAT": "
|
|
287
|
+
"UR": "Nutzeranforderungen prüfen und entscheiden",
|
|
288
|
+
"PRD": "Produktanforderungen prüfen und entscheiden",
|
|
289
|
+
"SD": "Lösungsdesign prüfen und entscheiden",
|
|
290
|
+
"TP": "Aufgaben- und Testplan prüfen und entscheiden",
|
|
291
|
+
"QA": "Qualitätssicherung prüfen und entscheiden",
|
|
292
|
+
"UAT": "Nutzerabnahme prüfen und entscheiden"
|
|
293
|
+
},
|
|
294
|
+
"gateRequiredDecisions": {
|
|
295
|
+
"UR": "Freigabe der Nutzeranforderungen",
|
|
296
|
+
"PRD": "Freigabe der Produktanforderungen",
|
|
297
|
+
"SD": "Freigabe des Lösungsdesigns",
|
|
298
|
+
"TP": "Freigabe des Aufgaben- und Testplans",
|
|
299
|
+
"QA": "Freigabe der Qualitätssicherung",
|
|
300
|
+
"UAT": "Entscheidung über die Nutzerabnahme"
|
|
277
301
|
},
|
|
278
302
|
"interaction": {
|
|
279
303
|
"ready": "Bereit für deine Entscheidung",
|
|
280
304
|
"approveHeading": "Jetzt freigeben",
|
|
281
305
|
"nextHeading": "Danach",
|
|
306
|
+
"decisionInstruction": "Freigeben, Überarbeitung anfordern oder ablehnen.",
|
|
307
|
+
"decisionPrompt": "Für {gate} im Run {run_id}: freigeben, Überarbeitung anfordern oder ablehnen.",
|
|
308
|
+
"exactTextRequest": "Zur Freigabe exakt mit `{approval}` antworten; andernfalls Überarbeitung anfordern oder ablehnen.",
|
|
309
|
+
"decisionFollows": "ist die nächste Nutzerentscheidung",
|
|
310
|
+
"presentationFailure": "Die Freigabekarten konnten nicht sicher dargestellt werden.",
|
|
311
|
+
"nonReadyDecision": "Keine Entscheidung angefordert: {reason}.",
|
|
282
312
|
"approveDescription": "Dieses Gate mit dem exakten Freigabewert autorisieren.",
|
|
283
313
|
"reviseLabel": "Überarbeiten",
|
|
284
314
|
"reviseDescription": "Das Gate offen lassen und Änderungen anfordern.",
|
|
@@ -83,6 +83,7 @@ Helper commands are deterministic proof and automation interfaces, not the norma
|
|
|
83
83
|
- `init` creates the machine-readable control scaffold.
|
|
84
84
|
- `doctor --json` checks whether `.agdf/control/` is consistent and actionable; it is not the reviewer.
|
|
85
85
|
- `gate-check --json` reports reproducible gate state; it does not replace the gate-check skill judgement.
|
|
86
|
+
- `gate-check --approval-envelope` prints the canonical ready-gate cards and exact-text request from the same evaluation; it does not grant approval or replace the chat workflow.
|
|
86
87
|
- `delivery-map --json` reports the delivery picture for CI, PRs, regression checks and audit trails.
|
|
87
88
|
|
|
88
89
|
Machine-readable outputs should stay agent-friendly: stable decisions, blocking gate or current gate, missing approval, allowed outputs, forbidden outputs, next step, evidence and findings.
|
|
@@ -106,4 +107,3 @@ It must expose:
|
|
|
106
107
|
|
|
107
108
|
Missing relationship evidence in the Artefact Chain is at least `revise` once the related gate artefact is approved or passed.
|
|
108
109
|
Declared missing evidence, declared risk or Context Graph gate effect may escalate the delivery map to `warn`, `revise` or `block`.
|
|
109
|
-
|
|
@@ -116,22 +116,40 @@ before invoking any native question tool or emitting an exact-text approval
|
|
|
116
116
|
request. Splitting the cards across separate assistant turns or invoking the
|
|
117
117
|
tool after only one card is a failed interaction, not a valid presentation.
|
|
118
118
|
|
|
119
|
-
The first visible line of that envelope is the localized
|
|
119
|
+
The first visible line of that envelope is the localized neutral decision title
|
|
120
120
|
of the current user gate, rendered as a level-two Markdown heading or equivalent
|
|
121
121
|
accessible host heading inside the compact approval-time Run Status Card.
|
|
122
122
|
`AGDF Status`, `Run Status Card`, `Gate Transition Card`, raw gate identifiers
|
|
123
123
|
and machine values are semantic or diagnostic labels only and must not become
|
|
124
|
-
the primary heading.
|
|
124
|
+
the primary heading. Approval-directed titles such as `Approve solution design`
|
|
125
|
+
are also invalid. The decision title appears exactly once and does not replace,
|
|
125
126
|
merge or reorder either required card block.
|
|
126
127
|
|
|
127
|
-
The compact approval-time Run Status Card contains exactly
|
|
128
|
-
fields: selected run, readiness status, current gate,
|
|
129
|
-
|
|
128
|
+
The compact approval-time Run Status Card contains exactly five operational
|
|
129
|
+
fields: selected run, readiness status, current gate, a localized human-readable
|
|
130
|
+
required decision and one neutral instruction to choose approve, request revision
|
|
131
|
+
or decline. It does not contain the exact approval value or quality outlook. It uses localized human-readable labels
|
|
130
132
|
and must not contain evidence, diagnostic codes, raw control-state keys,
|
|
131
133
|
allowed/forbidden inventories or machine values. The complete Run Status Card remains the operational,
|
|
132
134
|
CLI and audit projection and remains available for complete detail outside the
|
|
133
135
|
approval-time compact view.
|
|
134
136
|
|
|
137
|
+
The first scan across both cards reveals the requested decision, readiness,
|
|
138
|
+
required approval, approval effect, remaining boundary and next transition.
|
|
139
|
+
Identity and artefact references provide supporting context without competing
|
|
140
|
+
with that sequence. Across the two cards, the exact `Approval: <GateName>` value
|
|
141
|
+
appears exactly once, in the Gate Transition Card. The later native prompt or
|
|
142
|
+
exact-text request may repeat it only as the required input.
|
|
143
|
+
|
|
144
|
+
The canonical `interaction-presentation.js` owner builds and validates one
|
|
145
|
+
immutable snapshot, then renders both complete Markdown blocks and the approval
|
|
146
|
+
interaction. The public additive `approval_presentation` schema contains
|
|
147
|
+
`schema_version`, selected run/revision/gate/locale identity, fixed sequence,
|
|
148
|
+
both rendered blocks, canonical prompt/options/exact-text fallback and
|
|
149
|
+
`authorizes: false`. It is a valid object only for a ready user gate and `null`
|
|
150
|
+
otherwise. Agents and surface adapters transmit these blocks without rebuilding
|
|
151
|
+
headings, fields, ordering, locale copy or Markdown.
|
|
152
|
+
|
|
135
153
|
The Gate Transition Card is the second orientation message. It is derived from
|
|
136
154
|
the same snapshot and canonical post-approval transition, but it is not another
|
|
137
155
|
state model, persisted record, renderer or approval authority. It turns only
|
|
@@ -152,7 +170,7 @@ The card answers exactly three user questions, in this order:
|
|
|
152
170
|
Use this compact composition:
|
|
153
171
|
|
|
154
172
|
```text
|
|
155
|
-
<localized gate title> · <human run title> ·
|
|
173
|
+
<localized gate title> · <human run title> · `<run_id>`
|
|
156
174
|
<UR link or localized missing text> · <PRD link or localized missing text> · <SD link or localized missing text> · <TP link or localized missing text>
|
|
157
175
|
<localized ready-for-decision line>
|
|
158
176
|
|
|
@@ -185,6 +203,12 @@ Brownfield Analysis, implementation remains gated until that analysis passes,
|
|
|
185
203
|
and the next block states plainly that no further user decision is required
|
|
186
204
|
now. Brownfield Analysis must not be presented as a user gate.
|
|
187
205
|
|
|
206
|
+
If snapshot validation or rendering fails, emit no partial card and forbid native
|
|
207
|
+
invocation. Perform a fresh gate evaluation. Show only the localized exact-text
|
|
208
|
+
request when the same gate remains ready and the canonical approval value is
|
|
209
|
+
independently valid. Otherwise report the current non-ready reason and request no
|
|
210
|
+
decision. Never patch, guess or model-reconstruct missing presentation content.
|
|
211
|
+
|
|
188
212
|
|
|
189
213
|
## Native Interaction Contract
|
|
190
214
|
|
|
@@ -230,7 +254,7 @@ Before presenting `gate_approval`, the agent must:
|
|
|
230
254
|
|
|
231
255
|
1. resolve exactly one selected run;
|
|
232
256
|
2. run the canonical gate evaluation and confirm that the current gate's durable artefact is present and ready;
|
|
233
|
-
3.
|
|
257
|
+
3. consume one validated canonical `approval_presentation`, emit its compact Run Status Card and Gate Transition Card verbatim in that order immediately before the gate question, then ask exactly one gate question that identifies `run_id` and `current_gate` and offers the exact approving value `Approval: <GateName>` followed by stable `revise` and `decline` outcomes; host-owned dismissal maps to `cancel` where only three choices are available;
|
|
234
258
|
4. wait for deliberate user input without a timeout, default, preselection, hook-supplied answer or agent-to-agent substitute;
|
|
235
259
|
5. re-run canonical gate evaluation against the same `run_id` and expected gate immediately before persistence;
|
|
236
260
|
6. reject missing evidence, ambiguous or wrong run, wrong gate, stale state and any response that is no longer valid;
|
|
@@ -261,6 +285,13 @@ exact approval value and confirms that authority is unchanged. A fresh explicit
|
|
|
261
285
|
user request may reopen the unchanged decision after revalidation; it is not an
|
|
262
286
|
automatic retry.
|
|
263
287
|
|
|
288
|
+
For deterministic local projection, use an already installed `agdf gate-check
|
|
289
|
+
--json` and consume `approval_presentation`, or use `agdf gate-check
|
|
290
|
+
--approval-envelope` on an exact-text surface. These are renderer/validator
|
|
291
|
+
helpers, not a second UX or gate authority. Do not require a registry-resolved
|
|
292
|
+
`npx ...@latest` call for each normal interaction. `npx` remains the explicit
|
|
293
|
+
bootstrap, installation, refresh or missing-local-executable path.
|
|
294
|
+
|
|
264
295
|
A free-form native response is valid only when the existing exact-approval validator accepts it for the current gate after revalidation. A localized label, description, option position, recommendation style or host action never authorizes a gate. Revise, decline and cancel outcomes never advance a gate.
|
|
265
296
|
|
|
266
297
|
Surface adapter rules:
|
|
@@ -270,6 +301,7 @@ Surface adapter rules:
|
|
|
270
301
|
| Codex | native `request_user_input` or equivalent short-question control when callable | invoke on the first eligible attempt when preflight proves `exact_option_value`; if unavailable or not applied, use exact text without retry | Codex command, edit, network, external-directory and app-action approvals remain host-owned `tool_permission`. |
|
|
271
302
|
| Claude Code | `AskUserQuestion` | on the first eligible attempt, use only when no timeout can auto-continue and no hook supplies `answers` or `updatedInput`; if unavailable or not applied, use exact text without retry | Claude permissions and `ExitPlanMode` are not AGDF approval. |
|
|
272
303
|
| 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. |
|
|
304
|
+
| GitHub Copilot | none in the current AGDF repository-instruction surface | transmit the canonical rendered cards followed by the exact-text request; never claim or simulate a native approval control | Copilot tool confirmations, plan interactions and repository permissions are not AGDF approval. |
|
|
273
305
|
| 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. |
|
|
274
306
|
|
|
275
307
|
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.
|
|
@@ -352,8 +384,10 @@ For every primary chat card:
|
|
|
352
384
|
2. Show `UR · PRD · SD · TP` in that stable order. Existing selected-run
|
|
353
385
|
artefacts are links with readable labels; missing artefacts use localized
|
|
354
386
|
non-link text. Never guess a path or emit a broken link.
|
|
355
|
-
3. Use a localized
|
|
356
|
-
and `Approval: <GateName>` authorization value.
|
|
387
|
+
3. Use a localized neutral decision title while preserving the exact gate identifier
|
|
388
|
+
and `Approval: <GateName>` authorization value. The technical value appears
|
|
389
|
+
once across the two cards, in the transition card; the later input control may
|
|
390
|
+
repeat it as the required value.
|
|
357
391
|
4. Keep primary copy decision-oriented. Raw keys such as `next_user_gate`,
|
|
358
392
|
`mode_slice_decision` and `required_next_gate`, diagnostic codes and machine
|
|
359
393
|
status values belong to JSON or audit detail, not the primary interaction.
|
|
@@ -10,7 +10,7 @@ These files were generated from the AGDF source repository for OpenCode.
|
|
|
10
10
|
- `.opencode/skills/` contains native OpenCode skills generated from the canonical AGDF skills.
|
|
11
11
|
- For new build/change intent or unclear approval, load `agdf-gate-check` through OpenCode's native `skill` tool.
|
|
12
12
|
- Use `npx --yes @agdf/cli@latest opencode-status --json` to distinguish global hook/native-skill configuration, package loadability, session activity and this repository surface.
|
|
13
|
-
-
|
|
13
|
+
- For deterministic ready-gate rendering, prefer an installed `agdf gate-check --approval-envelope`; reserve `agdf gate-check --json` for native-adapter input, automation or audit evidence and use `npx ...@latest` only for bootstrap, refresh or a missing local executable.
|
|
14
14
|
- `.opencode/agdf-runtime-contract.md` is the shared gate and output contract.
|
|
15
15
|
|
|
16
16
|
## Skills
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
"run": "Selected run",
|
|
15
15
|
"humanTitle": "Run title",
|
|
16
16
|
"gate": "Current gate",
|
|
17
|
+
"requiredDecision": "Required decision",
|
|
17
18
|
"blocked": "Blocked by",
|
|
18
19
|
"missing": "Missing approval",
|
|
19
20
|
"outcome": "Outcome after approval",
|
|
@@ -81,17 +82,31 @@
|
|
|
81
82
|
"Block": "Block"
|
|
82
83
|
},
|
|
83
84
|
"gateActionTitles": {
|
|
84
|
-
"UR": "
|
|
85
|
-
"PRD": "
|
|
86
|
-
"SD": "
|
|
87
|
-
"TP": "
|
|
88
|
-
"QA": "
|
|
89
|
-
"UAT": "
|
|
85
|
+
"UR": "Review and decide on user requirements",
|
|
86
|
+
"PRD": "Review and decide on product requirements",
|
|
87
|
+
"SD": "Review and decide on solution design",
|
|
88
|
+
"TP": "Review and decide on task and test plan",
|
|
89
|
+
"QA": "Review and decide on quality assurance",
|
|
90
|
+
"UAT": "Review and decide on user acceptance"
|
|
91
|
+
},
|
|
92
|
+
"gateRequiredDecisions": {
|
|
93
|
+
"UR": "User Requirements approval",
|
|
94
|
+
"PRD": "Product Requirements approval",
|
|
95
|
+
"SD": "Solution Design approval",
|
|
96
|
+
"TP": "Task and Test Plan approval",
|
|
97
|
+
"QA": "Quality Assurance approval",
|
|
98
|
+
"UAT": "User Acceptance decision"
|
|
90
99
|
},
|
|
91
100
|
"interaction": {
|
|
92
101
|
"ready": "Ready for your decision",
|
|
93
102
|
"approveHeading": "Approve now",
|
|
94
103
|
"nextHeading": "Next",
|
|
104
|
+
"decisionInstruction": "Choose approve, request revision or decline.",
|
|
105
|
+
"decisionPrompt": "Choose approve, request revision or decline for {gate} in run {run_id}.",
|
|
106
|
+
"exactTextRequest": "To approve, reply exactly with `{approval}`; otherwise request revision or decline.",
|
|
107
|
+
"decisionFollows": "will be the next user decision",
|
|
108
|
+
"presentationFailure": "Approval cards could not be rendered safely.",
|
|
109
|
+
"nonReadyDecision": "No decision requested: {reason}.",
|
|
95
110
|
"approveDescription": "Approve this gate with the exact authorization value.",
|
|
96
111
|
"reviseLabel": "Revise",
|
|
97
112
|
"reviseDescription": "Keep the gate open and request changes.",
|
|
@@ -201,6 +216,7 @@
|
|
|
201
216
|
"run": "Ausgewählter Run",
|
|
202
217
|
"humanTitle": "Run-Titel",
|
|
203
218
|
"gate": "Aktuelles Gate",
|
|
219
|
+
"requiredDecision": "Erforderliche Entscheidung",
|
|
204
220
|
"blocked": "Blockiert durch",
|
|
205
221
|
"missing": "Fehlende Freigabe",
|
|
206
222
|
"outcome": "Ergebnis nach Freigabe",
|
|
@@ -268,17 +284,31 @@
|
|
|
268
284
|
"Block": "Block"
|
|
269
285
|
},
|
|
270
286
|
"gateActionTitles": {
|
|
271
|
-
"UR": "
|
|
272
|
-
"PRD": "Produktanforderungen
|
|
273
|
-
"SD": "Lösungsdesign
|
|
274
|
-
"TP": "
|
|
275
|
-
"QA": "
|
|
276
|
-
"UAT": "
|
|
287
|
+
"UR": "Nutzeranforderungen prüfen und entscheiden",
|
|
288
|
+
"PRD": "Produktanforderungen prüfen und entscheiden",
|
|
289
|
+
"SD": "Lösungsdesign prüfen und entscheiden",
|
|
290
|
+
"TP": "Aufgaben- und Testplan prüfen und entscheiden",
|
|
291
|
+
"QA": "Qualitätssicherung prüfen und entscheiden",
|
|
292
|
+
"UAT": "Nutzerabnahme prüfen und entscheiden"
|
|
293
|
+
},
|
|
294
|
+
"gateRequiredDecisions": {
|
|
295
|
+
"UR": "Freigabe der Nutzeranforderungen",
|
|
296
|
+
"PRD": "Freigabe der Produktanforderungen",
|
|
297
|
+
"SD": "Freigabe des Lösungsdesigns",
|
|
298
|
+
"TP": "Freigabe des Aufgaben- und Testplans",
|
|
299
|
+
"QA": "Freigabe der Qualitätssicherung",
|
|
300
|
+
"UAT": "Entscheidung über die Nutzerabnahme"
|
|
277
301
|
},
|
|
278
302
|
"interaction": {
|
|
279
303
|
"ready": "Bereit für deine Entscheidung",
|
|
280
304
|
"approveHeading": "Jetzt freigeben",
|
|
281
305
|
"nextHeading": "Danach",
|
|
306
|
+
"decisionInstruction": "Freigeben, Überarbeitung anfordern oder ablehnen.",
|
|
307
|
+
"decisionPrompt": "Für {gate} im Run {run_id}: freigeben, Überarbeitung anfordern oder ablehnen.",
|
|
308
|
+
"exactTextRequest": "Zur Freigabe exakt mit `{approval}` antworten; andernfalls Überarbeitung anfordern oder ablehnen.",
|
|
309
|
+
"decisionFollows": "ist die nächste Nutzerentscheidung",
|
|
310
|
+
"presentationFailure": "Die Freigabekarten konnten nicht sicher dargestellt werden.",
|
|
311
|
+
"nonReadyDecision": "Keine Entscheidung angefordert: {reason}.",
|
|
282
312
|
"approveDescription": "Dieses Gate mit dem exakten Freigabewert autorisieren.",
|
|
283
313
|
"reviseLabel": "Überarbeiten",
|
|
284
314
|
"reviseDescription": "Das Gate offen lassen und Änderungen anfordern.",
|
|
@@ -83,6 +83,7 @@ Helper commands are deterministic proof and automation interfaces, not the norma
|
|
|
83
83
|
- `init` creates the machine-readable control scaffold.
|
|
84
84
|
- `doctor --json` checks whether `.agdf/control/` is consistent and actionable; it is not the reviewer.
|
|
85
85
|
- `gate-check --json` reports reproducible gate state; it does not replace the gate-check skill judgement.
|
|
86
|
+
- `gate-check --approval-envelope` prints the canonical ready-gate cards and exact-text request from the same evaluation; it does not grant approval or replace the chat workflow.
|
|
86
87
|
- `delivery-map --json` reports the delivery picture for CI, PRs, regression checks and audit trails.
|
|
87
88
|
|
|
88
89
|
Machine-readable outputs should stay agent-friendly: stable decisions, blocking gate or current gate, missing approval, allowed outputs, forbidden outputs, next step, evidence and findings.
|
|
@@ -106,4 +107,3 @@ It must expose:
|
|
|
106
107
|
|
|
107
108
|
Missing relationship evidence in the Artefact Chain is at least `revise` once the related gate artefact is approved or passed.
|
|
108
109
|
Declared missing evidence, declared risk or Context Graph gate effect may escalate the delivery map to `warn`, `revise` or `block`.
|
|
109
|
-
|
|
@@ -116,22 +116,40 @@ before invoking any native question tool or emitting an exact-text approval
|
|
|
116
116
|
request. Splitting the cards across separate assistant turns or invoking the
|
|
117
117
|
tool after only one card is a failed interaction, not a valid presentation.
|
|
118
118
|
|
|
119
|
-
The first visible line of that envelope is the localized
|
|
119
|
+
The first visible line of that envelope is the localized neutral decision title
|
|
120
120
|
of the current user gate, rendered as a level-two Markdown heading or equivalent
|
|
121
121
|
accessible host heading inside the compact approval-time Run Status Card.
|
|
122
122
|
`AGDF Status`, `Run Status Card`, `Gate Transition Card`, raw gate identifiers
|
|
123
123
|
and machine values are semantic or diagnostic labels only and must not become
|
|
124
|
-
the primary heading.
|
|
124
|
+
the primary heading. Approval-directed titles such as `Approve solution design`
|
|
125
|
+
are also invalid. The decision title appears exactly once and does not replace,
|
|
125
126
|
merge or reorder either required card block.
|
|
126
127
|
|
|
127
|
-
The compact approval-time Run Status Card contains exactly
|
|
128
|
-
fields: selected run, readiness status, current gate,
|
|
129
|
-
|
|
128
|
+
The compact approval-time Run Status Card contains exactly five operational
|
|
129
|
+
fields: selected run, readiness status, current gate, a localized human-readable
|
|
130
|
+
required decision and one neutral instruction to choose approve, request revision
|
|
131
|
+
or decline. It does not contain the exact approval value or quality outlook. It uses localized human-readable labels
|
|
130
132
|
and must not contain evidence, diagnostic codes, raw control-state keys,
|
|
131
133
|
allowed/forbidden inventories or machine values. The complete Run Status Card remains the operational,
|
|
132
134
|
CLI and audit projection and remains available for complete detail outside the
|
|
133
135
|
approval-time compact view.
|
|
134
136
|
|
|
137
|
+
The first scan across both cards reveals the requested decision, readiness,
|
|
138
|
+
required approval, approval effect, remaining boundary and next transition.
|
|
139
|
+
Identity and artefact references provide supporting context without competing
|
|
140
|
+
with that sequence. Across the two cards, the exact `Approval: <GateName>` value
|
|
141
|
+
appears exactly once, in the Gate Transition Card. The later native prompt or
|
|
142
|
+
exact-text request may repeat it only as the required input.
|
|
143
|
+
|
|
144
|
+
The canonical `interaction-presentation.js` owner builds and validates one
|
|
145
|
+
immutable snapshot, then renders both complete Markdown blocks and the approval
|
|
146
|
+
interaction. The public additive `approval_presentation` schema contains
|
|
147
|
+
`schema_version`, selected run/revision/gate/locale identity, fixed sequence,
|
|
148
|
+
both rendered blocks, canonical prompt/options/exact-text fallback and
|
|
149
|
+
`authorizes: false`. It is a valid object only for a ready user gate and `null`
|
|
150
|
+
otherwise. Agents and surface adapters transmit these blocks without rebuilding
|
|
151
|
+
headings, fields, ordering, locale copy or Markdown.
|
|
152
|
+
|
|
135
153
|
The Gate Transition Card is the second orientation message. It is derived from
|
|
136
154
|
the same snapshot and canonical post-approval transition, but it is not another
|
|
137
155
|
state model, persisted record, renderer or approval authority. It turns only
|
|
@@ -152,7 +170,7 @@ The card answers exactly three user questions, in this order:
|
|
|
152
170
|
Use this compact composition:
|
|
153
171
|
|
|
154
172
|
```text
|
|
155
|
-
<localized gate title> · <human run title> ·
|
|
173
|
+
<localized gate title> · <human run title> · `<run_id>`
|
|
156
174
|
<UR link or localized missing text> · <PRD link or localized missing text> · <SD link or localized missing text> · <TP link or localized missing text>
|
|
157
175
|
<localized ready-for-decision line>
|
|
158
176
|
|
|
@@ -185,6 +203,12 @@ Brownfield Analysis, implementation remains gated until that analysis passes,
|
|
|
185
203
|
and the next block states plainly that no further user decision is required
|
|
186
204
|
now. Brownfield Analysis must not be presented as a user gate.
|
|
187
205
|
|
|
206
|
+
If snapshot validation or rendering fails, emit no partial card and forbid native
|
|
207
|
+
invocation. Perform a fresh gate evaluation. Show only the localized exact-text
|
|
208
|
+
request when the same gate remains ready and the canonical approval value is
|
|
209
|
+
independently valid. Otherwise report the current non-ready reason and request no
|
|
210
|
+
decision. Never patch, guess or model-reconstruct missing presentation content.
|
|
211
|
+
|
|
188
212
|
|
|
189
213
|
## Native Interaction Contract
|
|
190
214
|
|
|
@@ -230,7 +254,7 @@ Before presenting `gate_approval`, the agent must:
|
|
|
230
254
|
|
|
231
255
|
1. resolve exactly one selected run;
|
|
232
256
|
2. run the canonical gate evaluation and confirm that the current gate's durable artefact is present and ready;
|
|
233
|
-
3.
|
|
257
|
+
3. consume one validated canonical `approval_presentation`, emit its compact Run Status Card and Gate Transition Card verbatim in that order immediately before the gate question, then ask exactly one gate question that identifies `run_id` and `current_gate` and offers the exact approving value `Approval: <GateName>` followed by stable `revise` and `decline` outcomes; host-owned dismissal maps to `cancel` where only three choices are available;
|
|
234
258
|
4. wait for deliberate user input without a timeout, default, preselection, hook-supplied answer or agent-to-agent substitute;
|
|
235
259
|
5. re-run canonical gate evaluation against the same `run_id` and expected gate immediately before persistence;
|
|
236
260
|
6. reject missing evidence, ambiguous or wrong run, wrong gate, stale state and any response that is no longer valid;
|
|
@@ -261,6 +285,13 @@ exact approval value and confirms that authority is unchanged. A fresh explicit
|
|
|
261
285
|
user request may reopen the unchanged decision after revalidation; it is not an
|
|
262
286
|
automatic retry.
|
|
263
287
|
|
|
288
|
+
For deterministic local projection, use an already installed `agdf gate-check
|
|
289
|
+
--json` and consume `approval_presentation`, or use `agdf gate-check
|
|
290
|
+
--approval-envelope` on an exact-text surface. These are renderer/validator
|
|
291
|
+
helpers, not a second UX or gate authority. Do not require a registry-resolved
|
|
292
|
+
`npx ...@latest` call for each normal interaction. `npx` remains the explicit
|
|
293
|
+
bootstrap, installation, refresh or missing-local-executable path.
|
|
294
|
+
|
|
264
295
|
A free-form native response is valid only when the existing exact-approval validator accepts it for the current gate after revalidation. A localized label, description, option position, recommendation style or host action never authorizes a gate. Revise, decline and cancel outcomes never advance a gate.
|
|
265
296
|
|
|
266
297
|
Surface adapter rules:
|
|
@@ -270,6 +301,7 @@ Surface adapter rules:
|
|
|
270
301
|
| Codex | native `request_user_input` or equivalent short-question control when callable | invoke on the first eligible attempt when preflight proves `exact_option_value`; if unavailable or not applied, use exact text without retry | Codex command, edit, network, external-directory and app-action approvals remain host-owned `tool_permission`. |
|
|
271
302
|
| Claude Code | `AskUserQuestion` | on the first eligible attempt, use only when no timeout can auto-continue and no hook supplies `answers` or `updatedInput`; if unavailable or not applied, use exact text without retry | Claude permissions and `ExitPlanMode` are not AGDF approval. |
|
|
272
303
|
| 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. |
|
|
304
|
+
| GitHub Copilot | none in the current AGDF repository-instruction surface | transmit the canonical rendered cards followed by the exact-text request; never claim or simulate a native approval control | Copilot tool confirmations, plan interactions and repository permissions are not AGDF approval. |
|
|
273
305
|
| 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. |
|
|
274
306
|
|
|
275
307
|
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.
|
|
@@ -352,8 +384,10 @@ For every primary chat card:
|
|
|
352
384
|
2. Show `UR · PRD · SD · TP` in that stable order. Existing selected-run
|
|
353
385
|
artefacts are links with readable labels; missing artefacts use localized
|
|
354
386
|
non-link text. Never guess a path or emit a broken link.
|
|
355
|
-
3. Use a localized
|
|
356
|
-
and `Approval: <GateName>` authorization value.
|
|
387
|
+
3. Use a localized neutral decision title while preserving the exact gate identifier
|
|
388
|
+
and `Approval: <GateName>` authorization value. The technical value appears
|
|
389
|
+
once across the two cards, in the transition card; the later input control may
|
|
390
|
+
repeat it as the required value.
|
|
357
391
|
4. Keep primary copy decision-oriented. Raw keys such as `next_user_gate`,
|
|
358
392
|
`mode_slice_decision` and `required_next_gate`, diagnostic codes and machine
|
|
359
393
|
status values belong to JSON or audit detail, not the primary interaction.
|