create-agdf 0.10.2 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (66) hide show
  1. package/README.md +2 -2
  2. package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +12 -0
  3. package/generated/.agdf/control/templates/artefacts/PRD.md +40 -8
  4. package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +51 -0
  5. package/generated/.github/skills/README.md +1 -0
  6. package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +9 -0
  7. package/generated/.github/skills/agdf-clean-implementation-review/SKILL.md +18 -0
  8. package/generated/.github/skills/agdf-code-review/SKILL.md +17 -0
  9. package/generated/.github/skills/agdf-gate-check/SKILL.md +11 -18
  10. package/generated/.github/skills/agdf-interaction-locales.json +8 -0
  11. package/generated/.github/skills/agdf-qa-gate/SKILL.md +15 -5
  12. package/generated/.github/skills/agdf-release-or/SKILL.md +1 -1
  13. package/generated/.github/skills/agdf-task-plan-review/SKILL.md +33 -0
  14. package/generated/.github/skills/agdf-ux-intent-definition/SKILL.md +94 -0
  15. package/generated/.github/skills/contracts/gate-transition.md +25 -0
  16. package/generated/.github/skills/contracts/interaction.md +23 -0
  17. package/generated/.github/skills/contracts/quality.md +58 -1
  18. package/generated/.opencode/AGDF.md +6 -0
  19. package/generated/.opencode/README.md +1 -0
  20. package/generated/.opencode/agdf-interaction-locales.json +8 -0
  21. package/generated/.opencode/contracts/gate-transition.md +25 -0
  22. package/generated/.opencode/contracts/interaction.md +23 -0
  23. package/generated/.opencode/contracts/quality.md +58 -1
  24. package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +9 -0
  25. package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +18 -0
  26. package/generated/.opencode/skills/agdf-code-review/SKILL.md +17 -0
  27. package/generated/.opencode/skills/agdf-gate-check/SKILL.md +11 -18
  28. package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +15 -5
  29. package/generated/.opencode/skills/agdf-release-or/SKILL.md +1 -1
  30. package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +33 -0
  31. package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +94 -0
  32. package/generated/AGENTS.md +6 -0
  33. package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
  34. package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
  35. package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +12 -0
  36. package/generated/plugins/agdf/control/templates/artefacts/PRD.md +40 -8
  37. package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +51 -0
  38. package/generated/plugins/agdf/meta/agdf-agent-router.md +6 -0
  39. package/generated/plugins/agdf/meta/agdf-interaction-locales.json +8 -0
  40. package/generated/plugins/agdf/meta/agdf-plugin.definition.json +7 -1
  41. package/generated/plugins/agdf/meta/contracts/gate-transition.md +25 -0
  42. package/generated/plugins/agdf/meta/contracts/interaction.md +23 -0
  43. package/generated/plugins/agdf/meta/contracts/quality.md +58 -1
  44. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +8 -0
  45. package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +7 -1
  46. package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
  47. package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +16 -25
  48. package/generated/plugins/agdf/runtime/create-agdf/lib/interaction-presentation.js +80 -0
  49. package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
  50. package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
  51. package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +128 -6
  52. package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +9 -0
  53. package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +18 -0
  54. package/generated/plugins/agdf/skills/code-review/SKILL.md +17 -0
  55. package/generated/plugins/agdf/skills/gate-check/SKILL.md +11 -18
  56. package/generated/plugins/agdf/skills/qa-gate/SKILL.md +15 -5
  57. package/generated/plugins/agdf/skills/release-or/SKILL.md +1 -1
  58. package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +33 -0
  59. package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +94 -0
  60. package/generated/plugins/agdf/skills/ux-intent-definition/help.md +17 -0
  61. package/lib/cli/validation-handlers.js +2 -1
  62. package/lib/control-evaluation/gate-check.js +16 -25
  63. package/lib/installers/opencode.js +52 -4
  64. package/lib/interaction-presentation.js +80 -0
  65. package/lib/scaffold/plan.js +3 -0
  66. package/package.json +1 -1
@@ -13,6 +13,7 @@ Therefore generated Copilot skill names use the AGDF prefix:
13
13
 
14
14
  - `agdf-delivery-path-search`
15
15
  - `agdf-brownfield-analysis`
16
+ - `agdf-ux-intent-definition`
16
17
  - `agdf-clean-implementation-review`
17
18
  - `agdf-code-review`
18
19
  - `agdf-delivery-closeout`
@@ -39,6 +40,10 @@ Do not infer active scope from branch names, uncommitted workspace deltas, chat
39
40
  If multiple active scopes are plausible, list the evidenced lines and route to `agdf-gate-check` or workstate clarification instead of choosing silently.
40
41
  After `Approval: UR`, run lightweight Brownfield Review before PRD when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible.
41
42
  Brownfield Review must produce a Mode/Slice Decision: `quick_task`, `verified_change`, `structured_slice`, `structured_delivery` or `block`.
