04 Work Orchestration And Agent Harness

From Change Request To Merged Work

A change to the integration landscape is followed in GitLab from the request to the merged code. Kloker plans it and builds the small parts, a developer builds the rest in their own harness, and klok.dev's Build → Changes shows where the change stands. Nothing about the work is kept beside GitLab: klok.dev reads the issues, merge requests and bead files and the links between them whenever a page opens, so the same work can be done by hand in GitLab.

The Steps

Step What it is in GitLab Started in klok.dev with
Solution the folder solutions/<ID>_<slug>/ in <tenant>/integration-solutions: the solution document and its descriptor New solution on Solutions
Change request an issue in the registry labelled change-request, solution:<ID> and change:<kind> Request a change on a solution, or New change request on Changes
Design one merge request in the registry that mentions the change request: the solution document brought to the new state, with every new leg marked planned, and the plan changes/<iid>/ISSUE_MANIFEST.json Plan with Kloker, or the solution's Edit
Issues one issue per piece of work, in the project that does it, linked to the change request Build this on the plan's items, then Create issues; or Add issue
Build beads that Kloker implements, or a developer's own harness; every piece ends in a merge request that closes or refers to its issue Break into beads, Implement, Work on it in your harness
Close every issue closed, and the solution document describing what is built Close

Questions to people are issues in the registry too, labelled question and linked to the change request. Who may take each step is The Access You Need in Using Klok Without Writing Code, and every button is described in klok.dev's guide Changes and work.

Kloker Or A Developer

Breaking an issue into beads decides who builds it. Kloker either splits the issue into beads and labels it kloker, or says in a comment why it cannot and labels it developer. A person can hand any issue to a developer.

  • Kloker builds beads. A bead changes one thing in one repository, every decision is already named (paths, route id, topics with their purpose, datamodel and version, configuration keys), its criteria can be checked from the build and the diff, and it needs no step only a person may take. Kloker starts a bead when someone presses Implement, or on its own where the tenant's policy turns pickup on (Kloker → Background).
  • A developer builds the rest in a capable harness such as Claude Code, Codex, GitHub Copilot or OpenCode: a new project or datamodel version, a contract or security change, a refactoring, a failing build to debug, anything still to decide, and a bead Kloker failed on twice. Work on it in your harness gives the commands that prepare a clone and a prompt that points the harness at the issue, its change request and the solution document.
  • A small change needs neither. A mapping, a field or a document is changed on the item's Edit tab and becomes a merge request from there.

Rules That Keep The Work Traceable

  • Everything made for a change request links back to it: the design mentions it, an implementation issue names it in its footer and is linked to it, and a bead names its issue.
  • Approving a plan item is a change in Git, and issues are created only from a plan on main.
  • Whoever works on a bead claims it first, and nobody starts a bead someone else holds.
  • A bead is done when the merge request that implements it merges, because that merge request sets the bead file to done.
  • A comment a tool writes to say where a change stands is marked as such, so the next plan reads the people's comments and passes over it.
  • A change request is ready to close when its issues are closed and its solution document no longer marks anything the change added as planned. A person closes it.

Where You See It In klok.dev

  • Build → Changes → Requests: every change request and where it stands. Its page shows the request, its questions, the design, the issues with their merge requests and beads, and Kloker's tasks for it.
  • Build → Changes → Work: every bead of the tenant, as a list or a board.
  • Kloker → Tasks: Kloker's tasks, where you answer a question Kloker asks while it plans.
  • Kloker → Background: what Kloker does on its own, and the tenant's policy for it.

What Kloker does at each step is Change requests in the agent's documentation (klok docs read klok-application-klok-integration-agent), and the labels and files in the registry are in its README.