@transitrix/diagrams 1.6.0 → 1.7.6
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/dist/codex/__tests__/example.test.d.ts +1 -0
- package/dist/codex/__tests__/example.test.js +33 -0
- package/dist/codex/__tests__/validate.test.d.ts +1 -0
- package/dist/codex/__tests__/validate.test.js +68 -0
- package/dist/codex/index.d.ts +4 -0
- package/dist/codex/index.js +2 -0
- package/dist/codex/types.d.ts +7 -0
- package/dist/codex/types.js +8 -0
- package/dist/codex/validate.d.ts +11 -0
- package/dist/codex/validate.js +103 -0
- package/dist/compliance/__tests__/canon-catalog.test.d.ts +1 -0
- package/dist/compliance/__tests__/canon-catalog.test.js +60 -0
- package/dist/compliance/__tests__/view-resolution.test.d.ts +1 -0
- package/dist/compliance/__tests__/view-resolution.test.js +59 -0
- package/dist/compliance/canon-catalog.d.ts +19 -0
- package/dist/compliance/canon-catalog.js +59 -0
- package/dist/compliance/coverage-metric.d.ts +12 -0
- package/dist/compliance/coverage-metric.js +35 -0
- package/dist/compliance/impact.d.ts +7 -1
- package/dist/compliance/impact.js +53 -0
- package/dist/compliance/index.d.ts +6 -4
- package/dist/compliance/index.js +3 -2
- package/dist/constraint/__tests__/example.test.d.ts +1 -0
- package/dist/constraint/__tests__/example.test.js +14 -0
- package/dist/constraint/__tests__/validate.test.d.ts +1 -0
- package/dist/constraint/__tests__/validate.test.js +58 -0
- package/dist/constraint/index.d.ts +4 -0
- package/dist/constraint/index.js +2 -0
- package/dist/constraint/types.d.ts +4 -0
- package/dist/constraint/types.js +2 -0
- package/dist/constraint/validate.d.ts +7 -0
- package/dist/constraint/validate.js +115 -0
- package/dist/fgca/__tests__/parse-canonical.test.js +31 -0
- package/dist/fgca/parse-canonical.d.ts +1 -1
- package/dist/fgca/parse-canonical.js +18 -4
- package/dist/goals/GoalNode.d.ts +2 -1
- package/dist/goals/GoalNode.js +7 -2
- package/dist/goals/GoalTreeView.d.ts +3 -1
- package/dist/goals/GoalTreeView.js +31 -14
- package/dist/goals/__tests__/GoalTreeView.test.js +41 -0
- package/dist/goals/__tests__/mutations.test.js +39 -0
- package/dist/goals/__tests__/parse-canonical.test.js +2 -0
- package/dist/goals/layout.js +2 -1
- package/dist/goals/mutations.js +6 -6
- package/dist/goals/parse-canonical.d.ts +5 -0
- package/dist/goals/parse-canonical.js +5 -0
- package/dist/goals/types.d.ts +2 -0
- package/dist/repo-validate/types.js +2 -3
- package/dist/webview/__tests__/render-goals.test.js +17 -3
- package/dist/webview/render-goals.js +2 -1
- package/package.json +1 -1
- package/src/codex/__tests__/example.test.ts +40 -0
- package/src/codex/__tests__/validate.test.ts +84 -0
- package/src/codex/index.ts +4 -0
- package/src/codex/types.ts +13 -0
- package/src/codex/validate.ts +125 -0
- package/src/compliance/__tests__/canon-catalog.test.ts +68 -0
- package/src/compliance/__tests__/view-resolution.test.ts +80 -0
- package/src/compliance/canon-catalog.ts +76 -0
- package/src/compliance/coverage-metric.ts +50 -0
- package/src/compliance/impact.ts +67 -1
- package/src/compliance/index.ts +10 -1
- package/src/constraint/__tests__/example.test.ts +19 -0
- package/src/constraint/__tests__/validate.test.ts +68 -0
- package/src/constraint/index.ts +4 -0
- package/src/constraint/types.ts +5 -0
- package/src/constraint/validate.ts +131 -0
- package/src/fgca/__tests__/parse-canonical.test.ts +34 -0
- package/src/fgca/parse-canonical.ts +17 -4
- package/src/goals/GoalNode.tsx +8 -1
- package/src/goals/GoalTreeView.tsx +61 -27
- package/src/goals/__tests__/GoalTreeView.test.tsx +48 -0
- package/src/goals/__tests__/mutations.test.ts +42 -0
- package/src/goals/__tests__/parse-canonical.test.ts +2 -0
- package/src/goals/layout.ts +2 -1
- package/src/goals/mutations.ts +6 -6
- package/src/goals/parse-canonical.ts +6 -0
- package/src/goals/types.ts +2 -0
- package/src/repo-validate/types.ts +2 -3
- package/src/webview/__tests__/render-goals.test.ts +17 -3
- package/src/webview/render-goals.ts +2 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// Conformance test for CODEX worked examples under
|
|
2
|
+
// `tests/fixtures/notation-corpus/codex/` — pins #518 Phase C2 corpus signal.
|
|
3
|
+
import { describe, it, expect } from 'vitest';
|
|
4
|
+
import { readFileSync, readdirSync } from 'node:fs';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
import path from 'node:path';
|
|
7
|
+
import yaml from 'js-yaml';
|
|
8
|
+
import { validateCodex, folderJurisdictionFromPath } from '../validate.js';
|
|
9
|
+
const corpusRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../../../../tests/fixtures/notation-corpus/codex');
|
|
10
|
+
function codexFixturePaths() {
|
|
11
|
+
const out = [];
|
|
12
|
+
for (const zone of ['external/EU', 'internal']) {
|
|
13
|
+
const dir = path.join(corpusRoot, zone);
|
|
14
|
+
for (const f of readdirSync(dir).filter((x) => x.endsWith('.yaml'))) {
|
|
15
|
+
const rel = path.join('codex', zone, f).replace(/\\/g, '/');
|
|
16
|
+
out.push({
|
|
17
|
+
rel,
|
|
18
|
+
folderJurisdiction: folderJurisdictionFromPath(rel),
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
return out;
|
|
23
|
+
}
|
|
24
|
+
describe('codex worked examples (notation-corpus)', () => {
|
|
25
|
+
for (const { rel, folderJurisdiction } of codexFixturePaths()) {
|
|
26
|
+
it(`validates ${rel} without error`, () => {
|
|
27
|
+
const data = yaml.load(readFileSync(path.join(corpusRoot, rel.replace(/^codex\//, '')), 'utf-8'));
|
|
28
|
+
const v = validateCodex(data, { folderJurisdiction });
|
|
29
|
+
expect(v.valid, JSON.stringify(v.errors)).toBe(true);
|
|
30
|
+
expect(v.errors).toHaveLength(0);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { validateCodex, isCodexDoc, folderJurisdictionFromPath, } from '../validate.js';
|
|
3
|
+
const VALID_EXTERNAL = {
|
|
4
|
+
zone: 'codex',
|
|
5
|
+
id: 'LAW-GDPR-1',
|
|
6
|
+
name: 'General Data Protection Regulation',
|
|
7
|
+
type: 'LAW',
|
|
8
|
+
jurisdiction: 'eu',
|
|
9
|
+
effective_date: '2018-05-25',
|
|
10
|
+
admitted_at: '2026-06-01',
|
|
11
|
+
admitted_by: 'legal.team',
|
|
12
|
+
gate_checks: { uniqueness: 'pass' },
|
|
13
|
+
};
|
|
14
|
+
const VALID_INTERNAL = {
|
|
15
|
+
zone: 'codex',
|
|
16
|
+
id: 'INTERNAL_STANDARD-coding-conventions-1',
|
|
17
|
+
name: 'Engineering Coding Conventions',
|
|
18
|
+
type: 'INTERNAL_STANDARD',
|
|
19
|
+
issuing_authority: 'VP Engineering',
|
|
20
|
+
effective_date: '2026-01-01',
|
|
21
|
+
admitted_at: '2026-05-27',
|
|
22
|
+
admitted_by: 'vp.engineering',
|
|
23
|
+
gate_checks: { source_authority: 'VP Engineering' },
|
|
24
|
+
};
|
|
25
|
+
describe('validateCodex', () => {
|
|
26
|
+
it('accepts a valid external artefact', () => {
|
|
27
|
+
const r = validateCodex(VALID_EXTERNAL, { folderJurisdiction: 'eu' });
|
|
28
|
+
expect(r.valid, JSON.stringify(r.errors)).toBe(true);
|
|
29
|
+
});
|
|
30
|
+
it('accepts a valid internal artefact', () => {
|
|
31
|
+
expect(validateCodex(VALID_INTERNAL).valid).toBe(true);
|
|
32
|
+
});
|
|
33
|
+
it('CODEX-001 rejects non-mapping input', () => {
|
|
34
|
+
expect(validateCodex(null).errors.some((e) => e.code === 'CODEX-001')).toBe(true);
|
|
35
|
+
});
|
|
36
|
+
it('CODEX-001 rejects wrong zone', () => {
|
|
37
|
+
const r = validateCodex({ ...VALID_EXTERNAL, zone: 'canon' });
|
|
38
|
+
expect(r.errors.some((e) => e.code === 'CODEX-001' && e.path === 'zone')).toBe(true);
|
|
39
|
+
});
|
|
40
|
+
it('CODEX-002 rejects type/id prefix mismatch', () => {
|
|
41
|
+
const r = validateCodex({ ...VALID_EXTERNAL, type: 'REGULATION' });
|
|
42
|
+
expect(r.errors.some((e) => e.code === 'CODEX-002')).toBe(true);
|
|
43
|
+
});
|
|
44
|
+
it('CODEX-003 requires jurisdiction on external artefacts', () => {
|
|
45
|
+
const r = validateCodex({ ...VALID_EXTERNAL, jurisdiction: '' });
|
|
46
|
+
expect(r.errors.some((e) => e.code === 'CODEX-003' && e.path === 'jurisdiction')).toBe(true);
|
|
47
|
+
});
|
|
48
|
+
it('CODEX-005 enforces folder jurisdiction match', () => {
|
|
49
|
+
const r = validateCodex(VALID_EXTERNAL, { folderJurisdiction: 'ge' });
|
|
50
|
+
expect(r.errors.some((e) => e.code === 'CODEX-005')).toBe(true);
|
|
51
|
+
});
|
|
52
|
+
it('CODEX-004 requires issuing_authority on internal artefacts', () => {
|
|
53
|
+
const r = validateCodex({ ...VALID_INTERNAL, issuing_authority: '' });
|
|
54
|
+
expect(r.errors.some((e) => e.code === 'CODEX-004')).toBe(true);
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
describe('isCodexDoc', () => {
|
|
58
|
+
it('detects zone: codex', () => {
|
|
59
|
+
expect(isCodexDoc({ zone: 'codex', id: 'LAW-1' })).toBe(true);
|
|
60
|
+
expect(isCodexDoc({ zone: 'canon' })).toBe(false);
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
describe('folderJurisdictionFromPath', () => {
|
|
64
|
+
it('parses codex/external/<jurisdiction>/ paths', () => {
|
|
65
|
+
expect(folderJurisdictionFromPath('codex/external/eu/LAW-GDPR-1.yaml')).toBe('eu');
|
|
66
|
+
expect(folderJurisdictionFromPath('codex/internal/POLICY-1.yaml')).toBeUndefined();
|
|
67
|
+
});
|
|
68
|
+
});
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { CODEX_ARTEFACT_TYPES, EXTERNAL_CODEX_TYPES, INTERNAL_CODEX_TYPES } from './types.js';
|
|
2
|
+
export type { CodexArtefactType } from './types.js';
|
|
3
|
+
export { validateCodex, isCodexDoc, folderJurisdictionFromPath } from './validate.js';
|
|
4
|
+
export type { CodexValidateOptions } from './validate.js';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** TYPE prefixes admitted in the codex zone (REQ-003 / 14-codex.md). */
|
|
2
|
+
export declare const CODEX_ARTEFACT_TYPES: readonly ["LAW", "REGULATION", "POLICY", "INTERNAL_STANDARD"];
|
|
3
|
+
export type CodexArtefactType = (typeof CODEX_ARTEFACT_TYPES)[number];
|
|
4
|
+
/** External codex artefacts (codex/external/<jurisdiction>/). */
|
|
5
|
+
export declare const EXTERNAL_CODEX_TYPES: readonly CodexArtefactType[];
|
|
6
|
+
/** Internal codex artefacts (codex/internal/). */
|
|
7
|
+
export declare const INTERNAL_CODEX_TYPES: readonly CodexArtefactType[];
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Codex artefact — external laws/regulations and internal policies/standards.
|
|
2
|
+
// Schema: methodology notations/elements/14-codex.md §3–§4.
|
|
3
|
+
/** TYPE prefixes admitted in the codex zone (REQ-003 / 14-codex.md). */
|
|
4
|
+
export const CODEX_ARTEFACT_TYPES = ['LAW', 'REGULATION', 'POLICY', 'INTERNAL_STANDARD'];
|
|
5
|
+
/** External codex artefacts (codex/external/<jurisdiction>/). */
|
|
6
|
+
export const EXTERNAL_CODEX_TYPES = ['LAW', 'REGULATION'];
|
|
7
|
+
/** Internal codex artefacts (codex/internal/). */
|
|
8
|
+
export const INTERNAL_CODEX_TYPES = ['POLICY', 'INTERNAL_STANDARD'];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ValidationResult } from '../validation-types.js';
|
|
2
|
+
export interface CodexValidateOptions {
|
|
3
|
+
/** Lowercased jurisdiction folder segment from `codex/external/<jurisdiction>/`. */
|
|
4
|
+
folderJurisdiction?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function validateCodex(input: unknown, options?: CodexValidateOptions): ValidationResult;
|
|
7
|
+
/** True when a parsed document is a codex-zone artefact candidate. */
|
|
8
|
+
export declare function isCodexDoc(data: unknown): boolean;
|
|
9
|
+
/** Infer codex folder jurisdiction from a repo-relative path such as
|
|
10
|
+
* `codex/external/eu/LAW-GDPR-1.yaml` → `eu`. */
|
|
11
|
+
export declare function folderJurisdictionFromPath(filePath: string): string | undefined;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// CODEX validator — methodology notations/elements/14-codex.md §4.
|
|
2
|
+
//
|
|
3
|
+
// CODEX-001 — shape, zone, id grammar, admission envelope.
|
|
4
|
+
// CODEX-002 — `type` field matches the id TYPE prefix when present.
|
|
5
|
+
// CODEX-003 — external artefact frontmatter (jurisdiction, effective_date).
|
|
6
|
+
// CODEX-004 — internal artefact frontmatter (issuing_authority, effective_date).
|
|
7
|
+
// CODEX-005 — jurisdiction must match the parent folder under codex/external/
|
|
8
|
+
// (when `folderJurisdiction` is supplied by the repo sweep).
|
|
9
|
+
import { isCanonicalId, typeOfId } from '../typed-id.js';
|
|
10
|
+
import { CODEX_ARTEFACT_TYPES, EXTERNAL_CODEX_TYPES, INTERNAL_CODEX_TYPES, } from './types.js';
|
|
11
|
+
function isCodexType(type) {
|
|
12
|
+
return type !== null && CODEX_ARTEFACT_TYPES.includes(type);
|
|
13
|
+
}
|
|
14
|
+
function normalizeType(value) {
|
|
15
|
+
if (typeof value !== 'string' || value.trim() === '')
|
|
16
|
+
return undefined;
|
|
17
|
+
return value.trim().toUpperCase();
|
|
18
|
+
}
|
|
19
|
+
export function validateCodex(input, options = {}) {
|
|
20
|
+
const errors = [];
|
|
21
|
+
const warnings = [];
|
|
22
|
+
if (input === null || typeof input !== 'object' || Array.isArray(input)) {
|
|
23
|
+
errors.push({ code: 'CODEX-001', message: 'Codex artefact must be a YAML mapping.' });
|
|
24
|
+
return { valid: false, errors, warnings };
|
|
25
|
+
}
|
|
26
|
+
const c = input;
|
|
27
|
+
if (c.zone !== 'codex') {
|
|
28
|
+
errors.push({ code: 'CODEX-001', message: 'zone must be the fixed value "codex".', path: 'zone' });
|
|
29
|
+
}
|
|
30
|
+
const idType = typeOfId(c.id);
|
|
31
|
+
if (!isCanonicalId(c.id) || !isCodexType(idType)) {
|
|
32
|
+
errors.push({
|
|
33
|
+
code: 'CODEX-001',
|
|
34
|
+
message: `id "${String(c.id)}" must be a typed codex id (LAW, REGULATION, POLICY, or INTERNAL_STANDARD).`,
|
|
35
|
+
path: 'id',
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
if (typeof c.name !== 'string' || c.name.trim() === '') {
|
|
39
|
+
errors.push({ code: 'CODEX-001', message: 'name is required.', path: 'name' });
|
|
40
|
+
}
|
|
41
|
+
for (const field of ['admitted_at', 'admitted_by']) {
|
|
42
|
+
const v = c[field];
|
|
43
|
+
if (typeof v !== 'string' || v.trim() === '') {
|
|
44
|
+
errors.push({ code: 'CODEX-001', message: `${field} is required.`, path: field });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
if (c.gate_checks === null || typeof c.gate_checks !== 'object' || Array.isArray(c.gate_checks)) {
|
|
48
|
+
errors.push({ code: 'CODEX-001', message: 'gate_checks is required and must be a mapping.', path: 'gate_checks' });
|
|
49
|
+
}
|
|
50
|
+
const declaredType = normalizeType(c.type);
|
|
51
|
+
if (declaredType !== undefined && idType && declaredType !== idType) {
|
|
52
|
+
errors.push({
|
|
53
|
+
code: 'CODEX-002',
|
|
54
|
+
message: `type "${String(c.type)}" does not match the id TYPE prefix "${idType}".`,
|
|
55
|
+
path: 'type',
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
const artefactType = (declaredType ?? idType);
|
|
59
|
+
if (artefactType && EXTERNAL_CODEX_TYPES.includes(artefactType)) {
|
|
60
|
+
const jurisdiction = typeof c.jurisdiction === 'string' ? c.jurisdiction.trim() : '';
|
|
61
|
+
if (!jurisdiction) {
|
|
62
|
+
errors.push({ code: 'CODEX-003', message: 'jurisdiction is required for external codex artefacts.', path: 'jurisdiction' });
|
|
63
|
+
}
|
|
64
|
+
else if (options.folderJurisdiction && jurisdiction.toLowerCase() !== options.folderJurisdiction.toLowerCase()) {
|
|
65
|
+
errors.push({
|
|
66
|
+
code: 'CODEX-005',
|
|
67
|
+
message: `jurisdiction "${jurisdiction}" must match the parent folder "${options.folderJurisdiction}" (CODEX-001).`,
|
|
68
|
+
path: 'jurisdiction',
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
if (typeof c.effective_date !== 'string' || c.effective_date.trim() === '') {
|
|
72
|
+
errors.push({ code: 'CODEX-003', message: 'effective_date is required for external codex artefacts.', path: 'effective_date' });
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
if (artefactType && INTERNAL_CODEX_TYPES.includes(artefactType)) {
|
|
76
|
+
if (typeof c.issuing_authority !== 'string' || c.issuing_authority.trim() === '') {
|
|
77
|
+
errors.push({
|
|
78
|
+
code: 'CODEX-004',
|
|
79
|
+
message: 'issuing_authority is required for internal codex artefacts.',
|
|
80
|
+
path: 'issuing_authority',
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
if (typeof c.effective_date !== 'string' || c.effective_date.trim() === '') {
|
|
84
|
+
errors.push({ code: 'CODEX-004', message: 'effective_date is required for internal codex artefacts.', path: 'effective_date' });
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return { valid: errors.length === 0, errors, warnings };
|
|
88
|
+
}
|
|
89
|
+
/** True when a parsed document is a codex-zone artefact candidate. */
|
|
90
|
+
export function isCodexDoc(data) {
|
|
91
|
+
if (data === null || typeof data !== 'object' || Array.isArray(data))
|
|
92
|
+
return false;
|
|
93
|
+
return data.zone === 'codex';
|
|
94
|
+
}
|
|
95
|
+
/** Infer codex folder jurisdiction from a repo-relative path such as
|
|
96
|
+
* `codex/external/eu/LAW-GDPR-1.yaml` → `eu`. */
|
|
97
|
+
export function folderJurisdictionFromPath(filePath) {
|
|
98
|
+
const parts = filePath.replace(/\\/g, '/').toLowerCase().split('/');
|
|
99
|
+
const extIdx = parts.indexOf('external');
|
|
100
|
+
if (extIdx < 0 || extIdx + 1 >= parts.length)
|
|
101
|
+
return undefined;
|
|
102
|
+
return parts[extIdx + 1] || undefined;
|
|
103
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { admitDocumentToCatalog, buildComplianceScan, catalogFromMap, } from '../canon-catalog.js';
|
|
3
|
+
describe('buildComplianceScan', () => {
|
|
4
|
+
it('admits codex, requirement, and assertion ids into the catalogue', () => {
|
|
5
|
+
const docs = [
|
|
6
|
+
{
|
|
7
|
+
path: 'codex/external/ge/LAW-PERSONAL-DATA-2017-1.yaml',
|
|
8
|
+
data: {
|
|
9
|
+
zone: 'codex',
|
|
10
|
+
id: 'LAW-PERSONAL-DATA-2017-1',
|
|
11
|
+
name: 'Law',
|
|
12
|
+
type: 'LAW',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
path: 'canon/elements/01_motivation/requirements/REQUIREMENT-DATA-ERASURE-1.yaml',
|
|
17
|
+
data: {
|
|
18
|
+
notation: 'requirement',
|
|
19
|
+
id: 'REQUIREMENT-DATA-ERASURE-1',
|
|
20
|
+
name: 'Erasure',
|
|
21
|
+
derived_from: ['LAW-PERSONAL-DATA-2017-1'],
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
path: 'canon/elements/02_business/products/PRODUCT-MOBILE-1.yaml',
|
|
26
|
+
data: { notation: 'product', id: 'PRODUCT-MOBILE-1', name: 'Mobile' },
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
path: 'canon/assertions/ASSERTION-MOBILE-DATA-ERASURE-1.yaml',
|
|
30
|
+
data: {
|
|
31
|
+
notation: 'assertion',
|
|
32
|
+
id: 'ASSERTION-MOBILE-DATA-ERASURE-1',
|
|
33
|
+
about: 'REQUIREMENT-DATA-ERASURE-1',
|
|
34
|
+
subject: 'PRODUCT-MOBILE-1',
|
|
35
|
+
status: 'compliant',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
];
|
|
39
|
+
const { catalog, complianceCanon, pathById } = buildComplianceScan(docs);
|
|
40
|
+
expect(catalog.typeOf('LAW-PERSONAL-DATA-2017-1')).toBe('LAW');
|
|
41
|
+
expect(catalog.typeOf('REQUIREMENT-DATA-ERASURE-1')).toBe('REQUIREMENT');
|
|
42
|
+
expect(catalog.typeOf('PRODUCT-MOBILE-1')).toBe('PRODUCT');
|
|
43
|
+
expect(complianceCanon.requirements).toHaveLength(1);
|
|
44
|
+
expect(complianceCanon.assertions).toHaveLength(1);
|
|
45
|
+
expect(complianceCanon.codex).toHaveLength(1);
|
|
46
|
+
expect(pathById.get('REQUIREMENT-DATA-ERASURE-1')).toContain('requirements/');
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
describe('admitDocumentToCatalog', () => {
|
|
50
|
+
it('uses explicit codex type when the id prefix is ambiguous', () => {
|
|
51
|
+
const map = new Map();
|
|
52
|
+
admitDocumentToCatalog(map, {
|
|
53
|
+
zone: 'codex',
|
|
54
|
+
id: 'INTERNAL_STANDARD-coding-conventions-1',
|
|
55
|
+
type: 'INTERNAL_STANDARD',
|
|
56
|
+
});
|
|
57
|
+
const catalog = catalogFromMap(map);
|
|
58
|
+
expect(catalog.typeOf('INTERNAL_STANDARD-coding-conventions-1')).toBe('INTERNAL_STANDARD');
|
|
59
|
+
});
|
|
60
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { emptyCanon } from '../classify.js';
|
|
3
|
+
import { catalogFromMap } from '../canon-catalog.js';
|
|
4
|
+
import { collectImpactViewResolutionFindings } from '../impact.js';
|
|
5
|
+
import { collectCoverageViewResolutionFindings } from '../coverage-metric.js';
|
|
6
|
+
const catalog = catalogFromMap(new Map([
|
|
7
|
+
['PRODUCT-ECOMM-1', 'PRODUCT'],
|
|
8
|
+
['REQUIREMENT-GDPR-1', 'REQUIREMENT'],
|
|
9
|
+
['LAW-GDPR-1', 'LAW'],
|
|
10
|
+
]));
|
|
11
|
+
const complianceCanon = emptyCanon();
|
|
12
|
+
complianceCanon.products.push({ id: 'PRODUCT-ECOMM-1', name: 'E-Commerce' });
|
|
13
|
+
complianceCanon.requirements.push({ id: 'REQUIREMENT-GDPR-1', name: 'GDPR req' });
|
|
14
|
+
complianceCanon.codex.push({ id: 'LAW-GDPR-1', name: 'GDPR' });
|
|
15
|
+
describe('collectImpactViewResolutionFindings', () => {
|
|
16
|
+
const base = {
|
|
17
|
+
id: 'test-impact',
|
|
18
|
+
name: 'Test',
|
|
19
|
+
subjects: { products: ['PRODUCT-ECOMM-1'], processes: [], capabilities: [] },
|
|
20
|
+
obligations: { filter: { derived_from_codex: ['LAW-GDPR-1'] } },
|
|
21
|
+
status_display: { show: ['compliant'] },
|
|
22
|
+
empty_cells: {},
|
|
23
|
+
order_rows_by: 'id',
|
|
24
|
+
};
|
|
25
|
+
it('passes when subjects and regimes resolve', () => {
|
|
26
|
+
expect(collectImpactViewResolutionFindings(base, catalog, complianceCanon)).toEqual([]);
|
|
27
|
+
});
|
|
28
|
+
it('flags unresolved subjects and regimes', () => {
|
|
29
|
+
const findings = collectImpactViewResolutionFindings({
|
|
30
|
+
...base,
|
|
31
|
+
subjects: { products: ['PRODUCT-MISSING-1'], processes: [], capabilities: [] },
|
|
32
|
+
obligations: { include: ['REQUIREMENT-MISSING-1'], filter: { derived_from_codex: ['LAW-MISSING-1'] } },
|
|
33
|
+
}, catalog, complianceCanon);
|
|
34
|
+
expect(findings.some((f) => f.code === 'COMPIMP-REF' && f.message.includes('PRODUCT-MISSING-1'))).toBe(true);
|
|
35
|
+
expect(findings.some((f) => f.message.includes('REQUIREMENT-MISSING-1'))).toBe(true);
|
|
36
|
+
expect(findings.some((f) => f.message.includes('LAW-MISSING-1'))).toBe(true);
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
describe('collectCoverageViewResolutionFindings', () => {
|
|
40
|
+
const base = {
|
|
41
|
+
id: 'test-coverage',
|
|
42
|
+
name: 'Test',
|
|
43
|
+
thresholds: { green: 0.9, amber: 0.7 },
|
|
44
|
+
subjects: { products: ['PRODUCT-ECOMM-1'] },
|
|
45
|
+
regimes: { include: ['LAW-GDPR-1'] },
|
|
46
|
+
};
|
|
47
|
+
it('passes when products and regimes resolve', () => {
|
|
48
|
+
expect(collectCoverageViewResolutionFindings(base, catalog, complianceCanon)).toEqual([]);
|
|
49
|
+
});
|
|
50
|
+
it('flags unresolved product and regime refs', () => {
|
|
51
|
+
const findings = collectCoverageViewResolutionFindings({
|
|
52
|
+
...base,
|
|
53
|
+
subjects: { products: ['PRODUCT-MISSING-1'] },
|
|
54
|
+
regimes: { include: ['LAW-MISSING-1'] },
|
|
55
|
+
}, catalog, complianceCanon);
|
|
56
|
+
expect(findings.some((f) => f.code === 'COVMET-REF')).toBe(true);
|
|
57
|
+
expect(findings).toHaveLength(2);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type CanonCatalog } from '../typed-id.js';
|
|
2
|
+
import { type ComplianceCanon } from './classify.js';
|
|
3
|
+
export interface ScannedYamlDoc {
|
|
4
|
+
path: string;
|
|
5
|
+
data: unknown;
|
|
6
|
+
}
|
|
7
|
+
export interface ComplianceScanResult {
|
|
8
|
+
complianceCanon: ComplianceCanon;
|
|
9
|
+
catalog: CanonCatalog;
|
|
10
|
+
/** First path where each admitted id was seen (for gap-dashboard warnings). */
|
|
11
|
+
pathById: Map<string, string>;
|
|
12
|
+
}
|
|
13
|
+
/** Admit one parsed document into the id → TYPE map. */
|
|
14
|
+
export declare function admitDocumentToCatalog(map: Map<string, string>, doc: unknown): string | undefined;
|
|
15
|
+
/** Build a read-only `CanonCatalog` from a populated id → TYPE map. */
|
|
16
|
+
export declare function catalogFromMap(map: Map<string, string>): CanonCatalog;
|
|
17
|
+
/** Ingest compliance projections and admit cross-reference targets from a batch
|
|
18
|
+
* of already-parsed YAML documents (no IO). */
|
|
19
|
+
export declare function buildComplianceScan(docs: ScannedYamlDoc[]): ComplianceScanResult;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
// CanonCatalog builder — repo-scope cross-reference resolution (#518 Phase C3).
|
|
2
|
+
//
|
|
3
|
+
// Scans admitted YAML documents and builds the `{ typeOf }` catalogue that
|
|
4
|
+
// `validateRequirement` / `validateAssertion` accept for REQ-002 and
|
|
5
|
+
// ASSERT-002..005 resolution.
|
|
6
|
+
import { typeOfId } from '../typed-id.js';
|
|
7
|
+
import { emptyCanon, ingestComplianceDoc } from './classify.js';
|
|
8
|
+
function strId(doc) {
|
|
9
|
+
if (doc === null || typeof doc !== 'object' || Array.isArray(doc))
|
|
10
|
+
return undefined;
|
|
11
|
+
const id = doc.id;
|
|
12
|
+
return typeof id === 'string' && id.trim() !== '' ? id.trim() : undefined;
|
|
13
|
+
}
|
|
14
|
+
/** Admit one parsed document into the id → TYPE map. */
|
|
15
|
+
export function admitDocumentToCatalog(map, doc) {
|
|
16
|
+
const id = strId(doc);
|
|
17
|
+
if (!id)
|
|
18
|
+
return undefined;
|
|
19
|
+
const fromPrefix = typeOfId(id);
|
|
20
|
+
if (fromPrefix) {
|
|
21
|
+
map.set(id, fromPrefix);
|
|
22
|
+
return id;
|
|
23
|
+
}
|
|
24
|
+
if (doc !== null && typeof doc === 'object' && !Array.isArray(doc)) {
|
|
25
|
+
const d = doc;
|
|
26
|
+
if (d.zone === 'codex') {
|
|
27
|
+
const explicit = typeof d.type === 'string' ? d.type.trim().toUpperCase() : undefined;
|
|
28
|
+
if (explicit) {
|
|
29
|
+
map.set(id, explicit);
|
|
30
|
+
return id;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
return undefined;
|
|
35
|
+
}
|
|
36
|
+
/** Build a read-only `CanonCatalog` from a populated id → TYPE map. */
|
|
37
|
+
export function catalogFromMap(map) {
|
|
38
|
+
return { typeOf: (id) => map.get(id) };
|
|
39
|
+
}
|
|
40
|
+
/** Ingest compliance projections and admit cross-reference targets from a batch
|
|
41
|
+
* of already-parsed YAML documents (no IO). */
|
|
42
|
+
export function buildComplianceScan(docs) {
|
|
43
|
+
const complianceCanon = emptyCanon();
|
|
44
|
+
const catalogMap = new Map();
|
|
45
|
+
const pathById = new Map();
|
|
46
|
+
for (const { path, data } of docs) {
|
|
47
|
+
const ingested = ingestComplianceDoc(complianceCanon, data);
|
|
48
|
+
if (ingested)
|
|
49
|
+
pathById.set(ingested, path);
|
|
50
|
+
const admitted = admitDocumentToCatalog(catalogMap, data);
|
|
51
|
+
if (admitted && !pathById.has(admitted))
|
|
52
|
+
pathById.set(admitted, path);
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
complianceCanon,
|
|
56
|
+
catalog: catalogFromMap(catalogMap),
|
|
57
|
+
pathById,
|
|
58
|
+
};
|
|
59
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ComplianceCanon } from './classify.js';
|
|
2
|
+
import type { CanonCatalog } from '../typed-id.js';
|
|
2
3
|
/** Declarative filter resolved at build time from the canon's codex catalogue. */
|
|
3
4
|
export interface CoverageMetricRegimesFilter {
|
|
4
5
|
jurisdiction?: string[];
|
|
@@ -73,6 +74,17 @@ export interface CoverageMatrix {
|
|
|
73
74
|
rows: CoverageRow[];
|
|
74
75
|
thresholds: CoverageMetricThresholds;
|
|
75
76
|
}
|
|
77
|
+
/** Repo-scope cross-reference finding for a coverage-metric view (#518 C3). */
|
|
78
|
+
export interface CoverageViewFinding {
|
|
79
|
+
code: string;
|
|
80
|
+
severity: 'error' | 'warning';
|
|
81
|
+
message: string;
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Repo-scope cross-reference checks for a parsed coverage-metric view config.
|
|
85
|
+
* Surfaces unresolved product and regime ids before `buildCoverageMatrix` runs.
|
|
86
|
+
*/
|
|
87
|
+
export declare function collectCoverageViewResolutionFindings(config: CoverageMetricConfig, catalog: CanonCatalog, complianceCanon: ComplianceCanon): CoverageViewFinding[];
|
|
76
88
|
/**
|
|
77
89
|
* Parse and validate a raw (YAML-parsed) document into a `CoverageMetricConfig`.
|
|
78
90
|
*
|
|
@@ -5,6 +5,41 @@
|
|
|
5
5
|
// across the scoped products, and what is the RAG status against the configured
|
|
6
6
|
// thresholds.
|
|
7
7
|
import { buildComplianceIndex } from './reverse-index.js';
|
|
8
|
+
/**
|
|
9
|
+
* Repo-scope cross-reference checks for a parsed coverage-metric view config.
|
|
10
|
+
* Surfaces unresolved product and regime ids before `buildCoverageMatrix` runs.
|
|
11
|
+
*/
|
|
12
|
+
export function collectCoverageViewResolutionFindings(config, catalog, complianceCanon) {
|
|
13
|
+
const findings = [];
|
|
14
|
+
const codexIds = new Set(complianceCanon.codex.map((c) => c.id));
|
|
15
|
+
for (const id of config.subjects?.products ?? []) {
|
|
16
|
+
const t = catalog.typeOf(id);
|
|
17
|
+
if (t === undefined) {
|
|
18
|
+
findings.push({
|
|
19
|
+
code: 'COVMET-REF',
|
|
20
|
+
severity: 'error',
|
|
21
|
+
message: `subjects.products: "${id}" does not resolve to an admitted artefact.`,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
else if (t !== 'PRODUCT') {
|
|
25
|
+
findings.push({
|
|
26
|
+
code: 'COVMET-REF',
|
|
27
|
+
severity: 'error',
|
|
28
|
+
message: `subjects.products: "${id}" resolves to ${t}, not PRODUCT.`,
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
for (const id of config.regimes?.include ?? []) {
|
|
33
|
+
if (!codexIds.has(id)) {
|
|
34
|
+
findings.push({
|
|
35
|
+
code: 'COVMET-REF',
|
|
36
|
+
severity: 'error',
|
|
37
|
+
message: `regimes.include: "${id}" does not resolve to an admitted codex artefact.`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
return findings;
|
|
42
|
+
}
|
|
8
43
|
// ── Parser ───────────────────────────────────────────────────────────────────
|
|
9
44
|
function parseRegimes(raw) {
|
|
10
45
|
const warnings = [];
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { AssertionStatus } from '../assertion/types.js';
|
|
2
2
|
import type { ComplianceCanon } from './classify.js';
|
|
3
|
+
import type { CanonCatalog } from '../typed-id.js';
|
|
3
4
|
import type { IndexAssertion, IndexRequirement, ObjectDetailInput, DeadlineStatus } from './types.js';
|
|
4
5
|
/** Filter selecting REQUIREMENTs by codex source (jurisdiction / regime keys
|
|
5
6
|
* are accepted for forward compatibility but not yet honoured — the canon
|
|
@@ -57,12 +58,17 @@ export interface ImpactColumn {
|
|
|
57
58
|
* Used to enforce the subject type label invariant (§5.2, COMPIMP-010). */
|
|
58
59
|
subjectType: 'product' | 'process' | 'capability';
|
|
59
60
|
}
|
|
60
|
-
/** A structural validation finding emitted by the matrix builder. */
|
|
61
61
|
export interface ImpactFinding {
|
|
62
62
|
code: string;
|
|
63
63
|
severity: 'error' | 'warning';
|
|
64
64
|
message: string;
|
|
65
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Repo-scope cross-reference checks for a parsed compliance-impact view config
|
|
68
|
+
* (#518 Phase C3). Surfaces unresolved subject, obligation, and regime ids before
|
|
69
|
+
* `buildImpactMatrix` runs.
|
|
70
|
+
*/
|
|
71
|
+
export declare function collectImpactViewResolutionFindings(config: ImpactViewConfig, catalog: CanonCatalog, complianceCanon: ComplianceCanon): ImpactFinding[];
|
|
66
72
|
/**
|
|
67
73
|
* Grouping options for matrix columns.
|
|
68
74
|
*
|
|
@@ -7,6 +7,59 @@
|
|
|
7
7
|
// (`product` columns × `obligation` rows). Stage / task grouping is planned
|
|
8
8
|
// for CV-3a and intentionally out of scope here.
|
|
9
9
|
import { buildComplianceIndex } from './reverse-index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Repo-scope cross-reference checks for a parsed compliance-impact view config
|
|
12
|
+
* (#518 Phase C3). Surfaces unresolved subject, obligation, and regime ids before
|
|
13
|
+
* `buildImpactMatrix` runs.
|
|
14
|
+
*/
|
|
15
|
+
export function collectImpactViewResolutionFindings(config, catalog, complianceCanon) {
|
|
16
|
+
const findings = [];
|
|
17
|
+
const codexIds = new Set(complianceCanon.codex.map((c) => c.id));
|
|
18
|
+
const subjectChecks = [
|
|
19
|
+
{ ids: config.subjects.products, expectedType: 'PRODUCT', path: 'subjects.products' },
|
|
20
|
+
{ ids: config.subjects.processes, expectedType: 'PROCESS', path: 'subjects.processes' },
|
|
21
|
+
{ ids: config.subjects.capabilities, expectedType: 'CAPABILITY', path: 'subjects.capabilities' },
|
|
22
|
+
];
|
|
23
|
+
for (const { ids, expectedType, path } of subjectChecks) {
|
|
24
|
+
for (const id of ids ?? []) {
|
|
25
|
+
const t = catalog.typeOf(id);
|
|
26
|
+
if (t === undefined) {
|
|
27
|
+
findings.push({
|
|
28
|
+
code: 'COMPIMP-REF',
|
|
29
|
+
severity: 'error',
|
|
30
|
+
message: `${path}: "${id}" does not resolve to an admitted artefact.`,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else if (t !== expectedType) {
|
|
34
|
+
findings.push({
|
|
35
|
+
code: 'COMPIMP-REF',
|
|
36
|
+
severity: 'error',
|
|
37
|
+
message: `${path}: "${id}" resolves to ${t}, not ${expectedType}.`,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
for (const id of config.obligations.include ?? []) {
|
|
43
|
+
const t = catalog.typeOf(id);
|
|
44
|
+
if (t === undefined || t !== 'REQUIREMENT') {
|
|
45
|
+
findings.push({
|
|
46
|
+
code: 'COMPIMP-REF',
|
|
47
|
+
severity: 'error',
|
|
48
|
+
message: `obligations.include: "${id}" does not resolve to an admitted REQUIREMENT.`,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
for (const id of config.obligations.filter?.derived_from_codex ?? []) {
|
|
53
|
+
if (!codexIds.has(id)) {
|
|
54
|
+
findings.push({
|
|
55
|
+
code: 'COMPIMP-REF',
|
|
56
|
+
severity: 'error',
|
|
57
|
+
message: `obligations.filter.derived_from_codex: "${id}" does not resolve to an admitted codex artefact.`,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return findings;
|
|
62
|
+
}
|
|
10
63
|
// ── Pinned defaults ─────────────────────────────────────────────────────────
|
|
11
64
|
/**
|
|
12
65
|
* Explicit defaults for every optional field in ImpactViewConfig.
|
|
@@ -5,13 +5,15 @@ export { buildGapReport } from './gap-report.js';
|
|
|
5
5
|
export type { GapReport, GapReportOptions } from './gap-report.js';
|
|
6
6
|
export { emptyCanon, ingestComplianceDoc } from './classify.js';
|
|
7
7
|
export type { ComplianceCanon, ComplianceProduct, ComplianceCodexDoc } from './classify.js';
|
|
8
|
+
export { admitDocumentToCatalog, buildComplianceScan, catalogFromMap, } from './canon-catalog.js';
|
|
9
|
+
export type { ComplianceScanResult, ScannedYamlDoc } from './canon-catalog.js';
|
|
8
10
|
export { renderComplianceMarkdown } from './markdown.js';
|
|
9
11
|
export type { ReportScope, MarkdownOptions } from './markdown.js';
|
|
10
12
|
export { renderComplianceHtml, renderImpactMatrixHtml } from './html.js';
|
|
11
13
|
export type { HtmlOptions, ImpactMatrixHtmlOptions } from './html.js';
|
|
12
|
-
export { buildImpactMatrix, renderImpactMarkdown, parseImpactViewConfig, COMPLIANCE_IMPACT_DEFAULTS, extractObjectDetails, extractProcessFlowTasks, mergeStageTaskDetails, computeDeadlineStatus } from './impact.js';
|
|
13
|
-
export type { ImpactCell, ImpactColumn, ImpactEmptyCellLabels, ImpactGrouping, ImpactMatrix, ImpactObligationFilter, ImpactStatusDisplay, ImpactSubjects, ImpactViewConfig, ParseImpactViewConfigResult, } from './impact.js';
|
|
14
|
+
export { buildImpactMatrix, renderImpactMarkdown, parseImpactViewConfig, collectImpactViewResolutionFindings, COMPLIANCE_IMPACT_DEFAULTS, extractObjectDetails, extractProcessFlowTasks, mergeStageTaskDetails, computeDeadlineStatus } from './impact.js';
|
|
15
|
+
export type { ImpactCell, ImpactColumn, ImpactEmptyCellLabels, ImpactFinding, ImpactGrouping, ImpactMatrix, ImpactObligationFilter, ImpactStatusDisplay, ImpactSubjects, ImpactViewConfig, ParseImpactViewConfigResult, } from './impact.js';
|
|
14
16
|
export { assertionToScoringElement, complianceConfidenceHeader, requirementToScoringElement, scoreComplianceView, } from './confidence.js';
|
|
15
|
-
export { parseCoverageMetricConfig, buildCoverageMatrix, } from './coverage-metric.js';
|
|
16
|
-
export type { CoverageMetricConfig, CoverageMetricRegimes, CoverageMetricRegimesFilter, CoverageMetricSubjects, CoverageMetricThresholds, CoverageMatrix, CoverageRow, ParseCoverageMetricResult, RagStatus, } from './coverage-metric.js';
|
|
17
|
+
export { parseCoverageMetricConfig, buildCoverageMatrix, collectCoverageViewResolutionFindings, } from './coverage-metric.js';
|
|
18
|
+
export type { CoverageMetricConfig, CoverageMetricRegimes, CoverageMetricRegimesFilter, CoverageMetricSubjects, CoverageMetricThresholds, CoverageMatrix, CoverageRow, CoverageViewFinding, ParseCoverageMetricResult, RagStatus, } from './coverage-metric.js';
|
|
17
19
|
export type { ComplianceIndex, ComplianceIndexInput, DeadlineStatus, IndexRequirement, IndexAssertion, LawTree, LawTreeRequirement, ProductView, ProductRequirementStatus, ObjectDetailDef, ObjectDetailInput, RequirementTrace, TraceAssertionRow, TraceElementCatalog, TraceElementRef, TraceSourceRef, } from './types.js';
|
package/dist/compliance/index.js
CHANGED
|
@@ -3,8 +3,9 @@ export { buildLawTree, buildProductView } from './views.js';
|
|
|
3
3
|
export { buildRequirementTrace, buildTraceElementCatalog } from './trace.js';
|
|
4
4
|
export { buildGapReport } from './gap-report.js';
|
|
5
5
|
export { emptyCanon, ingestComplianceDoc } from './classify.js';
|
|
6
|
+
export { admitDocumentToCatalog, buildComplianceScan, catalogFromMap, } from './canon-catalog.js';
|
|
6
7
|
export { renderComplianceMarkdown } from './markdown.js';
|
|
7
8
|
export { renderComplianceHtml, renderImpactMatrixHtml } from './html.js';
|
|
8
|
-
export { buildImpactMatrix, renderImpactMarkdown, parseImpactViewConfig, COMPLIANCE_IMPACT_DEFAULTS, extractObjectDetails, extractProcessFlowTasks, mergeStageTaskDetails, computeDeadlineStatus } from './impact.js';
|
|
9
|
+
export { buildImpactMatrix, renderImpactMarkdown, parseImpactViewConfig, collectImpactViewResolutionFindings, COMPLIANCE_IMPACT_DEFAULTS, extractObjectDetails, extractProcessFlowTasks, mergeStageTaskDetails, computeDeadlineStatus } from './impact.js';
|
|
9
10
|
export { assertionToScoringElement, complianceConfidenceHeader, requirementToScoringElement, scoreComplianceView, } from './confidence.js';
|
|
10
|
-
export { parseCoverageMetricConfig, buildCoverageMatrix, } from './coverage-metric.js';
|
|
11
|
+
export { parseCoverageMetricConfig, buildCoverageMatrix, collectCoverageViewResolutionFindings, } from './coverage-metric.js';
|