@transitrix/diagrams 1.0.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/LICENSE +21 -0
- package/README.md +47 -0
- package/dist/__tests__/edge-path.test.d.ts +1 -0
- package/dist/__tests__/edge-path.test.js +39 -0
- package/dist/__tests__/scope.test.d.ts +1 -0
- package/dist/__tests__/scope.test.js +23 -0
- package/dist/__tests__/yaml-normalize.test.d.ts +1 -0
- package/dist/__tests__/yaml-normalize.test.js +148 -0
- package/dist/activities/__tests__/cpm.test.d.ts +1 -0
- package/dist/activities/__tests__/cpm.test.js +146 -0
- package/dist/activities/__tests__/gantt.test.d.ts +1 -0
- package/dist/activities/__tests__/gantt.test.js +224 -0
- package/dist/activities/__tests__/layout.test.d.ts +1 -0
- package/dist/activities/__tests__/layout.test.js +98 -0
- package/dist/activities/__tests__/validate.test.d.ts +1 -0
- package/dist/activities/__tests__/validate.test.js +363 -0
- package/dist/activities/cpm.d.ts +2 -0
- package/dist/activities/cpm.js +86 -0
- package/dist/activities/gantt.d.ts +6 -0
- package/dist/activities/gantt.js +250 -0
- package/dist/activities/index.d.ts +5 -0
- package/dist/activities/index.js +4 -0
- package/dist/activities/layout.d.ts +2 -0
- package/dist/activities/layout.js +103 -0
- package/dist/activities/types.d.ts +125 -0
- package/dist/activities/types.js +1 -0
- package/dist/activities/validate.d.ts +2 -0
- package/dist/activities/validate.js +326 -0
- package/dist/activity-card/__tests__/example.test.d.ts +1 -0
- package/dist/activity-card/__tests__/example.test.js +56 -0
- package/dist/activity-card/__tests__/layout.test.d.ts +1 -0
- package/dist/activity-card/__tests__/layout.test.js +57 -0
- package/dist/activity-card/__tests__/resolver.test.d.ts +1 -0
- package/dist/activity-card/__tests__/resolver.test.js +146 -0
- package/dist/activity-card/__tests__/validate.test.d.ts +1 -0
- package/dist/activity-card/__tests__/validate.test.js +116 -0
- package/dist/activity-card/index.d.ts +5 -0
- package/dist/activity-card/index.js +3 -0
- package/dist/activity-card/layout.d.ts +7 -0
- package/dist/activity-card/layout.js +167 -0
- package/dist/activity-card/resolver.d.ts +7 -0
- package/dist/activity-card/resolver.js +310 -0
- package/dist/activity-card/types.d.ts +175 -0
- package/dist/activity-card/types.js +20 -0
- package/dist/activity-card/validate.d.ts +3 -0
- package/dist/activity-card/validate.js +145 -0
- package/dist/actor/__tests__/validate.test.d.ts +1 -0
- package/dist/actor/__tests__/validate.test.js +57 -0
- package/dist/actor/index.d.ts +3 -0
- package/dist/actor/index.js +2 -0
- package/dist/actor/types.d.ts +20 -0
- package/dist/actor/types.js +4 -0
- package/dist/actor/validate.d.ts +2 -0
- package/dist/actor/validate.js +34 -0
- package/dist/applications/__tests__/validate.test.d.ts +1 -0
- package/dist/applications/__tests__/validate.test.js +223 -0
- package/dist/applications/index.d.ts +2 -0
- package/dist/applications/index.js +1 -0
- package/dist/applications/types.d.ts +39 -0
- package/dist/applications/types.js +1 -0
- package/dist/applications/validate.d.ts +3 -0
- package/dist/applications/validate.js +109 -0
- package/dist/assertion/__tests__/example.test.d.ts +1 -0
- package/dist/assertion/__tests__/example.test.js +32 -0
- package/dist/assertion/__tests__/validate.test.d.ts +1 -0
- package/dist/assertion/__tests__/validate.test.js +130 -0
- package/dist/assertion/index.d.ts +4 -0
- package/dist/assertion/index.js +2 -0
- package/dist/assertion/types.d.ts +43 -0
- package/dist/assertion/types.js +7 -0
- package/dist/assertion/validate.d.ts +9 -0
- package/dist/assertion/validate.js +137 -0
- package/dist/blocks/__tests__/layout.test.d.ts +1 -0
- package/dist/blocks/__tests__/layout.test.js +153 -0
- package/dist/blocks/__tests__/validate.test.d.ts +1 -0
- package/dist/blocks/__tests__/validate.test.js +235 -0
- package/dist/blocks/index.d.ts +4 -0
- package/dist/blocks/index.js +2 -0
- package/dist/blocks/layout.d.ts +4 -0
- package/dist/blocks/layout.js +145 -0
- package/dist/blocks/types.d.ts +56 -0
- package/dist/blocks/types.js +1 -0
- package/dist/blocks/validate.d.ts +9 -0
- package/dist/blocks/validate.js +186 -0
- package/dist/capability-map/__tests__/validate.test.d.ts +1 -0
- package/dist/capability-map/__tests__/validate.test.js +212 -0
- package/dist/capability-map/index.d.ts +2 -0
- package/dist/capability-map/index.js +1 -0
- package/dist/capability-map/types.d.ts +26 -0
- package/dist/capability-map/types.js +1 -0
- package/dist/capability-map/validate.d.ts +3 -0
- package/dist/capability-map/validate.js +103 -0
- package/dist/change/__tests__/validate.test.d.ts +1 -0
- package/dist/change/__tests__/validate.test.js +73 -0
- package/dist/change/index.d.ts +2 -0
- package/dist/change/index.js +1 -0
- package/dist/change/types.d.ts +17 -0
- package/dist/change/types.js +3 -0
- package/dist/change/validate.d.ts +2 -0
- package/dist/change/validate.js +57 -0
- package/dist/compliance/__tests__/classify.test.d.ts +1 -0
- package/dist/compliance/__tests__/classify.test.js +24 -0
- package/dist/compliance/__tests__/confidence.test.d.ts +1 -0
- package/dist/compliance/__tests__/confidence.test.js +78 -0
- package/dist/compliance/__tests__/coverage-metric.test.d.ts +1 -0
- package/dist/compliance/__tests__/coverage-metric.test.js +164 -0
- package/dist/compliance/__tests__/demo-scenario.test.d.ts +1 -0
- package/dist/compliance/__tests__/demo-scenario.test.js +226 -0
- package/dist/compliance/__tests__/example.test.d.ts +1 -0
- package/dist/compliance/__tests__/example.test.js +51 -0
- package/dist/compliance/__tests__/gap-report.test.d.ts +1 -0
- package/dist/compliance/__tests__/gap-report.test.js +113 -0
- package/dist/compliance/__tests__/html.test.d.ts +1 -0
- package/dist/compliance/__tests__/html.test.js +122 -0
- package/dist/compliance/__tests__/impact.test.d.ts +1 -0
- package/dist/compliance/__tests__/impact.test.js +410 -0
- package/dist/compliance/__tests__/markdown.test.d.ts +1 -0
- package/dist/compliance/__tests__/markdown.test.js +85 -0
- package/dist/compliance/__tests__/views.test.d.ts +1 -0
- package/dist/compliance/__tests__/views.test.js +59 -0
- package/dist/compliance/classify.d.ts +27 -0
- package/dist/compliance/classify.js +60 -0
- package/dist/compliance/confidence.d.ts +27 -0
- package/dist/compliance/confidence.js +43 -0
- package/dist/compliance/coverage-metric.d.ts +74 -0
- package/dist/compliance/coverage-metric.js +181 -0
- package/dist/compliance/gap-report.d.ts +20 -0
- package/dist/compliance/gap-report.js +64 -0
- package/dist/compliance/html.d.ts +22 -0
- package/dist/compliance/html.js +256 -0
- package/dist/compliance/impact.d.ts +251 -0
- package/dist/compliance/impact.js +464 -0
- package/dist/compliance/index.d.ts +16 -0
- package/dist/compliance/index.js +9 -0
- package/dist/compliance/markdown.d.ts +18 -0
- package/dist/compliance/markdown.js +129 -0
- package/dist/compliance/reverse-index.d.ts +8 -0
- package/dist/compliance/reverse-index.js +30 -0
- package/dist/compliance/types.d.ts +98 -0
- package/dist/compliance/types.js +5 -0
- package/dist/compliance/views.d.ts +14 -0
- package/dist/compliance/views.js +35 -0
- package/dist/compliance-matrix/__tests__/build.test.d.ts +1 -0
- package/dist/compliance-matrix/__tests__/build.test.js +183 -0
- package/dist/compliance-matrix/__tests__/example.test.d.ts +1 -0
- package/dist/compliance-matrix/__tests__/example.test.js +49 -0
- package/dist/compliance-matrix/build.d.ts +18 -0
- package/dist/compliance-matrix/build.js +0 -0
- package/dist/compliance-matrix/index.d.ts +2 -0
- package/dist/compliance-matrix/index.js +1 -0
- package/dist/compliance-matrix/types.d.ts +86 -0
- package/dist/compliance-matrix/types.js +8 -0
- package/dist/confidence/__tests__/score.test.d.ts +1 -0
- package/dist/confidence/__tests__/score.test.js +188 -0
- package/dist/confidence/index.d.ts +2 -0
- package/dist/confidence/index.js +1 -0
- package/dist/confidence/score.d.ts +62 -0
- package/dist/confidence/score.js +215 -0
- package/dist/confidence/types.d.ts +79 -0
- package/dist/confidence/types.js +6 -0
- package/dist/edge-path.d.ts +18 -0
- package/dist/edge-path.js +35 -0
- package/dist/element-envelope.d.ts +15 -0
- package/dist/element-envelope.js +55 -0
- package/dist/factor/__tests__/validate.test.d.ts +1 -0
- package/dist/factor/__tests__/validate.test.js +83 -0
- package/dist/factor/index.d.ts +3 -0
- package/dist/factor/index.js +2 -0
- package/dist/factor/types.d.ts +23 -0
- package/dist/factor/types.js +6 -0
- package/dist/factor/validate.d.ts +2 -0
- package/dist/factor/validate.js +69 -0
- package/dist/fgca/__tests__/chain-table.test.d.ts +1 -0
- package/dist/fgca/__tests__/chain-table.test.js +158 -0
- package/dist/fgca/__tests__/layout.test.d.ts +1 -0
- package/dist/fgca/__tests__/layout.test.js +140 -0
- package/dist/fgca/__tests__/parse-canonical.test.d.ts +1 -0
- package/dist/fgca/__tests__/parse-canonical.test.js +224 -0
- package/dist/fgca/__tests__/preview-layout.test.d.ts +1 -0
- package/dist/fgca/__tests__/preview-layout.test.js +106 -0
- package/dist/fgca/__tests__/validate.test.d.ts +1 -0
- package/dist/fgca/__tests__/validate.test.js +125 -0
- package/dist/fgca/chain-table.d.ts +36 -0
- package/dist/fgca/chain-table.js +177 -0
- package/dist/fgca/index.d.ts +16 -0
- package/dist/fgca/index.js +11 -0
- package/dist/fgca/layout.d.ts +27 -0
- package/dist/fgca/layout.js +156 -0
- package/dist/fgca/nodeTypes.d.ts +6 -0
- package/dist/fgca/nodeTypes.js +10 -0
- package/dist/fgca/nodes/FGCAActivityNode.d.ts +13 -0
- package/dist/fgca/nodes/FGCAActivityNode.js +35 -0
- package/dist/fgca/nodes/FGCAChangeNode.d.ts +12 -0
- package/dist/fgca/nodes/FGCAChangeNode.js +35 -0
- package/dist/fgca/nodes/FGCAFactorNode.d.ts +12 -0
- package/dist/fgca/nodes/FGCAFactorNode.js +35 -0
- package/dist/fgca/nodes/FGCAGoalNode.d.ts +14 -0
- package/dist/fgca/nodes/FGCAGoalNode.js +40 -0
- package/dist/fgca/parse-canonical.d.ts +58 -0
- package/dist/fgca/parse-canonical.js +339 -0
- package/dist/fgca/preview-layout.d.ts +87 -0
- package/dist/fgca/preview-layout.js +122 -0
- package/dist/fgca/types.d.ts +39 -0
- package/dist/fgca/types.js +7 -0
- package/dist/fgca/validate.d.ts +14 -0
- package/dist/fgca/validate.js +108 -0
- package/dist/geometry.d.ts +7 -0
- package/dist/geometry.js +2 -0
- package/dist/goals/__tests__/layout.test.d.ts +1 -0
- package/dist/goals/__tests__/layout.test.js +153 -0
- package/dist/goals/__tests__/mutations.test.d.ts +1 -0
- package/dist/goals/__tests__/mutations.test.js +95 -0
- package/dist/goals/__tests__/parse-canonical.test.d.ts +1 -0
- package/dist/goals/__tests__/parse-canonical.test.js +129 -0
- package/dist/goals/__tests__/validate.test.d.ts +1 -0
- package/dist/goals/__tests__/validate.test.js +183 -0
- package/dist/goals/index.d.ts +6 -0
- package/dist/goals/index.js +4 -0
- package/dist/goals/layout.d.ts +11 -0
- package/dist/goals/layout.js +147 -0
- package/dist/goals/mutations.d.ts +6 -0
- package/dist/goals/mutations.js +116 -0
- package/dist/goals/parse-canonical.d.ts +29 -0
- package/dist/goals/parse-canonical.js +257 -0
- package/dist/goals/types.d.ts +71 -0
- package/dist/goals/types.js +1 -0
- package/dist/goals/validate.d.ts +2 -0
- package/dist/goals/validate.js +122 -0
- package/dist/index.d.ts +23 -0
- package/dist/index.js +23 -0
- package/dist/issues/__tests__/layout.test.d.ts +1 -0
- package/dist/issues/__tests__/layout.test.js +62 -0
- package/dist/issues/__tests__/validate.test.d.ts +1 -0
- package/dist/issues/__tests__/validate.test.js +82 -0
- package/dist/issues/index.d.ts +4 -0
- package/dist/issues/index.js +2 -0
- package/dist/issues/layout.d.ts +10 -0
- package/dist/issues/layout.js +82 -0
- package/dist/issues/types.d.ts +61 -0
- package/dist/issues/types.js +6 -0
- package/dist/issues/validate.d.ts +3 -0
- package/dist/issues/validate.js +143 -0
- package/dist/process-blueprint/__tests__/compliance-lane.test.d.ts +1 -0
- package/dist/process-blueprint/__tests__/compliance-lane.test.js +272 -0
- package/dist/process-blueprint/__tests__/layout.test.d.ts +1 -0
- package/dist/process-blueprint/__tests__/layout.test.js +159 -0
- package/dist/process-blueprint/__tests__/validate.test.d.ts +1 -0
- package/dist/process-blueprint/__tests__/validate.test.js +280 -0
- package/dist/process-blueprint/index.d.ts +4 -0
- package/dist/process-blueprint/index.js +2 -0
- package/dist/process-blueprint/layout.d.ts +2 -0
- package/dist/process-blueprint/layout.js +416 -0
- package/dist/process-blueprint/types.d.ts +220 -0
- package/dist/process-blueprint/types.js +1 -0
- package/dist/process-blueprint/validate.d.ts +3 -0
- package/dist/process-blueprint/validate.js +165 -0
- package/dist/process-map/__tests__/validate.test.d.ts +1 -0
- package/dist/process-map/__tests__/validate.test.js +199 -0
- package/dist/process-map/index.d.ts +2 -0
- package/dist/process-map/index.js +1 -0
- package/dist/process-map/types.d.ts +32 -0
- package/dist/process-map/types.js +1 -0
- package/dist/process-map/validate.d.ts +3 -0
- package/dist/process-map/validate.js +115 -0
- package/dist/products/__tests__/validate.test.d.ts +1 -0
- package/dist/products/__tests__/validate.test.js +210 -0
- package/dist/products/index.d.ts +2 -0
- package/dist/products/index.js +1 -0
- package/dist/products/types.d.ts +28 -0
- package/dist/products/types.js +1 -0
- package/dist/products/validate.d.ts +3 -0
- package/dist/products/validate.js +93 -0
- package/dist/repo-validate/__tests__/validate-repo.test.d.ts +1 -0
- package/dist/repo-validate/__tests__/validate-repo.test.js +132 -0
- package/dist/repo-validate/index.d.ts +2 -0
- package/dist/repo-validate/index.js +1 -0
- package/dist/repo-validate/types.d.ts +34 -0
- package/dist/repo-validate/types.js +14 -0
- package/dist/repo-validate/validate-repo.d.ts +8 -0
- package/dist/repo-validate/validate-repo.js +189 -0
- package/dist/requirement/__tests__/example.test.d.ts +1 -0
- package/dist/requirement/__tests__/example.test.js +21 -0
- package/dist/requirement/__tests__/validate.test.d.ts +1 -0
- package/dist/requirement/__tests__/validate.test.js +80 -0
- package/dist/requirement/index.d.ts +4 -0
- package/dist/requirement/index.js +2 -0
- package/dist/requirement/types.d.ts +25 -0
- package/dist/requirement/types.js +4 -0
- package/dist/requirement/validate.d.ts +7 -0
- package/dist/requirement/validate.js +81 -0
- package/dist/scenarios/__tests__/validate.test.d.ts +1 -0
- package/dist/scenarios/__tests__/validate.test.js +183 -0
- package/dist/scenarios/index.d.ts +2 -0
- package/dist/scenarios/index.js +1 -0
- package/dist/scenarios/types.d.ts +45 -0
- package/dist/scenarios/types.js +1 -0
- package/dist/scenarios/validate.d.ts +3 -0
- package/dist/scenarios/validate.js +110 -0
- package/dist/schema-version.d.ts +16 -0
- package/dist/schema-version.js +16 -0
- package/dist/scope.d.ts +23 -0
- package/dist/scope.js +38 -0
- package/dist/stakeholder/__tests__/validate.test.d.ts +1 -0
- package/dist/stakeholder/__tests__/validate.test.js +86 -0
- package/dist/stakeholder/index.d.ts +3 -0
- package/dist/stakeholder/index.js +2 -0
- package/dist/stakeholder/types.d.ts +24 -0
- package/dist/stakeholder/types.js +5 -0
- package/dist/stakeholder/validate.d.ts +2 -0
- package/dist/stakeholder/validate.js +58 -0
- package/dist/target-state/__tests__/validate.test.d.ts +1 -0
- package/dist/target-state/__tests__/validate.test.js +62 -0
- package/dist/target-state/index.d.ts +2 -0
- package/dist/target-state/index.js +1 -0
- package/dist/target-state/types.d.ts +18 -0
- package/dist/target-state/types.js +7 -0
- package/dist/target-state/validate.d.ts +2 -0
- package/dist/target-state/validate.js +61 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.js +2 -0
- package/dist/theme/themes.d.ts +16 -0
- package/dist/theme/themes.js +213 -0
- package/dist/theme/tokens.d.ts +158 -0
- package/dist/theme/tokens.js +105 -0
- package/dist/typed-id.d.ts +20 -0
- package/dist/typed-id.js +38 -0
- package/dist/validation-types.d.ts +34 -0
- package/dist/validation-types.js +1 -0
- package/dist/webview/__tests__/entry-notations.test.d.ts +1 -0
- package/dist/webview/__tests__/entry-notations.test.js +62 -0
- package/dist/webview/__tests__/entry.test.d.ts +1 -0
- package/dist/webview/__tests__/entry.test.js +56 -0
- package/dist/webview/__tests__/render-goals.test.d.ts +1 -0
- package/dist/webview/__tests__/render-goals.test.js +65 -0
- package/dist/webview/entry.d.ts +38 -0
- package/dist/webview/entry.js +182 -0
- package/dist/webview/render-activities.d.ts +24 -0
- package/dist/webview/render-activities.js +127 -0
- package/dist/webview/render-activity-card.d.ts +5 -0
- package/dist/webview/render-activity-card.js +168 -0
- package/dist/webview/render-applications.d.ts +11 -0
- package/dist/webview/render-applications.js +105 -0
- package/dist/webview/render-blocks.d.ts +5 -0
- package/dist/webview/render-blocks.js +71 -0
- package/dist/webview/render-capability-map.d.ts +7 -0
- package/dist/webview/render-capability-map.js +88 -0
- package/dist/webview/render-fgca.d.ts +8 -0
- package/dist/webview/render-fgca.js +94 -0
- package/dist/webview/render-goals.d.ts +6 -0
- package/dist/webview/render-goals.js +92 -0
- package/dist/webview/render-process-blueprint.d.ts +5 -0
- package/dist/webview/render-process-blueprint.js +135 -0
- package/dist/webview/render-process-map.d.ts +7 -0
- package/dist/webview/render-process-map.js +82 -0
- package/dist/webview/render-products.d.ts +7 -0
- package/dist/webview/render-products.js +81 -0
- package/dist/webview/render-scenarios.d.ts +7 -0
- package/dist/webview/render-scenarios.js +75 -0
- package/dist/webview/render-util.d.ts +16 -0
- package/dist/webview/render-util.js +31 -0
- package/dist/webview/transitrix-render.css +323 -0
- package/dist/webview/transitrix-render.js +6452 -0
- package/dist/webview/transitrix-render.js.map +7 -0
- package/dist/yaml-normalize.d.ts +20 -0
- package/dist/yaml-normalize.js +57 -0
- package/package.json +40 -0
- package/src/__tests__/edge-path.test.ts +46 -0
- package/src/__tests__/scope.test.ts +27 -0
- package/src/__tests__/yaml-normalize.test.ts +158 -0
- package/src/activities/__tests__/cpm.test.ts +164 -0
- package/src/activities/__tests__/gantt.test.ts +245 -0
- package/src/activities/__tests__/layout.test.ts +112 -0
- package/src/activities/__tests__/validate.test.ts +409 -0
- package/src/activities/cpm.ts +95 -0
- package/src/activities/gantt.ts +276 -0
- package/src/activities/index.ts +28 -0
- package/src/activities/layout.ts +112 -0
- package/src/activities/types.ts +148 -0
- package/src/activities/validate.ts +357 -0
- package/src/activity-card/__tests__/example.test.ts +66 -0
- package/src/activity-card/__tests__/layout.test.ts +63 -0
- package/src/activity-card/__tests__/resolver.test.ts +161 -0
- package/src/activity-card/__tests__/validate.test.ts +131 -0
- package/src/activity-card/index.ts +32 -0
- package/src/activity-card/layout.ts +194 -0
- package/src/activity-card/resolver.ts +337 -0
- package/src/activity-card/types.ts +237 -0
- package/src/activity-card/validate.ts +158 -0
- package/src/actor/__tests__/validate.test.ts +67 -0
- package/src/actor/index.ts +3 -0
- package/src/actor/types.ts +29 -0
- package/src/actor/validate.ts +38 -0
- package/src/applications/__tests__/validate.test.ts +256 -0
- package/src/applications/index.ts +11 -0
- package/src/applications/types.ts +43 -0
- package/src/applications/validate.ts +131 -0
- package/src/assertion/__tests__/example.test.ts +37 -0
- package/src/assertion/__tests__/validate.test.ts +142 -0
- package/src/assertion/index.ts +12 -0
- package/src/assertion/types.ts +58 -0
- package/src/assertion/validate.ts +145 -0
- package/src/blocks/__tests__/layout.test.ts +169 -0
- package/src/blocks/__tests__/validate.test.ts +260 -0
- package/src/blocks/index.ts +17 -0
- package/src/blocks/layout.ts +186 -0
- package/src/blocks/types.ts +62 -0
- package/src/blocks/validate.ts +206 -0
- package/src/capability-map/__tests__/validate.test.ts +238 -0
- package/src/capability-map/index.ts +8 -0
- package/src/capability-map/types.ts +29 -0
- package/src/capability-map/validate.ts +127 -0
- package/src/change/__tests__/validate.test.ts +88 -0
- package/src/change/index.ts +2 -0
- package/src/change/types.ts +23 -0
- package/src/change/validate.ts +61 -0
- package/src/compliance/__tests__/classify.test.ts +27 -0
- package/src/compliance/__tests__/confidence.test.ts +98 -0
- package/src/compliance/__tests__/coverage-metric.test.ts +188 -0
- package/src/compliance/__tests__/demo-scenario.test.ts +273 -0
- package/src/compliance/__tests__/example.test.ts +57 -0
- package/src/compliance/__tests__/gap-report.test.ts +129 -0
- package/src/compliance/__tests__/html.test.ts +142 -0
- package/src/compliance/__tests__/impact.test.ts +482 -0
- package/src/compliance/__tests__/markdown.test.ts +95 -0
- package/src/compliance/__tests__/views.test.ts +64 -0
- package/src/compliance/classify.ts +84 -0
- package/src/compliance/confidence.ts +69 -0
- package/src/compliance/coverage-metric.ts +263 -0
- package/src/compliance/gap-report.ts +94 -0
- package/src/compliance/html.ts +295 -0
- package/src/compliance/impact.ts +677 -0
- package/src/compliance/index.ts +56 -0
- package/src/compliance/markdown.ts +135 -0
- package/src/compliance/reverse-index.ts +33 -0
- package/src/compliance/types.ts +120 -0
- package/src/compliance/views.ts +46 -0
- package/src/compliance-matrix/__tests__/build.test.ts +200 -0
- package/src/compliance-matrix/__tests__/example.test.ts +57 -0
- package/src/compliance-matrix/build.ts +0 -0
- package/src/compliance-matrix/index.ts +11 -0
- package/src/compliance-matrix/types.ts +102 -0
- package/src/confidence/__tests__/score.test.ts +254 -0
- package/src/confidence/index.ts +21 -0
- package/src/confidence/score.ts +243 -0
- package/src/confidence/types.ts +96 -0
- package/src/edge-path.ts +44 -0
- package/src/element-envelope.ts +76 -0
- package/src/factor/__tests__/validate.test.ts +98 -0
- package/src/factor/index.ts +8 -0
- package/src/factor/types.ts +41 -0
- package/src/factor/validate.ts +74 -0
- package/src/fgca/__tests__/chain-table.test.ts +172 -0
- package/src/fgca/__tests__/layout.test.ts +179 -0
- package/src/fgca/__tests__/parse-canonical.test.ts +248 -0
- package/src/fgca/__tests__/preview-layout.test.ts +124 -0
- package/src/fgca/__tests__/validate.test.ts +142 -0
- package/src/fgca/chain-table.ts +225 -0
- package/src/fgca/index.ts +45 -0
- package/src/fgca/layout.ts +204 -0
- package/src/fgca/nodeTypes.ts +11 -0
- package/src/fgca/nodes/FGCAActivityNode.tsx +65 -0
- package/src/fgca/nodes/FGCAChangeNode.tsx +64 -0
- package/src/fgca/nodes/FGCAFactorNode.tsx +64 -0
- package/src/fgca/nodes/FGCAGoalNode.tsx +72 -0
- package/src/fgca/parse-canonical.ts +400 -0
- package/src/fgca/preview-layout.ts +217 -0
- package/src/fgca/types.ts +50 -0
- package/src/fgca/validate.ts +126 -0
- package/src/geometry.ts +9 -0
- package/src/goals/__tests__/layout.test.ts +175 -0
- package/src/goals/__tests__/mutations.test.ts +111 -0
- package/src/goals/__tests__/parse-canonical.test.ts +145 -0
- package/src/goals/__tests__/validate.test.ts +202 -0
- package/src/goals/index.ts +21 -0
- package/src/goals/layout.ts +172 -0
- package/src/goals/mutations.ts +123 -0
- package/src/goals/parse-canonical.ts +286 -0
- package/src/goals/types.ts +85 -0
- package/src/goals/validate.ts +136 -0
- package/src/index.ts +23 -0
- package/src/process-blueprint/__tests__/compliance-lane.test.ts +320 -0
- package/src/process-blueprint/__tests__/layout.test.ts +195 -0
- package/src/process-blueprint/__tests__/validate.test.ts +310 -0
- package/src/process-blueprint/index.ts +31 -0
- package/src/process-blueprint/layout.ts +531 -0
- package/src/process-blueprint/types.ts +242 -0
- package/src/process-blueprint/validate.ts +181 -0
- package/src/process-map/__tests__/validate.test.ts +223 -0
- package/src/process-map/index.ts +10 -0
- package/src/process-map/types.ts +36 -0
- package/src/process-map/validate.ts +135 -0
- package/src/products/__tests__/validate.test.ts +239 -0
- package/src/products/index.ts +9 -0
- package/src/products/types.ts +31 -0
- package/src/products/validate.ts +112 -0
- package/src/repo-validate/__tests__/validate-repo.test.ts +149 -0
- package/src/repo-validate/index.ts +2 -0
- package/src/repo-validate/types.ts +50 -0
- package/src/repo-validate/validate-repo.ts +196 -0
- package/src/requirement/__tests__/example.test.ts +24 -0
- package/src/requirement/__tests__/validate.test.ts +96 -0
- package/src/requirement/index.ts +4 -0
- package/src/requirement/types.ts +35 -0
- package/src/requirement/validate.ts +92 -0
- package/src/scenarios/__tests__/validate.test.ts +209 -0
- package/src/scenarios/index.ts +15 -0
- package/src/scenarios/types.ts +37 -0
- package/src/scenarios/validate.ts +122 -0
- package/src/schema-version.ts +16 -0
- package/src/scope.ts +46 -0
- package/src/stakeholder/__tests__/validate.test.ts +101 -0
- package/src/stakeholder/index.ts +3 -0
- package/src/stakeholder/types.ts +33 -0
- package/src/stakeholder/validate.ts +63 -0
- package/src/target-state/__tests__/validate.test.ts +74 -0
- package/src/target-state/index.ts +2 -0
- package/src/target-state/types.ts +28 -0
- package/src/target-state/validate.ts +67 -0
- package/src/theme/index.ts +4 -0
- package/src/theme/themes.ts +237 -0
- package/src/theme/tokens.ts +133 -0
- package/src/typed-id.ts +56 -0
- package/src/validation-types.ts +36 -0
- package/src/webview/__tests__/entry-notations.test.ts +77 -0
- package/src/webview/__tests__/entry.test.ts +64 -0
- package/src/webview/__tests__/render-goals.test.ts +72 -0
- package/src/webview/entry.ts +292 -0
- package/src/webview/render-activities.ts +156 -0
- package/src/webview/render-activity-card.ts +234 -0
- package/src/webview/render-applications.ts +123 -0
- package/src/webview/render-blocks.ts +91 -0
- package/src/webview/render-capability-map.ts +98 -0
- package/src/webview/render-fgca.ts +122 -0
- package/src/webview/render-goals.ts +110 -0
- package/src/webview/render-process-blueprint.ts +207 -0
- package/src/webview/render-process-map.ts +93 -0
- package/src/webview/render-products.ts +91 -0
- package/src/webview/render-scenarios.ts +90 -0
- package/src/webview/render-util.ts +34 -0
- package/src/webview/styles.css +323 -0
- package/src/yaml-normalize.ts +56 -0
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { validateApplicationsCatalogue } from '../validate.js';
|
|
3
|
+
const VALID_CATALOGUE = {
|
|
4
|
+
notation: 'applications',
|
|
5
|
+
applications_catalogue: {
|
|
6
|
+
id: 'APP-CAT-001',
|
|
7
|
+
name: 'Enterprise Applications',
|
|
8
|
+
updated_at: '2026-05-14',
|
|
9
|
+
applications: [
|
|
10
|
+
{ app_id: 'APP-001', name: 'Order System', type: 'application', status: 'Active', maturity: 3 },
|
|
11
|
+
{ app_id: 'INT-001', name: 'Event Bus', type: 'integration', status: 'Draft' },
|
|
12
|
+
],
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
describe('validateApplicationsCatalogue', () => {
|
|
16
|
+
it('passes on valid input', () => {
|
|
17
|
+
const r = validateApplicationsCatalogue(VALID_CATALOGUE);
|
|
18
|
+
expect(r.valid).toBe(true);
|
|
19
|
+
expect(r.errors).toHaveLength(0);
|
|
20
|
+
});
|
|
21
|
+
it('APP-001: rejects non-object input', () => {
|
|
22
|
+
expect(validateApplicationsCatalogue(null).valid).toBe(false);
|
|
23
|
+
expect(validateApplicationsCatalogue(null).errors[0].code).toBe('APP-001');
|
|
24
|
+
});
|
|
25
|
+
it('APP-001: rejects missing notation', () => {
|
|
26
|
+
const { notation: _, ...rest } = VALID_CATALOGUE;
|
|
27
|
+
const r = validateApplicationsCatalogue(rest);
|
|
28
|
+
expect(r.errors.some(e => e.code === 'APP-001')).toBe(true);
|
|
29
|
+
});
|
|
30
|
+
it('APP-001: rejects wrong notation value', () => {
|
|
31
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, notation: 'products' });
|
|
32
|
+
expect(r.errors.some(e => e.code === 'APP-001')).toBe(true);
|
|
33
|
+
});
|
|
34
|
+
it('APP-002: rejects missing applications_catalogue', () => {
|
|
35
|
+
const r = validateApplicationsCatalogue({ notation: 'applications' });
|
|
36
|
+
expect(r.errors.some(e => e.code === 'APP-002')).toBe(true);
|
|
37
|
+
});
|
|
38
|
+
it('APP-002: rejects missing id', () => {
|
|
39
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, id: '' };
|
|
40
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
41
|
+
expect(r.errors.some(e => e.code === 'APP-002' && e.message.includes('id'))).toBe(true);
|
|
42
|
+
});
|
|
43
|
+
it('APP-002: rejects missing name', () => {
|
|
44
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, name: ' ' };
|
|
45
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
46
|
+
expect(r.errors.some(e => e.code === 'APP-002' && e.message.includes('name'))).toBe(true);
|
|
47
|
+
});
|
|
48
|
+
it('APP-002: rejects missing updated_at', () => {
|
|
49
|
+
const { updated_at: _, ...cat } = VALID_CATALOGUE.applications_catalogue;
|
|
50
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
51
|
+
expect(r.errors.some(e => e.code === 'APP-002' && e.message.includes('updated_at'))).toBe(true);
|
|
52
|
+
});
|
|
53
|
+
it('APP-002: rejects non-array applications', () => {
|
|
54
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: 'bad' };
|
|
55
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
56
|
+
expect(r.errors.some(e => e.code === 'APP-002')).toBe(true);
|
|
57
|
+
});
|
|
58
|
+
it('APP-003: rejects missing app_id', () => {
|
|
59
|
+
const apps = [{ name: 'X', type: 'application', status: 'Active' }];
|
|
60
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
61
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
62
|
+
expect(r.errors.some(e => e.code === 'APP-003' && e.message.includes('app_id'))).toBe(true);
|
|
63
|
+
});
|
|
64
|
+
it('APP-003: rejects missing name', () => {
|
|
65
|
+
const apps = [{ app_id: 'A1', name: '', type: 'application', status: 'Active' }];
|
|
66
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
67
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
68
|
+
expect(r.errors.some(e => e.code === 'APP-003' && e.message.includes('name'))).toBe(true);
|
|
69
|
+
});
|
|
70
|
+
it('APP-003: rejects missing type', () => {
|
|
71
|
+
const apps = [{ app_id: 'A1', name: 'X', status: 'Active' }];
|
|
72
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
73
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
74
|
+
expect(r.errors.some(e => e.code === 'APP-003' && e.message.includes('type'))).toBe(true);
|
|
75
|
+
});
|
|
76
|
+
it('APP-003: rejects missing status', () => {
|
|
77
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'application' }];
|
|
78
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
79
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
80
|
+
expect(r.errors.some(e => e.code === 'APP-003' && e.message.includes('status'))).toBe(true);
|
|
81
|
+
});
|
|
82
|
+
it('APP-004: rejects invalid type', () => {
|
|
83
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'hardware', status: 'Active' }];
|
|
84
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
85
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
86
|
+
expect(r.errors.some(e => e.code === 'APP-004')).toBe(true);
|
|
87
|
+
});
|
|
88
|
+
it('APP-004: accepts all valid types', () => {
|
|
89
|
+
for (const type of ['application', 'integration', 'platform', 'data_store']) {
|
|
90
|
+
const apps = [{ app_id: 'A1', name: 'X', type, status: 'Active' }];
|
|
91
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
92
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
93
|
+
expect(r.errors.some(e => e.code === 'APP-004')).toBe(false);
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
it('APP-005: rejects invalid status', () => {
|
|
97
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'application', status: 'Unknown' }];
|
|
98
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
99
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
100
|
+
expect(r.errors.some(e => e.code === 'APP-005')).toBe(true);
|
|
101
|
+
});
|
|
102
|
+
it('APP-005: accepts all four valid statuses', () => {
|
|
103
|
+
for (const status of ['Draft', 'Active', 'Deprecated', 'Decommissioning']) {
|
|
104
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'application', status }];
|
|
105
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
106
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
107
|
+
expect(r.errors.some(e => e.code === 'APP-005')).toBe(false);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
it('APP-006: rejects maturity < 1', () => {
|
|
111
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'application', status: 'Active', maturity: 0 }];
|
|
112
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
113
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
114
|
+
expect(r.errors.some(e => e.code === 'APP-006')).toBe(true);
|
|
115
|
+
});
|
|
116
|
+
it('APP-006: rejects maturity > 5', () => {
|
|
117
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'application', status: 'Active', maturity: 6 }];
|
|
118
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
119
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
120
|
+
expect(r.errors.some(e => e.code === 'APP-006')).toBe(true);
|
|
121
|
+
});
|
|
122
|
+
it('APP-006: rejects non-integer maturity', () => {
|
|
123
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'application', status: 'Active', maturity: 3.5 }];
|
|
124
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
125
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
126
|
+
expect(r.errors.some(e => e.code === 'APP-006')).toBe(true);
|
|
127
|
+
});
|
|
128
|
+
it('APP-006: accepts valid maturity range 1-5', () => {
|
|
129
|
+
for (const maturity of [1, 2, 3, 4, 5]) {
|
|
130
|
+
const apps = [{ app_id: 'A1', name: 'X', type: 'application', status: 'Active', maturity }];
|
|
131
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
132
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
133
|
+
expect(r.errors.some(e => e.code === 'APP-006')).toBe(false);
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
it('APP-007: rejects malformed updated_at', () => {
|
|
137
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, updated_at: '14/05/2026' };
|
|
138
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
139
|
+
expect(r.errors.some(e => e.code === 'APP-007')).toBe(true);
|
|
140
|
+
});
|
|
141
|
+
it('APP-007: accepts YYYY-MM-DD format', () => {
|
|
142
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, updated_at: '2026-01-01' };
|
|
143
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
144
|
+
expect(r.errors.some(e => e.code === 'APP-007')).toBe(false);
|
|
145
|
+
});
|
|
146
|
+
it('APP-008: rejects duplicate app_id', () => {
|
|
147
|
+
const apps = [
|
|
148
|
+
{ app_id: 'A1', name: 'X', type: 'application', status: 'Active' },
|
|
149
|
+
{ app_id: 'A1', name: 'Y', type: 'platform', status: 'Draft' },
|
|
150
|
+
];
|
|
151
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
152
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
153
|
+
expect(r.errors.some(e => e.code === 'APP-008')).toBe(true);
|
|
154
|
+
});
|
|
155
|
+
it('APP-009: rejects invalid integration direction', () => {
|
|
156
|
+
const apps = [{
|
|
157
|
+
app_id: 'A1', name: 'X', type: 'application', status: 'Active',
|
|
158
|
+
integrations: [{ target: 'A2', direction: 'sideways' }],
|
|
159
|
+
}];
|
|
160
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
161
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
162
|
+
expect(r.errors.some(e => e.code === 'APP-009')).toBe(true);
|
|
163
|
+
});
|
|
164
|
+
it('APP-009: accepts valid integration directions', () => {
|
|
165
|
+
for (const direction of ['inbound', 'outbound', 'bidirectional']) {
|
|
166
|
+
const apps = [{
|
|
167
|
+
app_id: 'A1', name: 'X', type: 'application', status: 'Active',
|
|
168
|
+
integrations: [{ target: 'A2', direction }],
|
|
169
|
+
}];
|
|
170
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
171
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
172
|
+
expect(r.errors.some(e => e.code === 'APP-009')).toBe(false);
|
|
173
|
+
}
|
|
174
|
+
});
|
|
175
|
+
it('APP-009: accepts integration without direction', () => {
|
|
176
|
+
const apps = [{
|
|
177
|
+
app_id: 'A1', name: 'X', type: 'application', status: 'Active',
|
|
178
|
+
integrations: [{ target: 'A2', protocol: 'REST' }],
|
|
179
|
+
}];
|
|
180
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
181
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
182
|
+
expect(r.valid).toBe(true);
|
|
183
|
+
});
|
|
184
|
+
it('accepts empty applications array', () => {
|
|
185
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: [] };
|
|
186
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
187
|
+
expect(r.valid).toBe(true);
|
|
188
|
+
});
|
|
189
|
+
it('accepts application with all optional fields', () => {
|
|
190
|
+
const apps = [{
|
|
191
|
+
app_id: 'A1', name: 'Full App', type: 'application', status: 'Active',
|
|
192
|
+
domain: 'Sales', owner_role: 'ROLE-001', vendor: 'Salesforce', maturity: 4,
|
|
193
|
+
description: 'CRM system', capabilities: ['CAP-001'], products: ['PROD-001'],
|
|
194
|
+
integrations: [{ target: 'A2', direction: 'outbound', protocol: 'REST', description: 'sends events' }],
|
|
195
|
+
}];
|
|
196
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
197
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
198
|
+
expect(r.valid).toBe(true);
|
|
199
|
+
});
|
|
200
|
+
// Pre-release blocker regression (orchestrator review 2026-05-21).
|
|
201
|
+
it('[blocker] tolerates a null element in applications[] without throwing', () => {
|
|
202
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: [null] };
|
|
203
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
204
|
+
expect(r.valid).toBe(false);
|
|
205
|
+
expect(r.errors.some(e => e.code === 'APP-003')).toBe(true);
|
|
206
|
+
});
|
|
207
|
+
it('[blocker] tolerates a string element in applications[] without throwing', () => {
|
|
208
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: ['x'] };
|
|
209
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
210
|
+
expect(r.valid).toBe(false);
|
|
211
|
+
expect(r.errors.some(e => e.code === 'APP-003')).toBe(true);
|
|
212
|
+
});
|
|
213
|
+
it('[blocker] tolerates a null integration entry without throwing', () => {
|
|
214
|
+
const apps = [{
|
|
215
|
+
app_id: 'A1', name: 'X', type: 'application', status: 'Active',
|
|
216
|
+
integrations: [null],
|
|
217
|
+
}];
|
|
218
|
+
const cat = { ...VALID_CATALOGUE.applications_catalogue, applications: apps };
|
|
219
|
+
const r = validateApplicationsCatalogue({ ...VALID_CATALOGUE, applications_catalogue: cat });
|
|
220
|
+
expect(r.valid).toBe(false);
|
|
221
|
+
expect(r.errors.some(e => e.code === 'APP-009')).toBe(true);
|
|
222
|
+
});
|
|
223
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { validateApplicationsCatalogue } from './validate.js';
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
export type ApplicationType = 'application' | 'integration' | 'platform' | 'data_store';
|
|
2
|
+
export type ApplicationStatus = 'Draft' | 'Active' | 'Deprecated' | 'Decommissioning';
|
|
3
|
+
export type IntegrationDirection = 'inbound' | 'outbound' | 'bidirectional';
|
|
4
|
+
export interface ApplicationIntegration {
|
|
5
|
+
target?: string;
|
|
6
|
+
direction?: IntegrationDirection;
|
|
7
|
+
protocol?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface Application {
|
|
11
|
+
app_id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
type: ApplicationType;
|
|
14
|
+
status: ApplicationStatus;
|
|
15
|
+
domain?: string;
|
|
16
|
+
owner_role?: string;
|
|
17
|
+
vendor?: string;
|
|
18
|
+
maturity?: number;
|
|
19
|
+
description?: string;
|
|
20
|
+
capabilities?: string[];
|
|
21
|
+
products?: string[];
|
|
22
|
+
integrations?: ApplicationIntegration[];
|
|
23
|
+
source?: string;
|
|
24
|
+
target?: string;
|
|
25
|
+
protocol?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ApplicationsCatalogueHeader {
|
|
28
|
+
id: string;
|
|
29
|
+
name: string;
|
|
30
|
+
description?: string;
|
|
31
|
+
version?: string;
|
|
32
|
+
updated_at: string;
|
|
33
|
+
applications: Application[];
|
|
34
|
+
}
|
|
35
|
+
export interface ApplicationsCatalogueFile {
|
|
36
|
+
notation: string;
|
|
37
|
+
spec_version?: string;
|
|
38
|
+
applications_catalogue: ApplicationsCatalogueHeader;
|
|
39
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
const VALID_TYPES = new Set(['application', 'integration', 'platform', 'data_store']);
|
|
2
|
+
const VALID_STATUSES = new Set(['Draft', 'Active', 'Deprecated', 'Decommissioning']);
|
|
3
|
+
const VALID_DIRECTIONS = new Set(['inbound', 'outbound', 'bidirectional']);
|
|
4
|
+
const DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
5
|
+
export function validateApplicationsCatalogue(input) {
|
|
6
|
+
const errors = [];
|
|
7
|
+
const warnings = [];
|
|
8
|
+
if (!input || typeof input !== 'object') {
|
|
9
|
+
return { valid: false, errors: [{ code: 'APP-001', message: 'Input must be an object' }], warnings };
|
|
10
|
+
}
|
|
11
|
+
const raw = input;
|
|
12
|
+
// APP-001: notation header
|
|
13
|
+
if (!('notation' in raw)) {
|
|
14
|
+
errors.push({ code: 'APP-001', message: 'Missing required field: notation' });
|
|
15
|
+
}
|
|
16
|
+
else if (raw['notation'] !== 'applications') {
|
|
17
|
+
errors.push({ code: 'APP-001', message: `notation must be "applications", got "${raw['notation']}"` });
|
|
18
|
+
}
|
|
19
|
+
if (errors.length > 0)
|
|
20
|
+
return { valid: false, errors, warnings };
|
|
21
|
+
// APP-002: catalogue header fields
|
|
22
|
+
if (!raw['applications_catalogue'] || typeof raw['applications_catalogue'] !== 'object') {
|
|
23
|
+
errors.push({ code: 'APP-002', message: 'Missing required field: applications_catalogue' });
|
|
24
|
+
return { valid: false, errors, warnings };
|
|
25
|
+
}
|
|
26
|
+
const cat = raw['applications_catalogue'];
|
|
27
|
+
if (!cat['id'] || typeof cat['id'] !== 'string' || !cat['id'].trim()) {
|
|
28
|
+
errors.push({ code: 'APP-002', message: 'applications_catalogue.id is required' });
|
|
29
|
+
}
|
|
30
|
+
if (!cat['name'] || typeof cat['name'] !== 'string' || !cat['name'].trim()) {
|
|
31
|
+
errors.push({ code: 'APP-002', message: 'applications_catalogue.name is required' });
|
|
32
|
+
}
|
|
33
|
+
if (!cat['updated_at'] || typeof cat['updated_at'] !== 'string') {
|
|
34
|
+
errors.push({ code: 'APP-002', message: 'applications_catalogue.updated_at is required' });
|
|
35
|
+
}
|
|
36
|
+
if (errors.length > 0)
|
|
37
|
+
return { valid: false, errors, warnings };
|
|
38
|
+
// APP-007: updated_at format
|
|
39
|
+
if (!DATE_RE.test(cat['updated_at'])) {
|
|
40
|
+
errors.push({ code: 'APP-007', message: `applications_catalogue.updated_at must be YYYY-MM-DD, got "${cat['updated_at']}"` });
|
|
41
|
+
}
|
|
42
|
+
const applications = cat['applications'];
|
|
43
|
+
if (!Array.isArray(applications)) {
|
|
44
|
+
errors.push({ code: 'APP-002', message: 'applications_catalogue.applications must be an array' });
|
|
45
|
+
return { valid: false, errors, warnings };
|
|
46
|
+
}
|
|
47
|
+
// APP-008: unique app_id
|
|
48
|
+
const seenIds = new Set();
|
|
49
|
+
for (let i = 0; i < applications.length; i++) {
|
|
50
|
+
const rawApp = applications[i];
|
|
51
|
+
const idx = `applications[${i}]`;
|
|
52
|
+
if (!rawApp || typeof rawApp !== 'object') {
|
|
53
|
+
errors.push({ code: 'APP-003', message: `${idx} must be an object` });
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
const a = rawApp;
|
|
57
|
+
// APP-003: required per-application fields
|
|
58
|
+
if (!a['app_id'] || typeof a['app_id'] !== 'string' || !a['app_id'].trim()) {
|
|
59
|
+
errors.push({ code: 'APP-003', message: `${idx}: app_id is required` });
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
const aid = a['app_id'];
|
|
63
|
+
if (seenIds.has(aid)) {
|
|
64
|
+
errors.push({ code: 'APP-008', message: `Duplicate app_id: "${aid}"` });
|
|
65
|
+
}
|
|
66
|
+
seenIds.add(aid);
|
|
67
|
+
}
|
|
68
|
+
if (!a['name'] || typeof a['name'] !== 'string' || !a['name'].trim()) {
|
|
69
|
+
errors.push({ code: 'APP-003', message: `${idx}: name is required` });
|
|
70
|
+
}
|
|
71
|
+
if (!a['type']) {
|
|
72
|
+
errors.push({ code: 'APP-003', message: `${idx}: type is required` });
|
|
73
|
+
}
|
|
74
|
+
if (!a['status']) {
|
|
75
|
+
errors.push({ code: 'APP-003', message: `${idx}: status is required` });
|
|
76
|
+
}
|
|
77
|
+
// APP-004: type enum
|
|
78
|
+
if (a['type'] && !VALID_TYPES.has(a['type'])) {
|
|
79
|
+
errors.push({ code: 'APP-004', message: `${idx}: type "${a['type']}" must be one of: application, integration, platform, data_store` });
|
|
80
|
+
}
|
|
81
|
+
// APP-005: status enum (4 values)
|
|
82
|
+
if (a['status'] && !VALID_STATUSES.has(a['status'])) {
|
|
83
|
+
errors.push({ code: 'APP-005', message: `${idx}: status "${a['status']}" must be one of: Draft, Active, Deprecated, Decommissioning` });
|
|
84
|
+
}
|
|
85
|
+
// APP-006: maturity range
|
|
86
|
+
if (a['maturity'] !== undefined) {
|
|
87
|
+
const m = a['maturity'];
|
|
88
|
+
if (typeof m !== 'number' || !Number.isInteger(m) || m < 1 || m > 5) {
|
|
89
|
+
errors.push({ code: 'APP-006', message: `${idx}: maturity must be an integer 1–5, got "${m}"` });
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
// APP-009: integrations[].direction enum
|
|
93
|
+
if (Array.isArray(a['integrations'])) {
|
|
94
|
+
const integrations = a['integrations'];
|
|
95
|
+
for (let j = 0; j < integrations.length; j++) {
|
|
96
|
+
const rawIntg = integrations[j];
|
|
97
|
+
if (!rawIntg || typeof rawIntg !== 'object') {
|
|
98
|
+
errors.push({ code: 'APP-009', message: `${idx}.integrations[${j}] must be an object` });
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
const intg = rawIntg;
|
|
102
|
+
if (intg['direction'] !== undefined && !VALID_DIRECTIONS.has(intg['direction'])) {
|
|
103
|
+
errors.push({ code: 'APP-009', message: `${idx}.integrations[${j}]: direction "${intg['direction']}" must be one of: inbound, outbound, bidirectional` });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
return { valid: errors.length === 0, errors, warnings };
|
|
109
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Conformance test for the shipped ASSERTION worked examples — the acme_corp
|
|
2
|
+
// canon files mirrored under `tests/fixtures/notation-corpus/assertion/`. Pins the success signal of
|
|
3
|
+
// vkgeorgia/strategy#84 Phase 1: the library consumes the canonical example
|
|
4
|
+
// files without error.
|
|
5
|
+
import { describe, it, expect } from 'vitest';
|
|
6
|
+
import { readFileSync } from 'node:fs';
|
|
7
|
+
import { fileURLToPath } from 'node:url';
|
|
8
|
+
import path from 'node:path';
|
|
9
|
+
import yaml from 'js-yaml';
|
|
10
|
+
import { validateAssertion } from '../validate.js';
|
|
11
|
+
const dir = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../../tests/fixtures/notation-corpus/assertion');
|
|
12
|
+
const load = (f) => yaml.load(readFileSync(path.join(dir, f), 'utf-8'));
|
|
13
|
+
// Fixed reference date so the ASSERT-008 staleness check is deterministic; all
|
|
14
|
+
// three examples have a future review date relative to it.
|
|
15
|
+
const today = '2026-06-02';
|
|
16
|
+
describe('assertion worked examples (acme_corp)', () => {
|
|
17
|
+
for (const f of [
|
|
18
|
+
'ASSERTION-MOBILE-DATA-ERASURE-1.yaml',
|
|
19
|
+
'ASSERTION-CRM-DATA-ERASURE-1.yaml',
|
|
20
|
+
'ASSERTION-ONBOARD-DATA-ERASURE-1.yaml',
|
|
21
|
+
]) {
|
|
22
|
+
it(`validates ${f} without error`, () => {
|
|
23
|
+
const v = validateAssertion(load(f), { today });
|
|
24
|
+
expect(v.valid, JSON.stringify(v.errors)).toBe(true);
|
|
25
|
+
expect(v.errors).toHaveLength(0);
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
it('does not raise ASSERT-007 for the under_review assertion with empty evidence', () => {
|
|
29
|
+
const v = validateAssertion(load('ASSERTION-CRM-DATA-ERASURE-1.yaml'), { today });
|
|
30
|
+
expect(v.warnings.map(w => w.code)).not.toContain('ASSERT-007');
|
|
31
|
+
});
|
|
32
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { validateAssertion } from '../validate.js';
|
|
3
|
+
function valid() {
|
|
4
|
+
return {
|
|
5
|
+
notation: 'assertion',
|
|
6
|
+
id: 'ASSERTION-MOBILE-DATA-ERASURE-1',
|
|
7
|
+
about: 'REQUIREMENT-DATA-ERASURE-1',
|
|
8
|
+
subject: 'PRODUCT-MOBILE-1',
|
|
9
|
+
realised_via: ['CAPABILITY-V2', 'PROCESS-USER-DATA-PURGE-1'],
|
|
10
|
+
status: 'compliant',
|
|
11
|
+
evidence: [{ kind: 'note', text: 'DPO review confirmed compliance.' }],
|
|
12
|
+
assessed_at: '2026-03-15',
|
|
13
|
+
next_review_at: '2026-09-15',
|
|
14
|
+
zone: 'canon',
|
|
15
|
+
admitted_at: '2026-05-28',
|
|
16
|
+
admitted_by: 'v.korobeinikov',
|
|
17
|
+
gate_checks: { uniqueness: 'pass' },
|
|
18
|
+
valid_from: '2026-03-15',
|
|
19
|
+
valid_to: null,
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
const codes = (input, opts) => validateAssertion(input, opts).errors.map(e => e.code);
|
|
23
|
+
const warnCodes = (input, opts) => validateAssertion(input, opts).warnings.map(w => w.code);
|
|
24
|
+
describe('validateAssertion — positive', () => {
|
|
25
|
+
it('accepts a well-formed assertion', () => {
|
|
26
|
+
const r = validateAssertion(valid());
|
|
27
|
+
expect(r.valid, JSON.stringify(r.errors)).toBe(true);
|
|
28
|
+
expect(r.errors).toHaveLength(0);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
describe('validateAssertion — ASSERT-001 (shape / id grammar)', () => {
|
|
32
|
+
it('flags id grammar, wrong notation, missing admission/lifecycle fields', () => {
|
|
33
|
+
expect(codes({ ...valid(), id: 'ASSERT-1' })).toContain('ASSERT-001');
|
|
34
|
+
expect(codes({ ...valid(), notation: 'claim' })).toContain('ASSERT-001');
|
|
35
|
+
const noAdmit = valid();
|
|
36
|
+
delete noAdmit.admitted_at;
|
|
37
|
+
expect(codes(noAdmit)).toContain('ASSERT-001');
|
|
38
|
+
const noValidTo = valid();
|
|
39
|
+
delete noValidTo.valid_to;
|
|
40
|
+
expect(codes(noValidTo)).toContain('ASSERT-001');
|
|
41
|
+
});
|
|
42
|
+
it('flags a missing status as ASSERT-001 (required field)', () => {
|
|
43
|
+
const r = valid();
|
|
44
|
+
delete r.status;
|
|
45
|
+
expect(codes(r)).toContain('ASSERT-001');
|
|
46
|
+
});
|
|
47
|
+
it('rejects a non-object', () => {
|
|
48
|
+
expect(codes(null)).toEqual(['ASSERT-001']);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
describe('validateAssertion — ASSERT-002 (about → REQUIREMENT)', () => {
|
|
52
|
+
it('flags a missing about', () => {
|
|
53
|
+
const r = valid();
|
|
54
|
+
delete r.about;
|
|
55
|
+
expect(codes(r)).toContain('ASSERT-002');
|
|
56
|
+
});
|
|
57
|
+
it('flags an about that is not a REQUIREMENT typed id', () => {
|
|
58
|
+
expect(codes({ ...valid(), about: 'PRODUCT-MOBILE-1' })).toContain('ASSERT-002');
|
|
59
|
+
});
|
|
60
|
+
it('with a catalog, flags an unresolved about and a wrong-type about', () => {
|
|
61
|
+
expect(codes({ ...valid() }, { catalog: { typeOf: () => undefined } })).toContain('ASSERT-002');
|
|
62
|
+
const catalog = { typeOf: (id) => (id === 'REQUIREMENT-DATA-ERASURE-1' ? 'GOAL' : 'PRODUCT') };
|
|
63
|
+
expect(codes(valid(), { catalog })).toContain('ASSERT-002');
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
describe('validateAssertion — ASSERT-003 (subject TYPE)', () => {
|
|
67
|
+
it('flags a subject whose TYPE is not PRODUCT/PROCESS/CAPABILITY', () => {
|
|
68
|
+
expect(codes({ ...valid(), subject: 'GOAL-1' })).toContain('ASSERT-003');
|
|
69
|
+
});
|
|
70
|
+
it('accepts PRODUCT, PROCESS and CAPABILITY subjects', () => {
|
|
71
|
+
for (const s of ['PRODUCT-1', 'PROCESS-1', 'CAPABILITY-V2']) {
|
|
72
|
+
expect(codes({ ...valid(), subject: s })).not.toContain('ASSERT-003');
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
it('with a catalog, flags an unresolved subject', () => {
|
|
76
|
+
const catalog = { typeOf: (id) => (id === 'PRODUCT-MOBILE-1' ? undefined : 'REQUIREMENT') };
|
|
77
|
+
expect(codes(valid(), { catalog })).toContain('ASSERT-003');
|
|
78
|
+
});
|
|
79
|
+
});
|
|
80
|
+
describe('validateAssertion — ASSERT-004 (realised_via resolves)', () => {
|
|
81
|
+
it('flags a malformed realised_via entry', () => {
|
|
82
|
+
expect(codes({ ...valid(), realised_via: ['nope'] })).toContain('ASSERT-004');
|
|
83
|
+
});
|
|
84
|
+
it('with a catalog, flags an unresolved realised_via entry', () => {
|
|
85
|
+
const catalog = { typeOf: (id) => (id.startsWith('CAPABILITY') ? undefined : 'X') };
|
|
86
|
+
expect(codes(valid(), { catalog })).toContain('ASSERT-004');
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
describe('validateAssertion — ASSERT-005 (canonical_ref evidence resolves)', () => {
|
|
90
|
+
it('flags a malformed canonical_ref', () => {
|
|
91
|
+
expect(codes({ ...valid(), evidence: [{ kind: 'canonical_ref', ref: 'nope' }] })).toContain('ASSERT-005');
|
|
92
|
+
});
|
|
93
|
+
it('with a catalog, flags an unresolved canonical_ref', () => {
|
|
94
|
+
const catalog = { typeOf: () => undefined };
|
|
95
|
+
expect(codes({ ...valid(), evidence: [{ kind: 'canonical_ref', ref: 'PROCESS-X-1' }] }, { catalog })).toContain('ASSERT-005');
|
|
96
|
+
});
|
|
97
|
+
it('ignores external_doc and note evidence kinds for resolution', () => {
|
|
98
|
+
const ev = [{ kind: 'external_doc', title: 't', url: 'u' }, { kind: 'note', text: 'n' }];
|
|
99
|
+
expect(codes({ ...valid(), evidence: ev })).not.toContain('ASSERT-005');
|
|
100
|
+
});
|
|
101
|
+
});
|
|
102
|
+
describe('validateAssertion — ASSERT-006 (status enum)', () => {
|
|
103
|
+
it('flags an out-of-enum status', () => {
|
|
104
|
+
expect(codes({ ...valid(), status: 'maybe' })).toContain('ASSERT-006');
|
|
105
|
+
});
|
|
106
|
+
it('accepts every status value', () => {
|
|
107
|
+
for (const s of ['compliant', 'partial', 'non_compliant', 'under_review', 'n_a']) {
|
|
108
|
+
expect(codes({ ...valid(), status: s, evidence: [{ kind: 'note', text: 'x' }] })).not.toContain('ASSERT-006');
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
describe('validateAssertion — ASSERT-007 (positive status without evidence)', () => {
|
|
113
|
+
it('warns when evidence is empty and status is compliant or partial', () => {
|
|
114
|
+
expect(warnCodes({ ...valid(), evidence: [], status: 'compliant' })).toContain('ASSERT-007');
|
|
115
|
+
expect(warnCodes({ ...valid(), evidence: [], status: 'partial' })).toContain('ASSERT-007');
|
|
116
|
+
});
|
|
117
|
+
it('does not warn for under_review / non_compliant / n_a with empty evidence', () => {
|
|
118
|
+
for (const s of ['under_review', 'non_compliant', 'n_a']) {
|
|
119
|
+
expect(warnCodes({ ...valid(), evidence: [], status: s })).not.toContain('ASSERT-007');
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
describe('validateAssertion — ASSERT-008 (stale review)', () => {
|
|
124
|
+
it('warns only when today is supplied and next_review_at is in the past', () => {
|
|
125
|
+
expect(warnCodes({ ...valid(), next_review_at: '2026-01-01' }, { today: '2026-06-02' })).toContain('ASSERT-008');
|
|
126
|
+
expect(warnCodes({ ...valid(), next_review_at: '2026-12-01' }, { today: '2026-06-02' })).not.toContain('ASSERT-008');
|
|
127
|
+
// No `today` → clock-free, never warns.
|
|
128
|
+
expect(warnCodes({ ...valid(), next_review_at: '2000-01-01' })).not.toContain('ASSERT-008');
|
|
129
|
+
});
|
|
130
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { Assertion, AssertionStatus, Evidence, EvidenceKind, CanonicalRefEvidence, ExternalDocEvidence, NoteEvidence, } from './types.js';
|
|
2
|
+
export { ASSERTION_STATUSES, ASSERTION_SUBJECT_TYPES } from './types.js';
|
|
3
|
+
export { validateAssertion } from './validate.js';
|
|
4
|
+
export type { AssertionValidateOptions } from './validate.js';
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { GateChecks } from '../requirement/types.js';
|
|
2
|
+
/** Compliance status vocabulary (16-assertion.md §3). */
|
|
3
|
+
export type AssertionStatus = 'compliant' | 'partial' | 'non_compliant' | 'under_review' | 'n_a';
|
|
4
|
+
export declare const ASSERTION_STATUSES: readonly AssertionStatus[];
|
|
5
|
+
/** TYPEs a `subject` may resolve to (16-assertion.md §2, ASSERT-003). */
|
|
6
|
+
export declare const ASSERTION_SUBJECT_TYPES: readonly ["PRODUCT", "PROCESS", "CAPABILITY"];
|
|
7
|
+
/** Evidence entry kinds (16-assertion.md §4). */
|
|
8
|
+
export type EvidenceKind = 'canonical_ref' | 'external_doc' | 'note';
|
|
9
|
+
export interface CanonicalRefEvidence {
|
|
10
|
+
kind: 'canonical_ref';
|
|
11
|
+
ref: string;
|
|
12
|
+
}
|
|
13
|
+
export interface ExternalDocEvidence {
|
|
14
|
+
kind: 'external_doc';
|
|
15
|
+
title: string;
|
|
16
|
+
url: string;
|
|
17
|
+
}
|
|
18
|
+
export interface NoteEvidence {
|
|
19
|
+
kind: 'note';
|
|
20
|
+
text: string;
|
|
21
|
+
}
|
|
22
|
+
export type Evidence = CanonicalRefEvidence | ExternalDocEvidence | NoteEvidence;
|
|
23
|
+
export interface Assertion {
|
|
24
|
+
notation: 'assertion';
|
|
25
|
+
id: string;
|
|
26
|
+
/** Typed ID of the REQUIREMENT this assertion is about. */
|
|
27
|
+
about: string;
|
|
28
|
+
/** Exactly one typed ID; TYPE ∈ {PRODUCT, PROCESS, CAPABILITY}. */
|
|
29
|
+
subject: string;
|
|
30
|
+
/** Typed IDs of elements that realise the requirement for the subject. */
|
|
31
|
+
realised_via?: string[];
|
|
32
|
+
status: AssertionStatus;
|
|
33
|
+
evidence?: Evidence[];
|
|
34
|
+
assessed_at?: string;
|
|
35
|
+
assessed_by?: string;
|
|
36
|
+
next_review_at?: string;
|
|
37
|
+
zone: 'canon';
|
|
38
|
+
admitted_at: string;
|
|
39
|
+
admitted_by: string;
|
|
40
|
+
gate_checks: GateChecks;
|
|
41
|
+
valid_from: string;
|
|
42
|
+
valid_to: string | null;
|
|
43
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// ASSERTION — REQUIREMENT realisation claim.
|
|
2
|
+
// Schema: methodology notations/elements/16-assertion.md §2.
|
|
3
|
+
export const ASSERTION_STATUSES = [
|
|
4
|
+
'compliant', 'partial', 'non_compliant', 'under_review', 'n_a',
|
|
5
|
+
];
|
|
6
|
+
/** TYPEs a `subject` may resolve to (16-assertion.md §2, ASSERT-003). */
|
|
7
|
+
export const ASSERTION_SUBJECT_TYPES = ['PRODUCT', 'PROCESS', 'CAPABILITY'];
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ValidationResult } from '../validation-types.js';
|
|
2
|
+
import { type CanonCatalog } from '../typed-id.js';
|
|
3
|
+
export interface AssertionValidateOptions {
|
|
4
|
+
/** When provided, the resolution rules enforce artefact existence. */
|
|
5
|
+
catalog?: CanonCatalog;
|
|
6
|
+
/** Today as an ISO `YYYY-MM-DD` string; enables the ASSERT-008 staleness check. */
|
|
7
|
+
today?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function validateAssertion(input: unknown, options?: AssertionValidateOptions): ValidationResult;
|