Skip to Content
kusaw docsv1.0.0

Factory

A [factory](../glossary.md#factory) is your repositories, a pipeline, and the settings that go with them — one per product.

A factory is your repositories, a pipeline, and the settings that go with them — one per product.

What it is

A factory is the place you run work for one product. It is your repositories, a pipeline, and the settings that go with them: limits, which steps exist, and where a person has to look. One factory owns the checkouts that ship together. A change that has to land in the UI and the API at the same time belongs in one factory, as one task.

Keep separate products in separate factories. Each factory has its own queue, its own budget, and its own data. Do not split the same repositories by team or by kind of work. Specialize with steps, servers, and skills on the one factory that owns those repositories.

The demo factory in this repository is the smallest complete example: one labelled checkout, the default pipeline, and sample tasks. kusaw new demo --repo app=<path> is the usual way to start. make demo-v2 walks two factories over local git repos so you can see the same ideas with more than one product, without pointing at a real codebase.

What you see

On disk a factory is a folder with kusaw.yaml and a data directory beside it. The file names the repositories (each a local git checkout and a short label), the steps, the pipeline, and limits such as how long a run may work. The registry only remembers where that folder lives. Creating a factory writes the file and registers the folder; forgetting a factory drops the registry entry and leaves the files.

In the CLI, kusaw list prints the factories you have registered. kusaw use sets the default. kusaw serve runs them. With no factory flag it runs every healthy registered factory, each with its own work. kusaw ui opens the Dashboard, which can switch between factories.

In the Dashboard you pick a factory and then see its runs. The demo uses labels such as app so you can add a spec without wiring a real product yet. The first factory you create becomes the default until you change it.

The same checkout may be registered in two factories. That is allowed and warned about. Two factories writing to one checkout can produce conflicting branches, so keep one factory for a group of repositories that ship together.

What you decide

You decide which checkouts belong together and whether a new product needs a new factory. You decide the pipeline and its settings: which built-in steps to keep, whether to add your own, where a gate should stop the run, and how much time and budget a run may use.

You decide when to serve and when to open the Dashboard. You add tasks; the factory takes the next run when it can. You do not merge or push from the factory. Delivery leaves a local commit for you to take.

You also decide not to share a product across factories. If two teams work on the same repos, they share the factory and differ in the tasks they add, not in the factory they run.

Where to go next

Meet a factory in the CLI with kusaw new, kusaw list, kusaw use, and kusaw serve. Meet it in the Dashboard as the factory switcher. Meet it on disk as kusaw.yaml in the factory folder.

On this page