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.
- package/README.md +2 -2
- package/generated/.agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +12 -0
- package/generated/.agdf/control/templates/artefacts/PRD.md +40 -8
- package/generated/.agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +51 -0
- package/generated/.github/skills/README.md +1 -0
- package/generated/.github/skills/agdf-brownfield-analysis/SKILL.md +9 -0
- package/generated/.github/skills/agdf-clean-implementation-review/SKILL.md +18 -0
- package/generated/.github/skills/agdf-code-review/SKILL.md +17 -0
- package/generated/.github/skills/agdf-gate-check/SKILL.md +11 -18
- package/generated/.github/skills/agdf-interaction-locales.json +8 -0
- package/generated/.github/skills/agdf-qa-gate/SKILL.md +15 -5
- package/generated/.github/skills/agdf-release-or/SKILL.md +1 -1
- package/generated/.github/skills/agdf-task-plan-review/SKILL.md +33 -0
- package/generated/.github/skills/agdf-ux-intent-definition/SKILL.md +94 -0
- package/generated/.github/skills/contracts/gate-transition.md +25 -0
- package/generated/.github/skills/contracts/interaction.md +23 -0
- package/generated/.github/skills/contracts/quality.md +58 -1
- package/generated/.opencode/AGDF.md +6 -0
- package/generated/.opencode/README.md +1 -0
- package/generated/.opencode/agdf-interaction-locales.json +8 -0
- package/generated/.opencode/contracts/gate-transition.md +25 -0
- package/generated/.opencode/contracts/interaction.md +23 -0
- package/generated/.opencode/contracts/quality.md +58 -1
- package/generated/.opencode/skills/agdf-brownfield-analysis/SKILL.md +9 -0
- package/generated/.opencode/skills/agdf-clean-implementation-review/SKILL.md +18 -0
- package/generated/.opencode/skills/agdf-code-review/SKILL.md +17 -0
- package/generated/.opencode/skills/agdf-gate-check/SKILL.md +11 -18
- package/generated/.opencode/skills/agdf-qa-gate/SKILL.md +15 -5
- package/generated/.opencode/skills/agdf-release-or/SKILL.md +1 -1
- package/generated/.opencode/skills/agdf-task-plan-review/SKILL.md +33 -0
- package/generated/.opencode/skills/agdf-ux-intent-definition/SKILL.md +94 -0
- package/generated/AGENTS.md +6 -0
- package/generated/plugins/agdf/.claude-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/.codex-plugin/plugin.json +1 -1
- package/generated/plugins/agdf/control/templates/artefacts/BROWNFIELD_REVIEW.md +12 -0
- package/generated/plugins/agdf/control/templates/artefacts/PRD.md +40 -8
- package/generated/plugins/agdf/control/templates/artefacts/UX_INTENT_DEFINITION.md +51 -0
- package/generated/plugins/agdf/meta/agdf-agent-router.md +6 -0
- package/generated/plugins/agdf/meta/agdf-interaction-locales.json +8 -0
- package/generated/plugins/agdf/meta/agdf-plugin.definition.json +7 -1
- package/generated/plugins/agdf/meta/contracts/gate-transition.md +25 -0
- package/generated/plugins/agdf/meta/contracts/interaction.md +23 -0
- package/generated/plugins/agdf/meta/contracts/quality.md +58 -1
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-interaction-locales.json +8 -0
- package/generated/plugins/agdf/runtime/create-agdf/generated/plugins/agdf/meta/agdf-plugin.definition.json +7 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/cli/validation-handlers.js +2 -1
- package/generated/plugins/agdf/runtime/create-agdf/lib/control-evaluation/gate-check.js +16 -25
- package/generated/plugins/agdf/runtime/create-agdf/lib/interaction-presentation.js +80 -0
- package/generated/plugins/agdf/runtime/create-agdf/package.json +1 -1
- package/generated/plugins/agdf/runtime/runtime-manifest.json +2 -2
- package/generated/plugins/agdf/scripts/check-runtime-integrity.mjs +128 -6
- package/generated/plugins/agdf/skills/brownfield-analysis/SKILL.md +9 -0
- package/generated/plugins/agdf/skills/clean-implementation-review/SKILL.md +18 -0
- package/generated/plugins/agdf/skills/code-review/SKILL.md +17 -0
- package/generated/plugins/agdf/skills/gate-check/SKILL.md +11 -18
- package/generated/plugins/agdf/skills/qa-gate/SKILL.md +15 -5
- package/generated/plugins/agdf/skills/release-or/SKILL.md +1 -1
- package/generated/plugins/agdf/skills/task-plan-review/SKILL.md +33 -0
- package/generated/plugins/agdf/skills/ux-intent-definition/SKILL.md +94 -0
- package/generated/plugins/agdf/skills/ux-intent-definition/help.md +17 -0
- package/lib/cli/validation-handlers.js +2 -1
- package/lib/control-evaluation/gate-check.js +16 -25
- package/lib/installers/opencode.js +52 -4
- package/lib/interaction-presentation.js +80 -0
- package/lib/scaffold/plan.js +3 -0
- package/package.json +1 -1
|
@@ -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';
|
|
@@ -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
|
}
|
|
@@ -14,6 +14,7 @@ const globalOpenCodeSkillOwnershipMarker = "<!-- AGDF-GLOBAL-SKILL: ";
|
|
|
14
14
|
const globalOpenCodeInstructionsOwnershipMarker = "<!-- AGDF-GLOBAL-INSTRUCTIONS -->";
|
|
15
15
|
const globalOpenCodeRuntimeContractOwnershipMarker = "<!-- AGDF-GLOBAL-RUNTIME-CONTRACT -->";
|
|
16
16
|
const globalOpenCodeValidatorOwnershipMarker = "// AGDF-GLOBAL-LOCAL-VALIDATOR";
|
|
17
|
+
const globalOpenCodeValidatorPackageOwner = "create-agdf";
|
|
17
18
|
const testNpmCliPath = process.env.NODE_ENV === "test" ? process.env.AGDF_TEST_NPM_CLI_PATH || "" : "";
|
|
18
19
|
const npmCommand = testNpmCliPath ? process.execPath : process.platform === "win32" ? process.execPath : "npm";
|
|
19
20
|
const npmPrefixArgs = testNpmCliPath ? [testNpmCliPath] : process.platform === "win32" ? [join(dirname(process.execPath), "node_modules", "npm", "bin", "npm-cli.js")] : [];
|
|
@@ -74,16 +75,23 @@ export function installOpenCodeGlobalPlugin(configDir) {
|
|
|
74
75
|
nextConfig.instructions = [...(nextConfig.instructions ?? [])];
|
|
75
76
|
if (!nextConfig.instructions.includes("AGDF.md")) nextConfig.instructions.push("AGDF.md");
|
|
76
77
|
|
|
78
|
+
const canonicalPermissions = pluginDefinition.opencode.permissions;
|
|
77
79
|
if (nextConfig.permission === undefined) {
|
|
78
|
-
nextConfig.permission =
|
|
80
|
+
nextConfig.permission = JSON.parse(JSON.stringify(canonicalPermissions));
|
|
79
81
|
} else if (nextConfig.permission && typeof nextConfig.permission === "object" && !Array.isArray(nextConfig.permission)) {
|
|
80
82
|
nextConfig.permission = { ...nextConfig.permission };
|
|
81
|
-
|
|
83
|
+
for (const permissionName of ["question", "edit", "bash"]) {
|
|
84
|
+
if (nextConfig.permission[permissionName] === undefined) {
|
|
85
|
+
nextConfig.permission[permissionName] = canonicalPermissions[permissionName];
|
|
86
|
+
}
|
|
87
|
+
}
|
|
82
88
|
if (nextConfig.permission.skill === undefined) {
|
|
83
|
-
nextConfig.permission.skill = {
|
|
89
|
+
nextConfig.permission.skill = { ...canonicalPermissions.skill };
|
|
84
90
|
} else if (nextConfig.permission.skill && typeof nextConfig.permission.skill === "object" && !Array.isArray(nextConfig.permission.skill)) {
|
|
85
91
|
nextConfig.permission.skill = { ...nextConfig.permission.skill };
|
|
86
|
-
|
|
92
|
+
for (const [skillPattern, decision] of Object.entries(canonicalPermissions.skill)) {
|
|
93
|
+
if (nextConfig.permission.skill[skillPattern] === undefined) nextConfig.permission.skill[skillPattern] = decision;
|
|
94
|
+
}
|
|
87
95
|
}
|
|
88
96
|
}
|
|
89
97
|
|
|
@@ -122,9 +130,35 @@ function globalOpenCodeConfigPaths(configDir) {
|
|
|
122
130
|
contracts: join(configDir, "contracts"),
|
|
123
131
|
skills: join(configDir, "skills"),
|
|
124
132
|
localValidator: join(configDir, "agdf", "bin", "agdf-local.js"),
|
|
133
|
+
localValidatorPackage: join(configDir, "agdf", "package.json"),
|
|
125
134
|
};
|
|
126
135
|
}
|
|
127
136
|
|
|
137
|
+
function readGlobalOpenCodeValidatorPackage(path) {
|
|
138
|
+
if (!existsSync(path)) return null;
|
|
139
|
+
let existing;
|
|
140
|
+
try {
|
|
141
|
+
existing = JSON.parse(readFileSync(path, "utf8"));
|
|
142
|
+
} catch {
|
|
143
|
+
return null;
|
|
144
|
+
}
|
|
145
|
+
return existing;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
function globalOpenCodeValidatorPackageIsValid(path) {
|
|
149
|
+
const manifest = readGlobalOpenCodeValidatorPackage(path);
|
|
150
|
+
return manifest?.type === "module"
|
|
151
|
+
&& manifest?.agdf?.owner === globalOpenCodeValidatorPackageOwner
|
|
152
|
+
&& manifest?.agdf?.surface === "opencode-global-validator";
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function assertGlobalOpenCodeValidatorPackageWritable(path) {
|
|
156
|
+
if (!existsSync(path)) return;
|
|
157
|
+
if (!globalOpenCodeValidatorPackageIsValid(path)) {
|
|
158
|
+
throw new Error(`Refusing to overwrite unowned global OpenCode validator package: ${path}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
128
162
|
function globalOpenCodeOwnershipMarkerIsValid(content, marker, placement) {
|
|
129
163
|
const lines = content.split(/\r?\n/);
|
|
130
164
|
if (placement === "first-line") return lines[0] === marker;
|
|
@@ -145,6 +179,7 @@ function assertGlobalOpenCodeSurfaceWritable(configDir) {
|
|
|
145
179
|
assertGlobalOpenCodeFileWritable(paths.instructions, globalOpenCodeInstructionsOwnershipMarker, "first-line");
|
|
146
180
|
assertGlobalOpenCodeFileWritable(paths.runtimeContract, globalOpenCodeRuntimeContractOwnershipMarker, "first-line");
|
|
147
181
|
assertGlobalOpenCodeFileWritable(paths.localValidator, globalOpenCodeValidatorOwnershipMarker, "first-line");
|
|
182
|
+
assertGlobalOpenCodeValidatorPackageWritable(paths.localValidatorPackage);
|
|
148
183
|
for (const moduleName of contractModules) {
|
|
149
184
|
assertGlobalOpenCodeFileWritable(
|
|
150
185
|
join(paths.contracts, moduleName),
|
|
@@ -202,6 +237,7 @@ function toGlobalOpenCodeContent(content) {
|
|
|
202
237
|
}
|
|
203
238
|
|
|
204
239
|
export function installOpenCodeGlobalSurface(configDir) {
|
|
240
|
+
assertGlobalOpenCodeSurfaceWritable(configDir);
|
|
205
241
|
const paths = globalOpenCodeConfigPaths(configDir);
|
|
206
242
|
const generatedOpenCodeRoot = join(generatedRoot, ".opencode");
|
|
207
243
|
const generatedInstructions = readFileSync(join(generatedOpenCodeRoot, pluginDefinition.opencode.instructionsFileName), "utf8");
|
|
@@ -223,6 +259,16 @@ export function installOpenCodeGlobalSurface(configDir) {
|
|
|
223
259
|
writeOwnedGlobalOpenCodeFile(paths.instructions, globalInstructions, globalOpenCodeInstructionsOwnershipMarker, "first-line");
|
|
224
260
|
writeOwnedGlobalOpenCodeFile(paths.runtimeContract, globalRuntimeContract, globalOpenCodeRuntimeContractOwnershipMarker, "first-line");
|
|
225
261
|
writeOwnedGlobalOpenCodeFile(paths.localValidator, localValidator, globalOpenCodeValidatorOwnershipMarker, "first-line");
|
|
262
|
+
mkdirSync(dirname(paths.localValidatorPackage), { recursive: true });
|
|
263
|
+
writeFileSync(paths.localValidatorPackage, `${JSON.stringify({
|
|
264
|
+
name: "agdf-opencode-validator-runtime",
|
|
265
|
+
private: true,
|
|
266
|
+
type: "module",
|
|
267
|
+
agdf: {
|
|
268
|
+
owner: globalOpenCodeValidatorPackageOwner,
|
|
269
|
+
surface: "opencode-global-validator",
|
|
270
|
+
},
|
|
271
|
+
}, null, 2)}\n`, "utf8");
|
|
226
272
|
for (const moduleName of contractModules) {
|
|
227
273
|
const generatedModule = readFileSync(join(generatedOpenCodeRoot, "contracts", moduleName), "utf8");
|
|
228
274
|
writeOwnedGlobalOpenCodeFile(
|
|
@@ -249,6 +295,7 @@ export function installOpenCodeGlobalSurface(configDir) {
|
|
|
249
295
|
contracts: paths.contracts,
|
|
250
296
|
skills: paths.skills,
|
|
251
297
|
localValidator: paths.localValidator,
|
|
298
|
+
localValidatorPackage: paths.localValidatorPackage,
|
|
252
299
|
};
|
|
253
300
|
}
|
|
254
301
|
|
|
@@ -352,6 +399,7 @@ function evaluateGlobalOpenCodeSurface(configDir) {
|
|
|
352
399
|
&& contractCount === contractModules.length
|
|
353
400
|
&& skillCount === openCodeSkillNames.length
|
|
354
401
|
&& existsSync(paths.localValidator)
|
|
402
|
+
&& globalOpenCodeValidatorPackageIsValid(paths.localValidatorPackage)
|
|
355
403
|
&& validatorResolution.envelope.machine_validation === "owned_version_matched",
|
|
356
404
|
};
|
|
357
405
|
}
|
|
@@ -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("&", "&")
|
|
277
|
+
.replaceAll("<", "<")
|
|
278
|
+
.replaceAll(">", ">")
|
|
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 = [
|
package/lib/scaffold/plan.js
CHANGED
|
@@ -30,6 +30,7 @@ const codexPluginFiles = [
|
|
|
30
30
|
join("plugins", "agdf", "control", "templates", "artefacts", "BROWNFIELD_REVIEW.md"),
|
|
31
31
|
join("plugins", "agdf", "control", "templates", "artefacts", "VERIFIED_CHANGE.md"),
|
|
32
32
|
join("plugins", "agdf", "control", "templates", "artefacts", "PRD.md"),
|
|
33
|
+
join("plugins", "agdf", "control", "templates", "artefacts", "UX_INTENT_DEFINITION.md"),
|
|
33
34
|
join("plugins", "agdf", "control", "templates", "artefacts", "SD.md"),
|
|
34
35
|
join("plugins", "agdf", "control", "templates", "artefacts", "TP.md"),
|
|
35
36
|
join("plugins", "agdf", "control", "templates", "artefacts", "QA_REPORT.md"),
|
|
@@ -56,6 +57,7 @@ const controlFiles = [
|
|
|
56
57
|
join(".agdf", "control", "templates", "artefacts", "BROWNFIELD_REVIEW.md"),
|
|
57
58
|
join(".agdf", "control", "templates", "artefacts", "VERIFIED_CHANGE.md"),
|
|
58
59
|
join(".agdf", "control", "templates", "artefacts", "PRD.md"),
|
|
60
|
+
join(".agdf", "control", "templates", "artefacts", "UX_INTENT_DEFINITION.md"),
|
|
59
61
|
join(".agdf", "control", "templates", "artefacts", "SD.md"),
|
|
60
62
|
join(".agdf", "control", "templates", "artefacts", "TP.md"),
|
|
61
63
|
join(".agdf", "control", "templates", "artefacts", "QA_REPORT.md"),
|
|
@@ -88,6 +90,7 @@ const artefactTemplateFiles = [
|
|
|
88
90
|
join(".agdf", "control", "templates", "artefacts", "BROWNFIELD_REVIEW.md"),
|
|
89
91
|
join(".agdf", "control", "templates", "artefacts", "VERIFIED_CHANGE.md"),
|
|
90
92
|
join(".agdf", "control", "templates", "artefacts", "PRD.md"),
|
|
93
|
+
join(".agdf", "control", "templates", "artefacts", "UX_INTENT_DEFINITION.md"),
|
|
91
94
|
join(".agdf", "control", "templates", "artefacts", "SD.md"),
|
|
92
95
|
join(".agdf", "control", "templates", "artefacts", "TP.md"),
|
|
93
96
|
join(".agdf", "control", "templates", "artefacts", "QA_REPORT.md"),
|
package/package.json
CHANGED