tokenwise.sk

SW Factory — how it works

Act 1 / 5

Request

A request arrives. One sentence in Linear. Everything after this happens without you chasing it.

1 issue in · 0 meetings

  1. Request

    A request arrives. One sentence in Linear. Everything after this happens without you chasing it.

    1 issue in · 0 meetings

  2. Specification

    The Analyst reads the codebase and writes a spec. For UI work an architect draws it first. Then you approve scope and cost.

    2 agents · spec.md + ui-spec.md · your first gate

  3. Development

    Opus writes the code. A second Opus reviews the diff it did not write. Pixels get verified against the spec.

    3 agents · ~40 min · no human in the loop

  4. Quality gates

    Security audits the diff. Performance benchmarks it. The Tester runs Playwright against a real browser. Three gates, in parallel.

    3 agents in parallel · ~9 min wall clock

  5. Ship

    Staging deploys, the machine screenshots the live URL, and you approve production. Deploy takes two minutes.

    2 agents · your second and last gate

The record

81 days, 536 commits

None of the above arrived finished. It was built in the open, one commit at a time, and most of what makes it trustworthy today came from something going wrong first. What follows is not the marketing version: every milestone has a date and a commit behind it.

Commits
536
Days of build
81
Products on the line
6
Agents in the pipeline
8+2 UI
Harness
19.2k LOC
Decision records
22

Nine eras

