create-agdf 0.8.4 → 0.8.6
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/bin/create-agdf.js +141 -10
- package/generated/.agdf/control/templates/artefacts/VERIFIED_CHANGE.md +10 -0
- package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +3 -3
- package/generated/.github/skills/agdf-gate-check/SKILL.md +22 -9
- package/generated/.github/skills/agdf-interaction-locales.json +74 -4
- package/generated/.github/skills/agdf-release-or/SKILL.md +4 -3
- package/generated/.github/skills/agdf-runtime-contract.md +79 -8
- package/generated/.opencode/agdf-interaction-locales.json +74 -4
- package/generated/.opencode/agdf-runtime-contract.md +79 -8
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +3 -3
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +22 -9
- package/generated/.opencode/skills/agdf-release-or/SKILL.md +4 -3
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/control/templates/artefacts/VERIFIED_CHANGE.md +10 -0
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +74 -4
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +13 -1
- package/generated/plugins/agdf/meta/agdf-runtime-contract.md +79 -8
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +3 -3
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +22 -9
- package/generated/plugins/agdf/skills/release-or/SKILL.md +4 -3
- package/lib/control-state/run-state-parser.js +30 -3
- package/lib/interaction-presentation.js +118 -4
- package/package.json +1 -1
|
@@ -28,7 +28,19 @@
|
|
|
28
28
|
"lifecycle": "Delivery status",
|
|
29
29
|
"allowed": "Allowed now",
|
|
30
30
|
"forbidden": "Forbidden now",
|
|
31
|
-
"artefacts": "Artefacts"
|
|
31
|
+
"artefacts": "Artefacts",
|
|
32
|
+
"breadcrumb": "Path",
|
|
33
|
+
"breadcrumbFulfilled": "\u2713",
|
|
34
|
+
"breadcrumbCurrent": "\u25cf",
|
|
35
|
+
"breadcrumbOpen": "\u25cb",
|
|
36
|
+
"breadcrumbSeparator": " \u00b7 "
|
|
37
|
+
},
|
|
38
|
+
"internalStateLabels": {
|
|
39
|
+
"verifiedChange": "Compact change under review",
|
|
40
|
+
"verifiedChangeEscalated": "Escalated to structured delivery",
|
|
41
|
+
"contextGraphMaintained": "Project memory maintained",
|
|
42
|
+
"contextGraphOpenGap": "Graph gap open",
|
|
43
|
+
"multiScopeBlocked": "Ambiguous scope, clarification needed"
|
|
32
44
|
},
|
|
33
45
|
"qualityReadiness": {
|
|
34
46
|
"title": "Quality Readiness",
|
|
@@ -63,7 +75,18 @@
|
|
|
63
75
|
"Brownfield Analysis": "Implementation preparation",
|
|
64
76
|
"CD+Tests": "Implementation and tests",
|
|
65
77
|
"CR": "Code review",
|
|
66
|
-
"OR": "Delivery report"
|
|
78
|
+
"OR": "Delivery report",
|
|
79
|
+
"Verified Change": "Verified change",
|
|
80
|
+
"Quick Task": "Quick task",
|
|
81
|
+
"Block": "Block"
|
|
82
|
+
},
|
|
83
|
+
"gateActionTitles": {
|
|
84
|
+
"UR": "Approve user requirements",
|
|
85
|
+
"PRD": "Approve product requirements",
|
|
86
|
+
"SD": "Approve solution design",
|
|
87
|
+
"TP": "Approve task and test plan",
|
|
88
|
+
"QA": "Approve quality decision",
|
|
89
|
+
"UAT": "Accept delivery result"
|
|
67
90
|
},
|
|
68
91
|
"interaction": {
|
|
69
92
|
"ready": "Ready for your decision",
|
|
@@ -120,6 +143,18 @@
|
|
|
120
143
|
"TP": "Run pre-implementation Brownfield Analysis; implementation starts only if it passes.",
|
|
121
144
|
"QA": "Prepare the user-acceptance decision; release remains blocked.",
|
|
122
145
|
"UAT": "Prepare the delivery report; version-control and release actions still require explicit instruction."
|
|
146
|
+
},
|
|
147
|
+
"narration": {
|
|
148
|
+
"gateSatisfied": "{gate} approved",
|
|
149
|
+
"noAction": "no user action required now",
|
|
150
|
+
"gates": {
|
|
151
|
+
"UR": { "agentNext": "Agent runs Brownfield Review next" },
|
|
152
|
+
"PRD": { "agentNext": "Agent drafts the Solution Design next" },
|
|
153
|
+
"SD": { "agentNext": "Agent drafts the Task and Test Plan next" },
|
|
154
|
+
"TP": { "agentNext": "Agent runs pre-implementation Brownfield Analysis next" },
|
|
155
|
+
"QA": { "agentNext": "Agent prepares the user-acceptance decision", "userAction": "user acceptance decision next" },
|
|
156
|
+
"UAT": { "agentNext": "Agent prepares the delivery report" }
|
|
157
|
+
}
|
|
123
158
|
}
|
|
124
159
|
}
|
|
125
160
|
},
|
|
@@ -143,7 +178,19 @@
|
|
|
143
178
|
"lifecycle": "Lieferstatus",
|
|
144
179
|
"allowed": "Jetzt erlaubt",
|
|
145
180
|
"forbidden": "Aktuell verboten",
|
|
146
|
-
"artefacts": "Artefakte"
|
|
181
|
+
"artefacts": "Artefakte",
|
|
182
|
+
"breadcrumb": "Pfad",
|
|
183
|
+
"breadcrumbFulfilled": "\u2713",
|
|
184
|
+
"breadcrumbCurrent": "\u25cf",
|
|
185
|
+
"breadcrumbOpen": "\u25cb",
|
|
186
|
+
"breadcrumbSeparator": " \u00b7 "
|
|
187
|
+
},
|
|
188
|
+
"internalStateLabels": {
|
|
189
|
+
"verifiedChange": "Kompakte Änderung wird geprüft",
|
|
190
|
+
"verifiedChangeEscalated": "Eskaliert zu structured delivery",
|
|
191
|
+
"contextGraphMaintained": "Projektgedächtnis wird gepflegt",
|
|
192
|
+
"contextGraphOpenGap": "Graph-Lücke offen",
|
|
193
|
+
"multiScopeBlocked": "Mehrdeutiger Scope, Klärung nötig"
|
|
147
194
|
},
|
|
148
195
|
"qualityReadiness": {
|
|
149
196
|
"title": "Quality Readiness",
|
|
@@ -178,7 +225,18 @@
|
|
|
178
225
|
"Brownfield Analysis": "Implementierungsvorbereitung",
|
|
179
226
|
"CD+Tests": "Implementierung und Tests",
|
|
180
227
|
"CR": "Code-Review",
|
|
181
|
-
"OR": "Lieferbericht"
|
|
228
|
+
"OR": "Lieferbericht",
|
|
229
|
+
"Verified Change": "Verified Change",
|
|
230
|
+
"Quick Task": "Quick Task",
|
|
231
|
+
"Block": "Block"
|
|
232
|
+
},
|
|
233
|
+
"gateActionTitles": {
|
|
234
|
+
"UR": "Nutzeranforderung freigeben",
|
|
235
|
+
"PRD": "Produktanforderungen freigeben",
|
|
236
|
+
"SD": "Lösungsdesign freigeben",
|
|
237
|
+
"TP": "Umsetzungsplan freigeben",
|
|
238
|
+
"QA": "Qualitätsentscheidung freigeben",
|
|
239
|
+
"UAT": "Ergebnis abnehmen"
|
|
182
240
|
},
|
|
183
241
|
"interaction": {
|
|
184
242
|
"ready": "Bereit für deine Entscheidung",
|
|
@@ -235,6 +293,18 @@
|
|
|
235
293
|
"TP": "Die Brownfield-Analyse vor der Implementierung durchführen; die Implementierung startet nur nach bestandenem Ergebnis.",
|
|
236
294
|
"QA": "Die Nutzerabnahme vorbereiten; die Veröffentlichung bleibt gesperrt.",
|
|
237
295
|
"UAT": "Den Lieferbericht vorbereiten; Versionskontroll- und Veröffentlichungsaktionen benötigen weiterhin eine ausdrückliche Anweisung."
|
|
296
|
+
},
|
|
297
|
+
"narration": {
|
|
298
|
+
"gateSatisfied": "{gate} genehmigt",
|
|
299
|
+
"noAction": "keine Nutzeraktion erforderlich",
|
|
300
|
+
"gates": {
|
|
301
|
+
"UR": { "agentNext": "Agent führt Brownfield Review als Nächstes durch" },
|
|
302
|
+
"PRD": { "agentNext": "Agent entwirft als Nächstes das Lösungsdesign" },
|
|
303
|
+
"SD": { "agentNext": "Agent entwirft als Nächstes den Aufgaben- und Testplan" },
|
|
304
|
+
"TP": { "agentNext": "Agent führt Brownfield-Analyse vor Implementierung durch" },
|
|
305
|
+
"QA": { "agentNext": "Agent bereitet die Nutzerabnahme vor", "userAction": "Nutzerabnahme als Nächstes" },
|
|
306
|
+
"UAT": { "agentNext": "Agent bereitet den Lieferbericht vor" }
|
|
307
|
+
}
|
|
238
308
|
}
|
|
239
309
|
}
|
|
240
310
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
3
|
"id": "agdf",
|
|
4
|
-
"version": "0.8.
|
|
4
|
+
"version": "0.8.6",
|
|
5
5
|
"displayName": "AI Governance & Delivery Framework",
|
|
6
6
|
"developerName": "Arndt Gold",
|
|
7
7
|
"description": "Codex-first operating system for governed AI-assisted delivery.",
|
|
@@ -97,6 +97,9 @@
|
|
|
97
97
|
"decline"
|
|
98
98
|
],
|
|
99
99
|
"dismissOutcome": "cancel",
|
|
100
|
+
"approvalValueTransport": "decorated_label_only",
|
|
101
|
+
"waitSafety": "deliberate_no_auto_resolution",
|
|
102
|
+
"authorizationPath": "exact_text",
|
|
100
103
|
"technicalPermissionOwner": "codex_host"
|
|
101
104
|
},
|
|
102
105
|
"claude": {
|
|
@@ -109,6 +112,9 @@
|
|
|
109
112
|
"decline"
|
|
110
113
|
],
|
|
111
114
|
"dismissOutcome": "cancel",
|
|
115
|
+
"approvalValueTransport": "decorated_label_only",
|
|
116
|
+
"waitSafety": "deliberate_no_auto_resolution",
|
|
117
|
+
"authorizationPath": "exact_text",
|
|
112
118
|
"technicalPermissionOwner": "claude_host"
|
|
113
119
|
},
|
|
114
120
|
"opencode": {
|
|
@@ -121,6 +127,9 @@
|
|
|
121
127
|
"decline"
|
|
122
128
|
],
|
|
123
129
|
"dismissOutcome": "cancel",
|
|
130
|
+
"approvalValueTransport": "decorated_label_only",
|
|
131
|
+
"waitSafety": "deliberate_no_auto_resolution",
|
|
132
|
+
"authorizationPath": "exact_text",
|
|
124
133
|
"technicalPermissionOwner": "opencode_host"
|
|
125
134
|
},
|
|
126
135
|
"fallback": {
|
|
@@ -133,6 +142,9 @@
|
|
|
133
142
|
"decline",
|
|
134
143
|
"cancel"
|
|
135
144
|
],
|
|
145
|
+
"approvalValueTransport": "exact_option_value",
|
|
146
|
+
"waitSafety": "deliberate_no_auto_resolution",
|
|
147
|
+
"authorizationPath": "exact_text",
|
|
136
148
|
"technicalPermissionOwner": "host_specific"
|
|
137
149
|
}
|
|
138
150
|
}
|
|
@@ -36,10 +36,12 @@ After `Approval: UR`, Brownfield Review may select `verified_change` only when a
|
|
|
36
36
|
1. exactly one repository-relative canonical owner and bounded source/derived paths;
|
|
37
37
|
2. no gate, permission, security, persistence, architecture, external API, CLI or release behavior impact;
|
|
38
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
|
|
39
|
+
4. a full baseline commit plus tracked and untracked worktree baseline paths captured before eligibility, with no candidate path already dirty; and
|
|
40
40
|
5. an explicit `structured_slice` or `structured_delivery` escalation target.
|
|
41
41
|
|
|
42
|
-
The record is the compact eligibility, execution and mini-closeout artefact.
|
|
42
|
+
The record is the compact Brownfield selection, eligibility, execution and mini-closeout artefact. The selected run may link the same normalized record path as Brownfield Review, Verified Change and OR only in `verified_change` mode and only with lifecycle-consistent role states; separate Brownfield and OR files remain supported. Permitted control paths derive only from recognized, explicitly linked artefacts beneath the selected run's own artefact directory.
|
|
43
|
+
|
|
44
|
+
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 a machine-readable exact changed-path snapshot with passing scope status, passing validation evidence and, where applicable, passing propagation evidence. Active runs compare that snapshot with the current post-baseline worktree. Completed executed runs validate the persisted snapshot and record evidence without being retroactively invalidated by later unrelated live-worktree changes.
|
|
43
45
|
|
|
44
46
|
### Non-Normative Trivial Change Boundary
|
|
45
47
|
|
|
@@ -145,6 +147,65 @@ and `Allowed after approval` when a missing approval exists, `Next step` and
|
|
|
145
147
|
`Quality outlook`. Keep mode, forbidden actions, evidence and next-skill detail
|
|
146
148
|
in the surrounding control artefact when they are relevant.
|
|
147
149
|
|
|
150
|
+
### Breadcrumb
|
|
151
|
+
|
|
152
|
+
The compact human Run Status Card may include a single-line path-derived breadcrumb that
|
|
153
|
+
shows the user's position in the delivery journey. It is derived from the Mode/Slice
|
|
154
|
+
Decision and the Approvals table — not a fixed template.
|
|
155
|
+
|
|
156
|
+
| Mode/Slice | Breadcrumb gates |
|
|
157
|
+
|---|---|
|
|
158
|
+
| structured_delivery / structured_slice | `UR · PRD · SD · TP · QA · UAT` |
|
|
159
|
+
| verified_change | `UR · Verified Change · OR` |
|
|
160
|
+
| quick_task | `UR · Quick Task` |
|
|
161
|
+
| block | `UR · Block` |
|
|
162
|
+
|
|
163
|
+
- `✓` fulfilled, `●` current, `○` open.
|
|
164
|
+
- Non-applicable gates are absent (no `–` placeholders, no thinned standard template).
|
|
165
|
+
- `verified_change` is one collapsed node, not a degraded standard route.
|
|
166
|
+
- The breadcrumb is a derived, non-authorising projection. It does not add a new gate
|
|
167
|
+
model or override the Gate Transition Model.
|
|
168
|
+
- The machine-readable `status_card` JSON may carry a derived `breadcrumb` array
|
|
169
|
+
`[{gate, status}]` for the presentation layer; this is additive and does not replace
|
|
170
|
+
any existing field.
|
|
171
|
+
|
|
172
|
+
### Post-Acceptance Transition Narration
|
|
173
|
+
|
|
174
|
+
After each accepted gate approval, the agent emits exactly one status line using the
|
|
175
|
+
template:
|
|
176
|
+
|
|
177
|
+
```text
|
|
178
|
+
<what was satisfied> → <what the agent does next internally> → <user action: yes/no>
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
This narration is temporally and structurally separate from the Gate Transition Card:
|
|
182
|
+
|
|
183
|
+
- The Gate Transition Card is **pre-approval** (in the orientation envelope); it is
|
|
184
|
+
subjunctive and contains the exact `Approval:` value.
|
|
185
|
+
- The narration is **post-acceptance** (after the gate advanced); it is indicative and
|
|
186
|
+
does not contain the `Approval:` value.
|
|
187
|
+
- Both never appear in the same assistant message.
|
|
188
|
+
- The narration does not repeat the decision's effect (the card's job) and uses its own
|
|
189
|
+
template, not the card's three-question form.
|
|
190
|
+
- For internal steps (Brownfield Review, Brownfield Analysis), the narration states what
|
|
191
|
+
the agent does next and that no user action is required, without exposing
|
|
192
|
+
`next_user_gate: none` or asking for a second approval.
|
|
193
|
+
|
|
194
|
+
### Internal-State Collapse
|
|
195
|
+
|
|
196
|
+
The derived-projection principle above applies explicitly to internal sub-states. The
|
|
197
|
+
full Run Status Card (machine/audit projection) keeps all fields unchanged. Only the
|
|
198
|
+
compact human card collapses internal sub-states to stable human labels:
|
|
199
|
+
|
|
200
|
+
| Internal sub-state | Human label | Stays explicit |
|
|
201
|
+
|---|---|---|
|
|
202
|
+
| `verified_change`: missing/draft/invalid/eligible/executed | "Compact change under review" | `escalated` → "Escalated to structured delivery" |
|
|
203
|
+
| `context_graph_required_action`: link/update/create/resolve_drift | "Project memory maintained" | `open_gap` → "Graph gap open" |
|
|
204
|
+
| `multi_scope_state`: clear/ambiguous | (not shown) | `blocked` → "Ambiguous scope, clarification needed" |
|
|
205
|
+
|
|
206
|
+
`open_gap` and `escalated` remain explicitly visible. The full machine projection retains
|
|
207
|
+
all raw values unchanged.
|
|
208
|
+
|
|
148
209
|
## Quality Readiness Projection
|
|
149
210
|
|
|
150
211
|
After CD+Tests, when any of the four review/QA artefacts exists, surfaces may show one compact
|
|
@@ -181,6 +242,14 @@ before invoking any native question tool or emitting an exact-text approval
|
|
|
181
242
|
request. Splitting the cards across separate assistant turns or invoking the
|
|
182
243
|
tool after only one card is a failed interaction, not a valid presentation.
|
|
183
244
|
|
|
245
|
+
The first visible line of that envelope is the localized action-oriented title
|
|
246
|
+
of the current user gate, rendered as a level-two Markdown heading or equivalent
|
|
247
|
+
accessible host heading inside the compact approval-time Run Status Card.
|
|
248
|
+
`AGDF Status`, `Run Status Card`, `Gate Transition Card`, raw gate identifiers
|
|
249
|
+
and machine values are semantic or diagnostic labels only and must not become
|
|
250
|
+
the primary heading. The action title appears exactly once and does not replace,
|
|
251
|
+
merge or reorder either required card block.
|
|
252
|
+
|
|
184
253
|
The compact approval-time Run Status Card contains exactly six operational
|
|
185
254
|
fields: selected run, readiness status, current gate, missing exact approval,
|
|
186
255
|
one next action and quality outlook. It uses localized human-readable labels
|
|
@@ -390,7 +459,7 @@ interaction_kind: clarification | tool_permission | gate_approval | blocked | st
|
|
|
390
459
|
surface: codex | claude | opencode | fallback
|
|
391
460
|
run_id: required for gate_approval
|
|
392
461
|
current_gate: required for gate_approval
|
|
393
|
-
native_attempt_required: true only
|
|
462
|
+
native_attempt_required: true only after ready-gate and adapter-capability preflight prove exact value transport and safe deliberate waiting
|
|
394
463
|
prompt: required
|
|
395
464
|
options: required for a structured question
|
|
396
465
|
effects: required when the interaction can cause side effects
|
|
@@ -421,11 +490,13 @@ Before presenting `gate_approval`, the agent must:
|
|
|
421
490
|
6. reject missing evidence, ambiguous or wrong run, wrong gate, stale state and any response that is no longer valid;
|
|
422
491
|
7. persist an accepted approval only through the existing control-state workflow.
|
|
423
492
|
|
|
424
|
-
For
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
493
|
+
For a ready `gate_approval`, interaction kind and native capability are separate. Evaluate callability,
|
|
494
|
+
deliberate wait safety and canonical approval-value transport before invocation. `native_attempt_required`
|
|
495
|
+
is true only when current evidence proves `exact_option_value` or `separate_label_and_value` transport
|
|
496
|
+
with safe deliberate waiting. Decorated-only, missing, conflicting or unknown capability fails closed to
|
|
497
|
+
`unavailable_before_invocation`; unsafe waiting fails closed to `unsafe_to_wait`. Both expose false and use
|
|
498
|
+
exact text without invoking the adapter. A report-only CLI evaluation has no verified current host adapter
|
|
499
|
+
and therefore exposes false. Hooks may prepare context but must not answer, approve or replace an eligible attempt.
|
|
429
500
|
|
|
430
501
|
The first eligible native-attempt has a single bounded outcome: the declared
|
|
431
502
|
host control is presented, or the agent immediately uses the exact-text
|
|
@@ -26,14 +26,14 @@ When `.agdf/control/` is present, persist or link `post_ur_review` output under
|
|
|
26
26
|
|
|
27
27
|
## Modes
|
|
28
28
|
|
|
29
|
-
- `post_ur_review`: use after approved durable UR to size and route the work. Output must decide `quick_task`, `structured_slice`, `structured_delivery`, or `block` with scope reason and evidence.
|
|
29
|
+
- `post_ur_review`: use after approved durable UR to size and route the work. Output must decide `quick_task`, `verified_change`, `structured_slice`, `structured_delivery`, or `block` with scope reason and evidence.
|
|
30
30
|
- `pre_implementation_analysis`: use after approved durable TP to verify the implementation path before `CD+Tests`. Output must focus on reuse path, owners, regression risk, test impact and minimal clean implementation.
|
|
31
31
|
|
|
32
32
|
Do not mix both modes silently. Name the active mode in the output.
|
|
33
33
|
|
|
34
34
|
## Rules
|
|
35
35
|
1. Brownfield first: understand the existing codebase before PRD/SD decisions when existing-system impact is possible, and again before implementation.
|
|
36
|
-
2. Brownfield Review after `Approval: UR` is a sizing and routing step. It must visibly decide `quick_task`, `structured_slice`, `structured_delivery`, or `block` before PRD depth or implementation is chosen.
|
|
36
|
+
2. Brownfield Review after `Approval: UR` is a sizing and routing step. It must visibly decide `quick_task`, `verified_change`, `structured_slice`, `structured_delivery`, or `block` before PRD depth or implementation is chosen.
|
|
37
37
|
3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
|
|
38
38
|
4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
|
|
39
39
|
5. No silent parallel structures.
|
|
@@ -106,7 +106,7 @@ Use a concise structure:
|
|
|
106
106
|
## Brownfield Analysis
|
|
107
107
|
- mode: post_ur_review | pre_implementation_analysis
|
|
108
108
|
- decision: pass | revise | block | not_applicable
|
|
109
|
-
- mode_slice_decision: quick_task | structured_slice | structured_delivery | block
|
|
109
|
+
- mode_slice_decision: quick_task | verified_change | structured_slice | structured_delivery | block
|
|
110
110
|
- required_next_gate: none | PRD | SD | TP | Brownfield Analysis
|
|
111
111
|
- artefact: .agdf/control/artefacts/<key>/BROWNFIELD_REVIEW.md | none
|
|
112
112
|
- scope:
|
|
@@ -63,29 +63,30 @@ For a ready `gate_approval`:
|
|
|
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
65
|
3. Build one immutable, non-authorizing presentation snapshot from the selected evaluated run and current revision identity.
|
|
66
|
-
4. Compose one Approval Orientation Envelope as one immediately preceding assistant message containing two distinct blocks. Render the compact localized approval-time Run Status Card first. It contains exactly selected run, readiness status, current gate, missing exact approval, one next action and quality outlook; omit raw keys, machine statuses, evidence, diagnostics and allowed/forbidden inventories.
|
|
66
|
+
4. Compose one Approval Orientation Envelope as one immediately preceding assistant message containing two distinct blocks. Render the compact localized approval-time Run Status Card first. Its first visible line is the localized action-oriented gate title as a level-two Markdown heading or equivalent accessible host heading; generic AGDF/card labels and raw gate IDs cannot be the primary heading. It contains exactly selected run, readiness status, current gate, missing exact approval, one next action and quality outlook; omit raw keys, machine statuses, evidence, diagnostics and allowed/forbidden inventories.
|
|
67
67
|
5. In the same assistant message, render a separate localized Gate Transition Card second, 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 either card only into the question, button description or hidden tool context. Do not invoke the native question tool until the complete two-card envelope is visible.
|
|
68
68
|
6. 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. Run and gate identity may anchor both cards; do not duplicate status rows, action inventories or the native question.
|
|
69
69
|
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.
|
|
70
70
|
8. Ask exactly one question that names the selected `run_id` and `current_gate`.
|
|
71
71
|
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.
|
|
72
72
|
10. 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.
|
|
73
|
-
11. Render both cards once in that single complete assistant message. If the native attempt is unavailable or not applied, continue to exact text without repeating either card.
|
|
73
|
+
11. Render both cards once in that single complete assistant message. Never merge, reverse, omit or duplicate them; the action heading does not replace either card. If the native attempt is unavailable or not applied, continue to exact text without repeating either card.
|
|
74
74
|
12. Re-run gate evaluation for the same run and expected gate after the response and immediately before persistence.
|
|
75
75
|
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.
|
|
76
76
|
14. Persist accepted input only through the existing control-state workflow.
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
78
|
+
Before projecting a ready gate, evaluate adapter callability, deliberate wait safety and canonical
|
|
79
|
+
approval-value transport. Expose `native_attempt_required: true` only when that preflight proves
|
|
80
|
+
`exact_option_value` or `separate_label_and_value` transport with safe deliberate waiting. Decorated-only,
|
|
81
|
+
missing, conflicting or unknown capability exposes false and `unavailable_before_invocation`; unsafe
|
|
82
|
+
waiting exposes false and `unsafe_to_wait`. In both cases use exact text without invoking the adapter.
|
|
83
|
+
A hook, permission result or session context message cannot replace an eligible attempt or supply its answer.
|
|
83
84
|
|
|
84
85
|
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.
|
|
85
86
|
|
|
86
87
|
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.
|
|
87
88
|
|
|
88
|
-
The primary option
|
|
89
|
+
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.
|
|
89
90
|
|
|
90
91
|
Make exactly one native-attempt for the ready gate. If the host does not render,
|
|
91
92
|
apply or safely return the native question on that attempt, switch immediately
|
|
@@ -112,6 +113,18 @@ A free-form response must still exactly match the current gate's approval formul
|
|
|
112
113
|
|
|
113
114
|
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.
|
|
114
115
|
|
|
116
|
+
### Breadcrumb Rendering
|
|
117
|
+
|
|
118
|
+
The compact human Run Status Card includes a single-line path-derived breadcrumb showing the user's position in the delivery journey. Derive it from the Mode/Slice Decision and the Approvals table — not a fixed template. Use `✓` for fulfilled, `●` for current, `○` for open, separated by ` · `. Non-applicable gates are absent. See the Runtime Contract §Breadcrumb for the path templates and the derived `breadcrumb` array.
|
|
119
|
+
|
|
120
|
+
### Post-Acceptance Transition Narration
|
|
121
|
+
|
|
122
|
+
After each accepted gate approval is persisted, emit exactly one narration line using the template `<what was satisfied> → <what the agent does next internally> → <user action: yes/no>`. This generalizes the existing TP pattern (step 7 above) to every gate advancement. The narration is post-acceptance only: it never appears in the same message as the Gate Transition Card, never contains the `Approval:` value, and never repeats the decision's effect. For internal steps (Brownfield Review, Brownfield Analysis), state what the agent does next and that no user action is required, without exposing `next_user_gate: none` or asking for a second approval. See the Runtime Contract §Post-Acceptance Transition Narration for the full contract.
|
|
123
|
+
|
|
124
|
+
### Internal-State Collapse in the Human Card
|
|
125
|
+
|
|
126
|
+
When rendering the compact human Run Status Card, collapse internal sub-states (`verified_change` sub-states, `context_graph_required_action`, `multi_scope_state`) to stable human labels. `escalated`, `open_gap` and `blocked` remain explicitly visible. The full machine/audit projection retains all raw values unchanged. See the Runtime Contract §Internal-State Collapse for the complete mapping table.
|
|
127
|
+
|
|
115
128
|
## Rules
|
|
116
129
|
1. Fail closed when a required approval or artefact status is missing.
|
|
117
130
|
2. The earliest blocking gate wins.
|
|
@@ -125,7 +138,7 @@ Every primary chat card shows the selected run's `UR`, `PRD`, `SD` and `TP` in t
|
|
|
125
138
|
10. Approval of one user gate permits work on the next allowed gate artefact or required internal step only; it never skips directly to implementation.
|
|
126
139
|
11. New product semantics, functional change or user-visible behaviour change requires a durable UR in `.agdf/control/` or a linked authoritative repository SoT before Brownfield Review, PRD, SD, TP, Brownfield Analysis or implementation.
|
|
127
140
|
12. Approval text and durable artefact presence are separate requirements for UR, PRD, SD, TP and QA report decisions. Approval text without the corresponding persisted or linked artefact keeps the current gate at that gate.
|
|
128
|
-
13. After Brownfield Review, decide the process size before drafting PRD or implementing: `quick_task | structured_slice | structured_delivery | block`.
|
|
141
|
+
13. After Brownfield Review, decide the process size before drafting PRD or implementing: `quick_task | verified_change | structured_slice | structured_delivery | block`.
|
|
129
142
|
14. The Mode/Slice Decision must be visible and evidenced before any Quick Task execution, PRD shortcut or implementation. A decision value without scope reason and evidence is still missing.
|
|
130
143
|
15. Missing or incomplete control state must not push setup work back to the user. For a fresh request, draft the current minimal artefact in the response and request the exact approval. Initialize or write `.agdf/control/` only when durable control state is explicitly requested, already live for the repository, or required for a deterministic CLI/CI setup path. Implementation remains forbidden.
|
|
131
144
|
16. Branch names, uncommitted diffs, generated summaries and chat history are not sufficient scope proof when durable artefacts or approvals are missing or conflicting.
|
|
@@ -43,9 +43,10 @@ Use the Runtime Contract definition of `Relevant Run` to decide whether OR is ma
|
|
|
43
43
|
9. End with the immediately permissible next step.
|
|
44
44
|
10. `CD+Tests` is not completion.
|
|
45
45
|
11. When moving a backlog item to Completed or Superseded, use the canonical human-readable table and link the final OR with a document-relative Markdown link.
|
|
46
|
-
12.
|
|
47
|
-
13.
|
|
48
|
-
14.
|
|
46
|
+
12. For an executed `verified_change`, a lifecycle-consistent complete Mini-Closeout in the linked `VERIFIED_CHANGE.md` is the compact OR target; do not require a separate `OR.md` by ritual.
|
|
47
|
+
13. Keep machine status normalization in the CLI; do not write internal snake_case status values into the human-facing backlog.
|
|
48
|
+
14. Reconcile Context Graph impact before clean closeout: report `context_graph_reconciliation: resolved | not_applicable | open_gap`.
|
|
49
|
+
15. If Context Graph work remains unresolved, report it as an explicit open gap and do not describe the run as cleanly handoff-ready.
|
|
49
50
|
15. After writing or updating `MASTER_BACKLOG.md`, run `doctor --json` (or the locally available equivalent) and resolve any `AGDF_BACKLOG_STATUS_UNKNOWN` or `AGDF_BACKLOG_ARTEFACT_LABEL_UNKNOWN` finding before closeout. See the AGDF control scaffold's `MASTER_BACKLOG.md` template Rules section for the canonical status/artefact label vocabulary.
|
|
50
51
|
|
|
51
52
|
## When To Use
|
|
@@ -76,6 +76,24 @@ function rows(s) {
|
|
|
76
76
|
function clean(v = "") {
|
|
77
77
|
return v.replace(/^`|`$/g, "").trim();
|
|
78
78
|
}
|
|
79
|
+
export function parseArtefactPathCell(value = "") {
|
|
80
|
+
const raw = String(value).trim();
|
|
81
|
+
if (!raw) return { raw, path: "", format: "plain", reason: "empty" };
|
|
82
|
+
const ticks = [...raw].filter((character) => character === "`").length;
|
|
83
|
+
if (ticks === 0) return { raw, path: raw, format: "plain", reason: "none" };
|
|
84
|
+
if (ticks === 2 && raw.startsWith("`") && raw.endsWith("`")) {
|
|
85
|
+
const path = raw.slice(1, -1).trim();
|
|
86
|
+
if (path && !path.includes("`")) return { raw, path, format: "code_span", reason: "none" };
|
|
87
|
+
}
|
|
88
|
+
return {
|
|
89
|
+
raw,
|
|
90
|
+
path: "",
|
|
91
|
+
format: "invalid",
|
|
92
|
+
reason: ticks === 1 || raw.startsWith("`") !== raw.endsWith("`")
|
|
93
|
+
? "unmatched_delimiter"
|
|
94
|
+
: "embedded_delimiter",
|
|
95
|
+
};
|
|
96
|
+
}
|
|
79
97
|
function meaningful(v = "") {
|
|
80
98
|
return Boolean(v && !(v.startsWith("`") && v.includes("|")));
|
|
81
99
|
}
|
|
@@ -96,7 +114,7 @@ function dataRows(c, h, header) {
|
|
|
96
114
|
}
|
|
97
115
|
export function parseControlState(
|
|
98
116
|
content,
|
|
99
|
-
{ userGates = [], internalSteps = [] } = {},
|
|
117
|
+
{ userGates = [], internalSteps = [], closeoutArtefacts = [] } = {},
|
|
100
118
|
) {
|
|
101
119
|
const approvals = new Map();
|
|
102
120
|
for (const h of ["Approvals", "Gate Checklist"])
|
|
@@ -111,8 +129,17 @@ export function parseControlState(
|
|
|
111
129
|
}
|
|
112
130
|
const artefacts = new Map();
|
|
113
131
|
for (const [t, p, s, n] of rows(section(content, "Artefacts"))) {
|
|
114
|
-
if (userGates.includes(t) || internalSteps.includes(t))
|
|
115
|
-
|
|
132
|
+
if (userGates.includes(t) || internalSteps.includes(t) || closeoutArtefacts.includes(t)) {
|
|
133
|
+
const parsedPath = parseArtefactPathCell(p ?? "");
|
|
134
|
+
artefacts.set(t, {
|
|
135
|
+
path: parsedPath.path,
|
|
136
|
+
status: clean(s),
|
|
137
|
+
notes: n ?? "",
|
|
138
|
+
raw_path: parsedPath.raw,
|
|
139
|
+
path_format: parsedPath.format,
|
|
140
|
+
path_reason: parsedPath.reason,
|
|
141
|
+
});
|
|
142
|
+
}
|
|
116
143
|
}
|
|
117
144
|
const mapRows = (h, header, fn) => dataRows(content, h, header).map(fn);
|
|
118
145
|
const mode = section(content, "Mode/Slice Decision").trim()
|