yarramate 1.7.0 → 1.8.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/adapters/visual/session-server.js +3 -0
- package/dist/adapters/visual/workspace-model.d.ts +4 -0
- package/dist/adapters/visual/workspace-model.js +1 -1
- package/dist/artifact-coverage.d.ts +13 -0
- package/dist/artifact-coverage.js +58 -0
- package/dist/ask-command.js +3 -3
- package/dist/cli.js +6 -1
- package/dist/compiler.d.ts +23 -0
- package/dist/compiler.js +23 -1
- package/dist/design-command.js +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1 -0
- package/dist/interrogate-command.d.ts +36 -1
- package/dist/interrogate-command.js +26 -6
- package/dist/interrogation-entry.d.ts +1 -1
- package/dist/reconciliation.d.ts +21 -1
- package/dist/reconciliation.js +93 -2
- package/dist/visual-app-lib/editor.js +33 -396
- package/dist/visual-app-lib/types/adapters/visual/workspace-model.d.ts +4 -0
- package/dist/visual-app-lib/types/compiler.d.ts +23 -0
- package/dist/visual-app-lib/types/interrogate-command.d.ts +36 -1
- package/dist/visual-app-lib/types/workspace.d.ts +8 -0
- package/dist/workspace.d.ts +8 -0
- package/dist/workspace.js +35 -13
- package/package.json +1 -1
- package/schema/yarramate-question-catalogue.schema.json +30 -0
- package/schema/yarramate-reconciliation-report.schema.json +21 -1
- package/schema/yarramate-workspace.schema.json +4 -0
|
@@ -90184,6 +90184,12 @@ function uC(e) {
|
|
|
90184
90184
|
}
|
|
90185
90185
|
return y.length > 0 ? iC(y) : {
|
|
90186
90186
|
ok: !0,
|
|
90187
|
+
patternMemberships: h.flatMap(({ instance: e, pattern: t, bindings: n }) => [...n].map(([n, r]) => ({
|
|
90188
|
+
member: r,
|
|
90189
|
+
slot: n,
|
|
90190
|
+
instance: e,
|
|
90191
|
+
pattern: t.kindIdentity
|
|
90192
|
+
}))).sort((e, t) => e.member.localeCompare(t.member) || e.pattern.localeCompare(t.pattern) || e.instance.localeCompare(t.instance) || e.slot.localeCompare(t.slot)),
|
|
90187
90193
|
profileContext: {
|
|
90188
90194
|
conceptKindLineages: qS([...a].sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, Object.freeze([...t.lineage])])),
|
|
90189
90195
|
relationshipKindLineages: qS([...o].sort(([e], [t]) => e.localeCompare(t)).map(([e, t]) => [e, Object.freeze([...t.lineage])])),
|
|
@@ -90222,7 +90228,8 @@ function dC(e) {
|
|
|
90222
90228
|
let t = uC(cC(e).parsed);
|
|
90223
90229
|
return t.ok ? {
|
|
90224
90230
|
ok: !0,
|
|
90225
|
-
graph: t.graph
|
|
90231
|
+
graph: t.graph,
|
|
90232
|
+
patternMemberships: t.patternMemberships
|
|
90226
90233
|
} : t;
|
|
90227
90234
|
}
|
|
90228
90235
|
var fC = (e) => uC(cC(e).parsed), yse = {
|
|
@@ -92228,383 +92235,7 @@ var ece = {
|
|
|
92228
92235
|
items: { $ref: "#/$defs/question" }
|
|
92229
92236
|
}
|
|
92230
92237
|
},
|
|
92231
|
-
$defs: {
|
|
92232
|
-
id: {
|
|
92233
|
-
type: "string",
|
|
92234
|
-
pattern: "^[a-z][a-z0-9-]*$"
|
|
92235
|
-
},
|
|
92236
|
-
nonEmptyText: {
|
|
92237
|
-
type: "string",
|
|
92238
|
-
minLength: 1
|
|
92239
|
-
},
|
|
92240
|
-
profileIdentity: {
|
|
92241
|
-
type: "string",
|
|
92242
|
-
pattern: "^[a-z][a-z0-9/-]*@[0-9][0-9A-Za-z.-]*$"
|
|
92243
|
-
},
|
|
92244
|
-
catalogueIdentity: {
|
|
92245
|
-
type: "string",
|
|
92246
|
-
pattern: "^[a-z][a-z0-9/-]*@[0-9][0-9A-Za-z.-]*$"
|
|
92247
|
-
},
|
|
92248
|
-
qualifiedKind: {
|
|
92249
|
-
type: "string",
|
|
92250
|
-
pattern: "^[a-z][a-z0-9/-]*@[0-9][0-9A-Za-z.-]*#[A-Za-z][A-Za-z0-9-]*$"
|
|
92251
|
-
},
|
|
92252
|
-
claimPredicate: {
|
|
92253
|
-
type: "string",
|
|
92254
|
-
pattern: "^[a-z][a-z0-9/@.#-]*$"
|
|
92255
|
-
},
|
|
92256
|
-
subjectSelector: {
|
|
92257
|
-
description: "Which subjects a subject-scope question applies to. Field vocabulary mirrors the projection query selector (ADR 0017).",
|
|
92258
|
-
type: "object",
|
|
92259
|
-
additionalProperties: !1,
|
|
92260
|
-
properties: {
|
|
92261
|
-
kinds: {
|
|
92262
|
-
type: "array",
|
|
92263
|
-
minItems: 1,
|
|
92264
|
-
uniqueItems: !0,
|
|
92265
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92266
|
-
},
|
|
92267
|
-
kindMatching: {
|
|
92268
|
-
enum: ["exact", "descendants"],
|
|
92269
|
-
default: "descendants"
|
|
92270
|
-
},
|
|
92271
|
-
statuses: {
|
|
92272
|
-
type: "array",
|
|
92273
|
-
minItems: 1,
|
|
92274
|
-
uniqueItems: !0,
|
|
92275
|
-
items: { enum: [
|
|
92276
|
-
"planned",
|
|
92277
|
-
"current",
|
|
92278
|
-
"retired"
|
|
92279
|
-
] }
|
|
92280
|
-
},
|
|
92281
|
-
documents: {
|
|
92282
|
-
type: "array",
|
|
92283
|
-
minItems: 1,
|
|
92284
|
-
uniqueItems: !0,
|
|
92285
|
-
items: { $ref: "#/$defs/id" }
|
|
92286
|
-
}
|
|
92287
|
-
}
|
|
92288
|
-
},
|
|
92289
|
-
condition: {
|
|
92290
|
-
description: "One deterministic trigger condition. All conditions in a trigger must hold (AND) for the question to be open.",
|
|
92291
|
-
oneOf: [
|
|
92292
|
-
{
|
|
92293
|
-
type: "object",
|
|
92294
|
-
additionalProperties: !1,
|
|
92295
|
-
required: ["condition", "predicate"],
|
|
92296
|
-
properties: {
|
|
92297
|
-
condition: { const: "missing-claim" },
|
|
92298
|
-
predicate: { $ref: "#/$defs/claimPredicate" }
|
|
92299
|
-
}
|
|
92300
|
-
},
|
|
92301
|
-
{
|
|
92302
|
-
type: "object",
|
|
92303
|
-
additionalProperties: !1,
|
|
92304
|
-
required: [
|
|
92305
|
-
"condition",
|
|
92306
|
-
"kinds",
|
|
92307
|
-
"direction"
|
|
92308
|
-
],
|
|
92309
|
-
properties: {
|
|
92310
|
-
condition: { const: "missing-relationship" },
|
|
92311
|
-
kinds: {
|
|
92312
|
-
type: "array",
|
|
92313
|
-
minItems: 1,
|
|
92314
|
-
uniqueItems: !0,
|
|
92315
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92316
|
-
},
|
|
92317
|
-
direction: { enum: [
|
|
92318
|
-
"incoming",
|
|
92319
|
-
"outgoing",
|
|
92320
|
-
"any"
|
|
92321
|
-
] },
|
|
92322
|
-
kindMatching: { enum: ["exact", "descendants"] }
|
|
92323
|
-
}
|
|
92324
|
-
},
|
|
92325
|
-
{
|
|
92326
|
-
type: "object",
|
|
92327
|
-
additionalProperties: !1,
|
|
92328
|
-
required: ["condition"],
|
|
92329
|
-
properties: { condition: { const: "isolated" } }
|
|
92330
|
-
},
|
|
92331
|
-
{
|
|
92332
|
-
type: "object",
|
|
92333
|
-
additionalProperties: !1,
|
|
92334
|
-
required: ["condition", "kinds"],
|
|
92335
|
-
properties: {
|
|
92336
|
-
condition: { const: "no-subject-of-kind" },
|
|
92337
|
-
kinds: {
|
|
92338
|
-
type: "array",
|
|
92339
|
-
minItems: 1,
|
|
92340
|
-
uniqueItems: !0,
|
|
92341
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92342
|
-
},
|
|
92343
|
-
kindMatching: {
|
|
92344
|
-
enum: ["exact", "descendants"],
|
|
92345
|
-
default: "descendants"
|
|
92346
|
-
}
|
|
92347
|
-
}
|
|
92348
|
-
},
|
|
92349
|
-
{
|
|
92350
|
-
type: "object",
|
|
92351
|
-
additionalProperties: !1,
|
|
92352
|
-
required: ["condition"],
|
|
92353
|
-
properties: { condition: { const: "no-state-defined" } }
|
|
92354
|
-
},
|
|
92355
|
-
{
|
|
92356
|
-
type: "object",
|
|
92357
|
-
additionalProperties: !1,
|
|
92358
|
-
required: [
|
|
92359
|
-
"condition",
|
|
92360
|
-
"kinds",
|
|
92361
|
-
"direction",
|
|
92362
|
-
"counterpartKinds"
|
|
92363
|
-
],
|
|
92364
|
-
properties: {
|
|
92365
|
-
condition: { const: "missing-linkage" },
|
|
92366
|
-
kinds: {
|
|
92367
|
-
type: "array",
|
|
92368
|
-
minItems: 1,
|
|
92369
|
-
uniqueItems: !0,
|
|
92370
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92371
|
-
},
|
|
92372
|
-
direction: { enum: ["outgoing", "incoming"] },
|
|
92373
|
-
counterpartKinds: {
|
|
92374
|
-
type: "array",
|
|
92375
|
-
minItems: 1,
|
|
92376
|
-
uniqueItems: !0,
|
|
92377
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92378
|
-
},
|
|
92379
|
-
kindMatching: {
|
|
92380
|
-
enum: ["exact", "descendants"],
|
|
92381
|
-
default: "descendants"
|
|
92382
|
-
}
|
|
92383
|
-
}
|
|
92384
|
-
},
|
|
92385
|
-
{
|
|
92386
|
-
type: "object",
|
|
92387
|
-
additionalProperties: !1,
|
|
92388
|
-
required: [
|
|
92389
|
-
"condition",
|
|
92390
|
-
"kinds",
|
|
92391
|
-
"direction",
|
|
92392
|
-
"counterpartKinds"
|
|
92393
|
-
],
|
|
92394
|
-
properties: {
|
|
92395
|
-
condition: { const: "has-linkage" },
|
|
92396
|
-
kinds: {
|
|
92397
|
-
type: "array",
|
|
92398
|
-
minItems: 1,
|
|
92399
|
-
uniqueItems: !0,
|
|
92400
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92401
|
-
},
|
|
92402
|
-
direction: { enum: [
|
|
92403
|
-
"outgoing",
|
|
92404
|
-
"incoming",
|
|
92405
|
-
"either"
|
|
92406
|
-
] },
|
|
92407
|
-
counterpartKinds: {
|
|
92408
|
-
type: "array",
|
|
92409
|
-
minItems: 1,
|
|
92410
|
-
uniqueItems: !0,
|
|
92411
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92412
|
-
},
|
|
92413
|
-
kindMatching: {
|
|
92414
|
-
enum: ["exact", "descendants"],
|
|
92415
|
-
default: "descendants"
|
|
92416
|
-
}
|
|
92417
|
-
}
|
|
92418
|
-
},
|
|
92419
|
-
{
|
|
92420
|
-
type: "object",
|
|
92421
|
-
additionalProperties: !1,
|
|
92422
|
-
required: [
|
|
92423
|
-
"condition",
|
|
92424
|
-
"kinds",
|
|
92425
|
-
"direction",
|
|
92426
|
-
"counterpartKinds"
|
|
92427
|
-
],
|
|
92428
|
-
properties: {
|
|
92429
|
-
condition: { const: "exists-linkage" },
|
|
92430
|
-
kinds: {
|
|
92431
|
-
type: "array",
|
|
92432
|
-
minItems: 1,
|
|
92433
|
-
uniqueItems: !0,
|
|
92434
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92435
|
-
},
|
|
92436
|
-
direction: { enum: [
|
|
92437
|
-
"outgoing",
|
|
92438
|
-
"incoming",
|
|
92439
|
-
"either"
|
|
92440
|
-
] },
|
|
92441
|
-
counterpartKinds: {
|
|
92442
|
-
type: "array",
|
|
92443
|
-
minItems: 1,
|
|
92444
|
-
uniqueItems: !0,
|
|
92445
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92446
|
-
},
|
|
92447
|
-
kindMatching: {
|
|
92448
|
-
enum: ["exact", "descendants"],
|
|
92449
|
-
default: "descendants"
|
|
92450
|
-
}
|
|
92451
|
-
}
|
|
92452
|
-
},
|
|
92453
|
-
{
|
|
92454
|
-
type: "object",
|
|
92455
|
-
additionalProperties: !1,
|
|
92456
|
-
required: ["condition", "kinds"],
|
|
92457
|
-
properties: {
|
|
92458
|
-
condition: { const: "missing-constraint" },
|
|
92459
|
-
kinds: {
|
|
92460
|
-
type: "array",
|
|
92461
|
-
minItems: 1,
|
|
92462
|
-
uniqueItems: !0,
|
|
92463
|
-
items: { $ref: "#/$defs/qualifiedKind" }
|
|
92464
|
-
},
|
|
92465
|
-
kindMatching: {
|
|
92466
|
-
enum: ["exact", "descendants"],
|
|
92467
|
-
default: "descendants"
|
|
92468
|
-
}
|
|
92469
|
-
}
|
|
92470
|
-
},
|
|
92471
|
-
{
|
|
92472
|
-
type: "object",
|
|
92473
|
-
additionalProperties: !1,
|
|
92474
|
-
description: "The subject is an endpoint of at least one flow relationship that has no yarramate/flow/content claim.",
|
|
92475
|
-
required: ["condition"],
|
|
92476
|
-
properties: { condition: { const: "missing-flow-content" } }
|
|
92477
|
-
},
|
|
92478
|
-
{
|
|
92479
|
-
type: "object",
|
|
92480
|
-
additionalProperties: !1,
|
|
92481
|
-
required: [
|
|
92482
|
-
"condition",
|
|
92483
|
-
"predicate",
|
|
92484
|
-
"direction"
|
|
92485
|
-
],
|
|
92486
|
-
properties: {
|
|
92487
|
-
condition: { const: "missing-reference" },
|
|
92488
|
-
predicate: { $ref: "#/$defs/claimPredicate" },
|
|
92489
|
-
direction: { enum: ["outgoing", "incoming"] }
|
|
92490
|
-
}
|
|
92491
|
-
},
|
|
92492
|
-
{
|
|
92493
|
-
type: "object",
|
|
92494
|
-
additionalProperties: !1,
|
|
92495
|
-
required: ["condition", "topic"],
|
|
92496
|
-
properties: {
|
|
92497
|
-
condition: { const: "missing-attestation" },
|
|
92498
|
-
topic: {
|
|
92499
|
-
type: "string",
|
|
92500
|
-
pattern: "^[a-z][a-z0-9-]*$"
|
|
92501
|
-
}
|
|
92502
|
-
}
|
|
92503
|
-
},
|
|
92504
|
-
{
|
|
92505
|
-
type: "object",
|
|
92506
|
-
additionalProperties: !1,
|
|
92507
|
-
description: "The subject resembles another subject of the same kind closely enough to be the same thing under two names, and no yarramate/identity/distinct-from claim dismisses the pair. Deterministic and lexical; the algorithm and thresholds are stated in ADR 0077. Questions using it may interpolate {counterparts}.",
|
|
92508
|
-
required: ["condition"],
|
|
92509
|
-
properties: { condition: { const: "near-duplicate" } }
|
|
92510
|
-
},
|
|
92511
|
-
{
|
|
92512
|
-
type: "object",
|
|
92513
|
-
additionalProperties: !1,
|
|
92514
|
-
description: "The subject's kind is never tested by anything the compiler can check: it participates in no relationship whose kind pins the aspect at the subject's end, so reclassifying it to any other kind of any other aspect would still compile. The kind is a label rather than a constraint (ADR 0083).",
|
|
92515
|
-
required: ["condition"],
|
|
92516
|
-
properties: { condition: { const: "unconstrained-kind" } }
|
|
92517
|
-
},
|
|
92518
|
-
{
|
|
92519
|
-
type: "object",
|
|
92520
|
-
additionalProperties: !1,
|
|
92521
|
-
description: "The subject supersedes a predecessor that is still current, and does not say in what respect. A succession that replaced its predecessor outright says so by the predecessor being gone; one where both remain is usually partial, and the respect is the part a reader needs (ADR 0109).",
|
|
92522
|
-
required: ["condition"],
|
|
92523
|
-
properties: { condition: { const: "unscoped-succession" } }
|
|
92524
|
-
},
|
|
92525
|
-
{
|
|
92526
|
-
type: "object",
|
|
92527
|
-
additionalProperties: !1,
|
|
92528
|
-
description: "The workspace holds at least one concept (#334, ADR 0125). The guard a late wave needs to say \"only once the model has substance\": an empty model is not an architecture at rest, it has not started, and asking it how the planned architecture becomes real greets someone ahead of question one.",
|
|
92529
|
-
required: ["condition"],
|
|
92530
|
-
properties: { condition: { const: "has-any-subject" } }
|
|
92531
|
-
},
|
|
92532
|
-
{
|
|
92533
|
-
type: "object",
|
|
92534
|
-
additionalProperties: !1,
|
|
92535
|
-
description: "The workspace's evidence overlay records observations and every one is a frictionless confirmation: no contradicted, unknown, or not-observed result, and no recorded search (ADR 0107). A discovery that never records anything but success never tested a claim it might fail. The one condition that reads the evidence overlay rather than the compiled graph; where the evaluating consumer supplies no overlay it stays quiet (ADR 0120).",
|
|
92536
|
-
required: ["condition"],
|
|
92537
|
-
properties: { condition: { const: "unchallenged-evidence" } }
|
|
92538
|
-
}
|
|
92539
|
-
]
|
|
92540
|
-
},
|
|
92541
|
-
question: {
|
|
92542
|
-
type: "object",
|
|
92543
|
-
additionalProperties: !1,
|
|
92544
|
-
required: [
|
|
92545
|
-
"id",
|
|
92546
|
-
"wave",
|
|
92547
|
-
"scope",
|
|
92548
|
-
"trigger",
|
|
92549
|
-
"question",
|
|
92550
|
-
"materiality",
|
|
92551
|
-
"authority"
|
|
92552
|
-
],
|
|
92553
|
-
properties: {
|
|
92554
|
-
id: { $ref: "#/$defs/id" },
|
|
92555
|
-
wave: {
|
|
92556
|
-
description: "Wave id declared in this catalogue (or an extended one).",
|
|
92557
|
-
$ref: "#/$defs/id"
|
|
92558
|
-
},
|
|
92559
|
-
scope: {
|
|
92560
|
-
description: "subject: evaluated once per matching subject. workspace: evaluated once per workspace.",
|
|
92561
|
-
enum: ["subject", "workspace"]
|
|
92562
|
-
},
|
|
92563
|
-
subjects: { $ref: "#/$defs/subjectSelector" },
|
|
92564
|
-
trigger: {
|
|
92565
|
-
type: "array",
|
|
92566
|
-
minItems: 1,
|
|
92567
|
-
items: { $ref: "#/$defs/condition" }
|
|
92568
|
-
},
|
|
92569
|
-
question: {
|
|
92570
|
-
description: "Human-facing phrasing. Subject-scope questions may interpolate {subject.id} and {subject.name}.",
|
|
92571
|
-
$ref: "#/$defs/nonEmptyText"
|
|
92572
|
-
},
|
|
92573
|
-
askPlain: {
|
|
92574
|
-
description: "Optional plain-language phrasing of the same question, written to be read aloud in a stakeholder workshop. Interpolates {subject.id} and {subject.name} exactly like question. design --facilitate prefers it; when absent, renderers fall back to question and never block.",
|
|
92575
|
-
$ref: "#/$defs/nonEmptyText"
|
|
92576
|
-
},
|
|
92577
|
-
materiality: {
|
|
92578
|
-
description: "Which architectural decision the answer changes. A question that cannot state this does not belong in the catalogue.",
|
|
92579
|
-
$ref: "#/$defs/nonEmptyText"
|
|
92580
|
-
},
|
|
92581
|
-
authority: {
|
|
92582
|
-
description: "Who may answer. A label carried into reports, never a gate (ADR 0082). agent: an agent may propose the answer from repository evidence (still lands as a reviewable diff). human: a genuine design decision that must be escalated. either: an agent may propose, a human confirms.",
|
|
92583
|
-
enum: [
|
|
92584
|
-
"agent",
|
|
92585
|
-
"human",
|
|
92586
|
-
"either"
|
|
92587
|
-
]
|
|
92588
|
-
},
|
|
92589
|
-
resolution: {
|
|
92590
|
-
description: "Guidance for how an accepted answer should land as native authoring (which claim, relationship, or state to add).",
|
|
92591
|
-
$ref: "#/$defs/nonEmptyText"
|
|
92592
|
-
},
|
|
92593
|
-
since: {
|
|
92594
|
-
description: "The catalogue version this question first appeared in. Lets consumers distinguish 'the catalogue deepened' from 'the model regressed' when a completed interview reopens (ADR 0063).",
|
|
92595
|
-
type: "string",
|
|
92596
|
-
pattern: "^[0-9]+\\.[0-9]+$"
|
|
92597
|
-
}
|
|
92598
|
-
},
|
|
92599
|
-
allOf: [{
|
|
92600
|
-
if: { properties: { scope: { const: "subject" } } },
|
|
92601
|
-
then: { required: ["subjects"] }
|
|
92602
|
-
}, {
|
|
92603
|
-
if: { properties: { scope: { const: "workspace" } } },
|
|
92604
|
-
then: { not: { required: ["subjects"] } }
|
|
92605
|
-
}]
|
|
92606
|
-
}
|
|
92607
|
-
}
|
|
92238
|
+
$defs: /* @__PURE__ */ JSON.parse("{\"id\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9-]*$\"},\"nonEmptyText\":{\"type\":\"string\",\"minLength\":1},\"profileIdentity\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9/-]*@[0-9][0-9A-Za-z.-]*$\"},\"catalogueIdentity\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9/-]*@[0-9][0-9A-Za-z.-]*$\"},\"qualifiedKind\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9/-]*@[0-9][0-9A-Za-z.-]*#[A-Za-z][A-Za-z0-9-]*$\"},\"claimPredicate\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9/@.#-]*$\"},\"subjectSelector\":{\"description\":\"Which subjects a subject-scope question applies to. Field vocabulary mirrors the projection query selector (ADR 0017).\",\"type\":\"object\",\"additionalProperties\":false,\"properties\":{\"kinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"kindMatching\":{\"enum\":[\"exact\",\"descendants\"],\"default\":\"descendants\"},\"statuses\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"enum\":[\"planned\",\"current\",\"retired\"]}},\"documents\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/id\"}}}},\"condition\":{\"description\":\"One deterministic trigger condition. All conditions in a trigger must hold (AND) for the question to be open.\",\"oneOf\":[{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"predicate\"],\"properties\":{\"condition\":{\"const\":\"missing-claim\"},\"predicate\":{\"$ref\":\"#/$defs/claimPredicate\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"kinds\",\"direction\"],\"properties\":{\"condition\":{\"const\":\"missing-relationship\"},\"kinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"direction\":{\"enum\":[\"incoming\",\"outgoing\",\"any\"]},\"kindMatching\":{\"enum\":[\"exact\",\"descendants\"]}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"isolated\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"kinds\"],\"properties\":{\"condition\":{\"const\":\"no-subject-of-kind\"},\"kinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"kindMatching\":{\"enum\":[\"exact\",\"descendants\"],\"default\":\"descendants\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"no-state-defined\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"kinds\",\"direction\",\"counterpartKinds\"],\"properties\":{\"condition\":{\"const\":\"missing-linkage\"},\"kinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"direction\":{\"enum\":[\"outgoing\",\"incoming\"]},\"counterpartKinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"kindMatching\":{\"enum\":[\"exact\",\"descendants\"],\"default\":\"descendants\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"kinds\",\"direction\",\"counterpartKinds\"],\"properties\":{\"condition\":{\"const\":\"has-linkage\"},\"kinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"direction\":{\"enum\":[\"outgoing\",\"incoming\",\"either\"]},\"counterpartKinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"kindMatching\":{\"enum\":[\"exact\",\"descendants\"],\"default\":\"descendants\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"kinds\",\"direction\",\"counterpartKinds\"],\"properties\":{\"condition\":{\"const\":\"exists-linkage\"},\"kinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"direction\":{\"enum\":[\"outgoing\",\"incoming\",\"either\"]},\"counterpartKinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"kindMatching\":{\"enum\":[\"exact\",\"descendants\"],\"default\":\"descendants\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"kinds\"],\"properties\":{\"condition\":{\"const\":\"missing-constraint\"},\"kinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"kindMatching\":{\"enum\":[\"exact\",\"descendants\"],\"default\":\"descendants\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"description\":\"The subject is an endpoint of at least one flow relationship that has no yarramate/flow/content claim.\",\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"missing-flow-content\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"predicate\",\"direction\"],\"properties\":{\"condition\":{\"const\":\"missing-reference\"},\"predicate\":{\"$ref\":\"#/$defs/claimPredicate\"},\"direction\":{\"enum\":[\"outgoing\",\"incoming\"]}}},{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"condition\",\"topic\"],\"properties\":{\"condition\":{\"const\":\"missing-attestation\"},\"topic\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9-]*$\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"description\":\"The subject resembles another subject of the same kind closely enough to be the same thing under two names, and no yarramate/identity/distinct-from claim dismisses the pair. Deterministic and lexical; the algorithm and thresholds are stated in ADR 0077. Questions using it may interpolate {counterparts}.\",\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"near-duplicate\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"description\":\"The subject's kind is never tested by anything the compiler can check: it participates in no relationship whose kind pins the aspect at the subject's end, so reclassifying it to any other kind of any other aspect would still compile. The kind is a label rather than a constraint (ADR 0083).\",\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"unconstrained-kind\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"description\":\"The subject supersedes a predecessor that is still current, and does not say in what respect. A succession that replaced its predecessor outright says so by the predecessor being gone; one where both remain is usually partial, and the respect is the part a reader needs (ADR 0109).\",\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"unscoped-succession\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"description\":\"The workspace holds at least one concept (#334, ADR 0125). The guard a late wave needs to say \\\"only once the model has substance\\\": an empty model is not an architecture at rest, it has not started, and asking it how the planned architecture becomes real greets someone ahead of question one.\",\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"has-any-subject\"}}},{\"type\":\"object\",\"additionalProperties\":false,\"description\":\"The subject fills a slot of a pattern instance (ADR 0131). A guard, per the #334 split: it says a question applies here, and an ordinary condition beside it says what would answer it. Bare, it means bound into any slot of any instance; patternKinds narrows by the pattern's kind identity (never a document path, ADR 0129) and slots by part name. Evaluation reads pattern memberships from the compilation; a caller that does not supply them gets a condition that never holds.\",\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"fills-pattern-slot\"},\"patternKinds\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"$ref\":\"#/$defs/qualifiedKind\"}},\"slots\":{\"type\":\"array\",\"minItems\":1,\"uniqueItems\":true,\"items\":{\"type\":\"string\",\"pattern\":\"^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$\"}}}},{\"type\":\"object\",\"additionalProperties\":false,\"description\":\"The workspace's evidence overlay records observations and every one is a frictionless confirmation: no contradicted, unknown, or not-observed result, and no recorded search (ADR 0107). A discovery that never records anything but success never tested a claim it might fail. The one condition that reads the evidence overlay rather than the compiled graph; where the evaluating consumer supplies no overlay it stays quiet (ADR 0120).\",\"required\":[\"condition\"],\"properties\":{\"condition\":{\"const\":\"unchallenged-evidence\"}}}]},\"question\":{\"type\":\"object\",\"additionalProperties\":false,\"required\":[\"id\",\"wave\",\"scope\",\"trigger\",\"question\",\"materiality\",\"authority\"],\"properties\":{\"id\":{\"$ref\":\"#/$defs/id\"},\"wave\":{\"description\":\"Wave id declared in this catalogue (or an extended one).\",\"$ref\":\"#/$defs/id\"},\"scope\":{\"description\":\"subject: evaluated once per matching subject. workspace: evaluated once per workspace.\",\"enum\":[\"subject\",\"workspace\"]},\"subjects\":{\"$ref\":\"#/$defs/subjectSelector\"},\"trigger\":{\"type\":\"array\",\"minItems\":1,\"items\":{\"$ref\":\"#/$defs/condition\"}},\"question\":{\"description\":\"Human-facing phrasing. Subject-scope questions may interpolate {subject.id} and {subject.name}.\",\"$ref\":\"#/$defs/nonEmptyText\"},\"askPlain\":{\"description\":\"Optional plain-language phrasing of the same question, written to be read aloud in a stakeholder workshop. Interpolates {subject.id} and {subject.name} exactly like question. design --facilitate prefers it; when absent, renderers fall back to question and never block.\",\"$ref\":\"#/$defs/nonEmptyText\"},\"materiality\":{\"description\":\"Which architectural decision the answer changes. A question that cannot state this does not belong in the catalogue.\",\"$ref\":\"#/$defs/nonEmptyText\"},\"authority\":{\"description\":\"Who may answer. A label carried into reports, never a gate (ADR 0082). agent: an agent may propose the answer from repository evidence (still lands as a reviewable diff). human: a genuine design decision that must be escalated. either: an agent may propose, a human confirms.\",\"enum\":[\"agent\",\"human\",\"either\"]},\"resolution\":{\"description\":\"Guidance for how an accepted answer should land as native authoring (which claim, relationship, or state to add).\",\"$ref\":\"#/$defs/nonEmptyText\"},\"since\":{\"description\":\"The catalogue version this question first appeared in. Lets consumers distinguish 'the catalogue deepened' from 'the model regressed' when a completed interview reopens (ADR 0063).\",\"type\":\"string\",\"pattern\":\"^[0-9]+\\\\.[0-9]+$\"}},\"allOf\":[{\"if\":{\"properties\":{\"scope\":{\"const\":\"subject\"}}},\"then\":{\"required\":[\"subjects\"]}},{\"if\":{\"properties\":{\"scope\":{\"const\":\"workspace\"}}},\"then\":{\"not\":{\"required\":[\"subjects\"]}}}]}}")
|
|
92608
92239
|
}, Dw = AS.default, tce = new (Dw.default ?? Dw)({ allErrors: !0 }).compile(ece), nce = (e) => {
|
|
92609
92240
|
let t = new Set(e.subjects.filter(({ type: e }) => e === "relationship").map(({ id: e }) => e)), n = new Set(e.claims.filter(({ predicate: e }) => e === "yarramate/state/type").map(({ subject: e }) => e)), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = [], c = [], l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = /* @__PURE__ */ new Map();
|
|
92610
92241
|
for (let n of e.claims) {
|
|
@@ -92700,8 +92331,9 @@ var ece = {
|
|
|
92700
92331
|
let o = [];
|
|
92701
92332
|
return (t.direction === "outgoing" || t.direction === "either") && a.subject === n && o.push(a.object.ref), (t.direction === "incoming" || t.direction === "either") && a.object.ref === n && o.push(a.subject), o.some((n) => Ow(e.kindOf.get(n), t.counterpartKinds, i, r));
|
|
92702
92333
|
});
|
|
92703
|
-
}, Pw = (e, t, n, r, i) => {
|
|
92334
|
+
}, Pw = (e, t, n, r, i, a) => {
|
|
92704
92335
|
switch (t.condition) {
|
|
92336
|
+
case "fills-pattern-slot": return a !== void 0 && n !== void 0 && a.some((e) => e.member === n && (t.patternKinds === void 0 || t.patternKinds.includes(e.pattern)) && (t.slots === void 0 || t.slots.includes(e.slot)));
|
|
92705
92337
|
case "has-any-subject": return e.concepts.size > 0;
|
|
92706
92338
|
case "unchallenged-evidence": return i !== void 0 && i.length > 0 && i.every(({ result: e, searched: t }) => e === "confirmed" && (t === void 0 || t.length === 0));
|
|
92707
92339
|
case "missing-claim": return !(e.claimsBySubject.get(n) ?? []).some(({ predicate: e }) => e === t.predicate);
|
|
@@ -92765,12 +92397,12 @@ var ece = {
|
|
|
92765
92397
|
return n === void 0 ? t : `${n} (${t})`;
|
|
92766
92398
|
});
|
|
92767
92399
|
};
|
|
92768
|
-
function ice(e, t, n, r, i) {
|
|
92769
|
-
let
|
|
92400
|
+
function ice(e, t, n, r, i, a) {
|
|
92401
|
+
let o = nce(t), s = 0, c = 0, l = e.questions.filter((e) => Mw(e, t.profiles)), u = (e) => e.opensWhen === void 0 || e.opensWhen.every((e) => Pw(o, e, void 0, n, r, a)), d = e.waves.map((e) => ({
|
|
92770
92402
|
id: e.id,
|
|
92771
92403
|
name: e.name,
|
|
92772
|
-
opened:
|
|
92773
|
-
questions:
|
|
92404
|
+
opened: u(e),
|
|
92405
|
+
questions: u(e) ? l.filter((t) => t.wave === e.id).map((e) => {
|
|
92774
92406
|
let t = {
|
|
92775
92407
|
id: e.id,
|
|
92776
92408
|
scope: e.scope,
|
|
@@ -92782,25 +92414,25 @@ function ice(e, t, n, r, i) {
|
|
|
92782
92414
|
...e.since === void 0 ? {} : { since: e.since }
|
|
92783
92415
|
};
|
|
92784
92416
|
if (e.scope === "workspace") {
|
|
92785
|
-
let i = e.trigger.every((e) => Pw(
|
|
92786
|
-
return i && (
|
|
92417
|
+
let i = e.trigger.every((e) => Pw(o, e, void 0, n, r, a));
|
|
92418
|
+
return i && (s += 1, c += 1), {
|
|
92787
92419
|
...t,
|
|
92788
92420
|
open: i
|
|
92789
92421
|
};
|
|
92790
92422
|
}
|
|
92791
|
-
let i = kw(
|
|
92423
|
+
let i = kw(o, e.subjects, n).filter((t) => e.trigger.every((e) => Pw(o, e, t, n, r, a)));
|
|
92792
92424
|
return i.length === 0 ? {
|
|
92793
92425
|
...t,
|
|
92794
92426
|
open: !1
|
|
92795
|
-
} : (
|
|
92427
|
+
} : (s += i.length, c += 1, {
|
|
92796
92428
|
...t,
|
|
92797
92429
|
open: !0,
|
|
92798
92430
|
subjects: i.map((t) => {
|
|
92799
|
-
let n =
|
|
92431
|
+
let n = o.nameOf.get(t);
|
|
92800
92432
|
return {
|
|
92801
92433
|
id: t,
|
|
92802
92434
|
...n === void 0 ? {} : { name: n },
|
|
92803
|
-
question: Fw(e.question, t, n, Iw(
|
|
92435
|
+
question: Fw(e.question, t, n, Iw(o, e, t))
|
|
92804
92436
|
};
|
|
92805
92437
|
})
|
|
92806
92438
|
});
|
|
@@ -92812,16 +92444,20 @@ function ice(e, t, n, r, i) {
|
|
|
92812
92444
|
...i === void 0 || i.length < 2 ? {} : { catalogues: i },
|
|
92813
92445
|
semantics: "1",
|
|
92814
92446
|
summary: {
|
|
92815
|
-
questions:
|
|
92816
|
-
openQuestions:
|
|
92817
|
-
open:
|
|
92447
|
+
questions: d.reduce((e, t) => e + t.questions.length, 0),
|
|
92448
|
+
openQuestions: c,
|
|
92449
|
+
open: s
|
|
92818
92450
|
},
|
|
92819
|
-
waves:
|
|
92451
|
+
waves: d
|
|
92820
92452
|
};
|
|
92821
92453
|
}
|
|
92822
92454
|
var ace = (e) => {
|
|
92823
92455
|
let t = [], n = (e, n) => {
|
|
92824
|
-
if (!(typeof e != "object" || !e)) for (let r of [
|
|
92456
|
+
if (!(typeof e != "object" || !e)) for (let r of [
|
|
92457
|
+
"kinds",
|
|
92458
|
+
"counterpartKinds",
|
|
92459
|
+
"patternKinds"
|
|
92460
|
+
]) {
|
|
92825
92461
|
let i = e[r];
|
|
92826
92462
|
Array.isArray(i) && i.forEach((e, i) => {
|
|
92827
92463
|
typeof e == "string" && t.push({
|
|
@@ -92977,7 +92613,7 @@ var lce = (e) => [...e.keys()].map((t) => ({
|
|
|
92977
92613
|
})), uce = (e, t, n) => Ase(e, Hw(t), n).subjects.filter(({ type: e }) => e === "concept").length, Bw = (e, t, n = []) => {
|
|
92978
92614
|
let r = zw(Array.isArray(t) ? t : [t]);
|
|
92979
92615
|
if (!r.ok) return;
|
|
92980
|
-
let i = ice(r.composed.catalogue, e.graph, e.profileContext, void 0, r.composed.catalogues), a = new Set(n.filter(({ subject: e }) => e === void 0).map(({ questionId: e }) => e)), o = new Set(n.filter(({ subject: e }) => e !== void 0).map(({ questionId: e, subject: t }) => `${e}\u0000${t}`)), s = [], c = {};
|
|
92616
|
+
let i = ice(r.composed.catalogue, e.graph, e.profileContext, void 0, r.composed.catalogues, e.patternMemberships), a = new Set(n.filter(({ subject: e }) => e === void 0).map(({ questionId: e }) => e)), o = new Set(n.filter(({ subject: e }) => e !== void 0).map(({ questionId: e, subject: t }) => `${e}\u0000${t}`)), s = [], c = {};
|
|
92981
92617
|
for (let e of i.waves) for (let t of e.questions) {
|
|
92982
92618
|
if (!t.open || a.has(t.id)) continue;
|
|
92983
92619
|
let e = {
|
|
@@ -93148,7 +92784,8 @@ var lce = (e) => [...e.keys()].map((t) => ({
|
|
|
93148
92784
|
};
|
|
93149
92785
|
let s = {
|
|
93150
92786
|
graph: a.graph,
|
|
93151
|
-
profileContext: a.profileContext
|
|
92787
|
+
profileContext: a.profileContext,
|
|
92788
|
+
patternMemberships: a.patternMemberships
|
|
93152
92789
|
};
|
|
93153
92790
|
r = s, d = [];
|
|
93154
92791
|
let u = dce(s, o, {
|
|
@@ -4,6 +4,7 @@ import type { ResolvedWorkspace } from "../../workspace.js";
|
|
|
4
4
|
import type { VisualDiagnostic, VisualViewOperation } from "./protocol-contract.js";
|
|
5
5
|
import type { ProjectionDefinition, ProjectionExclusion, ProjectionQuery } from "../../projection.js";
|
|
6
6
|
import type { ResolvedProfileContext, SemanticGraph } from "../../compiler.js";
|
|
7
|
+
import { type CataloguePatternMembership } from "../../interrogate-command.js";
|
|
7
8
|
import type { VisualKindOption, VisualViewSummary } from "./protocol-contract.js";
|
|
8
9
|
import type { VisualInterrogationOverlay, VisualRenderedModel } from "./wire.js";
|
|
9
10
|
/**
|
|
@@ -57,6 +58,8 @@ export interface DismissedQuestion {
|
|
|
57
58
|
export declare const interrogationOverlayOf: (compiled: {
|
|
58
59
|
readonly graph: SemanticGraph;
|
|
59
60
|
readonly profileContext: ResolvedProfileContext;
|
|
61
|
+
/** From the compilation (ADR 0131); absent, slot questions stay quiet. */
|
|
62
|
+
readonly patternMemberships?: readonly CataloguePatternMembership[];
|
|
60
63
|
},
|
|
61
64
|
/**
|
|
62
65
|
* The catalogue, or the composed SET a workspace carries (#345, ADR 0129).
|
|
@@ -90,6 +93,7 @@ dismissed?: readonly DismissedQuestion[]) => VisualInterrogationOverlay | undefi
|
|
|
90
93
|
export declare const renderedWorkspaceOf: (compiled: {
|
|
91
94
|
readonly graph: SemanticGraph;
|
|
92
95
|
readonly profileContext: ResolvedProfileContext;
|
|
96
|
+
readonly patternMemberships?: readonly CataloguePatternMembership[];
|
|
93
97
|
}, views: readonly VisualViewSummary[], metadata: Omit<VisualRenderedModel, "graph" | "vocabulary" | "interrogation">, catalogue?: {
|
|
94
98
|
readonly path: string;
|
|
95
99
|
readonly source: string;
|
|
@@ -94,9 +94,31 @@ export interface ResolvedProfileContext {
|
|
|
94
94
|
*/
|
|
95
95
|
readonly permittedRelationshipKinds: (fromKindIdentity: string, toKindIdentity: string) => ReadonlySet<RelationshipKind> | undefined;
|
|
96
96
|
}
|
|
97
|
+
/**
|
|
98
|
+
* One slot of one pattern instance, and the subject bound into it
|
|
99
|
+
* (ADR 0131). Compile CONTEXT, not graph content: `parts` binds existing
|
|
100
|
+
* subjects (#268), the binding is consumed during expansion, and the graph
|
|
101
|
+
* stays indistinguishable from a hand-authored one — so the compile result
|
|
102
|
+
* is the only place this fact survives. `pattern` is the kind identity
|
|
103
|
+
* (`yarrasys/api-led@1.0#api`), the naming ADR 0129 chose: identity that
|
|
104
|
+
* travels, never a document path.
|
|
105
|
+
*/
|
|
106
|
+
export interface PatternMembership {
|
|
107
|
+
readonly member: string;
|
|
108
|
+
readonly slot: string;
|
|
109
|
+
readonly instance: string;
|
|
110
|
+
readonly pattern: string;
|
|
111
|
+
}
|
|
97
112
|
export type CompilationResult = {
|
|
98
113
|
readonly ok: true;
|
|
99
114
|
readonly graph: SemanticGraph;
|
|
115
|
+
/**
|
|
116
|
+
* Optional in the type although the compiler always emits it: this
|
|
117
|
+
* shape is published, and a required addition is free for readers
|
|
118
|
+
* and a break for constructors. Read it as `?? []` — and thread it
|
|
119
|
+
* to `evaluateCatalogue`, or `fills-pattern-slot` never fires.
|
|
120
|
+
*/
|
|
121
|
+
readonly patternMemberships?: readonly PatternMembership[];
|
|
100
122
|
} | {
|
|
101
123
|
readonly ok: false;
|
|
102
124
|
readonly diagnostics: readonly Diagnostic[];
|
|
@@ -105,6 +127,7 @@ export type ContextualCompilationResult = {
|
|
|
105
127
|
readonly ok: true;
|
|
106
128
|
readonly graph: SemanticGraph;
|
|
107
129
|
readonly profileContext: ResolvedProfileContext;
|
|
130
|
+
readonly patternMemberships?: readonly PatternMembership[];
|
|
108
131
|
} | {
|
|
109
132
|
readonly ok: false;
|
|
110
133
|
readonly diagnostics: readonly Diagnostic[];
|
|
@@ -89,6 +89,18 @@ export type CatalogueCondition = {
|
|
|
89
89
|
readonly condition: 'unchallenged-evidence';
|
|
90
90
|
} | {
|
|
91
91
|
readonly condition: 'has-any-subject';
|
|
92
|
+
} | {
|
|
93
|
+
/**
|
|
94
|
+
* The subject fills a slot of a pattern instance (ADR 0131). A GUARD,
|
|
95
|
+
* per the #334 split: it says a question applies here, and an
|
|
96
|
+
* ordinary condition beside it says what would answer it. Bare, it
|
|
97
|
+
* means bound into any slot of any instance; `patternKinds` narrows
|
|
98
|
+
* by the pattern's kind identity (never a document path, ADR 0129)
|
|
99
|
+
* and `slots` by part name.
|
|
100
|
+
*/
|
|
101
|
+
readonly condition: 'fills-pattern-slot';
|
|
102
|
+
readonly patternKinds?: readonly string[];
|
|
103
|
+
readonly slots?: readonly string[];
|
|
92
104
|
};
|
|
93
105
|
/**
|
|
94
106
|
* One observation from the workspace's evidence overlay, reduced to what
|
|
@@ -107,6 +119,21 @@ export interface CatalogueEvidenceObservation {
|
|
|
107
119
|
readonly result: 'confirmed' | 'contradicted' | 'unknown' | 'not-observed';
|
|
108
120
|
readonly searched?: readonly unknown[];
|
|
109
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* One slot of one pattern instance and the subject bound into it, as
|
|
124
|
+
* interrogation reads it. Shaped structurally rather than importing the
|
|
125
|
+
* compiler's {@link PatternMembership} for the same reason
|
|
126
|
+
* {@link CatalogueEvidenceObservation} is: the pure engine entry keeps
|
|
127
|
+
* owning its whole input surface, and a host passes
|
|
128
|
+
* `compilation.patternMemberships` without the compiler's types. Only
|
|
129
|
+
* `fills-pattern-slot` reads it (ADR 0131).
|
|
130
|
+
*/
|
|
131
|
+
export interface CataloguePatternMembership {
|
|
132
|
+
readonly member: string;
|
|
133
|
+
readonly slot: string;
|
|
134
|
+
readonly instance: string;
|
|
135
|
+
readonly pattern: string;
|
|
136
|
+
}
|
|
110
137
|
export interface CatalogueQuestion {
|
|
111
138
|
readonly id: string;
|
|
112
139
|
readonly wave: string;
|
|
@@ -210,7 +237,15 @@ export declare function evaluateCatalogue(catalogue: QuestionCatalogue, graph: S
|
|
|
210
237
|
* the report. A fifth optional parameter rather than an options object,
|
|
211
238
|
* because this signature is published and a consumer already calls it.
|
|
212
239
|
*/
|
|
213
|
-
catalogues?: readonly string[]
|
|
240
|
+
catalogues?: readonly string[],
|
|
241
|
+
/**
|
|
242
|
+
* Pattern memberships from the compilation (ADR 0131) — pass
|
|
243
|
+
* `compilation.patternMemberships`, or `fills-pattern-slot` conditions
|
|
244
|
+
* never fire. A sixth optional parameter for the same reason
|
|
245
|
+
* `catalogues` is a fifth: this signature is published and a consumer
|
|
246
|
+
* already calls it.
|
|
247
|
+
*/
|
|
248
|
+
patternMemberships?: readonly CataloguePatternMembership[]): Omit<InterrogationReport, 'workspace'>;
|
|
214
249
|
export type CatalogueLoadResult = {
|
|
215
250
|
readonly ok: true;
|
|
216
251
|
readonly catalogue: QuestionCatalogue;
|