A green marker means the machine learned something new. An amber one means a human deliberately took capability back. The amber ones matter more — they are the moments the factory chose to be slower in order to be trusted.

  1. 12–14 June3 days · 49 commits

    IThe first run

    From an empty repository to a line that deploys on its own.

    The first commit was not code — it was the architecture. A token budget and cost accounting sat in the harness skeleton from day one, not bolted on after the first surprising invoice. That detail shaped everything after it: the factory knew what it cost before it knew how to work.

    • 12 Jun

      Initial commit — the architecture. A flat orchestrator-worker pattern, with a deterministic orchestrator in code instead of an improvising model.

    • 13 Jun

      A harness with a token budget and cost capture. The single choke point every model call passes through.

    • 13 Jun

      The quality chain. Analyst → Developer → Review → Security → Tester. Halt on failure, and handoffs by file rather than by conversation.

    • 13 Jun

      The first real run failed. Agents span to their turn limit without finishing. The toolkit was showing them tools they were not allowed to use, so they kept trying them. The fix was to restrict which tools are visible, not merely which are permitted.

    • 14 Jun

      Model tiering. A cheap, a mid and a frontier model by role. Never the expensive one for everything.

    • 14 Jun

      A context engine. Agents receive the project's own documentation instead of searching blind.

    • 14 Jun

      Cross-issue learning. The factory remembers finished work, reusable components and its own failures.

    • 14 Jun

      Always-on. A task moved in the tracker starts the line by itself. From here the factory runs, rather than gets run.

    • 14 Jun

      Then fifteen commits about deployment: timeouts, tooling inside the sandbox, environment injection, rebasing on resume. The last mile cost more work than the entire pipeline.

    Unlocked

    Request → spec → code → review → tests → staging → production, with no human in the middle. On one project, and without brakes.

  2. 15–16 June2 days · 13 commits

    IIBrakes, and a bill for €8.92

    The day the factory got approval gates and learned not to loop.

    One task failed its tests three times in a row. Each time the developer agent tried to repair the implementation; after three rounds the bill was €8.92 and the credits ran out. The conclusion was not to improve the retry loop. It was to delete it.

    • 15 Jun

      Human approval gates. A production deploy needs an explicit approval from every team member. No agent can trigger one.

    • 15 Jun

      Authenticated webhooks and run locks. Concurrent runs stop overwriting each other's state.

    • 15 Jun

      A cost estimate before development. The work is sized S/M/L/XL and the harness derives the expected tokens and euros from it.

    • 16 Jun

      The end of the test fix loop. Failing tests stop the line for human review. The code-review loop stayed — cheaper, and a higher return.

    • 16 Jun

      The factory remembers failures. What broke, at which gate and why, is visible to future runs on similar work.

    • 16 Jun

      One gate, two meanings. The same approval state covers signing off the spec before development and signing off before production.

    Unlocked — a human decision

    The factory lost the ability to spend money unobserved. You approve the specification before the first expensive token is spent.

  3. 3–4 July2 days · 4 commits

    IIITaste and memory

    Four commits carrying thirteen tasks. The factory stopped being blind to design.

    A dedicated role appeared between analysis and development — the UI Architect. Not to make things pretty, but because a design decision taken in passing while writing code is a design decision taken by accident. At the same time the context engine stopped behaving like a vacuum cleaner and started behaving like a librarian.

    • 3 Jul

      UI Architect and design context. A project's design system — colour, spacing, components, UX conventions — is extracted from the repository and stored. The agent reads it instead of inventing it.

    • 4 Jul

      Structural summaries instead of whole files. The most relevant files in full, the rest as structure. The tokens saved are visible in the context itself.

    • 4 Jul

      Prompt caching. The static agent definition goes first and the task last, so the expensive part of the prompt can be reused. Cache hit rate is measured on every call.

    • 4 Jul

      A circuit breaker. Three identical failures on similar work within a week block the next attempt. The factory stops walking into the same wall on its own.

    • 4 Jul

      Semantic search over past work, and adaptive budget calibration from history — which can only tighten a budget, never loosen it.

    • 4 Jul

      A design knowledge base. 161 product categories, 85 styles, 74 typographic pairings, 99 UX guidelines. The harness retrieves candidates at zero token cost; the agent chooses between them.

    Unlocked

    The output stopped looking generated. And the cost of a task started falling without the quality falling with it.

  4. 11–15 July5 days · 61 commits

    IVOne standard for the whole portfolio

    The Golden Stack. Five products, five different technologies, one migration.

    The largest single leap in this history, and the least AI-flavoured thing in it. Five products ran on five different stacks, so every task needed different context, different scripts, different tests. The decision: one stack for everything, a feature freeze, five waves, big bang. In four days every project was unified and back in production.

    • 11 Jul

      A lint gate inside the sandbox. Zero tokens, and it catches exactly what an expensive model would otherwise be spent on.

    • 11 Jul

      A cost report. Spend per project and per agent, estimate against actual, cache hit rate.

    • 12 Jul

      The Golden Stack as a canonical standard. Machine-readable version pins and a compliance checker alongside the prose.

    • 12 Jul

      The standard is injected into prompts. It is not a document sitting on a disk; it is an input to every decision the agents make.

    • 12 Jul

      A monthly upgrade watch. When a pinned technology ships a major version, a task opens by itself. Every project moves together, or none does.

    • 13 Jul

      Tooling travels with the repository. Every device — desktop, phone, web session — sees the same pinned version.

    • 15 Jul

      Migration complete. All five projects on one stack, in production, behind CI quality gates.

    • 15 Jul

      Stale documentation is a bug. Because it goes straight into an agent's prompt as truth.

    Unlocked

    A new project joins with a single command instead of a week of integration. The factory stopped being a tool for one product and became a line.

  5. 16–17 July2 days · 35 commits

    VIndependence and rules

    The factory stopped depending on a single model vendor — and got a security baseline.

    In one day a layer appeared that separates what has to be done from who does it. Any role can run on a different vendor's model, with the same permissions and the same accounting. Quality is not settled by an AI referee but by measured outcome: did the build pass, did review pass, what did it cost, how long did it take.

    • 16 Jul

      A runner contract. Budget and cost accounting sit above every vendor and cannot be bypassed by swapping the model underneath.

    • 16 Jul

      Second and third vendor adapters, behind the same permission layer as the first.

    • 16 Jul

      A quality scorecard and leaderboard. Plain scoring, no AI referee. Historical quality, cost and speed per vendor.

    • 16 Jul

      This website joined as the sixth project. From here the factory builds its own site through its own line.

    • 17 Jul

      One security baseline for every project and for the factory itself. The Security Auditor receives it as a checklist and fails a change that breaks a mandatory rule.

    • 17 Jul

      Five product rules. Dark only, mobile first, findability, English first, store readiness — mandatory for every current and future project.

    Unlocked

    If one model provider gets expensive or goes down, the line keeps running. Security and the product minimum are not checked at the end; they are inputs to the brief.

  6. 20–23 July4 days · 42 commits

    VISight, taste and human memory

    The first time the factory looked at what it had made.

    Until this point UI was judged blind — from a written spec, without a single pixel. Visual defects were found by hand, late. Three things arrived together: verification against the live staging URL, a visual check of real screenshots, and, most importantly, a place for a human to deposit knowledge that exists nowhere in the code.

    • 20 Jul

      Staging verification. After deployment the line walks the real URL, takes screenshots, runs tests against it and attaches the evidence to the task.

    • 22 Jul

      Visual QA. Mobile at 390px and desktop at 1280px, checked for defects. Explicitly a guardian of intent, not a judge of beauty — there is no AI rubric for aesthetics.

    • 22 Jul

      A two-mode UI Architect. Extend mode for incremental work, where novelty is a bug; define mode for a new page, where a design thesis and an anti-generic check are required.

    • 22 Jul

      A brain for human knowledge. A person writes a note; agents retrieve it with a tool. Agents may read it, never write it.

    • 22 Jul

      An art director and a direction pack. A project's design direction as a document that gets parsed and fed into the line.

    • 23 Jul

      And the reality of operations: the machine's memory ceiling went from 512 MB to 2.5 GB, because the old limit had been killing runs outright.

    Unlocked

    “It works” stopped being a claim by an agent and became a screenshot and a green test against a live address. Knowledge only a human holds finally has somewhere to go.

  7. 25 July – 2 August9 days · 129 commits

    VIIThe shop window, and a key for the customer

    The densest stretch in the whole history — and the first time a customer got a key.

    The factory built itself as a product. The desktop site is a single screen of nine acts with a live 3D scene; a phone gets a document built from the same content, written once. Then came the change that alters the relationship with a customer: a portal with a login, a dashboard, live task status and visible spend.

    • 25 Jul

      A cinematic hero. Shader cores, a 2,400-particle field, a hand-rolled bloom — and a frame-rate watchdog that degrades one way only, so a struggling phone simplifies the scene and never flickers back.

    • 25 Jul

      A capability gate. The shell is chosen by viewport and input device, not by graphics card. The server always renders the document, so the content survives even where the 3D cannot.

    • 28 Jul

      The Analog Core landing. Nine acts, one source of content for both desktop and phone.

    • 28 Jul

      Live data, projects, ideas, a model arena. The site stopped being a brochure and became a window into a running line.

    • 29 Jul

      Analytics with consent, sitemap, legal layer, plus a four-step project wizard.

    • 30 Jul

      A small commit that says a lot: unsubstantiated vendor claims were deleted from the arena because they were not backed by measurement.

    • 31 Jul

      Security rules and a prototype generation pipeline.

    • 1 Aug

      The customer portal. Sign-in, activation, dashboard, admin panel, approval functions, security rules and indexes.

    • 2 Aug

      The line syncs task state into the portal. A customer can see what is happening to their request without having to ask.

    Unlocked — a human decision

    Transparency became a feature instead of a promise. You get an account, live status, visible spend, and the approval.

  8. 3–7 August5 days · 108 commits

    VIIIMeasurement instead of opinion

    The factory started running experiments on itself.

    The old context engine pre-packed context. The new one inverts it: a minimal core plus tools the agent uses to pull exactly what it needs, at the moment it needs it. No tokens spent on context nobody read. On top sits the layer that turns this into science rather than opinion — feature flags, telemetry, and a mandatory classification of every failure. Was it bad context, or bad judgement?

    • 3 Aug

      A lean core and just-in-time retrieval. The agent decides what to pull; the server verifies it is allowed to have it.

    • 3 Aug

      Failure attribution. Every failure is classified — context missing, wrong or ignored, against reasoning, implementation or test error.

    • 3 Aug

      Feature flags and telemetry. One field switches the whole engine back to the previous version. 130 tests cover it.

    • 4 Aug

      Model choice in the admin interface. Vendor and budget mode per project, set through a screen instead of in code, with a leaderboard of historical quality, cost and speed.

    • 4 Aug

      One source of truth for project configuration. The pipeline reads it live, with a cache and a fallback.

    • 4 Aug

      Verification that a pull request is genuinely merged before a production deploy runs.

    • 5 Aug

      Cost per run. Run and loop counts, and a token spend indicator inside the customer dashboard.

    • 7 Aug

      This page. And a single shared header across every screen the factory owns.

    Unlocked

    The factory can measure whether a new version of its own brain beats the last one — and roll it back with a single switch when it does not.

  9. 8–31 August24 days · 95 commits

    IXThe Analyst learns to think

    A four-turn process, corpus distillation, and the end of pre-packed context.

    The Analyst agent was rewritten from scratch. Instead of receiving a wall of context it might not need, it now follows a structured four-turn process: scope identification, codebase exploration, memory retrieval, then synthesis. At the end of every run, a distiller compresses the work into a corpus record worth keeping — so the next Analyst learns from the last one.

    • 8 Aug

      Provider Health Check. A manual smoke test of all registered providers from the admin UI — nine models tested, results stored with history.

    • 11 Aug

      Process page. An interactive visualization of the entire pipeline, with collapsible phases and mode/provider filters.

    • 14 Aug

      Self-service onboarding. A four-step wizard that lets a new project join the factory without touching code.

    • 17 Aug

      n8n installed. The automation layer for the growth loop — n8n.tokenwise.sk live with nginx, SSL, and daily backups to GCS.

    • 17 Aug

      MDX blog infrastructure. Weekly AI articles now deploy through the same pipeline as code.

    • 20 Aug

      Context Engine V0. The Planner was removed; a minimal core plus JIT retrieval replaced pre-packed context. The Analyst now decides what to pull.

    • 20 Aug

      Four-turn Analyst. A structured process: scope → exploration → memory → synthesis. 130 tests cover the new engine.

    • 24 Aug

      Analyst context restoration. An audit found most of V0 was dead in production. Fixed in one wave — project briefs, retrieval traces, and spec validation now work.

    • 24 Aug

      Corpus distillation. One Haiku call at the end of each run turns the work into a structured record — approach summary, lessons, what to avoid. €0.02 per call.

    • 25 Aug

      Audit pages. Native Next.js pages replaced iframe embeds for pipeline audit reports.

    • 31 Aug

      Measurement layer. O-series optimizations: founder comments filter, provider telemetry, budget mechanisms unified across all paths.

    • 31 Aug

      Social media publishing. GTM Wave 4: direct Meta Graph API calls from the pipeline. Articles with growth:article label auto-post to Facebook and Instagram after production deploy.

    Unlocked

    The Analyst stopped being a reader of walls and became a thinker with a process. Every run leaves behind knowledge the next one can use.

