14. The work in git

Each role's work (chapter 6) is kept in git, the version control system used by nearly all software development. This chapter explains how, and why git and not something else.

A dedicated server, one repository per role

The work lives on a dedicated git server, built so that many agents can push changes at the same time. Each role of each business has its own repository, and that role's work/ folder is a copy of it. Each person also has a private repository for their own things, which is never part of the role's work.

The server keeps each repository's data in a Postgres database and the files on disk. Two alternatives were discarded: a simpler database (which does not handle many simultaneous writes well) and a provider's storage service (to avoid depending on it for something so central).

Credentials per repository

Conversations do not run git on their own: the runtime runs it (chapter 13), with a short-lived credential that only works for that role's repository. A small separate service issues those credentials, scoped by prefix, so that no piece running on the machine holds a key able to open every repository.

How it is saved

  • Before each turn, the latest state of the main branch is pulled; after each turn, the result is pushed.
  • Each change carries as its author the name of the conversation that made it and, in the message, the delivery that prompted it.
  • If the business factory runs in more than one place (for example, on an office computer and in the cloud), each change states which side it was made on, in a final line of the message. That way, the history and any conflict show who wrote what.
  • Each conversation works in its own git working copy, so as not to mix in another conversation's half-written files; a single shared copy was discarded for exactly that reason.
  • A push is never forced. If two changes collide and the text can be merged, it is merged. If not, the conversation's own change is pushed to a conflict branch named after the conversation and the date, and the role's main conversation is notified and decides which one stays.

Why git

Git is not the obvious choice for the work of a sales department. It is the right one for three reasons:

  • history and rollback: every change is recorded with who and when, can be compared and can be undone (chapter 6);
  • recovery: if the machine is lost, the work is intact on the server;
  • coexistence: the same business factory can run in two places at once on the same repositories, and git knows how to merge what each side wrote.

What is not taken from software development is its ritual: in a business factory, the business roles save directly to the main branch, without a branch per change or reviews, because it is not a software factory.

Table data: one data store per role

For data in table form (chapter 6), git does not work: binary data files cannot be merged. The proposed approach uses open tools:

  • each conversation works on a local database, with DuckDB and the DuckLake format;
  • a central copy, also DuckLake, with its catalog in Postgres and the data in object storage, one space per business, behind the coordinator;
  • the runtime synchronizes: it pulls, pushes what changed and, if there is a conflict, sets it aside to be decided («pull, decide, push»).

Text in git and tables in the data store: pull, push, and set aside what collides.

One technical note came out of the tests: the DuckLake catalog on a DuckDB file does not allow several simultaneous writes, while on a SQLite or Postgres database it does. This is the kind of detail that decides whether a design works with one conversation or with many.

In short, each role has a repository on a dedicated git server, the runtime saves every turn with the conversation's name and its side, nothing is forced, and table data goes to a separate data store built on open tools. The next chapter looks at how agents reach the business's systems, from the inside.