create-agdf 0.8.1 → 0.8.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/bin/create-agdf.js +96 -2
- package/generated/.github/skills/agdf-gate-check/SKILL.md +25 -14
- package/generated/.github/skills/agdf-interaction-locales.json +42 -0
- package/generated/.github/skills/agdf-qa-gate/SKILL.md +7 -0
- package/generated/.github/skills/agdf-runtime-contract.md +68 -16
- package/generated/.opencode/AGDF.md +4 -4
- package/generated/.opencode/agdf-interaction-locales.json +42 -0
- package/generated/.opencode/agdf-runtime-contract.md +68 -16
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +25 -14
- package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +7 -0
- package/generated/AGENTS.md +4 -4
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/meta/agdf-agent-router.md +4 -4
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +42 -0
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +17 -8
- package/generated/plugins/agdf/meta/agdf-runtime-contract.md +68 -16
- package/generated/plugins/agdf/skills/delivery-path-search/help.md +21 -3
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +25 -14
- package/generated/plugins/agdf/skills/qa-gate/SKILL.md +7 -0
- package/lib/interaction-presentation.js +153 -1
- package/package.json +1 -1
package/bin/create-agdf.js
CHANGED
|
@@ -26,7 +26,10 @@ import {
|
|
|
26
26
|
verifyLegacyProjection,
|
|
27
27
|
} from "../lib/control-state/index.js";
|
|
28
28
|
import {
|
|
29
|
+
attachApprovalOrientationSnapshot,
|
|
29
30
|
buildArtefactRefs,
|
|
31
|
+
buildRunCandidates,
|
|
32
|
+
buildQualityReadiness,
|
|
30
33
|
canonicalizeLanguageTag,
|
|
31
34
|
formatArtefactRefs,
|
|
32
35
|
gateTitle,
|
|
@@ -59,7 +62,7 @@ const agdfFragmentPath = "AGENTS.agdf.md";
|
|
|
59
62
|
const openCodeConfigFragmentPath = "opencode.agdf.json";
|
|
60
63
|
const userGateOrder = ["UR", "PRD", "SD", "TP", "QA", "UAT"];
|
|
61
64
|
const durableGateArtefacts = new Set(["UR", "PRD", "SD", "TP", "QA"]);
|
|
62
|
-
const internalStepArtefacts = new Set(["Brownfield Review", "Verified Change", "Brownfield Analysis", "CD+Tests", "CR"]);
|
|
65
|
+
const internalStepArtefacts = new Set(["Brownfield Review", "Verified Change", "Brownfield Analysis", "CD+Tests", "TP Review", "Clean Implementation Review", "Clean Review", "CR", "Code Review"]);
|
|
63
66
|
const deliveryRelationships = [
|
|
64
67
|
{ from: "UR", relationship: "approved_by", to: "Approval: UR", requiredBy: "UR" },
|
|
65
68
|
{ from: "PRD", relationship: "derived_from", to: "UR", requiredBy: "PRD" },
|
|
@@ -1916,6 +1919,7 @@ function readRunState(targetDir, selection = {}) {
|
|
|
1916
1919
|
let runPath = join(".agdf", "control", "AGDF_RUN.md");
|
|
1917
1920
|
const canonicalRoot = join(targetDir, ".agdf", "control", "runs");
|
|
1918
1921
|
let resolutionError;
|
|
1922
|
+
let candidateRuns = [];
|
|
1919
1923
|
if (existsSync(canonicalRoot)) {
|
|
1920
1924
|
try {
|
|
1921
1925
|
const selected = resolveRuns(targetDir, {
|
|
@@ -1927,6 +1931,21 @@ function readRunState(targetDir, selection = {}) {
|
|
|
1927
1931
|
: selected.run.path;
|
|
1928
1932
|
} catch (error) {
|
|
1929
1933
|
resolutionError = error.message;
|
|
1934
|
+
if (resolutionError.startsWith("AGDF_ACTIVE_RUN_AMBIGUOUS")) {
|
|
1935
|
+
const active = resolveRuns(targetDir, { allActive: true }).runs.map((run) => {
|
|
1936
|
+
const controlState = parseControlState(run.content, {
|
|
1937
|
+
userGates: userGateOrder,
|
|
1938
|
+
internalSteps: [...internalStepArtefacts],
|
|
1939
|
+
});
|
|
1940
|
+
return {
|
|
1941
|
+
...run,
|
|
1942
|
+
control_state: controlState,
|
|
1943
|
+
current_artefact_heading: readArtefactHeading(targetDir, controlState.artefacts.get(controlState.current_gate)),
|
|
1944
|
+
ur_heading: readArtefactHeading(targetDir, controlState.artefacts.get("UR")),
|
|
1945
|
+
};
|
|
1946
|
+
});
|
|
1947
|
+
candidateRuns = buildRunCandidates(active);
|
|
1948
|
+
}
|
|
1930
1949
|
}
|
|
1931
1950
|
}
|
|
1932
1951
|
if (resolutionError || !existsSync(join(targetDir, runPath))) {
|
|
@@ -1946,6 +1965,7 @@ function readRunState(targetDir, selection = {}) {
|
|
|
1946
1965
|
quality_outlook: "",
|
|
1947
1966
|
source_scope: {},
|
|
1948
1967
|
memory: {},
|
|
1968
|
+
candidate_runs: candidateRuns,
|
|
1949
1969
|
resolution_error: resolutionError,
|
|
1950
1970
|
};
|
|
1951
1971
|
}
|
|
@@ -2263,6 +2283,36 @@ function buildStatusCard({
|
|
|
2263
2283
|
};
|
|
2264
2284
|
}
|
|
2265
2285
|
|
|
2286
|
+
function statusFromReviewArtefact(artefact) {
|
|
2287
|
+
if (!artefact) return "unknown";
|
|
2288
|
+
const text = `${artefact.status ?? ""} ${artefact.notes ?? ""}`.toLowerCase();
|
|
2289
|
+
for (const status of ["block", "revise", "warn", "pass"]) {
|
|
2290
|
+
if (new RegExp(`\\b${status}(?:ed)?\\b`).test(text)) return status;
|
|
2291
|
+
}
|
|
2292
|
+
return "unknown";
|
|
2293
|
+
}
|
|
2294
|
+
|
|
2295
|
+
function qualityReadinessForRunState(runState, nextAction) {
|
|
2296
|
+
const artefacts = runState.artefacts;
|
|
2297
|
+
const plan = artefacts.get("TP Review");
|
|
2298
|
+
const clean = artefacts.get("Clean Implementation Review") ?? artefacts.get("Clean Review");
|
|
2299
|
+
const code = artefacts.get("CR") ?? artefacts.get("Code Review");
|
|
2300
|
+
const qa = artefacts.get("QA");
|
|
2301
|
+
if (![plan, clean, code, qa].some(Boolean)) return null;
|
|
2302
|
+
const reviewRows = [plan, clean, code, qa].filter(Boolean);
|
|
2303
|
+
const decisive = reviewRows.find((artefact) => /\b(?:block|revise)\b/i.test(`${artefact.status ?? ""} ${artefact.notes ?? ""}`));
|
|
2304
|
+
const readiness = buildQualityReadiness({
|
|
2305
|
+
planCoverage: statusFromReviewArtefact(plan),
|
|
2306
|
+
solutionIntegrity: statusFromReviewArtefact(clean),
|
|
2307
|
+
codeQuality: statusFromReviewArtefact(code),
|
|
2308
|
+
qaDecision: statusFromReviewArtefact(qa),
|
|
2309
|
+
decisiveReason: decisive?.notes ?? "",
|
|
2310
|
+
nextAction,
|
|
2311
|
+
});
|
|
2312
|
+
if (!readiness) return null;
|
|
2313
|
+
return Object.freeze({ ...readiness, decisive_reference: decisive?.path ?? "" });
|
|
2314
|
+
}
|
|
2315
|
+
|
|
2266
2316
|
function resolvedArtefactFile(targetDir, rawPath) {
|
|
2267
2317
|
const normalizedPath = String(rawPath ?? "").replace(/^`|`$/g, "").trim();
|
|
2268
2318
|
if (!normalizedPath || isAbsolute(normalizedPath) || normalizedPath.includes("<") || normalizedPath.includes(">")) return "";
|
|
@@ -2333,6 +2383,10 @@ function isGateSatisfied(runState, gate) {
|
|
|
2333
2383
|
return isDurableGateArtefactSatisfied(runState, gate);
|
|
2334
2384
|
}
|
|
2335
2385
|
|
|
2386
|
+
function qaRevisionRequired(runState) {
|
|
2387
|
+
return gateArtefactStatus(runState, "QA").status === "revise";
|
|
2388
|
+
}
|
|
2389
|
+
|
|
2336
2390
|
function transitionDecisionForRunState(runState, verifiedChange = null) {
|
|
2337
2391
|
if (gateApprovalStatus(runState, "UR") === "approved" && !isGateSatisfied(runState, "UR")) return durableArtefactBlock("UR", "PRD");
|
|
2338
2392
|
|
|
@@ -2533,6 +2587,18 @@ function transitionDecisionForRunState(runState, verifiedChange = null) {
|
|
|
2533
2587
|
};
|
|
2534
2588
|
}
|
|
2535
2589
|
|
|
2590
|
+
if (qaRevisionRequired(runState)) {
|
|
2591
|
+
return {
|
|
2592
|
+
status: "open",
|
|
2593
|
+
current_gate: "QA",
|
|
2594
|
+
blocking_reason: "qa_revise_required",
|
|
2595
|
+
missing_approval: "none",
|
|
2596
|
+
allowed: ["revise the implementation against the QA findings", "refresh CD+Tests and mandatory reviews", "rerun QA with refreshed evidence"],
|
|
2597
|
+
forbidden: ["request QA approval", "request UAT approval", "release", "claim delivery readiness"],
|
|
2598
|
+
next_allowed_action: "Resolve the QA revise findings, refresh CD+Tests and reviews, then rerun QA. Do not request Approval: QA from a revise report.",
|
|
2599
|
+
};
|
|
2600
|
+
}
|
|
2601
|
+
|
|
2536
2602
|
if (gateApprovalStatus(runState, "QA") === "approved" && !isGateSatisfied(runState, "QA")) return durableArtefactBlock("QA", "UAT");
|
|
2537
2603
|
|
|
2538
2604
|
if (isGateSatisfied(runState, "QA") && !isGateSatisfied(runState, "UAT")) {
|
|
@@ -2638,8 +2704,20 @@ function evaluateGateCheck(targetDir, selection = {}) {
|
|
|
2638
2704
|
chatLanguage: presentationLocale,
|
|
2639
2705
|
findings: deliveryMap.findings,
|
|
2640
2706
|
});
|
|
2707
|
+
const humanPresentation = buildHumanPresentation(targetDir, runState, currentGate, presentationLocale);
|
|
2641
2708
|
Object.defineProperty(statusCard, "humanPresentation", {
|
|
2642
|
-
value:
|
|
2709
|
+
value: humanPresentation,
|
|
2710
|
+
enumerable: false,
|
|
2711
|
+
});
|
|
2712
|
+
attachApprovalOrientationSnapshot(statusCard, {
|
|
2713
|
+
ready: status === "open" && missingApproval === `Approval: ${currentGate}`,
|
|
2714
|
+
humanPresentation,
|
|
2715
|
+
revisionId: extractField(runState.content ?? "", "revision_id"),
|
|
2716
|
+
registry: interactionLocales,
|
|
2717
|
+
requestedLocale: presentationLocale,
|
|
2718
|
+
});
|
|
2719
|
+
Object.defineProperty(statusCard, "runState", {
|
|
2720
|
+
value: runState,
|
|
2643
2721
|
enumerable: false,
|
|
2644
2722
|
});
|
|
2645
2723
|
|
|
@@ -2658,6 +2736,7 @@ function evaluateGateCheck(targetDir, selection = {}) {
|
|
|
2658
2736
|
doctor_summary: doctorReport.summary,
|
|
2659
2737
|
evidence_refs: runState.evidence_refs,
|
|
2660
2738
|
quality_outlook: deriveQualityOutlook(runState, deliveryMap.findings),
|
|
2739
|
+
candidate_runs: runState.candidate_runs ?? [],
|
|
2661
2740
|
status_card: statusCard,
|
|
2662
2741
|
delivery_map: {
|
|
2663
2742
|
relationships: deliveryMap.relationships,
|
|
@@ -2695,6 +2774,21 @@ function printGateCheckStatusCard(report) {
|
|
|
2695
2774
|
console.log(`${labels.allowed}: ${primary.actions[card.current_gate] ?? primary.none}`);
|
|
2696
2775
|
console.log(`${labels.step}: ${primary.actions[card.current_gate] ?? primary.none}`);
|
|
2697
2776
|
console.log(`${labels.quality}: ${primary.quality}`);
|
|
2777
|
+
const readiness = qualityReadinessForRunState(card.runState, report.next_allowed_action);
|
|
2778
|
+
if (readiness) {
|
|
2779
|
+
const quality = localePack(interactionLocales, card.presentation_language).qualityReadiness;
|
|
2780
|
+
console.log("");
|
|
2781
|
+
console.log(`${quality.title}: ${primary.status[readiness.status] ?? readiness.status}`);
|
|
2782
|
+
for (const row of readiness.rows) {
|
|
2783
|
+
console.log(`${quality.rows[row.id]}: ${primary.status[row.status] ?? quality.unknown}`);
|
|
2784
|
+
}
|
|
2785
|
+
const reason = readiness.decisive_reason
|
|
2786
|
+
|| (readiness.status === "pass" ? primary.none : quality.fallbackReasons[readiness.decisive_dimension] || primary.none);
|
|
2787
|
+
console.log(`${quality.reason}: ${reason}`);
|
|
2788
|
+
if (readiness.status !== "pass" && readiness.decisive_reference) console.log(`${quality.reference}: ${readiness.decisive_reference}`);
|
|
2789
|
+
console.log(`${quality.nextAction}: ${readiness.next_action || primary.none}`);
|
|
2790
|
+
console.log(`${quality.decisionOwner}: ${quality.decisionOwnerValue}`);
|
|
2791
|
+
}
|
|
2698
2792
|
}
|
|
2699
2793
|
|
|
2700
2794
|
function printGateCheckReport(report, json, statusCard = false) {
|
|
@@ -62,16 +62,18 @@ For a ready `gate_approval`:
|
|
|
62
62
|
|
|
63
63
|
1. Resolve exactly one selected run and evaluate the current gate.
|
|
64
64
|
2. Confirm the required durable artefact is present and ready before presenting a question.
|
|
65
|
-
3.
|
|
66
|
-
4.
|
|
67
|
-
5.
|
|
68
|
-
6.
|
|
69
|
-
7.
|
|
70
|
-
8.
|
|
71
|
-
9.
|
|
72
|
-
10.
|
|
73
|
-
11.
|
|
74
|
-
12.
|
|
65
|
+
3. Build one immutable, non-authorizing presentation snapshot from the selected evaluated run and current revision identity.
|
|
66
|
+
4. Compose one Approval Orientation Envelope as one immediately preceding assistant message containing two distinct blocks. Render the compact localized approval-time Run Status Card first. It contains exactly selected run, readiness status, current gate, missing exact approval, one next action and quality outlook; omit raw keys, machine statuses, evidence, diagnostics and allowed/forbidden inventories.
|
|
67
|
+
5. In the same assistant message, render a separate localized Gate Transition Card second, immediately before any native question or exact-text fallback. It includes the deterministic human run title and `UR · PRD · SD · TP` links from the selected run. Never put either card only into the question, button description or hidden tool context. Do not invoke the native question tool until the complete two-card envelope is visible.
|
|
68
|
+
6. Compose the transition card as one human-readable gate title with `run_id`, one ready-for-decision line, one short approval-effect block and one short next-transition block. It must answer only: where am I, what does this decision do, and what happens next. Run and gate identity may anchor both cards; do not duplicate status rows, action inventories or the native question.
|
|
69
|
+
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
|
+
8. Ask exactly one question that names the selected `run_id` and `current_gate`.
|
|
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.
|
|
73
|
+
11. Render both cards once in that single complete assistant message. If the native attempt is unavailable or not applied, continue to exact text without repeating either card.
|
|
74
|
+
12. Re-run gate evaluation for the same run and expected gate after the response and immediately before persistence.
|
|
75
|
+
13. Reject a missing artefact, ambiguous or wrong run, wrong gate, stale expected gate, timeout/default, hook-supplied answer, agent message, technical permission outcome or plan approval.
|
|
76
|
+
14. Persist accepted input only through the existing control-state workflow.
|
|
75
77
|
|
|
76
78
|
Before composing the question, resolve the configured chat locale from `.agdf/control/config.json` through `../agdf-interaction-locales.json`: exact complete pack, language subtag, then English fallback. German and English are initial packs, not a closed language list. Keep `Approval: <GateName>` exactly unchanged in every language, and do not mix presentation languages within one interaction. Labels and descriptions use the same resolved locale; host-owned UI chrome remains host-owned and may use a different language.
|
|
77
79
|
|
|
@@ -84,6 +86,13 @@ apply or safely return the native question on that attempt, switch immediately
|
|
|
84
86
|
to the exact textual approval. Do not ask the user to request the buttons again
|
|
85
87
|
and do not create a retry loop or simulated control.
|
|
86
88
|
|
|
89
|
+
State the outcome visibly: `presented`, `unavailable_before_invocation`,
|
|
90
|
+
`attempted_not_applied` or `unsafe_to_wait`. For every fallback, say in the
|
|
91
|
+
configured locale why a native control was not usable, show the exact approval
|
|
92
|
+
value and confirm that authority is unchanged. This transient outcome is not
|
|
93
|
+
approval evidence. A new explicit user request may reopen the unchanged decision
|
|
94
|
+
only after fresh run/gate/artefact revalidation; never retry automatically.
|
|
95
|
+
|
|
87
96
|
Surface behavior:
|
|
88
97
|
|
|
89
98
|
- 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.
|
|
@@ -184,10 +193,12 @@ Keep the result short and operational. Render the Runtime Contract's compact hum
|
|
|
184
193
|
|
|
185
194
|
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.
|
|
186
195
|
|
|
187
|
-
This operational status table
|
|
188
|
-
immediately requests a ready gate approval,
|
|
189
|
-
|
|
190
|
-
|
|
196
|
+
This complete operational status table remains the status-reporting and detail
|
|
197
|
+
surface. When the same response immediately requests a ready gate approval,
|
|
198
|
+
render its six-field compact approval-time projection first, then the Gate
|
|
199
|
+
Transition Card in the same immediately preceding assistant message, then
|
|
200
|
+
invoke exactly one native question or exact-text fallback. Both cards derive
|
|
201
|
+
from the same snapshot and are shown exactly once.
|
|
191
202
|
|
|
192
203
|
If this skill creates or updates control artefacts, do not paste full file bodies into the chat.
|
|
193
204
|
List paths, summarize the decision, name the blocker or approval needed, and keep the durable content in the files.
|
|
@@ -29,6 +29,27 @@
|
|
|
29
29
|
"forbidden": "Forbidden now",
|
|
30
30
|
"artefacts": "Artefacts"
|
|
31
31
|
},
|
|
32
|
+
"qualityReadiness": {
|
|
33
|
+
"title": "Quality Readiness",
|
|
34
|
+
"rows": {
|
|
35
|
+
"plan_coverage": "Plan coverage",
|
|
36
|
+
"solution_integrity": "Solution integrity",
|
|
37
|
+
"code_quality": "Code quality",
|
|
38
|
+
"qa_decision": "QA decision"
|
|
39
|
+
},
|
|
40
|
+
"reason": "Reason",
|
|
41
|
+
"reference": "Evidence report",
|
|
42
|
+
"nextAction": "Next action",
|
|
43
|
+
"decisionOwner": "Decision owner",
|
|
44
|
+
"decisionOwnerValue": "QA Gate",
|
|
45
|
+
"unknown": "evidence missing",
|
|
46
|
+
"fallbackReasons": {
|
|
47
|
+
"plan_coverage": "Plan coverage requires revision before QA can pass.",
|
|
48
|
+
"solution_integrity": "Solution integrity requires revision before QA can pass.",
|
|
49
|
+
"code_quality": "Code quality findings require revision before QA can pass.",
|
|
50
|
+
"qa_decision": "QA evidence requires revision before the gate can pass."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
32
53
|
"gateTitles": {
|
|
33
54
|
"UR": "User requirements",
|
|
34
55
|
"PRD": "Product requirements",
|
|
@@ -115,6 +136,27 @@
|
|
|
115
136
|
"forbidden": "Aktuell verboten",
|
|
116
137
|
"artefacts": "Artefakte"
|
|
117
138
|
},
|
|
139
|
+
"qualityReadiness": {
|
|
140
|
+
"title": "Quality Readiness",
|
|
141
|
+
"rows": {
|
|
142
|
+
"plan_coverage": "Planabdeckung",
|
|
143
|
+
"solution_integrity": "Lösungsintegrität",
|
|
144
|
+
"code_quality": "Code-Qualität",
|
|
145
|
+
"qa_decision": "QA-Entscheidung"
|
|
146
|
+
},
|
|
147
|
+
"reason": "Grund",
|
|
148
|
+
"reference": "Nachweisbericht",
|
|
149
|
+
"nextAction": "Nächste Aktion",
|
|
150
|
+
"decisionOwner": "Entscheidungsinstanz",
|
|
151
|
+
"decisionOwnerValue": "QA-Gate",
|
|
152
|
+
"unknown": "Nachweis fehlt",
|
|
153
|
+
"fallbackReasons": {
|
|
154
|
+
"plan_coverage": "Die Planabdeckung muss vor einem QA-Pass überarbeitet werden.",
|
|
155
|
+
"solution_integrity": "Die Lösungsintegrität muss vor einem QA-Pass überarbeitet werden.",
|
|
156
|
+
"code_quality": "Code-Qualitätsbefunde müssen vor einem QA-Pass überarbeitet werden.",
|
|
157
|
+
"qa_decision": "Die QA-Nachweise müssen vor einem QA-Pass überarbeitet werden."
|
|
158
|
+
}
|
|
159
|
+
},
|
|
118
160
|
"gateTitles": {
|
|
119
161
|
"UR": "Nutzeranforderungen",
|
|
120
162
|
"PRD": "Produktanforderungen",
|
|
@@ -28,6 +28,13 @@ QA-specific `decision` is exactly `pass | revise | block`.
|
|
|
28
28
|
`pass` is allowed only when TP coverage, Brownfield fit, solution integrity, and relevant documentation/Context Graph impact are sufficiently evidenced.
|
|
29
29
|
`sot_drift` must not pass silently as a warning.
|
|
30
30
|
|
|
31
|
+
When post-CD+Tests review evidence exists, present the Runtime Contract's derived Quality
|
|
32
|
+
Readiness projection before the detailed QA report: Plan coverage, Solution integrity, Code
|
|
33
|
+
quality and QA decision in that order. Name `agdf-qa-gate` as the sole decision owner, show one
|
|
34
|
+
decisive reason and one permissible next action, and keep detailed reports as evidence links or
|
|
35
|
+
on-demand detail. The projection is non-authorizing and must not replace the Run Status Card,
|
|
36
|
+
Gate Transition Card or the durable QA report.
|
|
37
|
+
|
|
31
38
|
## Rules
|
|
32
39
|
1. No QA pass without strong evidence.
|
|
33
40
|
2. TP is the reference, not merely working code.
|
|
@@ -145,15 +145,55 @@ and `Allowed after approval` when a missing approval exists, `Next step` and
|
|
|
145
145
|
`Quality outlook`. Keep mode, forbidden actions, evidence and next-skill detail
|
|
146
146
|
in the surrounding control artefact when they are relevant.
|
|
147
147
|
|
|
148
|
+
## Quality Readiness Projection
|
|
149
|
+
|
|
150
|
+
After CD+Tests, when any of the four review/QA artefacts exists, surfaces may show one compact
|
|
151
|
+
derived `Quality Readiness` projection. It answers the user-facing question "what is the current
|
|
152
|
+
quality outcome and what should happen next?" without replacing evidence or creating another
|
|
153
|
+
decision authority.
|
|
154
|
+
|
|
155
|
+
- It contains exactly four rows, in this order: `Plan coverage` from `agdf-task-plan-review`,
|
|
156
|
+
`Solution integrity` from `agdf-clean-implementation-review`, `Code quality` from `agdf-code-review`,
|
|
157
|
+
and `QA decision` from `agdf-qa-gate`.
|
|
158
|
+
- `agdf-qa-gate` is always labeled as the sole decision owner. The other three rows are evidence
|
|
159
|
+
dimensions, not competing pass/revise/block decisions.
|
|
160
|
+
- Overall status reuses canonical severity ordering. Missing or conflicting required evidence
|
|
161
|
+
must not render `pass`; surface `revise` or `block` with the decisive reason and one permitted
|
|
162
|
+
next action instead.
|
|
163
|
+
- The projection is derived, non-persistent and non-authorizing. It cannot accept an approval,
|
|
164
|
+
advance a gate, suppress a report or replace the Run Status Card, Gate Transition Card, JSON
|
|
165
|
+
projection or durable review artefacts.
|
|
166
|
+
- Show compact rows on `pass`. On `revise` or `block`, expand only the decisive row with its
|
|
167
|
+
canonical report reference; do not paste complete reports into chat.
|
|
168
|
+
|
|
148
169
|
## Gate Transition Card
|
|
149
170
|
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
171
|
+
Every ready `gate_approval` uses one fixed visible sequence: first the compact
|
|
172
|
+
approval-time Run Status Card, then the Gate Transition Card, then exactly one
|
|
173
|
+
native question or exact-text fallback. Both cards derive from one immutable,
|
|
174
|
+
non-authorizing presentation snapshot produced after canonical selected-run,
|
|
175
|
+
gate and durable-artefact readiness evaluation. The snapshot never selects a
|
|
176
|
+
run, decides a gate, persists state or grants approval.
|
|
177
|
+
|
|
178
|
+
The two distinct card blocks form one Approval Orientation Envelope in one
|
|
179
|
+
immediately preceding assistant message. The agent must complete that message
|
|
180
|
+
before invoking any native question tool or emitting an exact-text approval
|
|
181
|
+
request. Splitting the cards across separate assistant turns or invoking the
|
|
182
|
+
tool after only one card is a failed interaction, not a valid presentation.
|
|
183
|
+
|
|
184
|
+
The compact approval-time Run Status Card contains exactly six operational
|
|
185
|
+
fields: selected run, readiness status, current gate, missing exact approval,
|
|
186
|
+
one next action and quality outlook. It uses localized human-readable labels
|
|
187
|
+
and must not contain evidence, diagnostic codes, raw control-state keys,
|
|
188
|
+
allowed/forbidden inventories or machine values. The complete Run Status Card remains the operational,
|
|
189
|
+
CLI and audit projection and remains available for complete detail outside the
|
|
190
|
+
approval-time compact view.
|
|
191
|
+
|
|
192
|
+
The Gate Transition Card is the second orientation message. It is derived from
|
|
193
|
+
the same snapshot and canonical post-approval transition, but it is not another
|
|
194
|
+
state model, persisted record, renderer or approval authority. It turns only
|
|
195
|
+
the decision-relevant subset into concise product copy immediately before the
|
|
196
|
+
host-native question or exact-text fallback.
|
|
157
197
|
|
|
158
198
|
The card answers exactly three user questions, in this order:
|
|
159
199
|
|
|
@@ -189,11 +229,13 @@ for example, the German title may be `Lösungsdesign` while the authorization
|
|
|
189
229
|
value remains `Approval: SD`. Meaning, ordering and authority boundaries are
|
|
190
230
|
identical across locale packs.
|
|
191
231
|
|
|
192
|
-
The
|
|
232
|
+
The Gate Transition Card must not be a Markdown table or dashboard. It must not
|
|
193
233
|
present raw control-state keys, machine status values, diagnostic codes,
|
|
194
234
|
evidence lists, allowed/forbidden inventories or implementation detail that is
|
|
195
235
|
not needed for the decision. It must not repeat the native question. The card
|
|
196
236
|
normally fits in one title, one readiness line and two short content blocks.
|
|
237
|
+
Run and gate identity may appear in both cards to anchor the shared snapshot;
|
|
238
|
+
status rows, action inventories and transition prose must not be duplicated.
|
|
197
239
|
|
|
198
240
|
For `Approval: TP`, the effect is permission to run pre-implementation
|
|
199
241
|
Brownfield Analysis, implementation remains gated until that analysis passes,
|
|
@@ -359,19 +401,20 @@ response_origin: deliberate_user_input for gate_approval
|
|
|
359
401
|
This envelope is not a new persisted record. The selected canonical `RUN_STATE.md` and existing artefact chain remain the durable authority.
|
|
360
402
|
|
|
361
403
|
Before presenting `gate_approval` for any user gate (`UR`, `PRD`, `SD`, `TP`,
|
|
362
|
-
`QA`, or `UAT`), the agent must emit the localized
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
404
|
+
`QA`, or `UAT`), the agent must emit the compact localized Run Status Card and
|
|
405
|
+
the localized Gate Transition Card as two distinct blocks in that order within
|
|
406
|
+
one immediately preceding assistant message. Neither card is optional, hidden
|
|
407
|
+
in the question text or replaced by a host button label. Do not invoke the
|
|
408
|
+
native question tool until the complete two-card envelope is visible. Native
|
|
409
|
+
buttons or exact-text fallback may appear only after both cards. Render the two
|
|
410
|
+
cards once per eligible attempt; an unavailable or not-applied native control
|
|
411
|
+
proceeds to exact text without repeating them.
|
|
369
412
|
|
|
370
413
|
Before presenting `gate_approval`, the agent must:
|
|
371
414
|
|
|
372
415
|
1. resolve exactly one selected run;
|
|
373
416
|
2. run the canonical gate evaluation and confirm that the current gate's durable artefact is present and ready;
|
|
374
|
-
3. emit
|
|
417
|
+
3. build one immutable non-authorizing presentation snapshot, emit its compact Run Status Card and Gate Transition Card in that order immediately before the gate question, then ask exactly one gate question that identifies `run_id` and `current_gate` and offers the exact approving value `Approval: <GateName>` followed by stable `revise` and `decline` outcomes; host-owned dismissal maps to `cancel` where only three choices are available;
|
|
375
418
|
4. wait for deliberate user input without a timeout, default, preselection, hook-supplied answer or agent-to-agent substitute;
|
|
376
419
|
5. re-run canonical gate evaluation against the same `run_id` and expected gate immediately before persistence;
|
|
377
420
|
6. reject missing evidence, ambiguous or wrong run, wrong gate, stale state and any response that is no longer valid;
|
|
@@ -382,6 +425,15 @@ host control is presented, or the agent immediately uses the exact-text
|
|
|
382
425
|
fallback. A host that does not apply the control does not trigger a second
|
|
383
426
|
native prompt. AGDF must not simulate or force host-owned presentation.
|
|
384
427
|
|
|
428
|
+
An eligible interaction must make its presentation outcome visible and
|
|
429
|
+
distinguishable: `presented`, `unavailable_before_invocation`,
|
|
430
|
+
`attempted_not_applied`, or `unsafe_to_wait`. This is transient presentation
|
|
431
|
+
evidence only, never a persisted approval, selected-run authority or substitute
|
|
432
|
+
for post-response revalidation. A textual fallback names the outcome, gives the
|
|
433
|
+
exact approval value and confirms that authority is unchanged. A fresh explicit
|
|
434
|
+
user request may reopen the unchanged decision after revalidation; it is not an
|
|
435
|
+
automatic retry.
|
|
436
|
+
|
|
385
437
|
A free-form native response is valid only when the existing exact-approval validator accepts it for the current gate after revalidation. A localized label, description, option position, recommendation style or host action never authorizes a gate. Revise, decline and cancel outcomes never advance a gate.
|
|
386
438
|
|
|
387
439
|
Surface adapter rules:
|
|
@@ -51,13 +51,13 @@ Structured Delivery Mode must respect gates, reviews and closeout discipline.
|
|
|
51
51
|
|---|---|---|
|
|
52
52
|
| `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
53
|
| `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 |
|
|
54
|
-
| `agdf-clean-implementation-review` | inspect
|
|
55
|
-
| `agdf-code-review` |
|
|
54
|
+
| `agdf-clean-implementation-review` | evidence dimension: inspect whether the solution is structurally clean | supports Quality Readiness; not a TP or QA substitute |
|
|
55
|
+
| `agdf-code-review` | evidence dimension: review the actual diff for defects, regression and security findings | supports Quality Readiness; does not replace QA |
|
|
56
56
|
| `agdf-delivery-closeout` | commit/PR-near handoff after QA/OR/UAT | never performs VCS actions automatically |
|
|
57
57
|
| `agdf-gate-check` | new build/change intent, unclear approval, Structured Delivery, later-gate artefact requested | does not create later artefacts or skip Mode/Slice Decision after Brownfield Review |
|
|
58
|
-
| `agdf-qa-gate` | final
|
|
58
|
+
| `agdf-qa-gate` | sole final Quality Readiness decision | only instance for `pass | revise | block` |
|
|
59
59
|
| `agdf-release-or` | auditable closeout for every relevant run | not a QA substitute |
|
|
60
|
-
| `agdf-task-plan-review` |
|
|
60
|
+
| `agdf-task-plan-review` | evidence dimension: verify whether the approved Task Plan was fulfilled | supports Quality Readiness; no final QA decision |
|
|
61
61
|
|
|
62
62
|
Select exactly one primary skill first.
|
|
63
63
|
Add more only when they cover a distinct concrete risk dimension.
|
|
@@ -29,6 +29,27 @@
|
|
|
29
29
|
"forbidden": "Forbidden now",
|
|
30
30
|
"artefacts": "Artefacts"
|
|
31
31
|
},
|
|
32
|
+
"qualityReadiness": {
|
|
33
|
+
"title": "Quality Readiness",
|
|
34
|
+
"rows": {
|
|
35
|
+
"plan_coverage": "Plan coverage",
|
|
36
|
+
"solution_integrity": "Solution integrity",
|
|
37
|
+
"code_quality": "Code quality",
|
|
38
|
+
"qa_decision": "QA decision"
|
|
39
|
+
},
|
|
40
|
+
"reason": "Reason",
|
|
41
|
+
"reference": "Evidence report",
|
|
42
|
+
"nextAction": "Next action",
|
|
43
|
+
"decisionOwner": "Decision owner",
|
|
44
|
+
"decisionOwnerValue": "QA Gate",
|
|
45
|
+
"unknown": "evidence missing",
|
|
46
|
+
"fallbackReasons": {
|
|
47
|
+
"plan_coverage": "Plan coverage requires revision before QA can pass.",
|
|
48
|
+
"solution_integrity": "Solution integrity requires revision before QA can pass.",
|
|
49
|
+
"code_quality": "Code quality findings require revision before QA can pass.",
|
|
50
|
+
"qa_decision": "QA evidence requires revision before the gate can pass."
|
|
51
|
+
}
|
|
52
|
+
},
|
|
32
53
|
"gateTitles": {
|
|
33
54
|
"UR": "User requirements",
|
|
34
55
|
"PRD": "Product requirements",
|
|
@@ -115,6 +136,27 @@
|
|
|
115
136
|
"forbidden": "Aktuell verboten",
|
|
116
137
|
"artefacts": "Artefakte"
|
|
117
138
|
},
|
|
139
|
+
"qualityReadiness": {
|
|
140
|
+
"title": "Quality Readiness",
|
|
141
|
+
"rows": {
|
|
142
|
+
"plan_coverage": "Planabdeckung",
|
|
143
|
+
"solution_integrity": "Lösungsintegrität",
|
|
144
|
+
"code_quality": "Code-Qualität",
|
|
145
|
+
"qa_decision": "QA-Entscheidung"
|
|
146
|
+
},
|
|
147
|
+
"reason": "Grund",
|
|
148
|
+
"reference": "Nachweisbericht",
|
|
149
|
+
"nextAction": "Nächste Aktion",
|
|
150
|
+
"decisionOwner": "Entscheidungsinstanz",
|
|
151
|
+
"decisionOwnerValue": "QA-Gate",
|
|
152
|
+
"unknown": "Nachweis fehlt",
|
|
153
|
+
"fallbackReasons": {
|
|
154
|
+
"plan_coverage": "Die Planabdeckung muss vor einem QA-Pass überarbeitet werden.",
|
|
155
|
+
"solution_integrity": "Die Lösungsintegrität muss vor einem QA-Pass überarbeitet werden.",
|
|
156
|
+
"code_quality": "Code-Qualitätsbefunde müssen vor einem QA-Pass überarbeitet werden.",
|
|
157
|
+
"qa_decision": "Die QA-Nachweise müssen vor einem QA-Pass überarbeitet werden."
|
|
158
|
+
}
|
|
159
|
+
},
|
|
118
160
|
"gateTitles": {
|
|
119
161
|
"UR": "Nutzeranforderungen",
|
|
120
162
|
"PRD": "Produktanforderungen",
|