@design-ai/cli 4.56.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 +36 -0
- package/README.ko.md +9 -26
- package/README.md +10 -23
- 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 +13 -3
- 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-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-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.mjs +44 -931
- package/cli/lib/site-test-support.mjs +68 -0
- 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 +2 -2
- package/docs/DISTRIBUTION.md +2 -2
- package/docs/NEXT-SURFACE-DECISION.md +125 -0
- package/docs/PRODUCT-READINESS.md +3 -3
- package/docs/RELEASE-GATES.ko.md +35 -0
- package/docs/RELEASE-GATES.md +234 -0
- package/docs/ROADMAP.md +53 -8
- package/docs/external-status.md +6 -8
- package/docs/inspection-20260630.md +169 -0
- package/docs/integrations/design-ai-mcp-server.md +4 -4
- 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/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 +611 -9
- package/tools/audit/registry-smoke.py +534 -0
- package/tools/audit/release-metadata.py +47 -1
- package/tools/audit/smoke_assertions.py +915 -13
- package/tools/migrations/refs-links-to-reference-pages.py +179 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
// Expected next-action initial-validation fixtures for bundle-handoff contract tests.
|
|
2
|
+
|
|
3
|
+
export const buildExpectedInitialValidationChecklistSummary = (checklist) => {
|
|
4
|
+
const checkedItems = checklist.filter((item) => item.checkedInitially);
|
|
5
|
+
const uncheckedItems = checklist.filter((item) => !item.checkedInitially);
|
|
6
|
+
const blockingItems = checklist.filter((item) => item.completionBlocking);
|
|
7
|
+
const blockingUncheckedItems = checklist.filter((item) => item.completionBlocking && !item.checkedInitially);
|
|
8
|
+
const firstUncheckedItem = uncheckedItems[0] || {};
|
|
9
|
+
const status = blockingUncheckedItems.length > 0 ? "blocked" : "ready";
|
|
10
|
+
return {
|
|
11
|
+
status,
|
|
12
|
+
statusLabel: status === "blocked" ? "Checklist blocked" : "Checklist ready",
|
|
13
|
+
statusTone: status === "blocked" ? "danger" : "success",
|
|
14
|
+
iconName: status === "blocked" ? "list-x" : "list-checks",
|
|
15
|
+
actionLabel: status === "blocked" ? "Complete required evidence" : "Continue",
|
|
16
|
+
helperText: status === "blocked"
|
|
17
|
+
? `${blockingUncheckedItems.length} required checklist item(s) need evidence before completion.`
|
|
18
|
+
: "No required checklist items are unchecked on first render.",
|
|
19
|
+
itemCount: checklist.length,
|
|
20
|
+
checkedCount: checkedItems.length,
|
|
21
|
+
uncheckedCount: uncheckedItems.length,
|
|
22
|
+
requiredCount: checklist.filter((item) => item.required).length,
|
|
23
|
+
optionalCount: checklist.filter((item) => !item.required).length,
|
|
24
|
+
blockingCount: blockingItems.length,
|
|
25
|
+
blockingUncheckedCount: blockingUncheckedItems.length,
|
|
26
|
+
nonBlockingCount: checklist.filter((item) => !item.completionBlocking).length,
|
|
27
|
+
completionPercent: checklist.length > 0 ? Math.round((checkedItems.length / checklist.length) * 100) : 100,
|
|
28
|
+
progressLabel: `${checkedItems.length}/${checklist.length} complete`,
|
|
29
|
+
allCheckedInitially: uncheckedItems.length === 0,
|
|
30
|
+
hasUncheckedItems: uncheckedItems.length > 0,
|
|
31
|
+
hasBlockingUncheckedItems: blockingUncheckedItems.length > 0,
|
|
32
|
+
canCompleteInitially: blockingUncheckedItems.length === 0,
|
|
33
|
+
firstUncheckedItemKey: firstUncheckedItem.key || "",
|
|
34
|
+
firstUncheckedItemLabel: firstUncheckedItem.label || "",
|
|
35
|
+
firstUncheckedItemMessage: firstUncheckedItem.message || "",
|
|
36
|
+
};
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export function buildExpectedNextInitialValidation(bundle) {
|
|
40
|
+
const expectedNextInitialValidationStates = [
|
|
41
|
+
{
|
|
42
|
+
key: "strictBundleCheckOutput",
|
|
43
|
+
label: "Strict bundle-check output",
|
|
44
|
+
rule: "non-empty-text",
|
|
45
|
+
status: "missing-required",
|
|
46
|
+
statusLabel: "Missing required",
|
|
47
|
+
statusTone: "danger",
|
|
48
|
+
iconName: "alert-circle",
|
|
49
|
+
actionLabel: "Provide evidence",
|
|
50
|
+
helperText: "Required before completion",
|
|
51
|
+
valid: false,
|
|
52
|
+
blocking: true,
|
|
53
|
+
severity: "error",
|
|
54
|
+
required: true,
|
|
55
|
+
allowsEmpty: false,
|
|
56
|
+
touched: false,
|
|
57
|
+
dirty: false,
|
|
58
|
+
valuePresent: false,
|
|
59
|
+
valueLength: 0,
|
|
60
|
+
minLength: 20,
|
|
61
|
+
valueShape: "long-text",
|
|
62
|
+
acceptsMultiple: false,
|
|
63
|
+
emptyValue: "",
|
|
64
|
+
payloadPath: "sourceBundle.verification.strictBundleCheckOutput",
|
|
65
|
+
message: "Provide strict bundle-check output before marking this action complete.",
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
key: "bundleDigest",
|
|
69
|
+
label: "Bundle digest",
|
|
70
|
+
rule: "checksum-or-digest-text",
|
|
71
|
+
status: "missing-required",
|
|
72
|
+
statusLabel: "Missing required",
|
|
73
|
+
statusTone: "danger",
|
|
74
|
+
iconName: "alert-circle",
|
|
75
|
+
actionLabel: "Provide evidence",
|
|
76
|
+
helperText: "Required before completion",
|
|
77
|
+
valid: false,
|
|
78
|
+
blocking: true,
|
|
79
|
+
severity: "error",
|
|
80
|
+
required: true,
|
|
81
|
+
allowsEmpty: false,
|
|
82
|
+
touched: false,
|
|
83
|
+
dirty: false,
|
|
84
|
+
valuePresent: false,
|
|
85
|
+
valueLength: 0,
|
|
86
|
+
minLength: 8,
|
|
87
|
+
valueShape: "short-text",
|
|
88
|
+
acceptsMultiple: false,
|
|
89
|
+
emptyValue: "",
|
|
90
|
+
payloadPath: "sourceBundle.verification.bundleDigest",
|
|
91
|
+
message: "Provide bundle digest before marking this action complete.",
|
|
92
|
+
},
|
|
93
|
+
];
|
|
94
|
+
const expectedNextInitialValidationDisplayMetadata = [
|
|
95
|
+
{
|
|
96
|
+
key: "strictBundleCheckOutput",
|
|
97
|
+
label: "Strict bundle-check output",
|
|
98
|
+
status: "missing-required",
|
|
99
|
+
statusLabel: "Missing required",
|
|
100
|
+
statusTone: "danger",
|
|
101
|
+
iconName: "alert-circle",
|
|
102
|
+
actionLabel: "Provide evidence",
|
|
103
|
+
helperText: "Required before completion",
|
|
104
|
+
blocking: true,
|
|
105
|
+
required: true,
|
|
106
|
+
message: "Provide strict bundle-check output before marking this action complete.",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
key: "bundleDigest",
|
|
110
|
+
label: "Bundle digest",
|
|
111
|
+
status: "missing-required",
|
|
112
|
+
statusLabel: "Missing required",
|
|
113
|
+
statusTone: "danger",
|
|
114
|
+
iconName: "alert-circle",
|
|
115
|
+
actionLabel: "Provide evidence",
|
|
116
|
+
helperText: "Required before completion",
|
|
117
|
+
blocking: true,
|
|
118
|
+
required: true,
|
|
119
|
+
message: "Provide bundle digest before marking this action complete.",
|
|
120
|
+
},
|
|
121
|
+
];
|
|
122
|
+
const expectedNextInitialValidationChecklist = expectedNextInitialValidationStates.map((state) => ({
|
|
123
|
+
key: state.key,
|
|
124
|
+
label: state.label,
|
|
125
|
+
status: state.status,
|
|
126
|
+
statusLabel: state.statusLabel,
|
|
127
|
+
statusTone: state.statusTone,
|
|
128
|
+
iconName: state.iconName,
|
|
129
|
+
actionLabel: state.actionLabel,
|
|
130
|
+
helperText: state.helperText,
|
|
131
|
+
required: state.required,
|
|
132
|
+
blocking: state.blocking,
|
|
133
|
+
completionBlocking: state.blocking,
|
|
134
|
+
checkedInitially: state.valid,
|
|
135
|
+
disabled: false,
|
|
136
|
+
message: state.message,
|
|
137
|
+
payloadPath: state.payloadPath,
|
|
138
|
+
}));
|
|
139
|
+
const expectedNextInitialValidationChecklistSummary = buildExpectedInitialValidationChecklistSummary(
|
|
140
|
+
expectedNextInitialValidationChecklist,
|
|
141
|
+
);
|
|
142
|
+
const expectedNextInitialValidationSummary = {
|
|
143
|
+
status: "blocked",
|
|
144
|
+
statusLabel: "Blocked by required evidence",
|
|
145
|
+
statusTone: "danger",
|
|
146
|
+
iconName: "alert-circle",
|
|
147
|
+
actionLabel: "Provide required evidence",
|
|
148
|
+
helperText: "2 required evidence field(s) need input before completion.",
|
|
149
|
+
fieldCount: 2,
|
|
150
|
+
requiredCount: 2,
|
|
151
|
+
optionalCount: 0,
|
|
152
|
+
validCount: 0,
|
|
153
|
+
invalidCount: 2,
|
|
154
|
+
blockingCount: 2,
|
|
155
|
+
nonBlockingCount: 0,
|
|
156
|
+
missingRequiredCount: 2,
|
|
157
|
+
optionalEmptyCount: 0,
|
|
158
|
+
dangerDisplayCount: 2,
|
|
159
|
+
infoDisplayCount: 0,
|
|
160
|
+
allFieldsPristine: true,
|
|
161
|
+
canCompleteInitially: false,
|
|
162
|
+
firstBlockingFieldKey: "strictBundleCheckOutput",
|
|
163
|
+
firstBlockingFieldLabel: "Strict bundle-check output",
|
|
164
|
+
firstBlockingMessage: "Provide strict bundle-check output before marking this action complete.",
|
|
165
|
+
};
|
|
166
|
+
return {
|
|
167
|
+
expectedNextInitialValidationChecklist,
|
|
168
|
+
expectedNextInitialValidationChecklistSummary,
|
|
169
|
+
expectedNextInitialValidationDisplayMetadata,
|
|
170
|
+
expectedNextInitialValidationStates,
|
|
171
|
+
expectedNextInitialValidationSummary,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
// Aggregate action summary metrics for the bundle-handoff operator runbook.
|
|
2
|
+
|
|
3
|
+
import { uniqueValues } from "./site-bundle-handoff-runbook-evidence.mjs";
|
|
4
|
+
import {
|
|
5
|
+
callsExternalSystem,
|
|
6
|
+
hasCommands,
|
|
7
|
+
hasOutputFile,
|
|
8
|
+
isManualStage,
|
|
9
|
+
isOptionalStage,
|
|
10
|
+
isRequiredStage,
|
|
11
|
+
mutatesTargetRepo,
|
|
12
|
+
usesLocalOutputRunPolicy,
|
|
13
|
+
usesReadOnlyRunPolicy,
|
|
14
|
+
} from "./site-bundle-handoff-runbook-maps.mjs";
|
|
15
|
+
|
|
16
|
+
export function buildActionSummary({
|
|
17
|
+
stages,
|
|
18
|
+
commandStages,
|
|
19
|
+
stageActionRows,
|
|
20
|
+
stageHumanLineMaps,
|
|
21
|
+
nextActionSummary,
|
|
22
|
+
}) {
|
|
23
|
+
const { stageHumanLineDisplayRowSummary, stageHumanLineSummary } = stageHumanLineMaps;
|
|
24
|
+
const countBy = (predicate) => stages.filter(predicate).length;
|
|
25
|
+
const countActions = (predicate) => stageActionRows.filter(predicate).length;
|
|
26
|
+
const firstActionKey = (predicate) => stageActionRows.find(predicate)?.key || "";
|
|
27
|
+
const sumActions = (getValue) => stageActionRows.reduce((sum, stage) => sum + getValue(stage), 0);
|
|
28
|
+
const maxActionValue = (getValue) => Math.max(0, ...stageActionRows.map(getValue));
|
|
29
|
+
const countActionsWithItems = (field) => countActions((stage) => stage[field].length > 0);
|
|
30
|
+
const sumActionItems = (field) => sumActions((stage) => stage[field].length);
|
|
31
|
+
const sumActionItemValues = (field, getValue) => sumActions(
|
|
32
|
+
(stage) => stage[field].reduce((sum, item) => sum + getValue(item), 0),
|
|
33
|
+
);
|
|
34
|
+
const countActionItems = (field, predicate) => sumActions(
|
|
35
|
+
(stage) => stage[field].filter(predicate).length,
|
|
36
|
+
);
|
|
37
|
+
const countEvidenceCaptureFields = (predicate) => countActionItems("actionEvidenceCaptureFields", predicate);
|
|
38
|
+
const countPayloadBindings = (predicate) => countActionItems("actionEvidenceCapturePayloadBindings", predicate);
|
|
39
|
+
const countValidationSpecs = (predicate) => countActionItems("actionEvidenceCaptureValidationSpecs", predicate);
|
|
40
|
+
const countInitialValidationStates = (predicate) => countActionItems("actionEvidenceCaptureInitialValidationStates", predicate);
|
|
41
|
+
const countInitialDisplayRows = (predicate) => countActionItems("actionEvidenceCaptureInitialValidationDisplayMetadata", predicate);
|
|
42
|
+
const countInitialChecklistItems = (predicate) => countActionItems("actionEvidenceCaptureInitialValidationChecklist", predicate);
|
|
43
|
+
const countActionsBySummary = (field, predicate) => countActions((stage) => predicate(stage[field]));
|
|
44
|
+
const sumSummaryValues = (field, getValue) => sumActions((stage) => getValue(stage[field]));
|
|
45
|
+
const countInitialValidationSummaries = (predicate) => (
|
|
46
|
+
countActionsBySummary("actionEvidenceCaptureInitialValidationSummary", predicate)
|
|
47
|
+
);
|
|
48
|
+
const sumInitialValidationSummaryValues = (getValue) => (
|
|
49
|
+
sumSummaryValues("actionEvidenceCaptureInitialValidationSummary", getValue)
|
|
50
|
+
);
|
|
51
|
+
const countInitialChecklistSummaries = (predicate) => (
|
|
52
|
+
countActionsBySummary("actionEvidenceCaptureInitialValidationChecklistSummary", predicate)
|
|
53
|
+
);
|
|
54
|
+
const sumInitialChecklistSummaryValues = (getValue) => (
|
|
55
|
+
sumSummaryValues("actionEvidenceCaptureInitialValidationChecklistSummary", getValue)
|
|
56
|
+
);
|
|
57
|
+
const uniqueActionListValueCount = (field) => uniqueValues(stageActionRows.flatMap((stage) => stage[field])).length;
|
|
58
|
+
const payloadTemplatePathCount = (stage) => Object.keys(stage.actionEvidenceCapturePayloadFlatTemplate).length;
|
|
59
|
+
const maxActionItemValue = (field, getValue) => Math.max(
|
|
60
|
+
0,
|
|
61
|
+
...stageActionRows.flatMap((stage) => stage[field].map(getValue)),
|
|
62
|
+
);
|
|
63
|
+
const maxEvidenceCaptureFieldValue = (getValue) => maxActionItemValue("actionEvidenceCaptureFields", getValue);
|
|
64
|
+
const firstActionWithEvidenceCaptureField = (predicate) => (
|
|
65
|
+
firstActionKey((stage) => stage.actionEvidenceCaptureFields.some(predicate))
|
|
66
|
+
);
|
|
67
|
+
const firstStageKey = (predicate) => stages.find(predicate)?.key || "";
|
|
68
|
+
const isActionEnabled = (action) => action.actionEnabled;
|
|
69
|
+
const isActionDisabled = (action) => !action.actionEnabled;
|
|
70
|
+
const isManualDisabledAction = (action) => isActionDisabled(action) && action.manual;
|
|
71
|
+
const hasActionPrerequisites = (action) => action.actionHasPrerequisites;
|
|
72
|
+
const hasActionDependencyReason = (action) => action.actionDependencyReasonCode;
|
|
73
|
+
const blocksOtherActions = (action) => action.actionBlocksStages;
|
|
74
|
+
const hasActionCompletionCriteria = (action) => action.actionHasCompletionCriteria;
|
|
75
|
+
const requiresActionEvidence = (action) => action.actionRequiresEvidence;
|
|
76
|
+
const targetsLocalCommandEvidence = (action) => action.actionEvidenceTarget === "local-command-output";
|
|
77
|
+
const targetsLocalOutputEvidence = (action) => action.actionEvidenceTarget === "local-output-file";
|
|
78
|
+
const targetsTargetRepoEvidence = (action) => action.actionEvidenceTarget === "target-repo-working-tree";
|
|
79
|
+
const targetsHandoffRecordEvidence = (action) => action.actionEvidenceTarget === "handoff-evidence-record";
|
|
80
|
+
const hasActionEvidenceCaptureFields = (action) => action.actionHasEvidenceCaptureFields;
|
|
81
|
+
const hasRequiredActionEvidenceCaptureFields = (action) => action.actionRequiredEvidenceCaptureFieldCount > 0;
|
|
82
|
+
const hasOptionalActionEvidenceCaptureFields = (action) => action.actionOptionalEvidenceCaptureFieldCount > 0;
|
|
83
|
+
const hasMultipleEvidenceCaptureSections = (action) => action.actionEvidenceCaptureSectionCount > 1;
|
|
84
|
+
const hasMultipleEvidenceCapturePayloadNamespaces = (action) => action.actionEvidenceCapturePayloadNamespaceCount > 1;
|
|
85
|
+
const hasEvidenceCapturePayloadTemplate = (action) => payloadTemplatePathCount(action) > 0;
|
|
86
|
+
const isManualAction = (action) => action.manual;
|
|
87
|
+
const isManualEvidenceAction = (action) => action.actionType === "manual-evidence";
|
|
88
|
+
const usesTextareaInput = (field) => field.inputType === "textarea";
|
|
89
|
+
const usesTextInput = (field) => field.inputType === "text";
|
|
90
|
+
const usesFilePathInput = (field) => field.inputType === "file-path";
|
|
91
|
+
const usesListInput = (field) => field.inputType === "list";
|
|
92
|
+
const capturesLongText = (field) => field.valueShape === "long-text";
|
|
93
|
+
const capturesShortText = (field) => field.valueShape === "short-text";
|
|
94
|
+
const capturesFilePathValue = (field) => field.valueShape === "file-path";
|
|
95
|
+
const capturesStringList = (field) => field.valueShape === "string-list";
|
|
96
|
+
const acceptsMultipleValues = (item) => item.acceptsMultiple;
|
|
97
|
+
const acceptsSingleValue = (item) => !item.acceptsMultiple;
|
|
98
|
+
const hasEmptyStringValue = (field) => field.emptyValue === "";
|
|
99
|
+
const hasEmptyListValue = (field) => Array.isArray(field.emptyValue);
|
|
100
|
+
const hasPlaceholder = (field) => Boolean(field.placeholder);
|
|
101
|
+
const hasAriaLabel = (field) => Boolean(field.ariaLabel);
|
|
102
|
+
const hasHelpText = (field) => Boolean(field.helpText);
|
|
103
|
+
const belongsToEvidenceCaptureSection = (field) => Boolean(field.sectionKey);
|
|
104
|
+
const mapsToPayloadPath = (field) => Boolean(field.payloadPath);
|
|
105
|
+
const isRequiredItem = (item) => item.required;
|
|
106
|
+
const isOptionalItem = (item) => !item.required;
|
|
107
|
+
const hasValidationRule = (item) => Boolean(item.validationRule);
|
|
108
|
+
const isRequiredValidatedField = (field) => isRequiredItem(field) && hasValidationRule(field);
|
|
109
|
+
const isOptionalValidatedField = (field) => isOptionalItem(field) && hasValidationRule(field);
|
|
110
|
+
const isErrorValidationSpec = (spec) => spec.severity === "error";
|
|
111
|
+
const isInfoValidationSpec = (spec) => spec.severity === "info";
|
|
112
|
+
const isValidInitialState = (state) => state.valid;
|
|
113
|
+
const isInvalidInitialState = (state) => !state.valid;
|
|
114
|
+
const isBlockingInitialState = (state) => state.blocking;
|
|
115
|
+
const isOptionalEmptyInitialState = (state) => state.status === "optional-empty";
|
|
116
|
+
const isMissingRequiredInitialState = (state) => state.status === "missing-required";
|
|
117
|
+
const isPristineInitialState = (state) => !state.dirty && !state.touched;
|
|
118
|
+
const isDangerInitialDisplayRow = (display) => display.statusTone === "danger";
|
|
119
|
+
const isInfoInitialDisplayRow = (display) => display.statusTone === "info";
|
|
120
|
+
const isBlockingInitialDisplayRow = (display) => display.blocking;
|
|
121
|
+
const isNonBlockingInitialDisplayRow = (display) => !display.blocking;
|
|
122
|
+
const isInitiallyCheckedChecklistItem = (item) => item.checkedInitially;
|
|
123
|
+
const isInitiallyUncheckedChecklistItem = (item) => !item.checkedInitially;
|
|
124
|
+
const blocksChecklistCompletion = (item) => item.completionBlocking;
|
|
125
|
+
const doesNotBlockChecklistCompletion = (item) => !item.completionBlocking;
|
|
126
|
+
const actionCountSummary = {
|
|
127
|
+
totalActionCount: stages.length,
|
|
128
|
+
commandActionCount: commandStages.length,
|
|
129
|
+
manualActionCount: countBy(isManualStage),
|
|
130
|
+
enabledActionCount: countActions(isActionEnabled),
|
|
131
|
+
disabledActionCount: countActions(isActionDisabled),
|
|
132
|
+
manualDisabledActionCount: countActions(isManualDisabledAction),
|
|
133
|
+
};
|
|
134
|
+
const actionDependencySummary = {
|
|
135
|
+
actionWithPrerequisiteCount: countActions(hasActionPrerequisites),
|
|
136
|
+
maxActionPrerequisiteCount: maxActionValue((stage) => stage.actionPrerequisiteCount),
|
|
137
|
+
actionWithDependencyReasonCount: countActions(hasActionDependencyReason),
|
|
138
|
+
actionBlockingOtherActionCount: countActions(blocksOtherActions),
|
|
139
|
+
maxActionBlockedStageCount: maxActionValue((stage) => stage.actionBlockedStageCount),
|
|
140
|
+
actionWithCompletionCriteriaCount: countActions(hasActionCompletionCriteria),
|
|
141
|
+
totalActionCompletionCriteriaCount: sumActions((stage) => stage.actionCompletionCriteriaCount),
|
|
142
|
+
maxActionCompletionCriteriaCount: maxActionValue((stage) => stage.actionCompletionCriteriaCount),
|
|
143
|
+
};
|
|
144
|
+
const actionEvidenceSummary = {
|
|
145
|
+
actionRequiringEvidenceCount: countActions(requiresActionEvidence),
|
|
146
|
+
totalActionEvidenceRequirementCount: sumActions((stage) => stage.actionEvidenceRequirementCount),
|
|
147
|
+
maxActionEvidenceRequirementCount: maxActionValue((stage) => stage.actionEvidenceRequirementCount),
|
|
148
|
+
localCommandEvidenceActionCount: countActions(targetsLocalCommandEvidence),
|
|
149
|
+
localOutputEvidenceActionCount: countActions(targetsLocalOutputEvidence),
|
|
150
|
+
targetRepoEvidenceActionCount: countActions(targetsTargetRepoEvidence),
|
|
151
|
+
handoffRecordEvidenceActionCount: countActions(targetsHandoffRecordEvidence),
|
|
152
|
+
};
|
|
153
|
+
const actionEvidenceCaptureFieldSummary = {
|
|
154
|
+
actionWithEvidenceCaptureFieldCount: countActions(hasActionEvidenceCaptureFields),
|
|
155
|
+
actionWithRequiredEvidenceCaptureFieldCount: countActions(hasRequiredActionEvidenceCaptureFields),
|
|
156
|
+
actionWithOptionalEvidenceCaptureFieldCount: countActions(hasOptionalActionEvidenceCaptureFields),
|
|
157
|
+
totalActionEvidenceCaptureFieldCount: sumActions((stage) => stage.actionEvidenceCaptureFieldCount),
|
|
158
|
+
totalRequiredActionEvidenceCaptureFieldCount: sumActions((stage) => stage.actionRequiredEvidenceCaptureFieldCount),
|
|
159
|
+
totalOptionalActionEvidenceCaptureFieldCount: sumActions((stage) => stage.actionOptionalEvidenceCaptureFieldCount),
|
|
160
|
+
maxActionEvidenceCaptureFieldCount: maxActionValue((stage) => stage.actionEvidenceCaptureFieldCount),
|
|
161
|
+
textareaEvidenceCaptureFieldCount: countEvidenceCaptureFields(usesTextareaInput),
|
|
162
|
+
textEvidenceCaptureFieldCount: countEvidenceCaptureFields(usesTextInput),
|
|
163
|
+
filePathEvidenceCaptureFieldCount: countEvidenceCaptureFields(usesFilePathInput),
|
|
164
|
+
listEvidenceCaptureFieldCount: countEvidenceCaptureFields(usesListInput),
|
|
165
|
+
longTextEvidenceCaptureFieldCount: countEvidenceCaptureFields(capturesLongText),
|
|
166
|
+
shortTextEvidenceCaptureFieldCount: countEvidenceCaptureFields(capturesShortText),
|
|
167
|
+
filePathValueEvidenceCaptureFieldCount: countEvidenceCaptureFields(capturesFilePathValue),
|
|
168
|
+
stringListEvidenceCaptureFieldCount: countEvidenceCaptureFields(capturesStringList),
|
|
169
|
+
multiValueEvidenceCaptureFieldCount: countEvidenceCaptureFields(acceptsMultipleValues),
|
|
170
|
+
singleValueEvidenceCaptureFieldCount: countEvidenceCaptureFields(acceptsSingleValue),
|
|
171
|
+
emptyStringEvidenceCaptureFieldCount: countEvidenceCaptureFields(hasEmptyStringValue),
|
|
172
|
+
emptyListEvidenceCaptureFieldCount: countEvidenceCaptureFields(hasEmptyListValue),
|
|
173
|
+
placeholderEvidenceCaptureFieldCount: countEvidenceCaptureFields(hasPlaceholder),
|
|
174
|
+
ariaLabelEvidenceCaptureFieldCount: countEvidenceCaptureFields(hasAriaLabel),
|
|
175
|
+
helpTextEvidenceCaptureFieldCount: countEvidenceCaptureFields(hasHelpText),
|
|
176
|
+
sectionedEvidenceCaptureFieldCount: countEvidenceCaptureFields(belongsToEvidenceCaptureSection),
|
|
177
|
+
uniqueEvidenceCaptureSectionCount: uniqueActionListValueCount("actionEvidenceCaptureSectionKeys"),
|
|
178
|
+
actionWithMultipleEvidenceCaptureSectionCount: countActions(hasMultipleEvidenceCaptureSections),
|
|
179
|
+
maxActionEvidenceCaptureSectionCount: maxActionValue((stage) => stage.actionEvidenceCaptureSectionCount),
|
|
180
|
+
payloadMappedEvidenceCaptureFieldCount: countEvidenceCaptureFields(mapsToPayloadPath),
|
|
181
|
+
};
|
|
182
|
+
const actionEvidenceCapturePayloadSummary = {
|
|
183
|
+
uniqueEvidenceCapturePayloadNamespaceCount: uniqueActionListValueCount("actionEvidenceCapturePayloadNamespaces"),
|
|
184
|
+
actionWithMultipleEvidenceCapturePayloadNamespaceCount: countActions(hasMultipleEvidenceCapturePayloadNamespaces),
|
|
185
|
+
maxActionEvidenceCapturePayloadNamespaceCount: maxActionValue((stage) => stage.actionEvidenceCapturePayloadNamespaceCount),
|
|
186
|
+
actionWithEvidenceCapturePayloadTemplateCount: countActions(hasEvidenceCapturePayloadTemplate),
|
|
187
|
+
evidenceCapturePayloadTemplatePathCount: sumActions(payloadTemplatePathCount),
|
|
188
|
+
maxActionEvidenceCapturePayloadTemplatePathCount: maxActionValue(payloadTemplatePathCount),
|
|
189
|
+
actionWithEvidenceCapturePayloadBindingCount: countActionsWithItems("actionEvidenceCapturePayloadBindings"),
|
|
190
|
+
evidenceCapturePayloadBindingCount: sumActionItems("actionEvidenceCapturePayloadBindings"),
|
|
191
|
+
requiredEvidenceCapturePayloadBindingCount: countPayloadBindings(isRequiredItem),
|
|
192
|
+
optionalEvidenceCapturePayloadBindingCount: countPayloadBindings(isOptionalItem),
|
|
193
|
+
multiValueEvidenceCapturePayloadBindingCount: countPayloadBindings(acceptsMultipleValues),
|
|
194
|
+
};
|
|
195
|
+
const actionEvidenceCaptureValidationSummary = {
|
|
196
|
+
actionWithEvidenceCaptureValidationSpecCount: countActionsWithItems("actionEvidenceCaptureValidationSpecs"),
|
|
197
|
+
evidenceCaptureValidationSpecCount: sumActionItems("actionEvidenceCaptureValidationSpecs"),
|
|
198
|
+
requiredEvidenceCaptureValidationSpecCount: countValidationSpecs(isRequiredItem),
|
|
199
|
+
optionalEvidenceCaptureValidationSpecCount: countValidationSpecs(isOptionalItem),
|
|
200
|
+
errorEvidenceCaptureValidationSpecCount: countValidationSpecs(isErrorValidationSpec),
|
|
201
|
+
infoEvidenceCaptureValidationSpecCount: countValidationSpecs(isInfoValidationSpec),
|
|
202
|
+
multiValueEvidenceCaptureValidationSpecCount: countValidationSpecs(acceptsMultipleValues),
|
|
203
|
+
};
|
|
204
|
+
const actionEvidenceCaptureInitialStateSummary = {
|
|
205
|
+
actionWithEvidenceCaptureInitialValidationStateCount: countActionsWithItems("actionEvidenceCaptureInitialValidationStates"),
|
|
206
|
+
evidenceCaptureInitialValidationStateCount: sumActionItems("actionEvidenceCaptureInitialValidationStates"),
|
|
207
|
+
validInitialEvidenceCaptureStateCount: countInitialValidationStates(isValidInitialState),
|
|
208
|
+
invalidInitialEvidenceCaptureStateCount: countInitialValidationStates(isInvalidInitialState),
|
|
209
|
+
blockingInitialEvidenceCaptureStateCount: countInitialValidationStates(isBlockingInitialState),
|
|
210
|
+
optionalEmptyInitialEvidenceCaptureStateCount: countInitialValidationStates(isOptionalEmptyInitialState),
|
|
211
|
+
missingRequiredInitialEvidenceCaptureStateCount: countInitialValidationStates(isMissingRequiredInitialState),
|
|
212
|
+
pristineInitialEvidenceCaptureStateCount: countInitialValidationStates(isPristineInitialState),
|
|
213
|
+
};
|
|
214
|
+
const actionEvidenceCaptureInitialDisplaySummary = {
|
|
215
|
+
actionWithEvidenceCaptureInitialValidationDisplayMetadataCount: countActionsWithItems("actionEvidenceCaptureInitialValidationDisplayMetadata"),
|
|
216
|
+
evidenceCaptureInitialValidationDisplayMetadataCount: sumActionItems("actionEvidenceCaptureInitialValidationDisplayMetadata"),
|
|
217
|
+
dangerInitialEvidenceCaptureDisplayMetadataCount: countInitialDisplayRows(isDangerInitialDisplayRow),
|
|
218
|
+
infoInitialEvidenceCaptureDisplayMetadataCount: countInitialDisplayRows(isInfoInitialDisplayRow),
|
|
219
|
+
blockingInitialEvidenceCaptureDisplayMetadataCount: countInitialDisplayRows(isBlockingInitialDisplayRow),
|
|
220
|
+
nonBlockingInitialEvidenceCaptureDisplayMetadataCount: countInitialDisplayRows(isNonBlockingInitialDisplayRow),
|
|
221
|
+
};
|
|
222
|
+
const actionEvidenceCaptureInitialValidationSummary = {
|
|
223
|
+
actionWithEvidenceCaptureInitialValidationSummaryCount: countInitialValidationSummaries((summary) => summary.fieldCount > 0),
|
|
224
|
+
blockedInitialEvidenceCaptureSummaryActionCount: countInitialValidationSummaries((summary) => summary.status === "blocked"),
|
|
225
|
+
readyInitialEvidenceCaptureSummaryActionCount: countInitialValidationSummaries((summary) => summary.status === "ready"),
|
|
226
|
+
completableInitialEvidenceCaptureSummaryActionCount: countInitialValidationSummaries((summary) => summary.canCompleteInitially),
|
|
227
|
+
nonCompletableInitialEvidenceCaptureSummaryActionCount: countInitialValidationSummaries((summary) => !summary.canCompleteInitially),
|
|
228
|
+
initialEvidenceCaptureSummaryBlockingFieldCount: sumInitialValidationSummaryValues((summary) => summary.blockingCount),
|
|
229
|
+
initialEvidenceCaptureSummaryMissingRequiredFieldCount: sumInitialValidationSummaryValues((summary) => summary.missingRequiredCount),
|
|
230
|
+
initialEvidenceCaptureSummaryOptionalEmptyFieldCount: sumInitialValidationSummaryValues((summary) => summary.optionalEmptyCount),
|
|
231
|
+
};
|
|
232
|
+
const actionEvidenceCaptureInitialChecklistSummary = {
|
|
233
|
+
actionWithEvidenceCaptureInitialValidationChecklistCount: countActionsWithItems("actionEvidenceCaptureInitialValidationChecklist"),
|
|
234
|
+
evidenceCaptureInitialValidationChecklistItemCount: sumActionItems("actionEvidenceCaptureInitialValidationChecklist"),
|
|
235
|
+
checkedInitialEvidenceCaptureChecklistItemCount: countInitialChecklistItems(isInitiallyCheckedChecklistItem),
|
|
236
|
+
uncheckedInitialEvidenceCaptureChecklistItemCount: countInitialChecklistItems(isInitiallyUncheckedChecklistItem),
|
|
237
|
+
blockingInitialEvidenceCaptureChecklistItemCount: countInitialChecklistItems(blocksChecklistCompletion),
|
|
238
|
+
nonBlockingInitialEvidenceCaptureChecklistItemCount: countInitialChecklistItems(doesNotBlockChecklistCompletion),
|
|
239
|
+
requiredInitialEvidenceCaptureChecklistItemCount: countInitialChecklistItems(isRequiredItem),
|
|
240
|
+
optionalInitialEvidenceCaptureChecklistItemCount: countInitialChecklistItems(isOptionalItem),
|
|
241
|
+
actionWithEvidenceCaptureInitialValidationChecklistSummaryCount: countInitialChecklistSummaries((summary) => summary.itemCount > 0),
|
|
242
|
+
blockedInitialEvidenceCaptureChecklistSummaryActionCount: countInitialChecklistSummaries((summary) => summary.status === "blocked"),
|
|
243
|
+
readyInitialEvidenceCaptureChecklistSummaryActionCount: countInitialChecklistSummaries((summary) => summary.status === "ready"),
|
|
244
|
+
completeInitialEvidenceCaptureChecklistSummaryActionCount: countInitialChecklistSummaries((summary) => summary.allCheckedInitially),
|
|
245
|
+
incompleteInitialEvidenceCaptureChecklistSummaryActionCount: countInitialChecklistSummaries((summary) => !summary.allCheckedInitially),
|
|
246
|
+
initialEvidenceCaptureChecklistSummaryCheckedItemCount: sumInitialChecklistSummaryValues((summary) => summary.checkedCount),
|
|
247
|
+
initialEvidenceCaptureChecklistSummaryUncheckedItemCount: sumInitialChecklistSummaryValues((summary) => summary.uncheckedCount),
|
|
248
|
+
initialEvidenceCaptureChecklistSummaryBlockingUncheckedItemCount: sumInitialChecklistSummaryValues((summary) => summary.blockingUncheckedCount),
|
|
249
|
+
};
|
|
250
|
+
const humanLineActionSummary = {
|
|
251
|
+
humanLineCount: stageHumanLineSummary.count,
|
|
252
|
+
humanLineByKeyCount: stageHumanLineSummary.byKeyCount,
|
|
253
|
+
humanLineWithEvidenceProgressCount: stageHumanLineSummary.evidenceProgressCount,
|
|
254
|
+
humanLineWithBlockedEvidenceProgressCount: stageHumanLineSummary.blockedEvidenceProgressCount,
|
|
255
|
+
humanLineWithReadyEvidenceProgressCount: stageHumanLineSummary.readyEvidenceProgressCount,
|
|
256
|
+
humanLineDisplayRowCount: stageHumanLineDisplayRowSummary.count,
|
|
257
|
+
humanLineDisplayRowByKeyCount: stageHumanLineDisplayRowSummary.byKeyCount,
|
|
258
|
+
humanLineDisplayRowWithEvidenceProgressCount: stageHumanLineDisplayRowSummary.evidenceProgressCount,
|
|
259
|
+
humanLineDisplayRowWithBlockedEvidenceProgressCount: stageHumanLineDisplayRowSummary.blockedEvidenceProgressCount,
|
|
260
|
+
humanLineDisplayRowWithReadyEvidenceProgressCount: stageHumanLineDisplayRowSummary.readyEvidenceProgressCount,
|
|
261
|
+
humanLineDisplayRowReadyActionCount: stageHumanLineDisplayRowSummary.readyActionStatusCount,
|
|
262
|
+
humanLineDisplayRowManualActionCount: stageHumanLineDisplayRowSummary.manualActionStatusCount,
|
|
263
|
+
};
|
|
264
|
+
const evidenceCaptureValidatedFieldSummary = {
|
|
265
|
+
validatedEvidenceCaptureFieldCount: countEvidenceCaptureFields(hasValidationRule),
|
|
266
|
+
requiredValidatedEvidenceCaptureFieldCount: countEvidenceCaptureFields(isRequiredValidatedField),
|
|
267
|
+
optionalValidatedEvidenceCaptureFieldCount: countEvidenceCaptureFields(isOptionalValidatedField),
|
|
268
|
+
minEvidenceCaptureFieldLengthTotal: sumActionItemValues(
|
|
269
|
+
"actionEvidenceCaptureFields",
|
|
270
|
+
(field) => field.minLength,
|
|
271
|
+
),
|
|
272
|
+
maxEvidenceCaptureFieldMinLength: maxEvidenceCaptureFieldValue((field) => field.minLength),
|
|
273
|
+
};
|
|
274
|
+
const actionRunPolicySummary = {
|
|
275
|
+
requiredActionCount: countBy(isRequiredStage),
|
|
276
|
+
optionalActionCount: countBy(isOptionalStage),
|
|
277
|
+
readOnlyActionCount: countBy(usesReadOnlyRunPolicy),
|
|
278
|
+
localOutputActionCount: countBy(usesLocalOutputRunPolicy),
|
|
279
|
+
outputFileActionCount: countBy(hasOutputFile),
|
|
280
|
+
externalCallActionCount: countBy(callsExternalSystem),
|
|
281
|
+
targetRepoMutationActionCount: countBy(mutatesTargetRepo),
|
|
282
|
+
};
|
|
283
|
+
const firstActionLookupSummary = {
|
|
284
|
+
firstRequiredCommandStageKey: firstStageKey((stage) => isRequiredStage(stage) && hasCommands(stage)),
|
|
285
|
+
firstLocalOutputStageKey: firstStageKey((stage) => stage.writesLocalFile),
|
|
286
|
+
firstManualStageKey: firstStageKey(isManualStage),
|
|
287
|
+
firstRequiredManualStageKey: firstStageKey((stage) => isRequiredStage(stage) && isManualStage(stage)),
|
|
288
|
+
firstEvidenceStageKey: firstStageKey((stage) => stage.kind === "manual-reporting"),
|
|
289
|
+
firstActionWithPrerequisiteKey: firstActionKey(hasActionPrerequisites),
|
|
290
|
+
firstManualActionWithPrerequisiteKey: firstActionKey((action) => isManualAction(action) && hasActionPrerequisites(action)),
|
|
291
|
+
firstEvidenceActionWithPrerequisiteKey: firstActionKey((action) => isManualEvidenceAction(action) && hasActionPrerequisites(action)),
|
|
292
|
+
firstActionWithDependencyReasonKey: firstActionKey(hasActionDependencyReason),
|
|
293
|
+
firstActionBlockingOtherActionKey: firstActionKey(blocksOtherActions),
|
|
294
|
+
firstActionWithCompletionCriteriaKey: firstActionKey(hasActionCompletionCriteria),
|
|
295
|
+
firstManualActionWithCompletionCriteriaKey: firstActionKey((action) => isManualAction(action) && hasActionCompletionCriteria(action)),
|
|
296
|
+
firstActionRequiringEvidenceKey: firstActionKey(requiresActionEvidence),
|
|
297
|
+
firstManualActionRequiringEvidenceKey: firstActionKey((action) => isManualAction(action) && requiresActionEvidence(action)),
|
|
298
|
+
firstEvidenceRecordingActionKey: firstActionKey((action) => isManualEvidenceAction(action) && requiresActionEvidence(action)),
|
|
299
|
+
firstTargetRepoEvidenceActionKey: firstActionKey(targetsTargetRepoEvidence),
|
|
300
|
+
firstLocalOutputEvidenceActionKey: firstActionKey(targetsLocalOutputEvidence),
|
|
301
|
+
firstActionWithEvidenceCaptureFieldKey: firstActionKey(hasActionEvidenceCaptureFields),
|
|
302
|
+
firstActionWithOptionalEvidenceCaptureFieldKey: firstActionKey(hasOptionalActionEvidenceCaptureFields),
|
|
303
|
+
firstManualActionWithEvidenceCaptureFieldKey: firstActionKey((action) => isManualAction(action) && hasActionEvidenceCaptureFields(action)),
|
|
304
|
+
firstTextareaEvidenceCaptureActionKey: firstActionWithEvidenceCaptureField(usesTextareaInput),
|
|
305
|
+
firstMultiValueEvidenceCaptureActionKey: firstActionWithEvidenceCaptureField(acceptsMultipleValues),
|
|
306
|
+
firstValidationRuleEvidenceCaptureActionKey: firstActionWithEvidenceCaptureField(hasValidationRule),
|
|
307
|
+
};
|
|
308
|
+
const actionBoundarySummary = {
|
|
309
|
+
requiresTargetRepoWork: stages.some((stage) => stage.kind === "manual-target-repo"),
|
|
310
|
+
requiresEvidenceReturn: stages.some((stage) => stage.kind === "manual-reporting"),
|
|
311
|
+
externalCalls: stages.some(callsExternalSystem),
|
|
312
|
+
targetRepoMutation: stages.some(mutatesTargetRepo),
|
|
313
|
+
};
|
|
314
|
+
return {
|
|
315
|
+
...actionCountSummary,
|
|
316
|
+
...actionDependencySummary,
|
|
317
|
+
...actionEvidenceSummary,
|
|
318
|
+
...actionEvidenceCaptureFieldSummary,
|
|
319
|
+
...actionEvidenceCapturePayloadSummary,
|
|
320
|
+
...actionEvidenceCaptureValidationSummary,
|
|
321
|
+
...actionEvidenceCaptureInitialStateSummary,
|
|
322
|
+
...actionEvidenceCaptureInitialDisplaySummary,
|
|
323
|
+
...actionEvidenceCaptureInitialValidationSummary,
|
|
324
|
+
...actionEvidenceCaptureInitialChecklistSummary,
|
|
325
|
+
...humanLineActionSummary,
|
|
326
|
+
...evidenceCaptureValidatedFieldSummary,
|
|
327
|
+
...actionRunPolicySummary,
|
|
328
|
+
...nextActionSummary,
|
|
329
|
+
...firstActionLookupSummary,
|
|
330
|
+
...actionBoundarySummary,
|
|
331
|
+
};
|
|
332
|
+
}
|