Eleven turning points

Ordered by impact rather than by date. Each one changed what the factory can do, not how it looks.

  1. 12–13 June

    Budget and cost accounting were in the skeleton from day one

    Not bolted on after the first surprising invoice. Every model call passes through one place that counts tokens and euros — and that still holds now that several vendors are in play.

  2. 15–16 June

    Human gates, and the deletion of an expensive retry loop

    After a task burned €8.92 on three failed repair attempts, the factory stopped trying again. Failing tests halt the line and call a person. A production deploy needs an explicit approval.

  3. 12–15 July

    One standard for the whole portfolio

    Five products, five stacks, one four-day migration. Since then, onboarding a new product is a single command rather than a week of integration. The biggest throughput gain in the history.

  4. 14 June

    Always-on — the line runs itself

    A task changes state and the pipeline starts without anyone pressing anything. This is the difference between a tool and a line.

  5. 16 July

    Independence from a single model vendor

    Any role can run on a different provider, with identical permissions and identical accounting. Quality is settled by measured outcome, not by an AI referee.

  6. 20–22 July

    The factory learned to look

    Staging verification walks the live address and files the evidence. Visual QA checks mobile and desktop screenshots. “It works” stopped being an agent's opinion.

  7. 1–2 August

    The customer portal and live task status

    Your own account, the stage your request is in, and what it has consumed. Transparency as a feature rather than a promise.

  8. 3–4 July

    A UI Architect as its own role

    Design stopped being a by-product of writing code. The project's design system is read from the repository instead of reinvented on every task.

  9. 14 June · 22 July

    Memory — first the machine's, then the human's

    The factory learns from finished work, reused components and its own failures. Since July it also has a place for the knowledge that will never be in the code.

  10. 3–5 August

    An engine that can prove it improved

    Agents pull context on demand, every failure is classified by cause, and every change to the engine can be measured and reverted with one switch.

  11. 20–24 August

    The Analyst learned to think in turns

    A four-turn structured process replaced the wall-of-context approach. Scope first, then exploration, then memory, then synthesis — and a distiller that turns every run into a lesson for the next one.

The version six weeks from now will beat this one

That is the whole point of measuring instead of guessing. If you want your product built on this line, the next era starts with your brief.