create-agdf 0.10.1 → 0.10.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +21 -13
- package/bin/agdf-validator.js +11 -0
- package/generated/.agdf/control/README.md +3 -3
- package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +1 -1
- package/generated/.github/skills/agdf-delivery-path-search/SKILL.md +7 -6
- package/generated/.github/skills/agdf-gate-check/SKILL.md +35 -105
- package/generated/.github/skills/agdf-interaction-locales.json +10 -0
- package/generated/.github/skills/agdf-release-or/SKILL.md +1 -1
- package/generated/.github/skills/contracts/gate-transition.md +4 -2
- package/generated/.github/skills/contracts/interaction.md +23 -0
- package/generated/.github/skills/contracts/modes.md +12 -1
- package/generated/.opencode/agdf-interaction-locales.json +10 -0
- package/generated/.opencode/contracts/gate-transition.md +4 -2
- package/generated/.opencode/contracts/interaction.md +23 -0
- package/generated/.opencode/contracts/modes.md +12 -1
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +1 -1
- package/generated/.opencode/skills/agdf-delivery-path-search/SKILL.md +7 -6
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +35 -105
- package/generated/.opencode/skills/agdf-release-or/SKILL.md +1 -1
- package/generated/plugins/agdf/.claude-plugin/plugin.json +19 -0
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/control/README.md +3 -3
- package/generated/plugins/agdf/hooks/session-start.sh +1 -1
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +10 -0
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +1 -1
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +4 -2
- package/generated/plugins/agdf/meta/contracts/interaction.md +23 -0
- package/generated/plugins/agdf/meta/contracts/modes.md +12 -1
- package/generated/plugins/agdf/runtime/agdf-local.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/NOTICE +10 -0
- package/generated/plugins/agdf/runtime/create-agdf/bin/agdf-validator.js +11 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +426 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +220 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/command-registry.js +136 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/delivery-path-search-command.js +75 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/parse-args.js +156 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/runtime-context.js +83 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +46 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/delivery-map.js +291 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/doctor.js +265 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +450 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-policy.js +283 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/required-files.js +9 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/run-state.js +217 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/shared.js +344 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/verified-change.js +156 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/aggregate.js +18 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/gate-approval-validator.js +49 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/index.js +7 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/legacy-migration.js +95 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-parser.js +227 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-repository.js +68 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-resolver.js +45 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-state/run-state-writer.js +97 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/candidate-policy.js +99 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/contracts.js +237 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/claude.js +44 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/codex.js +53 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/evaluators/protocol.js +13 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/claude.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/codex.js +38 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/generators/protocol.js +12 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/persistence.js +39 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/scoring.js +21 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/search-engine.js +154 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/state-adapter.js +161 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/surfaces/capabilities.js +14 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/delivery-path-search/transports/read-only-guard.js +43 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/interaction-presentation.js +670 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/local-validator.js +142 -0
- package/generated/plugins/agdf/runtime/create-agdf/lib/runtime/validator-application.js +40 -0
- package/generated/plugins/agdf/runtime/create-agdf/package.json +66 -0
- package/generated/plugins/agdf/runtime/runtime-manifest.json +8 -0
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +1055 -0
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +1 -1
- package/generated/plugins/agdf/skills/delivery-path-search/SKILL.md +7 -6
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +35 -105
- package/generated/plugins/agdf/skills/release-or/SKILL.md +1 -1
- package/lib/cli/application.js +16 -54
- package/lib/cli/command-registry.js +9 -11
- package/lib/cli/validation-handlers.js +46 -0
- package/lib/control-evaluation/doctor.js +1 -1
- package/lib/control-evaluation/gate-check.js +23 -32
- package/lib/control-evaluation/required-files.js +9 -0
- package/lib/installers/local-marketplace.js +322 -0
- package/lib/installers/opencode.js +84 -6
- package/lib/installers/plugin-installers.js +102 -26
- package/lib/interaction-presentation.js +80 -0
- package/lib/runtime/local-validator.js +142 -0
- package/lib/runtime/validator-application.js +40 -0
- package/lib/scaffold/plan.js +1 -7
- package/lib/scaffold/presentation.js +2 -2
- package/opencode-plugin.js +1 -1
- package/package.json +6 -2
|
@@ -37,7 +37,7 @@ Do not mix both modes silently. Name the active mode in the output.
|
|
|
37
37
|
|
|
38
38
|
## Rules
|
|
39
39
|
1. Brownfield first: understand the existing codebase before PRD/SD decisions when existing-system impact is possible, and again before implementation.
|
|
40
|
-
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.
|
|
40
|
+
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. Persist the completed review and its decision, scope reason, evidence and required next gate in the same internal operation; mark the review `done` only after both the artefact and canonical run projection are complete. An interrupted, incomplete or legacy record stays at fail-closed `Mode/Slice Decision` recovery without another user approval.
|
|
41
41
|
3. Reuse-before-create: prefer existing modules, services, components, tables, endpoints, tests, and configuration.
|
|
42
42
|
4. Minimal clean slice: choose the smallest durable intervention, not merely the smallest technical diff.
|
|
43
43
|
5. No silent parallel structures.
|
|
@@ -35,16 +35,17 @@ Skip for routine questions, obvious local fixes and approved implementation with
|
|
|
35
35
|
1. Run AGDF gate-check and inspect durable control state.
|
|
36
36
|
2. Confirm that search is allowed and implementation is not occurring during exploration.
|
|
37
37
|
3. Declare the active surface and its enforcement level.
|
|
38
|
-
4.
|
|
38
|
+
4. Resolve the exact-version surface-local validator using the same ownership rules as `gate-check`. Do not search `PATH`, query a registry, install a package or invoke `npx ...@latest` during routine planning. If no owned or explicitly configured exact-version validator is available, report `machine_validation: unavailable` or `machine_validation: external_required` and stop the machine-evaluated search.
|
|
39
|
+
5. Invoke the shared CLI runtime:
|
|
39
40
|
|
|
40
41
|
```bash
|
|
41
|
-
|
|
42
|
+
node <surface-local-agdf> delivery-path-search --surface <surface> --json
|
|
42
43
|
```
|
|
43
44
|
|
|
44
45
|
Optional AI-native candidate generation is explicit:
|
|
45
46
|
|
|
46
47
|
```bash
|
|
47
|
-
|
|
48
|
+
node <surface-local-agdf> delivery-path-search \
|
|
48
49
|
--surface codex \
|
|
49
50
|
--generate-candidates \
|
|
50
51
|
--json
|
|
@@ -52,9 +53,9 @@ npx --yes @agdf/cli@latest delivery-path-search \
|
|
|
52
53
|
|
|
53
54
|
It supplements the deterministic baseline with at most one bounded generator call. Treat proposals as untrusted until the canonical core validates schema, gate action, scope, duplicates and material diversity. Report generation provenance, budgets, rejections and failure. Never hide deterministic fallback or switch providers automatically.
|
|
54
55
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
6. Treat facts, repository evidence, assumptions and model judgements separately.
|
|
57
|
+
7. Return exactly one recommendation or `no_safe_recommendation`.
|
|
58
|
+
8. Run canonical AGDF gate-check after search. Never translate a recommendation into permission.
|
|
58
59
|
|
|
59
60
|
## Enforcement
|
|
60
61
|
|
|
@@ -44,17 +44,23 @@ If required control files are missing, do not automatically create a full `.agdf
|
|
|
44
44
|
The default first action is to draft the minimal UR in the response and request `Approval: UR`.
|
|
45
45
|
Use `init` only when the user explicitly asks for durable AGDF control state, the repository already uses `.agdf/control/` as its live working state, or a deterministic CLI/CI setup path is being executed.
|
|
46
46
|
|
|
47
|
-
Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, when CI or PR evidence is needed, when deterministic ready-gate rendering is required, or when a repository-local automation needs JSON output.
|
|
47
|
+
Use the executable control path when a machine-readable check is requested, when the gate state is ambiguous, when CI or PR evidence is needed, when deterministic ready-gate rendering is required, or when a repository-local automation needs JSON output. Resolve the version-matched validator owned by the active surface first: `<plugin-root>/runtime/agdf-local.js` for Codex or Claude, or `<opencode-config>/agdf/bin/agdf-local.js` for OpenCode. Run its `--resolve-only --json` probe before treating its output as machine evidence. An explicitly configured absolute `AGDF_VALIDATOR_PATH` is the only secondary local candidate and must match the active AGDF version.
|
|
48
|
+
|
|
49
|
+
Routine validation uses that resolved local entrypoint:
|
|
48
50
|
|
|
49
51
|
```bash
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
npx --yes @agdf/cli@latest delivery-map --json
|
|
52
|
+
node <surface-local-agdf> doctor --json
|
|
53
|
+
node <surface-local-agdf> gate-check --json
|
|
54
|
+
node <surface-local-agdf> delivery-map --json
|
|
54
55
|
```
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
`
|
|
57
|
+
If no exact-version local validator exists, continue through agent-native inspection where permitted
|
|
58
|
+
and state `machine_validation: unavailable` or `external_required`; do not automatically invoke
|
|
59
|
+
`npx`, install a package or contact the registry. Registry-resolved commands are reserved for an
|
|
60
|
+
explicit bootstrap, installation, repair or refresh requested as a lifecycle action.
|
|
61
|
+
|
|
62
|
+
For repeated local checks, use the resolved entrypoint with `doctor --json`, `gate-check --json` or
|
|
63
|
+
`gate-check --approval-envelope`. The last command prints the validated
|
|
58
64
|
two-card exact-text interaction; JSON exposes the same `approval_presentation`
|
|
59
65
|
for a native-capable adapter.
|
|
60
66
|
|
|
@@ -65,93 +71,25 @@ The CLI reports are validators and JSON evidence, not the primary user experienc
|
|
|
65
71
|
|
|
66
72
|
## Native Interaction Path
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
For a fresh request classified as read-only with no required run decision, emit the locale pack's
|
|
73
|
-
`primary.readOnlyOrientationDescription` sentence once before the findings. This path creates no run, persists
|
|
74
|
-
nothing, requests no approval and reuses the existing status projection. Do not repeat the sentence
|
|
75
|
-
during the same request.
|
|
76
|
-
|
|
77
|
-
For a ready `gate_approval`:
|
|
78
|
-
|
|
79
|
-
1. Resolve exactly one selected run and evaluate the current gate.
|
|
80
|
-
2. Confirm the required durable artefact is present and ready before presenting a question.
|
|
81
|
-
3. Consume the validated canonical `approval_presentation` for the same selected run, gate and revision. Do not compose or rewrite headings, fields, card order, locale copy or Markdown in the model.
|
|
82
|
-
4. Emit its complete `run_status_card` block first and `gate_transition_card` block second in one immediately preceding assistant message. The first heading is neutral; the five status fields are selected run, readiness, current gate, human-readable required decision and a neutral approve/revise/decline instruction. The exact approval value appears only in the transition card across these two blocks.
|
|
83
|
-
5. Never put either card only into the question, button description or hidden tool context. Do not invoke a native question until both rendered blocks are visible.
|
|
84
|
-
6. If the projection is absent or invalid, render no partial card and invoke no native control. Re-evaluate the gate. Use only the exact-text request when the same gate is still ready and its canonical value is independently valid; otherwise report the non-ready reason and request no decision.
|
|
85
|
-
7. Distinguish internal process steps from user decisions in natural language. For example, after `Approval: TP`, say that pre-implementation Brownfield Analysis runs next and that no further user action is required now; do not expose `next_user_gate: none` or `user_action_required: no`, and do not ask for a second approval for Brownfield Analysis.
|
|
86
|
-
8. Ask exactly one question that names the selected `run_id` and `current_gate`.
|
|
87
|
-
9. Offer options in stable order: exact `Approval: <GateName>`, localized revise and localized decline. Add explicit cancel only where supported after decline; otherwise host dismissal maps to cancel. Never preselect, skip, auto-submit or reorder an option.
|
|
88
|
-
10. Use the surface adapter declared in the canonical plugin definition only when it can wait for deliberate input without auto-resolution and can transport `exact_option_value` or `separate_label_and_value`; never invoke a `decorated_label_only` adapter. Otherwise request the same exact approval in concise text.
|
|
89
|
-
11. Render both supplied cards once in that single complete assistant message. Never merge, reverse, omit, duplicate or reconstruct them; the decision heading does not replace either card. If the native attempt is unavailable or not applied, continue to exact text without repeating either card.
|
|
90
|
-
12. Re-run gate evaluation for the same run and expected gate after the response and immediately before persistence.
|
|
91
|
-
13. Reject a missing artefact, ambiguous or wrong run, wrong gate, stale expected gate, timeout/default, hook-supplied answer, agent message, technical permission outcome or plan approval.
|
|
92
|
-
14. Persist accepted input only through the existing control-state workflow.
|
|
93
|
-
|
|
94
|
-
Before projecting a ready gate, evaluate adapter callability, deliberate wait safety and canonical
|
|
95
|
-
approval-value transport. Expose `native_attempt_required: true` only when that preflight proves
|
|
96
|
-
`exact_option_value` or `separate_label_and_value` transport with safe deliberate waiting. Decorated-only,
|
|
97
|
-
missing, conflicting or unknown capability exposes false and `unavailable_before_invocation`; unsafe
|
|
98
|
-
waiting exposes false and `unsafe_to_wait`. In both cases use exact text without invoking the adapter.
|
|
99
|
-
A hook, permission result or session context message cannot replace an eligible attempt or supply its answer.
|
|
100
|
-
|
|
101
|
-
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.
|
|
102
|
-
|
|
103
|
-
The canonical renderer resolves the complete locale pack. The initial German pack includes `Bereit für deine Entscheidung`, `Jetzt freigeben` and `Danach`; the initial English pack includes `Ready for your decision`, `Approve now` and `Next`. Verify that the supplied blocks use one locale and a neutral decision heading while leaving the exact gate identifier and approval value unchanged. Do not model-edit the supplied Markdown.
|
|
104
|
-
|
|
105
|
-
The primary option is derived exactly as `Approval: <GateName>` from the evaluated current gate; only explanatory copy and non-authoritative outcome labels are localized. Concrete localized copy belongs to the user-facing interaction layer or the approved delivery artefact, not to English runtime rules.
|
|
106
|
-
|
|
107
|
-
Make exactly one native-attempt for the eligible ready gate. If the host does not render,
|
|
108
|
-
apply or safely return the native question on that attempt, switch immediately
|
|
109
|
-
to the exact textual approval. Do not ask the user to request the buttons again
|
|
110
|
-
and do not create a retry loop or simulated control.
|
|
111
|
-
|
|
112
|
-
State the outcome visibly: `presented`, `unavailable_before_invocation`,
|
|
113
|
-
`attempted_not_applied` or `unsafe_to_wait`. For every fallback, say in the
|
|
114
|
-
configured locale why a native control was not usable, show the exact approval
|
|
115
|
-
value and confirm that authority is unchanged. This transient outcome is not
|
|
116
|
-
approval evidence. A new explicit user request may reopen the unchanged decision
|
|
117
|
-
only after fresh run/gate/artefact revalidation; never retry automatically.
|
|
118
|
-
|
|
119
|
-
Surface behavior:
|
|
74
|
+
`../../meta/contracts/interaction.md` is the complete normative owner for interaction kinds, locale,
|
|
75
|
+
canonical values, presentation order, adapter capability, deliberate waiting, native/fallback
|
|
76
|
+
behavior, transient outcomes, permissions and post-response validation. Load and apply that contract;
|
|
77
|
+
do not restate or infer a surface matrix in this skill.
|
|
120
78
|
|
|
121
|
-
|
|
122
|
-
- Claude Code: invoke `AskUserQuestion` on the first eligible attempt only when no timeout can auto-continue and no hook supplies `answers` or `updatedInput`; if it is not rendered or applied, use exact text immediately. Claude permissions and `ExitPlanMode` remain separate.
|
|
123
|
-
- OpenCode: use built-in `question` when permitted. Preserve explicit `permission.question` denial and use exact text in that case. `once`, `always`, `reject` and auto mode never become gate input.
|
|
124
|
-
- GitHub Copilot: the current repository-instruction surface has no conforming native approval adapter. Transmit the canonical rendered cards followed by the exact-text request; never claim or simulate a native control. Copilot tool confirmations, plan interactions and repository permissions remain separate.
|
|
125
|
-
- Other, unavailable or non-interactive surfaces: use exact textual approval and wait for a new explicit user response.
|
|
79
|
+
This skill owns only these operational responsibilities:
|
|
126
80
|
|
|
127
|
-
|
|
81
|
+
1. Select exactly one run and evaluate its current gate.
|
|
82
|
+
2. Confirm that the required durable artefact is present and ready.
|
|
83
|
+
3. Consume the canonical `approval_presentation` verbatim for the selected run, gate and revision.
|
|
84
|
+
4. Present that projection and obtain deliberate input through the contract-selected native or exact-text path.
|
|
85
|
+
5. Revalidate the same run, gate and revision immediately after the response and before persistence.
|
|
86
|
+
6. Persist only a currently valid exact approval through the existing control-state workflow.
|
|
128
87
|
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
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.
|
|
136
|
-
|
|
137
|
-
### Post-Acceptance Transition Narration
|
|
138
|
-
|
|
139
|
-
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.
|
|
140
|
-
|
|
141
|
-
### Internal-State Collapse in the Human Card
|
|
142
|
-
|
|
143
|
-
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.
|
|
144
|
-
|
|
145
|
-
### On-Demand "Why?" Response
|
|
146
|
-
|
|
147
|
-
When the user asks "why?" or "Warum?" at any gate or internal step, respond with a `status` interaction (not `gate_approval`):
|
|
148
|
-
|
|
149
|
-
1. Pull the curated rationale from `gateRationale()` in the resolved locale.
|
|
150
|
-
2. Compose one fulfilled line from the selected run's Approvals table and artefact status.
|
|
151
|
-
3. Compose one protects-against line from the gate's rationale and the existing `primary.actions` copy.
|
|
152
|
-
4. Do not show approval controls. Do not advance any gate. Do not merge with the approval envelope.
|
|
153
|
-
|
|
154
|
-
The response is deterministic: same gate, same question, same answer. The `gate_approval` options remain exactly `approve | revise | decline | cancel`; no "why" option is added. See the Runtime Contract §Gate-Rationale-Registry and §On-Demand "Why?" Interaction for the full contract.
|
|
88
|
+
For status, blocked, read-only or rationale interactions, consume the canonical
|
|
89
|
+
`status_presentation.markdown` verbatim and apply the locale contract without asking for approval.
|
|
90
|
+
Do not reconstruct its fields, ordering, labels or Markdown from `status_card` JSON. Internal process
|
|
91
|
+
steps remain distinct from user decisions. If the projection, adapter evidence or revalidation is
|
|
92
|
+
missing, follow the contract's fail-closed outcome and leave authority unchanged.
|
|
155
93
|
|
|
156
94
|
## Rules
|
|
157
95
|
1. Fail closed when a required approval or artefact status is missing.
|
|
@@ -226,23 +164,15 @@ If a status is not explicit, do not assume it is satisfied.
|
|
|
226
164
|
12. If branch, workspace and durable artefacts disagree, do not choose a scope silently; report the ambiguity and ask for the smallest clarifying gate action.
|
|
227
165
|
|
|
228
166
|
## Output
|
|
229
|
-
Keep the result short and operational.
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
| Current gate | `<GateName or internal step>` |
|
|
235
|
-
| Allowed now | `<currently allowed outputs>` |
|
|
236
|
-
| Blocked by | `<blocking condition or none>` |
|
|
237
|
-
| Missing approval | `Approval: <GateName> | none` |
|
|
238
|
-
| Next step | `<single permissible next step>` |
|
|
239
|
-
| Quality outlook | `<next meaningful quality focus or none>` |
|
|
240
|
-
|
|
241
|
-
When an approval is missing, also include `Next gate after approval` and `Allowed after approval` exactly as constrained by the Runtime Contract. Keep forbidden outputs, evidence and next-skill detail in the concise surrounding text when relevant; they are not extra status-card rows.
|
|
167
|
+
Keep the result short and operational. For a status-only response, consume the Runtime Contract's
|
|
168
|
+
code-owned `status_presentation.markdown` verbatim. It is the compact localized operational Run
|
|
169
|
+
Status Card and already includes current and post-approval authority, next-step and quality fields.
|
|
170
|
+
Keep full raw evidence in `status_card` JSON or concise surrounding detail when relevant; do not turn
|
|
171
|
+
the primary chat card into an audit dump. Do not maintain or render a skill-local table template.
|
|
242
172
|
|
|
243
173
|
This complete operational status table remains the status-reporting and detail
|
|
244
174
|
surface. When the same response immediately requests a ready gate approval,
|
|
245
|
-
render its
|
|
175
|
+
render its five-field compact approval-time projection first, then the Gate
|
|
246
176
|
Transition Card in the same immediately preceding assistant message, then
|
|
247
177
|
invoke exactly one native question or exact-text fallback. Both cards derive
|
|
248
178
|
from the same snapshot and are shown exactly once.
|
|
@@ -52,7 +52,7 @@ Use the Runtime Contract definition of `Relevant Run` to decide whether OR is ma
|
|
|
52
52
|
13. Keep machine status normalization in the CLI; do not write internal snake_case status values into the human-facing backlog.
|
|
53
53
|
14. Reconcile Context Graph impact before clean closeout: report `context_graph_reconciliation: resolved | not_applicable | open_gap`.
|
|
54
54
|
15. If Context Graph work remains unresolved, report it as an explicit open gap and do not describe the run as cleanly handoff-ready.
|
|
55
|
-
|
|
55
|
+
16. 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.
|
|
56
56
|
|
|
57
57
|
## When To Use
|
|
58
58
|
- at the end of every relevant run
|
package/lib/cli/application.js
CHANGED
|
@@ -6,18 +6,6 @@ import {
|
|
|
6
6
|
resolveRuns,
|
|
7
7
|
writeLegacyProjection,
|
|
8
8
|
} from "../control-state/index.js";
|
|
9
|
-
import {
|
|
10
|
-
buildStatusCard,
|
|
11
|
-
evaluateGateCheck,
|
|
12
|
-
printApprovalEnvelope,
|
|
13
|
-
postApprovalTransition,
|
|
14
|
-
printGateCheckReport,
|
|
15
|
-
} from "../control-evaluation/gate-check.js";
|
|
16
|
-
import {
|
|
17
|
-
evaluateDeliveryMap,
|
|
18
|
-
printDeliveryMapReport,
|
|
19
|
-
} from "../control-evaluation/delivery-map.js";
|
|
20
|
-
import { evaluateDoctor, printDoctorReport } from "../control-evaluation/doctor.js";
|
|
21
9
|
import {
|
|
22
10
|
defaultOpenCodeConfigDir,
|
|
23
11
|
evaluateOpenCodeStatus,
|
|
@@ -43,19 +31,19 @@ import { agdfFragmentPath, generatedFilesForTarget } from "../scaffold/plan.js";
|
|
|
43
31
|
import { printNextSteps } from "../scaffold/presentation.js";
|
|
44
32
|
import { assertGeneratedWritePlan, writeGeneratedFile } from "../scaffold/write.js";
|
|
45
33
|
import { renderUsage, resolveCommand, validateCommandOptions } from "./command-registry.js";
|
|
46
|
-
import { executeDeliveryPathSearch } from "./delivery-path-search-command.js";
|
|
47
34
|
import { CliUsageError, parseArgs } from "./parse-args.js";
|
|
35
|
+
import { pluginDefinition } from "./runtime-context.js";
|
|
36
|
+
import { createValidationHandlers } from "./validation-handlers.js";
|
|
48
37
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
})
|
|
54
|
-
|
|
55
|
-
function createHandlers({ io, env, exec }) {
|
|
56
|
-
const installerAdapters = exec ? { exec, io } : { io };
|
|
38
|
+
function createHandlers({ io, env, exec, prepare }) {
|
|
39
|
+
const installerAdapters = {
|
|
40
|
+
...(exec ? { exec } : {}),
|
|
41
|
+
...(prepare ? { prepare } : {}),
|
|
42
|
+
...(env.AGDF_DATA_DIR ? { dataRoot: env.AGDF_DATA_DIR } : {}),
|
|
43
|
+
};
|
|
57
44
|
const scaffoldHandler = (options) => runScaffold(options, io);
|
|
58
45
|
return new Map([
|
|
46
|
+
...createValidationHandlers(io),
|
|
59
47
|
["codex-repo", scaffoldHandler],
|
|
60
48
|
["copilot", scaffoldHandler],
|
|
61
49
|
["opencode-repo", scaffoldHandler],
|
|
@@ -77,37 +65,6 @@ function createHandlers({ io, env, exec }) {
|
|
|
77
65
|
io.log(output);
|
|
78
66
|
return 0;
|
|
79
67
|
}],
|
|
80
|
-
["doctor", (options) => {
|
|
81
|
-
const report = evaluateDoctor(options.dir, options);
|
|
82
|
-
printDoctorReport(report, options.json, io);
|
|
83
|
-
return report.status === "block" ? 2 : 0;
|
|
84
|
-
}],
|
|
85
|
-
["gate-check", (options) => {
|
|
86
|
-
const report = evaluateGateCheck(options.dir, options);
|
|
87
|
-
if (options.approvalEnvelope) {
|
|
88
|
-
const output = printApprovalEnvelope(report, {
|
|
89
|
-
io,
|
|
90
|
-
reEvaluate: () => evaluateGateCheck(options.dir, options),
|
|
91
|
-
});
|
|
92
|
-
return output.status === "blocked" ? 2 : 0;
|
|
93
|
-
}
|
|
94
|
-
printGateCheckReport(report, options.json, options.statusCard, io);
|
|
95
|
-
return report.status === "blocked" ? 2 : 0;
|
|
96
|
-
}],
|
|
97
|
-
["delivery-map", (options) => {
|
|
98
|
-
const report = evaluateDeliveryMap(options.dir, options, deliveryMapDependencies);
|
|
99
|
-
printDeliveryMapReport(report, options.json, io);
|
|
100
|
-
return report.status === "block" ? 2 : 0;
|
|
101
|
-
}],
|
|
102
|
-
["delivery-path-search", async (options) => {
|
|
103
|
-
try {
|
|
104
|
-
const result = await executeDeliveryPathSearch(options, io);
|
|
105
|
-
return result.status === "recommendation" ? 0 : 2;
|
|
106
|
-
} catch (error) {
|
|
107
|
-
io.error(`Delivery Path Search failed: ${error.message}`);
|
|
108
|
-
return 2;
|
|
109
|
-
}
|
|
110
|
-
}],
|
|
111
68
|
["opencode-status", (options) => {
|
|
112
69
|
const configDir = env.OPENCODE_CONFIG_DIR || defaultOpenCodeConfigDir();
|
|
113
70
|
const report = evaluateOpenCodeStatus(options.dir, configDir);
|
|
@@ -198,7 +155,7 @@ function runLifecyclePhase(phase, operation) {
|
|
|
198
155
|
|
|
199
156
|
function installResult(installed, { restartRequired, nextAction }) {
|
|
200
157
|
return createLifecycleResult({
|
|
201
|
-
operation: "install",
|
|
158
|
+
operation: installed.operation ?? "install",
|
|
202
159
|
result: "success",
|
|
203
160
|
surface: installed.surface,
|
|
204
161
|
scope: "global",
|
|
@@ -329,6 +286,11 @@ function runScaffold(options, io) {
|
|
|
329
286
|
export async function runCli(argv = process.argv.slice(2), adapters = {}) {
|
|
330
287
|
const io = adapters.io ?? console;
|
|
331
288
|
const env = adapters.env ?? process.env;
|
|
289
|
+
if (argv.includes("--version")) {
|
|
290
|
+
const output = { name: "create-agdf", version: pluginDefinition.version };
|
|
291
|
+
io.log(argv.includes("--json") ? JSON.stringify(output) : output.version);
|
|
292
|
+
return 0;
|
|
293
|
+
}
|
|
332
294
|
let parsed;
|
|
333
295
|
try {
|
|
334
296
|
parsed = parseArgs(argv, adapters.parser);
|
|
@@ -353,7 +315,7 @@ export async function runCli(argv = process.argv.slice(2), adapters = {}) {
|
|
|
353
315
|
}
|
|
354
316
|
const command = resolveCommand(options.target);
|
|
355
317
|
if (!command) throw new Error(`No handler is registered for ${options.target}.`);
|
|
356
|
-
const handler = createHandlers({ io, env, exec: adapters.exec }).get(command.handler);
|
|
318
|
+
const handler = createHandlers({ io, env, exec: adapters.exec, prepare: adapters.prepare }).get(command.handler);
|
|
357
319
|
if (!handler) throw new Error(`No implementation is registered for ${command.name}.`);
|
|
358
320
|
return await handler(options);
|
|
359
321
|
}
|
|
@@ -23,16 +23,16 @@ export const commandRegistry = Object.freeze([
|
|
|
23
23
|
command("both", { scaffold: [""] }),
|
|
24
24
|
command("init", { preferred: [""], scaffold: [""] }),
|
|
25
25
|
command("config", { scaffold: [" --language de"] }),
|
|
26
|
-
command("doctor", {
|
|
27
|
-
command("gate-check", {
|
|
28
|
-
command("delivery-map", { scaffold: [""] }),
|
|
26
|
+
command("doctor", { local: [""], scaffold: [""], legacy: [" --json"] }),
|
|
27
|
+
command("gate-check", { local: [" --approval-envelope", " --json"], scaffold: [""], legacy: [" --json"] }),
|
|
28
|
+
command("delivery-map", { local: [" --json"], scaffold: [""] }),
|
|
29
29
|
command("delivery-path-search", {
|
|
30
|
-
|
|
30
|
+
local: [" --surface codex --json", " --surface claude --json"],
|
|
31
31
|
scaffold: [" --surface codex", " --surface claude"],
|
|
32
32
|
}),
|
|
33
|
-
command("run-create", {
|
|
34
|
-
command("run-migrate", {
|
|
35
|
-
command("run-render-legacy", {
|
|
33
|
+
command("run-create", { local: [" --run <run_id>"] }),
|
|
34
|
+
command("run-migrate", { local: [" [--run <run_id>]"] }),
|
|
35
|
+
command("run-render-legacy", { local: [" --run <run_id>"] }),
|
|
36
36
|
]);
|
|
37
37
|
|
|
38
38
|
const commandByName = new Map(commandRegistry.map((entry) => [entry.name, entry]));
|
|
@@ -87,13 +87,11 @@ Operating model:
|
|
|
87
87
|
The CLI validates, renders deterministic gate output and supports automation.
|
|
88
88
|
|
|
89
89
|
Repeated local validation (after global installation):
|
|
90
|
-
|
|
91
|
-
agdf gate-check --approval-envelope
|
|
92
|
-
agdf gate-check --json
|
|
90
|
+
${usageLines("local", "agdf ")}
|
|
93
91
|
|
|
94
92
|
Bootstrap, installation and explicit refresh:
|
|
95
93
|
|
|
96
|
-
|
|
94
|
+
Bootstrap and lifecycle commands:
|
|
97
95
|
${usageLines("preferred", "npx --yes @agdf/cli@latest ")}
|
|
98
96
|
|
|
99
97
|
Advanced / Compatibility
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
buildStatusCard,
|
|
3
|
+
evaluateGateCheck,
|
|
4
|
+
printApprovalEnvelope,
|
|
5
|
+
postApprovalTransition,
|
|
6
|
+
printGateCheckReport,
|
|
7
|
+
} from "../control-evaluation/gate-check.js";
|
|
8
|
+
import { evaluateDeliveryMap, printDeliveryMapReport } from "../control-evaluation/delivery-map.js";
|
|
9
|
+
import { evaluateDoctor, printDoctorReport } from "../control-evaluation/doctor.js";
|
|
10
|
+
import { executeDeliveryPathSearch } from "./delivery-path-search-command.js";
|
|
11
|
+
|
|
12
|
+
const deliveryMapDependencies = Object.freeze({ evaluateDoctor, buildStatusCard, postApprovalTransition });
|
|
13
|
+
|
|
14
|
+
export function createValidationHandlers(io = console) {
|
|
15
|
+
return new Map([
|
|
16
|
+
["doctor", (options) => {
|
|
17
|
+
const report = evaluateDoctor(options.dir, options);
|
|
18
|
+
printDoctorReport(report, options.json, io);
|
|
19
|
+
return report.status === "block" ? 2 : 0;
|
|
20
|
+
}],
|
|
21
|
+
["gate-check", (options) => {
|
|
22
|
+
const report = evaluateGateCheck(options.dir, options);
|
|
23
|
+
if (options.approvalEnvelope) {
|
|
24
|
+
const output = printApprovalEnvelope(report, { io, reEvaluate: () => evaluateGateCheck(options.dir, options) });
|
|
25
|
+
return output.status === "blocked" ? 2 : 0;
|
|
26
|
+
}
|
|
27
|
+
const presentationRendered = printGateCheckReport(report, options.json, options.statusCard, io);
|
|
28
|
+
if (presentationRendered === false) return 2;
|
|
29
|
+
return report.status === "blocked" ? 2 : 0;
|
|
30
|
+
}],
|
|
31
|
+
["delivery-map", (options) => {
|
|
32
|
+
const report = evaluateDeliveryMap(options.dir, options, deliveryMapDependencies);
|
|
33
|
+
printDeliveryMapReport(report, options.json, io);
|
|
34
|
+
return report.status === "block" ? 2 : 0;
|
|
35
|
+
}],
|
|
36
|
+
["delivery-path-search", async (options) => {
|
|
37
|
+
try {
|
|
38
|
+
const result = await executeDeliveryPathSearch(options, io);
|
|
39
|
+
return result.status === "recommendation" ? 0 : 2;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
io.error(`Delivery Path Search failed: ${error.message}`);
|
|
42
|
+
return 2;
|
|
43
|
+
}
|
|
44
|
+
}],
|
|
45
|
+
]);
|
|
46
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs';
|
|
2
2
|
import { dirname, join } from 'node:path';
|
|
3
3
|
import { aggregate, resolveRuns, verifyLegacyProjection } from '../control-state/index.js';
|
|
4
|
-
import { doctorRequiredFiles } from '
|
|
4
|
+
import { doctorRequiredFiles } from './required-files.js';
|
|
5
5
|
import { analyzeDeliveryMap } from './delivery-map.js';
|
|
6
6
|
import { evaluateVerifiedChange } from './verified-change.js';
|
|
7
7
|
import { analyzeArtefactRoleConsistency, analyzeDurableGateArtefactConsistency, modeSliceDecision, readRunState } from './run-state.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { attachApprovalOrientationSnapshot, buildArtefactRefs, buildQualityReadiness,
|
|
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';
|
|
@@ -28,10 +28,10 @@ export function postApprovalTransition(missingApproval) {
|
|
|
28
28
|
const transitions = new Map([
|
|
29
29
|
["Approval: UR", {
|
|
30
30
|
next_gate_after_approval: "Brownfield Review",
|
|
31
|
-
allowed_after_approval: "Run Brownfield Review and
|
|
32
|
-
internal_next_step: "Brownfield Review and
|
|
33
|
-
next_user_gate: "
|
|
34
|
-
user_action_required: "
|
|
31
|
+
allowed_after_approval: "Run Brownfield Review and proportional routing as one internal operation; no user action is required now.",
|
|
32
|
+
internal_next_step: "Brownfield Review and proportional routing",
|
|
33
|
+
next_user_gate: "none",
|
|
34
|
+
user_action_required: "no",
|
|
35
35
|
}],
|
|
36
36
|
["Approval: PRD", {
|
|
37
37
|
next_gate_after_approval: "SD",
|
|
@@ -80,7 +80,7 @@ const BREADCRUMB_PATH_TEMPLATES = {
|
|
|
80
80
|
structured_delivery: ["UR", "PRD", "SD", "TP", "QA", "UAT"],
|
|
81
81
|
structured_slice: ["UR", "PRD", "SD", "TP", "QA", "UAT"],
|
|
82
82
|
verified_change: ["UR", "Verified Change", "OR"],
|
|
83
|
-
quick_task: ["UR", "
|
|
83
|
+
quick_task: ["UR", "Compact Delivery"],
|
|
84
84
|
block: ["UR", "Block"],
|
|
85
85
|
undecided: ["UR"],
|
|
86
86
|
};
|
|
@@ -102,11 +102,11 @@ function buildBreadcrumbPath(modeSliceDecision, currentGate, runState) {
|
|
|
102
102
|
return { gate, status: "open" };
|
|
103
103
|
}
|
|
104
104
|
if (gate === currentGate) return { gate, status: "current" };
|
|
105
|
-
if ((gate === "Verified Change" || gate === "
|
|
105
|
+
if ((gate === "Verified Change" || gate === "Compact Delivery") && currentGate === "OR")
|
|
106
106
|
return { gate, status: "fulfilled" };
|
|
107
107
|
if (gate === "Verified Change" && modeSliceDecision === "verified_change")
|
|
108
108
|
return { gate, status: "current" };
|
|
109
|
-
if (gate === "
|
|
109
|
+
if (gate === "Compact Delivery" && modeSliceDecision === "quick_task")
|
|
110
110
|
return { gate, status: "current" };
|
|
111
111
|
if (gate === "Block" && modeSliceDecision === "block")
|
|
112
112
|
return { gate, status: "current" };
|
|
@@ -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
|
-
|
|
396
|
-
|
|
397
|
-
|
|
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(
|
|
415
|
-
|
|
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
|
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { join } from "node:path";
|
|
2
|
+
|
|
3
|
+
export const doctorRequiredFiles = Object.freeze([
|
|
4
|
+
join(".agdf", "control", "AGDF_RUN.md"),
|
|
5
|
+
join(".agdf", "control", "MASTER_BACKLOG.md"),
|
|
6
|
+
join(".agdf", "control", "SOT_REGISTRY.md"),
|
|
7
|
+
join(".agdf", "control", "CONTEXT_GRAPH.md"),
|
|
8
|
+
join(".agdf", "control", "AGENT_QUALITY_CONTRACTS.json"),
|
|
9
|
+
]);
|