Skip to main content

The Core Philosophy

The Work-Wiki system exists for one fundamental purpose:
╔═══════════════════════════════════════════════════════════════════════════════╗
║                                                                               ║
║  THE CENTER                                                                   ║
║                                                                               ║
║  Building an environment where the Human ◈ AI feedback loop can operate       ║
║                                                                               ║
╚═══════════════════════════════════════════════════════════════════════════════╝
This is NOT about:
  • Measuring AI contribution percentages
  • Authorship/Copyright attribution
  • Agent-level statistics breakdown
  • “Who wrote this line?”
This IS about:
  • Making AI work visible to humans
  • Presenting information in understandable form
  • Enabling efficient human response and direction
  • Creating the possibility of Human ◈ AI unity

The Three Elements

┌─────────────────────────────────────────────────────────────────────────────────┐
│  THE THREE ELEMENTS OF THE LOOP                                                 │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│                    ┌─────────────────────────────────────┐                      │
│                    │         THE CENTER                  │                      │
│                    │   Human ◈ AI Feedback Loop          │                      │
│                    └──────────────┬──────────────────────┘                      │
│                                   │                                             │
│           ┌───────────────────────┼───────────────────────┐                     │
│           │                       │                       │                     │
│           ▼                       ▼                       ▼                     │
│   ┌───────────────────┐   ┌───────────────────┐   ┌───────────────────┐         │
│   │                   │   │                   │   │                   │         │
│   │   TRANSPARENCY    │──▶│   VISUALIZATION   │──▶│    FEEDBACK       │         │
│   │                   │   │                   │   │                   │         │
│   │   AI work is      │   │   Human can       │   │   Human can       │         │
│   │   visible         │   │   understand      │   │   respond via     │         │
│   │                   │   │                   │   │   prompt          │         │
│   └───────────────────┘   └───────────────────┘   └───────────────────┘         │
│           │                                                   │                 │
│           │                                                   │                 │
│           └───────────────────────────────────────────────────┘                 │
│                                    LOOP                                         │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘
In three words: Transparency → Visualization → Feedback

Relationship to Monokinetics

┌─────────────────────────────────────────────────────────────────────────────────┐
│  MONOKINETICS FRAMING                                                           │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   Wrong framing:                                                                │
│   ──────────────                                                                │
│       "AI authorship problem exists" ──▶ Work-Wiki solves it                    │
│       (Problem ──▶ Solution frame)                                              │
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │                                                                         │   │
│   │   Correct framing:                                                      │   │
│   │   ────────────────                                                      │   │
│   │       Work-Wiki provides AI work transparency                           │   │
│   │           │                                                             │   │
│   │           ▼                                                             │   │
│   │       Human can see, understand, and respond                            │   │
│   │           │                                                             │   │
│   │           ▼                                                             │   │
│   │       Feedback loop becomes possible                                    │   │
│   │           │                                                             │   │
│   │           ▼                                                             │   │
│   │       Human ◈ AI operates as ONE motion                                 │   │
│   │           │                                                             │   │
│   │           ▼                                                             │   │
│   │       Monokinetics is achieved                                          │   │
│   │                                                                         │   │
│   │       (Precondition ──▶ Possibility frame)                              │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
│   ════════════════════════════════════════════════════════════════════════════  │
│                                                                                 │
│   Transparency is not a solution to a problem.                                  │
│   Transparency is a precondition for unity.                                     │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

System Architecture

The Work-Wiki system spans three distinct layers:
┌─────────────────────────────────────────────────────────────────────────────────┐
│                     WORK-WIKI THREE-LAYER ARCHITECTURE                          │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │                         LAYER 1: DATA CAPTURE                           │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Rust Backend                                                          │   │
│   │   ├── File save detection                                               │   │
│   │   ├── Diff calculation                                                  │   │
│   │   ├── AI session attribution                                            │   │
│   │   └── SQLite storage                                                    │   │
│   │                                                                         │   │
│   │   Tables:                                                               │   │
│   │   ├── file_diffs (V1 + V2 columns)                                      │   │
│   │   ├── ai_sessions                                                       │   │
│   │   └── commit_work_mapping                                               │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                     │                                           │
│                                     ▼                                           │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │                         LAYER 2: DATA RETRIEVAL                         │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   6 Tauri Commands:                                                     │   │
│   │   ├── work_wiki_record_with_ai_context                                  │   │
│   │   ├── work_wiki_link_to_commit                                          │   │
│   │   ├── work_wiki_get_pre_commit_changes                                  │   │
│   │   ├── work_wiki_get_ai_attribution                                      │   │
│   │   ├── work_wiki_draft_branch_preview                                    │   │
│   │   └── work_wiki_get_commit_work_counts                                  │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                     │                                           │
│                                     ▼                                           │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │                         LAYER 3: VISUALIZATION                          │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   TypeScript Frontend Components:                                       │   │
│   │   ├── GitBlameViewer      - Line-level attribution                      │   │
│   │   ├── GitDiffViewer       - Hunk-level attribution                      │   │
│   │   └── GitBranchDiagramViewer - Commit-level graph                       │   │
│   │                                                                         │   │
│   │   Visual Elements:                                                      │   │
│   │   ├── 4-Tier Color System (green/yellow/accent/purple)                  │   │
│   │   ├── Micro-Save Badges                                                 │   │
│   │   ├── Draft Nodes (half-moon)                                           │   │
│   │   └── AI Attribution Tooltips                                           │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Data Flow

