@design-ai/cli 4.55.0 → 4.57.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/.claude-plugin/plugin.json +109 -25
- package/CHANGELOG.md +75 -0
- package/README.ko.md +15 -32
- package/README.md +18 -31
- package/cli/bin/design-ai.mjs +1 -0
- package/cli/commands/help.mjs +7 -4
- package/cli/commands/index.mjs +292 -0
- package/cli/commands/learn-help.mjs +149 -0
- package/cli/commands/learn-print-profile.mjs +373 -0
- package/cli/commands/learn-print-restore.mjs +349 -0
- package/cli/commands/learn-print-signals.mjs +453 -0
- package/cli/commands/learn.mjs +60 -1281
- package/cli/commands/pack.mjs +7 -3
- package/cli/commands/prompt.mjs +7 -3
- package/cli/commands/search.mjs +94 -1
- package/cli/lib/dispatch.mjs +3 -0
- package/cli/lib/embedding-index.mjs +199 -0
- package/cli/lib/embedding-provider.mjs +121 -0
- package/cli/lib/embedding-rerank.mjs +52 -0
- package/cli/lib/learn-args.mjs +490 -0
- package/cli/lib/learn-backup.mjs +748 -0
- package/cli/lib/learn-curation.mjs +612 -0
- package/cli/lib/learn-eval.mjs +459 -0
- package/cli/lib/learn-profile.mjs +763 -0
- package/cli/lib/learn-select.mjs +223 -0
- package/cli/lib/learn-shared.mjs +158 -0
- package/cli/lib/learn-test-support.mjs +218 -0
- package/cli/lib/learn-usage.mjs +360 -0
- package/cli/lib/learn.mjs +83 -3694
- package/cli/lib/lexical.mjs +137 -0
- package/cli/lib/local-config.mjs +110 -0
- package/cli/lib/mcp-server.mjs +221 -13
- package/cli/lib/pack.mjs +31 -4
- package/cli/lib/prompt.mjs +42 -4
- package/cli/lib/recall.mjs +193 -0
- package/cli/lib/retrieval-index.mjs +0 -0
- package/cli/lib/search-ranked.mjs +170 -0
- package/cli/lib/search.mjs +11 -1
- package/cli/lib/signals-backlog-commands.mjs +673 -0
- package/cli/lib/signals-backlog.mjs +361 -0
- package/cli/lib/signals-eval.mjs +176 -0
- package/cli/lib/signals-readiness.mjs +247 -0
- package/cli/lib/signals-registry.mjs +377 -0
- package/cli/lib/signals-render.mjs +478 -0
- package/cli/lib/signals-shared.mjs +75 -0
- package/cli/lib/signals.mjs +16 -2337
- package/cli/lib/site-analysis.mjs +297 -0
- package/cli/lib/site-args.mjs +433 -0
- package/cli/lib/site-bundle-build.mjs +127 -0
- package/cli/lib/site-bundle-check.mjs +454 -0
- package/cli/lib/site-bundle-commands.mjs +95 -0
- package/cli/lib/site-bundle-compare.mjs +157 -0
- package/cli/lib/site-bundle-contract.mjs +79 -0
- package/cli/lib/site-bundle-files.mjs +87 -0
- package/cli/lib/site-bundle-handoff-expected.mjs +173 -0
- package/cli/lib/site-bundle-handoff-runbook-action-summary.mjs +332 -0
- package/cli/lib/site-bundle-handoff-runbook-actions.mjs +113 -0
- package/cli/lib/site-bundle-handoff-runbook-evidence-fields.mjs +164 -0
- package/cli/lib/site-bundle-handoff-runbook-evidence.mjs +334 -0
- package/cli/lib/site-bundle-handoff-runbook-format.mjs +31 -0
- package/cli/lib/site-bundle-handoff-runbook-human-lines.mjs +167 -0
- package/cli/lib/site-bundle-handoff-runbook-maps.mjs +238 -0
- package/cli/lib/site-bundle-handoff-runbook-next-step.mjs +278 -0
- package/cli/lib/site-bundle-handoff-runbook-stage-metadata.mjs +84 -0
- package/cli/lib/site-bundle-handoff-runbook.mjs +444 -0
- package/cli/lib/site-bundle-handoff-summary.mjs +183 -0
- package/cli/lib/site-bundle-handoff.mjs +271 -0
- package/cli/lib/site-bundle-readme.mjs +98 -0
- package/cli/lib/site-bundle-repair-report.mjs +143 -0
- package/cli/lib/site-bundle-repair.mjs +68 -0
- package/cli/lib/site-content.mjs +399 -0
- package/cli/lib/site-evidence.mjs +35 -0
- package/cli/lib/site-mcp-commands.mjs +28 -0
- package/cli/lib/site-mcp-probes.mjs +159 -0
- package/cli/lib/site-mcp-readiness.mjs +157 -0
- package/cli/lib/site-mcp-report.mjs +324 -0
- package/cli/lib/site-next-actions.mjs +333 -0
- package/cli/lib/site-options.mjs +104 -0
- package/cli/lib/site-prompts.mjs +332 -0
- package/cli/lib/site-starter.mjs +153 -0
- package/cli/lib/site-strings.mjs +23 -0
- package/cli/lib/site-tasks.mjs +93 -0
- package/cli/lib/site-test-support.mjs +68 -0
- package/cli/lib/site-workflow-graph.mjs +309 -0
- package/cli/lib/site-workspace.mjs +492 -0
- package/cli/lib/site.mjs +108 -6617
- package/cli/lib/skill-proposals-apply-commands.mjs +135 -0
- package/cli/lib/skill-proposals-apply-contract.mjs +750 -0
- package/cli/lib/skill-proposals-apply-plan.mjs +118 -0
- package/cli/lib/skill-proposals-generate.mjs +298 -0
- package/cli/lib/skill-proposals-render.mjs +532 -0
- package/cli/lib/skill-proposals-review.mjs +262 -0
- package/cli/lib/skill-proposals.mjs +15 -2046
- package/cli/lib/workspace-args.mjs +83 -0
- package/cli/lib/workspace-git.mjs +169 -0
- package/cli/lib/workspace-learning.mjs +483 -0
- package/cli/lib/workspace-repo.mjs +139 -0
- package/cli/lib/workspace-report.mjs +283 -0
- package/cli/lib/workspace-test-support.mjs +99 -0
- package/cli/lib/workspace.mjs +30 -1056
- package/docs/AI-LEARNING-PHASE2.md +215 -0
- package/docs/DISTRIBUTION.ko.md +35 -6
- package/docs/DISTRIBUTION.md +35 -8
- package/docs/NEXT-SURFACE-DECISION.md +125 -0
- package/docs/PRODUCT-READINESS.md +3 -3
- package/docs/RELEASE-CHECKLIST.md +20 -3
- package/docs/RELEASE-GATES.ko.md +35 -0
- package/docs/RELEASE-GATES.md +234 -0
- package/docs/ROADMAP.md +2232 -8
- package/docs/external-status.md +20 -7
- package/docs/inspection-20260630.md +169 -0
- package/docs/integrations/design-ai-mcp-server.md +35 -3
- package/docs/integrations/vscode-walkthrough.ko.md +3 -3
- package/docs/integrations/vscode-walkthrough.md +3 -3
- package/docs/reference/ant-design.md +413 -0
- package/docs/reference/awesome-design-md.md +439 -0
- package/docs/reference/mui.md +783 -0
- package/docs/reference/shadcn-ui.md +298 -0
- package/docs/site-overrides/main.html +1 -1
- package/examples/component-accordion-actions.md +5 -5
- package/examples/component-accordion-details.md +5 -5
- package/examples/component-accordion-summary.md +5 -5
- package/examples/component-accordion.md +3 -3
- package/examples/component-affix.md +1 -1
- package/examples/component-alert-dialog.md +1 -1
- package/examples/component-alert-title.md +1 -1
- package/examples/component-alert.md +3 -3
- package/examples/component-anchor.md +1 -1
- package/examples/component-app-bar.md +1 -1
- package/examples/component-aspect-ratio.md +1 -1
- package/examples/component-auto-complete.md +2 -2
- package/examples/component-avatar-group.md +5 -5
- package/examples/component-avatar.md +3 -3
- package/examples/component-back-top.md +1 -1
- package/examples/component-backdrop.md +1 -1
- package/examples/component-badge.md +3 -3
- package/examples/component-border-beam.md +3 -3
- package/examples/component-bottom-navigation.md +1 -1
- package/examples/component-box.md +1 -1
- package/examples/component-breadcrumb.md +3 -3
- package/examples/component-button-base.md +3 -3
- package/examples/component-button-group.md +2 -2
- package/examples/component-button.md +3 -3
- package/examples/component-calendar.md +2 -2
- package/examples/component-card-actions.md +1 -1
- package/examples/component-card-content.md +1 -1
- package/examples/component-card-header.md +1 -1
- package/examples/component-card-media.md +1 -1
- package/examples/component-card.md +3 -3
- package/examples/component-carousel.md +2 -2
- package/examples/component-cascader.md +1 -1
- package/examples/component-chart.md +1 -1
- package/examples/component-checkbox.md +3 -3
- package/examples/component-click-away-listener.md +1 -1
- package/examples/component-code.md +1 -1
- package/examples/component-collapsible.md +1 -1
- package/examples/component-color-picker.md +1 -1
- package/examples/component-combobox.md +1 -1
- package/examples/component-command.md +1 -1
- package/examples/component-config-provider.md +3 -3
- package/examples/component-context-menu.md +1 -1
- package/examples/component-css-baseline.md +3 -3
- package/examples/component-date-picker.md +2 -2
- package/examples/component-descriptions.md +1 -1
- package/examples/component-dialog-actions.md +1 -1
- package/examples/component-dialog-content-text.md +1 -1
- package/examples/component-dialog-content.md +1 -1
- package/examples/component-dialog-title.md +1 -1
- package/examples/component-dialog.md +2 -2
- package/examples/component-divider.md +3 -3
- package/examples/component-drawer.md +3 -3
- package/examples/component-dropdown.md +3 -3
- package/examples/component-empty.md +2 -2
- package/examples/component-fade.md +1 -1
- package/examples/component-field.md +1 -1
- package/examples/component-filled-input.md +1 -1
- package/examples/component-flex.md +1 -1
- package/examples/component-float-button.md +2 -2
- package/examples/component-form-control-label.md +1 -1
- package/examples/component-form-control.md +1 -1
- package/examples/component-form-controls.md +1 -1
- package/examples/component-form-group.md +1 -1
- package/examples/component-form-helper-text.md +1 -1
- package/examples/component-form-label.md +1 -1
- package/examples/component-form.md +2 -2
- package/examples/component-grid.md +2 -2
- package/examples/component-grow.md +1 -1
- package/examples/component-hover-card.md +1 -1
- package/examples/component-icon-button.md +1 -1
- package/examples/component-icon.md +1 -1
- package/examples/component-image-list.md +1 -1
- package/examples/component-image.md +1 -1
- package/examples/component-input-adornment.md +1 -1
- package/examples/component-input-base.md +1 -1
- package/examples/component-input-number.md +1 -1
- package/examples/component-input-otp.md +2 -2
- package/examples/component-input.md +3 -3
- package/examples/component-item.md +1 -1
- package/examples/component-label.md +1 -1
- package/examples/component-layout.md +1 -1
- package/examples/component-link.md +1 -1
- package/examples/component-list-item-avatar.md +1 -1
- package/examples/component-list-item-button.md +1 -1
- package/examples/component-list-item-icon.md +1 -1
- package/examples/component-list-item-text.md +1 -1
- package/examples/component-list-item.md +1 -1
- package/examples/component-list-subheader.md +1 -1
- package/examples/component-list.md +2 -2
- package/examples/component-masonry.md +1 -1
- package/examples/component-mentions.md +1 -1
- package/examples/component-menu-item.md +1 -1
- package/examples/component-menu-list.md +1 -1
- package/examples/component-menu.md +1 -1
- package/examples/component-menubar.md +1 -1
- package/examples/component-message.md +1 -1
- package/examples/component-mobile-stepper.md +1 -1
- package/examples/component-modal.md +5 -5
- package/examples/component-navigation-menu.md +1 -1
- package/examples/component-notification.md +1 -1
- package/examples/component-outlined-input.md +1 -1
- package/examples/component-pagination.md +3 -3
- package/examples/component-paper.md +1 -1
- package/examples/component-popconfirm.md +1 -1
- package/examples/component-popover.md +3 -3
- package/examples/component-popper.md +1 -1
- package/examples/component-progress.md +2 -2
- package/examples/component-qr-code.md +1 -1
- package/examples/component-radio.md +3 -3
- package/examples/component-rate.md +2 -2
- package/examples/component-resizable.md +1 -1
- package/examples/component-result.md +1 -1
- package/examples/component-scroll-area.md +1 -1
- package/examples/component-segmented.md +3 -3
- package/examples/component-select.md +3 -3
- package/examples/component-separator.md +1 -1
- package/examples/component-sheet.md +1 -1
- package/examples/component-sidebar.md +1 -1
- package/examples/component-skeleton.md +3 -3
- package/examples/component-slide.md +1 -1
- package/examples/component-slider.md +3 -3
- package/examples/component-snackbar-content.md +1 -1
- package/examples/component-snackbar.md +1 -1
- package/examples/component-sonner.md +1 -1
- package/examples/component-space.md +1 -1
- package/examples/component-speed-dial-action.md +1 -1
- package/examples/component-speed-dial.md +1 -1
- package/examples/component-spin.md +2 -2
- package/examples/component-spinner.md +1 -1
- package/examples/component-splitter.md +2 -2
- package/examples/component-stack.md +1 -1
- package/examples/component-statistic.md +1 -1
- package/examples/component-step-button.md +4 -4
- package/examples/component-step-connector.md +4 -4
- package/examples/component-step-content.md +1 -1
- package/examples/component-step-icon.md +1 -1
- package/examples/component-step-label.md +1 -1
- package/examples/component-step.md +2 -2
- package/examples/component-steps.md +2 -2
- package/examples/component-swipeable-drawer.md +1 -1
- package/examples/component-switch.md +3 -3
- package/examples/component-tab-scroll-button.md +5 -5
- package/examples/component-tab.md +1 -1
- package/examples/component-table-body.md +1 -1
- package/examples/component-table-cell.md +1 -1
- package/examples/component-table-container.md +1 -1
- package/examples/component-table-footer.md +1 -1
- package/examples/component-table-head.md +1 -1
- package/examples/component-table-pagination.md +1 -1
- package/examples/component-table-row.md +1 -1
- package/examples/component-table-sort-label.md +1 -1
- package/examples/component-table.md +2 -2
- package/examples/component-tabs.md +3 -3
- package/examples/component-tag-badge.md +2 -2
- package/examples/component-tag.md +1 -1
- package/examples/component-textarea-autosize.md +1 -1
- package/examples/component-textarea.md +1 -1
- package/examples/component-time-picker.md +1 -1
- package/examples/component-timeline.md +1 -1
- package/examples/component-toast.md +4 -4
- package/examples/component-toggle-button.md +1 -1
- package/examples/component-toggle.md +1 -1
- package/examples/component-toolbar.md +1 -1
- package/examples/component-tooltip.md +3 -3
- package/examples/component-tour.md +1 -1
- package/examples/component-transfer.md +1 -1
- package/examples/component-tree-select.md +1 -1
- package/examples/component-tree.md +1 -1
- package/examples/component-typography.md +2 -2
- package/examples/component-upload.md +1 -1
- package/examples/component-watermark.md +1 -1
- package/examples/component-zoom.md +1 -1
- package/knowledge/COVERAGE.md +4 -3
- package/knowledge/components/INDEX.md +202 -202
- package/knowledge/patterns/brand-references.md +72 -72
- package/package.json +1 -1
- package/tools/audit/local-ci.py +16 -1
- package/tools/audit/package-smoke.py +717 -9
- package/tools/audit/registry-smoke.py +912 -10
- package/tools/audit/release-metadata.py +47 -1
- package/tools/audit/smoke_assertions.py +998 -35
- package/tools/migrations/refs-links-to-reference-pages.py +179 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
// Stage/action key-map builders and stage predicates for the bundle-handoff operator runbook.
|
|
2
|
+
|
|
3
|
+
export const byKey = (rows, getValue) => Object.fromEntries(
|
|
4
|
+
rows.map((row, index) => [row.key, getValue(row, index)]),
|
|
5
|
+
);
|
|
6
|
+
export const fieldByKey = (rows, field) => byKey(rows, (row) => row[field]);
|
|
7
|
+
export const hasCommands = (stage) => stage.commandCount > 0;
|
|
8
|
+
export const isManualStage = (stage) => !hasCommands(stage);
|
|
9
|
+
export const isRequiredStage = (stage) => stage.required;
|
|
10
|
+
export const isOptionalStage = (stage) => !stage.required;
|
|
11
|
+
export const usesReadOnlyRunPolicy = (stage) => stage.runPolicy === "read-only";
|
|
12
|
+
export const usesLocalOutputRunPolicy = (stage) => stage.runPolicy === "writes-local-file";
|
|
13
|
+
export const hasOutputFile = (stage) => stage.outputFiles.length > 0;
|
|
14
|
+
export const callsExternalSystem = (stage) => stage.externalCalls;
|
|
15
|
+
export const mutatesTargetRepo = (stage) => stage.targetRepoMutation;
|
|
16
|
+
|
|
17
|
+
export function buildStageIdentityMaps(stages) {
|
|
18
|
+
const stageFieldByKey = (field) => fieldByKey(stages, field);
|
|
19
|
+
const stageKeys = stages.map((stage) => stage.key);
|
|
20
|
+
const stageByKey = byKey(stages, (stage) => stage);
|
|
21
|
+
const stageLabelByKey = stageFieldByKey("label");
|
|
22
|
+
const stageSummaryByKey = stageFieldByKey("reason");
|
|
23
|
+
return {
|
|
24
|
+
stageKeys,
|
|
25
|
+
stageByKey,
|
|
26
|
+
stageLabelByKey,
|
|
27
|
+
stageSummaryByKey,
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function buildStageActionStatusMaps(stageActionRows) {
|
|
32
|
+
const actionFieldByKey = (field) => fieldByKey(stageActionRows, field);
|
|
33
|
+
const stageActionTypeByKey = actionFieldByKey("actionType");
|
|
34
|
+
const stageActionLabelByKey = actionFieldByKey("actionLabel");
|
|
35
|
+
const stageActionInstructionsByKey = actionFieldByKey("actionInstruction");
|
|
36
|
+
const stageActionButtonLabelsByKey = actionFieldByKey("actionButtonLabel");
|
|
37
|
+
const stageActionAffordanceByKey = actionFieldByKey("actionAffordance");
|
|
38
|
+
const stageActionEnabledByKey = actionFieldByKey("actionEnabled");
|
|
39
|
+
const stageActionStatusByKey = actionFieldByKey("actionStatus");
|
|
40
|
+
const stageActionStatusLabelsByKey = actionFieldByKey("actionStatusLabel");
|
|
41
|
+
const stageActionStatusToneByKey = actionFieldByKey("actionStatusTone");
|
|
42
|
+
const stageActionDisabledReasonCodeByKey = actionFieldByKey("actionDisabledReasonCode");
|
|
43
|
+
const stageActionDisabledReasonByKey = actionFieldByKey("actionDisabledReason");
|
|
44
|
+
return {
|
|
45
|
+
stageActionRows,
|
|
46
|
+
stageActionTypeByKey,
|
|
47
|
+
stageActionLabelByKey,
|
|
48
|
+
stageActionInstructionsByKey,
|
|
49
|
+
stageActionButtonLabelsByKey,
|
|
50
|
+
stageActionAffordanceByKey,
|
|
51
|
+
stageActionEnabledByKey,
|
|
52
|
+
stageActionStatusByKey,
|
|
53
|
+
stageActionStatusLabelsByKey,
|
|
54
|
+
stageActionStatusToneByKey,
|
|
55
|
+
stageActionDisabledReasonCodeByKey,
|
|
56
|
+
stageActionDisabledReasonByKey,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function buildStageActionDependencyMaps(stageActionRows) {
|
|
61
|
+
const actionFieldByKey = (field) => fieldByKey(stageActionRows, field);
|
|
62
|
+
const stageActionPrerequisiteKeysByKey = actionFieldByKey("actionPrerequisiteKeys");
|
|
63
|
+
const stageActionPrerequisiteLabelsByKey = actionFieldByKey("actionPrerequisiteLabels");
|
|
64
|
+
const stageActionPrerequisiteCountByKey = actionFieldByKey("actionPrerequisiteCount");
|
|
65
|
+
const stageActionHasPrerequisitesByKey = actionFieldByKey("actionHasPrerequisites");
|
|
66
|
+
const stageActionDependencyReasonCodeByKey = actionFieldByKey("actionDependencyReasonCode");
|
|
67
|
+
const stageActionDependencyReasonByKey = actionFieldByKey("actionDependencyReason");
|
|
68
|
+
const stageActionBlockedStageKeysByKey = actionFieldByKey("actionBlockedStageKeys");
|
|
69
|
+
const stageActionBlockedStageLabelsByKey = actionFieldByKey("actionBlockedStageLabels");
|
|
70
|
+
const stageActionBlockedStageCountByKey = actionFieldByKey("actionBlockedStageCount");
|
|
71
|
+
const stageActionBlocksStagesByKey = actionFieldByKey("actionBlocksStages");
|
|
72
|
+
const stageActionCompletionCriteriaByKey = actionFieldByKey("actionCompletionCriteria");
|
|
73
|
+
const stageActionCompletionCriteriaCountByKey = actionFieldByKey("actionCompletionCriteriaCount");
|
|
74
|
+
const stageActionHasCompletionCriteriaByKey = actionFieldByKey("actionHasCompletionCriteria");
|
|
75
|
+
return {
|
|
76
|
+
stageActionPrerequisiteKeysByKey,
|
|
77
|
+
stageActionPrerequisiteLabelsByKey,
|
|
78
|
+
stageActionPrerequisiteCountByKey,
|
|
79
|
+
stageActionHasPrerequisitesByKey,
|
|
80
|
+
stageActionDependencyReasonCodeByKey,
|
|
81
|
+
stageActionDependencyReasonByKey,
|
|
82
|
+
stageActionBlockedStageKeysByKey,
|
|
83
|
+
stageActionBlockedStageLabelsByKey,
|
|
84
|
+
stageActionBlockedStageCountByKey,
|
|
85
|
+
stageActionBlocksStagesByKey,
|
|
86
|
+
stageActionCompletionCriteriaByKey,
|
|
87
|
+
stageActionCompletionCriteriaCountByKey,
|
|
88
|
+
stageActionHasCompletionCriteriaByKey,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function buildStageActionEvidenceMaps(stageActionRows) {
|
|
93
|
+
const actionFieldByKey = (field) => fieldByKey(stageActionRows, field);
|
|
94
|
+
const stageActionEvidenceRequirementsByKey = actionFieldByKey("actionEvidenceRequirements");
|
|
95
|
+
const stageActionEvidenceRequirementCountByKey = actionFieldByKey("actionEvidenceRequirementCount");
|
|
96
|
+
const stageActionRequiresEvidenceByKey = actionFieldByKey("actionRequiresEvidence");
|
|
97
|
+
const stageActionEvidenceTargetByKey = actionFieldByKey("actionEvidenceTarget");
|
|
98
|
+
const stageActionEvidenceTargetLabelByKey = actionFieldByKey("actionEvidenceTargetLabel");
|
|
99
|
+
return {
|
|
100
|
+
stageActionEvidenceRequirementsByKey,
|
|
101
|
+
stageActionEvidenceRequirementCountByKey,
|
|
102
|
+
stageActionRequiresEvidenceByKey,
|
|
103
|
+
stageActionEvidenceTargetByKey,
|
|
104
|
+
stageActionEvidenceTargetLabelByKey,
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function buildStageActionEvidenceCaptureMaps(stageActionRows) {
|
|
109
|
+
const actionFieldByKey = (field) => fieldByKey(stageActionRows, field);
|
|
110
|
+
const stageActionEvidenceCaptureFieldsByKey = actionFieldByKey("actionEvidenceCaptureFields");
|
|
111
|
+
const stageActionEvidenceCaptureFieldKeysByKey = actionFieldByKey("actionEvidenceCaptureFieldKeys");
|
|
112
|
+
const stageActionEvidenceCaptureFieldLabelsByKey = actionFieldByKey("actionEvidenceCaptureFieldLabels");
|
|
113
|
+
const stageActionEvidenceCaptureFieldPlaceholdersByKey = actionFieldByKey("actionEvidenceCaptureFieldPlaceholders");
|
|
114
|
+
const stageActionEvidenceCaptureFieldRequirementLabelsByKey = actionFieldByKey("actionEvidenceCaptureFieldRequirementLabels");
|
|
115
|
+
const stageActionEvidenceCaptureFieldAriaLabelsByKey = actionFieldByKey("actionEvidenceCaptureFieldAriaLabels");
|
|
116
|
+
const stageActionEvidenceCaptureFieldHelpTextsByKey = actionFieldByKey("actionEvidenceCaptureFieldHelpTexts");
|
|
117
|
+
const stageActionEvidenceCaptureFieldSectionKeysByKey = actionFieldByKey("actionEvidenceCaptureFieldSectionKeys");
|
|
118
|
+
const stageActionEvidenceCaptureFieldSectionLabelsByKey = actionFieldByKey("actionEvidenceCaptureFieldSectionLabels");
|
|
119
|
+
const stageActionEvidenceCaptureSectionKeysByKey = actionFieldByKey("actionEvidenceCaptureSectionKeys");
|
|
120
|
+
const stageActionEvidenceCaptureSectionLabelsByKey = actionFieldByKey("actionEvidenceCaptureSectionLabels");
|
|
121
|
+
const stageActionEvidenceCaptureSectionCountByKey = actionFieldByKey("actionEvidenceCaptureSectionCount");
|
|
122
|
+
const stageActionEvidenceCaptureFieldPayloadNamespacesByKey = actionFieldByKey("actionEvidenceCaptureFieldPayloadNamespaces");
|
|
123
|
+
const stageActionEvidenceCaptureFieldPayloadPathsByKey = actionFieldByKey("actionEvidenceCaptureFieldPayloadPaths");
|
|
124
|
+
const stageActionEvidenceCapturePayloadNamespacesByKey = actionFieldByKey("actionEvidenceCapturePayloadNamespaces");
|
|
125
|
+
const stageActionEvidenceCapturePayloadNamespaceCountByKey = actionFieldByKey("actionEvidenceCapturePayloadNamespaceCount");
|
|
126
|
+
const stageActionEvidenceCapturePayloadTemplateByKey = actionFieldByKey("actionEvidenceCapturePayloadTemplate");
|
|
127
|
+
const stageActionEvidenceCapturePayloadFlatTemplateByKey = actionFieldByKey("actionEvidenceCapturePayloadFlatTemplate");
|
|
128
|
+
const stageActionEvidenceCapturePayloadBindingsByKey = actionFieldByKey("actionEvidenceCapturePayloadBindings");
|
|
129
|
+
const stageActionEvidenceCaptureValidationSpecsByKey = actionFieldByKey("actionEvidenceCaptureValidationSpecs");
|
|
130
|
+
const stageActionEvidenceCaptureInitialValidationStatesByKey = actionFieldByKey("actionEvidenceCaptureInitialValidationStates");
|
|
131
|
+
const stageActionEvidenceCaptureInitialValidationDisplayMetadataByKey = actionFieldByKey("actionEvidenceCaptureInitialValidationDisplayMetadata");
|
|
132
|
+
const stageActionEvidenceCaptureInitialValidationChecklistByKey = actionFieldByKey("actionEvidenceCaptureInitialValidationChecklist");
|
|
133
|
+
const stageActionEvidenceCaptureInitialValidationChecklistSummaryByKey = actionFieldByKey("actionEvidenceCaptureInitialValidationChecklistSummary");
|
|
134
|
+
const stageActionEvidenceCaptureInitialValidationSummaryByKey = actionFieldByKey("actionEvidenceCaptureInitialValidationSummary");
|
|
135
|
+
const stageActionEvidenceCaptureFieldInputTypesByKey = actionFieldByKey("actionEvidenceCaptureFieldInputTypes");
|
|
136
|
+
const stageActionEvidenceCaptureFieldValueShapesByKey = actionFieldByKey("actionEvidenceCaptureFieldValueShapes");
|
|
137
|
+
const stageActionEvidenceCaptureFieldAcceptsMultipleByKey = actionFieldByKey("actionEvidenceCaptureFieldAcceptsMultiple");
|
|
138
|
+
const stageActionEvidenceCaptureFieldDefaultValuesByKey = actionFieldByKey("actionEvidenceCaptureFieldDefaultValues");
|
|
139
|
+
const stageActionEvidenceCaptureFieldEmptyValuesByKey = actionFieldByKey("actionEvidenceCaptureFieldEmptyValues");
|
|
140
|
+
const stageActionEvidenceCaptureFieldValidationRulesByKey = actionFieldByKey("actionEvidenceCaptureFieldValidationRules");
|
|
141
|
+
const stageActionEvidenceCaptureFieldMinLengthsByKey = actionFieldByKey("actionEvidenceCaptureFieldMinLengths");
|
|
142
|
+
const stageActionEvidenceCaptureFieldExamplesByKey = actionFieldByKey("actionEvidenceCaptureFieldExamples");
|
|
143
|
+
const stageActionEvidenceCaptureFieldValidationHintsByKey = actionFieldByKey("actionEvidenceCaptureFieldValidationHints");
|
|
144
|
+
const stageActionRequiredEvidenceCaptureFieldKeysByKey = actionFieldByKey("actionRequiredEvidenceCaptureFieldKeys");
|
|
145
|
+
const stageActionOptionalEvidenceCaptureFieldKeysByKey = actionFieldByKey("actionOptionalEvidenceCaptureFieldKeys");
|
|
146
|
+
const stageActionEvidenceCaptureFieldCountByKey = actionFieldByKey("actionEvidenceCaptureFieldCount");
|
|
147
|
+
const stageActionRequiredEvidenceCaptureFieldCountByKey = actionFieldByKey("actionRequiredEvidenceCaptureFieldCount");
|
|
148
|
+
const stageActionOptionalEvidenceCaptureFieldCountByKey = actionFieldByKey("actionOptionalEvidenceCaptureFieldCount");
|
|
149
|
+
const stageActionHasEvidenceCaptureFieldsByKey = actionFieldByKey("actionHasEvidenceCaptureFields");
|
|
150
|
+
return {
|
|
151
|
+
stageActionEvidenceCaptureFieldsByKey,
|
|
152
|
+
stageActionEvidenceCaptureFieldKeysByKey,
|
|
153
|
+
stageActionEvidenceCaptureFieldLabelsByKey,
|
|
154
|
+
stageActionEvidenceCaptureFieldPlaceholdersByKey,
|
|
155
|
+
stageActionEvidenceCaptureFieldRequirementLabelsByKey,
|
|
156
|
+
stageActionEvidenceCaptureFieldAriaLabelsByKey,
|
|
157
|
+
stageActionEvidenceCaptureFieldHelpTextsByKey,
|
|
158
|
+
stageActionEvidenceCaptureFieldSectionKeysByKey,
|
|
159
|
+
stageActionEvidenceCaptureFieldSectionLabelsByKey,
|
|
160
|
+
stageActionEvidenceCaptureSectionKeysByKey,
|
|
161
|
+
stageActionEvidenceCaptureSectionLabelsByKey,
|
|
162
|
+
stageActionEvidenceCaptureSectionCountByKey,
|
|
163
|
+
stageActionEvidenceCaptureFieldPayloadNamespacesByKey,
|
|
164
|
+
stageActionEvidenceCaptureFieldPayloadPathsByKey,
|
|
165
|
+
stageActionEvidenceCapturePayloadNamespacesByKey,
|
|
166
|
+
stageActionEvidenceCapturePayloadNamespaceCountByKey,
|
|
167
|
+
stageActionEvidenceCapturePayloadTemplateByKey,
|
|
168
|
+
stageActionEvidenceCapturePayloadFlatTemplateByKey,
|
|
169
|
+
stageActionEvidenceCapturePayloadBindingsByKey,
|
|
170
|
+
stageActionEvidenceCaptureValidationSpecsByKey,
|
|
171
|
+
stageActionEvidenceCaptureInitialValidationStatesByKey,
|
|
172
|
+
stageActionEvidenceCaptureInitialValidationDisplayMetadataByKey,
|
|
173
|
+
stageActionEvidenceCaptureInitialValidationChecklistByKey,
|
|
174
|
+
stageActionEvidenceCaptureInitialValidationChecklistSummaryByKey,
|
|
175
|
+
stageActionEvidenceCaptureInitialValidationSummaryByKey,
|
|
176
|
+
stageActionEvidenceCaptureFieldInputTypesByKey,
|
|
177
|
+
stageActionEvidenceCaptureFieldValueShapesByKey,
|
|
178
|
+
stageActionEvidenceCaptureFieldAcceptsMultipleByKey,
|
|
179
|
+
stageActionEvidenceCaptureFieldDefaultValuesByKey,
|
|
180
|
+
stageActionEvidenceCaptureFieldEmptyValuesByKey,
|
|
181
|
+
stageActionEvidenceCaptureFieldValidationRulesByKey,
|
|
182
|
+
stageActionEvidenceCaptureFieldMinLengthsByKey,
|
|
183
|
+
stageActionEvidenceCaptureFieldExamplesByKey,
|
|
184
|
+
stageActionEvidenceCaptureFieldValidationHintsByKey,
|
|
185
|
+
stageActionRequiredEvidenceCaptureFieldKeysByKey,
|
|
186
|
+
stageActionOptionalEvidenceCaptureFieldKeysByKey,
|
|
187
|
+
stageActionEvidenceCaptureFieldCountByKey,
|
|
188
|
+
stageActionRequiredEvidenceCaptureFieldCountByKey,
|
|
189
|
+
stageActionOptionalEvidenceCaptureFieldCountByKey,
|
|
190
|
+
stageActionHasEvidenceCaptureFieldsByKey,
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export function buildStageExecutionMaps(stages) {
|
|
195
|
+
const stageFieldByKey = (field) => fieldByKey(stages, field);
|
|
196
|
+
const commandListByKey = (getValue) => byKey(stages, (stage) => stage.commands.map(getValue));
|
|
197
|
+
const stageKeysBy = (predicate) => stages.filter(predicate).map((stage) => stage.key);
|
|
198
|
+
const stageKindByKey = stageFieldByKey("kind");
|
|
199
|
+
const stageRequiredByKey = stageFieldByKey("required");
|
|
200
|
+
const stageRunPolicyByKey = stageFieldByKey("runPolicy");
|
|
201
|
+
const stageSafetyLevelByKey = stageFieldByKey("safetyLevel");
|
|
202
|
+
const stageCommandCountByKey = stageFieldByKey("commandCount");
|
|
203
|
+
const stageCommandKeysByKey = stageFieldByKey("commandKeys");
|
|
204
|
+
const stageCommandLabelsByKey = commandListByKey((command) => command.label);
|
|
205
|
+
const stageCommandStringsByKey = commandListByKey((command) => command.command);
|
|
206
|
+
const stageCommandArgsByKey = commandListByKey((command) => command.commandArgs);
|
|
207
|
+
const stageCommandRunPoliciesByKey = commandListByKey((command) => command.runPolicy);
|
|
208
|
+
const stageCommandSafetyLevelsByKey = commandListByKey((command) => command.safety?.safetyLevel || "");
|
|
209
|
+
const stageOutputFilesByKey = stageFieldByKey("outputFiles");
|
|
210
|
+
const stageHasCommandsByKey = byKey(stages, hasCommands);
|
|
211
|
+
const stageManualByKey = byKey(stages, isManualStage);
|
|
212
|
+
const stageWritesLocalFileByKey = stageFieldByKey("writesLocalFile");
|
|
213
|
+
const stageExternalCallsByKey = stageFieldByKey("externalCalls");
|
|
214
|
+
const stageTargetRepoMutationByKey = stageFieldByKey("targetRepoMutation");
|
|
215
|
+
const commandStageKeys = stageKeysBy(hasCommands);
|
|
216
|
+
const manualStageKeys = stageKeysBy(isManualStage);
|
|
217
|
+
return {
|
|
218
|
+
stageKindByKey,
|
|
219
|
+
stageRequiredByKey,
|
|
220
|
+
stageRunPolicyByKey,
|
|
221
|
+
stageSafetyLevelByKey,
|
|
222
|
+
stageCommandCountByKey,
|
|
223
|
+
stageCommandKeysByKey,
|
|
224
|
+
stageCommandLabelsByKey,
|
|
225
|
+
stageCommandStringsByKey,
|
|
226
|
+
stageCommandArgsByKey,
|
|
227
|
+
stageCommandRunPoliciesByKey,
|
|
228
|
+
stageCommandSafetyLevelsByKey,
|
|
229
|
+
stageOutputFilesByKey,
|
|
230
|
+
stageHasCommandsByKey,
|
|
231
|
+
stageManualByKey,
|
|
232
|
+
stageWritesLocalFileByKey,
|
|
233
|
+
stageExternalCallsByKey,
|
|
234
|
+
stageTargetRepoMutationByKey,
|
|
235
|
+
commandStageKeys,
|
|
236
|
+
manualStageKeys,
|
|
237
|
+
};
|
|
238
|
+
}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
// Next-step stage/command/action summaries for the bundle-handoff operator runbook.
|
|
2
|
+
|
|
3
|
+
export function buildNextStepState({
|
|
4
|
+
stageByKey,
|
|
5
|
+
commandByKey,
|
|
6
|
+
stageActionRows,
|
|
7
|
+
stageHumanLineByKey,
|
|
8
|
+
stageHumanLineDisplayRowByKey,
|
|
9
|
+
}) {
|
|
10
|
+
const nextStageKey = "verifySourceBundle";
|
|
11
|
+
const nextCommandKey = "source.bundleCheck.strict";
|
|
12
|
+
const nextStage = stageByKey[nextStageKey] || null;
|
|
13
|
+
const nextStageActionRow = stageActionRows.find((stage) => stage.key === nextStageKey) || null;
|
|
14
|
+
const nextCommandEntry = commandByKey.get(nextCommandKey) || null;
|
|
15
|
+
const nextActionField = (field, fallback = "") => nextStageActionRow?.[field] || fallback;
|
|
16
|
+
const nextActionListField = (field) => nextActionField(field, []);
|
|
17
|
+
const nextActionObjectField = (field) => nextActionField(field, {});
|
|
18
|
+
const nextActionNumberField = (field) => nextActionField(field, 0);
|
|
19
|
+
const nextActionBooleanField = (field) => nextStageActionRow?.[field] === true;
|
|
20
|
+
const nextStageField = (field, fallback = "") => nextStage?.[field] || fallback;
|
|
21
|
+
const nextStageListField = (field) => nextStageField(field, []);
|
|
22
|
+
const nextStageBooleanField = (field) => nextStage?.[field] === true;
|
|
23
|
+
const nextStageCommandValues = (getValue) => nextStage?.commands?.map(getValue) || [];
|
|
24
|
+
const nextActionEvidenceProgressSummary = nextActionObjectField("actionEvidenceCaptureInitialValidationChecklistSummary");
|
|
25
|
+
const nextStageHumanLine = nextStage ? stageHumanLineByKey[nextStage.key] || "" : "";
|
|
26
|
+
const nextStageHumanLineDisplayRow = nextStage ? stageHumanLineDisplayRowByKey[nextStage.key] || {} : {};
|
|
27
|
+
const nextStageCommandCount = nextStageField("commandCount", 0);
|
|
28
|
+
const nextCommandField = (field, fallback = "") => nextCommandEntry?.[field] || fallback;
|
|
29
|
+
const nextCommandListField = (field) => nextCommandField(field, []);
|
|
30
|
+
const nextCommandSafety = nextCommandEntry?.safety || null;
|
|
31
|
+
const nextStageHumanLineSummary = nextStage ? {
|
|
32
|
+
stageKey: nextStage.key,
|
|
33
|
+
line: nextStageHumanLine,
|
|
34
|
+
hasEvidenceProgress: (nextActionEvidenceProgressSummary.itemCount || 0) > 0,
|
|
35
|
+
evidenceProgressStatus: nextActionEvidenceProgressSummary.status || "",
|
|
36
|
+
evidenceProgressLabel: nextActionEvidenceProgressSummary.progressLabel || "",
|
|
37
|
+
firstUncheckedEvidenceItemLabel: nextActionEvidenceProgressSummary.firstUncheckedItemLabel || "",
|
|
38
|
+
} : {};
|
|
39
|
+
const nextStageIdentity = {
|
|
40
|
+
nextStageLabel: nextStageField("label"),
|
|
41
|
+
nextStageSummary: nextStageField("reason"),
|
|
42
|
+
nextStageHumanLine,
|
|
43
|
+
nextStageHumanLineDisplayRow,
|
|
44
|
+
nextStageHumanLineSummary,
|
|
45
|
+
};
|
|
46
|
+
const nextStageActionStatus = {
|
|
47
|
+
nextStageActionType: nextActionField("actionType"),
|
|
48
|
+
nextStageActionLabel: nextActionField("actionLabel"),
|
|
49
|
+
nextStageActionInstruction: nextActionField("actionInstruction"),
|
|
50
|
+
nextStageActionButtonLabel: nextActionField("actionButtonLabel"),
|
|
51
|
+
nextStageActionAffordance: nextActionField("actionAffordance"),
|
|
52
|
+
nextStageActionEnabled: nextActionBooleanField("actionEnabled"),
|
|
53
|
+
nextStageActionStatus: nextActionField("actionStatus"),
|
|
54
|
+
nextStageActionStatusLabel: nextActionField("actionStatusLabel"),
|
|
55
|
+
nextStageActionStatusTone: nextActionField("actionStatusTone"),
|
|
56
|
+
nextStageActionDisabledReasonCode: nextActionField("actionDisabledReasonCode"),
|
|
57
|
+
nextStageActionDisabledReason: nextActionField("actionDisabledReason"),
|
|
58
|
+
};
|
|
59
|
+
const nextStageActionDependencies = {
|
|
60
|
+
nextStageActionPrerequisiteKeys: nextActionListField("actionPrerequisiteKeys"),
|
|
61
|
+
nextStageActionPrerequisiteLabels: nextActionListField("actionPrerequisiteLabels"),
|
|
62
|
+
nextStageActionPrerequisiteCount: nextActionNumberField("actionPrerequisiteCount"),
|
|
63
|
+
nextStageActionHasPrerequisites: nextActionBooleanField("actionHasPrerequisites"),
|
|
64
|
+
nextStageActionDependencyReasonCode: nextActionField("actionDependencyReasonCode"),
|
|
65
|
+
nextStageActionDependencyReason: nextActionField("actionDependencyReason"),
|
|
66
|
+
nextStageActionBlockedStageKeys: nextActionListField("actionBlockedStageKeys"),
|
|
67
|
+
nextStageActionBlockedStageLabels: nextActionListField("actionBlockedStageLabels"),
|
|
68
|
+
nextStageActionBlockedStageCount: nextActionNumberField("actionBlockedStageCount"),
|
|
69
|
+
nextStageActionBlocksStages: nextActionBooleanField("actionBlocksStages"),
|
|
70
|
+
nextStageActionCompletionCriteria: nextActionListField("actionCompletionCriteria"),
|
|
71
|
+
nextStageActionCompletionCriteriaCount: nextActionNumberField("actionCompletionCriteriaCount"),
|
|
72
|
+
nextStageActionHasCompletionCriteria: nextActionBooleanField("actionHasCompletionCriteria"),
|
|
73
|
+
};
|
|
74
|
+
const nextStageActionEvidence = {
|
|
75
|
+
nextStageActionEvidenceRequirements: nextActionListField("actionEvidenceRequirements"),
|
|
76
|
+
nextStageActionEvidenceRequirementCount: nextActionNumberField("actionEvidenceRequirementCount"),
|
|
77
|
+
nextStageActionRequiresEvidence: nextActionBooleanField("actionRequiresEvidence"),
|
|
78
|
+
nextStageActionEvidenceTarget: nextActionField("actionEvidenceTarget"),
|
|
79
|
+
nextStageActionEvidenceTargetLabel: nextActionField("actionEvidenceTargetLabel"),
|
|
80
|
+
};
|
|
81
|
+
const nextStageEvidenceCaptureFieldMetadata = {
|
|
82
|
+
nextStageActionEvidenceCaptureFields: nextActionListField("actionEvidenceCaptureFields"),
|
|
83
|
+
nextStageActionEvidenceCaptureFieldKeys: nextActionListField("actionEvidenceCaptureFieldKeys"),
|
|
84
|
+
nextStageActionEvidenceCaptureFieldLabels: nextActionListField("actionEvidenceCaptureFieldLabels"),
|
|
85
|
+
nextStageActionEvidenceCaptureFieldPlaceholders: nextActionListField("actionEvidenceCaptureFieldPlaceholders"),
|
|
86
|
+
nextStageActionEvidenceCaptureFieldRequirementLabels: nextActionListField("actionEvidenceCaptureFieldRequirementLabels"),
|
|
87
|
+
nextStageActionEvidenceCaptureFieldAriaLabels: nextActionListField("actionEvidenceCaptureFieldAriaLabels"),
|
|
88
|
+
nextStageActionEvidenceCaptureFieldHelpTexts: nextActionListField("actionEvidenceCaptureFieldHelpTexts"),
|
|
89
|
+
nextStageActionEvidenceCaptureFieldSectionKeys: nextActionListField("actionEvidenceCaptureFieldSectionKeys"),
|
|
90
|
+
nextStageActionEvidenceCaptureFieldSectionLabels: nextActionListField("actionEvidenceCaptureFieldSectionLabels"),
|
|
91
|
+
nextStageActionEvidenceCaptureSectionKeys: nextActionListField("actionEvidenceCaptureSectionKeys"),
|
|
92
|
+
nextStageActionEvidenceCaptureSectionLabels: nextActionListField("actionEvidenceCaptureSectionLabels"),
|
|
93
|
+
nextStageActionEvidenceCaptureSectionCount: nextActionNumberField("actionEvidenceCaptureSectionCount"),
|
|
94
|
+
};
|
|
95
|
+
const nextStageEvidenceCapturePayload = {
|
|
96
|
+
nextStageActionEvidenceCaptureFieldPayloadNamespaces: nextActionListField("actionEvidenceCaptureFieldPayloadNamespaces"),
|
|
97
|
+
nextStageActionEvidenceCaptureFieldPayloadPaths: nextActionListField("actionEvidenceCaptureFieldPayloadPaths"),
|
|
98
|
+
nextStageActionEvidenceCapturePayloadNamespaces: nextActionListField("actionEvidenceCapturePayloadNamespaces"),
|
|
99
|
+
nextStageActionEvidenceCapturePayloadNamespaceCount: nextActionNumberField("actionEvidenceCapturePayloadNamespaceCount"),
|
|
100
|
+
nextStageActionEvidenceCapturePayloadTemplate: nextActionObjectField("actionEvidenceCapturePayloadTemplate"),
|
|
101
|
+
nextStageActionEvidenceCapturePayloadFlatTemplate: nextActionObjectField("actionEvidenceCapturePayloadFlatTemplate"),
|
|
102
|
+
nextStageActionEvidenceCapturePayloadBindings: nextActionListField("actionEvidenceCapturePayloadBindings"),
|
|
103
|
+
};
|
|
104
|
+
const nextStageEvidenceCaptureValidation = {
|
|
105
|
+
nextStageActionEvidenceCaptureValidationSpecs: nextActionListField("actionEvidenceCaptureValidationSpecs"),
|
|
106
|
+
nextStageActionEvidenceCaptureInitialValidationStates: nextActionListField("actionEvidenceCaptureInitialValidationStates"),
|
|
107
|
+
nextStageActionEvidenceCaptureInitialValidationDisplayMetadata: nextActionListField("actionEvidenceCaptureInitialValidationDisplayMetadata"),
|
|
108
|
+
nextStageActionEvidenceCaptureInitialValidationChecklist: nextActionListField("actionEvidenceCaptureInitialValidationChecklist"),
|
|
109
|
+
nextStageActionEvidenceCaptureInitialValidationChecklistSummary: nextActionObjectField("actionEvidenceCaptureInitialValidationChecklistSummary"),
|
|
110
|
+
nextStageActionEvidenceCaptureInitialValidationSummary: nextActionObjectField("actionEvidenceCaptureInitialValidationSummary"),
|
|
111
|
+
};
|
|
112
|
+
const nextStageEvidenceCaptureFieldRules = {
|
|
113
|
+
nextStageActionEvidenceCaptureFieldInputTypes: nextActionListField("actionEvidenceCaptureFieldInputTypes"),
|
|
114
|
+
nextStageActionEvidenceCaptureFieldValueShapes: nextActionListField("actionEvidenceCaptureFieldValueShapes"),
|
|
115
|
+
nextStageActionEvidenceCaptureFieldAcceptsMultiple: nextActionListField("actionEvidenceCaptureFieldAcceptsMultiple"),
|
|
116
|
+
nextStageActionEvidenceCaptureFieldDefaultValues: nextActionListField("actionEvidenceCaptureFieldDefaultValues"),
|
|
117
|
+
nextStageActionEvidenceCaptureFieldEmptyValues: nextActionListField("actionEvidenceCaptureFieldEmptyValues"),
|
|
118
|
+
nextStageActionEvidenceCaptureFieldValidationRules: nextActionListField("actionEvidenceCaptureFieldValidationRules"),
|
|
119
|
+
nextStageActionEvidenceCaptureFieldMinLengths: nextActionListField("actionEvidenceCaptureFieldMinLengths"),
|
|
120
|
+
nextStageActionEvidenceCaptureFieldExamples: nextActionListField("actionEvidenceCaptureFieldExamples"),
|
|
121
|
+
nextStageActionEvidenceCaptureFieldValidationHints: nextActionListField("actionEvidenceCaptureFieldValidationHints"),
|
|
122
|
+
nextStageActionRequiredEvidenceCaptureFieldKeys: nextActionListField("actionRequiredEvidenceCaptureFieldKeys"),
|
|
123
|
+
nextStageActionOptionalEvidenceCaptureFieldKeys: nextActionListField("actionOptionalEvidenceCaptureFieldKeys"),
|
|
124
|
+
};
|
|
125
|
+
const nextStageEvidenceCaptureFieldCounts = {
|
|
126
|
+
nextStageActionEvidenceCaptureFieldCount: nextActionNumberField("actionEvidenceCaptureFieldCount"),
|
|
127
|
+
nextStageActionRequiredEvidenceCaptureFieldCount: nextActionNumberField("actionRequiredEvidenceCaptureFieldCount"),
|
|
128
|
+
nextStageActionOptionalEvidenceCaptureFieldCount: nextActionNumberField("actionOptionalEvidenceCaptureFieldCount"),
|
|
129
|
+
nextStageActionHasEvidenceCaptureFields: nextActionBooleanField("actionHasEvidenceCaptureFields"),
|
|
130
|
+
};
|
|
131
|
+
const nextStageEvidenceCapture = {
|
|
132
|
+
...nextStageEvidenceCaptureFieldMetadata,
|
|
133
|
+
...nextStageEvidenceCapturePayload,
|
|
134
|
+
...nextStageEvidenceCaptureValidation,
|
|
135
|
+
...nextStageEvidenceCaptureFieldRules,
|
|
136
|
+
...nextStageEvidenceCaptureFieldCounts,
|
|
137
|
+
};
|
|
138
|
+
const nextStageClassification = {
|
|
139
|
+
nextStageKind: nextStageField("kind"),
|
|
140
|
+
nextStageRequired: nextStage?.required === true,
|
|
141
|
+
nextStageRunPolicy: nextStageField("runPolicy"),
|
|
142
|
+
nextStageSafetyLevel: nextStageField("safetyLevel"),
|
|
143
|
+
};
|
|
144
|
+
const nextStageCommandMetadata = {
|
|
145
|
+
nextStageCommandCount,
|
|
146
|
+
nextStageCommandLabels: nextStageCommandValues((command) => command.label),
|
|
147
|
+
nextStageCommands: nextStageCommandValues((command) => command.command),
|
|
148
|
+
nextStageCommandArgsList: nextStageCommandValues((command) => command.commandArgs),
|
|
149
|
+
nextStageCommandRunPolicies: nextStageCommandValues((command) => command.runPolicy),
|
|
150
|
+
nextStageCommandSafetyLevels: nextStageCommandValues((command) => command.safety?.safetyLevel || ""),
|
|
151
|
+
};
|
|
152
|
+
const nextStageExecutionContext = {
|
|
153
|
+
nextStageOutputFiles: nextStageListField("outputFiles"),
|
|
154
|
+
nextStageHasCommands: nextStageCommandCount > 0,
|
|
155
|
+
nextStageManual: nextStageCommandCount === 0,
|
|
156
|
+
nextStageWritesLocalFile: nextStageBooleanField("writesLocalFile"),
|
|
157
|
+
nextStageExternalCalls: nextStageBooleanField("externalCalls"),
|
|
158
|
+
nextStageTargetRepoMutation: nextStageBooleanField("targetRepoMutation"),
|
|
159
|
+
nextStageCommandKeys: nextStageListField("commandKeys"),
|
|
160
|
+
};
|
|
161
|
+
const nextStageCommandSummary = {
|
|
162
|
+
...nextStageClassification,
|
|
163
|
+
...nextStageCommandMetadata,
|
|
164
|
+
...nextStageExecutionContext,
|
|
165
|
+
};
|
|
166
|
+
const nextCommandSummary = {
|
|
167
|
+
nextCommand: nextCommandField("command"),
|
|
168
|
+
nextCommandArgs: nextCommandListField("commandArgs"),
|
|
169
|
+
nextCommandRunPolicy: nextCommandField("runPolicy"),
|
|
170
|
+
nextCommandSafetyLevel: nextCommandSafety?.safetyLevel || "",
|
|
171
|
+
nextCommandSafety,
|
|
172
|
+
nextCommandEntry,
|
|
173
|
+
};
|
|
174
|
+
const nextActionCoreSummary = {
|
|
175
|
+
nextActionKey: nextStageKey,
|
|
176
|
+
nextActionType: nextActionField("actionType"),
|
|
177
|
+
nextActionLabel: nextActionField("actionLabel"),
|
|
178
|
+
nextActionEnabled: nextActionBooleanField("actionEnabled"),
|
|
179
|
+
nextActionStatus: nextActionField("actionStatus"),
|
|
180
|
+
nextActionStatusLabel: nextActionField("actionStatusLabel"),
|
|
181
|
+
nextActionStatusTone: nextActionField("actionStatusTone"),
|
|
182
|
+
nextActionDisabledReasonCode: nextActionField("actionDisabledReasonCode"),
|
|
183
|
+
nextActionPrerequisiteKeys: nextActionListField("actionPrerequisiteKeys"),
|
|
184
|
+
nextActionPrerequisiteLabels: nextActionListField("actionPrerequisiteLabels"),
|
|
185
|
+
nextActionPrerequisiteCount: nextActionNumberField("actionPrerequisiteCount"),
|
|
186
|
+
nextActionHasPrerequisites: nextActionBooleanField("actionHasPrerequisites"),
|
|
187
|
+
nextActionDependencyReasonCode: nextActionField("actionDependencyReasonCode"),
|
|
188
|
+
nextActionDependencyReason: nextActionField("actionDependencyReason"),
|
|
189
|
+
nextActionBlockedStageKeys: nextActionListField("actionBlockedStageKeys"),
|
|
190
|
+
nextActionBlockedStageLabels: nextActionListField("actionBlockedStageLabels"),
|
|
191
|
+
nextActionBlockedStageCount: nextActionNumberField("actionBlockedStageCount"),
|
|
192
|
+
nextActionBlocksStages: nextActionBooleanField("actionBlocksStages"),
|
|
193
|
+
nextActionCompletionCriteria: nextActionListField("actionCompletionCriteria"),
|
|
194
|
+
nextActionCompletionCriteriaCount: nextActionNumberField("actionCompletionCriteriaCount"),
|
|
195
|
+
nextActionHasCompletionCriteria: nextActionBooleanField("actionHasCompletionCriteria"),
|
|
196
|
+
nextActionEvidenceRequirements: nextActionListField("actionEvidenceRequirements"),
|
|
197
|
+
nextActionEvidenceRequirementCount: nextActionNumberField("actionEvidenceRequirementCount"),
|
|
198
|
+
nextActionRequiresEvidence: nextActionBooleanField("actionRequiresEvidence"),
|
|
199
|
+
nextActionEvidenceTarget: nextActionField("actionEvidenceTarget"),
|
|
200
|
+
nextActionEvidenceTargetLabel: nextActionField("actionEvidenceTargetLabel"),
|
|
201
|
+
};
|
|
202
|
+
const nextActionEvidenceCaptureFieldMetadata = {
|
|
203
|
+
nextActionEvidenceCaptureFields: nextActionListField("actionEvidenceCaptureFields"),
|
|
204
|
+
nextActionEvidenceCaptureFieldKeys: nextActionListField("actionEvidenceCaptureFieldKeys"),
|
|
205
|
+
nextActionEvidenceCaptureFieldLabels: nextActionListField("actionEvidenceCaptureFieldLabels"),
|
|
206
|
+
nextActionEvidenceCaptureFieldPlaceholders: nextActionListField("actionEvidenceCaptureFieldPlaceholders"),
|
|
207
|
+
nextActionEvidenceCaptureFieldRequirementLabels: nextActionListField("actionEvidenceCaptureFieldRequirementLabels"),
|
|
208
|
+
nextActionEvidenceCaptureFieldAriaLabels: nextActionListField("actionEvidenceCaptureFieldAriaLabels"),
|
|
209
|
+
nextActionEvidenceCaptureFieldHelpTexts: nextActionListField("actionEvidenceCaptureFieldHelpTexts"),
|
|
210
|
+
nextActionEvidenceCaptureFieldSectionKeys: nextActionListField("actionEvidenceCaptureFieldSectionKeys"),
|
|
211
|
+
nextActionEvidenceCaptureFieldSectionLabels: nextActionListField("actionEvidenceCaptureFieldSectionLabels"),
|
|
212
|
+
nextActionEvidenceCaptureSectionKeys: nextActionListField("actionEvidenceCaptureSectionKeys"),
|
|
213
|
+
nextActionEvidenceCaptureSectionLabels: nextActionListField("actionEvidenceCaptureSectionLabels"),
|
|
214
|
+
nextActionEvidenceCaptureSectionCount: nextActionNumberField("actionEvidenceCaptureSectionCount"),
|
|
215
|
+
};
|
|
216
|
+
const nextActionEvidenceCapturePayload = {
|
|
217
|
+
nextActionEvidenceCaptureFieldPayloadNamespaces: nextActionListField("actionEvidenceCaptureFieldPayloadNamespaces"),
|
|
218
|
+
nextActionEvidenceCaptureFieldPayloadPaths: nextActionListField("actionEvidenceCaptureFieldPayloadPaths"),
|
|
219
|
+
nextActionEvidenceCapturePayloadNamespaces: nextActionListField("actionEvidenceCapturePayloadNamespaces"),
|
|
220
|
+
nextActionEvidenceCapturePayloadNamespaceCount: nextActionNumberField("actionEvidenceCapturePayloadNamespaceCount"),
|
|
221
|
+
nextActionEvidenceCapturePayloadTemplate: nextActionObjectField("actionEvidenceCapturePayloadTemplate"),
|
|
222
|
+
nextActionEvidenceCapturePayloadFlatTemplate: nextActionObjectField("actionEvidenceCapturePayloadFlatTemplate"),
|
|
223
|
+
nextActionEvidenceCapturePayloadBindings: nextActionListField("actionEvidenceCapturePayloadBindings"),
|
|
224
|
+
};
|
|
225
|
+
const nextActionEvidenceCaptureValidation = {
|
|
226
|
+
nextActionEvidenceCaptureValidationSpecs: nextActionListField("actionEvidenceCaptureValidationSpecs"),
|
|
227
|
+
nextActionEvidenceCaptureInitialValidationStates: nextActionListField("actionEvidenceCaptureInitialValidationStates"),
|
|
228
|
+
nextActionEvidenceCaptureInitialValidationDisplayMetadata: nextActionListField("actionEvidenceCaptureInitialValidationDisplayMetadata"),
|
|
229
|
+
nextActionEvidenceCaptureInitialValidationChecklist: nextActionListField("actionEvidenceCaptureInitialValidationChecklist"),
|
|
230
|
+
nextActionEvidenceCaptureInitialValidationChecklistSummary: nextActionObjectField("actionEvidenceCaptureInitialValidationChecklistSummary"),
|
|
231
|
+
nextActionEvidenceCaptureInitialValidationSummary: nextActionObjectField("actionEvidenceCaptureInitialValidationSummary"),
|
|
232
|
+
};
|
|
233
|
+
const nextActionEvidenceCaptureFieldRules = {
|
|
234
|
+
nextActionEvidenceCaptureFieldInputTypes: nextActionListField("actionEvidenceCaptureFieldInputTypes"),
|
|
235
|
+
nextActionEvidenceCaptureFieldValueShapes: nextActionListField("actionEvidenceCaptureFieldValueShapes"),
|
|
236
|
+
nextActionEvidenceCaptureFieldAcceptsMultiple: nextActionListField("actionEvidenceCaptureFieldAcceptsMultiple"),
|
|
237
|
+
nextActionEvidenceCaptureFieldDefaultValues: nextActionListField("actionEvidenceCaptureFieldDefaultValues"),
|
|
238
|
+
nextActionEvidenceCaptureFieldEmptyValues: nextActionListField("actionEvidenceCaptureFieldEmptyValues"),
|
|
239
|
+
nextActionEvidenceCaptureFieldValidationRules: nextActionListField("actionEvidenceCaptureFieldValidationRules"),
|
|
240
|
+
nextActionEvidenceCaptureFieldMinLengths: nextActionListField("actionEvidenceCaptureFieldMinLengths"),
|
|
241
|
+
nextActionEvidenceCaptureFieldExamples: nextActionListField("actionEvidenceCaptureFieldExamples"),
|
|
242
|
+
nextActionEvidenceCaptureFieldValidationHints: nextActionListField("actionEvidenceCaptureFieldValidationHints"),
|
|
243
|
+
nextActionRequiredEvidenceCaptureFieldKeys: nextActionListField("actionRequiredEvidenceCaptureFieldKeys"),
|
|
244
|
+
nextActionOptionalEvidenceCaptureFieldKeys: nextActionListField("actionOptionalEvidenceCaptureFieldKeys"),
|
|
245
|
+
};
|
|
246
|
+
const nextActionEvidenceCaptureFieldCounts = {
|
|
247
|
+
nextActionEvidenceCaptureFieldCount: nextActionNumberField("actionEvidenceCaptureFieldCount"),
|
|
248
|
+
nextActionRequiredEvidenceCaptureFieldCount: nextActionNumberField("actionRequiredEvidenceCaptureFieldCount"),
|
|
249
|
+
nextActionOptionalEvidenceCaptureFieldCount: nextActionNumberField("actionOptionalEvidenceCaptureFieldCount"),
|
|
250
|
+
nextActionHasEvidenceCaptureFields: nextActionBooleanField("actionHasEvidenceCaptureFields"),
|
|
251
|
+
};
|
|
252
|
+
const nextActionRunContext = {
|
|
253
|
+
nextActionRunPolicy: nextStageField("runPolicy"),
|
|
254
|
+
nextActionSafetyLevel: nextStageField("safetyLevel"),
|
|
255
|
+
};
|
|
256
|
+
const nextActionSummary = {
|
|
257
|
+
...nextActionCoreSummary,
|
|
258
|
+
...nextActionEvidenceCaptureFieldMetadata,
|
|
259
|
+
...nextActionEvidenceCapturePayload,
|
|
260
|
+
...nextActionEvidenceCaptureValidation,
|
|
261
|
+
...nextActionEvidenceCaptureFieldRules,
|
|
262
|
+
...nextActionEvidenceCaptureFieldCounts,
|
|
263
|
+
...nextActionRunContext,
|
|
264
|
+
};
|
|
265
|
+
const nextStepSummary = {
|
|
266
|
+
nextStageKey,
|
|
267
|
+
nextStage,
|
|
268
|
+
...nextStageIdentity,
|
|
269
|
+
...nextStageActionStatus,
|
|
270
|
+
...nextStageActionDependencies,
|
|
271
|
+
...nextStageActionEvidence,
|
|
272
|
+
...nextStageEvidenceCapture,
|
|
273
|
+
...nextStageCommandSummary,
|
|
274
|
+
nextCommandKey,
|
|
275
|
+
...nextCommandSummary,
|
|
276
|
+
};
|
|
277
|
+
return { nextActionSummary, nextStepSummary };
|
|
278
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
// Stage dependency and requirement metadata for Website Improvement bundle handoff runbooks.
|
|
2
|
+
|
|
3
|
+
export function getStageLabel(stages, stageKey) {
|
|
4
|
+
return stages.find((stage) => stage.key === stageKey)?.label || stageKey;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export function getStageActionPrerequisiteKeys(stage) {
|
|
8
|
+
return ({
|
|
9
|
+
verifySourceBundle: [],
|
|
10
|
+
refreshHandoffSnapshot: [],
|
|
11
|
+
writeEffectiveTaskPrompt: ["verifySourceBundle"],
|
|
12
|
+
executeInTargetRepo: ["verifySourceBundle", "writeEffectiveTaskPrompt"],
|
|
13
|
+
recordEvidence: ["executeInTargetRepo"],
|
|
14
|
+
}[stage.key] || []);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export function getStageActionPrerequisiteLabels(stage, stages) {
|
|
18
|
+
return getStageActionPrerequisiteKeys(stage).map((stageKey) => getStageLabel(stages, stageKey));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function getStageActionBlockedStageKeys(stage, stages) {
|
|
22
|
+
return stages
|
|
23
|
+
.filter((candidate) => getStageActionPrerequisiteKeys(candidate).includes(stage.key))
|
|
24
|
+
.map((candidate) => candidate.key);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function getStageActionDependencyReasonCode(stage) {
|
|
28
|
+
return getStageActionPrerequisiteKeys(stage).length > 0 ? "requires-prerequisite-actions" : "";
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function getStageActionDependencyReason(stage) {
|
|
32
|
+
return ({
|
|
33
|
+
writeEffectiveTaskPrompt: "Complete Verify source bundle integrity before writing the selected task prompt.",
|
|
34
|
+
executeInTargetRepo: "Complete Verify source bundle integrity and Write effective task handoff prompt before implementing in the target website repo.",
|
|
35
|
+
recordEvidence: "Complete Execute the task in the target website repo before recording implementation evidence.",
|
|
36
|
+
}[stage.key] || "");
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export function getStageActionCompletionCriteria(stage) {
|
|
40
|
+
return ({
|
|
41
|
+
verifySourceBundle: [
|
|
42
|
+
"Strict bundle check status is pass.",
|
|
43
|
+
"Checksum and generated-file drift counts are zero.",
|
|
44
|
+
],
|
|
45
|
+
refreshHandoffSnapshot: [
|
|
46
|
+
"Strict handoff JSON can be regenerated without target-repo mutation.",
|
|
47
|
+
],
|
|
48
|
+
writeEffectiveTaskPrompt: [
|
|
49
|
+
"Selected task handoff prompt is written to the expected local Markdown output file.",
|
|
50
|
+
"Output command remains local-output-file only.",
|
|
51
|
+
],
|
|
52
|
+
executeInTargetRepo: [
|
|
53
|
+
"Target website repo has scoped implementation changes for the selected task.",
|
|
54
|
+
"Target repo lint/typecheck/build or equivalent verification has been run.",
|
|
55
|
+
],
|
|
56
|
+
recordEvidence: [
|
|
57
|
+
"Changed files, verification commands, viewport checks, accessibility checks, remaining risks, and bundle digest are recorded.",
|
|
58
|
+
],
|
|
59
|
+
}[stage.key] || []);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function getStageActionEvidenceRequirements(stage) {
|
|
63
|
+
return ({
|
|
64
|
+
verifySourceBundle: [
|
|
65
|
+
"Strict bundle-check command output or JSON status.",
|
|
66
|
+
"Bundle digest and zero drift counts.",
|
|
67
|
+
],
|
|
68
|
+
refreshHandoffSnapshot: [
|
|
69
|
+
"Refreshed strict handoff JSON snapshot when a wrapper consumes the latest contract.",
|
|
70
|
+
],
|
|
71
|
+
writeEffectiveTaskPrompt: [
|
|
72
|
+
"Generated prompt output file path.",
|
|
73
|
+
"Selected task id and output filename.",
|
|
74
|
+
],
|
|
75
|
+
executeInTargetRepo: [
|
|
76
|
+
"Target repo changed file list.",
|
|
77
|
+
"Target repo verification command results.",
|
|
78
|
+
"Viewport and accessibility check notes for affected pages.",
|
|
79
|
+
],
|
|
80
|
+
recordEvidence: [
|
|
81
|
+
"Final evidence record includes changed files, verification, viewport/accessibility checks, risks, and bundle digest.",
|
|
82
|
+
],
|
|
83
|
+
}[stage.key] || []);
|
|
84
|
+
}
|