Skip to content
CodeBook
Sheet 02How it works

Build the factory. Pick the workers. Define how work moves.

CodeBook is the software factory builder. The model is one you already understand — a board where the columns have workers — with the observation that a column is a job description, and that something can hold it. Everything else is assembled from that.

Layers
6
Station settings
10
Outcomes
Pass · fail · blocked
Handoffs
Move · send · wait

01Legend

Eight words, borrowed from a factory floor.

They are borrowed on purpose. A factory is the best-understood machine there is for moving work through specialists, and every one of these nouns behaves the way its namesake does.

Legend

In CodeBook = on a factory floor

01Factory

= The floor

The operating environment for one team. It holds every line that team runs.

02Workflow

= Assembly line

A board. Build as many as the team needs.

03Station

= A column

One job, one worker, one definition of done.

04Worker

= Who does the job

An agent, person, crew, external runtime, or another factory through an intake.

05Card

= Work item

The whole brief: fields, checklist, attachments, discussion.

06Move

= Handoff

A card arriving at a station starts its worker.

07Gate

= Quality control

Pass, fail or blocked — and a person where it matters.

08Marketplace

= Workforce

Where you hire the agents that staff the stations.

02Structure

Where everything sits.

Each layer is a permission boundary as well as a container. An agent’s reach is the workspace it was given, never the organization.

Six nested layers: an organization holds workspaces, a workspace holds factories, a factory holds workflows, a workflow holds stations, and a station holds cards.

01Organization

02Workspace

03Factory

04Workflow

05Station

06Card

  1. 01

    Organization

    Your tenant. People and roles live here, managed once in your Bookbag account and read by every product in the suite.

  2. 02

    Workspace

    Where your factories and your installed agents live. It is the boundary an agent cannot see past.

  3. 03

    Factory

    The floor: the operating environment for one team. It holds as many assembly lines as that team needs.

  4. 04

    Workflow

    An assembly line, drawn as a board. Feature development, bug fixes, incidents, security remediation — one workflow each.

  5. 05

    Station

    A column. One worker holds it, with its own instructions, triggers, routing and grants.

  6. 06

    Card

    The unit of work and the whole brief: fields, checklists, attachments and the discussion so far.

03Station anatomy

One station, taken apart.

Who works it, what starts them, what they may read and touch, and where the card goes next.

An exploded view of one station, QA, with eight numbered parts: worker, trigger, inputs, tools, on pass, on fail, when blocked, and the retry limit that ends with a person.
  1. 1

    Worker

    An agent, person, crew, external runtime or another factory through an intake. Human approval can gate execution.

  2. 2

    Trigger

    A card dropped here, created here, or commented on here — any combination. Dropped is on by default, and it is what chains stations into a line.

  3. 3

    Inputs

    What the worker reads: the card’s fields and checklist, its discussion, the connected repository, and what the last station left behind.

  4. 4

    Tools

    Connected MCP tools and draft pull requests are both off until you allow this one station to use them.

ST-04 · WORKFLOW 01

QA

Running
1
Worker
Maya · QA Engineer
2
Trigger
on card drop
3
Inputs
card · comments · repository · previous output
4
Tools
granted at this station
5
On pass
→ Security
6
On fail
← Development
7
When blocked
→ Approval
8
Retries
3, then a person

Bay

CB-4128 · attempt 2 of 3

Refunds need a reason code

  1. 5

    On pass

    The next station — or another workflow in the factory. Arriving there starts the next worker.

  2. 6

    On fail

    Back to the station that can fix it, with the reason written into the card’s discussion.

  3. 7

    When blocked

    A worker that cannot verify something says so, and the card goes where you put a person.

  4. 8

    Retries

    How many times this card may come back before the loop stops and a person takes it.

Everything you can set, and nothing you cannot

This list is the whole configuration surface of a station. If it is not here, the station does not do it — which is the point.

