devarno
read
back to downlink

$ downlink · build

my automation factory: step inside

i stopped asking how to get things working and started asking who i could trust to make sure they work without me. that one swap rebuilt how i ship.

Devarno·March 1, 2026·10min

design · founder_journey · devlog · baselinx · agentic_systems · orchestration

my automation factory: step inside

§ sections

  • how it got here
  • pillar one: agentic skills
  • pillar two: atomic tasks, gated
  • pillar three: autoresearch
  • the three together
  • the wire between
  • the ecosystem
  • what it's for
  • lessons
  • what's next

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.

three stages from editor autocomplete to a gated factorystage one is question-per-chat, copilot in the editor, one bug and one answer. context loss and manual carry between chats forces stage two, session memory with claude code, project-level reasoning and repo-aware context. orchestration then enters via n8n and openclaw, giving stage three, the factory, with gated taskset execution, delegation handoff and full pipeline ownership.context loss, nocontinuity,manual carry betweenchatsorchestration enters:n8n + openclawstage 1:question-per-chatcopilot in the editorone bug, one answerstage 2: session memoryclaude codeproject-level reasoningrepo-aware contextstage 3: the factorygated taskset executiondelegation + handofffull pipeline ownership

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.

the shape of an agentic skill definitionan agent skill carries a name, description, triggers, an input schema, an output schema, quality gates and dependencies, and exposes execute and validate. the input schema names required fields, optional fields and a context window. the output schema names a format, required fields and validation rules. each quality gate carries a name, a condition and an on-fail action.AgentSkill+String name+String description+String[] triggers+InputSchema input+OutputSchema output+QualityGate[] gates+String[] dependencies+execute(context) : Result+validate(output) : BooleanInputSchema+String[] required_fields+String[] optional_fields+ContextWindow contextOutputSchema+String format+String[] required_fields+ValidationRule[] rulesQualityGate+String gate_name+String condition+String on_fail_action

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.

monolithic task versus atomic gated decompositiona feature request to add authentication meets a decomposition test. shipped as one task it becomes build the auth module, where the agent makes forty hidden decisions about session strategy, token lifetime, storage and refresh semantics, producing output that is technically correct but architecturally divergent, with no gate to catch it before it drifts silently into production. decomposed instead, it becomes define the JWT schema, implement token generation, implement token validation, write refresh logic, write a middleware harness and merge, with a gate between every step and a retry loop carrying failure context back on a gate failure.yes: decomposeno: ship as one taskatomic + gated pathgate: schema validgate: unit tests passgate: unit tests passgate: edge cases coveredgate: integration suitegate fail:retry w/ failure contextdefine JWT schemaimplement tokengenerationimplement tokenvalidationwrite refresh logicwrite middleware harnessmergemonolithic path'build the auth module'agent makes 40 hiddendecisions:session strategy, tokenTTL,storage, refreshsemanticsoutput: technicallycorrect,architecturally divergentno gate caught itthen silent drift intoprodfeature request:'add authentication'decomposable?more than onedecision pointworks-ish, unownedworks, every decisionspecified + verified

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).

the lifecycle of a single gated taska queued task is picked up by an agent and executed. the output hits a gate check. if every condition is met it passes, the handoff contract is fulfilled, and the next task starts. if a condition is not met it fails, and while the retry count is under the maximum it re-executes with the failure context attached. once the retry count hits the maximum it escalates to a human, who intervenes and resolves it back onto the passing path.agent picks up taskoutput producedall conditions metcondition not metretry count < maxre-executed with failurecontextretry count = maxhuman interveneshandoff contract fulfilledpipeline completeTaskQueuedExecutingGateCheckPassedFailedRetryingHumanEscalationResolvedNextTask

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.