43
+ That same review records the shared UI/UX impact classification. Run `agdf-ux-intent-definition` before
44
+ PRD readiness for medium/high impact and for low impact with ambiguous mandatory PRD semantics. It is
45
+ an internal analytical step, not a gate or product authority; a required blocked result keeps PRD
46
+ readiness closed.
42
47
  Make that decision visible before coding or drafting later artefacts: state the selected path, scope reason, evidence and next required gate in the live control state or linked artefact.
43
48
  Do not assume the full PRD/SD/TP chain before that decision; use only as much gate depth as the reviewed change size justifies. A user-visible change is not automatically Verified Change eligible; any missing or ambiguous record condition escalates to the declared structured target before implementation.
44
49
 
@@ -51,6 +56,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
51
56
  |---|---|---|
52
57
  | `agdf-delivery-path-search` | high-impact planning decisions with several plausible next delivery steps before implementation | read-only advisory search; never grants gate permission or replaces gate-check |
53
58
  | `agdf-brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
59
+ | `agdf-ux-intent-definition` | after approved UR and post-UR routing for medium/high UI/UX impact or ambiguous low-impact product semantics before PRD readiness | non-authorizing analytical PRD input; never creates product intent, gate permission, technical design or a parallel product source of truth |
54
60
  | `agdf-clean-implementation-review` | evidence dimension: inspect whether the solution is structurally clean | supports Quality Readiness; not a TP or QA substitute |
55
61
  | `agdf-code-review` | evidence dimension: review the actual diff for defects, regression and security findings | supports Quality Readiness; does not replace QA |
56
62
  | `agdf-delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "AI Governance & Delivery Framework (AGDF) brings an operating system for governed AI-assisted delivery to Claude Code, combining workflow skills, control templates and machine-readable repository checks for gate decisions, Brownfield analysis, task-plan review, QA decisions, durable run state and auditable closeout.",