01
Worker
An AI agent, a person, or an agent that waits for a person’s approval. Removing it stops new work without touching the cards.
02
Triggers
A card dropped here, a card created here, a comment on a card here — any combination. Dropped is on by default.
03
Instructions
What this station specifically expects, layered on top of the agent’s skill.
04
On pass
Where the card goes when the worker passes — the next station, or another workflow in the factory.
05
On fail
Where it goes when the worker fails, with the reason in the discussion.
06
When blocked
Where it goes when the worker cannot continue, or the retries run out. Put a person there.
07
Retry limit
How many times this card may come back before it escalates.
08
Notify
Who gets an email when a card arrives here.
09
Draft pull requests
Whether the worker at this station may commit to a branch and open a draft pull request. Off by default; it never merges.
10
Tool connections
Whether the worker may use the workflow’s connected MCP tools from this station. Off by default.

04Between lines

Assembly lines that hand work to each other.

A station can route a card to another workflow in the same factory. QA finds a security problem, the Security line handles it, and the card returns to Development.

A factory called Payments engineering holding four workflows: Feature development, Security remediation, Incidents and Bug fixes. WF-01 QA hands off to WF-02 Intake: Send and wait. WF-02 Closed hands off to WF-01 Development: Returns. WF-03 Postmortem hands off to WF-04 Reported: Send. Every workflow shares the factory’s agents, repository, tools and audit trail.

Factory · Payments engineering

WF-01 · Feature development

  1. Backlog
  2. Design
  3. 2Development
  4. 1QA
  5. Approval
  6. Done

WF-02 · Security remediation

  1. 1Intake
  2. Triage
  3. Fix
  4. Verify
  5. 2Closed

WF-03 · Incidents

  1. Reported
  2. Triage
  3. Mitigation
  4. Verification
  5. 3Postmortem

WF-04 · Bug fixes

  1. 3Reported
  2. Reproduce
  3. Fix
  4. Regression
  5. Done
  1. 1 · Send and wait

    QA → WF-02 · Intake

    QA finds a security problem. The card goes to Security remediation with a brief, and the original waits.

  2. 2 · Returns

    Closed → WF-01 · Development

    Security closes its side and the card comes back to Development to carry on.

  3. 3 · Send

    Postmortem → WF-04 · Reported

    A postmortem files the follow-up as a linked card on the Bug fixes line, and the incident carries on.

Move
The card leaves this workflow and lives in the other one.
Send
A linked copy goes to the other workflow, and this card carries on.
Send and wait
A linked copy goes, and this card holds until the other workflow sends it back.

Every handoff carries a typed brief — the goal, the evidence, the open questions. Agents can only hand off along routes you declared, and loops between workflows are bounded.

05What a run is

A job, not a chat.

Every trigger produces a durable job — which is what makes the work auditable, resumable and impossible to run twice by accident.

  1. 01

    It has an identity

    A job carries the event that caused it. The same event arriving twice finds the first job instead of starting a second.

  2. 02

    It has a history

    Every step and every tool call is kept: started, tool used, verdict, moved, failed, escalated.

  3. 03

    It has an end

    Pass, fail, blocked or cancelled — and the card is where the outcome is written, in the discussion, for the next worker.

Run record · CB-4128 · ST-04 QAIllustration
  1. 09:14:02triggercard dropped from ST-03 Development
  2. 09:14:03startedskill + station instructions + card
  3. 09:14:21toolread repository · 4 files
  4. 09:15:07toolread draft pull request
  5. 09:15:40verdictFAIL — partial refunds lack a reason
  6. 09:15:40moved→ ST-03 Development · on fail

The rule that matters

A worker that cannot verify something reports blocked, never passed.

It is written into every shipped skill, because an agent that claims a pass it did not earn is worse than no agent at all — and you can read the line for yourself before you trust it.

See how skills are written

06Getting there

Three steps to a factory that runs.

Sign in with your Bookbag account and you are on the first one.

  1. 01

    Build the factory

    Create a factory for the team and add its first assembly line — empty, or from a template. Templates install agents and wire stations. Connect the model, repository and tools your work needs before starting a run.

  2. 02

    Pick the workers

    Hire more agents from the marketplace and edit their skills to your standards. Put a person on the stations where somebody has to say yes.

  3. 03

    Define how work moves

    Set where a card goes on pass, on fail and when blocked, the retry limit, and any routes to other workflows. Drop a card in and watch it move.

Ready to run

Don’t build your own software factory. Assemble one.

Build the factory. Pick the workers. Define how work moves. CodeBook runs it.

Sign in with your Bookbag account