Digital Assistant Infrastructure
AI Engineer building
his own Digital Assistant
We're not building a thousand different things. We're building one thing — a single digital assistant that knows you, works for you, gets better over time. Everything else is plumbing. The unlock this year wasn't smarter models. It was the scaffolding around them.
The bet
Three layers carry the load.
When wrong output costs you, harness it. When wrong output is the variance you want, structure it via a skill workflow. Free-form prompts are for one-offs only. Karpathy called the math: agentic reliability is a march from 90% to 99% to 99.9%, each nine costing proportionally more engineering. Stanford put a number on it: a 6× capability gap between identical models in different harness shapes. Schmid named the move — the harness IS the operating system, the model is the runtime.
Layer 1 · Pattern Engineering
Harness engineering is the load-bearing variable.
DAI ships at every determinism level on a single dial: free-form prompt → skill workflow → harness. Every DAI session runs in a 7-phase meta-harness — the Algorithm v3.7.0 — with mechanical gates (ISC count, contradiction, plan-review, decisions, verification) and a PRD-as-system-of-record. The 8 fixed-plan harnesses run inside its phases. Same discipline at three scales: session, workflow, cognition.
Algorithm v3.7.0 — the meta-harness
7-phase OBSERVE→THINK→PLAN→BUILD→EXECUTE→VERIFY→LEARN contract. ISC + contradiction + plan-review + decisions + verification gates. PRD-as-record. Every DAI session runs in this.
The Loop — every automation engagement runs it
AUDIT → DIAGRAM → BUILD → DELIVER. Outer phases compose the fleet of fixed-plan harnesses; each cycle adds atoms; the cost of automation N+1 falls toward zero. Three witnesses to date: Speed-to-Lead (cycle-1), PAI self-witness (cycle-2, AUDIT/BUILD decoupling discovered), lwao outside-input (cycle-3, fleet 7 → 9, composition discipline codified).
Building blocks
work-audit
Scores repeated activities (V×T×S×E×X) to identify what to harness next. Cycle-2 self-witness ran 2026-04-27 on DAI's own engineering work.
TreeOfThoughts
Skill workflow — branches 3-5 viable architectural paths and scores them. This site's architecture was locked through a TreeOfThoughts firing.
narrativ-refactor
Token-substitution cascade across mj-deving/* portfolio surfaces. Eats its own dog food — propagates v6→v7 narrative shifts via a harness, not by hand.
fixed-plan-harness-template
The doctrine for new harnesses — 4-section phase blocks (Input · Action · Validation gate · Output artifact). Sibling pattern to V5 anatomy + best-path-routing.
Production exemplars
n8n-self-healing
Workflow that learns from its own errors. Zero tokens on the 4th occurrence of a known failure pattern — the harness IS the feedback loop.
code-first-n8n
5 POC workflows benchmarking code-mode against the AI-Agent baseline. 56–96% token savings, externally validated by Anthropic (98.7%) and Cloudflare.
competitor-research
4-map cycle-3 witness — first run on a fresh outside input. Built on a new web-search atom (url-to-kn integration deferred to v1); scans any seed company → markdown comparison. ~52s · ~€0.0007 per scan run, MVA proof on Cognigy / DeepL / Aleph Alpha (single-day; 2-week soak pending).
Layer 2 · Context Engineering
Engineer the full lifecycle, not the prompt.
In 2023 everyone wanted to be a prompt engineer. Three years in, that whole discipline looks quaint. It was a hack against stateless models with nothing to work with — you compensated for missing context by stuffing the prompt. The actual leverage was never in the prompt. It was always in the context pipeline behind it. DAI doesn't have a context window — it engineers the full context lifecycle.
Four-carving context taxonomy
A primitive lives in multiple lenses simultaneously. Driver (hook · user · model · harness) × Scope (per-session · cross-session · cross-project · global) × Direction (write · read) × Abstraction (file · state · behavioral · cognitive · organizational).
Building blocks
kn-to-action
kn bundle → telos-score / propose-beads / distill / blueprint. The substrate-to-action pipe; 4 modes routed quality-first.
session-wrapup
5-phase session close: deltas · bd ops · commits · health · handoff. Ships in one harnessed pass instead of improvised end-of-session.
/cs context-search
9-source aggregator across history.jsonl + git logs + project memories + work.json + MEMORY/WORK PRDs + session-names + PRD content + kn entries.
PRDSync hook
Frontmatter ↔ work.json sync. Read-only invariant that makes PRD-as-system-of-record reliable. One of 39 hooks across 9 event types.
Layer 3 · Prompt Engineering
Doctrine + library + routing.
A prompt is an API call. The thin request. Everything interesting happens before it. Layer 3 is therefore both halves: a shape doctrine for new prompts when none of the existing ones fit (V5 anatomy — 8 named slots, cacheable-above / dynamic-below), and a standard library of 266 production-grade prompt-patterns ready to fire with a routing layer to find the right one in seconds.
V5 anatomy — the canonical shape
8 named XML slots: task_context · tone · schema · examples · input_content · instructions · reminders · output_format. Cacheable-above / dynamic-below preserves prefix-match cache hits across runs.
System map
Show me the file → it's there.
Geometry is the argument. Three rows = three layers. Three columns = primitives, compositions, cross-cuts. The Algorithm spans the top because every DAI session runs in it. Public cells link to source; private ones describe what's there until they're exposed.
L1 · Pattern
L2 · Context
L3 · Prompt
Surfaces
Same brain, different interfaces.
claudeclaw
Mobile DAI surface — same brain, different interface. Telegram bot fronting Claude SDK with grammY; live deployment on systemd.
openclaw-hardened
Practitioner-of-autonomous-agentic-work in production. 15-phase setup, 6-layer injection defense, brand-formatted social preview.
blog
Editorial layer. Three pillar essays anchor this site (single-digital-assistant · context-engineering · scaffolding-is-leverage).
dai-skills
Visual map of every DAI skill — every building block clickable to source. The UX reference for this site's atlas.
Proof
Numbers, not adjectives.
The 4-phase Opportunity-Map ran end-to-end on DAI's own weekly engineering audit on 2026-04-27. Cron wired Friday 07:00 UTC for cycle-3. Self-reference is the strongest proof of the engineering claim: show me the audit doc → it's there. Show me the cron → it's wired. Show me last Friday → it ran.
Editorial
Three essays that anchor the bet.
The Future Is Clear
Everyone is arguing about models, frameworks, and tools. They change every week. But the destination doesn't. We're all building the same thing.
Context Engineering Is the New Prompt Engineering
Clever prompts were a 2023 parlor trick. The real leverage is the pipeline that feeds the model.
Scaffolding Is the Leverage
The unlock this year wasn't smarter models. It was everything built around them.