@htilabs/platform-common-models 0.14.0 → 0.15.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/dist/{cvcEntry-0BIB9sen.d.cts → cvcEntry-DaDrEuTa.d.cts} +44 -44
- package/dist/{cvcEntry-0BIB9sen.d.ts → cvcEntry-DaDrEuTa.d.ts} +44 -44
- package/dist/cvcs/index.cjs +116 -25
- package/dist/cvcs/index.cjs.map +1 -1
- package/dist/cvcs/index.d.cts +124 -30
- package/dist/cvcs/index.d.ts +124 -30
- package/dist/cvcs/index.js +116 -25
- package/dist/cvcs/index.js.map +1 -1
- package/dist/enums/index.cjs +1 -0
- package/dist/enums/index.cjs.map +1 -1
- package/dist/enums/index.d.cts +3 -2
- package/dist/enums/index.d.ts +3 -2
- package/dist/enums/index.js +1 -0
- package/dist/enums/index.js.map +1 -1
- package/dist/{index-CDoqrfc1.d.ts → index-C0J3f169.d.ts} +1 -1
- package/dist/{index-Zu_mOJRn.d.cts → index-EPjPjR0z.d.cts} +1 -1
- package/dist/index.cjs +117 -25
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +117 -25
- package/dist/index.js.map +1 -1
- package/dist/models/index.d.cts +2 -2
- package/dist/models/index.d.ts +2 -2
- package/dist/schemas/index.d.cts +35 -35
- package/dist/schemas/index.d.ts +35 -35
- package/package.json +27 -26
- package/src/__tests__/__snapshots__/cvc-sot.snap +2 -2
- package/src/__tests__/core-information-scope-invariant.test.ts +204 -15
- package/src/__tests__/cvc-sot-snapshot.test.ts +11 -7
- package/src/__tests__/cvc-structural.test.ts +1 -1
- package/src/__tests__/location-type-routing-invariant.test.ts +1 -1
- package/src/cvcs/{coreInformationScope.v1.0.0.json → coreInformationScope.v1.1.0.json} +113 -22
- package/src/cvcs/index.ts +1 -1
- package/src/generated/cvc-enums.ts +3 -2
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* Two vocabularies describe the same thing at different grains:
|
|
6
6
|
*
|
|
7
7
|
* `roi_scope` flat item vocabulary, 27 substantive keys, no category axis
|
|
8
|
-
* `core_information_scope` 12 policy-grain CATEGORIES +
|
|
8
|
+
* `core_information_scope` 12 policy-grain CATEGORIES + 55 authorization-grain UNITS
|
|
9
|
+
* (+ 2 RETIRED tombstones, 2026-10-05)
|
|
9
10
|
*
|
|
10
11
|
* PAVE and Thread are both pinned to `roi_scope` today, and both persist stored
|
|
11
12
|
* ROIs against it. Migrating them to this domain is safe for exactly one reason:
|
|
@@ -44,6 +45,7 @@ interface Entry {
|
|
|
44
45
|
levelFloor?: number;
|
|
45
46
|
appRelevance?: string[];
|
|
46
47
|
specialDataType?: string;
|
|
48
|
+
retired?: boolean;
|
|
47
49
|
}
|
|
48
50
|
|
|
49
51
|
const read = (f: string): { entries: Entry[]; levels: Record<string, string> } =>
|
|
@@ -52,7 +54,7 @@ const read = (f: string): { entries: Entry[]; levels: Record<string, string> } =
|
|
|
52
54
|
levels: Record<string, string>;
|
|
53
55
|
};
|
|
54
56
|
|
|
55
|
-
const scope = read("coreInformationScope.v1.
|
|
57
|
+
const scope = read("coreInformationScope.v1.1.0.json");
|
|
56
58
|
const roi = read("roiScope.v1.0.0.json");
|
|
57
59
|
|
|
58
60
|
const byCode = new Map(scope.entries.map((e) => [e.code, e]));
|
|
@@ -70,16 +72,22 @@ const isMissingness = (e: Entry): boolean =>
|
|
|
70
72
|
const categories = scope.entries.filter(
|
|
71
73
|
(e) => e.parentCode === null && !isMissingness(e),
|
|
72
74
|
);
|
|
73
|
-
|
|
75
|
+
/** Every L2 row: live units AND retired tombstones. */
|
|
76
|
+
const allUnits = scope.entries.filter(
|
|
74
77
|
(e) => e.parentCode !== null && !isMissingness(e),
|
|
75
78
|
);
|
|
79
|
+
/** Live, authorizable units — what a picker offers. */
|
|
80
|
+
const units = allUnits.filter((e) => e.retired !== true);
|
|
81
|
+
/** Retired tombstones — resolvable by code, include nothing, never offered. */
|
|
82
|
+
const tombstones = allUnits.filter((e) => e.retired === true);
|
|
76
83
|
|
|
77
84
|
describe("core_information_scope — adoption invariants", () => {
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
const roiSubstantive = roi.entries
|
|
86
|
+
.map((e) => e.key)
|
|
87
|
+
.filter((k) => !MISSINGNESS.has(k));
|
|
88
|
+
|
|
89
|
+
it("resolves every substantive roi_scope key, spelled identically", () => {
|
|
90
|
+
const unitKeys = new Set(allUnits.map((u) => u.key));
|
|
83
91
|
const missing = roiSubstantive.filter((k) => !unitKeys.has(k));
|
|
84
92
|
|
|
85
93
|
// A failure here means a stored ROI can no longer be expressed in the new
|
|
@@ -88,19 +96,39 @@ describe("core_information_scope — adoption invariants", () => {
|
|
|
88
96
|
expect(roiSubstantive.length).toBe(27);
|
|
89
97
|
});
|
|
90
98
|
|
|
99
|
+
it("retires exactly the two roi_scope keys canon retired, and no other", () => {
|
|
100
|
+
// NARRATIVE-NOTES 2026-10-05 (signed Spec v2 rule 5): screen_notes and
|
|
101
|
+
// background are retired. A stored ROI naming one still RESOLVES (to a
|
|
102
|
+
// tombstone that includes nothing) — it narrows, it never widens, and
|
|
103
|
+
// canon records that only demo data named them. Any OTHER roi_scope key
|
|
104
|
+
// landing on a tombstone would be an unruled narrowing of stored consent.
|
|
105
|
+
const live = new Set(units.map((u) => u.key));
|
|
106
|
+
expect(roiSubstantive.filter((k) => !live.has(k)).sort()).toEqual([
|
|
107
|
+
"background",
|
|
108
|
+
"screen_notes",
|
|
109
|
+
]);
|
|
110
|
+
});
|
|
111
|
+
|
|
91
112
|
it("is a strict superset — the additions are additions, not renames", () => {
|
|
92
113
|
expect(units.length).toBeGreaterThan(27);
|
|
93
|
-
expect(units).toHaveLength(
|
|
114
|
+
expect(units).toHaveLength(55);
|
|
115
|
+
expect(tombstones).toHaveLength(2);
|
|
94
116
|
});
|
|
95
117
|
|
|
96
118
|
it("keeps the two grains distinct: categories decide policy, units carry consent", () => {
|
|
97
119
|
expect(categories).toHaveLength(12);
|
|
98
120
|
expect(categories.every((c) => c.selectable === false)).toBe(true);
|
|
99
121
|
expect(units.every((u) => u.selectable === true)).toBe(true);
|
|
122
|
+
// A tombstone is never authorizable — selectable would let a retired
|
|
123
|
+
// code be cited as consent again.
|
|
124
|
+
expect(tombstones.every((t) => t.selectable === false)).toBe(true);
|
|
100
125
|
});
|
|
101
126
|
|
|
102
|
-
it("wires every unit to exactly one category, reciprocally", () => {
|
|
103
|
-
|
|
127
|
+
it("wires every unit — tombstones included — to exactly one category, reciprocally", () => {
|
|
128
|
+
// Tombstones stay in their category's childCodes: the locked spec §4 C4
|
|
129
|
+
// invariant makes childCodes the exact inverse of parentCode. Pickers
|
|
130
|
+
// offer only selectable children.
|
|
131
|
+
for (const u of allUnits) {
|
|
104
132
|
const parent = byCode.get(u.parentCode as string);
|
|
105
133
|
expect(parent, `unit ${u.key} has a dangling parent`).toBeDefined();
|
|
106
134
|
expect(parent?.selectable, `unit ${u.key} hangs off a selectable row`).toBe(
|
|
@@ -110,7 +138,7 @@ describe("core_information_scope — adoption invariants", () => {
|
|
|
110
138
|
u.code,
|
|
111
139
|
);
|
|
112
140
|
}
|
|
113
|
-
expect(categories.flatMap((c) => c.childCodes)).toHaveLength(
|
|
141
|
+
expect(categories.flatMap((c) => c.childCodes)).toHaveLength(allUnits.length);
|
|
114
142
|
});
|
|
115
143
|
|
|
116
144
|
it("publishes the posture sets as data, so they stop being literals", () => {
|
|
@@ -170,7 +198,9 @@ const PUBLISHED: ReadonlyArray<readonly [string, readonly string[]]> = [
|
|
|
170
198
|
],
|
|
171
199
|
["contact", ["contact_info", "safe_locations", "priorities_safety", "encounter_location"]],
|
|
172
200
|
["services", ["contact_history", "service_history", "plans_goals"]],
|
|
173
|
-
|
|
201
|
+
// screen_notes (-001) and background (-003) are RETIRED tombstones since
|
|
202
|
+
// 2026-10-05 — they keep their codes; session_summary APPENDED at -004.
|
|
203
|
+
["notes", ["screen_notes", "case_notes", "background", "session_summary"]],
|
|
174
204
|
[
|
|
175
205
|
"health_accommodation",
|
|
176
206
|
[
|
|
@@ -209,7 +239,7 @@ const byKey = new Map(scope.entries.map((e) => [e.key, e]));
|
|
|
209
239
|
|
|
210
240
|
describe("core_information_scope — published codes never move", () => {
|
|
211
241
|
it("keeps every published category and unit at its frozen positional code", () => {
|
|
212
|
-
const actual = [...categories, ...
|
|
242
|
+
const actual = [...categories, ...allUnits].map((e): [string, string] => [e.key, e.code]);
|
|
213
243
|
const expected = PUBLISHED.flatMap(([cat, us], ci): [string, string][] => [
|
|
214
244
|
[cat, codeOf(ci + 1)],
|
|
215
245
|
...us.map((u, ui): [string, string] => [u, codeOf(ci + 1, ui + 1)]),
|
|
@@ -319,7 +349,7 @@ describe("core_information_scope — encounter_location (2026-10-01)", () => {
|
|
|
319
349
|
*/
|
|
320
350
|
describe("core_information_scope — safe_locations ratified (2026-09-08)", () => {
|
|
321
351
|
const raw = JSON.parse(
|
|
322
|
-
readFileSync(path.join(cvcDir, "coreInformationScope.v1.
|
|
352
|
+
readFileSync(path.join(cvcDir, "coreInformationScope.v1.1.0.json"), "utf8"),
|
|
323
353
|
) as { _status: string; entries: (Entry & { title: string; definition: string })[] };
|
|
324
354
|
const unit = raw.entries.find((e) => e.key === "safe_locations");
|
|
325
355
|
|
|
@@ -337,3 +367,162 @@ describe("core_information_scope — safe_locations ratified (2026-09-08)", () =
|
|
|
337
367
|
expect(raw._status).toContain("`safe_locations` is CANON");
|
|
338
368
|
});
|
|
339
369
|
});
|
|
370
|
+
|
|
371
|
+
/**
|
|
372
|
+
* Narrative notes — canon CVC-236 amendment 2026-10-05 (NARRATIVE-NOTES,
|
|
373
|
+
* signed Spec v2 rule 5, Crysta; prototype `data/cvcs/
|
|
374
|
+
* core_information_scope.yaml` @ 9ef79748, lines 445-467). The category now
|
|
375
|
+
* offers two units, Session summary and Session & case notes; `screen_notes`
|
|
376
|
+
* and `background` are listed in `retired_units`. Canon lists session_summary
|
|
377
|
+
* FIRST, but codes follow the generator's frozen ledger, so no published
|
|
378
|
+
* ordinal moves and no retired ordinal is reused.
|
|
379
|
+
*/
|
|
380
|
+
describe("core_information_scope — narrative notes (2026-10-05)", () => {
|
|
381
|
+
const raw = JSON.parse(
|
|
382
|
+
readFileSync(path.join(cvcDir, "coreInformationScope.v1.1.0.json"), "utf8"),
|
|
383
|
+
) as { entries: (Entry & { title: string; definition: string })[] };
|
|
384
|
+
const rawByKey = new Map(raw.entries.map((e) => [e.key, e]));
|
|
385
|
+
const notes = byKey.get("notes");
|
|
386
|
+
|
|
387
|
+
it("keeps screen_notes and background as RETIRED tombstones at their published codes", () => {
|
|
388
|
+
for (const [key, code, title] of [
|
|
389
|
+
["screen_notes", "236-005-001-000-000-000-000", "Screen notes"],
|
|
390
|
+
["background", "236-005-003-000-000-000-000", "Background information"],
|
|
391
|
+
] as const) {
|
|
392
|
+
const t = rawByKey.get(key);
|
|
393
|
+
expect(t?.code, key).toBe(code);
|
|
394
|
+
expect(t?.title, key).toBe(title);
|
|
395
|
+
expect(t?.retired, key).toBe(true);
|
|
396
|
+
expect(t?.selectable, key).toBe(false);
|
|
397
|
+
expect(t?.parentCode, key).toBe(notes?.code);
|
|
398
|
+
expect(t?.childCodes, key).toEqual([]);
|
|
399
|
+
expect(t?.definition, key).toMatch(/^RETIRED 2026-10-05 /);
|
|
400
|
+
expect(t?.definition, key).toContain("includes nothing");
|
|
401
|
+
// Nothing left to share or view: no decision attributes a picker or a
|
|
402
|
+
// share builder could act on.
|
|
403
|
+
for (const attr of [
|
|
404
|
+
"shareableDefault",
|
|
405
|
+
"levelFloor",
|
|
406
|
+
"appRelevance",
|
|
407
|
+
"specialDataType",
|
|
408
|
+
"platformFloor",
|
|
409
|
+
"required",
|
|
410
|
+
] as const) {
|
|
411
|
+
expect(t?.[attr], `${key}.${attr}`).toBeUndefined();
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
});
|
|
415
|
+
|
|
416
|
+
it("keeps case_notes at 236-005-002 under canon's new label", () => {
|
|
417
|
+
const u = rawByKey.get("case_notes");
|
|
418
|
+
expect(u?.code).toBe("236-005-002-000-000-000-000");
|
|
419
|
+
expect(u?.title).toBe("Session & case notes");
|
|
420
|
+
expect(u?.selectable).toBe(true);
|
|
421
|
+
expect(u?.retired).toBeUndefined();
|
|
422
|
+
});
|
|
423
|
+
|
|
424
|
+
it("APPENDS session_summary at 236-005-004 — never at a retired slot", () => {
|
|
425
|
+
const u = rawByKey.get("session_summary");
|
|
426
|
+
expect(u?.code).toBe("236-005-004-000-000-000-000");
|
|
427
|
+
expect(u?.title).toBe("Session summary");
|
|
428
|
+
expect(u?.selectable).toBe(true);
|
|
429
|
+
expect(u?.parentCode).toBe(notes?.code);
|
|
430
|
+
expect(u?.shareableDefault).toBe(true);
|
|
431
|
+
expect(u?.levelFloor).toBe(3);
|
|
432
|
+
expect(u?.specialDataType).toBe("survivor_confidential");
|
|
433
|
+
expect(u?.appRelevance).toEqual(["PAVE", "Thread"]);
|
|
434
|
+
});
|
|
435
|
+
|
|
436
|
+
it("lists the category's children in code order, tombstones included, two of them live", () => {
|
|
437
|
+
expect(notes?.childCodes).toEqual([
|
|
438
|
+
"236-005-001-000-000-000-000",
|
|
439
|
+
"236-005-002-000-000-000-000",
|
|
440
|
+
"236-005-003-000-000-000-000",
|
|
441
|
+
"236-005-004-000-000-000-000",
|
|
442
|
+
]);
|
|
443
|
+
const liveKids = (notes?.childCodes ?? [])
|
|
444
|
+
.map((c) => byCode.get(c))
|
|
445
|
+
.filter((e) => e?.selectable === true)
|
|
446
|
+
.map((e) => e?.key);
|
|
447
|
+
expect(liveKids).toEqual(["case_notes", "session_summary"]);
|
|
448
|
+
});
|
|
449
|
+
|
|
450
|
+
it("tombstones only what canon retired — no other unit in the domain is retired", () => {
|
|
451
|
+
expect(tombstones.map((t) => t.key).sort()).toEqual(["background", "screen_notes"]);
|
|
452
|
+
});
|
|
453
|
+
});
|
|
454
|
+
|
|
455
|
+
/**
|
|
456
|
+
* OFFENDER-SYSTEM-UNITS-THREAD — canon CVC-236 amendment 2026-10-01 (Crysta
|
|
457
|
+
* R1; prototype `data/cvcs/core_information_scope.yaml` @ 0247b654, carried
|
|
458
|
+
* by the 9ef79748 regeneration at lines 407-410). Thread captures perpetrator
|
|
459
|
+
* records and protection orders, so both risk units now list Thread. Codes
|
|
460
|
+
* and posture are unchanged; only app relevance and wording moved.
|
|
461
|
+
*/
|
|
462
|
+
describe("core_information_scope — Thread joins offender + system units (2026-10-01)", () => {
|
|
463
|
+
it("lists Thread on offender_facilitator and system_involvement, codes unchanged", () => {
|
|
464
|
+
const off = byKey.get("offender_facilitator");
|
|
465
|
+
const sys = byKey.get("system_involvement");
|
|
466
|
+
expect(off?.code).toBe("236-002-015-000-000-000-000");
|
|
467
|
+
expect(off?.appRelevance).toEqual(["PAVE", "Thread", "LEADS"]);
|
|
468
|
+
expect(sys?.code).toBe("236-002-016-000-000-000-000");
|
|
469
|
+
expect(sys?.appRelevance).toEqual(["PAVE", "Thread"]);
|
|
470
|
+
});
|
|
471
|
+
});
|
|
472
|
+
|
|
473
|
+
/**
|
|
474
|
+
* SOT v1.1.0 supersedes v1.0.0 (ADR-CVC-0.8.13 Addendum 2026-10-05): the
|
|
475
|
+
* narrative-notes change is not additive — two published units lost
|
|
476
|
+
* `selectable` and `case_notes` was narrowed — so it cannot reuse 1.0.0
|
|
477
|
+
* under the seeder's §9.1.2 content-drift guard. `_supersedes` is the house
|
|
478
|
+
* shape (victimAbuseTypes / incidentParticipationRoles v1.1.0).
|
|
479
|
+
*/
|
|
480
|
+
describe("core_information_scope — v1.1.0 supersedes v1.0.0", () => {
|
|
481
|
+
const env = JSON.parse(
|
|
482
|
+
readFileSync(path.join(cvcDir, "coreInformationScope.v1.1.0.json"), "utf8"),
|
|
483
|
+
) as {
|
|
484
|
+
version: string;
|
|
485
|
+
_supersedes: {
|
|
486
|
+
version: string;
|
|
487
|
+
keyMap: Record<string, string>;
|
|
488
|
+
retiredCodes: unknown[];
|
|
489
|
+
notes: Record<string, string>;
|
|
490
|
+
};
|
|
491
|
+
entries: Entry[];
|
|
492
|
+
};
|
|
493
|
+
const sup = env._supersedes;
|
|
494
|
+
|
|
495
|
+
it("is version 1.1.0, superseding 1.0.0, with no code withdrawn", () => {
|
|
496
|
+
expect(env.version).toBe("1.1.0");
|
|
497
|
+
expect(sup.version).toBe("1.0.0");
|
|
498
|
+
// Tombstones keep their codes, so nothing is withdrawn.
|
|
499
|
+
expect(sup.retiredCodes).toEqual([]);
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
it("maps every v1.0.0 key to itself — every key but the one added", () => {
|
|
503
|
+
const keys = env.entries.map((e) => e.key);
|
|
504
|
+
expect(Object.keys(sup.keyMap)).toEqual(keys.filter((k) => k !== "session_summary"));
|
|
505
|
+
expect(Object.keys(sup.keyMap)).toHaveLength(72);
|
|
506
|
+
for (const [from, to] of Object.entries(sup.keyMap)) expect(to, from).toBe(from);
|
|
507
|
+
});
|
|
508
|
+
|
|
509
|
+
it("notes each retirement and the case_notes narrowing", () => {
|
|
510
|
+
expect(Object.keys(sup.notes).sort()).toEqual([
|
|
511
|
+
"background",
|
|
512
|
+
"case_notes",
|
|
513
|
+
"screen_notes",
|
|
514
|
+
"summary",
|
|
515
|
+
]);
|
|
516
|
+
for (const k of ["screen_notes", "background"]) {
|
|
517
|
+
expect(sup.notes[k], k).toContain("NO successor key");
|
|
518
|
+
expect(sup.notes[k], k).toContain("includes nothing");
|
|
519
|
+
}
|
|
520
|
+
expect(sup.notes["case_notes"]).toContain("reads NARROWER");
|
|
521
|
+
expect(sup.notes["case_notes"]).toContain("no longer includes the session summary");
|
|
522
|
+
expect(sup.notes["summary"]).toContain("`session_summary` (236-005-004)");
|
|
523
|
+
});
|
|
524
|
+
|
|
525
|
+
it("leaves no v1.0.0 file behind for the registry to resolve", () => {
|
|
526
|
+
expect(() => readFileSync(path.join(cvcDir, "coreInformationScope.v1.0.0.json"))).toThrow();
|
|
527
|
+
});
|
|
528
|
+
});
|
|
@@ -736,15 +736,19 @@ const SOT_SPECS: readonly SotSpec[] = [
|
|
|
736
736
|
// 3 substantive age bands (@pave/domain AGE_BANDS_AT_EVENT minus `unknown`,
|
|
737
737
|
// which maps to the missingness sentinel) + 4 missingness = 7
|
|
738
738
|
{ file: "minorAdultStatus.v1.0.0.json", domain: "minor_adult_status", expectedCount: 7 },
|
|
739
|
-
// CVC-236 — 12 policy-grain categories +
|
|
739
|
+
// CVC-236 — 12 policy-grain categories + 55 live authorization-grain units
|
|
740
740
|
// (priorities_safety, 236-003-003, added 2026-09-29; encounter_location,
|
|
741
|
-
// 236-003-004, added 2026-10-01
|
|
742
|
-
//
|
|
743
|
-
//
|
|
744
|
-
|
|
745
|
-
|
|
741
|
+
// 236-003-004, added 2026-10-01; session_summary, 236-005-004, added
|
|
742
|
+
// 2026-10-05) + 2 RETIRED tombstones (screen_notes 236-005-001, background
|
|
743
|
+
// 236-005-003, retired 2026-10-05 — codes kept, never reused) + 1
|
|
744
|
+
// missingness root + 3 workspace-standard missingness children = 73.
|
|
745
|
+
// SOT v1.1.0 (supersedes 1.0.0: the retirements + the case_notes narrowing
|
|
746
|
+
// are not additive). Generated by scripts/gen-core-information-scope.py;
|
|
747
|
+
// codes are FROZEN there.
|
|
748
|
+
{
|
|
749
|
+
file: "coreInformationScope.v1.1.0.json",
|
|
746
750
|
domain: "core_information_scope",
|
|
747
|
-
expectedCount:
|
|
751
|
+
expectedCount: 73,
|
|
748
752
|
},
|
|
749
753
|
] as const;
|
|
750
754
|
|
|
@@ -235,7 +235,7 @@ const SOT_FILES: readonly SotFile[] = [
|
|
|
235
235
|
{ file: "suggestionSource.v1.0.0.json", expectedDomain: "suggestion_source" },
|
|
236
236
|
// CVC-236 — generated by scripts/gen-core-information-scope.py. Omitted from
|
|
237
237
|
// this list since it was authored; added with the priorities_safety unit.
|
|
238
|
-
{ file: "coreInformationScope.v1.
|
|
238
|
+
{ file: "coreInformationScope.v1.1.0.json", expectedDomain: "core_information_scope" },
|
|
239
239
|
// ─── GDR §10.1 CAR-contract vocabularies (provisional 900-block; PAVE
|
|
240
240
|
// @pave/domain verbatim; bead pv-pgdr-cvc-source-gdr-10-1-bulk-publish). ───
|
|
241
241
|
{ file: "assertionStatus.v1.0.0.json", expectedDomain: "assertion_status" },
|
|
@@ -49,7 +49,7 @@ const read = (f: string): { entries: Entry[]; _source?: string } =>
|
|
|
49
49
|
};
|
|
50
50
|
|
|
51
51
|
const lt = read("locationType.v1.0.0.json");
|
|
52
|
-
const scope = read("coreInformationScope.v1.
|
|
52
|
+
const scope = read("coreInformationScope.v1.1.0.json");
|
|
53
53
|
const byKey = new Map(lt.entries.map((e) => [e.key, e]));
|
|
54
54
|
const scopeByKey = new Map(scope.entries.map((e) => [e.key, e]));
|
|
55
55
|
const reasons = lt.entries.filter((e) => e.key !== "missingness_root");
|
|
@@ -1,13 +1,97 @@
|
|
|
1
1
|
{
|
|
2
2
|
"domain": "core_information_scope",
|
|
3
3
|
"name": "Core Information Scope",
|
|
4
|
-
"version": "1.
|
|
5
|
-
"_status": "DRAFT: canonical number 236, self-declared by the source YAML (`cvc_id: CVC-236`); CVC_INDEX.md carries no row for it yet, so the drift gate classifies it INDEX_ABSENT. Sourced from canonical CVC-236 `core_information_scope` v2 (authored 2026-08-13, restructured 2026-08-14): 12 categories /
|
|
6
|
-
"_source": "htilabstech/prototype/data/cvcs/core_information_scope.yaml @
|
|
4
|
+
"version": "1.1.0",
|
|
5
|
+
"_status": "DRAFT: canonical number 236, self-declared by the source YAML (`cvc_id: CVC-236`); CVC_INDEX.md carries no row for it yet, so the drift gate classifies it INDEX_ABSENT. Sourced from canonical CVC-236 `core_information_scope` v2 (authored 2026-08-13, restructured 2026-08-14): 12 categories / 55 live units + 2 retired tombstones. TWO GRAINS, deliberately modelled as hierarchy: L1 categories are the POLICY grain and are NOT selectable; L2 units are the AUTHORIZATION grain and are what an ROI or a share actually authorizes. This is the axis the sibling `roi_scope` domain deliberately omits — `roi_scope` is the flat item vocabulary, and every one of its 27 substantive keys resolves here, spelled identically, with no renames and no collisions. That is what makes adopting this domain a migration rather than a re-consent: a stored ROI never WIDENS. RETIRED TOMBSTONES: `screen_notes` (236-005-001, retired 2026-10-05, Narrative notes, signed Spec v2 rule 5); `background` (236-005-003, retired 2026-10-05, Narrative notes, signed Spec v2 rule 5). Each keeps its published code (never reused), is `selectable: false` + `retired: true`, and includes nothing: a stored ROI or share that names one resolves to \"retired\", not \"unknown\". Unit codes follow the generator's frozen ledger, not canon's display order: a new unit APPENDS inside its category. VERSION 1.1.0 supersedes 1.0.0 because the change is not additive (see `_supersedes`); neither version was seeded in platform-prod or platform-dev when it was minted (checked 2026-10-06), so the bump is the convention (ADR-CVC-0.8.13 Addendum 2026-10-05), not a guard-driven fix. `safe_locations` is CANON since CVC236-AUDIT R1 (Crysta, 2026-09-08): id and label ratified and minted in the Notion codebook; the former PROVISIONAL marker is retired. The Notion codebook is AHEAD of the yaml mirror on `instruments` (31 rows, acknowledged via --allow-codebook-ahead and not exported here), pending its own absorb lane. PENDING canonical Notion authoring + steward ratification.",
|
|
6
|
+
"_source": "htilabstech/prototype/data/cvcs/core_information_scope.yaml @ 9ef79748 (CVC-236 v2, restructured 2026-08-14, amended 2026-10-01; read from origin/main; structural columns cross-checked against htilabstech/prototype/Final CVCs/System Roles, Permissions, & Account Management (IC-66)/core-information_scope — codebook.csv @ 9ef79748; 2 retired codebook rows matched to the yaml's retired_units; 31 codebook-ahead rows under instruments acknowledged, not exported)",
|
|
7
|
+
"_supersedes": {
|
|
8
|
+
"version": "1.0.0",
|
|
9
|
+
"keyMap": {
|
|
10
|
+
"missingness_root": "missingness_root",
|
|
11
|
+
"unknown": "unknown",
|
|
12
|
+
"anonymous": "anonymous",
|
|
13
|
+
"data_not_collected": "data_not_collected",
|
|
14
|
+
"identifying": "identifying",
|
|
15
|
+
"names": "names",
|
|
16
|
+
"dob": "dob",
|
|
17
|
+
"addresses": "addresses",
|
|
18
|
+
"additional_ids": "additional_ids",
|
|
19
|
+
"demographics": "demographics",
|
|
20
|
+
"risk": "risk",
|
|
21
|
+
"screen_indicators": "screen_indicators",
|
|
22
|
+
"victimization": "victimization",
|
|
23
|
+
"ida_full": "ida_full",
|
|
24
|
+
"ida_consid": "ida_consid",
|
|
25
|
+
"initial_screen": "initial_screen",
|
|
26
|
+
"tra": "tra",
|
|
27
|
+
"lap": "lap",
|
|
28
|
+
"danger_assessment": "danger_assessment",
|
|
29
|
+
"injury_and_strangulation": "injury_and_strangulation",
|
|
30
|
+
"stalking_assessment": "stalking_assessment",
|
|
31
|
+
"ae_intake": "ae_intake",
|
|
32
|
+
"hope_scale": "hope_scale",
|
|
33
|
+
"assessment_records": "assessment_records",
|
|
34
|
+
"determinations": "determinations",
|
|
35
|
+
"offender_facilitator": "offender_facilitator",
|
|
36
|
+
"system_involvement": "system_involvement",
|
|
37
|
+
"derived_risk_signals": "derived_risk_signals",
|
|
38
|
+
"contact": "contact",
|
|
39
|
+
"contact_info": "contact_info",
|
|
40
|
+
"safe_locations": "safe_locations",
|
|
41
|
+
"priorities_safety": "priorities_safety",
|
|
42
|
+
"encounter_location": "encounter_location",
|
|
43
|
+
"services": "services",
|
|
44
|
+
"contact_history": "contact_history",
|
|
45
|
+
"service_history": "service_history",
|
|
46
|
+
"plans_goals": "plans_goals",
|
|
47
|
+
"notes": "notes",
|
|
48
|
+
"screen_notes": "screen_notes",
|
|
49
|
+
"case_notes": "case_notes",
|
|
50
|
+
"background": "background",
|
|
51
|
+
"health_accommodation": "health_accommodation",
|
|
52
|
+
"accommodation_needs": "accommodation_needs",
|
|
53
|
+
"disability_subtypes": "disability_subtypes",
|
|
54
|
+
"mental_health_status": "mental_health_status",
|
|
55
|
+
"substance_use_status": "substance_use_status",
|
|
56
|
+
"chronic_health_status": "chronic_health_status",
|
|
57
|
+
"hiv_status": "hiv_status",
|
|
58
|
+
"mental_health_screen": "mental_health_screen",
|
|
59
|
+
"trauma_and_coping_screen": "trauma_and_coping_screen",
|
|
60
|
+
"behavioral_health_intake": "behavioral_health_intake",
|
|
61
|
+
"immigration_legal_status": "immigration_legal_status",
|
|
62
|
+
"immigration_status": "immigration_status",
|
|
63
|
+
"uscis_alien_number": "uscis_alien_number",
|
|
64
|
+
"federal_protection_applications": "federal_protection_applications",
|
|
65
|
+
"tvap_enrollment": "tvap_enrollment",
|
|
66
|
+
"le_report_status": "le_report_status",
|
|
67
|
+
"system": "system",
|
|
68
|
+
"system_info": "system_info",
|
|
69
|
+
"network_associations": "network_associations",
|
|
70
|
+
"network_membership": "network_membership",
|
|
71
|
+
"persona_links": "persona_links",
|
|
72
|
+
"commercial_activity": "commercial_activity",
|
|
73
|
+
"ad_content": "ad_content",
|
|
74
|
+
"commercial_patterns": "commercial_patterns",
|
|
75
|
+
"investigative_work_product": "investigative_work_product",
|
|
76
|
+
"case_determinations": "case_determinations",
|
|
77
|
+
"case_lifecycle": "case_lifecycle",
|
|
78
|
+
"case_attachments": "case_attachments",
|
|
79
|
+
"object_identifiers": "object_identifiers",
|
|
80
|
+
"phone_identifiers": "phone_identifiers",
|
|
81
|
+
"object_identity_attributes": "object_identity_attributes"
|
|
82
|
+
},
|
|
83
|
+
"retiredCodes": [],
|
|
84
|
+
"notes": {
|
|
85
|
+
"summary": "Every v1.0.0 key is still an entry in v1.1.0, at its v1.0.0 code, so `keyMap` is the identity and `retiredCodes` is empty: no code was withdrawn. Non-additive because 2 published unit(s) are now RETIRED tombstones and 1 unit(s) read narrower (notes below). Added: `session_summary` (236-005-004).",
|
|
86
|
+
"screen_notes": "v1.0.0 `screen_notes` was a selectable unit. Retired 2026-10-05 (Narrative notes, signed Spec v2 rule 5): The Initial Screen's notes box is an instrument note and belongs to the Initial Screen. It stays at 236-005-001 as a tombstone (`selectable: false`, `retired: true`) with NO successor key, and includes nothing — a stored ROI or share that names it narrows, never widens. Canon records that only demo data named it (Crysta 2026-10-04); the demo presets were rewritten by hand.",
|
|
87
|
+
"background": "v1.0.0 `background` was a selectable unit. Retired 2026-10-05 (Narrative notes, signed Spec v2 rule 5): Nothing ever captured it. It stays at 236-005-003 as a tombstone (`selectable: false`, `retired: true`) with NO successor key, and includes nothing — a stored ROI or share that names it narrows, never widens. Canon records that only demo data named it (Crysta 2026-10-04); the demo presets were rewritten by hand.",
|
|
88
|
+
"case_notes": "v1.0.0 `case_notes` ('Detailed case notes') keeps 236-005-002 but reads NARROWER under its new label 'Session & case notes' (renamed + narrowed 2026-10-02, Crysta; signed 2026-10-05, Narrative notes Spec v2 rule 5): every note whose home is a session of the case or the case itself, OTHER THAN the session summary, with its files. The session summary (the typed summary and each note marked 'Include in session summary') now rides the new `session_summary` unit (236-005-004), and a note written inside an instrument, in the Determination notes box, or in a notes box on another record belongs to that record. A stored ROI or share that authorized `case_notes` therefore no longer includes the session summary; whether it should also gain `session_summary` is a consent question for the consumer, not a mapping."
|
|
89
|
+
}
|
|
90
|
+
},
|
|
7
91
|
"levels": {
|
|
8
92
|
"0": "Unknown or Missing",
|
|
9
93
|
"1": "Category (policy grain, not selectable)",
|
|
10
|
-
"2": "Information unit (authorization grain
|
|
94
|
+
"2": "Information unit (authorization grain; selectable unless retired)"
|
|
11
95
|
},
|
|
12
96
|
"entries": [
|
|
13
97
|
{
|
|
@@ -423,10 +507,11 @@
|
|
|
423
507
|
"selectable": true,
|
|
424
508
|
"parentCode": "236-002-000-000-000-000-000",
|
|
425
509
|
"childCodes": [],
|
|
426
|
-
"definition": "Offender + facilitator records. Category `risk`. Carries TRA perpetrator records (ruled 2026-08-14): content wins — third-party identity never rides a subject-instrument disclosure silently.",
|
|
510
|
+
"definition": "Offender + facilitator records. Category `risk`. Carries TRA perpetrator records (ruled 2026-08-14): content wins — third-party identity never rides a subject-instrument disclosure silently. | THREAD ADDED 2026-10-01 (OFFENDER-SYSTEM-UNITS-THREAD, Crysta R1 — Nate Luginbill's Question set 2 item 4): app_relevance follows where the unit's content is captured, and Thread captures perpetrator records (identity · description · vehicle · violence history in PAVE 2.0's Thread; in the prototype a relevant person with the offender role-in-case + the Priorities Q1 source of the danger). The 2026-08-14 rule was never Thread-exempt — Thread had no box, so perpetrator identity rode under the victim's `names`; with the box it rides HERE and comes out of names (R2). The offender PROFILE never rides under system_involvement because a protection order names them (R3).",
|
|
427
511
|
"levelFloor": 3,
|
|
428
512
|
"appRelevance": [
|
|
429
513
|
"PAVE",
|
|
514
|
+
"Thread",
|
|
430
515
|
"LEADS"
|
|
431
516
|
],
|
|
432
517
|
"shareableDefault": true,
|
|
@@ -439,10 +524,11 @@
|
|
|
439
524
|
"selectable": true,
|
|
440
525
|
"parentCode": "236-002-000-000-000-000-000",
|
|
441
526
|
"childCodes": [],
|
|
442
|
-
"definition": "System involvement. Category `risk`.",
|
|
527
|
+
"definition": "System involvement. Category `risk`. THREAD ADDED 2026-10-01 (OFFENDER-SYSTEM-UNITS-THREAD, Crysta R1): Thread captures protection orders and system-involvement answers in PAVE 2.0; the [PAVE] flag was the record as of 2026-08-14. R3 (protection orders — canon holds, no split): a protection order is ONE record under this unit, whole — the survivor's legal protection (petitioner · court · status · expiry · violations) with the respondent's name as it appears on the order, a court document; an offender profile may REFERENCE the order (the ADR's 'offender-bundle extension' is a presentation), but the order is delivered only when this unit is granted — a reference carries no content, the referenced record rides its own unit (the 2026-10-01 safety-plan reference rule).",
|
|
443
528
|
"levelFloor": 3,
|
|
444
529
|
"appRelevance": [
|
|
445
|
-
"PAVE"
|
|
530
|
+
"PAVE",
|
|
531
|
+
"Thread"
|
|
446
532
|
],
|
|
447
533
|
"shareableDefault": true,
|
|
448
534
|
"specialDataType": "survivor_confidential"
|
|
@@ -575,7 +661,7 @@
|
|
|
575
661
|
"selectable": true,
|
|
576
662
|
"parentCode": "236-004-000-000-000-000-000",
|
|
577
663
|
"childCodes": [],
|
|
578
|
-
"definition": "Contact history with this agency. Category `services`.
|
|
664
|
+
"definition": "Contact history with this agency. Category `services`. DELIVERS since 2026-10-01 (CONTACT-HISTORY-REGISTER, Crysta R1–R3 — Nate Luginbill's Question set 2 item 3; honest-empty from 2026-08-14 to that date): the register of this agency's own contacts with the person — one row per session, date · channel (CVC-47) · kind of sitting (CVC-217) · the agency/program as recorded, plus a count line — computed from the SENDING agency's session records at send time by the one as-delivered builder, never stored (UDD person.contact_history, derived · accumulating_log · IC-76; source fields capture.session_started_at · capture.service_delivery_channel [its session-record store `contact_method`] · capture.session_template). The fact of contact, not content: no notes, answers, outcomes or services — service_history carries the service instances (the Thread session-as-service row is the same session's other view). Which sessions: closed plus the sending one; drafts from other days, discarded sessions, inbound-share reviews (origin claimed_share), other agencies' sessions (knowing is not telling) and LEADS sessions never ride. No domain_map row — sessions are no-CAR facts; the coverage gate reads the crosswalk derived_units entry (field + store + builder marker). Presets: Thread risk_only_handoff (carried it throughout) · ROI full_collab gains it 2026-10-01 (derivation for veto). Smoke FLOW-381.",
|
|
579
665
|
"levelFloor": 3,
|
|
580
666
|
"appRelevance": [
|
|
581
667
|
"PAVE",
|
|
@@ -625,9 +711,10 @@
|
|
|
625
711
|
"childCodes": [
|
|
626
712
|
"236-005-001-000-000-000-000",
|
|
627
713
|
"236-005-002-000-000-000-000",
|
|
628
|
-
"236-005-003-000-000-000-000"
|
|
714
|
+
"236-005-003-000-000-000-000",
|
|
715
|
+
"236-005-004-000-000-000-000"
|
|
629
716
|
],
|
|
630
|
-
"definition": "Narrative notes — policy-grain category. Units under it are the authorization grain. LEADS flag dropped 2026-08-14 (all units PAVE/Thread — was an empty shell for LEADS-only agencies).",
|
|
717
|
+
"definition": "Narrative notes — policy-grain category. Units under it are the authorization grain. LEADS flag dropped 2026-08-14 (all units PAVE/Thread — was an empty shell for LEADS-only agencies). | NARRATIVE-NOTES 2026-10-05 (signed Spec v2, rule 5 — Crysta: 'Narrative notes - I've signed off on this spec.'): two sub-categories, Session summary and Session & case notes. It holds only the notes whose home is a session of the case or the case itself; a note written inside an instrument, in the Determination notes box, or in a notes box on another record belongs to that record.",
|
|
631
718
|
"levelFloor": 3,
|
|
632
719
|
"appRelevance": [
|
|
633
720
|
"PAVE",
|
|
@@ -640,26 +727,20 @@
|
|
|
640
727
|
"code": "236-005-001-000-000-000-000",
|
|
641
728
|
"key": "screen_notes",
|
|
642
729
|
"title": "Screen notes",
|
|
643
|
-
"selectable":
|
|
730
|
+
"selectable": false,
|
|
644
731
|
"parentCode": "236-005-000-000-000-000-000",
|
|
645
732
|
"childCodes": [],
|
|
646
|
-
"definition": "Screen notes.
|
|
647
|
-
"
|
|
648
|
-
"appRelevance": [
|
|
649
|
-
"PAVE",
|
|
650
|
-
"Thread"
|
|
651
|
-
],
|
|
652
|
-
"shareableDefault": true,
|
|
653
|
-
"specialDataType": "survivor_confidential"
|
|
733
|
+
"definition": "RETIRED 2026-10-05 (Narrative notes, signed Spec v2 rule 5). The Initial Screen's notes box is an instrument note and belongs to the Initial Screen. No longer offered in share policy, internal viewing settings or a release; a stored code resolves here so a reader can tell retired from unknown, and includes nothing.",
|
|
734
|
+
"retired": true
|
|
654
735
|
},
|
|
655
736
|
{
|
|
656
737
|
"code": "236-005-002-000-000-000-000",
|
|
657
738
|
"key": "case_notes",
|
|
658
|
-
"title": "
|
|
739
|
+
"title": "Session & case notes",
|
|
659
740
|
"selectable": true,
|
|
660
741
|
"parentCode": "236-005-000-000-000-000-000",
|
|
661
742
|
"childCodes": [],
|
|
662
|
-
"definition": "
|
|
743
|
+
"definition": "Session & case notes. Category `notes`. RENAMED + NARROWED 2026-10-02 (Crysta; was 'Detailed case notes'; the code is unchanged). Every note whose home is a session of the case or the case itself, other than the session summary, with its files. Read from the notes store, one row per note, through the note's own visibility; the session_note / log_entry claims keep their viewing rows in domain_map and are never share content.",
|
|
663
744
|
"levelFloor": 3,
|
|
664
745
|
"appRelevance": [
|
|
665
746
|
"PAVE",
|
|
@@ -672,10 +753,20 @@
|
|
|
672
753
|
"code": "236-005-003-000-000-000-000",
|
|
673
754
|
"key": "background",
|
|
674
755
|
"title": "Background information",
|
|
756
|
+
"selectable": false,
|
|
757
|
+
"parentCode": "236-005-000-000-000-000-000",
|
|
758
|
+
"childCodes": [],
|
|
759
|
+
"definition": "RETIRED 2026-10-05 (Narrative notes, signed Spec v2 rule 5). Nothing ever captured it. No longer offered in share policy, internal viewing settings or a release; a stored code resolves here so a reader can tell retired from unknown, and includes nothing.",
|
|
760
|
+
"retired": true
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"code": "236-005-004-000-000-000-000",
|
|
764
|
+
"key": "session_summary",
|
|
765
|
+
"title": "Session summary",
|
|
675
766
|
"selectable": true,
|
|
676
767
|
"parentCode": "236-005-000-000-000-000-000",
|
|
677
768
|
"childCodes": [],
|
|
678
|
-
"definition": "
|
|
769
|
+
"definition": "Session summary. Category `notes`. MINTED 2026-10-02 (Crysta: two sub-categories — 'Agree'); in the apps since 2026-10-05 (NARRATIVE-NOTES). Includes the typed session summary (one note marked as the summary — it has no visibility of its own and freezes when the session is submitted) and each note whose home is that session and that the advocate marked 'Include in session summary'. A marked note from another home shows in the on-screen summary and is included in a share only with its own home, never here.",
|
|
679
770
|
"levelFloor": 3,
|
|
680
771
|
"appRelevance": [
|
|
681
772
|
"PAVE",
|
package/src/cvcs/index.ts
CHANGED
|
@@ -164,7 +164,7 @@ import romanticRelationshipChangeTypeSot from "./romanticRelationshipChangeType.
|
|
|
164
164
|
import riskCategorySot from "./riskCategory.v1.0.0.json" with { type: "json" };
|
|
165
165
|
import coreFunctionsSot from "./coreFunctions.v1.0.0.json" with { type: "json" };
|
|
166
166
|
import needsAssessmentChangeTypeSot from "./needsAssessmentChangeType.v1.0.0.json" with { type: "json" };
|
|
167
|
-
import coreInformationScopeSot from "./coreInformationScope.v1.
|
|
167
|
+
import coreInformationScopeSot from "./coreInformationScope.v1.1.0.json" with { type: "json" };
|
|
168
168
|
import roiScopeSot from "./roiScope.v1.0.0.json" with { type: "json" };
|
|
169
169
|
import roiStatusSot from "./roiStatus.v1.0.0.json" with { type: "json" };
|
|
170
170
|
import coreReferralOutcomeSot from "./coreReferralOutcome.v1.0.0.json" with { type: "json" };
|
|
@@ -4100,9 +4100,9 @@ export const NeedsAssessmentChangeTypeKeys = {
|
|
|
4100
4100
|
export type NeedsAssessmentChangeTypeKey = keyof typeof NeedsAssessmentChangeTypeKeys;
|
|
4101
4101
|
|
|
4102
4102
|
/**
|
|
4103
|
-
* Key → positional code map for the `core_information_scope` CVC domain (DRAFT-TEMPORARY; canonical CVC-236, 12 policy-grain CATEGORIES +
|
|
4103
|
+
* Key → positional code map for the `core_information_scope` CVC domain (DRAFT-TEMPORARY; canonical CVC-236, 12 policy-grain CATEGORIES + 55 authorization-grain UNITS + 2 RETIRED tombstones. Categories are level 1 and NOT selectable; units are level 2 and are what an ROI or a share authorizes. Tombstones (`screen_notes`, `background`; retired 2026-10-05) keep their codes so a stored value resolves, but are `selectable: false` + `retired: true` and include nothing — offer only selectable children. Distinct from the sibling `roi_scope` domain, which is the FLAT item vocabulary and deliberately omits the category axis — every one of roi_scope's 27 substantive keys resolves here with no renames (25 live units, 2 tombstones), so a stored ROI never widens).
|
|
4104
4104
|
*
|
|
4105
|
-
* Domain: `core_information_scope` · Version: 1.
|
|
4105
|
+
* Domain: `core_information_scope` · Version: 1.1.0 · Entries: 73
|
|
4106
4106
|
*/
|
|
4107
4107
|
export const CoreInformationScopeKeys = {
|
|
4108
4108
|
missingness_root: "236-000-000-000-000-000-000",
|
|
@@ -4146,6 +4146,7 @@ export const CoreInformationScopeKeys = {
|
|
|
4146
4146
|
screen_notes: "236-005-001-000-000-000-000",
|
|
4147
4147
|
case_notes: "236-005-002-000-000-000-000",
|
|
4148
4148
|
background: "236-005-003-000-000-000-000",
|
|
4149
|
+
session_summary: "236-005-004-000-000-000-000",
|
|
4149
4150
|
health_accommodation: "236-006-000-000-000-000-000",
|
|
4150
4151
|
accommodation_needs: "236-006-001-000-000-000-000",
|
|
4151
4152
|
disability_subtypes: "236-006-002-000-000-000-000",
|