┌─────────────────────────────────────────────────────────────────────────────────┐
│                         WORK-WIKI DATA FLOW                                     │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   1. CAPTURE PHASE                                                              │
│   ───────────────                                                               │
│                                                                                 │
│       ┌──────────────────┐                                                      │
│       │  File Save Event │                                                      │
│       └────────┬─────────┘                                                      │
│                │                                                                │
│                ▼                                                                │
│       ┌────────────────────────────────────────────┐                            │
│       │  work_wiki_record_with_ai_context()        │                            │
│       │  ├── Calculate diff                        │                            │
│       │  ├── Check for AI session context          │                            │
│       │  ├── Dedup check (prevent duplicate saves) │                            │
│       │  └── INSERT into file_diffs                │                            │
│       │       │                                    │                            │
│       │       │  committed_hash = NULL             │                            │
│       │       │  (uncommitted state)               │                            │
│       └───────┬────────────────────────────────────┘                            │
│               │                                                                 │
│               ▼                                                                 │
│       ┌──────────────────┐                                                      │
│       │ file_diffs table │                                                      │
│       └──────────────────┘                                                      │
│                                                                                 │
│   2. COMMIT PHASE                                                               │
│   ────────────────                                                              │
│                                                                                 │
│       ┌──────────────────────┐                                                  │
│       │  Git Commit Detected │                                                  │
│       └──────────┬───────────┘                                                  │
│                  │                                                              │
│                  ▼                                                              │
│       ┌────────────────────────────────────────────────────────────────┐        │
│       │  work_wiki_link_to_commit()                                    │        │
│       │  ├── Find uncommitted diffs                                    │        │
│       │  ├── UPDATE committed_hash = new_commit_hash                   │        │
│       │  └── INSERT into commit_work_mapping                           │        │
│       └────────────────────────────────────────────────────────────────┘        │
│                                                                                 │
│   3. RETRIEVAL PHASE                                                            │
│   ──────────────────                                                            │
│                                                                                 │
│       ┌───────────────────────┐                                                 │
│       │  User Opens Git View  │                                                 │
│       └───────────┬───────────┘                                                 │
│                   │                                                             │
│       ┌───────────┴───────────┬─────────────────────┐                           │
│       │                       │                     │                           │
│       ▼                       ▼                     ▼                           │
│   ┌───────────────┐   ┌───────────────┐   ┌─────────────────────┐               │
│   │ work_wiki_    │   │ work_wiki_    │   │ work_wiki_draft_    │               │
│   │ get_ai_       │   │ get_commit_   │   │ branch_preview()    │               │
│   │ attribution() │   │ work_counts() │   │                     │               │
│   └───────┬───────┘   └───────┬───────┘   └──────────┬──────────┘               │
│           │                   │                      │                          │
│           ▼                   ▼                      ▼                          │
│   Frontend Visualization                                                        │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

The Four-Tier Color System

Work-Wiki uses a consistent 4-tier color coding system across all visualization components:
┌─────────────────────────────────────────────────────────────────────────────────┐
│                         4-TIER COLOR SYSTEM                                     │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │  TIER 1: HUMAN-DOMINANT (0-25% AI)                                      │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Color:    Green                                                       │   │
│   │   Meaning:  Predominantly human work                                    │   │
│   │   Visual:   [████████████████████████████████████████] 0-25%            │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │  TIER 2: BALANCED-HUMAN (26-50% AI)                                     │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Color:    Yellow/Orange                                               │   │
│   │   Meaning:  Mixed contribution, human-leaning                           │   │
│   │   Visual:   [████████████████████████████████████████] 26-50%           │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │  TIER 3: BALANCED-AI (51-75% AI)                                        │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Color:    Accent Purple                                               │   │
│   │   Meaning:  Mixed contribution, AI-leaning                              │   │
│   │   Visual:   [████████████████████████████████████████] 51-75%           │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │  TIER 4: AI-DOMINANT (76-100% AI)                                       │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Color:    Purple                                                      │   │
│   │   Meaning:  Predominantly AI work                                       │   │
│   │   Visual:   [████████████████████████████████████████] 76-100%          │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Three Visualization Components

