Factory LayerAn autonomous software factory

Factory
Layer

A one-page spec in,
a project with green tests out.

brain

Mozaik

Agent framework by JigJoy

hands

Agentic Playbooks

Playbook runner for coding agents

memory

Open Second Brain

Memory for agents in Markdown

Watch

The factory in three minutes.

What an agent needs to build software

The brain needs hands and memory.

A model can plan and reason, but on its own it does not write code, run tests or fix anything, and it forgets everything between sessions.

brain

Mozaik

The factory's brain runs on Mozaik, the agent framework by JigJoy. Three agents plan the work, write acceptance checks from the spec and review every task, several of them at once.

hands

Agentic Playbooks

Work as a graph of agents and scripts: an agent writes code, scripts check it, fix rounds run until it passes. Repeatable work becomes a new playbook.

memory

Open Second Brain

Memory for agents in plain Markdown. The factory recalls similar runs before planning and saves the outcome after. 500+ stars on GitHub.

connecting layer

Factory Layer

The connecting layer between brain, hands and memory. It takes a project from spec to delivery: hands out the work, checks every result and ships a finished project.

a spec in Markdown plan and acceptance checks tasks built in parallel the Critic accepts or sends back memory keeps the outcome project, report and trace

What the factory does

One command. No human in the loop.

brain

Three Mozaik agents

The Architect plans tasks, the Acceptance analyst turns the spec's examples into checks, the Critic judges every finished task.

hands

build-task playbook

Code, quality gates and review run in parallel; two fix rounds on Sonnet, then one on Opus. Merge conflicts go to the integrate playbook.

reliability

One state, one writer

Every step is saved before it runs, so a run survives a crash and continues from the same point.

autonomy

Recovery

A failed task is retried, repaired with a hint or re-planned by the brain, while the other tasks keep running.

delivery

Clean delivery

Install, build, tests and every acceptance check once more on a clean copy of main. A cutoff stops everything on time.

transparency

Report and trace

Time, cost and models of every task, a full event trace and a log of every human intervention.

One run

From a spec to a delivered project.

  1. Spec in. A one-page Markdown spec with examples: what to build and how it should behave.
  2. Plan and acceptance, at once. The Architect splits the spec into tasks while the Acceptance analyst writes checks; the Critic reviews the checks.
  3. Hands at work. Each task runs its own build-task playbook in its own git worktree; independent tasks build in parallel.
  4. Judge and merge. The Critic judges each task; an accepted task joins main only if every check that passed before still passes.
  5. Deliver. A clean copy is built and checked again, then delivered with a report and a full trace.

Test run

Two specs in parallel, no human help.

wordfreq · cli

wordfreq

✓ succeeded
3:21time$0.57cost4tasks0interventions
notes-api · http

notes-api

✓ succeeded
3:48time$0.50cost3tasks0interventions

Not a single line of Factory Layer was written by hand: the whole project was built with APB.

Get started

Run it yourself.

Needs Bun, git, Node.js with npm, apb, o2b and Claude Code. Full setup in the README.

$ git clone https://github.com/itechmeat/factory-layer && cd factory-layer
$ bun install
$ cp .env.example .env            # brain key and the memory vault paths
$ bun run apb:bootstrap           # approve the starter playbooks and profiles
$ bun run factory doctor          # every line must pass
$ bun run factory run examples/specs/wordfreq.md