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

  1. Settings — set OPENROUTER_KEY (Space secret or UI). Optional: KIMI_KEY, HF_TOKEN.
  2. Mode — pick weave | quant | memory | docupack. Toggle Consult Council of Advisors (ON = slower/richer).
  3. Type in Your Request → click WEAVE.
  4. 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

  1. Create a new Space (Gradio SDK)
  2. Upload all .py files + requirements.txt
  3. Set secrets: OPENROUTER_KEY, KIMI_KEY, HF_KEY
  4. 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_runs schema
  • ✅ 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)

  1. Proposer Module — Automated harness mutation based on episode analysis
  2. Deliverable Landing Gate — Deterministic file placement (biggest Meta-Harness gain)
  3. Pattern Similarity Search — Vector embeddings on patterns.embedding_vector
  4. Engram 6-Layer Capture — Full consciousness-state recording
  5. Therium Quantization Mode — DaveQuant/RotoQuant/PythagoreanQuant integration
  6. 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
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support