┌─────────────────────────────────────────────────────────────────────────────────┐
│                     THREE VISUALIZATION COMPONENTS                              │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │  COMPONENT 1: GitBlameViewer                                            │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Granularity:  LINE-LEVEL                                              │   │
│   │   View:         Who wrote each line?                                    │   │
│   │   AI Extension: AI attribution per commit line                          │   │
│   │                                                                         │   │
│   │   ┌─────┬────────────┬────────┬───────────────────────────────────┐     │   │
│   │   │ AI% │ Author     │ Time   │ Line Content                      │     │   │
│   │   ├─────┼────────────┼────────┼───────────────────────────────────┤     │   │
│   │   │ 67% │ Claude     │ 2h ago │ export function authenticate() {  │     │   │
│   │   │ 67% │ Claude     │ 2h ago │   const token = getToken();       │     │   │
│   │   │  0% │ John       │ 3d ago │   // Human-written comment        │     │   │
│   │   └─────┴────────────┴────────┴───────────────────────────────────┘     │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │  COMPONENT 2: GitDiffViewer                                             │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Granularity:  HUNK-LEVEL                                              │   │
│   │   View:         What changed in each hunk?                              │   │
│   │   AI Extension: AI attribution per diff hunk                            │   │
│   │                                                                         │   │
│   │   @@ -1,5 +1,8 @@ function authenticate() {           [AI: 75%]         │   │
│   │   +import { validateToken } from './auth';                              │   │
│   │   +import { refreshToken } from './refresh';                            │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
│   ┌─────────────────────────────────────────────────────────────────────────┐   │
│   │  COMPONENT 3: GitBranchDiagramViewer                                    │   │
│   ├─────────────────────────────────────────────────────────────────────────┤   │
│   │                                                                         │   │
│   │   Granularity:  COMMIT-LEVEL                                            │   │
│   │   View:         Branch history with micro-saves                         │   │
│   │   AI Extension: Micro-save badges + Draft nodes                         │   │
│   │                                                                         │   │
│   │     o abc1234  feat: add login     2h ago  [15]                         │   │
│   │     |\                                                                  │   │
│   │     | o def5678  fix: auth bug     3h ago  [7]                          │   │
│   │     |/                                                                  │   │
│   │     o ghi9012  HEAD               5h ago  [1]                           │   │
│   │     :                                                                   │   │
│   │     ◐ DRAFT  3 files | +145 -23   [AI] 8  [H] 4                         │   │
│   │                                                                         │   │
│   └─────────────────────────────────────────────────────────────────────────┘   │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘

Key Technical Patterns

Two-Phase Rendering

All viewers use a non-blocking two-phase rendering pattern:
┌─────────────────────────────────────────────────────────────────────────────────┐
│                     TWO-PHASE RENDERING PATTERN                                 │
├─────────────────────────────────────────────────────────────────────────────────┤
│                                                                                 │
│   Phase 1: Immediate Render (Core Data)                                         │
│   ─────────────────────────────────────────                                     │
│                                                                                 │
│       loadData() {                                                              │
│           this.coreData = await invoke('git_blame', ...);                       │
│           this.render();  // <-- Immediate: user sees data fast                 │
│       }                                                                         │
│                                                                                 │
│       │ t=50ms (user sees data)                                                 │
│       ▼                                                                         │
│                                                                                 │
│   Phase 2: Enhancement (AI Attribution)                                         │
│   ─────────────────────────────────────                                         │
│                                                                                 │
│       loadData() {                                                              │
│           // ... Phase 1 ...                                                    │
│           this.fetchWorkWikiAttributions(...).then(() => {                      │
│               this.render();  // <-- Deferred: AI data added                    │
│           });                                                                   │
│       }                                                                         │
│                                                                                 │
│       │ t=150ms (AI indicators appear)                                          │
│       ▼                                                                         │
│                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────┘
Benefits:
  • Core view appears in < 100ms
  • AI attribution loads async
  • No blocking on Work-Wiki data
  • Graceful degradation if Work-Wiki unavailable

Map-Based O(1) Caching

All viewers use Map-based caching for O(1) lookups:
ViewerCache PropertyKey Format
GitBlameVieweraiAttributionCachecommit_hash
GitDiffViewerhunkAttributionsfilePath:hunkIndex
GitBranchDiagramViewercommitWorkCountscommit_hash

THE CENTER

╔═══════════════════════════════════════════════════════════════════════════════╗
║                                                                               ║
║  THE CENTER IN ONE BOX                                                        ║
║                                                                               ║
╠═══════════════════════════════════════════════════════════════════════════════╣
║                                                                               ║
║  WHAT:     Human ◈ AI feedback loop environment                               ║
║                                                                               ║
║  HOW:      Transparency --> Visualization --> Feedback --> LOOP               ║
║                                                                               ║
║  WHY:      For Monokinetics to be possible                                    ║
║                                                                               ║
║  NOT:      Measuring percentages, solving authorship problems                 ║
║                                                                               ║
╚═══════════════════════════════════════════════════════════════════════════════╝

Key Architectural Principles

  • Non-blocking UI: Two-phase rendering
  • O(1) lookups: Map-based caching
  • Consistent UX: 4-tier color system
  • Unique identification: hunkMeta coordinates
  • Graceful degradation: Async AI attribution
  • Extensible schema: V2 migration pattern