an agent filling its own knowledge gap mid-taskthe factory orchestrator assigns a task with initial context. the task agent identifies its knowledge gaps and asks a research agent for current webhook limits. the research agent queries multiple external sources including docs, APIs and the web, receives structured results, synthesises and ranks them by confidence, then stores the finding with its source and confidence in a context store. the enriched context is injected back into the agent, which executes with full context and returns output with provenance metadata.context storeexternal sourcesresearch agenttask agentfactory orchestratorcontext storeexternal sourcesresearch agenttask agentfactory orchestratorassign task with initial contextidentify knowledge gaps"i need current limits for this webhook"multi-source query (docs, APIs, web)structured resultssynthesise + rank by confidencestore finding with source + confidenceinject enriched contextexecute with full contextoutput + provenance metadata

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.

all three pillars running across one ideaan idea is handed to a specification agent. for each atomic task, from specification and architecture through implementation to monetisation, the skill library provisions a capability definition carrying triggers, input and output schemas and dependencies. whenever the agent hits its knowledge horizon, autoresearch identifies the gap, queries live sources, ranks findings by confidence and injects enriched context with provenance. the agent executes with full context and submits output to a gate. a passing gate fulfils the handoff contract and moves to the next agent; a failing gate returns the task for retry with failure context. once coverage passes eighty percent and alerts are firing, it deploys. both the skill and research lanes stay active across every task in the loop.shippedgateagent pipelineautoresearchskill libraryideashippedgateagent pipelineautoresearchskill libraryideaopt[knowledge horizon hit]alt[gate passes][gate fails]loop[each atomic task (spec, arch, impl ...monetisation)]both lanes stay activeacross every task in the loophand off to specification agentprovision capability def (triggers, i/o schema, deps)identify gap, query live sourcesrank by confidenceinject enriched context + provenanceexecute with full contextsubmit outputhandoff contract fulfilled, next agentretry with failure contextcoverage >80%, alerts firing, deploy

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 compression transport and its fail-closed defaulta payload arrives on stdin or in a request body and hits detect, a content router. json compresses by seventy to ninety percent, logs by eighty-five to ninety-five, code by forty to seventy, diffs by sixty to eighty. anything the router has low confidence about falls to text, the gentlest squeeze. the S4 compressor is lossy but recoverable. if the original was stored, the output is a smaller payload plus a recovery handle, and retrieve on that handle returns the byte-exact original. if there is no store, the payload passes through unchanged.json 70-90%log 85-95%code 40-70%diff 60-80%low confidencethen text, gentlestyesno storeretrieve(handle)payloadstdin · bodydetectcontent routerS4 compressorlossy · recoverableoriginalstored?smaller payload+ recovery handlepass throughunchangedbyte-exact original

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.

the factory, the shared core, the portfolio and the monetisation ladderthe factory builds and maintains everything below it. it provisions a shared core of authentication and single sign-on, a billing engine, observability and a docs platform. it ships and maintains a portfolio of small bets, time-saving tools, work-life balance, workflow automation and aviation planning, each consuming the shared services. the tools and balance apps enter a freemium consumer tier, automation and aviation planning enter a prosumer subscription tier, freemium converts into subscription, and subscription scales into enterprise licensing and API tiers. revenue from the ladder funds the infrastructure and the next bets, closing the loop back to the factory.provisionsrevenue fundsinfra + next betsships + maintainseach app consumesshared servicesmonetisation ladderconvertscalefreemium(consumer)subscription(prosumer)enterprise licenceAPI tiersapp portfolio: small betstime-saving toolswork-life balanceworkflow automationaviation planningshared core infrastructureauth / shared SSObilling engineobservabilitydocs platformthe factory(builds + maintainseverything below)

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.

$ related field reports

  • the spec was already correct. then i watched the film.

    June 29, 2026read →
  • building skyflow 1.1

    February 5, 2025read →
  • jokes, votes, launch

    December 4, 2024read →
$ sharex ↗linkedin ↗hacker news ↗

downlink shows the off-duty hours across everything i build. the protocol work is logged at null0.blue/journal.

i don't post often. when i do, something happened.

$ what comes next

stratt.blue ↗devaqua.blue ↗tangled ↗