THE CENTER: Human ◈ AI Feedback Loop
┌─────────────────────────────────────────────────────────────────┐
│ THE CENTER: Human ◈ AI Feedback Loop Environment │
├─────────────────────────────────────────────────────────────────┤
│ │
│ This chapter documents two systems: │
│ │
│ 1. Filename Parser: │
│ 6-pattern parser correctly interprets 1,889+ OnIt session │
│ files accumulated over months of Human-AI interaction. │
│ Each session represents a feedback loop iteration. │
│ │
│ 2. WikiProveViewer: │
│ Visual display of verification status - shows │
│ PROVEN/REFUTED/PARTIAL/PENDING for tracked claims. │
│ │
│ THE CENTER CONNECTION: │
│ ├── Human Benefit: Historical sessions accessible, │
│ │ proof progress visible │
│ ├── AI Benefit: Pattern recognition, structured claim data │
│ └── Feedback Loop: Session metadata enables pattern discovery, │
│ proof status informs next priorities │
│ │
└─────────────────────────────────────────────────────────────────┘
Part 1: 6-Pattern Filename Parser
Parser Architecture
The OnIt filename parser handles 6 distinct historical formats with zero ambiguity: FILENAME PARSER CASCADE
═══════════════════════════════════════════════════════════════
parseOnitFilename()
│
│ Input: filename.md
▼
┌────────────────────────────────────────────────────────────┐
│ PATTERN MATCHING (Most to Least Specific) │
└────────────────────────────────────────────────────────────┘
│
┌────────────────────────┼────────────────────────────────┐
│ │ │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ PATTERN 1 │ │ PATTERN 2 │ │ PATTERN 3 │
│ 6-part+name │ │ 6-part only │ │ 5-part+name │
│ │ │ │ │ │
│ YYYY-MM-DD- │ │ YYYY-MM-DD- │ │ YYYY-MM-DD- │
│ HH-MM-SS- │ │ HH-MM-SS.md │ │ HH-MM-name │
│ name.md │ │ │ │ .md │
│ │ │ │ │ │
│ 732 files │ │ 27 files │ │ 594 files │
└──────────────┘ └──────────────┘ └──────────────┘
│ │ │
│ No match │ No match │
▼ ▼ ▼
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ PATTERN 4 │ │ PATTERN 5 │ │ PATTERN 6 │
│ date+name │ │ prefix+topic │ │ FALLBACK │
│ │ │ │ │ │
│ YYYY-MM-DD- │ │ NN-TOPIC- │ │ *.md │
│ name.md │ │ YYYY-MM-DD- │ │ (any .md) │
│ │ │ HH-MM.md │ │ │
│ 29 files │ │ 7 files │ │ ~480 files │
└──────────────┘ └──────────────┘ └──────────────┘
│
│ Still no match
▼
┌────────────────────────┐
│ Non-.md → return null │
└────────────────────────┘
Pattern Specifications
┌───────────────────────────────────────────────────────────────────────┐
│ PATTERN SPECIFICATIONS │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ PATTERN 1: Full Timestamp + Name (732 files) │
│ ───────────────────────────────────────────── │
│ Format: YYYY-MM-DD-HH-MM-SS-name.md │
│ Example: 2025-08-13-19-49-38-session-name.md │
│ Fields: date, time (with seconds), sessionName │
│ │
│ PATTERN 2: Full Timestamp Only (27 files) │
│ ───────────────────────────────────────────── │
│ Format: YYYY-MM-DD-HH-MM-SS.md │
│ Example: 2025-08-13-19-49-38.md │
│ Fields: date, time (with seconds), sessionName = "session" │
│ │
│ PATTERN 3: No Seconds + Name (594 files) │
│ ───────────────────────────────────────────── │
│ Format: YYYY-MM-DD-HH-MM-name.md │
│ Example: 2025-08-13-19-49-session-name.md │
│ Fields: date, time (no seconds), sessionName │
│ │
│ PATTERN 4: Date + Name (29 files) │
│ ───────────────────────────────────────────── │
│ Format: YYYY-MM-DD-name.md │
│ Example: 2025-08-13-session-name.md │
│ Fields: date, time = "00:00", sessionName │
│ │
│ PATTERN 5: Prefix + Topic (7 files) │
│ ───────────────────────────────────────────── │
│ Format: NN-TOPIC-YYYY-MM-DD-HH-MM.md │
│ Example: 15-TOPIC-NAME-2025-08-13-19-49.md │
│ Fields: date, time, sessionName = "{prefix}-{topic}" │
│ │
│ PATTERN 6: Fallback (~480 files) │
│ ───────────────────────────────────────────── │
│ Format: *.md (any markdown file) │
│ Fields: date = "unknown", time = "00:00", sessionName = filename │
│ │
└───────────────────────────────────────────────────────────────────────┘
Pattern Disambiguation Matrix
┌──────────────────────────────────────────────────────────────────┐
│ MUTUAL EXCLUSIVITY ANALYSIS │
├──────────────────────────────────────────────────────────────────┤
│ │
│ CRITICAL: Pattern order ensures most specific matches first │
│ │
│ Pattern 1: 6 digit groups + trailing name │
│ ↳ MOST SPECIFIC (requires 6 digits AND name) │
│ │
│ Pattern 2: 6 digit groups, NO trailing name │
│ ↳ Can't match Pattern 1 (no trailing content) │
│ │
│ Pattern 3: 5 digit groups + trailing name │
│ ↳ Pattern 1 MUST match first (has extra group) │
│ │
│ Pattern 4: 3 digit groups + trailing name │
│ ↳ Pattern 3 MUST match first (more groups) │
│ │
│ Pattern 5: Starts with single digit prefix (not YYYY) │
│ ↳ UNIQUE: Other patterns start with 4-digit year │
│ │
│ Pattern 6: Any remaining .md file (fallback) │
│ ↳ Only reached if patterns 1-5 fail │
│ │
└──────────────────────────────────────────────────────────────────┘
Pattern Match Flow
┌───────────────────────────────────────────────────────────────────────┐
│ PATTERN MATCHING DECISION TREE │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ Input: filename.md │
│ │ │
│ ▼ │
│ ┌───────────────────────────────┐ │
│ │ Has 6 digit groups + name? │ │
│ └───────────────┬───────────────┘ │
│ ┌───────┴───────┐ │
│ │ │ │
│ YES NO │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────────────┐ │
│ │ PATTERN 1 │ │ Has 6 groups only? │ │
│ │ Return │ └──────────┬───────────┘ │
│ └──────────────┘ ┌───────┴───────┐ │
│ │ │ │
│ YES NO │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────┐ ┌──────────────────────┐ │
│ │ PATTERN 2 │ │ Has 5 groups+name? │ │
│ │ Return │ └──────────┬───────────┘ │
│ └──────────────┘ ┌───────┴───────┐ │
│ │ │ │
│ YES NO │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────────┐ [Continue...] │
│ │ PATTERN 3 │ │
│ │ Return │ │
│ └──────────────┘ │
│ │
│ ... Pattern 4, 5, 6 follow same cascading logic ... │
│ │
└───────────────────────────────────────────────────────────────────────┘
Part 2: WikiProveViewer Status Tracking
3-Level Directory Hierarchy
WikiProveViewer parses a strict 3-level proof structure:┌──────────────────────────────────────────────────────────────────┐
│ PROVE DIRECTORY STRUCTURE │
├──────────────────────────────────────────────────────────────────┤
│ │
│ prove/ │
│ │ │
│ └── {TOPIC_SLUG}/ ← LEVEL 1: Topic │
│ │ │
│ ├── VERIFICATION-SUMMARY.md │
│ │ │
│ ├── THREAD-A-CLAIMS/ ← LEVEL 2: Thread │
│ │ │ │
│ │ ├── CLAIM-01-{name}/ ← LEVEL 3: Claim │
│ │ │ ├── 01-CLAIM-DEFINITION.md │
│ │ │ ├── 02-ENTRY-POINTS.md │
│ │ │ ├── 03-CODE-GRAPH.md │
│ │ │ ├── 04-GAPS-ANALYSIS.md ← Gap counting │
│ │ │ └── 05-VERDICT.md ← Status inference │
│ │ │ │
│ │ ├── CLAIM-02-{name}/ │
│ │ └── README.md │
│ │ │
│ ├── THREAD-B-CLAIMS/ │
│ └── THREAD-C-CLAIMS/ │
│ │
└──────────────────────────────────────────────────────────────────┘
Complete Loading Flow
┌───────────────────────────────────────────────────────────────────────┐
│ LOADING FLOW │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ loadProofTopics() │
│ │ │
│ ├──→ loadDocuments() │
│ │ └──→ IPC: list_documents │
│ │ Returns: Topic directories │
│ │ │
│ ├──→ Filter: isDirectory = true │
│ │ │
│ └──→ FOR each topicDir: │
│ │ │
│ └──→ loadTopicClaims(topicDir) │
│ │ │
│ ├──→ IPC: list_documents │
│ │ Returns: Topic contents │
│ │ │
│ └──→ Match: THREAD-[A-Z]-CLAIMS │
│ FOR each thread: │
│ │ │
│ └──→ loadThread(item) │
│ │ │
│ ├──→ IPC: list_documents │
│ │ Returns: Claims in thread │
│ │ │
│ └──→ Match: CLAIM-NN-* │
│ FOR each claim: │
│ │ │
│ └──→ parseClaimDirectory() │
│ │ │
│ ├── Find verdict document │
│ ├── Find gaps document │
│ ├── Count gaps │
│ └── Infer status │
│ │
└───────────────────────────────────────────────────────────────────────┘
Status Inference Logic
┌───────────────────────────────────────────────────────────────────────┐
│ STATUS INFERENCE ALGORITHM │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ INPUT: │
│ ├── verdictPath: path to verdict document (or null) │
│ └── gapsCount: number of gaps found │
│ │
│ RULES: │
│ 1. No verdict document? → PENDING │
│ 2. Verdict empty/unreadable? → PENDING │
│ 3. Contains "q.e.d" or "proven"? │
│ ├── gapsCount > 0? → PARTIAL │
│ └── gapsCount = 0? → PROVEN │
│ 4. Contains "refuted"? → REFUTED │
│ 5. Otherwise: │
│ ├── gapsCount > 0? → PARTIAL │
│ └── gapsCount = 0? → PENDING │
│ │
└───────────────────────────────────────────────────────────────────────┘
Status Decision Tree
┌─────────────────────┐
│ verdictPath exists? │
└──────────┬──────────┘
│
┌───────────────┴───────────────┐
│ │
▼ ▼
[NO] [YES]
│ │
▼ ▼
┌──────────┐ ┌─────────────────────┐
│ PENDING │ │ Load verdict content│
└──────────┘ └──────────┬──────────┘
│
┌───────────────────────┴───────────────┐
│ │
▼ ▼
┌─────────────────────────┐ ┌─────────────────────┐
│ includes "q.e.d" OR │ │ includes "refuted"? │
│ includes "proven"? │ │ │
└────────────┬────────────┘ └──────────┬──────────┘
│ │
┌───────────────┴───────────────┐ │
│ │ ▼
▼ ▼ ┌──────────┐
[YES] [NO] │ REFUTED │
│ │ └──────────┘
▼ │
┌─────────────────┐ │
│ gapsCount > 0? │ │
└────────┬────────┘ │
│ │
┌───────┴───────┐ ▼
│ │ ┌─────────────────┐
▼ ▼ │ gapsCount > 0? │
[YES] [NO] └────────┬────────┘
│ │ │
▼ ▼ ┌───────┴───────┐
┌──────────┐ ┌──────────┐ │ │
│ PARTIAL │ │ PROVEN │ ▼ ▼
└──────────┘ └──────────┘[YES] [NO]
│ │
▼ ▼
┌──────────┐ ┌──────────┐
│ PARTIAL │ │ PENDING │
└──────────┘ └──────────┘
Gap Counting
┌───────────────────────────────────────────────────────────────────────┐
│ GAP COUNTING MECHANISM │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ INPUT: Path to gaps document (04-GAPS-ANALYSIS.md) │
│ │
│ ALGORITHM: │
│ 1. Load document content │
│ 2. Search for pattern: GAP-NNN (case insensitive) │
│ 3. Count all unique matches │
│ 4. Return count (or 0 if no matches/errors) │
│ │
│ EXAMPLES: │
│ "GAP-001: Missing test" → Count: 1 │
│ "GAP-001, GAP-002" → Count: 2 │
│ "No gaps identified" → Count: 0 │
│ │
└───────────────────────────────────────────────────────────────────────┘
Statistics Aggregation
┌───────────────────────────────────────────────────────────────────────┐
│ STATISTICS AGGREGATION CHAIN │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ LEVEL 1: Claim │
│ ───────────────── │
│ status = inferClaimStatus(verdictPath, gapsCount) │
│ │
│ LEVEL 2: Thread │
│ ───────────────── │
│ claims = [Claim, Claim, ...] │
│ │
│ LEVEL 3: Topic │
│ ───────────────── │
│ allClaims = flatMap(threads → claims) │
│ provenClaims = filter(status = "proven").length │
│ refutedClaims = filter(status = "refuted").length │
│ │
│ LEVEL 4: Global │
│ ───────────────── │
│ totalClaims = sum(topics → totalClaims) │
│ provenClaims = sum(topics → provenClaims) │
│ refutedClaims = sum(topics → refutedClaims) │
│ pendingClaims = totalClaims - provenClaims - refutedClaims │
│ │
└───────────────────────────────────────────────────────────────────────┘
Visual Status Mapping
┌───────────────────────────────────────────────────────────────────────┐
│ 4-STATUS VISUAL SYSTEM │
├───────────────────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PROVEN │ │
│ │ ──────── │ │
│ │ Icon: ✓ (check circle) │ │
│ │ Label: "Q.E.D" │ │
│ │ Color: Green (success) │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ REFUTED │ │
│ │ ──────── │ │
│ │ Icon: ✗ (package) │ │
│ │ Label: "REFUTED" │ │
│ │ Color: Red (danger) │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PARTIAL │ │
│ │ ──────── │ │
│ │ Icon: ↻ (refresh) │ │
│ │ Label: "PARTIAL" │ │
│ │ Color: Yellow (warning) │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────────────────────┐ │
│ │ PENDING │ │
│ │ ──────── │ │
│ │ Icon: ↻ (refresh) │ │
│ │ Label: "PENDING" │ │
│ │ Color: Gray (secondary) │ │
│ └─────────────────────────────────────────────────────────────────┘ │
│ │
└───────────────────────────────────────────────────────────────────────┘
Summary
╔═══════════════════════════════════════════════════════════════╗
║ CHAPTER SUMMARY ║
╠═══════════════════════════════════════════════════════════════╣
║ ║
║ FILENAME PARSER ║
║ ─────────────── ║
║ • 6 distinct patterns for historical file formats ║
║ • Most-specific-first matching cascade ║
║ • 100% coverage of 1,889+ OnIt session files ║
║ • Fallback ensures no .md file is rejected ║
║ ║
║ WIKIPROVEVIEWER ║
║ ──────────────── ║
║ • 3-level hierarchy: Topic → Thread → Claim ║
║ • Status inference from verdict keywords ║
║ • Gap counting from analysis documents ║
║ • Statistics aggregation at all levels ║
║ • 4-status visual system with distinct icons/colors ║
║ ║
╚═══════════════════════════════════════════════════════════════╝
Next Steps
Explore Diff & Commit Viewers for code change visualization.