Changes for page Architecture

Last modified by Robert Schaub on 2025/12/24 20:34

From version 3.1
edited by Robert Schaub
on 2025/12/11 21:35
Change comment: Imported from XAR
To version 4.1
edited by Robert Schaub
on 2025/12/12 08:32
Change comment: Imported from XAR

Summary

Details

Page properties
Content
... ... @@ -3,21 +3,19 @@
3 3  FactHarbor uses a modular-monolith architecture (POC → Beta 0) designed to evolve into a distributed, federated, multi-node system (Release 1.0+).
4 4  Modules are strongly separated, versioned, and auditable. All logic is transparent and deterministic.
5 5  
6 -----
6 +== High-Level System Architecture ==
7 7  
8 -= High-Level System Architecture =
9 -
10 10  FactHarbor is composed of the following major modules:
11 11  
12 12  * **UI Frontend**
13 13  * **REST API Layer**
14 14  * **Core Logic Layer**
15 -** Claim Processing
16 - Scenario Engine
17 - Evidence Repository
18 - Verdict Engine
19 - Re-evaluation Engine
20 - Roles / Identity / Reputation**
13 +** Claim Processing
14 +** Scenario Engine
15 +** Evidence Repository
16 +** Verdict Engine
17 +** Re-evaluation Engine
18 +** Roles / Identity / Reputation
21 21  * **AKEL (AI Knowledge Extraction Layer)**
22 22  * **Federation Layer**
23 23  * **Workers & Background Jobs**
... ... @@ -27,191 +27,170 @@
27 27  
28 28  Key ideas:
29 29  
30 -* Core logic is deterministic, auditable, and versioned
31 -* AKEL drafts structured outputs but never publishes directly
32 -* Workers run long or asynchronous tasks
33 -* Storage is separated for scalability and clarity
34 -* Federation Layer provides optional distributed operation
28 +* Core logic is deterministic, auditable, and versioned.
29 +* AKEL drafts structured outputs but never publishes directly.
30 +* Workers run long or asynchronous tasks.
31 +* Storage is separated for scalability and clarity.
32 +* Federation Layer provides optional distributed operation.
35 35  
36 -----
34 +== Storage Architecture ==
37 37  
38 -= Storage Architecture =
39 -
40 40  FactHarbor separates structured data, embeddings, and evidence files:
41 41  
42 -* **PostgreSQL** — canonical structured entities, all versioning, lineage, signatures
43 -* **Vector DB (Qdrant or pgvector)** — semantic search, duplication detection, cluster mapping
44 -* **Object Storage** — PDFs, datasets, raw evidence, transcripts
45 -* **Optional (Release 1.0)**: Redis for caching, IPFS for decentralized object storage
38 +* **PostgreSQL** — canonical structured entities, all versioning, lineage, signatures.
39 +* **Vector DB (Qdrant or pgvector)** — semantic search, duplication detection, cluster mapping.
40 +* **Object Storage** — PDFs, datasets, raw evidence, transcripts.
41 +* **Optional (Release 1.0)**: Redis for caching, IPFS for decentralized object storage.
46 46  
47 47  {{include reference="FactHarbor.Specification.Diagrams.Storage Architecture.WebHome"/}}
48 48  
49 -----
45 +== Core Backend Module Architecture ==
50 50  
51 -= Core Backend Module Architecture =
52 -
53 53  Each module has a clear responsibility and versioned boundaries to allow future extraction into microservices.
54 54  
55 -== Claim Processing Module ==
49 +=== Claim Processing Module ===
56 56  
57 57  Responsibilities:
58 58  
59 -* Ingest text, URLs, documents, transcripts, federated input
60 -* Extract claims (AKEL-assisted)
61 -* Normalize structure
62 -* Classify (type, domain, evaluability, safety)
63 -* Deduplicate via embeddings
64 -* Assign to claim clusters
53 +* Ingest text, URLs, documents, transcripts, federated input
54 +* Extract claims (AKEL-assisted)
55 +* Normalize structure
56 +* Classify (type, domain, evaluability, safety)
57 +* Deduplicate via embeddings
58 +* Assign to claim clusters
65 65  
66 -Flow:
67 -**Ingest → Normalize → Classify → Deduplicate → Cluster**
60 +Flow: **Ingest → Normalize → Classify → Deduplicate → Cluster**
68 68  
69 -----
62 +=== Scenario Engine ===
70 70  
71 -== Scenario Engine ==
72 -
73 73  Responsibilities:
74 74  
75 -* Create and validate scenarios
76 -* Enforce required fields (definitions, assumptions, boundaries...)
77 -* Perform safety checks (AKEL-assisted)
78 -* Manage versioning and lifecycle
79 -* Provide contextual evaluation settings to the Verdict Engine
66 +* Create and validate scenarios
67 +* Enforce required fields (definitions, assumptions, boundaries...)
68 +* Perform safety checks (AKEL-assisted)
69 +* Manage versioning and lifecycle
70 +* Provide contextual evaluation settings to the Verdict Engine
80 80  
81 -Flow:
82 -**Create → Validate → Version → Lifecycle → Safety**
72 +Flow: **Create → Validate → Version → Lifecycle → Safety**
83 83  
84 -----
74 +=== Evidence Repository ===
85 85  
86 -== Evidence Repository ==
87 -
88 88  Responsibilities:
89 89  
90 -* Store metadata + files (object store)
91 -* Classify evidence
92 -* Compute preliminary reliability
93 -* Maintain version history
94 -* Detect retractions or disputes
95 -* Provide structured metadata to the Verdict Engine
78 +* Store metadata + files (object store)
79 +* Classify evidence
80 +* Compute preliminary reliability
81 +* Maintain version history
82 +* Detect retractions or disputes
83 +* Provide structured metadata to the Verdict Engine
96 96  
97 -Flow:
98 -**Store → Classify → Score → Version → Update/Retract**
85 +Flow: **Store → Classify → Score → Version → Update/Retract**
99 99  
100 -----
87 +=== Verdict Engine ===
101 101  
102 -== Verdict Engine ==
103 -
104 104  Responsibilities:
105 105  
106 -* Aggregate scenario-linked evidence
107 -* Compute likelihood ranges
108 -* Generate reasoning chain
109 -* Track uncertainty factors
110 -* Maintain verdict version timelines
91 +* Aggregate scenario-linked evidence
92 +* Compute likelihood ranges **per scenario**
93 +* Generate reasoning chain
94 +* Track uncertainty factors
95 +* Maintain verdict version timelines
111 111  
112 -Flow:
113 -**Aggregate → Compute → Explain → Version → Timeline**
97 +Flow: **Aggregate → Compute → Explain → Version → Timeline**
114 114  
115 -----
99 +=== Re-evaluation Engine ===
116 116  
117 -== Re-evaluation Engine ==
118 -
119 119  Responsibilities:
120 120  
121 -* Listen for upstream changes
122 -* Trigger partial or full recomputation
123 -* Update verdicts + summary views
124 -* Maintain consistency across federated nodes
103 +* Listen for upstream changes
104 +* Trigger partial or full recomputation
105 +* Update verdicts + summary views
106 +* Maintain consistency across federated nodes
125 125  
126 126  Triggers include:
127 127  
128 -* Evidence updated or retracted
129 -* Scenario definition or assumption changes
130 -* Claim type or evaluability changes
131 -* Contradiction detection
132 -* Federation sync updates
110 +* Evidence updated or retracted
111 +* Scenario definition or assumption changes
112 +* Claim type or evaluability changes
113 +* Contradiction detection
114 +* Federation sync updates
133 133  
134 -Flow:
135 -**Trigger → Impact Analysis → Recompute → Publish Update**
116 +Flow: **Trigger → Impact Analysis → Recompute → Publish Update**
136 136  
137 -----
118 +== AKEL Integration Summary ==
138 138  
139 -= AKEL Integration Summary =
120 +AKEL is fully documented in its own chapter. Here is only the architectural integration summary:
140 140  
141 -AKEL is fully documented in its own chapter.
142 -Here is only the architectural integration summary:
122 +* Receives raw input for claims
123 +* Proposes scenario drafts
124 +* Extracts and summarizes evidence
125 +* Gives reliability hints
126 +* Suggests draft verdicts
127 +* Monitors contradictions
128 +* Syncs metadata with trusted nodes
143 143  
144 -* Receives raw input for claims
145 -* Proposes scenario drafts
146 -* Extracts and summarizes evidence
147 -* Gives reliability hints
148 -* Suggests draft verdicts
149 -* Monitors contradictions
150 -* Syncs metadata with trusted nodes
151 -
152 152  AKEL runs in parallel to human review — never overrides it.
153 153  
154 154  {{include reference="FactHarbor.Specification.Diagrams.AKEL Architecture.WebHome"/}}
155 155  
156 -----
134 +== Federated Architecture ==
157 157  
158 -= Federated Architecture =
159 -
160 160  Each FactHarbor node:
161 161  
162 -* Has its own dataset (claims, scenarios, evidence, verdicts)
163 -* Runs its own AKEL
164 -* Maintains local governance and reviewer rules
165 -* May partially mirror global or domain-specific data
166 -* Contributes to global knowledge clusters
138 +* Has its own dataset (claims, scenarios, evidence, verdicts)
139 +* Runs its own AKEL
140 +* Maintains local governance and reviewer rules
141 +* May partially mirror global or domain-specific data
142 +* Contributes to global knowledge clusters
167 167  
168 168  Nodes synchronize via:
169 169  
170 -* Signed version bundles
171 -* Merkle-tree lineage structures
172 -* Optionally IPFS for evidence
173 -* Trust-weighted acceptance
146 +* Signed version bundles
147 +* Merkle-tree lineage structures
148 +* Optionally IPFS for evidence
149 +* Trust-weighted acceptance
174 174  
175 175  Benefits:
176 176  
177 -* Community independence
178 -* Scalability
179 -* Resilience
180 -* Domain specialization
153 +* Community independence
154 +* Scalability
155 +* Resilience
156 +* Domain specialization
181 181  
182 182  {{include reference="FactHarbor.Specification.Diagrams.Federation Architecture.WebHome"/}}
183 183  
184 -----
160 +== Request → Verdict Flow ==
185 185  
186 -= Request → Verdict Flow =
187 -
188 188  Simple end-to-end flow:
189 189  
190 -**User → UI Frontend → REST API → FactHarbor Core
191 - → (Claim Processing → Scenario Engine → Evidence Repository → Verdict Engine)
192 - → Summary View → UI Frontend → User**
164 +1. User
165 +2. UI Frontend
166 +3. REST API
167 +4. FactHarbor Core (Processing)
168 +5. Summary View
169 +6. UI Frontend
170 +7. User
193 193  
172 +== Federation Sync Workflow ==
194 194  
195 -----
196 -
197 -= Federation Sync Workflow =
198 -
199 199  Sequence:
200 200  
201 -**Detect Local Change → Build Signed Bundle → Push to Peers → Validate Signature → Merge or Fork → Trigger Re-evaluation**
176 +1. Detect Local Change
177 +2. Build Signed Bundle
178 +3. Push to Peers
179 +4. Validate Signature
180 +5. Merge or Fork
181 +6. Trigger Re-evaluation
202 202  
183 +== Versioning Architecture ==
203 203  
204 -----
205 -
206 -= Versioning Architecture =
207 -
208 208  All entities (Claim, Scenario, Evidence, Verdict) use immutable version chains:
209 209  
210 -* VersionID
211 -* ParentVersionID
212 -* Timestamp
213 -* AuthorType (Human, AI, ExternalNode)
214 -* ChangeReason
215 -* Signature (optional POC, required in 1.0)
187 +* VersionID
188 +* ParentVersionID
189 +* Timestamp
190 +* AuthorType (Human, AI, ExternalNode)
191 +* ChangeReason
192 +* Signature (optional POC, required in 1.0)
216 216  
217 217  {{include reference="FactHarbor.Specification.Diagrams.Versioning Architecture.WebHome"/}}