Changes for page Data Model (From Specification Chat)
Last modified by Robert Schaub on 2025/12/24 20:35
From version 4.1
edited by Robert Schaub
on 2025/11/27 12:11
on 2025/11/27 12:11
Change comment:
There is no comment for this version
To version 7.1
edited by Robert Schaub
on 2025/11/27 12:41
on 2025/11/27 12:41
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,171 +1,7 @@ 1 - == 1. Overall analysis & review of the data model ==1 +((( 2 2 3 -=== 1.1 Strengths of the current design === 4 - 5 -* ((( 6 -**Identity vs. version pattern** 7 -Using base entities plus version entities (CLAIM + CLAIM_VERSION, SCENARIO + SCENARIO_VERSION, etc.) is exactly how modern knowledge systems handle: 8 - 9 -* auditability 10 -* time evolution 11 -* re-evaluation triggers 12 -* federation and partial replication 13 13 ))) 14 -* ((( 15 -**Scenario-centric reasoning** 16 -Separating //Claim// (what people argue about) from //Scenario// (interpretive frame) is very aligned with “truth landscape” style systems: 17 17 18 -* Scenarios explain //why people disagree//. 19 -* Verdicts are tied to specific scenario versions → avoids mixing incompatible assumptions. 20 -))) 21 -* **Evidence and verdicts as first-class entities** 22 -Evidence is explicit, linked to scenarios, and verdicts are per scenario. This matches good practice from fact-checking, scientific assessment panels, and trust graphs. 23 -* ((( 24 -**Cluster level (CLAIM_CLUSTER)** 25 -Grouping related claims avoids duplication and lets you: 26 - 27 -* reuse scenarios across paraphrases 28 -* share embeddings / semantic search 29 -* keep the system scalable as the corpus grows. 30 -))) 31 -* ((( 32 -**Explicit review layer (REVIEW_ACTION, roles, etc.)** 33 -Separating “data” from “who reviewed what” keeps the model clean, and is exactly what you want for: 34 - 35 -* governance 36 -* permissions 37 -* audit trails 38 -* future trust scoring per user / role. 39 -))) 40 - 41 ----- 42 - 43 -=== 1.2 Design decisions I’m locking in (based on our discussions) === 44 - 45 -To make the model consistent and “state-of-the-art”, I will assume the following as //current intended design//: 46 - 47 -1. ((( 48 -**Claims vs Scenarios** 49 - 50 -* CLAIM is the stable identity for “what people argue about”. 51 -* CLAIM_VERSION are individual phrasings / formulations / metadata. 52 -* ((( 53 -SCENARIO belongs to a **CLAIM**, not to a specific CLAIM_VERSION. 54 -Rationale: 55 - 56 -* Many different phrasings share the //same// scenario. 57 -* You avoid duplicating scenarios per wording. 58 -))) 59 -* SCENARIO_VERSION holds detailed definitions, assumptions, boundaries, etc. 60 -))) 61 -1. ((( 62 -**Version-specific reasoning** 63 - 64 -* **Verdicts** are always attached to SCENARIO_VERSION (not base SCENARIO). 65 -* **Evidence links** are between SCENARIO_VERSION and EVIDENCE_VERSION. 66 -→ This is what we agreed when we said //“SCENARIO_EVIDENCE_LINK should link the respective versions instead”//. 67 -))) 68 -1. ((( 69 -**Clusters** 70 - 71 -* CLAIM_CLUSTER groups Claims (semantically close claims). 72 -* It is visible in **both diagrams** (Core Data Model and Data Use). 73 -))) 74 -1. ((( 75 -**Review vs data** 76 - 77 -* ((( 78 -All review happens **on versioned entities**: 79 - 80 -* CLAIM_VERSION 81 -* SCENARIO_VERSION 82 -* EVIDENCE_VERSION 83 -* SCENARIO_EVIDENCE_LINK_VERSION 84 -* VERDICT_VERSION 85 -))) 86 -* REVIEW_ACTION is the generic log of //who// did //what// on //which version//. 87 -))) 88 -1. ((( 89 -**Users & roles** 90 - 91 -* USER has an attribute (or a linked entity) that distinguishes **technical users** from normal accounts. 92 -* We //keep// TECHNICAL_USER as a specialisation of USER (strictly technical accounts). 93 -* All human & technical accounts can hold roles via USER_ROLE_MEMBERSHIP. 94 -* ((( 95 -Roles include: 96 - 97 -* READER 98 -* CONTRIBUTOR 99 -* TRUSTED_CONTRIBUTOR 100 -* REVIEWER 101 -* MODERATOR 102 -* SYSTEM_ADMIN / MAINTAINER 103 -* FEDERATION_OPERATOR 104 -* FEDERATION_ADMIN 105 -(all present in the Data Use ERD, but as rows of ROLE rather than separate entities). 106 -))) 107 -))) 108 - 109 ----- 110 - 111 -=== 1.3 Gaps / potential problems === 112 - 113 -These are the main issues & missing areas I see: 114 - 115 -1. ((( 116 -**Versioning text in chapter 5 is currently too thin (‘…’ placeholders)** 117 - 118 -* ((( 119 -The spec does not yet //verbally// spell out: 120 - 121 -* the identity vs version pattern, systematically 122 -* how re-evaluation triggers are derived from version changes 123 -* how this aligns with federation (which versions are replicated where). 124 -))) 125 -))) 126 -1. ((( 127 -**No explicit “provenance granularity” in the model** 128 - 129 -* ((( 130 -EVIDENCE is a single entity. For more advanced use cases, you may later want: 131 - 132 -* EVIDENCE_SOURCE (the whole article/report/video) 133 -* EVIDENCE_FRAGMENT (specific paragraph/clip with its own reliability, quote, etc.) 134 -))) 135 -* For now, I’ll keep EVIDENCE/EVIDENCE_VERSION as is, but I’ll mention this as a possible extension. 136 -))) 137 -1. ((( 138 -**Review target polymorphism** 139 - 140 -* ((( 141 -REVIEW_ACTION can apply to multiple entity types. In the diagram this shows as multiple relationships: 142 - 143 -* CLAIM_VERSION → REVIEW_ACTION 144 -* SCENARIO_VERSION → REVIEW_ACTION 145 -* etc. 146 -))) 147 -* A more “pure” relational modeling would use a generic “subjectType + subjectId” or an intermediate “REVIEW_TARGET” table. 148 -* For readability, I’ll keep the simpler multi-edge representation and mention the polymorphism in text. 149 -))) 150 -1. ((( 151 -**Federation details missing from core ERD** 152 - 153 -* There is no explicit FEDERATION_NODE / REPLICATION_LOG in the Data Model chapter. 154 -* This is ok for “core logical data model”, but I’ll add a short note that federation metadata is handled in the Federation chapter and via additional entities. 155 -))) 156 -1. ((( 157 -**Automation / AKEL artifacts left implicit** 158 - 159 -* ((( 160 -The Data Model chapter currently doesn’t describe: 161 - 162 -* AKEL task queues 163 -* extraction runs 164 -* model versions 165 -))) 166 -* That’s fine for now; I’ll just clarify that those belong to a “Processing / AKEL” submodel, not the core logical data model. 167 -))) 168 - 169 169 = 5. Data Model = 170 170 171 171 The FactHarbor data model centers on four fully versioned, immutable entities: ... ... @@ -225,99 +225,9 @@ 225 225 The convention is that fields ending in {{code}}Id{{/code}} are primary keys, 226 226 and fields with {{code}}...IdFk{{/code}} are foreign keys. 227 227 228 -{{mermaid}} 229 -erDiagram 230 - CLAIM_CLUSTER { 231 - string ClusterID PK 232 - string EmbeddingVectorRef 233 - string Theme 234 - } 64 +{{comment}} Core Data Model ERD (Mermaid, from /Specification/Diagrams/Data Model) {{/comment}} 65 +{{include document="FactHarbor.Playground.Core Data Model ERD Page (from Specification chat).WebHome" reference="FactHarbor.Playground.data.Core Data Model ERD Page (from Specification chat).WebHome"/}} 235 235 236 - CLAIM { 237 - string ClaimID PK 238 - string ClusterID FK 239 - string Status 240 - datetime CreatedAt 241 - } 242 - 243 - CLAIM_VERSION { 244 - string ClaimVersionID PK 245 - string ClaimID FK 246 - string Text 247 - string ClaimType 248 - string Domain 249 - datetime CreatedAt 250 - } 251 - 252 - SCENARIO { 253 - string ScenarioID PK 254 - string ClaimID FK 255 - string Name 256 - datetime CreatedAt 257 - } 258 - 259 - SCENARIO_VERSION { 260 - string ScenarioVersionID PK 261 - string ScenarioID FK 262 - string Definitions 263 - string Assumptions 264 - string Boundaries 265 - datetime CreatedAt 266 - } 267 - 268 - EVIDENCE { 269 - string EvidenceID PK 270 - string SourceType 271 - string URL 272 - float ReliabilityScore 273 - } 274 - 275 - EVIDENCE_VERSION { 276 - string EvidenceVersionID PK 277 - string EvidenceID FK 278 - string Summary 279 - float ReliabilityScore 280 - datetime CreatedAt 281 - } 282 - 283 - SCENARIO_EVIDENCE_LINK { 284 - string LinkID PK 285 - string ScenarioVersionID FK 286 - string EvidenceVersionID FK 287 - float Relevance 288 - string Direction 289 - } 290 - 291 - VERDICT { 292 - string VerdictID PK 293 - string ScenarioID FK 294 - } 295 - 296 - VERDICT_VERSION { 297 - string VerdictVersionID PK 298 - string VerdictID FK 299 - float Verdict 300 - float Confidence 301 - string Reasoning 302 - datetime CreatedAt 303 - } 304 - 305 - CLAIM_CLUSTER ||--o{ CLAIM : contains 306 - CLAIM ||--o{ CLAIM_VERSION : versions 307 - 308 - CLAIM ||--o{ SCENARIO : has 309 - SCENARIO ||--o{ SCENARIO_VERSION : versions 310 - 311 - EVIDENCE ||--o{ EVIDENCE_VERSION : versions 312 - 313 - SCENARIO_VERSION ||--o{ SCENARIO_EVIDENCE_LINK : links 314 - EVIDENCE_VERSION ||--o{ SCENARIO_EVIDENCE_LINK : linked 315 - 316 - SCENARIO ||--o{ VERDICT : assessed 317 - VERDICT ||--o{ VERDICT_VERSION : versions 318 - 319 -{{/mermaid}} 320 - 321 321 **Important points:** 322 322 323 323 * Scenarios and Evidence are **linked via their versions** ... ... @@ -338,6 +338,14 @@ 338 338 * Roles and role assignments 339 339 * Review actions on versioned entities 340 340 87 +{{comment}} Data Use ERD (Mermaid, from /Specification/Diagrams/Data Use ERD) {{/comment}} 88 +{{include document="FactHarbor.Playground.Data Use ERD Page (from Specification chat).WebHome" reference="FactHarbor.Playground.data.Data Use ERD Page (from Specification chat).WebHome"/}} 89 + 90 += Data Use ERD (Roles, Review & Versioned Entities) = 91 + 92 +This diagram shows how users, roles, and review actions relate to the 93 +versioned core entities. 94 + 341 341 {{mermaid}} 342 342 erDiagram 343 343 %% Core clusters shown for context ... ... @@ -478,9 +478,16 @@ 478 478 REVIEW_ACTION }o--|| SCENARIO_VERSION : reviews 479 479 REVIEW_ACTION }o--|| EVIDENCE_VERSION : reviews 480 480 REVIEW_ACTION }o--|| VERDICT_VERSION : reviews 481 - 482 482 {{/mermaid}} 483 483 237 +{{info}} 238 +This diagram focuses on *who* uses and reviews *which* versioned entities. 239 +USER is the base type; TECHNICAL_USER and CONTRIBUTING_USER are specializations. 240 +Other roles (REVIEWER, EXPERT, TRUSTED_CONTRIBUTOR, FEDERATION_ADMIN, FEDERATION_NODE) 241 +are modelled as specializations or technical subtypes. 242 +{{/info}} 243 + 244 + 484 484 Notes: 485 485 486 486 * Most roles (READER, CONTRIBUTOR, TRUSTED_CONTRIBUTOR, REVIEWER, MODERATOR, ... ... @@ -547,3 +547,173 @@ 547 547 Federation-specific entities (such as {{code}}FEDERATION_NODE{{/code}}, 548 548 replication logs, and trust rules) are described in the Federation & 549 549 Decentralization chapter and build on top of the core data model defined here. 311 + 312 +---- 313 + 314 +== 1. Overall analysis & review of the data model == 315 + 316 +=== 1.1 Strengths of the current design === 317 + 318 +* ((( 319 +**Identity vs. version pattern** 320 +Using base entities plus version entities (CLAIM + CLAIM_VERSION, SCENARIO + SCENARIO_VERSION, etc.) is exactly how modern knowledge systems handle: 321 + 322 +* auditability 323 +* time evolution 324 +* re-evaluation triggers 325 +* federation and partial replication 326 +))) 327 +* ((( 328 +**Scenario-centric reasoning** 329 +Separating //Claim// (what people argue about) from //Scenario// (interpretive frame) is very aligned with “truth landscape” style systems: 330 + 331 +* Scenarios explain //why people disagree//. 332 +* Verdicts are tied to specific scenario versions → avoids mixing incompatible assumptions. 333 +))) 334 +* **Evidence and verdicts as first-class entities** 335 +Evidence is explicit, linked to scenarios, and verdicts are per scenario. This matches good practice from fact-checking, scientific assessment panels, and trust graphs. 336 +* ((( 337 +**Cluster level (CLAIM_CLUSTER)** 338 +Grouping related claims avoids duplication and lets you: 339 + 340 +* reuse scenarios across paraphrases 341 +* share embeddings / semantic search 342 +* keep the system scalable as the corpus grows. 343 +))) 344 +* ((( 345 +**Explicit review layer (REVIEW_ACTION, roles, etc.)** 346 +Separating “data” from “who reviewed what” keeps the model clean, and is exactly what you want for: 347 + 348 +* governance 349 +* permissions 350 +* audit trails 351 +* future trust scoring per user / role. 352 +))) 353 + 354 +---- 355 + 356 +=== 1.2 Design decisions I’m locking in (based on our discussions) === 357 + 358 +To make the model consistent and “state-of-the-art”, I will assume the following as //current intended design//: 359 + 360 +1. ((( 361 +**Claims vs Scenarios** 362 + 363 +* CLAIM is the stable identity for “what people argue about”. 364 +* CLAIM_VERSION are individual phrasings / formulations / metadata. 365 +* ((( 366 +SCENARIO belongs to a **CLAIM**, not to a specific CLAIM_VERSION. 367 +Rationale: 368 + 369 +* Many different phrasings share the //same// scenario. 370 +* You avoid duplicating scenarios per wording. 371 +))) 372 +* SCENARIO_VERSION holds detailed definitions, assumptions, boundaries, etc. 373 +))) 374 +1. ((( 375 +**Version-specific reasoning** 376 + 377 +* **Verdicts** are always attached to SCENARIO_VERSION (not base SCENARIO). 378 +* **Evidence links** are between SCENARIO_VERSION and EVIDENCE_VERSION. 379 +→ This is what we agreed when we said //“SCENARIO_EVIDENCE_LINK should link the respective versions instead”//. 380 +))) 381 +1. ((( 382 +**Clusters** 383 + 384 +* CLAIM_CLUSTER groups Claims (semantically close claims). 385 +* It is visible in **both diagrams** (Core Data Model and Data Use). 386 +))) 387 +1. ((( 388 +**Review vs data** 389 + 390 +* ((( 391 +All review happens **on versioned entities**: 392 + 393 +* CLAIM_VERSION 394 +* SCENARIO_VERSION 395 +* EVIDENCE_VERSION 396 +* SCENARIO_EVIDENCE_LINK_VERSION 397 +* VERDICT_VERSION 398 +))) 399 +* REVIEW_ACTION is the generic log of //who// did //what// on //which version//. 400 +))) 401 +1. ((( 402 +**Users & roles** 403 + 404 +* USER has an attribute (or a linked entity) that distinguishes **technical users** from normal accounts. 405 +* We //keep// TECHNICAL_USER as a specialisation of USER (strictly technical accounts). 406 +* All human & technical accounts can hold roles via USER_ROLE_MEMBERSHIP. 407 +* ((( 408 +Roles include: 409 + 410 +* READER 411 +* CONTRIBUTOR 412 +* TRUSTED_CONTRIBUTOR 413 +* REVIEWER 414 +* MODERATOR 415 +* SYSTEM_ADMIN / MAINTAINER 416 +* FEDERATION_OPERATOR 417 +* FEDERATION_ADMIN 418 +(all present in the Data Use ERD, but as rows of ROLE rather than separate entities). 419 +))) 420 +))) 421 + 422 +---- 423 + 424 +=== 1.3 Gaps / potential problems === 425 + 426 +These are the main issues & missing areas I see: 427 + 428 +1. ((( 429 +**Versioning text in chapter 5 is currently too thin (‘…’ placeholders)** 430 + 431 +* ((( 432 +The spec does not yet //verbally// spell out: 433 + 434 +* the identity vs version pattern, systematically 435 +* how re-evaluation triggers are derived from version changes 436 +* how this aligns with federation (which versions are replicated where). 437 +))) 438 +))) 439 +1. ((( 440 +**No explicit “provenance granularity” in the model** 441 + 442 +* ((( 443 +EVIDENCE is a single entity. For more advanced use cases, you may later want: 444 + 445 +* EVIDENCE_SOURCE (the whole article/report/video) 446 +* EVIDENCE_FRAGMENT (specific paragraph/clip with its own reliability, quote, etc.) 447 +))) 448 +* For now, I’ll keep EVIDENCE/EVIDENCE_VERSION as is, but I’ll mention this as a possible extension. 449 +))) 450 +1. ((( 451 +**Review target polymorphism** 452 + 453 +* ((( 454 +REVIEW_ACTION can apply to multiple entity types. In the diagram this shows as multiple relationships: 455 + 456 +* CLAIM_VERSION → REVIEW_ACTION 457 +* SCENARIO_VERSION → REVIEW_ACTION 458 +* etc. 459 +))) 460 +* A more “pure” relational modeling would use a generic “subjectType + subjectId” or an intermediate “REVIEW_TARGET” table. 461 +* For readability, I’ll keep the simpler multi-edge representation and mention the polymorphism in text. 462 +))) 463 +1. ((( 464 +**Federation details missing from core ERD** 465 + 466 +* There is no explicit FEDERATION_NODE / REPLICATION_LOG in the Data Model chapter. 467 +* This is ok for “core logical data model”, but I’ll add a short note that federation metadata is handled in the Federation chapter and via additional entities. 468 +))) 469 +1. ((( 470 +**Automation / AKEL artifacts left implicit** 471 + 472 +* ((( 473 +The Data Model chapter currently doesn’t describe: 474 + 475 +* AKEL task queues 476 +* extraction runs 477 +* model versions 478 +))) 479 +* That’s fine for now; I’ll just clarify that those belong to a “Processing / AKEL” submodel, not the core logical data model. 480 +)))