create-agdf 0.8.0 → 0.8.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.
@@ -0,0 +1,184 @@
1
+ {
2
+ "schemaVersion": 1,
3
+ "fallbackLocale": "en",
4
+ "optionOrder": ["approve", "revise", "decline", "cancel"],
5
+ "lengthBudgets": {
6
+ "label": 40,
7
+ "description": 160,
8
+ "title": 100
9
+ },
10
+ "locales": {
11
+ "en": {
12
+ "statusCard": {
13
+ "title": "AGDF status-card",
14
+ "run": "Selected run",
15
+ "humanTitle": "Run title",
16
+ "gate": "Current gate",
17
+ "blocked": "Blocked by",
18
+ "missing": "Missing approval",
19
+ "outcome": "Outcome after approval",
20
+ "internal": "Internal next step",
21
+ "userGate": "Next user gate",
22
+ "userAction": "User action required",
23
+ "nextGate": "Next gate after approval",
24
+ "allowedAfter": "Allowed after approval",
25
+ "skill": "Next skill",
26
+ "step": "Next step",
27
+ "quality": "Quality outlook",
28
+ "allowed": "Allowed now",
29
+ "forbidden": "Forbidden now",
30
+ "artefacts": "Artefacts"
31
+ },
32
+ "gateTitles": {
33
+ "UR": "User requirements",
34
+ "PRD": "Product requirements",
35
+ "SD": "Solution design",
36
+ "TP": "Task and test plan",
37
+ "QA": "Quality assurance",
38
+ "UAT": "User acceptance",
39
+ "Brownfield Review": "Brownfield review",
40
+ "Mode/Slice Decision": "Delivery scope decision",
41
+ "Brownfield Analysis": "Implementation preparation",
42
+ "CD+Tests": "Implementation and tests",
43
+ "CR": "Code review",
44
+ "OR": "Delivery report"
45
+ },
46
+ "interaction": {
47
+ "ready": "Ready for your decision",
48
+ "approveHeading": "Approve now",
49
+ "nextHeading": "Next",
50
+ "approveDescription": "Approve this gate with the exact authorization value.",
51
+ "reviseLabel": "Revise",
52
+ "reviseDescription": "Keep the gate open and request changes.",
53
+ "declineLabel": "Decline",
54
+ "declineDescription": "Reject this gate deliberately; authority remains unchanged.",
55
+ "cancelLabel": "Cancel",
56
+ "cancelDescription": "Close this decision without approving or declining it."
57
+ },
58
+ "artefacts": {
59
+ "notYetCreated": "not yet created"
60
+ },
61
+ "primary": {
62
+ "status": {
63
+ "open": "open",
64
+ "blocked": "blocked",
65
+ "pass": "passed",
66
+ "warn": "attention needed",
67
+ "revise": "revision needed",
68
+ "in_progress": "in progress"
69
+ },
70
+ "none": "none",
71
+ "blocked": "current gate prerequisites",
72
+ "quality": "Keep the presentation contract, evidence and gate authority aligned.",
73
+ "actions": {
74
+ "UR": "Clarify and approve the user requirements.",
75
+ "Brownfield Review": "Review existing owners and choose the smallest safe delivery path.",
76
+ "Mode/Slice Decision": "Decide the proportionate delivery scope from repository evidence.",
77
+ "PRD": "Define and approve the product behavior.",
78
+ "SD": "Define and approve the solution design.",
79
+ "TP": "Define and approve the task and test plan.",
80
+ "Brownfield Analysis": "Verify owners, reuse and regression coverage before implementation.",
81
+ "CD+Tests": "Implement the approved plan and collect test evidence.",
82
+ "CR": "Review the implementation and resolve blocking findings.",
83
+ "QA": "Evaluate quality evidence and make the QA decision.",
84
+ "UAT": "Make the deliberate user-acceptance decision.",
85
+ "OR": "Prepare the auditable delivery report."
86
+ },
87
+ "afterApproval": {
88
+ "UR": "Review existing owners and choose the proportionate delivery path; implementation remains blocked.",
89
+ "PRD": "Draft the solution design; implementation remains blocked.",
90
+ "SD": "Draft the task and test plan; implementation remains blocked.",
91
+ "TP": "Run pre-implementation Brownfield Analysis; implementation starts only if it passes.",
92
+ "QA": "Prepare the user-acceptance decision; release remains blocked.",
93
+ "UAT": "Prepare the delivery report; version-control and release actions still require explicit instruction."
94
+ }
95
+ }
96
+ },
97
+ "de": {
98
+ "statusCard": {
99
+ "title": "AGDF-Statuskarte",
100
+ "run": "Ausgewählter Run",
101
+ "humanTitle": "Run-Titel",
102
+ "gate": "Aktuelles Gate",
103
+ "blocked": "Blockiert durch",
104
+ "missing": "Fehlende Freigabe",
105
+ "outcome": "Ergebnis nach Freigabe",
106
+ "internal": "Interner nächster Schritt",
107
+ "userGate": "Nächstes User-Gate",
108
+ "userAction": "Nutzeraktion erforderlich",
109
+ "nextGate": "Nächstes Gate nach Freigabe",
110
+ "allowedAfter": "Nach Freigabe erlaubt",
111
+ "skill": "Nächster Skill",
112
+ "step": "Nächster Schritt",
113
+ "quality": "Qualitätsausblick",
114
+ "allowed": "Jetzt erlaubt",
115
+ "forbidden": "Aktuell verboten",
116
+ "artefacts": "Artefakte"
117
+ },
118
+ "gateTitles": {
119
+ "UR": "Nutzeranforderungen",
120
+ "PRD": "Produktanforderungen",
121
+ "SD": "Lösungsdesign",
122
+ "TP": "Aufgaben- und Testplan",
123
+ "QA": "Qualitätssicherung",
124
+ "UAT": "Nutzerabnahme",
125
+ "Brownfield Review": "Brownfield-Prüfung",
126
+ "Mode/Slice Decision": "Entscheidung zum Lieferumfang",
127
+ "Brownfield Analysis": "Implementierungsvorbereitung",
128
+ "CD+Tests": "Implementierung und Tests",
129
+ "CR": "Code-Review",
130
+ "OR": "Lieferbericht"
131
+ },
132
+ "interaction": {
133
+ "ready": "Bereit für deine Entscheidung",
134
+ "approveHeading": "Jetzt freigeben",
135
+ "nextHeading": "Danach",
136
+ "approveDescription": "Dieses Gate mit dem exakten Freigabewert autorisieren.",
137
+ "reviseLabel": "Überarbeiten",
138
+ "reviseDescription": "Das Gate offen lassen und Änderungen anfordern.",
139
+ "declineLabel": "Ablehnen",
140
+ "declineDescription": "Dieses Gate bewusst ablehnen; die Berechtigung bleibt unverändert.",
141
+ "cancelLabel": "Abbrechen",
142
+ "cancelDescription": "Diese Entscheidung ohne Freigabe oder Ablehnung schließen."
143
+ },
144
+ "artefacts": {
145
+ "notYetCreated": "noch nicht erstellt"
146
+ },
147
+ "primary": {
148
+ "status": {
149
+ "open": "offen",
150
+ "blocked": "blockiert",
151
+ "pass": "bestanden",
152
+ "warn": "Prüfung erforderlich",
153
+ "revise": "Überarbeitung erforderlich",
154
+ "in_progress": "in Arbeit"
155
+ },
156
+ "none": "keine",
157
+ "blocked": "Voraussetzungen des aktuellen Gates",
158
+ "quality": "Präsentationsvertrag, Nachweise und Gate-Berechtigung konsistent halten.",
159
+ "actions": {
160
+ "UR": "Nutzeranforderungen klären und freigeben.",
161
+ "Brownfield Review": "Bestehende Owner prüfen und den kleinsten sicheren Lieferweg wählen.",
162
+ "Mode/Slice Decision": "Den angemessenen Lieferumfang anhand der Repository-Nachweise festlegen.",
163
+ "PRD": "Produktverhalten definieren und freigeben.",
164
+ "SD": "Lösungsdesign definieren und freigeben.",
165
+ "TP": "Aufgaben- und Testplan definieren und freigeben.",
166
+ "Brownfield Analysis": "Owner, Wiederverwendung und Regressionstests vor der Implementierung prüfen.",
167
+ "CD+Tests": "Den freigegebenen Plan implementieren und Testnachweise sammeln.",
168
+ "CR": "Implementierung prüfen und blockierende Befunde beheben.",
169
+ "QA": "Qualitätsnachweise bewerten und die QA-Entscheidung treffen.",
170
+ "UAT": "Die bewusste Nutzerabnahme entscheiden.",
171
+ "OR": "Den auditierbaren Lieferbericht erstellen."
172
+ },
173
+ "afterApproval": {
174
+ "UR": "Bestehende Owner prüfen und den angemessenen Lieferweg wählen; die Implementierung bleibt gesperrt.",
175
+ "PRD": "Das Lösungsdesign entwerfen; die Implementierung bleibt gesperrt.",
176
+ "SD": "Den Aufgaben- und Testplan entwerfen; die Implementierung bleibt gesperrt.",
177
+ "TP": "Die Brownfield-Analyse vor der Implementierung durchführen; die Implementierung startet nur nach bestandenem Ergebnis.",
178
+ "QA": "Die Nutzerabnahme vorbereiten; die Veröffentlichung bleibt gesperrt.",
179
+ "UAT": "Den Lieferbericht vorbereiten; Versionskontroll- und Veröffentlichungsaktionen benötigen weiterhin eine ausdrückliche Anweisung."
180
+ }
181
+ }
182
+ }
183
+ }
184
+ }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.8.0",
4
+ "version": "0.8.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.",
@@ -67,29 +67,72 @@
67
67
  },
