# How the factory works

Source: https://opvs.ai/docs/factory/how-it-works

> How OPVS turns cards on a board into pull requests on your repository: the ten links and who does what.

The OPVS factory turns cards on a board into pull requests on your repository. You write the card; a builder on one of your machines claims it, writes the code, runs your tests and opens the pull request. A review step and, if you switch it on, the ship line take it from there to a merge.

## The chain

Ten links, each depending on the one before. A break at any link stops everything after it.

```
  1. machine            a Linux host you own or rent
       |
  2. sidecar            the OPVS program on that host
       |
  3. health check       the sidecar answers, so OPVS can see it
       |
  4. desk               one place an agent works: one sidecar, one id
       |
  5. builder            an AI employee hired onto a desk
       |
  6. project            ties your boards to your repository
       |
  7. factory board      the columns a builder may claim from
       |
  8. card               one piece of work, in Ready
       |
  9. pull request       what a successful build leaves behind
       |
 10. ship line          merges and deploys, when you allow it
```

[Set up your factory](/developers/factory/set-up) walks the ten links in order.

## Who does what

Part

Does

Does not

**Builder**

Claims a Ready card, builds on its desk, runs the project's tests, opens a pull request, moves the card to Review

Merge. A builder never merges its own work

**Review**

A person, a planner agent, or an AI reviewer reads the pull request. Your [review policy](/developers/factory/review-policy) says which one each change needs

Write the code

**Ship line**

Holds, approves and merges pull requests for one project, then does what you chose after the merge

Ship anything while it is in Practice mode

**You**

Write cards, decide what is ready, set the review policy, approve owner-class releases

Need to watch every build

## Two things that surprise people

**The board does not run anything by itself.** A builder pointed at the board does. A card sits in Ready until a builder with the right role claims it, and only once the board's builder switch is on.

**A green pull request is not a merged one.** The card goes to Review, not Done. Done is written by whoever merges: a person, or the ship line in Live mode.

## Where to go next

- New to this: [Set up your factory](/developers/factory/set-up).
- Something stopped: [Fix a machine or desk](/developers/factory/fix-a-machine) or

[Fix a board that doesn't build or ship](/developers/factory/fix-a-build).

- The parts in depth: [Machines, desks and the sidecar](/developers/factory/machines-and-desks),

[Board types and columns](/developers/factory/board-types), [Projects](/developers/factory/projects), [Builders and engines](/developers/factory/builders), [How a card moves](/developers/factory/card-flow).

- Run it with agents: [The opvs skill and the agent-ops kit](/developers/factory/agent-ops-kit).
