create-agdf 0.8.7 → 0.8.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.
@@ -1531,6 +1531,13 @@ function filled(value) {
1531
1531
  return Boolean(value && !isPlaceholderValue(value) && value.trim() !== "");
1532
1532
  }
1533
1533
 
1534
+ function runSelectionRecovery(target) {
1535
+ const directSelection = "Pass --run <run_id> or set AGDF_RUN_ID to select the intended run";
1536
+ return ["doctor", "delivery-map"].includes(target)
1537
+ ? `${directSelection}, or use --all-active to evaluate every active run independently.`
1538
+ : `${directSelection}.`;
1539
+ }
1540
+
1534
1541
  function parseQualityContracts(content) {
1535
1542
  const parsed = JSON.parse(content);
1536
1543
  if (!Array.isArray(parsed.contracts) || parsed.contracts.length === 0) {
@@ -1627,7 +1634,7 @@ function evaluateDoctor(targetDir, selection = {}) {
1627
1634
  selectedRunState.resolution_error.split(":")[0] || "AGDF_ACTIVE_RUN_UNRESOLVED",
1628
1635
  `Run selection failed: ${selectedRunState.resolution_error}`,
1629
1636
  runPath,
1630
- "Pass --run <run_id> or set AGDF_RUN_ID to select the intended run, or use --all-active to evaluate every active run independently.",
1637
+ runSelectionRecovery(selection.target),
1631
1638
  );
1632
1639
  } else {
1633
1640
  const currentGateLine = run.match(/^- current_gate:[^\S\r\n]*(.*)$/m)?.[1]?.trim() ?? "";
@@ -2344,6 +2351,12 @@ const BREADCRUMB_PATH_TEMPLATES = {
2344
2351
 
2345
2352
  const BREADCRUMB_STANDARD_GATES = ["UR", "PRD", "SD", "TP", "QA", "UAT"];
2346
2353
 
2354
+ function isReadyUserGateApproval({ status, currentGate, missingApproval }) {
2355
+ return status === "open"
2356
+ && BREADCRUMB_STANDARD_GATES.includes(currentGate)
2357
+ && missingApproval === `Approval: ${currentGate}`;
2358
+ }
2359
+
2347
2360
  function buildBreadcrumbPath(modeSliceDecision, currentGate, runState) {
2348
2361
  const gates = BREADCRUMB_PATH_TEMPLATES[modeSliceDecision] ?? ["UR"];
2349
2362
  return gates.map((gate) => {
@@ -2381,7 +2394,7 @@ function buildStatusCard({
2381
2394
  }) {
2382
2395
  const qualityOutlook = deriveQualityOutlook(runState, findings);
2383
2396
  const postApproval = postApprovalTransition(missingApproval);
2384
- const isUserGateApproval = missingApproval !== "none";
2397
+ const isUserGateApproval = isReadyUserGateApproval({ status, currentGate, missingApproval });
2385
2398
  const lifecycle = extractField(runState.content ?? "", "lifecycle") || "unknown";
2386
2399
  const nativeAttemptRequired = false;
2387
2400
  const interactionKind = status === "open" && isUserGateApproval ? "gate_approval" : status === "blocked" ? "blocked" : "status";
@@ -2529,9 +2542,9 @@ function transitionDecisionForRunState(runState, verifiedChange = null) {
2529
2542
 
2530
2543
  if (!isGateSatisfied(runState, "UR")) {
2531
2544
  return {
2532
- status: "blocked",
2545
+ status: "open",
2533
2546
  current_gate: "UR",
2534
- blocking_reason: "missing_exact_approval",
2547
+ blocking_reason: "none",
2535
2548
  missing_approval: "Approval: UR",
2536
2549
  allowed: ["clarify user need", "formulate and persist UR", "record evidence", "request exact UR approval"],
2537
2550
  forbidden: ["create PRD", "create SD", "create TP", "run Brownfield Analysis", "implement code", "claim QA or release readiness"],
@@ -2847,7 +2860,7 @@ function evaluateGateCheck(targetDir, selection = {}) {
2847
2860
  enumerable: false,
2848
2861
  });
2849
2862
  attachApprovalOrientationSnapshot(statusCard, {
2850
- ready: status === "open" && missingApproval === `Approval: ${currentGate}`,
2863
+ ready: isReadyUserGateApproval({ status, currentGate, missingApproval }),
2851
2864
  humanPresentation,
2852
2865
  revisionId: extractField(runState.content ?? "", "revision_id"),
2853
2866
  registry: interactionLocales,
@@ -3280,4 +3293,9 @@ async function main() {
3280
3293
  printNextSteps(options.target, options.dir, files, wroteAgentsFragment, wroteOpenCodeConfigFragment, removedOpenCodeAgents);
3281
3294
  }
3282
3295
 
3283
- await main();
3296
+ try {
3297
+ await main();
3298
+ } catch (error) {
3299
+ console.error(error instanceof Error ? error.message : String(error));
3300
+ process.exitCode = 1;
3301
+ }
@@ -91,6 +91,11 @@ Use this compact structure:
91
91
  - `revise`: solution works but contains avoidable fallback, unclear ownership, or missing evidence.
92
92
  - `block`: solution creates a second SoT, a second owner, unbounded fallback, or masks unresolved product semantics.
93
93
 
94
+ ### Compact Chat Output
95
+
96
+ At `pass`: one line — `Clean Review: pass — <one-line summary>`.
97
+ At `revise`/`block`: show the specific fallback/workaround/parallel-structure risk with file references.
98
+
94
99
  ## Forbidden
95
100
  This skill must not:
96
101
 
@@ -84,6 +84,11 @@ Use this compact structure:
84
84
  - `block`: a hard defect, security risk, data-integrity risk, or unresolved critical uncertainty remains.
85
85
  - `not_applicable`: no code changes were present for review.
86
86
 
87
+ ### Compact Chat Output
88
+
89
+ At `pass`: one line — `Code Review: pass — <one-line summary>`.
90
+ At `revise`/`block`: show blocking findings with file references. Full report remains in durable file or inline evidence as specified.
91
+
87
92
  ## Forbidden
88
93
  This skill must not:
89
94
 
@@ -69,7 +69,7 @@ For a ready `gate_approval`:
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
- 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.
72
+ 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.
73
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.
@@ -88,7 +88,7 @@ For the transition card, use the complete resolved locale pack. The initial Germ
88
88
 
89
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.
90
90
 
91
- Make exactly one native-attempt for the ready gate. If the host does not render,
91
+ Make exactly one native-attempt for the eligible ready gate. If the host does not render,
92
92
  apply or safely return the native question on that attempt, switch immediately
93
93
  to the exact textual approval. Do not ask the user to request the buttons again
94
94
  and do not create a retry loop or simulated control.
@@ -102,7 +102,7 @@ only after fresh run/gate/artefact revalidation; never retry automatically.
102
102
 
103
103
  Surface behavior:
104
104
 
105
- - 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.
105
+ - 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.
106
106
  - 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.
107
107
  - 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.
108
108
  - Other, unavailable or non-interactive surfaces: use exact textual approval and wait for a new explicit user response.
@@ -232,6 +232,7 @@ from the same snapshot and are shown exactly once.
232
232
 
233
233
  If this skill creates or updates control artefacts, do not paste full file bodies into the chat.
234
234
  List paths, summarize the decision, name the blocker or approval needed, and keep the durable content in the files.
235
+ See the Runtime Contract §Chat and Tool-Call Discipline for tool-call batching and skill output compaction rules.
235
236
 
236
237
  ## Forbidden
237
238
  This skill must not:
@@ -102,6 +102,12 @@ Use this shape:
102
102
 
103
103
  If Context Graph impact is relevant, include the fields from `../agdf-runtime-contract.md`.
104
104
 
105
+ ### Compact Chat Output
106
+
107
+ At `pass`: one line — `QA: pass — <one-line summary>`. Reference the durable QA report
108
+ path. Do not show the Quality Readiness projection or evidence inventory in chat.
109
+ At `revise`/`block`: show the decisive dimension, reason and next action.
110
+
105
111
  ## Decision Guidance
106
112
  - `pass`: required TP tasks are done, evidence is strong, no blocking Brownfield or solution-integrity risk remains.
107
113
  - `revise`: implementation is plausible but missing evidence, partial tasks, UX gaps, or fixable integrity issues remain.
@@ -402,6 +402,42 @@ When a skill creates or updates `.agdf/control/` files, gate artefacts, reviews,
402
402
  Do not paste full control files, full artefact bodies, full templates or full generated reports into the chat unless the user explicitly asks to see the full content.
403
403
  For larger or more formal work, create or update the durable artefacts fully, then reference them by path and summarize what changed.
404
404
 
405
+ ### Chat and Tool-Call Discipline
406
+
407
+ Chat output shows decisions and outcomes. Files show evidence and detail. The agent
408
+ minimises both the number of tool calls and the amount of accompanying chat text. This
409
+ is surface-agnostic: it changes agent behaviour and framework text, not host rendering.
410
+ Whether a host renders a tool-call block visibly is a host concern; the framework ensures
411
+ the agent makes fewer calls and produces less text around them.
412
+
413
+ Skill output compaction:
414
+
415
+ - QA, Code Review, TP Review and Clean Implementation Review output is 1 line at `pass`:
416
+ `<skill>: pass — <one-line summary>`.
417
+ - At `revise`/`block`: the decisive dimension, reason and next action. The Quality
418
+ Readiness projection is shown only at `revise`/`block`, not at `pass`.
419
+ - Full reports remain in durable files; the chat references the path.
420
+
421
+ Tool-call batching:
422
+
423
+ - `RUN_STATE.md` is written once per user gate approval, not once per field change. The
424
+ agent keeps intermediate state in memory between gate approvals and writes the complete
425
+ updated state in one operation.
426
+ - The agent does not `read` existing artefacts for format reference. Skill instructions
427
+ carry the format/structure inline. If a specific existing artefact must be inspected
428
+ for content (not format), the read has no accompanying commentary.
429
+ - Artefact writes are silent: the agent names the path and a 1-line summary only when an
430
+ artefact is first created or significantly changed — not on every state update.
431
+ - Validation commands (tests, integrity, diff) show pass/fail only. Full output appears
432
+ only on failure.
433
+
434
+ Always visible:
435
+
436
+ - Gate decisions (Run Status Card, Gate Transition Card, approval question).
437
+ - Post-acceptance narration (1 line per gate transition).
438
+ - Delivery summary (UAT/OR compact summary).
439
+ - Errors, blockers and evidence at `revise`/`block`.
440
+
405
441
  ## Relevant Run
406
442
 
407
443
  A relevant run is any run that changes durable state, creates or updates an AGDF artefact, changes code or runtime behaviour, performs a gate decision, blocks on a governance condition, produces QA/UAT/release evidence, or closes a delivery slice.
@@ -497,6 +533,9 @@ with safe deliberate waiting. Decorated-only, missing, conflicting or unknown ca
497
533
  `unavailable_before_invocation`; unsafe waiting fails closed to `unsafe_to_wait`. Both expose false and use
498
534
  exact text without invoking the adapter. A report-only CLI evaluation has no verified current host adapter
499
535
  and therefore exposes false. Hooks may prepare context but must not answer, approve or replace an eligible attempt.
536
+ An adapter that requires a visible suffix such as `(Recommended)` on its approving option is
537
+ `decorated_label_only`: do not invoke it for an AGDF gate. `Approval: <GateName> (Recommended)` is never a
538
+ valid AGDF approval option or authorization value; use the undecorated exact-text fallback instead.
500
539
 
501
540
  The first eligible native-attempt has a single bounded outcome: the declared
502
541
  host control is presented, or the agent immediately uses the exact-text
@@ -518,7 +557,7 @@ Surface adapter rules:
518
557
 
519
558
  | Surface | Native question adapter | Gate-safe use | Technical permission boundary |
520
559
  |---|---|---|---|
521
- | Codex | native `request_user_input` or equivalent short-question control when callable | on the first eligible attempt, present one gate question with auto-resolution omitted; 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`. |
560
+ | Codex | native `request_user_input` or equivalent short-question control when callable | invoke only when preflight proves `exact_option_value` or `separate_label_and_value`; the current canonical `decorated_label_only` capability uses exact text without invoking the adapter | Codex command, edit, network, external-directory and app-action approvals remain host-owned `tool_permission`. |
522
561
  | 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. |
523
562
  | 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. |
524
563
  | 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. |
@@ -105,6 +105,11 @@ Evidence confidence:
105
105
  - `medium`
106
106
  - `low`
107
107
 
108
+ ### Compact Chat Output
109
+
110
+ At `pass`: one line — `TP Review: pass — <X>/<total> tasks fully_done`.
111
+ At `revise`/`block`: show incomplete tasks with missing evidence.
112
+
108
113
  ## Forbidden
109
114
  This skill must not:
110
115
 
@@ -402,6 +402,42 @@ When a skill creates or updates `.agdf/control/` files, gate artefacts, reviews,
402
402
  Do not paste full control files, full artefact bodies, full templates or full generated reports into the chat unless the user explicitly asks to see the full content.
403
403
  For larger or more formal work, create or update the durable artefacts fully, then reference them by path and summarize what changed.
404
404
 
405
+ ### Chat and Tool-Call Discipline
406
+
407
+ Chat output shows decisions and outcomes. Files show evidence and detail. The agent
408
+ minimises both the number of tool calls and the amount of accompanying chat text. This
409
+ is surface-agnostic: it changes agent behaviour and framework text, not host rendering.
410
+ Whether a host renders a tool-call block visibly is a host concern; the framework ensures
411
+ the agent makes fewer calls and produces less text around them.
412
+
413
+ Skill output compaction:
414
+
415
+ - QA, Code Review, TP Review and Clean Implementation Review output is 1 line at `pass`:
416
+ `<skill>: pass — <one-line summary>`.
417
+ - At `revise`/`block`: the decisive dimension, reason and next action. The Quality
418
+ Readiness projection is shown only at `revise`/`block`, not at `pass`.
419
+ - Full reports remain in durable files; the chat references the path.
420
+
421
+ Tool-call batching:
422
+
423
+ - `RUN_STATE.md` is written once per user gate approval, not once per field change. The
424
+ agent keeps intermediate state in memory between gate approvals and writes the complete
425
+ updated state in one operation.
426
+ - The agent does not `read` existing artefacts for format reference. Skill instructions
427
+ carry the format/structure inline. If a specific existing artefact must be inspected
428
+ for content (not format), the read has no accompanying commentary.
429
+ - Artefact writes are silent: the agent names the path and a 1-line summary only when an
430
+ artefact is first created or significantly changed — not on every state update.
431
+ - Validation commands (tests, integrity, diff) show pass/fail only. Full output appears
432
+ only on failure.
433
+
434
+ Always visible:
435
+
436
+ - Gate decisions (Run Status Card, Gate Transition Card, approval question).
437
+ - Post-acceptance narration (1 line per gate transition).
438
+ - Delivery summary (UAT/OR compact summary).
439
+ - Errors, blockers and evidence at `revise`/`block`.
440
+
405
441
  ## Relevant Run
406
442
 
407
443
  A relevant run is any run that changes durable state, creates or updates an AGDF artefact, changes code or runtime behaviour, performs a gate decision, blocks on a governance condition, produces QA/UAT/release evidence, or closes a delivery slice.
@@ -497,6 +533,9 @@ with safe deliberate waiting. Decorated-only, missing, conflicting or unknown ca
497
533
  `unavailable_before_invocation`; unsafe waiting fails closed to `unsafe_to_wait`. Both expose false and use
498
534
  exact text without invoking the adapter. A report-only CLI evaluation has no verified current host adapter
499
535
  and therefore exposes false. Hooks may prepare context but must not answer, approve or replace an eligible attempt.
536
+ An adapter that requires a visible suffix such as `(Recommended)` on its approving option is
537
+ `decorated_label_only`: do not invoke it for an AGDF gate. `Approval: <GateName> (Recommended)` is never a
538
+ valid AGDF approval option or authorization value; use the undecorated exact-text fallback instead.
500
539
 
501
540
  The first eligible native-attempt has a single bounded outcome: the declared
502
541
  host control is presented, or the agent immediately uses the exact-text
@@ -518,7 +557,7 @@ Surface adapter rules:
518
557
 
519
558
  | Surface | Native question adapter | Gate-safe use | Technical permission boundary |
520
559
  |---|---|---|---|
521
- | Codex | native `request_user_input` or equivalent short-question control when callable | on the first eligible attempt, present one gate question with auto-resolution omitted; 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`. |
560
+ | Codex | native `request_user_input` or equivalent short-question control when callable | invoke only when preflight proves `exact_option_value` or `separate_label_and_value`; the current canonical `decorated_label_only` capability uses exact text without invoking the adapter | Codex command, edit, network, external-directory and app-action approvals remain host-owned `tool_permission`. |
522
561
  | 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. |
523
562
  | 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. |
524
563
  | 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. |
@@ -91,6 +91,11 @@ Use this compact structure:
91
91
  - `revise`: solution works but contains avoidable fallback, unclear ownership, or missing evidence.
92
92
  - `block`: solution creates a second SoT, a second owner, unbounded fallback, or masks unresolved product semantics.
93
93
 
94
+ ### Compact Chat Output
95
+
96
+ At `pass`: one line — `Clean Review: pass — <one-line summary>`.
97
+ At `revise`/`block`: show the specific fallback/workaround/parallel-structure risk with file references.
98
+
94
99
  ## Forbidden
95
100
  This skill must not:
96
101
 
@@ -84,6 +84,11 @@ Use this compact structure:
84
84
  - `block`: a hard defect, security risk, data-integrity risk, or unresolved critical uncertainty remains.
85
85
  - `not_applicable`: no code changes were present for review.
86
86
 
87
+ ### Compact Chat Output
88
+
89
+ At `pass`: one line — `Code Review: pass — <one-line summary>`.
90
+ At `revise`/`block`: show blocking findings with file references. Full report remains in durable file or inline evidence as specified.
91
+
87
92
  ## Forbidden
88
93
  This skill must not:
89
94
 
@@ -69,7 +69,7 @@ For a ready `gate_approval`:
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
- 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.
72
+ 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.
73
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.
@@ -88,7 +88,7 @@ For the transition card, use the complete resolved locale pack. The initial Germ
88
88
 
89
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.
90
90
 
91
- Make exactly one native-attempt for the ready gate. If the host does not render,
91
+ Make exactly one native-attempt for the eligible ready gate. If the host does not render,
92
92
  apply or safely return the native question on that attempt, switch immediately
93
93
  to the exact textual approval. Do not ask the user to request the buttons again
94
94
  and do not create a retry loop or simulated control.
@@ -102,7 +102,7 @@ only after fresh run/gate/artefact revalidation; never retry automatically.
102
102
 
103
103
  Surface behavior:
104
104
 
105
- - 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.
105
+ - 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.
106
106
  - 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.
107
107
  - 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.
108
108
  - Other, unavailable or non-interactive surfaces: use exact textual approval and wait for a new explicit user response.
@@ -232,6 +232,7 @@ from the same snapshot and are shown exactly once.
232
232
 
233
233
  If this skill creates or updates control artefacts, do not paste full file bodies into the chat.
234
234
  List paths, summarize the decision, name the blocker or approval needed, and keep the durable content in the files.
235
+ See the Runtime Contract §Chat and Tool-Call Discipline for tool-call batching and skill output compaction rules.
235
236
 
236
237
  ## Forbidden
237
238
  This skill must not:
@@ -102,6 +102,12 @@ Use this shape:
102
102
 
103
103
  If Context Graph impact is relevant, include the fields from `../../agdf-runtime-contract.md`.
104
104
 
105
+ ### Compact Chat Output
106
+
107
+ At `pass`: one line — `QA: pass — <one-line summary>`. Reference the durable QA report
108
+ path. Do not show the Quality Readiness projection or evidence inventory in chat.
109
+ At `revise`/`block`: show the decisive dimension, reason and next action.
110
+
105
111
  ## Decision Guidance
106
112
  - `pass`: required TP tasks are done, evidence is strong, no blocking Brownfield or solution-integrity risk remains.
107
113
  - `revise`: implementation is plausible but missing evidence, partial tasks, UX gaps, or fixable integrity issues remain.
@@ -105,6 +105,11 @@ Evidence confidence:
105
105
  - `medium`
106
106
  - `low`
107
107
 
108
+ ### Compact Chat Output
109
+
110
+ At `pass`: one line — `TP Review: pass — <X>/<total> tasks fully_done`.
111
+ At `revise`/`block`: show incomplete tasks with missing evidence.
112
+
108
113
  ## Forbidden
109
114
  This skill must not:
110
115
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "Codex-first operating system for governed AI-assisted delivery.",
5
5
  "author": {
6
6
  "name": "Arndt Gold",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.8.7",
4
+ "version": "0.8.9",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "Arndt Gold",
7
7
  "description": "Codex-first operating system for governed AI-assisted delivery.",
@@ -402,6 +402,42 @@ When a skill creates or updates `.agdf/control/` files, gate artefacts, reviews,
402
402
  Do not paste full control files, full artefact bodies, full templates or full generated reports into the chat unless the user explicitly asks to see the full content.
403
403
  For larger or more formal work, create or update the durable artefacts fully, then reference them by path and summarize what changed.
404
404
 
405
+ ### Chat and Tool-Call Discipline
406
+
407
+ Chat output shows decisions and outcomes. Files show evidence and detail. The agent
408
+ minimises both the number of tool calls and the amount of accompanying chat text. This
409
+ is surface-agnostic: it changes agent behaviour and framework text, not host rendering.
410
+ Whether a host renders a tool-call block visibly is a host concern; the framework ensures
411
+ the agent makes fewer calls and produces less text around them.
412
+
413
+ Skill output compaction:
414
+
415
+ - QA, Code Review, TP Review and Clean Implementation Review output is 1 line at `pass`:
416
+ `<skill>: pass — <one-line summary>`.
417
+ - At `revise`/`block`: the decisive dimension, reason and next action. The Quality
418
+ Readiness projection is shown only at `revise`/`block`, not at `pass`.
419
+ - Full reports remain in durable files; the chat references the path.
420
+
421
+ Tool-call batching:
422
+
423
+ - `RUN_STATE.md` is written once per user gate approval, not once per field change. The
424
+ agent keeps intermediate state in memory between gate approvals and writes the complete
425
+ updated state in one operation.
426
+ - The agent does not `read` existing artefacts for format reference. Skill instructions
427
+ carry the format/structure inline. If a specific existing artefact must be inspected
428
+ for content (not format), the read has no accompanying commentary.
429
+ - Artefact writes are silent: the agent names the path and a 1-line summary only when an
430
+ artefact is first created or significantly changed — not on every state update.
431
+ - Validation commands (tests, integrity, diff) show pass/fail only. Full output appears
432
+ only on failure.
433
+
434
+ Always visible:
435
+
436
+ - Gate decisions (Run Status Card, Gate Transition Card, approval question).
437
+ - Post-acceptance narration (1 line per gate transition).
438
+ - Delivery summary (UAT/OR compact summary).
439
+ - Errors, blockers and evidence at `revise`/`block`.
440
+
405
441
  ## Relevant Run
406
442
 
407
443
  A relevant run is any run that changes durable state, creates or updates an AGDF artefact, changes code or runtime behaviour, performs a gate decision, blocks on a governance condition, produces QA/UAT/release evidence, or closes a delivery slice.
@@ -497,6 +533,9 @@ with safe deliberate waiting. Decorated-only, missing, conflicting or unknown ca
497
533
  `unavailable_before_invocation`; unsafe waiting fails closed to `unsafe_to_wait`. Both expose false and use
498
534
  exact text without invoking the adapter. A report-only CLI evaluation has no verified current host adapter
499
535
  and therefore exposes false. Hooks may prepare context but must not answer, approve or replace an eligible attempt.
536
+ An adapter that requires a visible suffix such as `(Recommended)` on its approving option is
537
+ `decorated_label_only`: do not invoke it for an AGDF gate. `Approval: <GateName> (Recommended)` is never a
538
+ valid AGDF approval option or authorization value; use the undecorated exact-text fallback instead.
500
539
 
501
540
  The first eligible native-attempt has a single bounded outcome: the declared
502
541
  host control is presented, or the agent immediately uses the exact-text
@@ -518,7 +557,7 @@ Surface adapter rules:
518
557
 
519
558
  | Surface | Native question adapter | Gate-safe use | Technical permission boundary |
520
559
  |---|---|---|---|
521
- | Codex | native `request_user_input` or equivalent short-question control when callable | on the first eligible attempt, present one gate question with auto-resolution omitted; 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`. |
560
+ | Codex | native `request_user_input` or equivalent short-question control when callable | invoke only when preflight proves `exact_option_value` or `separate_label_and_value`; the current canonical `decorated_label_only` capability uses exact text without invoking the adapter | Codex command, edit, network, external-directory and app-action approvals remain host-owned `tool_permission`. |
522
561
  | 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. |
523
562
  | 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. |
524
563
  | 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. |
@@ -91,6 +91,11 @@ Use this compact structure:
91
91
  - `revise`: solution works but contains avoidable fallback, unclear ownership, or missing evidence.
92
92
  - `block`: solution creates a second SoT, a second owner, unbounded fallback, or masks unresolved product semantics.
93
93
 
94
+ ### Compact Chat Output
95
+
96
+ At `pass`: one line — `Clean Review: pass — <one-line summary>`.
97
+ At `revise`/`block`: show the specific fallback/workaround/parallel-structure risk with file references.
98
+
94
99
  ## Forbidden
95
100
  This skill must not:
96
101
 
@@ -84,6 +84,11 @@ Use this compact structure:
84
84
  - `block`: a hard defect, security risk, data-integrity risk, or unresolved critical uncertainty remains.
85
85
  - `not_applicable`: no code changes were present for review.
86
86
 
87
+ ### Compact Chat Output
88
+
89
+ At `pass`: one line — `Code Review: pass — <one-line summary>`.
90
+ At `revise`/`block`: show blocking findings with file references. Full report remains in durable file or inline evidence as specified.
91
+
87
92
  ## Forbidden
88
93
  This skill must not:
89
94
 
@@ -69,7 +69,7 @@ For a ready `gate_approval`:
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
- 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.
72
+ 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.
73
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.
@@ -88,7 +88,7 @@ For the transition card, use the complete resolved locale pack. The initial Germ
88
88
 
89
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.
90
90
 
91
- Make exactly one native-attempt for the ready gate. If the host does not render,
91
+ Make exactly one native-attempt for the eligible ready gate. If the host does not render,
92
92
  apply or safely return the native question on that attempt, switch immediately
93
93
  to the exact textual approval. Do not ask the user to request the buttons again
94
94
  and do not create a retry loop or simulated control.
@@ -102,7 +102,7 @@ only after fresh run/gate/artefact revalidation; never retry automatically.
102
102
 
103
103
  Surface behavior:
104
104
 
105
- - 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.
105
+ - 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.
106
106
  - 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.
107
107
  - 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.
108
108
  - Other, unavailable or non-interactive surfaces: use exact textual approval and wait for a new explicit user response.
@@ -232,6 +232,7 @@ from the same snapshot and are shown exactly once.
232
232
 
233
233
  If this skill creates or updates control artefacts, do not paste full file bodies into the chat.
234
234
  List paths, summarize the decision, name the blocker or approval needed, and keep the durable content in the files.
235
+ See the Runtime Contract §Chat and Tool-Call Discipline for tool-call batching and skill output compaction rules.
235
236
 
236
237
  ## Forbidden
237
238
  This skill must not:
@@ -102,6 +102,12 @@ Use this shape:
102
102
 
103
103
  If Context Graph impact is relevant, include the fields from `../../meta/agdf-runtime-contract.md`.
104
104
 
105
+ ### Compact Chat Output
106
+
107
+ At `pass`: one line — `QA: pass — <one-line summary>`. Reference the durable QA report
108
+ path. Do not show the Quality Readiness projection or evidence inventory in chat.
109
+ At `revise`/`block`: show the decisive dimension, reason and next action.
110
+
105
111
  ## Decision Guidance
106
112
  - `pass`: required TP tasks are done, evidence is strong, no blocking Brownfield or solution-integrity risk remains.
107
113
  - `revise`: implementation is plausible but missing evidence, partial tasks, UX gaps, or fixable integrity issues remain.
@@ -105,6 +105,11 @@ Evidence confidence:
105
105
  - `medium`
106
106
  - `low`
107
107
 
108
+ ### Compact Chat Output
109
+
110
+ At `pass`: one line — `TP Review: pass — <X>/<total> tasks fully_done`.
111
+ At `revise`/`block`: show incomplete tasks with missing evidence.
112
+
108
113
  ## Forbidden
109
114
  This skill must not:
110
115
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-agdf",
3
- "version": "0.8.7",
3
+ "version": "0.8.9",
4
4
  "description": "Bootstrap AGDF repository-local plugin files, Copilot/OpenCode instructions, skills, control files and machine-readable checks.",
5
5
  "type": "module",
6
6
  "files": [