ARCHITECTURE
—TR-2025-08
Adaptive Cognition Layer Pipeline
The ACL orchestrates ten sequential components that transform user input into contextualized responses through intent classification, memory retrieval, reasoning routing, safety validation, and model selection.
10
Pipeline Stages
96.7%
Local Routing Success
94%
Hallucination Detection
0.73
Confidence Correlation
COGNITIVE PIPELINE
Intent Classifier
Categorizes user input by intent type: question, task, conversation, action request. Maps intent clusters for pattern analysis.
OUTPUTS
- →Intent type
- →Intent clusters
- →Routing signals
Context Engine
Builds app context from workspace state. Integrates active projects, tasks, notes via Contextual Priority System (CPS).
OUTPUTS
- →CPS weights: recency(0.3), frequency(0.25), connections(0.25)
- →Workspace objects
Workspace Memory
Retrieves relevant workspace items via RecallIndexEntry. Surfaces items with emotional snapshots (valence, tone, intensity).
OUTPUTS
- →Recall entries
- →Emotional snapshots
- →Importance scores
Long-term Memory
Accesses conversation history and semantic memory. DBSCAN clustering for theme discovery across sessions.
OUTPUTS
- →Memory graph clusters
- →Cross-conversation patterns
- →Narrative coherence
Reasoning Layer
Routes complex queries to Python brain modules. Triggers on: query length >80 chars, analytical patterns, explicit reasoning signals.
OUTPUTS
- →Reasoning chains
- →Module routing
- →Depth metrics
Safety Layer
Validates responses for hallucinations and factual accuracy. Performs recall-based fact verification against workspace knowledge.
OUTPUTS
- →Hallucination flags
- →Fact verification
- →Confidence signals
Personality + Style
Adapts response tone via StyleAnalyzer and ARTE. Matches user typing patterns, energy levels, and formality.
OUTPUTS
- →Tone calibration
- →Style signals
- →Personality adaptation
Response Construction
Builds full prompt with all context layers. Integrates workspace context, memory, conversation history, and cognitive metrics.
OUTPUTS
- →Assembled prompt
- →Context integration
- →System state
Confidence Scoring
Calculates self-aware confidence metrics (0.0-1.0). Based on recall quality, context freshness, and intent signals.
OUTPUTS
- →Confidence score
- →Certainty indicators
- →Transparency metrics
HybridBridge Routing
Selects optimal model (local/cloud/hybrid). Implements stickiness, casual detection, and thinking mode activation.
OUTPUTS
- →Model selection
- →Routing decision
- →Inference path
MEMORY SYSTEMS
Workspace Memory
RecallIndexEntry tracks all workspace objects with emotional snapshots. 78% hit rate for relevant workspace items.
Long-term Memory
Memory Graph with DBSCAN clustering. 82% accuracy for theme discovery across conversations.
MODEL ROUTING
Local-First
Privacy-preserving operation via Ollama. 96.7% local routing success rate.
Default: qwen3:1.7b
Cloud Fallback
Automatic failover to cloud on local errors. 94.2% cloud routing success.
Cloud: gpt-oss:20b
Model Stickiness
Maintains same model for 3 consecutive turns to ensure consistency.
Health TTL: 5 minutes