Wiki source code of Workflows

Version 1.1 by Robert Schaub on 2025/12/11 16:36

Hide last authors
Robert Schaub 1.1 1 = Workflows =
2
3 This chapter defines the core workflows used across the FactHarbor system.
4
5 Each workflow describes:
6
7 * Purpose
8 * Participants
9 * Steps
10 * Automation vs. manual work
11 * (Wherever applicable) linear ASCII flow: a → b → c → d
12
13 Workflows included:
14
15 1. Claim Workflow
16 2. Scenario Workflow
17 3. Evidence Workflow
18 4. Verdict Workflow
19 5. Re-evaluation Workflow
20 6. Federation Synchronization Workflow
21 7. User Role & Review Workflow
22 8. AKEL Workflow
23 9. Global Trigger Flow
24 10. Entity Lifecycle Notes
25
26 ----
27
28 == Claim Workflow ==
29
30 **Purpose:**
31 Transform raw text or input material into a normalized, classified, deduplicated, and versioned claim ready for scenario evaluation.
32
33 **Participants:**
34 * Contributor
35 * AKEL
36 * Reviewer
37
38 === Steps ===
39
40 **1. Ingestion**
41 * User submits text, URL, transcript, or multi-claim content
42 * AKEL extracts one or multiple claims
43
44 **2. Normalization**
45 * Standardizes wording
46 * Reduces ambiguity
47 * Flags implicit assumptions
48
49 **3. Classification (AKEL draft → Reviewer confirm)**
50 * ClaimType
51 * Domain
52 * Evaluability
53 * SafetyCategory
54
55 **4. Duplicate & Similarity Detection**
56 * Embeddings created
57 * Similar claims found
58 * Reviewer merges, splits, or confirms uniqueness
59
60 **5. Version Creation**
61 * New ClaimVersion stored
62 * Every edit creates a new immutable version
63
64 **6. Cluster Assignment**
65 * AKEL proposes cluster membership
66 * Reviewer confirms
67
68 **7. Scenario Linking (optional)**
69 * Existing scenarios connected
70 * AKEL may propose new drafts
71
72 **8. Publication**
73 * Claim becomes active and visible
74
75 **Flow:**
76 Ingest → Normalize → Classify → Deduplicate → Cluster → Version → Publish
77
78 ----
79
80 == Scenario Workflow ==
81
82 **Purpose:**
83 Define the specific analytic contexts needed to evaluate each claim.
84
85 **Participants:**
86 * Contributor
87 * Reviewer
88 * Domain Expert
89 * AKEL
90
91 === Steps ===
92
93 **1. Scenario Proposal**
94 * Drafted by contributor or generated by AKEL
95
96 **2. Completion of Required Fields**
97 Must include:
98 * Definitions
99 * Assumptions
100 * ContextBoundary
101 * EvaluationMethod
102 * SafetyClass
103 * VersionMetadata
104
105 **3. Safety Interception (AKEL)**
106 Flags:
107 * non-falsifiable structures
108 * pseudoscientific assumptions
109 * unsafe contexts
110
111 **4. Redundancy & Conflict Check**
112 * Similar scenarios merged
113 * Contradictions flagged
114
115 **5. Reviewer Validation**
116 Ensures clarity, neutrality, and methodological validity.
117
118 **6. Expert Approval (mandatory for high-risk domains)**
119
120 **7. Version Storage**
121 * Each revision = new ScenarioVersion
122
123 **Flow:**
124 Draft → Validate → Safety Check → Review → Expert Approval → Version → Activate
125
126 ----
127
128 == Evidence Workflow ==
129
130 **Purpose:**
131 Structure, classify, validate, version, and link evidence to scenarios.
132
133 **Participants:**
134 * Contributor
135 * Reviewer
136 * Domain Expert (when needed)
137 * AKEL
138
139 === Steps ===
140
141 **1. Evidence Submission**
142 * File, dataset, URL, or extracted text
143
144 **2. Metadata Extraction (AKEL)**
145 * EvidenceType
146 * Category
147 * Provenance
148 * Study design
149 * ExtractionMethod
150 * ReliabilityHints
151
152 **3. Relevance Check**
153 Reviewer verifies which scenarios the evidence applies to.
154
155 **4. Reliability Assessment**
156 * AKEL proposes reliability
157 * Reviewer confirms
158 * Expert review for complex papers
159
160 **5. ScenarioEvidenceLink Creation**
161 Each link stores:
162 * relevance score
163 * justification
164 * evidence version
165
166 **6. Versioning**
167 * Any update = new EvidenceVersion
168
169 **Flow:**
170 Submit → Extract Metadata → Evaluate Relevance → Score Reliability → Link → Version
171
172 ----
173
174 == Verdict Workflow ==
175
176 **Purpose:**
177 Generate likelihood estimates per scenario based on evidence and scenario structure.
178
179 **Participants:**
180 * AKEL (drafts)
181 * Reviewer
182 * Domain Expert
183
184 === Steps ===
185
186 **1. Evidence Aggregation**
187 Collect relevant evidence versions.
188
189 **2. Draft Verdict Generation (AKEL)**
190 Outputs:
191 * likelihood range
192 * uncertainty factors
193 * conflict detection
194 * sensitivity analysis
195
196 **3. Reasoning Draft**
197 Structured explanation chain generated by AKEL.
198
199 **4. Reviewer Validation**
200 Ensures logic, evidence fit, no hallucinations.
201
202 **5. Expert Review**
203 Required for:
204 * medicine
205 * psychology
206 * engineering
207 * political misinformation
208 * controversial or risky domains
209
210 **6. Verdict Storage**
211 * Every update creates a new VerdictVersion
212
213 **Flow:**
214 Aggregate → Draft Verdict → Draft Explanation → Review → Expert Approval → Version
215
216 ----
217
218 == Re-evaluation Workflow ==
219
220 **Purpose:**
221 Keep verdicts current when evidence or scenarios change.
222
223 === Trigger Types ===
224
225 * Evidence updated, disputed, retracted
226 * Scenario assumptions changed
227 * Claim reclassification
228 * AKEL contradiction detection
229 * Federation sync
230
231 === Steps ===
232
233 **1. Trigger Detection**
234 Re-evaluation engine receives event.
235
236 **2. Impact Analysis**
237 Find affected:
238 * scenarios
239 * evidence links
240 * verdicts
241
242 **3. AKEL Draft Re-calculation**
243 New:
244 * likelihood
245 * reasoning
246 * uncertainty
247
248 **4. Reviewer Validation**
249 **5. Expert Review** (high-risk)
250 **6. Version Storage**
251
252 **Flow:**
253 Trigger → Analyze → Recompute → Review → Expert → Version
254
255 ----
256
257 == Federation Synchronization Workflow ==
258
259 **Purpose:**
260 Exchange structured data between nodes.
261
262 === Steps ===
263 1. Detect version changes
264 1. Build bundle (diff + Merkle tree + signatures)
265 1. Push to peers
266 1. Validate lineage + hashes
267 1. Resolve conflicts (merge or branch)
268 1. Optional re-evaluation
269
270 **Flow:**
271 Change → Bundle → Push → Validate → Merge/Fork → Update
272
273 ----
274
275 == User Role & Review Workflow ==
276
277 **Purpose:**
278 Ensure correctness, neutrality, safety, and resistance to manipulation.
279
280 === Steps ===
281
282 **1. Submission**
283 Claim / scenario / evidence / verdict.
284
285 **2. Auto-check (AKEL)**
286 Flags unsafe content, contradictions, format issues.
287
288 **3. Reviewer Validation**
289
290 **4. Expert Validation**
291 Required for sensitive domains.
292
293 **5. Moderator Oversight**
294 Triggered by suspicious behavior.
295
296 **Flow:**
297 Submit → Auto-check → Review → Expert → Moderator (if needed)
298
299 ----
300
301 == AKEL Workflow ==
302
303 **Purpose:**
304 Support extraction, drafting, structuring, and contradiction detection.
305
306 === Stages ===
307
308 **A — Input Understanding:**
309 Extraction, normalization, classification.
310
311 **B — Scenario Drafting:**
312 Definitions, boundaries, assumptions.
313
314 **C — Evidence Processing:**
315 Retrieval, summarization, ranking.
316
317 **D — Verdict Drafting:**
318 Likelihood, explanations, uncertainties.
319
320 **E — Safety & Integrity:**
321 Contradictions, hallucination detection.
322
323 **F — Human Approval:**
324 Reviewer and/or expert.
325
326 **Flow:**
327 Input → Drafts → Integrity → Human Approval
328
329 ----
330
331 == Global Trigger Flow (Cascade) ==
332
333 Trigger Sources:
334 * Claim change
335 * Scenario change
336 * Evidence change
337 * Verdict contradiction
338 * Federation update
339 * AKEL model improvements
340
341 **Cascade Flow:**
342 Trigger → Dependency Graph → Re-evaluation → Updated Verdicts
343