68
68
  "interactions": {
69
69
  "fallback": "exact_text",
70
+ "localeRegistry": "meta/agdf-interaction-locales.json",
71
+ "fallbackLocale": "en",
72
+ "optionOrder": [
73
+ "approve",
74
+ "revise",
75
+ "decline",
76
+ "cancel"
77
+ ],
78
+ "outcomes": [
79
+ "approve",
80
+ "revise",
81
+ "decline",
82
+ "cancel",
83
+ "no_response",
84
+ "timeout",
85
+ "empty",
86
+ "invalid",
87
+ "stale"
88
+ ],
70
89
  "surfaces": {
71
90
  "codex": {
72
91
  "questionAdapter": "request_user_input",
73
92
  "availability": "when_callable",
74
93
  "gateSafety": "omit_auto_resolution",
94
+ "explicitOutcomes": [
95
+ "approve",
96
+ "revise",
97
+ "decline"
98
+ ],
99
+ "dismissOutcome": "cancel",
75
100
  "technicalPermissionOwner": "codex_host"
76
101
  },
77
102
  "claude": {
78
103
  "questionAdapter": "AskUserQuestion",
79
104
  "availability": "when_no_auto_continue_timeout",
80
105
  "gateSafety": "no_timeout_or_hook_supplied_answer",
106
+ "explicitOutcomes": [
107
+ "approve",
108
+ "revise",
109
+ "decline"
110
+ ],
111
+ "dismissOutcome": "cancel",
81
112
  "technicalPermissionOwner": "claude_host"
82
113
  },
83
114
  "opencode": {
84
115
  "questionAdapter": "question",
85
116
  "availability": "when_permission_question_allows",
86
117
  "gateSafety": "preserve_explicit_deny",
118
+ "explicitOutcomes": [
119
+ "approve",
120
+ "revise",
121
+ "decline"
122
+ ],
123
+ "dismissOutcome": "cancel",
87
124
  "technicalPermissionOwner": "opencode_host"
88
125
  },
89
126
  "fallback": {
90
127
  "questionAdapter": "exact_text",
91
128
  "availability": "always",
92
129
  "gateSafety": "wait_for_deliberate_user_input",
130
+ "explicitOutcomes": [
131
+ "approve",
132
+ "revise",
133
+ "decline",
134
+ "cancel"
135
+ ],
93
136
  "technicalPermissionOwner": "host_specific"
94
137
  }
95
138
  }
@@ -97,46 +140,55 @@
97
140
  "skillSet": [
98
141
  {
99
142
  "slug": "delivery-path-search",
143
+ "discovery": "optional",
100
144
  "useFor": "high-impact planning decisions with several plausible next delivery steps before implementation",
101
145
  "boundary": "read-only advisory search; never grants gate permission or replaces gate-check"
102
146
  },
103
147
  {
104
148
  "slug": "brownfield-analysis",
149
+ "discovery": "automatic",
105
150
  "useFor": "after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems",
106
151
  "boundary": "clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission"
107
152
  },
108
153
  {
109
154
  "slug": "clean-implementation-review",
155
+ "discovery": "automatic",
110
156
  "useFor": "inspect workarounds, fallbacks, parallel structures or symptom fixes",
111
157
  "boundary": "not a TP or QA substitute"
112
158
  },
113
159
  {
114
160
  "slug": "code-review",
161
+ "discovery": "automatic",
115
162
  "useFor": "mandatory CR step after code changes, focused on defects, regression and security findings",
116
163
  "boundary": "does not replace TP review, clean review or QA"
117
164
  },
118
165
  {
119
166
  "slug": "delivery-closeout",
167
+ "discovery": "automatic",
120
168
  "useFor": "commit/PR-near handoff after QA/OR/UAT",
121
169
  "boundary": "never performs VCS actions automatically"
122
170
  },
123
171
  {
124
172
  "slug": "gate-check",
173
+ "discovery": "start_here",
125
174
  "useFor": "new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested",
126
175
  "boundary": "does not create later artefacts or skip Mode/Slice Decision after Brownfield Review"
127
176
  },
128
177
  {
129
178
  "slug": "qa-gate",
179
+ "discovery": "automatic",
130
180
  "useFor": "final QA decision",
131
181
  "boundary": "only instance for `pass | revise | block`"
132
182
  },
133
183
  {
134
184
  "slug": "release-or",
185
+ "discovery": "automatic",
135
186
  "useFor": "auditable closeout for every relevant run",
136
187
  "boundary": "not a QA substitute"
137
188
  },
138
189
  {
139
190
  "slug": "task-plan-review",
191
+ "discovery": "automatic",
140
192
  "useFor": "after implementation and before QA, verify TP coverage",
141
193
  "boundary": "no final QA decision"
142
194
  }
@@ -84,7 +84,7 @@ It must not introduce a second gate model or override `gate-check`, `delivery-ma
84
84
 
85
85
  - `mode`: `quick_task | verified_change | structured_delivery | unknown`
86
86
  - `run_id`: the exactly selected canonical run
87
- - `presentation_language`: `de | en`, with unsupported or absent chat language resolved to `en`
87
+ - `presentation_language`: the resolved complete locale-pack tag; absent, unsupported or incomplete packs resolve to the registry's deterministic `en` fallback
88
88
  - `status`: `open | blocked | pass | warn | revise | block | in_progress`
89
89
  - `current_gate`: current user gate or internal step
90
90
  - `mode_slice_decision`: `undecided | quick_task | verified_change | structured_slice | structured_delivery | block`
@@ -157,8 +157,9 @@ question or exact-text fallback.
157
157
 
158
158
  The card answers exactly three user questions, in this order:
159
159
 
160
- 1. **Where am I?** A human-readable gate title, selected `run_id` as secondary
161
- context and a clear ready-for-decision state.
160
+ 1. **Where am I?** A localized human-readable gate title, deterministic human
161
+ run title, selected `run_id` as secondary context, compact `UR · PRD · SD · TP`
162
+ artefact links and a clear ready-for-decision state.
162
163
  2. **What does this decision do?** The exact `Approval: <GateName>` value, its
163
164
  concrete next outcome and the most important boundary that remains.
164
165
  3. **What happens next?** The immediate agent-controlled action and the next
@@ -168,7 +169,8 @@ The card answers exactly three user questions, in this order:
168
169
  Use this compact composition:
169
170
 
170
171
  ```text
171
- <human-readable gate title> · <run_id>
172
+ <localized gate title> · <human run title> · <run_id>
173
+ <UR link or localized missing text> · <PRD link or localized missing text> · <SD link or localized missing text> · <TP link or localized missing text>
172
174
  <localized ready-for-decision line>
173
175
 
174
176
  <localized approve heading>
@@ -178,11 +180,14 @@ Use this compact composition:
178
180
  <localized immediate agent action>. <localized next user decision or no-action statement>.
179
181
  ```
180
182
 
181
- Resolve all explanatory text through the Interaction Locale Contract. German
182
- uses the approved German product labels for readiness, approval and the next
183
- transition; English is the deterministic default for absent or unsupported
184
- locales. Gate names, `run_id` and exact approval values are never translated.
185
- The meaning, ordering and authority boundary must be identical across locales.
183
+ Resolve all AGDF-owned explanatory text through the canonical Interaction
184
+ Locale Registry. `en` and `de` are initial reviewed packs, not a closed locale
185
+ list. English is the deterministic fallback for absent, unsupported or
186
+ incomplete packs. Gate identifiers, `run_id`, canonical paths and exact
187
+ approval values are never translated. The visible gate title is localized;
188
+ for example, the German title may be `Lösungsdesign` while the authorization
189
+ value remains `Approval: SD`. Meaning, ordering and authority boundaries are
190
+ identical across locale packs.
186
191
 
187
192
  The approval-time card must not be a Markdown table or dashboard. It must not
188
193
  present raw control-state keys, machine status values, diagnostic codes,
@@ -333,11 +338,13 @@ Every AGDF interaction belongs to exactly one semantic kind:
333
338
  - `clarification`: asks for missing intent or a choice that does not itself authorize a gated transition.
334
339
  - `tool_permission`: requests host-owned authority for a command, file change, network access, external path, app action or comparable technical side effect.
335
340
  - `gate_approval`: requests deliberate user input for the one current AGDF user gate after its durable artefact and selected run are ready.
341
+ - `blocked`: explains a blocker and the one permissible recovery action without offering approval controls.
342
+ - `status`: reports current state without asking for a decision.
336
343
 
337
344
  The semantic interaction envelope is:
338
345
 
339
346
  ```text
340
- interaction_kind: clarification | tool_permission | gate_approval
347
+ interaction_kind: clarification | tool_permission | gate_approval | blocked | status
341
348
  surface: codex | claude | opencode | fallback
342
349
  run_id: required for gate_approval
343
350
  current_gate: required for gate_approval
@@ -364,7 +371,7 @@ Before presenting `gate_approval`, the agent must:
364
371
 
365
372
  1. resolve exactly one selected run;
366
373
  2. run the canonical gate evaluation and confirm that the current gate's durable artefact is present and ready;
367
- 3. emit the separate localized Gate Transition Card 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>` plus bounded revise and cancel/decline outcomes;
374
+ 3. emit the separate localized Gate Transition Card 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;
368
375
  4. wait for deliberate user input without a timeout, default, preselection, hook-supplied answer or agent-to-agent substitute;
369
376
  5. re-run canonical gate evaluation against the same `run_id` and expected gate immediately before persistence;
370
377
  6. reject missing evidence, ambiguous or wrong run, wrong gate, stale state and any response that is no longer valid;
@@ -375,7 +382,16 @@ host control is presented, or the agent immediately uses the exact-text
375
382
  fallback. A host that does not apply the control does not trigger a second
376
383
  native prompt. AGDF must not simulate or force host-owned presentation.
377
384
 
378
- 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.
385
+ An eligible interaction must make its presentation outcome visible and
386
+ distinguishable: `presented`, `unavailable_before_invocation`,
387
+ `attempted_not_applied`, or `unsafe_to_wait`. This is transient presentation
388
+ evidence only, never a persisted approval, selected-run authority or substitute
389
+ for post-response revalidation. A textual fallback names the outcome, gives the
390
+ exact approval value and confirms that authority is unchanged. A fresh explicit
391
+ user request may reopen the unchanged decision after revalidation; it is not an
392
+ automatic retry.
393
+
394
+ 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.
379
395
 
380
396
  Surface adapter rules:
381
397
 
@@ -392,18 +408,63 @@ Exact textual approvals remain canonical and fully supported on every surface. I
392
408
 
393
409
  ### Interaction Locale Contract
394
410
 
395
- User-facing native questions, option descriptions and exact-text fallback explanations use the configured project chat language from `.agdf/control/config.json`:
411
+ User-facing native questions, option descriptions, primary chat cards, exact-text
412
+ fallback and human CLI output use the configured project chat language from
413
+ `.agdf/control/config.json` and the canonical registry
414
+ `plugin/meta/agdf-interaction-locales.json`:
396
415
 
397
- - `chat_language: de` selects the German presentation copy;
398
- - `chat_language: en` selects English presentation copy;
399
- - an absent, unsupported or not-yet-translated chat language falls back deterministically to English;
400
- - one question must not mix presentation languages;
416
+ - resolve an exact complete pack, then its language subtag, then deterministic English fallback;
417
+ - `en` and `de` are the initial complete packs; additional reviewed complete packs are supported without changing runtime logic;
418
+ - an incomplete pack is unsupported and must fail to English as a unit;
419
+ - one interaction must not mix presentation languages, including labels and descriptions;
401
420
  - durable artefacts, runtime rules, task identifiers and machine-facing approval values remain English;
402
421
  - the exact approval value remains `Approval: <GateName>` in every locale;
403
- - localized `revise`, `decline` and `cancel` labels are presentation text only and never carry gate authority.
422
+ - localized `revise`, `decline` and `cancel` labels are presentation text only and never carry gate authority;
423
+ - host-owned chrome follows the host's own UI language and must not be presented as AGDF-translated chat copy.
404
424
 
405
425
  The locale changes presentation only. It must not change gate meaning, option ordering, readiness, validation, revalidation or persistence. Host-provided free-text labels and skip actions are not AGDF-owned approval options and must never advance a gate.
406
426
 
427
+ ### Human Decision Presentation Contract
428
+
429
+ The primary user surface is a pure projection of the selected canonical run.
430
+ It must never become a second evaluator, state store, renderer authority or
431
+ approval path. Native controls, exact-text fallback and human CLI output use
432
+ the same semantic payload and outcome ordering; machine JSON retains its
433
+ stable field names and diagnostic values.
434
+
435
+ For every primary chat card:
436
+
437
+ 1. Resolve a human run title deterministically from the current artefact
438
+ heading, approved UR heading, first non-empty Objective line, then normalized
439
+ `run_id`.
440
+ 2. Show `UR · PRD · SD · TP` in that stable order. Existing selected-run
441
+ artefacts are links with readable labels; missing artefacts use localized
442
+ non-link text. Never guess a path or emit a broken link.
443
+ 3. Use a localized visible gate title while preserving the exact gate identifier
444
+ and `Approval: <GateName>` authorization value.
445
+ 4. Keep primary copy decision-oriented. Raw keys such as `next_user_gate`,
446
+ `mode_slice_decision` and `required_next_gate`, diagnostic codes and machine
447
+ status values belong to JSON or audit detail, not the primary interaction.
448
+
449
+ For a ready approval, explicit options are ordered `approve`, `revise`,
450
+ `decline`; an explicit `cancel` follows only on surfaces that support it, while
451
+ host dismissal maps to `cancel` on three-choice surfaces. Do not preselect,
452
+ auto-submit, recommend as authorization, skip or reorder an option. Labels and
453
+ descriptions use the same resolved locale and must have distinct, non-empty
454
+ accessible names. Translation length budgets must preserve meaning without
455
+ truncation being the only distinction.
456
+
457
+ Normalize outcomes as distinct values:
458
+
459
+ ```text
460
+ approve | revise | decline | cancel | no_response | timeout | empty | invalid | stale
461
+ ```
462
+
463
+ Missing input, timeout, cancellation and empty input are not decline. Only
464
+ `approve` backed by the exact revalidated `Approval: <GateName>` value may
465
+ advance a gate. Clarification, blocked, internal-step and status-only
466
+ interactions must not display gate-approval controls.
467
+
407
468
  ## Brownfield Review After G-00
408
469
 
409
470
  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.
@@ -54,7 +54,7 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
54
54
 
55
55
  ## Native Interaction Path
56
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.
57
+ Use the Runtime Contract's Native Interaction Contract to classify every candidate interaction as `clarification`, `tool_permission`, `gate_approval`, `blocked` or `status` before selecting a host control.
58
58
 
59
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
60
 
@@ -62,20 +62,20 @@ For a ready `gate_approval`:
62
62
 
63
63
  1. Resolve exactly one selected run and evaluate the current gate.
64
64
  2. Confirm the required durable artefact is present and ready before presenting a question.
65
- 3. Render a separate localized Gate Transition Card immediately before any native question or exact-text fallback. Never put the card only into the question, button description or hidden tool context.
65
+ 3. Render a separate localized Gate Transition Card immediately before any native question or exact-text fallback. It includes the deterministic human run title and `UR · PRD · SD · TP` links from the selected run. Never put the card only into the question, button description or hidden tool context.
66
66
  4. Treat the operational Run Status Card as evaluation and audit input, not as the approval-time product surface. Do not paste its table, raw keys, machine statuses, evidence or diagnostic detail into the transition card.
67
67
  5. Compose the transition card as one human-readable gate title with `run_id`, one ready-for-decision line, one short approval-effect block and one short next-transition block. It must answer only: where am I, what does this decision do, and what happens next.
68
68
  6. 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.
69
69
  7. Ask exactly one question that names the selected `run_id` and `current_gate`.
70
- 8. Offer the exact approving option `Approval: <GateName>` plus bounded revise and cancel/decline outcomes.
70
+ 8. 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.
71
71
  9. 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.
72
72
  10. Re-run gate evaluation for the same run and expected gate after the response and immediately before persistence.
73
73
  11. 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.
74
74
  12. Persist accepted input only through the existing control-state workflow.
75
75
 
76
- Before composing the question, resolve the configured chat locale from `.agdf/control/config.json`. Use German presentation text for `chat_language: de`; use English for `chat_language: en` or as the deterministic fallback for an absent or unsupported locale. Keep `Approval: <GateName>` exactly unchanged in every language, and do not mix presentation languages within one question.
76
+ Before composing the question, resolve the configured chat locale from `.agdf/control/config.json` through `plugin/meta/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.
77
77
 
78
- For the transition card, German uses `Bereit für deine Entscheidung`, `Jetzt freigeben` and `Danach`; English uses `Ready for your decision`, `Approve now` and `Next`. Keep each card in one locale. Use a human-readable gate title rather than an internal status label. Do not render a Markdown table, dashboard rows, raw control-state keys, diagnostic codes, evidence lists, a duplicated gate question or a false user gate in the approval-time card.
78
+ For the transition card, use the complete resolved 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`. Keep each card in one locale. Use a localized human-readable gate title rather than an internal status label, while leaving the exact gate identifier and approval value unchanged. Do not render a Markdown table, dashboard rows, raw control-state keys, diagnostic codes, evidence lists, a duplicated gate question or a false user gate in the approval-time card.
79
79
 
80
80
  The primary option remains exactly `Approval: SD`; 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.
81
81
 
@@ -84,6 +84,13 @@ apply or safely return the native question on that attempt, switch immediately
84
84
  to the exact textual approval. Do not ask the user to request the buttons again
85
85
  and do not create a retry loop or simulated control.
86
86
 
87
+ State the outcome visibly: `presented`, `unavailable_before_invocation`,
88
+ `attempted_not_applied` or `unsafe_to_wait`. For every fallback, say in the
89
+ configured locale why a native control was not usable, show the exact approval
90
+ value and confirm that authority is unchanged. This transient outcome is not
91
+ approval evidence. A new explicit user request may reopen the unchanged decision
92
+ only after fresh run/gate/artefact revalidation; never retry automatically.
93
+
87
94
  Surface behavior:
88
95
 
89
96
  - Codex: invoke the native short-question/request-user-input control on the first eligible attempt when callable, ask one gate question and omit auto-resolution; if it is not rendered or applied, use exact text immediately.
@@ -91,9 +98,11 @@ Surface behavior:
91
98
  - 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.
92
99
  - Other, unavailable or non-interactive surfaces: use exact textual approval and wait for a new explicit user response.
93
100
 
94
- Localized labels such as `Überarbeiten`/`Revise`, `Ablehnen`/`Decline` and `Abbrechen`/`Cancel` are presentation mappings to stable non-approval outcomes only. Host-provided free-text or `Überspringen`/`Skip` actions never advance an AGDF gate.
101
+ 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.
102
+
103
+ A free-form response must still exactly match the current gate's approval formula after revalidation. Keep `decline`, `cancel`, `no_response`, `timeout`, `empty`, `invalid` and `stale` distinct; none advances the gate. Native presentation, host permission and plan approval are inputs or separate authority domains, never durable AGDF authority.
95
104
 
96
- 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.
105
+ Every primary chat card shows the selected run's `UR`, `PRD`, `SD` and `TP` in that order. Render an existing canonical path as a readable link and a missing artefact as localized non-link text; never guess paths. Resolve the human run title from current artefact heading, approved UR heading, Objective, then normalized `run_id`. Status, blocked, clarification and internal-step interactions use the same locale and artefact projection but do not show approval buttons. Keep raw process keys and machine status values in JSON or audit detail.
97
106
 
98
107
  ## Rules
99
108
  1. Fail closed when a required approval or artefact status is missing.
@@ -1,5 +1,8 @@
1
+ import { normalizeInteractionOutcome } from "../interaction-presentation.js";
2
+
1
3
  export function validateGateApprovalResponse({
2
4
  response,
5
+ responseOutcome,
3
6
  responseOrigin,
4
7
  expectedApproval,
5
8
  expectedRunId,
@@ -9,12 +12,12 @@ export function validateGateApprovalResponse({
9
12
  expectedRevisionId,
10
13
  currentRevisionId,
11
14
  durableArtefactReady,
15
+ timedOut = false,
16
+ noResponse = false,
12
17
  }) {
13
18
  const checks = [
14
19
  [responseOrigin === "deliberate_user_input", "non_deliberate_response"],
15
- [typeof response === "string" && response.length > 0, "empty_response"],
16
20
  [expectedApproval === `Approval: ${expectedGate}`, "approval_formula_mismatch"],
17
- [response === expectedApproval, "wrong_or_non_approval_response"],
18
21
  [Boolean(expectedRunId) && expectedRunId === currentRunId, "changed_or_wrong_run"],
19
22
  [Boolean(expectedGate) && expectedGate === currentGate, "changed_or_wrong_gate"],
20
23
  [Boolean(expectedRevisionId) && expectedRevisionId === currentRevisionId, "stale_revision"],
@@ -22,7 +25,25 @@ export function validateGateApprovalResponse({
22
25
  ];
23
26
 
24
27
  const failed = checks.find(([accepted]) => !accepted);
25
- return failed
26
- ? { accepted: false, reason: failed[1] }
27
- : { accepted: true, reason: "accepted" };
28
+ if (failed) return { accepted: false, reason: failed[1] };
29
+
30
+ const outcomeCandidate = responseOutcome && responseOutcome !== "approve" ? responseOutcome : response;
31
+ const outcome = normalizeInteractionOutcome(outcomeCandidate, {
32
+ expectedApproval,
33
+ timedOut,
34
+ noResponse,
35
+ });
36
+ const rejectionReasons = {
37
+ revise: "revision_requested",
38
+ decline: "declined",
39
+ cancel: "cancelled",
40
+ no_response: "no_response",
41
+ timeout: "timed_out",
42
+ empty: "empty_response",
43
+ invalid: "wrong_or_non_approval_response",
44
+ stale: "stale_response",
45
+ };
46
+ return outcome === "approve"
47
+ ? { accepted: true, reason: "accepted" }
48
+ : { accepted: false, reason: rejectionReasons[outcome] ?? "wrong_or_non_approval_response" };
28
49
  }