5
5
  "keywords": [
6
6
  "agentic",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agdf",
3
- "version": "0.10.2",
3
+ "version": "0.11.0",
4
4
  "description": "Operating system for governed AI-assisted delivery.",
5
5
  "author": {
6
6
  "name": "Arndt Gold",
@@ -17,6 +17,18 @@ Status: `draft | done | not_applicable | superseded`
17
17
 
18
18
  What approved UR scope is being sized and routed?
19
19
 
20
+ ## UI / UX Impact Routing
21
+
22
+ - delivery_context: `greenfield | brownfield`
23
+ - ui_ux_impact: `none | low | medium | high`
24
+ - ui_ux_impact_reason:
25
+ - ux_intent_definition_required: `yes | no`
26
+ - ux_intent_definition_result: `ready | blocked | not_applicable`
27
+
28
+ Use the single classification contract in `meta/contracts/gate-transition.md`. A required `blocked`
29
+ result prevents PRD readiness. Greenfield explicitly marks existing-system evidence not applicable;
30
+ Brownfield cites repository evidence.
31
+
20
32
  ## Existing-System View
21
33
 
22
34
  | Area | Existing owner or artefact | Evidence | Impact |
@@ -11,31 +11,63 @@ Owner:
11
11
 
12
12
  What exactly must be delivered?
13
13
 
14
- ## 2. Acceptance Criteria
14
+ ## 2. UX Intent And Success
15
15
 
16
- Which observable outcomes must be true?
16
+ - ui_ux_impact: none | low | medium | high
17
+ - ux_intent_definition: <ready analysis reference | directly defined low-impact semantics | justified not_applicable>
18
+ - primary_user_intent:
19
+ - success_signal:
20
+ - primary_decision_or_action:
17
21
 
18
- ## 3. Non-Goals
22
+ Every field must be populated or explicitly justified as `not_applicable`. Medium/high impact requires
23
+ a `ready` UX Intent Definition result before this PRD is ready.
24
+
25
+ ## 3. Working Modes And Effective State
26
+
27
+ For every user-relevant working mode, define:
28
+
29
+ | working_mode | effective_state | visible_state_types | effective_state_authority | primary_state_presentation_owner |
30
+ |---|---|---|---|---|
31
+ | | | | | |
32
+
33
+ Product/system authority decides what is effectively true. Presentation ownership identifies the
34
+ primary surface that communicates state and next action. Technical storage, derivation and component
35
+ ownership remain Solution Design concerns.
36
+
37
+ ## 4. Activation, Blockers, Recovery And Transitions
38
+
39
+ - activation_and_deactivation:
40
+ - blockers_and_visible_next_actions:
41
+ - recovery_paths: <include visible retry for recoverable transient failure>
42
+ - relevant_state_transitions: <trigger, source, target, visible feedback, next action, failure/rollback>
43
+
44
+ ## 5. Acceptance Criteria
45
+
46
+ Every applicable UX criterion must include a stable `criterion_id`, `working_mode`, `source_state`,
47
+ trigger/action, expected effective state, visible feedback, blocker/failure behavior, recovery/next
48
+ action, observable success and required evidence. Specify observable behavior, not implementation.
49
+
50
+ ## 6. Non-Goals
19
51
 
20
52
  What remains out of scope?
21
53
 
22
- ## 4. Users And Roles
54
+ ## 7. Users And Roles
23
55
 
24
56
  Who is affected and who decides?
25
57
 
26
- ## 5. Constraints
58
+ ## 8. Constraints
27
59
 
28
60
  Which business, operational, legal, security or compatibility constraints apply?
29
61
 
30
- ## 6. Evidence Requirements
62
+ ## 9. Evidence Requirements
31
63
 
32
64
  Which evidence must later support QA?
33
65
 
34
- ## 7. Risks And Open Questions
66
+ ## 10. Risks And Open Questions
35
67
 
36
68
  Which questions must SD, TP or Brownfield Analysis clarify later?
37
69
 
38
- ## 8. Next Step
70
+ ## 11. Next Step
39
71
 
40
72
  Review this PRD and approve only with:
41
73
 
@@ -0,0 +1,51 @@
1
+ # UX Intent Definition: <Title>
2
+
3
+ Status: draft | ready | blocked | not_applicable
4
+ Decision: ready | blocked | not_applicable
5
+ Based on: approved UR and post-UR routing evidence
6
+ Date:
7
+ Owner:
8
+
9
+ This is non-authorizing analytical input. It is not a user-gate artefact, carries no approval and
10
+ grants no implementation permission. After PRD approval, the PRD is the sole product authority.
11
+
12
+ ## 1. Routing Evidence
13
+
14
+ - delivery_context: greenfield | brownfield
15
+ - ui_ux_impact: none | low | medium | high
16
+ - ui_ux_impact_reason:
17
+ - ux_intent_definition_required: yes | no
18
+
19
+ ## 2. Intent And Success
20
+
21
+ - primary_user_intent:
22
+ - success_signal:
23
+ - primary_decision_or_action:
24
+
25
+ ## 3. Working Modes And State
26
+
27
+ - working_modes:
28
+ - effective_state_by_mode:
29
+ - visible_state_types:
30
+ - effective_state_authority_by_mode:
31
+ - primary_state_presentation_owner_by_mode:
32
+
33
+ ## 4. Activation, Blockers, Recovery And Transitions
34
+
35
+ - activation_paths:
36
+ - blockers:
37
+ - recovery_paths:
38
+ - relevant_state_transitions:
39
+
40
+ ## 5. Proposed PRD Acceptance Criteria
41
+
42
+ - proposed_prd_acceptance_criteria:
43
+
44
+ ## 6. Decision Evidence
45
+
46
+ - blocking_reason:
47
+ - open_product_questions:
48
+ - affected_outputs:
49
+ - evidence:
50
+ - missing_evidence:
51
+ - required_next_step:
@@ -14,6 +14,7 @@ Therefore plugin skill names are intentionally unprefixed:
14
14
  - `gate-check`
15
15
  - `delivery-path-search`
16
16
  - `brownfield-analysis`
17
+ - `ux-intent-definition`
17
18
  - `task-plan-review`
18
19
  - `clean-implementation-review`
19
20
  - `code-review`
@@ -40,6 +41,10 @@ Do not infer active scope from branch names, uncommitted workspace deltas, chat
40
41
  If multiple active scopes are plausible, list the evidenced lines and route to `gate-check` or workstate clarification instead of choosing silently.
41
42
  After `Approval: UR`, run lightweight Brownfield Review before PRD when Brownfield, ownership, runtime, policy, persistence, architecture, UI or UX impact is possible.
42
43
  Brownfield Review must produce a Mode/Slice Decision: `quick_task`, `verified_change`, `structured_slice`, `structured_delivery` or `block`.
44
+ That same review records the shared UI/UX impact classification. Run `ux-intent-definition` before
45
+ PRD readiness for medium/high impact and for low impact with ambiguous mandatory PRD semantics. It is
46
+ an internal analytical step, not a gate or product authority; a required blocked result keeps PRD
47
+ readiness closed.
43
48
  Make that decision visible before coding or drafting later artefacts: state the selected path, scope reason, evidence and next required gate in the live control state or linked artefact.
44
49
  Do not assume the full PRD/SD/TP chain before that decision; use only as much gate depth as the reviewed change size justifies. A user-visible change is not automatically Verified Change eligible; any missing or ambiguous record condition escalates to the declared structured target before implementation.
45
50
 
@@ -52,6 +57,7 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
52
57
  |---|---|---|
53
58
  | `delivery-path-search` | high-impact planning decisions with several plausible next delivery steps before implementation | read-only advisory search; never grants gate permission or replaces gate-check |
54
59
  | `brownfield-analysis` | after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems | clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission |
60
+ | `ux-intent-definition` | after approved UR and post-UR routing for medium/high UI/UX impact or ambiguous low-impact product semantics before PRD readiness | non-authorizing analytical PRD input; never creates product intent, gate permission, technical design or a parallel product source of truth |
55
61
  | `clean-implementation-review` | evidence dimension: inspect whether the solution is structurally clean | supports Quality Readiness; not a TP or QA substitute |
56
62
  | `code-review` | evidence dimension: review the actual diff for defects, regression and security findings | supports Quality Readiness; does not replace QA |
57
63
  | `delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
@@ -11,6 +11,9 @@
11
11
  "en": {
12
12
  "statusCard": {
13
13
  "title": "AGDF status-card",
14
+ "status": "Status",
15
+ "field": "Status field",
16
+ "value": "Value",
14
17
  "run": "Selected run",
15
18
  "humanTitle": "Run title",
16
19
  "gate": "Current gate",
@@ -107,6 +110,7 @@
107
110
  "exactTextRequest": "To approve, reply exactly with `{approval}`; otherwise request revision or decline.",
108
111
  "decisionFollows": "will be the next user decision",
109
112
  "presentationFailure": "Approval cards could not be rendered safely.",
113
+ "statusPresentationFailure": "Status card could not render safely.",
110
114
  "nonReadyDecision": "No decision requested: {reason}.",
111
115
  "approveDescription": "Approve this gate with the exact authorization value.",
112
116
  "reviseLabel": "Revise",
@@ -214,6 +218,9 @@
214
218
  "de": {
215
219
  "statusCard": {
216
220
  "title": "AGDF-Statuskarte",
221
+ "status": "Status",
222
+ "field": "Statusfeld",
223
+ "value": "Wert",
217
224
  "run": "Ausgewählter Run",
218
225
  "humanTitle": "Run-Titel",
219
226
  "gate": "Aktuelles Gate",
@@ -310,6 +317,7 @@
310
317
  "exactTextRequest": "Zur Freigabe exakt mit `{approval}` antworten; andernfalls Überarbeitung anfordern oder ablehnen.",
311
318
  "decisionFollows": "ist die nächste Nutzerentscheidung",
312
319
  "presentationFailure": "Die Freigabekarten konnten nicht sicher dargestellt werden.",
320
+ "statusPresentationFailure": "Statuskarte nicht sicher darstellbar.",
313
321
  "nonReadyDecision": "Keine Entscheidung angefordert: {reason}.",
314
322
  "approveDescription": "Dieses Gate mit dem exakten Freigabewert autorisieren.",
315
323
  "reviseLabel": "Überarbeiten",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.10.2",
4
+ "version": "0.11.0",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "Arndt Gold",
7
7
  "description": "Operating system for governed AI-assisted delivery.",
@@ -168,6 +168,12 @@
168
168
  "useFor": "after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems",
169
169
  "boundary": "clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission"
170
170
  },
171
+ {
172
+ "slug": "ux-intent-definition",
173
+ "discovery": "automatic",
174
+ "useFor": "after approved UR and post-UR routing for medium/high UI/UX impact or ambiguous low-impact product semantics before PRD readiness",
175
+ "boundary": "non-authorizing analytical PRD input; never creates product intent, gate permission, technical design or a parallel product source of truth"
176
+ },
171
177
  {
172
178
  "slug": "clean-implementation-review",
173
179
  "discovery": "automatic",
@@ -99,6 +99,31 @@ Mode/Slice Decision rules:
99
99
 
100
100
  A Mode/Slice Decision without scope reason and evidence is not recorded. Treat it as missing and keep the next step at `Mode/Slice Decision`.
101
101
 
102
+ ### UI/UX Impact And UX Intent Definition
103
+
104
+ The existing `brownfield-analysis` `post_ur_review` mode is the single proportional routing owner for
105
+ both Greenfield and Brownfield delivery. It records:
106
+
107
+ - `delivery_context: greenfield | brownfield`
108
+ - `ui_ux_impact: none | low | medium | high`
109
+ - `ui_ux_impact_reason`
110
+ - `ux_intent_definition_required: yes | no`
111
+
112
+ Classify impact as:
113
+
114
+ - `none`: no user-facing capability, decision, state, feedback or recovery behavior changes;
115
+ - `low`: a bounded user-facing change preserves unambiguous intent, working modes, effective-state,
116
+ activation and recovery semantics;
117
+ - `medium`: a bounded capability materially changes its primary action, working mode, effective
118
+ state, visible state type, blocker, activation or recovery behavior; or
119
+ - `high`: the change spans capabilities or modes, creates competing or safety-relevant authority,
120
+ adds high-consequence decisions or materially changes cross-surface activation and recovery.
121
+
122
+ `medium | high` requires `ux-intent-definition` before PRD readiness. `low` requires it when any
123
+ mandatory PRD UX semantics remain ambiguous. `none` records the analytical decision
124
+ `not_applicable`. The skill is an internal, non-authorizing step: it adds no gate, approval value or
125
+ implementation permission. A required `blocked` result keeps PRD readiness closed.
126
+
102
127
 
103
128
  ## Gate Transition Model
104
129
 
@@ -40,6 +40,29 @@ It must not introduce a second gate model or override `gate-check`, `delivery-ma
40
40
 
41
41
  `next_gate_after_approval` and `allowed_after_approval` must be `none` when no approval is missing, when the current step is internal, or when the run is in OR/completed handoff. They must not imply implementation, QA, release, commit, push or PR authority unless the existing gate model already allows that authority.
42
42
 
43
+ ### Deterministic Operational Presentation
44
+
45
+ `status_card` is the canonical machine/audit projection. The same evaluation also exposes an additive
46
+ `status_presentation` object with selected run/revision/gate/locale identity, `semantic_block:
47
+ run_status_card`, one compact Markdown block with localized labels and canonical evaluated values,
48
+ and `authorizes: false`. The full raw and evidence-bearing projection remains available unchanged in
49
+ `status_card` JSON for audit and automation; it is not duplicated into the primary chat card.
50
+ Fresh legacy-compatible control state without a durable revision uses the explicit non-authorizing
51
+ identity `unversioned`; ready approval presentation remains impossible without a real revision.
52
+
53
+ `interaction-presentation.js` is the only owner that may select, label, order, localize and render the
54
+ operational status fields. The gate-check CLI, skills and surface adapters consume
55
+ `status_presentation.markdown` verbatim. They may add concise surrounding explanation, but they must
56
+ not reconstruct a table, omit or rename fields, substitute generic gate actions for evaluated
57
+ `allowed_now`/`forbidden_now`, or maintain another status-card template. If the projection is missing
58
+ or its selected run, revision, gate or locale identity is stale, presentation fails closed rather
59
+ than falling back to model-generated status Markdown.
60
+
61
+ This determinism protects semantic parity, permission boundaries and evidence visibility across
62
+ hosts. It does not standardize host chrome or unrelated conversational prose. `approval_presentation`
63
+ remains the separate decision-time projection and is present only for a ready user gate; both public
64
+ presentations derive from the same `status_card` snapshot and neither grants approval.
65
+
43
66
 
44
67
  ### Breadcrumb
45
68
 
@@ -83,6 +83,64 @@ Structured Delivery skills use this shape when relevant:
83
83
  - `required_next_step`: exactly the next clean step
84
84
  - `impact_codes`: affected Quality Contract codes, if the target repo has a registry
85
85
 
86
+
87
+ ## Normalized Review Gaps
88
+
89
+ This section is the sole normative owner for review-gap classification and routing. An applicable
90
+ finding from Task Plan Review, Clean Implementation Review or Code Review carries exactly one
91
+ normalized gap type and one routing target:
92
+
93
+ | gap_type | meaning | routing_target |
94
+ |---|---|---|
95
+ | `requirements_gap` | approved product behavior or an acceptance criterion is missing or contradictory | `PRD`; use `UR` only when user intent or scope changed |
96
+ | `design_gap` | technical ownership, architecture, fallback policy, exit criterion or a prohibited parallel structure was not decided | `SD` |
97
+ | `plan_gap` | an approved requirement or design obligation lacks an executable task, test or evidence mapping | `TP` |
98
+ | `implementation_gap` | code or a surface does not fulfil an approved requirement, design or task | `CD+Tests` |
99
+ | `evidence_gap` | required test, runtime or visible evidence is absent or insufficient | `evidence_obligation` |
100
+ | `emergent_risk` | implementation exposes a concrete risk not reasonably decidable from approved artefacts | earliest affected `UR | PRD | SD | TP | CD+Tests | evidence_obligation` target after explicit assessment |
101
+
102
+ Normalized finding rows use these fields in order:
103
+
104
+ `finding_id | gap_type | routing_target | gap_status | evidence | required_next_step`
105
+
106
+ - `finding_id` is stable within the durable review report.
107
+ - `gap_type` is exactly one type from the table above.
108
+ - `routing_target` is exactly `UR | PRD | SD | TP | CD+Tests | evidence_obligation` and must agree
109
+ with the fixed route above. `requirements_gap` may use `UR` only with evidence of changed user
110
+ intent or scope. `emergent_risk` requires an explicit earliest-owner assessment.
111
+ - `gap_status` is exactly `open | resolved`.
112
+ - `evidence` names concrete source, diff, test, observation or missing proof.
113
+ - `required_next_step` is exactly one executable action consistent with the routing target.
114
+
115
+ Missing, unknown or contradictory fields fail closed as an open gap. Consumers must not silently
116
+ reclassify a finding. Classification is non-authorizing: it cannot edit or approve UR, PRD, SD or TP,
117
+ advance a gate or replace a review decision. `qa-gate` consumes the normalized findings and cannot
118
+ return `pass` while any applicable finding is open or invalid.
119
+
120
+ `none` is permitted only as a presentation sentinel on a fulfilled UX Intent Fidelity row.
121
+ It is not a seventh normalized finding type and must not appear in a normalized finding row.
122
+
123
+ A consumer may repeat the field order and allowed scalar values needed to emit valid output. It must
124
+ reference this section for meanings and routes instead of maintaining a second complete mapping.
125
+
126
+ ## UX Intent Fidelity
127
+
128
+ When an approved PRD contains applicable UX criteria, `task-plan-review` produces an additional
129
+ evidence matrix with these columns in order:
130
+
131
+ `prd_criterion | working_mode_state | task_id | visible_evidence | fidelity_status | gap_type`
132
+
133
+ `fidelity_status` is exactly `fulfilled | partial | missing | not_verifiable`. A fulfilled row uses
134
+ the `none` sentinel. Any non-fulfilled row uses the applicable normalized type from `Normalized
135
+ Review Gaps`; it may also emit the normalized finding shape when routing detail is required.
136
+
137
+ This matrix verifies PRD-to-TP coverage and TP-to-code/surface fulfilment. It does not create product
138
+ requirements and does not decide QA. A missing implementation-relevant PRD requirement is a
139
+ `requirements_gap` and routes to PRD revision. `qa-gate` consumes this evidence and cannot return
140
+ `pass` while an applicable row is `partial`, `missing` or `not_verifiable`, or while a visible-behavior
141
+ claim has code evidence without visible evidence. The four-row Quality Readiness projection and
142
+ `qa-gate` sole decision ownership remain unchanged.
143
+
86
144
  A skill may briefly remind this shape, but must not duplicate a complete code or rule matrix.
87
145
 
88
146
 
@@ -97,4 +155,3 @@ It must distinguish:
97
155
  - interpretations
98
156
  - missing evidence
99
157
  - the next permissible step
100
-
@@ -11,6 +11,9 @@
11
11
  "en": {
12
12
  "statusCard": {
13
13
  "title": "AGDF status-card",
14
+ "status": "Status",
15
+ "field": "Status field",
16
+ "value": "Value",
14
17
  "run": "Selected run",
15
18
  "humanTitle": "Run title",
16
19
  "gate": "Current gate",
@@ -107,6 +110,7 @@
107
110
  "exactTextRequest": "To approve, reply exactly with `{approval}`; otherwise request revision or decline.",
108
111
  "decisionFollows": "will be the next user decision",
109
112
  "presentationFailure": "Approval cards could not be rendered safely.",
113
+ "statusPresentationFailure": "Status card could not render safely.",
110
114
  "nonReadyDecision": "No decision requested: {reason}.",
111
115
  "approveDescription": "Approve this gate with the exact authorization value.",
112
116
  "reviseLabel": "Revise",
@@ -214,6 +218,9 @@
214
218
  "de": {
215
219
  "statusCard": {
216
220
  "title": "AGDF-Statuskarte",
221
+ "status": "Status",
222
+ "field": "Statusfeld",
223
+ "value": "Wert",
217
224
  "run": "Ausgewählter Run",
218
225
  "humanTitle": "Run-Titel",
219
226
  "gate": "Aktuelles Gate",
@@ -310,6 +317,7 @@
310
317
  "exactTextRequest": "Zur Freigabe exakt mit `{approval}` antworten; andernfalls Überarbeitung anfordern oder ablehnen.",
311
318
  "decisionFollows": "ist die nächste Nutzerentscheidung",
312
319
  "presentationFailure": "Die Freigabekarten konnten nicht sicher dargestellt werden.",
320
+ "statusPresentationFailure": "Statuskarte nicht sicher darstellbar.",
313
321
  "nonReadyDecision": "Keine Entscheidung angefordert: {reason}.",
314
322
  "approveDescription": "Dieses Gate mit dem exakten Freigabewert autorisieren.",
315
323
  "reviseLabel": "Überarbeiten",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "id": "agdf",
4
- "version": "0.10.2",
4
+ "version": "0.11.0",
5
5
  "displayName": "AI Governance & Delivery Framework",
6
6
  "developerName": "Arndt Gold",
7
7
  "description": "Operating system for governed AI-assisted delivery.",
@@ -168,6 +168,12 @@
168
168
  "useFor": "after gate-check permits Brownfield Review or implementation preparation, before non-trivial changes in existing systems",
169
169
  "boundary": "clarifies reuse, owners, risks and Mode/Slice Decision; never bypasses gate-check; Brownfield Review is not implementation permission"
170
170
  },
171
+ {
172
+ "slug": "ux-intent-definition",
173
+ "discovery": "automatic",
174
+ "useFor": "after approved UR and post-UR routing for medium/high UI/UX impact or ambiguous low-impact product semantics before PRD readiness",
175
+ "boundary": "non-authorizing analytical PRD input; never creates product intent, gate permission, technical design or a parallel product source of truth"
176
+ },
171
177
  {
172
178
  "slug": "clean-implementation-review",
173
179
  "discovery": "automatic",
@@ -24,7 +24,8 @@ export function createValidationHandlers(io = console) {
24
24
  const output = printApprovalEnvelope(report, { io, reEvaluate: () => evaluateGateCheck(options.dir, options) });
25
25
  return output.status === "blocked" ? 2 : 0;
26
26
  }
27
- printGateCheckReport(report, options.json, options.statusCard, io);
27
+ const presentationRendered = printGateCheckReport(report, options.json, options.statusCard, io);
28
+ if (presentationRendered === false) return 2;
28
29
  return report.status === "blocked" ? 2 : 0;
29
30
  }],
30
31
  ["delivery-map", (options) => {
@@ -1,4 +1,4 @@
1
- import { attachApprovalOrientationSnapshot, buildArtefactRefs, buildQualityReadiness, formatArtefactRefs, gateTitle, localePack, renderApprovalOrientationSnapshot, resolveHumanRunTitle } from '../interaction-presentation.js';
1
+ import { attachApprovalOrientationSnapshot, buildArtefactRefs, buildQualityReadiness, gateTitle, localePack, renderApprovalOrientationSnapshot, renderOperationalStatusCard, resolveHumanRunTitle } from '../interaction-presentation.js';
2
2
  import { interactionLocales, resolveConfiguredChatLanguage } from '../cli/runtime-context.js';
3
3
  import { evaluateDoctor } from './doctor.js';
4
4
  import { analyzeDeliveryMap, deriveQualityOutlook } from './delivery-map.js';
@@ -292,6 +292,11 @@ export function evaluateGateCheck(targetDir, selection = {}) {
292
292
  enumerable: false,
293
293
  });
294
294
  const revisionId = extractField(runState.content ?? "", "revision_id");
295
+ const statusPresentation = renderOperationalStatusCard(statusCard, {
296
+ registry: interactionLocales,
297
+ humanPresentation,
298
+ revisionId,
299
+ });
295
300
  const approvalOrientation = attachApprovalOrientationSnapshot(statusCard, {
296
301
  ready: isReadyUserGateApproval({ status, currentGate, missingApproval }),
297
302
  humanPresentation,
@@ -323,6 +328,7 @@ export function evaluateGateCheck(targetDir, selection = {}) {
323
328
  native_attempt_required: statusCard.native_attempt_required,
324
329
  candidate_runs: runState.candidate_runs ?? [],
325
330
  status_card: statusCard,
331
+ status_presentation: statusPresentation,
326
332
  approval_presentation: renderApprovalOrientationSnapshot(approvalOrientation, {
327
333
  registry: interactionLocales,
328
334
  expectedIdentity: {
@@ -392,28 +398,12 @@ export function printApprovalEnvelope(report, { io = console, reEvaluate } = {})
392
398
 
393
399
  function printGateCheckStatusCard(report, io) {
394
400
  const card = report.status_card;
395
- const labels = localePack(interactionLocales, card.presentation_language).statusCard;
396
- const primary = localePack(interactionLocales, card.presentation_language).primary;
397
- const presentation = card.humanPresentation ?? {
398
- runTitle: card.run_id,
399
- gateTitle: gateTitle(interactionLocales, card.presentation_language, card.current_gate),
400
- artefactRefs: buildArtefactRefs({}, interactionLocales, card.presentation_language),
401
- };
402
- io.log(`${labels.title}: ${primary.status[card.status] ?? card.status}`);
403
- io.log(`${labels.run}: ${card.run_id}`);
404
- io.log(`${labels.humanTitle}: ${presentation.runTitle}`);
405
- io.log(`${labels.gate}: ${card.current_gate} — ${presentation.gateTitle}`);
406
- io.log(`${labels.lifecycle}: ${primary.lifecycle[card.delivery_state] ?? primary.lifecycle.unknown}`);
407
- io.log(`${labels.artefacts}: ${formatArtefactRefs(presentation.artefactRefs)}`);
408
- io.log(`${labels.blocked}: ${card.blocking_condition === "none" ? primary.none : primary.blocked}`);
409
- io.log(`${labels.missing}: ${card.missing_approval === "none" ? primary.none : card.missing_approval}`);
410
- if (card.next_gate_after_approval !== "none") {
411
- io.log(`${labels.nextGate}: ${card.next_gate_after_approval} — ${gateTitle(interactionLocales, card.presentation_language, card.next_gate_after_approval)}`);
412
- io.log(`${labels.allowedAfter}: ${primary.afterApproval[card.current_gate] ?? primary.actions[card.current_gate]}`);
401
+ if (!report.status_presentation?.markdown) {
402
+ io.log(localePack(interactionLocales, card?.presentation_language || "en").interaction.statusPresentationFailure);
403
+ return false;
413
404
  }
414
- io.log(`${labels.allowed}: ${primary.actions[card.current_gate] ?? primary.none}`);
415
- io.log(`${labels.step}: ${primary.actions[card.current_gate] ?? primary.none}`);
416
- io.log(`${labels.quality}: ${primary.quality}`);
405
+ io.log(report.status_presentation.markdown);
406
+ const primary = localePack(interactionLocales, card.presentation_language).primary;
417
407
  const readiness = qualityReadinessForRunState(card.runState, report.next_allowed_action);
418
408
  if (readiness) {
419
409
  const quality = localePack(interactionLocales, card.presentation_language).qualityReadiness;
@@ -429,17 +419,17 @@ function printGateCheckStatusCard(report, io) {
429
419
  io.log(`${quality.nextAction}: ${readiness.next_action || primary.none}`);
430
420
  io.log(`${quality.decisionOwner}: ${quality.decisionOwnerValue}`);
431
421
  }
422
+ return true;
432
423
  }
433
424
 
434
425
  export function printGateCheckReport(report, json, statusCard = false, io = console) {
435
426
  if (json) {
436
427
  io.log(JSON.stringify(report, null, 2));
437
- return;
428
+ return true;
438
429
  }
439
430
 
440
431
  if (statusCard) {
441
- printGateCheckStatusCard(report, io);
442
- return;
432
+ return printGateCheckStatusCard(report, io);
443
433
  }
444
434
 
445
435
  io.log(`AGDF gate-check: ${report.status}`);
@@ -456,4 +446,5 @@ export function printGateCheckReport(report, json, statusCard = false, io = cons
456
446
  for (const item of report.forbidden) io.log(`- ${item}`);
457
447
  io.log("");
458
448
  io.log(`Next allowed action: ${report.next_allowed_action}`);
449
+ return true;
459
450
  }
@@ -269,6 +269,86 @@ export function formatArtefactRefs(refs) {
269
269
  return refs.map((ref) => ref.exists ? `[${ref.label}](${ref.path})` : ref.missingLabel).join(" · ");
270
270
  }
271
271
 
272
+ function markdownCell(value) {
273
+ return String(value ?? "")
274
+ .replaceAll("\\", "\\\\")
275
+ .replaceAll("|", "\\|")
276
+ .replaceAll("&", "&amp;")
277
+ .replaceAll("<", "&lt;")
278
+ .replaceAll(">", "&gt;")
279
+ .replace(/\r?\n/g, "<br>");
280
+ }
281
+
282
+ function operationalList(value, none) {
283
+ if (!Array.isArray(value) || value.length === 0) return none;
284
+ return value.map((item) => String(item ?? "").trim()).filter(Boolean).join("\n") || none;
285
+ }
286
+
287
+ function operationalBreadcrumb(value, labels) {
288
+ if (!Array.isArray(value) || value.length === 0) return "";
289
+ const marker = {
290
+ fulfilled: labels.breadcrumbFulfilled,
291
+ current: labels.breadcrumbCurrent,
292
+ open: labels.breadcrumbOpen,
293
+ };
294
+ return value.map((item) => `${marker[item?.status] ?? labels.breadcrumbOpen} ${String(item?.gate ?? "").trim()}`)
295
+ .filter((item) => item.trim())
296
+ .join(labels.breadcrumbSeparator);
297
+ }
298
+
299
+ export function renderOperationalStatusCard(statusCard, {
300
+ registry,
301
+ humanPresentation,
302
+ revisionId = "",
303
+ } = {}) {
304
+ if (!plainObject(statusCard) || !plainObject(humanPresentation)) return null;
305
+ const runId = String(statusCard.run_id ?? "").trim();
306
+ const currentGate = String(statusCard.current_gate ?? "").trim();
307
+ const revision = String(revisionId ?? "").trim() || "unversioned";
308
+ const locale = resolvePresentationLocale(registry, statusCard.presentation_language);
309
+ if (!runId || !currentGate || !locale) return null;
310
+
311
+ const pack = localePack(registry, locale);
312
+ const labels = pack.statusCard;
313
+ const primary = pack.primary;
314
+ const none = primary.none;
315
+ const gateLabel = String(humanPresentation.gateTitle ?? "").trim() || gateTitle(registry, locale, currentGate);
316
+ const runTitle = displaySafeTitle(humanPresentation.runTitle, normalizedRunTitle(runId));
317
+ const breadcrumb = operationalBreadcrumb(statusCard.breadcrumb, labels);
318
+ const rows = [
319
+ [labels.run, `${runTitle} · \`${runId}\``],
320
+ ...(breadcrumb ? [[labels.breadcrumb, breadcrumb]] : []),
321
+ [labels.status, primary.status[statusCard.status] ?? statusCard.status],
322
+ [labels.gate, `${gateLabel} (\`${currentGate}\`)`],
323
+ [labels.allowed, operationalList(statusCard.allowed_now, none)],
324
+ [labels.forbidden, operationalList(statusCard.forbidden_now, none)],
325
+ [labels.blocked, statusCard.blocking_condition === "none" ? none : statusCard.blocking_condition],
326
+ [labels.missing, statusCard.missing_approval === "none" ? none : statusCard.missing_approval],
327
+ [labels.nextGate, statusCard.next_gate_after_approval === "none" ? none : statusCard.next_gate_after_approval],
328
+ [labels.allowedAfter, statusCard.allowed_after_approval === "none" ? none : statusCard.allowed_after_approval],
329
+ [labels.step, statusCard.next_step || none],
330
+ [labels.quality, statusCard.quality_outlook || none],
331
+ ];
332
+ const markdown = [
333
+ `## ${labels.title}`,
334
+ "",
335
+ `| ${labels.field} | ${labels.value} |`,
336
+ "|---|---|",
337
+ ...rows.map(([label, value]) => `| ${markdownCell(label)} | ${markdownCell(value)} |`),
338
+ ].join("\n");
339
+
340
+ return Object.freeze({
341
+ schema_version: "1",
342
+ semantic_block: "run_status_card",
343
+ run_id: runId,
344
+ revision_id: revision,
345
+ current_gate: currentGate,
346
+ presentation_language: locale,
347
+ markdown,
348
+ authorizes: false,
349
+ });
350
+ }
351
+
272
352
  export function gateOptions(registry, requestedLocale, gate, { includeCancel = false } = {}) {
273
353
  const pack = localePack(registry, requestedLocale);
274
354
  const options = [