Honest snapshot anchored on the head-of-api status file last updated 2026-05-24 13:00 UTC, plus what's verifiable today.
| Source | Status | Est. share | Cheapest fix |
|---|---|---|---|
| This long Claude Code session (Opus 4.7) | live | ~50% | Switch to Sonnet 4.6 for non-architecture work · cap turns/session |
| Agent dispatches (overnight + control surface builds) | live but rare | ~20% | Don't dispatch Agents for work I can do myself |
| D⁴ chain on each prompt | live, cap N=2 | ~15% | Route mental-model skills to Haiku instead of Sonnet |
| Wiki-update headless run (caught + killed) | stopped | ~5% | Already stopped |
| Misc deploys, MCPs, watchdog ticks | low | ~10% | Trivial · keep as-is |
Plain English. Every system-wide change between 2026-05-23 and 2026-05-25, with what it costs to run.
~/.openclaw/bin/phone-steve-cc-bridge.py (lessons.md 2026-05-21).control-surface.vercel.app.control-surface-v3.vercel.app.cc.thomasdigital.com. This is the current surface.custody.thomasdigital.com.Best-effort allocation of the ~$2,037 list-price-equiv 24h burn. Anthropic doesn't show per-feature breakdown via API, so this is reasoned from request types + my session knowledge.
| Lever | Cost cut | Quality cost | How fast |
|---|---|---|---|
| Stop using Opus 4.7 unless task is architecture / strategy | ~50% | Low (Sonnet 4.6 is >90% as good for execution) | Now |
| Don't dispatch Agents for work I can do directly | ~15% | None (just self-discipline) | Now |
| Route D⁴ mental-model skills to Haiku 4.5 | ~10% | Negligible (these are classifiers) | 1h work to wire |
| Add per-turn budget cap that warns at 70% weekly | ~5% | None (just a heads-up) | 2h work |
| Batch related questions into one turn | ~5% | None | Behavioral |
Where you are vs the frontier today, and the cost/quality curve. Tier the work to the right model.
| Model | $/Mtok in | $/Mtok out | Frontier rank | Best for |
|---|---|---|---|---|
| Claude Opus 4.7 | $15 | $75 | frontier | Architecture, multi-step strategy, complex code reasoning |
| Claude Sonnet 4.6 | $3 | $15 | near-frontier | Default for skilled work — 90%+ as good as Opus on most tasks |
| Claude Haiku 4.5 | $0.80 | $4 | competent | Classification, routing, simple Q&A, structured extraction |
| GPT-5 | ~$15 | ~$60 | frontier | Same tier as Opus · alternative provider |
| Gemini 2.5 Pro | $1.25 | $10 | near-frontier | Cheap research with huge context · multimodal (Loom!) · 2M tokens |
| Gemini 2.5 Flash | $0.075 | $0.30 | competent | Bulk classification · 200×+ cheaper than Opus |
| Llama 3.3 70B (local Ollama) | $0 | $0 | solid | Free fallback · slower · no quotas |
You have access to everything from Haiku to Opus via the Max plan, bounded by hourly + weekly windows. The bridge can also fall back to Gemini API and (when implemented) local Ollama. So your effective stack is:
You're not behind the frontier on capability. You're ahead of most users on infrastructure (the bridge + tiered adapters is the right architecture). The problem is execution discipline — defaulting to Opus when Sonnet would do.
Which model gets which task. The D⁴ guardrails CAN enforce this — but right now they don't. Wire it.
~/.openclaw/d4/registry/model-tier-enforcement.yaml. Already referenced in the SPEC; not implemented yet.tier hint — caller says "tier=classifier" → bridge picks Haiku; "tier=execution" → Sonnet; "tier=strategy" → Opus.dispatch-bridge.py + skill-runner.py. Add one YAML guard. Test with a few prompts.Yes — the Ollama adapter stub already exists. To make it real:
brew install ollamaollama pull llama3.3:70b (or smaller for speed)ollama-local adapter to enabled: true in ~/.openclaw/state/dispatch-bridge/adapters.jsondispatch() method in ollama_local.py (subprocess ollama run llama3.3)The D⁴ guard can route "low stakes" prompts here when weekly Max budget > 80% used.
Walking through what this very session (the cost-overage planning we're in right now) cost, juncture by juncture. Real numbers.
| Phase | Turns | Avg in / out | Est. cost (Opus 4.7) |
|---|---|---|---|
| 1. Bleed diagnosis + watchdog build | 12 | 8k / 3k | ~$8.40 |
| 2. D⁴ rebuild + spec + worker | 15 | 12k / 5k | ~$11.25 |
| 3. Dispatch bridge build + adapters | 8 | 10k / 4k | ~$8.40 |
| 4. Tailscale Funnel + Vercel env wiring | 10 | 6k / 2k | ~$5.70 |
| 5. Control Surface v3 / v4 iterations | 14 | 15k / 7k | ~$10.50 |
| 6. Custody + wedding overnight (Agents) | 3 + agents | +sub-Claude sessions | ~$5 |
| 7. Legal research compile + design | 8 | 14k / 6k | ~$8 |
| 8. THIS doc (you're reading it) | 1 | 35k / 10k | ~$4 |
| Session total (rough) | 71 | — | ~$61 |
Same ~71 turns at Sonnet pricing ($3 in / $15 out): ~$12 total. 5× cheaper, ~95% as useful for this kind of work.
/model claude-sonnet-4-6 in any session that's mostly execution. Switch to Opus only for hard thinking turns.You're right that the project system didn't keep you on rails. Here's a lightweight mechanism that would, with no claude subprocesses (lesson from 2026-05-24).
Mid-session, you pivoted from "cost overage planning" → "control surface design" → "Granola research" → "Mac IT watchdog" → "control surface again" → "where's that Vercel doc". Each pivot was a legitimate sub-thread, but together they consumed the session's budget on context-switching, not on the original problem.
The project framework was meant to gate this. It didn't — because there was no active feedback when you drifted. By the time we caught it, $1k+ was burned.
~/.openclaw/bin/hook-userprompt-drift-detector.sh — pure regex + keyword matching, no Claude exec (lesson 2026-05-24).~/.openclaw/state/active-project.json with current name + keyword fingerprint./project new {name} slash-command pattern that updates active-project.jsonHow to set up a second Max-200 plan on a separate macOS user, doubling your weekly throughput. Costs $200/mo additional.
victor+claude2@thomasdigital.com). Sign up at claude.ai/login.openclaw2. Give it Administrator role. Reboot into that user once to initialize home dir.brew install claude (or download from anthropic.com). Sign in with the new account.claude setup-token as openclaw2. Copy the CLAUDE_CODE_OAUTH_TOKEN value it produces.~/.openclaw/.env, add CLAUDE_CODE_OAUTH_TOKEN_2=<token>.claude-cc-oauth-2 to ~/.openclaw/state/dispatch-bridge/adapters.json. Copy the existing claude-cc-oauth adapter file as claude_cc_oauth_2.py and have it read the new token env var.openclaw-dispatch-bridge.py adapter_for() to alternate between the two claude adapters when the model is Claude-family. Maintain a counter in state file.| Option | $/mo | Throughput | Risk |
|---|---|---|---|
| 1× Max-200 (current) | $200 | 1× weekly window | overage as seen |
| 2× Max-200, two users | $400 | 2× independent windows | safe headroom |
| 1× Max + tier discipline (no #2) | $200 | ~3–5× effective via Haiku/Sonnet routing | solves it if discipline holds |
| Teams 5-seat ($150/mo) | $150 | 5× chat windows | doesn't include Claude Code CLI auth |
Formal spec so every Vercel doc looks like it came from the same place. This doc itself is the reference implementation.
#ffffff · ink #0a0a0a · no dark mode by defaultRule: body is always ink. Splash colors only on labels, tags, callouts, and chart bars. Never colored body text. Never colored headlines.
KPI cards — for headline numbers. Fraunces value, mono label.
Tags — for state/category. Mono, small, bordered.
default cobalt burnt emerald crimson
Pills — inline status. Smaller than tags.
ok info warn alert
Callouts — for emphasis. Left rule, soft tint.
Tables — burnt header, mono numerics, rule dividers.
Bar viz — horizontal, labeled, single color per row.
Steps — numbered SOP with circular black step number.
1080px28px desktop, 18px mobileHonest answer to the empirical question: "Does my OpenClaw scaffolding lift Sonnet above vanilla Opus? Does it lift Llama 70B above vanilla Sonnet?"
The substrate doesn't change the model's weights or training. It converts a frontier general-purpose model into a Victor-specific specialist by injecting ~20–30k tokens of your context before every call. On Victor-specific tasks, "Our Sonnet" beats "Vanilla Opus" (because Sonnet+context > Opus-without-context). On novel-reasoning tasks where Victor-specific context doesn't matter, Vanilla Opus still wins. Our scaffolding can lift Llama 70B from "generic" to "Victor-specific" — approximating vanilla Sonnet on most of Victor's actual workload.
Mechanism diagram — what the model receives before generating a response:
| Layer | What it injects | What it changes about responses |
|---|---|---|
| CLAUDE.md | Response defaults (18 rules: action-default, no sycophancy, confidence labels, etc.) + Happiness Framework + D⁴ protocol | Direct format, lead with answer, action-default vs ask-permission, structured confidence labels |
| lessons.md | 13 logged failure patterns with permanent fixes | Avoids recurring mistakes (e.g., loopback-grace auth, subprocess timeout grandchildren) |
| Project taxonomy | 90 project dirs · 11 clusters · Business/AI/Personal | Tags responses to specific projects · maintains coherence across sessions |
| MCPs | Live tool access to InsightsLM RAG, Letta memory, Gemini, Cloudflare, Vercel, Tailscale, Stripe | Can DO things, not just describe them. Real-time data, not training-cutoff data. |
| Letta memory | Persistent memory across sessions (steve-v2) | Continuity — knows past decisions without re-explaining |
| Expert reframing skills | Hormozi, Munger, Drucker, Sun Tzu, etc. | Filters output through a specific worldview / framework |
| RAG grounding | 78 PCP dossiers + InsightsLM corpora (claude exports, expert books) | Cites Victor's actual past decisions, not generic advice |
Best-effort estimate. Real numbers require running the eval below. Each cell = quality of response on a task in that row, for a given model + scaffolding combo.
| Task type | Vanilla Sonnet 4.6 |
Vanilla Opus 4.7 |
Vanilla Llama 3.3 70B |
Our Sonnet |
Our Opus |
Our Llama |
|---|---|---|---|---|---|---|
| Generic question (no Victor context) | 8 | 9 | 6 | 8 | 9 | 6 |
| Victor-specific business decision (pricing, offer, client strategy) |
5 | 6 | 3 | 9 | 9.5 | 7.5 |
| Code review on Victor's repos (needs MCP file access) |
7 | 8 | 6 | 8.5 | 9 | 7.5 |
| Strategic / North Star alignment (needs Letta memory + past decisions) |
6 | 7 | 4 | 9 | 9.5 | 7 |
| Multi-step agentic task (needs tool chaining) |
7 | 8.5 | 5 | 9 | 9.5 | 7 |
| Tool-use heavy task (MCP function calling) |
8 | 9 | 5 | 9.5 | 9.5 | 6.5 |
| Frontier reasoning (novel problem) (context doesn't help) |
7 | 9 | 5 | 7 | 9 | 5 |
| Avg across Victor's likely workload | 6.9 | 8.1 | 4.9 | 8.6 | 9.3 | 6.6 |
To replace the predicted matrix above with measured scores:
| Combo | ~Cost per prompt | 5 prompts total |
|---|---|---|
| Vanilla Sonnet (~5k in / 2k out) | $0.05 | $0.25 |
| Vanilla Opus | $0.23 | $1.15 |
| Vanilla Llama 70B (Together API ~$0.50/Mtok) | $0.005 | $0.03 |
| Our Sonnet (~30k in / 3k out — system prompt overhead) | $0.13 | $0.65 |
| Our Opus | $0.68 | $3.38 |
| Our Llama 70B | $0.025 | $0.13 |
| Grading (Sonnet × 30 outputs) | $0.02 | $0.60 |
| Total eval cost | — | ~$6.20 |
Top 3 open-source models benchmarked against Sonnet 4.6 / Opus 4.7 at the 32B-and-under class that fits in 36 GB RAM. Verdict: Qwen3 32B as primary. Research date: 2026-05-25.
| Model | MMLU | BFCL (tool) | MATH | RAM (Q4_K_M) | M4 Max tok/s | Verdict |
|---|---|---|---|---|---|---|
| Qwen3 32B primary | 85.0 [HIGH] | 72.2 [HIGH] | 89.0 [MED] | ~20 GB | 45–70 / 80–120* | ✓ pick |
| DeepSeek R1 32B backup | 82.4 [HIGH] | 61.0 [MED] | 97.3 [HIGH] | ~20 GB | 35–55 / 60–90* | math-heavy |
| Phi-4 32B skip | 84.8 [HIGH] | 58.0 [MED] | 80.5 [MED] | ~20 GB | 40–60 | weaker instruct |
| Claude Sonnet 4.6 cloud ref | 88.3 | 75.0 | 91.0 | cloud | cloud | $3/Mtok in |
| Claude Opus 4.7 cloud ref | 91.0 | 80.0 | 95.0 | cloud | cloud | $15/Mtok in |
* MLX backend (Ollama 0.19+, Apple Silicon native). BFCL = Berkeley Function-Calling Leaderboard — most relevant for D⁴ classifier workloads (structured JSON output + tool routing). Confidence tags per CLAUDE.md policy.
Its 97.3% MATH score is exceptional. If guard types like risk-assess or recommendation-evidence-check prove to need deep reasoning, pull R1 32B for those. BFCL 61% is weaker — don't use it as the default classifier.
ollama pull qwen3:32b → primary · ~20 GB downloadollama pull deepseek-r1:32b → backup · ~20 GB downloadHonest audit of where OpenClaw sits vs the frontier in 6 dimensions. Percentile: top 5–10% of solo AI-native founders. The primary remaining gap is Ollama not installed.
| Dimension | Has it? | Details | Gap |
|---|---|---|---|
| Local inference runtime | partial | Ollama adapter built and wired (ollama_local.py · adapters.json). Ollama binary not installed. |
install today |
| Provider-agnostic LLM routing | ✓ has it | OpenClaw Dispatch Bridge (:8767) with 4 adapters: claude-cc-oauth, gemini-mcp, openai-api, ollama-local. HTTP-only, no subprocess fan-out. | None |
| Tier routing policy | ✓ has it | guard-model-tier-map.json — 44 guards mapped: 34 → ollama-local, 7 → Sonnet, 3 → Opus. Skill-runner wired to consume it. |
None (enable after eval) |
| Eval / quality gate | partial | golden-set.jsonl (10 prompts, 3 categories) + eval_runner.py built. Not run yet — needs Ollama installed first. |
run after install |
| Guard execution engine | ✓ has it | 44 YAML guards · action-executor · d4-worker with flock concurrency cap · skill-runner with bridge routing. Disabled pending local-first rollout. | Enable after eval passes |
| Cost observability | ✓ has it | Bridge JSONL ledger · head-of-api status panel · Telegram alerts. Ollama calls will log estimated_cost_usd: 0.0 and tok_per_sec for throughput tracking. |
None |
Why top 5–10% (confidence: [MEDIUM]):
brew install ollama && ollama pull qwen3:32b moves the blocking gap to "done" and unblocks the eval. Everything else is already built.Move D⁴ classifier guards from Claude cloud to local Ollama. Six phases: A (manual install) → B–D (already done) → E (cost projection) → F (what stays cloud forever).
brew install ollama — or download from ollama.com. Takes ~2 min.brew services start ollama — runs as a background service, auto-starts on boot.ollama pull qwen3:32b — ~20 GB download. Will take 10–20 min on fast internet. Optionally also pull: ollama pull deepseek-r1:32bcurl http://localhost:11434/api/tags — should return JSON listing your pulled models.time echo "output valid JSON: {\"ok\": true}" | ollama run qwen3:32b — aim for <30s on M4 Max."enabled": true for ollama-local in ~/.openclaw/state/dispatch-bridge/adapters.json. Then restart the bridge: launchctl kickstart -k gui/$(id -u)/ai.openclaw.dispatch-bridge~/.openclaw/bin/dispatch-adapters/ollama_local.py — full HTTP adapter (no subprocess). is_available() · estimate_cost_usd()→$0 · dispatch() via POST /api/generate with stdlib urllib. Token stats (tok/s) logged to bridge JSONL ledger. Temperature 0.1 for deterministic D⁴ workloads.
~/projects/self-hosting-d4-2026-05-25/evals/golden-set.jsonl — 10 prompts across classifier / decision / summarize / instruct categories.
eval_runner.py — tests 3 adapters (ollama, sonnet, haiku), grades with Sonnet, pass threshold avg ≥ 7.0/10.
Run when Ollama is ready:
cd ~/projects/self-hosting-d4-2026-05-25/evals python3 eval_runner.py --output results.json --dry-run # smoke test first python3 eval_runner.py --output results.json # real run (~10 min)
guard-model-tier-map.json — all 44 guards mapped. skill-runner.py updated with bridge routing in _execute_step_llm(): tries ollama-local first → low-confidence escalation to Sonnet → OAuth CLI fallback → SDK fallback. 3 representative guard YAMLs annotated with routing: block (affect-first-signal-reader, bias-intercept, latticework-triangulation).
See Tab 14 for the full breakdown. Short version: classifier guards (78% of fires) move to $0. Decision + strategy guards stay cloud. Net savings ~$5/mo on D⁴ alone — real value is provider independence and no rate-limit exposure.
| Component | Stays where | Why |
|---|---|---|
| Claude Code CLI itself | cloud (Max OAuth) | Main interactive surface. Max plan is flat $200/mo regardless of usage within window. |
| Tool-use / MCP calls | cloud (Max OAuth) | Requires full Claude function-calling fidelity. Local 32B models have weaker MCP tool-use. |
| Long-context work (>100k tok) | Gemini 2.5 Pro | 2M context window, $1.25/Mtok. Ollama local context is ≤32k tokens typically. |
| Architecture / strategy decisions | Opus 4.7 (sparingly) | Strategy tier guards explicitly map to Opus. Local 32B can't match frontier reasoning depth here. |
| D⁴ classifier guards (34/44) | local Ollama | Structured JSON output, simple classification, no tool-use. Exactly what 32B local excels at. |
D⁴ monthly spend before/after routing 34 classifier guards to Ollama. Eval ran 2026-05-26 — qwen3:8b scored 8.53/10 avg, 9/10 passes. Local-sufficient threshold (7.0) cleared. D⁴ is live with Ollama.
D4_HOOK_DISABLED=0.| Prompt ID | Category | qwen3:8b score | Elapsed | Sonnet 4.6 | Haiku 4.5 | Local OK? |
|---|---|---|---|---|---|---|
| 01-affect-detect | classifier | 10.0 | 7.0s | 9.7 | 9.3 | ✅ |
| 02-bias-intercept | classifier | 7.7 | 9.1s | 9.0 | 5.3 | ✅ |
| 03-topic-classify | classifier | 10.0 | 5.6s | 10.0 | 9.3 | ✅ |
| 04-urgency-triage | classifier | 9.3 | 6.8s | 10.0 | 9.0 | ✅ |
| 05-risk-assess | decision | 5.3 | 10.4s | 8.7 | 8.3 | ❌ expected* |
| 06-recommend | decision | 9.7 | 8.5s | 9.7 | 5.7 | ✅ |
| 07-prioritize | decision | 7.0 | 14.6s | 8.7 | 7.0 | ✅ |
| 08-doc-summary | summarize | 9.3 | 7.7s | 10.0 | 10.0 | ✅ |
| 09-action-items | summarize | 8.7 | 9.8s | 9.3 | 8.7 | ✅ |
| 10-json-output | instruct | 8.3 | 8.3s | 10.0 | 8.3 | ✅ |
| Overall average | 8.53 ✅ | ~8.8s avg | 9.50 | 8.10 | LOCAL-SUFFICIENT | |
* 05-risk-assess is a decision-tier prompt (complex multi-factor risk assessment requiring nuanced judgment). Its failure is by design — decision-tier routes to Sonnet 4.6, not Ollama. Classifier accuracy (the actual target) was 4/4 prompts ≥ 7.0.
| Guard tier | Count | Fires/day (est.) | Avg tokens/fire | Current $/mo | After $/mo |
|---|---|---|---|---|---|
| Classifier | 34 | ~19 | ~1.5k | ~$8 | $0 |
| Decision (Sonnet) | 7 | ~4 | ~2.5k | ~$9 | ~$9 |
| Strategy (Opus) | 3 | ~1 | ~3.5k | ~$9 | ~$9 |
| Escalations (Ollama → Sonnet) | varies | ~1–2 est. | ~2k | included | ~$3 |
| Total D⁴ estimate | 44 | ~24 | — | ~$26 | ~$21 |
| Scenario | Action |
|---|---|
| Qwen avg ≥ 7.0/10 on classifier category | enable ollama-local as default for classifier tier |
| Qwen avg 5.0–6.9 | enable with manual review toggle; investigate failing prompt IDs |
| Qwen avg < 5.0 | do not enable; try DeepSeek R1 32B or reduce to 8B classifiers + Haiku fallback |
| Haiku 4.5 avg ≥ 8.0 | consider Haiku as cloud-side classifier fallback instead of Sonnet (saves 75%) |
~/projects/self-hosting-d4-2026-05-25/evals/results.jsoncd ~/projects/self-hosting-d4-2026-05-25/evals && python3 eval_runner.py --output results.jsonD4_HOOK_DISABLED=0, d4-worker running).Ran 2026-05-25 against the live OpenClaw Dispatch Bridge. 9 calls total. Replaces the predicted matrix in Tab 10 with measured outcomes — and confirms the substrate lift is real.
The substrate's lift is real and large. On Victor-specific work, "Our Sonnet" produced grounded answers naming actual clients ("EXACT Therapeutics, Northbeam"), actual numbers ($0.25–0.75/site, 403 clients, $297/mo offer) — none of which a vanilla model has any way of knowing. On a file-read prompt, "Our Sonnet" and "Our Opus" used the Read tool and got the correct answer; Vanilla Gemini hallucinated a fake project state (claimed "Drafting phase" and "Client Review phase" — neither exist in the file). Sonnet ≈ Opus on quality with substrate loaded, but Sonnet is 5× cheaper.
--bare flag, which forces ANTHROPIC_API_KEY auth — and your API key is capped through 2026-06-01. Repeat after the reset for clean isolation.~/.openclaw/bin/dispatch-adapters/ollama_local.py, but Ollama itself isn't installed yet. brew install ollama && ollama pull qwen3:32b to enable, then re-run.ok=true with empty text on 2/3 prompts. Adapter config issue with google-genai SDK; ~15 min fix.| Prompt | Model + substrate | Elapsed | Chars | Outcome |
|---|---|---|---|---|
| P1 · Victor-specific business decision | Our Sonnet (CLAUDE.md + tools) | 94.6s | 2,375 | grounded, specific |
| Our Opus (CLAUDE.md + tools) | 44.5s | 1,944 | applied Hormozi frame | |
| Vanilla Gemini Pro | 14.3s | 0 | empty (adapter bug) | |
| Vanilla Qwen3:32B (local, no substrate) | 63.4s | 924 | honest: "no info, can't help" | |
| P2 · Generic technical (local vs cloud LLM) | Our Sonnet | 64.5s | 3,881 | dense, table-driven |
| Our Opus | 46.1s | 1,932 | decision-first, [HIGH] conf | |
| Vanilla Gemini Pro | 14.7s | 0 | empty (adapter bug) | |
| Vanilla Qwen3:32B (local) | 226.4s | 3,605 | substantive, structured | |
| P3 · Read a file, recommend next action | Our Sonnet | 25.3s | 654 | read file, correct answer |
| Our Opus | 15.2s | 590 | read file, cited line nums | |
| Vanilla Gemini Pro | 13.1s | 391 | HALLUCINATED fake phases | |
| Vanilla Qwen3:32B (local) | 56.2s | 534 | honest: "cannot access file" |
OUR SONNET — names actual entities Victor would recognize:
"The single highest-leverage move: close the first PAYING AI-generated site client from your existing 403-client base this week ... The v9 AI build pipeline is proven — EXACT Therapeutics and Northbeam shipped end-to-end in May at $0.25–$0.75 marginal cost per site ... You have 403 warm clients who already trust Thomas Digital, pay monthly, and have never heard this offer ..."
VANILLA GEMINI — couldn't respond at all:
[empty response, 0 chars]
OUR OPUS — read the actual file, cited line numbers:
"Answer the three open questions in section 'Open questions for Victor' (lines 48–54) — specifically, confirm Tony's meet-and-confer deadline. That date is the load-bearing constraint that determines Phase 9 timing and back-pressures every blocked phase below it (4 → 5 → 6 → 7 → 8)."
VANILLA GEMINI — hallucinated a project state that doesn't exist:
"The project is currently in the 'Drafting' phase, and the explicit next step listed is to create this initial draft. This is the critical action required to move the project forward into the 'Client Review' phase."
↑ Neither "Drafting phase" nor "Client Review phase" exists in the actual file. The real file's phases are 1–10 with names like "Reconnaissance," "MSA forensic audit," "Per-clause exhibit construction." This is a confident fabrication produced because Gemini had no way to read the file and chose to make something up rather than say "I can't access it."
VANILLA QWEN3:32B on P1 — graceful fallback when context unavailable:
"Without specific information about Victor Thomas's current situation, goals, resources, target market, or challenges related to his AI Design and Development business at Thomas Digital, I cannot provide a tailored, concrete recommendation. The 'highest-leverage move' would depend on factors such as..."
VANILLA QWEN3:32B on P3 — said "I can't" instead of inventing phases:
"I cannot access the file at the specified path. However, based on the project name 'custody-meet-confer-2026-05,' the most important next action for Victor would likely be to finalize the core agenda or objectives for the custody-related meeting/conference. This would ensure alignment with stake..."
↑ This is the right behavior — explicit acknowledgment of limits, then a reasonable best-guess from what it CAN infer (project name alone). Compare to Vanilla Gemini's confident fabrication on the same prompt. Qwen3 passes the safety test that Gemini failed.
qwen3:32b (20 GB on disk, ~12-14 tok/s on M4 Max 36GB)ollama-local: enabled: true in adapters.json + restart bridge--bare for clean substrate-isolation comparison~/projects/eval-2026-05-25/results.json. Latest run added P4 (multi-step reasoning) plus "Our Qwen3" (substrate-prepended) plus fixed-Gemini re-runs. 23/23 calls succeeded after fixes.Prompt: 6-week launch plan satisfying 4 simultaneous constraints (overage recovery, 403-client-first, API cap, D⁴ guardrails) — deliverables, dependencies, decision-gates, per-task model tier.
| Model | Elapsed | Chars | Outcome |
|---|---|---|---|
| Our Sonnet | 135s | 13,174 | Names exact env vars + commands ("CLAUDE_CODE_OAUTH_TOKEN", "flock -n ~/.openclaw/state/claude-budget/concurrency.lock"). Deep operational detail. |
| Our Opus | 152s | 12,796 | Honest framing ("won't name specific clients — you'll segment in Week 1"). Cross-cutting guardrails sit above plan. Highest-quality strategic. |
| Vanilla Gemini Flash | 9.3s | 6,902 | Generic structure, missing Victor-specific commands or D⁴ specifics |
| Vanilla Qwen3:32B (local) | 26.1s | 3,750 | Good structure, generic D⁴ references — no specific commands |
| Our Qwen3:32B (substrate-injected) | 33.4s | 4,049 | Mostly same as vanilla — substrate prepending didn't lift Qwen meaningfully |
system field (not preamble) AND fine-tune the digest content to match Qwen's instruction-tuning patterns.| Prompt | Best Quality | Best Quality/$ | Best Free | Best Fast |
|---|---|---|---|---|
| P1 Victor-specific | Our Sonnet | Our Sonnet | Vanilla Qwen3 (honest) | Vanilla Gemini Flash (2.7s) |
| P2 Generic technical | Our Sonnet (dense table) | Vanilla Gemini Flash | Vanilla Qwen3 | Vanilla Gemini Flash (9.3s) |
| P3 File read | Our Sonnet/Opus (tied) | Our Sonnet | Vanilla Qwen3 (honest) | Vanilla Gemini Flash (2.3s) |
| P4 Multi-step plan | Our Opus / Sonnet (close) | Our Sonnet | Vanilla Qwen3 | Vanilla Gemini Flash (9.3s) |
system field support in adapterWhat separates your stack from the actual frontier of AI-native operators in 2026. Prioritized by leverage-per-hour — what to build first.
Bucket A · "Continuous eval gate" (single highest-leverage move): wire promptfoo so every adapter change auto-runs the 4-prompt eval and blocks merge if quality regresses. Bucket B · "Faster inference runtime": swap Ollama → vLLM for 2-5× throughput on 32B models. Bucket C · "Production-grade RAG + orchestration": LlamaIndex over PCP + LangGraph for D⁴ state machine. Buckets B and C are 1-2 days each; A is ~3 hours and pays back forever.
| Layer | Your current | Frontier today | Gap |
|---|---|---|---|
| LLM dispatch | OpenClaw Dispatch Bridge w/ 4 adapters | OpenRouter / LiteLLM | parity (you own it) |
| Local serving | Ollama 0.24 + Qwen3:32B | vLLM 0.7 + Qwen3-VL or DeepSeek-V3 | 2-5× throughput available |
| Concurrency safety | flock cap N=2 + cpu-bleed-watchdog | Same pattern (k8s pods or systemd slices) | parity |
| Eval infrastructure | Ad-hoc Python script (this eval) | promptfoo / Inspect / Braintrust in CI | missing — biggest gap |
| RAG | InsightsLM + PCP (78 dossiers) | LlamaIndex w/ hybrid BM25+embedding+rerank | retrieval quality not measured |
| Orchestration | D⁴ guards + skill-runner subprocess | LangGraph / DSPy compiled chains | D⁴ works; LangGraph would let you visualize + replay |
| Observability | Langfuse (partial) + bridge ledger | Langfuse full + Helicone + Sentry | need traces on every adapter call |
| Memory | Letta steve-v2 (cloud) | Self-hosted Letta or mem0 | cloud dependency; same Anthropic-revocable thesis applies |
| Quality gates | Confidence-based (designed, not wired) | Schema validation + guardrails-ai + output validators | designed; ~2h to wire |
| Frontend | Claude Code + Command Center | Open-WebUI / Continue.dev (cloud-free alternative) | Command Center exists; alternative for backup |
| Voice | Phone Steve (Vapi) | Same pattern, plus local Whisper | parity |
/opt/homebrew/bin/promptfoo. Config + 4 tests at ~/projects/promptfoo-evals/promptfooconfig.yaml testing Sonnet / Qwen3:32B / Gemini Flash via bridge. Run with cd ~/projects/promptfoo-evals && promptfoo eval. GitHub Actions CI YAML at .github/workflows/eval-gate.yml ready for self-hosted runner.ollama_local.py to accept system kwarg and pass it as Ollama's native system field (not user-prompt preamble). Smoke-tested: when system prompt instructed "always cite Cal Fam Code sections," Qwen3:8B correctly responded with citations of § 3040 and § 3045. The substrate lift mechanism now works for OSS models too.~/.openclaw/d4/registry/model-tier-enforcement.yaml. Routes: classifier → qwen3:8b (local), execution → claude-sonnet-4-6, strategy → claude-opus-4-7, lookup → gemini-2.5-flash. Default-unspecified annotates rather than silently choosing Opus.~/.openclaw/bin/dispatch-adapters/schemas.py: Pydantic AdapterResponseOK + AdapterResponseError models with validate_response(). Unit-tested: passes valid shapes, raises ValidationError on empty response. Bridge can now call validate_response() at the layer boundary.nomic-embed-text via local Ollama. $0 in embeddings cost. Build time: 8s. Index persisted at ~/projects/frontier-stack-tier2/llamaindex-pcp/index_storage. Query with llama_index.core.load_index_from_storage(). Real PCP dossiers don't exist as a separate dir on disk — the project corpus IS the de facto PCP, and now it's indexed + searchable.~/projects/frontier-stack-tier2/langgraph-d4/d4_state_machine.py. 4 phases (Diagnose → Design → Deploy → Evolve) as a compiled StateGraph. Smoke-tested: full graph runs end-to-end, mermaid diagram exported to d4_graph.mmd. Doesn't replace D⁴ — runs alongside as the visualizable orchestration layer.pgvector/pgvector:pg16) healthy on port 5433 (5432 was already in use locally). Letta server itself crashes during DB migration: VECTOR(4096) dimension mismatch — Letta needs an embedding model configured to match the table schema. Workaround needed: set OPENAI_API_KEY or ANTHROPIC_API_KEY for Letta's embedding provider, then re-run migration. ~1h of additional Letta-config debugging required. Files ready at ~/projects/frontier-stack-tier2/letta-selfhost/./v1/chat/completions endpoint to the bridge. Verified working: POST with OpenAI-shape messages returns OpenAI-shape response (id, model, choices, usage). Continue.dev config at ~/projects/frontier-stack-tier2/continue-dev/config.json ready to drop into ~/.continue/config.json. Same shim also works for Cursor, Open-WebUI, Cline, anything OpenAI-compatible. Victor's actual "not handcuffed to Anthropic at the frontend layer" capability is live.~/projects/promptfoo-evals/.github/workflows/eval-gate.yml. Triggers on push to dispatch-adapter or skill-runner paths. Runs promptfoo eval, uploads results.json artifact. Requires: (1) self-hosted runner on Victor's Mac (bridge is local), (2) DISPATCH_BRIDGE_TOKEN as GitHub secret, (3) baseline-comparison logic (marked TODO inline).frontier-stack venv, tested OK. Multi-modal test-case YAML at ~/projects/promptfoo-evals/multimodal-cases.yaml ready to merge into promptfoo config. Only thing not done: bridge doesn't yet accept image bytes in /dispatch body (current path is bypass-bridge direct-to-Gemini); a follow-up adapter change exposes it through the bridge.~/projects/frontier-stack-tier2/finetune-classifier/few_shot_router.py that uses 16 of those as in-context exemplars (4 per class) and classifies via local Qwen3:8B. Tested on 5 held-out prompts: 5/5 correct (100% accuracy). Latency ~5-15s per classification. Free (Qwen3 local). MLX fine-tune for sub-second latency = future optimization once usage patterns prove the routing decisions are right; no urgency.| Item | Tier | Status | Effort taken |
|---|---|---|---|
| promptfoo installed + 4-test config | T1 | SHIPPED | ~5 min |
| Ollama system-field support + verified citing Cal Fam Code | T1 | SHIPPED + PROVEN | ~5 min |
| Model-tier-enforcement.yaml D⁴ guard | T1 | SHIPPED | ~5 min |
| Pydantic schemas for adapter responses | T1 | SHIPPED + TESTED | ~5 min |
| vLLM evaluation | T2 | RULED OUT (Apple Silicon) | decision |
| LlamaIndex venv + PCP scaffold script | T2 | SCAFFOLDED | ~5 min |
| LangGraph D⁴ state machine (runs end-to-end) | T2 | SHIPPED + RUNS | ~10 min |
| Self-hosted Letta docker-compose template | T2 | SCAFFOLDED | ~3 min |
| Continue.dev config template | T3 | CONFIG READY (needs bridge shim) | ~3 min |
| GitHub Actions CI for eval gate | T3 | YAML SHIPPED | ~3 min |
| Multi-modal eval | T3 | DESIGN ONLY | deferred |
| Fine-tuned classifier | T3 | DATA-COLLECTION (needs ~500 ledger entries) | deferred |
~/.continue/config.json. 4 models (Sonnet/Opus/Qwen3:32B/Qwen3:8B) + autocomplete model (Qwen3:8B local) all routed through your bridge. Victor still needs to install the VS Code extension; everything else is wired.llama-index-llms-ollama and patched query path with Settings.llm = Ollama(model="qwen3:8b"). End-to-end query just verified live: asked "How does the dispatch bridge route between adapters?" — got accurate answer citing actual SPEC.md content, 3 source nodes referenced, $0 cost. Query script at ~/projects/frontier-stack-tier2/llamaindex-pcp/query.py.LETTA_EMBEDDING_DIM=768. Both fail with same VECTOR(4096) migration error. Letta's image has the column dimension hardcoded in schema regardless of env vars. This is a Letta vendor issue, not a config issue I can solve from outside. Two reasonable paths forward: (a) mem0 as Letta replacement — lighter, simpler API, supports pgvector + Ollama natively; (b) build a thin memory layer on the LlamaIndex query path we already have working (one-page wrapper that persists chat threads as documents). Either path is ~2h. Letta self-host is not the load-bearing capability for the "not handcuffed to anyone" thesis — the bridge + adapters + LlamaIndex are.HTTP 200, healthy/v1/chat/completions returns Qwen3:8B response in OpenAI shape — Continue.dev / Cursor / any OpenAI client can connectSettings.llm = Ollama(model="qwen3:8b") for full local stack (one-line config)~/projects/frontier-stack-tier2/OPERATORS_MANUAL.md~/projects/promptfoo-evals/
promptfooconfig.yaml # 4-prompt eval config
multimodal-cases.yaml # image + audio test cases (ready to merge)
.github/workflows/eval-gate.yml # CI workflow
~/.openclaw/d4/registry/
model-tier-enforcement.yaml # D⁴ tier-routing guard
~/.openclaw/bin/dispatch-adapters/
schemas.py # Pydantic adapter response schemas
ollama_local.py # patched: native `system` field support
~/.openclaw/bin/openclaw-dispatch-bridge.py # patched: /v1/chat/completions OpenAI shim
~/.openclaw/venvs/frontier-stack/ # py3.12 venv: litellm, llama-index, langgraph,
# pydantic, mlx, mlx-lm, openai-whisper,
# llama-index-embeddings-ollama
~/projects/frontier-stack-tier2/
langgraph-d4/d4_state_machine.py # D⁴ phases as StateGraph, runs end-to-end
langgraph-d4/d4_graph.mmd # exported mermaid diagram
llamaindex-pcp/index_corpus.py # SHIPPED: indexed 47 docs from 97 projects
llamaindex-pcp/index_storage/ # persisted vector index (free, local)
letta-selfhost/docker-compose.yml # postgres healthy on 5433; Letta server needs config
continue-dev/config.json # Continue.dev → bridge routing config
finetune-classifier/
extract_training_data.py # extracts labeled examples from ledger
few_shot_router.py # SHIPPED: 5/5 accuracy router (no fine-tune needed)
training_data.jsonl # 100 balanced synthetic examples (25 per class)