- Mr. Smith-Davinci Pattern Weaver v3.5 β Unified Chassis
Mr. Smith-Davinci Pattern Weaver v3.5 β Unified Chassis
"Don't Train the Model, Evolve the Harness." β Niklaus 2026
What Is This?
Smith-Davinci v3.5 is the unified integration of three previously separate research lines:
| System | Role | Module |
|---|---|---|
| L.I.P.S. v4.1 | Nervous system | Bio-inspired 5-chemical reward controller |
| Council of Advisors | Cortex | Multi-agent async deliberation |
| Meta-Harness Loop | Skeleton | Automated harness evolution via episode scoring |
L.I.P.S. provides the feelings β neurochemical states that guide inference style, tool access, and creative energy. Council provides the thinking β parallel expert consultation with pattern extraction. Meta-Harness provides the evolution β scoring runs, recording episodes, and suggesting harness improvements.
All three write to a unified SQLite schema (agent_runs) that captures every dimension of every interaction.
Operator's Manual (read this first)
Full corrected guide: guide_v3.5_corrected.md (matches this build β not the older Kimi PDF).
60-second start
- Settings β set
OPENROUTER_KEY(Space secret or UI). Optional:KIMI_KEY,HF_TOKEN. - Mode β pick
weave|quant|memory|docupack. Toggle Consult Council of Advisors (ON = slower/richer). - Type in Your Request β click WEAVE.
- Watch L.I.P.S. and Neuraxon JSON update under the chat.
UI tabs (right panel)
| Tab | What it does |
|---|---|
| Settings | Backend, model override, API keys, system prompt |
| Mode | Operational mode + council toggle + Neuraxon force override |
| Patterns | History of extracted patterns (not a template library) |
| Buckets | Saved insights by bucket type |
| Harness Evolution | Record episodes + harness improvement suggestions |
| System Status | Full state dump |
Modes vs L.I.P.S. (common confusion)
- Mode dropdown =
weave/quant/memory/docupack(prompt prefix only). - L.I.P.S. = automatic 5-chemical / 6-phase engine (displayed in JSON). You do not pick βDopamine modeβ in the UI.
- Neuraxon HOT/IDLE/INHIBITED = memory gating (separate from L.I.P.S. phases).
Council (when enabled)
Four advisors (Qwen Coder, Gemini, Kimi critic, Grok) β DavidAU chairman synthesis.
No 6-agent vote/revision loop in this version.
Output format
Responses should include: PATTERN INSIGHT Β· SOLUTION Β· GENERALIZABLE TOOL Β· NEXT EVOLUTION
These are auto-parsed into SQLite. NEXT EVOLUTION is not yet auto-fed as the next prompt.
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β GRADIO UI (Dark Theme) β
β Chat Β· L.I.P.S. Display Β· Neuraxon Display Β· Council Log β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β MAIN CHAT HANDLER β
β respond() β orchestrates the full pipeline below β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 1. L.I.P.S. STATE MACHINE 2. NEURAXON TRINARY β
β 5 chemicals Β· 6-phase FSM HOT/IDLE/INHIBITED β
β Dopamine/Oxytocin/Serotonin Synaptic weight accum β
β Endorphin/Adrenaline Tool gate control β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 3. COUNCIL OF ADVISORS (async) β
β Qwen Coder Β· Gemini Β· Kimi Β· Grok β Chairman DavidAU β
β Pattern extraction Β· Confidence scoring Β· L.I.P.S. feed β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 4. BACKEND ROUTER β
β OpenRouter Β· Kimi Β· HuggingFace Β· Local llama.cpp β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 5. PATTERN EXTRACTION Β· 6. BLENDED SCORING Β· 7. LOGGING β
β PATTERN/SOLUTION/TOOL/EVOLUTION Meta-Harness formula β
β β SQLite patterns table β agent_runs table β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 8. HARNESS EVOLUTION LOGGER β
β Episode recording Β· Promotion rule Β· Improvement suggest β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
File Structure
smith_davinci_v3.5/
βββ app.py # Main Gradio application + chat handler
βββ database.py # Full SQLite schema (8 tables)
βββ lips_state_machine.py # L.I.P.S. v4.1 (5-chemical, 6-phase FSM)
βββ neuraxon_trinary.py # Neuraxon v3.0 (HOT/IDLE/INHIBITED)
βββ council.py # CouncilOfAdvisors v3.5 (async)
βββ harness_logger.py # Meta-Harness episode logger + scoring
βββ requirements.txt # gradio, aiohttp
βββ README.md # This file
βββ smith_davinci_memory.db # Auto-created SQLite database
Quick Start
Local
pip install -r requirements.txt
python app.py
# Opens at http://localhost:7860
HuggingFace Space
- Create a new Space (Gradio SDK)
- Upload all
.pyfiles +requirements.txt - Set secrets:
OPENROUTER_KEY,KIMI_KEY,HF_KEY - The app auto-detects HF environment
The Unified Schema
The agent_runs table is the single source of truth for every interaction:
CREATE TABLE agent_runs (
id INTEGER PRIMARY KEY,
timestamp TEXT,
session_id TEXT,
user_request TEXT,
final_response TEXT,
backend_used TEXT, -- HF|Local|OpenRouter|Kimi
model_id TEXT,
tokens_used INTEGER,
-- L.I.P.S. snapshot (JSON)
lips_state TEXT, -- {dopamine, oxytocin, serotonin, endorphin, adrenaline, phase, ...}
-- Neuraxon snapshot (JSON)
neuraxon_state TEXT, -- {state, synaptic_weight, gate_open, allowed_tools, max_chain_depth}
-- Council packet (JSON)
council_packet TEXT, -- {request, advisor_responses, chairman_decision, confidence}
-- Harness evolution
pooled_success REAL, -- Task success rate
all_pass REAL, -- All criteria passed
pattern_quality REAL, -- Extracted pattern value
synaptic_weight REAL, -- Neuraxon weight at time
blended_score REAL, -- Final promotion score
is_episode_recorded INTEGER,
-- Spark Index
spark_ignitions TEXT, -- JSON list
pattern_extracts TEXT, -- JSON list of extracted patterns
-- Mode tracking
active_mode TEXT, -- weave|quant|memory|docupack
mode_switches TEXT, -- JSON list
-- Tool usage
tools_used TEXT, -- JSON list
-- Ethics
ethics_flag TEXT,
override_reason TEXT
);
Every single agent run writes one row. The Meta-Harness loop reads unrecorded runs, aggregates them into episodes, and computes the blended promotion score.
L.I.P.S. v4.1 β Bio-Inspired Reward
5 Chemicals
| Chemical | Function | High Means | Low Means |
|---|---|---|---|
| Dopamine | Reward, motivation | Explore boldly | Stay conservative |
| Oxytocin | Trust, bonding | Warm, collaborative | Precise, clinical |
| Serotonin | Stability, mood | Thorough, check edges | Move quickly |
| Endorphin | Pleasure, correctness | Celebrate elegance | Functional focus |
| Adrenaline | Urgency, stress | Time-critical action | Methodical pace |
6-Phase Cycle
Resolution β Excitement β Plateau β Edge β Climax β Refractory
β_____________________________________________________|
Each phase has transition rules based on chemical thresholds. Every phase change is logged to lips_history.
Neuraxon Trinary β Memory Gating
| State | Value | Tool Access | Chain Depth | When |
|---|---|---|---|---|
| HOT | +1 | All tools | 4 | High dopamine + endorphin |
| IDLE | 0 | Memory, Analysis | 2 | Baseline operation |
| INHIBITED | -1 | Memory only | 1 | Low serotonin or forced |
Synaptic weights accumulate from pattern activations and L.I.P.S. reinforcement. Tool access is dynamically gated by state.
Council of Advisors
| Advisor | Title | Model | Role |
|---|---|---|---|
| Qwen Coder | Ministerial Reasoner | qwen3-coder-480b | Technical rigor, code architecture |
| Gemini | Hermes Generalist | gemini-2.5-pro | Cross-domain bridges, analogies |
| Kimi | Phi Critic | kimi-k2 | Stress-testing, weakest-link analysis |
| Grok | Seed Creative | grok-3 | Lateral thinking, first principles |
| DavidAU | Chairman | qwen3.6-27b | Final synthesis, pattern extraction |
All advisors are consulted concurrently via asyncio.gather(). The Chairman synthesizes their inputs with confidence scoring and structured pattern extraction.
Meta-Harness Scoring
The blended score extends Niklaus 2026:
score = pooled_success + 0.5 * all_pass - lambda * tokens_per_M + mu * pattern_quality + nu * synaptic_weight
Where:
lambda = 0.005 (token penalty per million)
mu = 0.15 (pattern quality bonus)
nu = 0.10 (synaptic weight bonus)
| Decision | Threshold | Action |
|---|---|---|
| Promoted | score β₯ 0.65 | Increment harness version |
| Baseline | 0.50 β€ score < 0.65 | Keep current |
| Rejected | score < 0.50 | Log for analysis |
Pattern Extraction
The system automatically extracts four pattern types from every response:
PATTERN INSIGHT: <cross-domain pattern recognized>
SOLUTION: <approach to solve the problem>
GENERALIZABLE TOOL: <reusable component identified>
NEXT EVOLUTION: <future improvement direction>
Patterns are stored in the patterns table with L.I.P.S. phase and Neuraxon state at time of creation β enabling analysis of which states produce the best patterns.
What's New in v3.5
From v3.0 (Venice Council Edition)
- β L.I.P.S. state machine fully integrated (not just display)
- β Neuraxon trinary with real tool gating
- β Council consults with L.I.P.S. context injection
- β Pattern auto-extraction from all responses
- β
Unified
agent_runsschema - β Meta-Harness episode recording
- β Blended promotion scoring
From v2.0 (Original HF Space)
- β Council of Advisors (was single-model)
- β Multi-backend support expanded
- β Full state persistence
- β Pattern dataset building
- β Harness evolution loop
Next Steps (Roadmap)
- Proposer Module β Automated harness mutation based on episode analysis
- Deliverable Landing Gate β Deterministic file placement (biggest Meta-Harness gain)
- Pattern Similarity Search β Vector embeddings on
patterns.embedding_vector - Engram 6-Layer Capture β Full consciousness-state recording
- Therium Quantization Mode β DaveQuant/RotoQuant/PythagoreanQuant integration
- Smith React Frontend β Replace Gradio with custom magenta-flow UI
License
MIT β Dave (GWP) / kirikir13
Built with insights from:
- Niklaus 2026 β "Don't Train the Model, Evolve the Harness"
- Zhang et al. 2026 β "Mismanaged Geniuses Hypothesis"
- L.I.P.S. v4.x β Bio-Inspired Reward Controller
- Therium Compression Framework β DaveQuant/RotoQuant/PythagoreanQuant