i stopped asking one question and the whole way i build changed.
the old question was how do i get this working? the new one: who can i trust to make sure this works, and how do i give them everything they need to do it without me?
this is the same shift that separates a principal engineer from a senior one: delegation architecture. hold the right level of abstraction (conceptualisation, specification, governance) while the machine handles everything below it.
this is the architecture i landed on after a few months of building it full-time. three pillars. it runs on my own box now, and it ships while i sleep. what follows is the tour.
how it got here
three stages, and each one hit a wall that named the next.
stage 1: copilot in the editor. useful, limited. every session an amnesia ward: a good answer to a specific question, then the thread was gone. anything non-trivial meant carrying context from chat to chat by hand, like moving house with no boxes.
stage 2: claude code. project-level awareness changed the texture of the work. the agent knew where it was. it navigated the repo, held architectural context across files, reasoned about the system as a system. building started to feel like building again.
stage 3: n8n + openclaw. n8n for workflow orchestration; openclaw (the agentic-execution layer running on my own vps) for the work itself. wired into pipelines with gated task execution, delegation handoffs, and autonomous quality gates. i stopped verifying every box myself and started designing the system that verifies every box.
pillar one: agentic skills
the first thing you learn giving an agent real autonomy: awareness is infrastructure. an agent without structured skill definitions is a junior engineer on day one, technically capable and contextually lost.
skills fix this. they are structured capability documents that tell an agent not just what it can do, but when to do it, what inputs it expects, what outputs it must produce, and what counts as failure.
skills are architectural primitives, carrying their own context, success criteria, and boundary conditions. the agent doesn't guess. it knows.
before writing a line of factory workflow, define the skill library. every capability the agent needs (research, code generation, api integration, document creation) gets a definition. every agent that holds one gets in. the payoff compounds: every new workflow draws from a richer, more reliable library, and the agents get more capable without re-explaining the world each time.
pillar two: atomic tasks, gated
the failure mode of most agentic pipelines is over-ambition at the task level. ask an agent to "build the auth module" and it disappears for twenty minutes and returns something that almost works, misses three edge cases, and invented its own session strategy. that's a specification failure, not an agent failure.
the rule: if a task has more than one decision point, it is too big. break it down until each step is something a literal, context-free assistant could execute correctly given only the inputs specified, then wire the steps together with gates.
gated execution is the enforcement. no step proceeds until the previous step's output passes its gate. gates are schema validation (did the output match the contract), test execution (do the tests pass), human review (does this need an eyeball), or a second agent's review (does another model agree this is correct).
this makes failures cheap. a failed gate is a signal, caught, escalated, and walked back out the way it came. loud failures are easy: you get paged, you fix it. the silent ones are what cost you, so make them loud.
pillar three: autoresearch
every pipeline has a knowledge horizon: the boundary past which the agent starts filling gaps from stale training. most systems manage this by injecting context at the start of a task. autoresearch lets agents identify and fill their own gaps mid-execution.
the agent formulates its own queries. it knows what it doesn't know, asks, waits, proceeds. rag pulls from a fixed corpus. autoresearch generates queries against live sources, feeds results back into the active context, and makes execution self-correcting in real time. every finding lands with a source and a confidence, so nothing gets taken on faith.
the three together
skills give agents structured awareness. atomic decomposition keeps tasks gated. autoresearch fills gaps autonomously. linked, they take an idea from specification to deployed, documented, observable, with minimal hands on it.
the wire between
three pillars move work. something has to move the bytes, and bytes are not free. every gate handoff, every autoresearch payload, every tool catalog i hand an agent is tokens on a wire, and tokens are the one resource the factory burns whether it ships or not.
so the wire compresses. tool output, logs, diffs, search results, memory recall: squeezed before they reach a model, expanded from a handle if anyone needs the detail back. caveman's own line says it best, and in the register i'd have chosen anyway: why many token when few do trick.
under that line is a smaller surface than you'd expect: four calls. compress, retrieve, detect, stats. the engine is those and nothing else. detect is a content router: it reads a payload, decides if it's json or a log or a diff or code or a search dump, and points each at a compressor tuned to that shape. json keeps its keys and error subtrees, logs keep the stack traces and drop the heartbeat noise, code keeps imports and signatures so the syntax still parses. one core, many front doors: cli, proxy, mcp, sdk all call the same engine instead of each carrying its own copy. write a compressor once, reach it everywhere.
the number is a real fixture, not a projection: sixteen thousand tokens of tool-output json down to about eleven hundred, roughly a 93% cut. it's labelled inferred, a local count and not a billing claim, and never dressed up as one. what happens when the engine doesn't know is the part i respect most. unknown mode falls to record: pass-through, no compression. unknown content falls to text, the gentlest squeeze. no recovery store, no lossy output at all. it fails closed: the conservative path is the default, every time. null0 is the route you point bad traffic at so the table stays honest; caveman points unknown payloads at the same kind of drain so the token count stays honest. chaos goes somewhere safe to die, and the number you're left with is one you can trust. the factory already refuses quiet failures (pillar two). a transport layer that lied about its savings would be the same sin one level down. so it doesn't. few token, much trick, honestly counted.
the ecosystem
the factory is the infrastructure. the applications it ships are the portfolio. small bets, not small in ambition, but structured so no single outcome is existential. each app handles its own auth, billing, observability, docs. the factory builds and maintains them. i hold the vision, own the strategy, and keep the one recipe nobody else gets to read.
consumer first, prosumer second, enterprise third. the enterprise tier is the compounding effect of proving consumer utility at scale.
what it's for
the factory ships while i sleep. the workers never clock off, and they never ask why.
lessons
the machine is leverage. the edge is conceptual clarity, taste, and the ability to specify what good looks like.
gated execution is the difference between autonomous and reckless. an autonomous agent without quality gates is unmonitored. invest in the gates before the agents. the factory is only as trustworthy as its worst gate.
skill definitions compound. invest early. an hour writing clear skill definitions at the start saves ten hours of prompt repair later. skill libraries are strong typing for delegation: they catch problems at specification time, not runtime.
autoresearch changes the trust model. when agents identify and fill their own gaps, you stop treating them like sophisticated autocomplete and start treating them like junior engineers. the delegation changes. the results change.
compression is a first-class citizen, not a footnote. the factory's cost isn't compute, it's tokens on every wire between agents. squeeze them at the transport layer and the whole system gets cheaper without a single agent getting dumber. the discipline that makes it trustworthy is the same one the gates enforce: count honestly, label what's inferred, keep the dropped detail recoverable.
small bets is a mindset. the point isn't diversifying financial risk, it's diversifying meaning. when no single app is your identity, you can let one fail without it meaning you failed.
what's next
one factory is a solved shape now. the question i've started circling is quieter: what happens when there are several, and they don't share a blueprint.
the reflex is to unify them. one schema, one orchestrator, one throat to choke. i think that reflex is wrong, and early: the fastest way to build the wrong thing is to merge two systems that only look like the same system because you gave them the same name. adjacent problems are not the same problem.
so i'm not drawing a merge. i'm drawing a seam. one side produces a signal; the other consumes it, or carries on unbothered when it isn't there. no factory computes what another factory owns. no surface breaks because a field it hoped for showed up empty. the contract is the honesty about absence: a system that degrades to a documented blank instead of a guess is a system you can still trust at 3am when half the wires have gone quiet.
that's as far as i'll draw it today. the same instinct that runs the gates, trust by contract and not by control, pointed one level up: at the space between the factories instead of the agents inside one. i don't have the transport, the grain, or the staleness rules yet. i have the shape. the rest is a plan i haven't opened.
more on that when it's real, not before.
written march 2026. diagrams rendered with mermaid.
