Unclassified
Current Surface-Binding Doctrine
Current Surface-Binding Doctrine
- Operational Workbench = the primary work surface; left sidebar nav; Twin sidebar pops out when needed.
- Twin Workbench = full AI ecosystem surface (skills, knowledge, agents, prompts, conversational library).
- Governance is embedded at every layer — not a separate workbench.
- OpenWebUI is not the customer-facing product shell.
- Twin / OpenWebUI runtime surfaces use the canonical Forest + Paper system language.
- Midnight Executive is investor-deck / fundraising language only.
Use older L1/L2 / workspace / knowledge-UI language in this file through that boundary if any historical phrasing remains.
Flow C: AI Memory & Triage
Principle
Flow C (AI reasoning) NEVER writes directly to Spine. All AI-generated content goes through triage → governance review → approved knowledge. Only approved content feeds Entity 360.
Architecture
AI Source (MCP, OpenAI, Claude, Moonshot)
↓
D1 Buffer (flow_c_config rules)
↓
Triage Bot (Workers AI extraction)
↓
┌─────────────┐
│ Auto-approve │ ← High confidence + trusted source
│ HITL Review │ ← Low confidence or new source
│ Reject │ ← Below threshold
└─────────────┘
↓
Triage Bot review → approved knowledge
↓
Entity 360 Memory Layer → Twin Triggers
Flow C Config
Each tenant has a flow_c_config in D1:
interface FlowCConfig {
auto_approve_sources: string[]; // e.g. ["claude", "system"]
min_confidence: number; // 0-1, default 1.0 (all to HITL)
max_auto_approve_per_day: number; // rate limit
require_entity_link: boolean; // must link to entity
notifications: {
slack_webhook_url?: string;
notify_on_auto_approve: boolean;
notify_on_triage: boolean;
};
}
Triage Bot
Located in services/knowledge/src/triage-bot.ts:
- Receives content from D1 buffer
- Uses Workers AI (Llama 3.1 8B) for extraction
- Extracts: entities mentioned, sentiment, key facts, action items
- Scores confidence based on extraction quality
- Routes based on flow_c_config rules
Memory Consolidation
The Knowledge service consolidates memories via Durable Object (MemoryConsolidator):
- Sessions accumulate in D1
- Consolidator runs periodically (or on-demand via
/v1/triage/run) - Extracts patterns across sessions
- Creates
consolidated_memoriesrecords - Types: decision, preference, insight, action, rule, fact
Entity 360 Integration
Entity 360 Memory layer fetches from:
GET /v1/memories?entity_id=Xon Knowledge service- Falls back to Spine DB
ai_memoriestable - Twin trigger
memory_conflictdetects low-confidence decisions
Twin Memory Triggers
- memory_conflict: 2+ low-confidence decisions → "Review memories"
- context_gap: High-value account with 0 context items → "Connect integrations"