Coding agents are increasingly capable of implementing features, fixing bugs, and reviewing code.
But running a software factory involves more than running coding agents.
Someone—or something—has to decide what to work on next, track execution state, verify results, coordinate review and repair, and determine when human judgment is required.
I've been building and operating my own software factory to explore these problems. Today, I'm introducing taisan, an open-source orchestrator written in Rust.
https://github.com/ttbc-dev/taisan
taisan connects issue selection, implementation, review, and repair into a controlled development workflow. The development methods themselves are delegated to replaceable adapters.
From prompts to protocols
In an interactive coding session, I can supply missing context, notice stalled work, and decide whether a result is sufficient. In a headless workflow, those responsibilities do not disappear. They need to be expressed as explicit contracts, recorded evidence, and rules for advancing or stopping work.
| Interactive development | Headless development |
|---|---|
| Conversational instructions | Explicit work contracts |
| Agent-specific behavior | Adapter protocols |
| Implicit expectations | Runtime invariants |
| Conversational feedback | Structured findings and decisions |
This is what I mean by moving from prompts to protocols. Prompts still matter inside workers, but they are not the mechanism that authorizes workflow transitions.
Building a software factory
My goal is to automate software development while producing codebases that can be maintained and evolved over time.
To work toward that goal, I started Tokyo Tiny Builders Club (TTBC).
A small club building tools for building software.
The projects under TTBC are based on tools I've developed and operated for myself. I'm gradually separating their responsibilities and rebuilding them for public use. The existing factory is also how I develop taisan itself, so the problems I encounter while building it feed back into its design.
The overall architecture consists of four main components:
| Component | Responsibility |
|---|---|
| taisan | Workflow orchestration and execution control |
| devflow | Selecting the next issue to work on |
| coding-worker | Implementation, review, and repair |
| rui | Collecting and retrieving execution evidence |
taisan coordinates the workflow, while the other tools provide specialized capabilities.
The integration with rui is part of the planned architecture. Both devflow and coding-worker are currently private, with plans to release them as open source.
From a Hermes Kanban prototype to taisan
taisan did not start as a greenfield architecture.
It grew out of problems I encountered while operating an earlier software factory built on Hermes Kanban.
Hermes Kanban provides a task board for multiple agents. A dispatcher picks up executable cards and launches the assigned agents, while the board retains their states and execution histories.
https://hermes-agent.nousresearch.com/docs/user-guide/features/kanban
I built additional automation around it.
A scheduled job would ask devflow to select the next issues. Those issues would become cards, which coding-worker would pick up to implement changes, open pull requests, and run review and repair cycles.
I also built mechanisms to surface work that required human intervention.
This worked, but operating it exposed a recurring problem: different components disagreed about the state of the same work.
For example, an implementation process could time out while its Kanban card remained marked as running. I had to add reconciliation logic to compare card states, execution records, and actual processes.
An architecture audit summarized the problem:
authority is split across card + request + run record + live process, so disagreement is reconciled rather than impossible.
Another example was a worker continuing to run after the execution lease on its card had expired.
These were not problems I could solve simply by improving prompts or switching to a more capable model.
They were problems of execution control.
I wanted to explicitly define:
- What evidence allows work to advance?
- Under what conditions should execution stop?
- What must be confirmed before execution resumes?
- Which decisions belong to a human?
That experience led me to separate workflow orchestration into an independent tool: taisan.
Two design principles
1. Adapt the workflow to what you build
Even when using the same coding agent, different software projects require different development and verification methods.
A workflow suitable for maintaining a language implementation may be excessive for a small change to a web application.
For a language implementation, I might want to explore a much wider range of input combinations rather than simply running the existing test suite.
The appropriate review criteria, verification techniques, and repair strategies depend on the software being built.
taisan therefore delegates issue selection and worker behavior to replaceable adapters.
Adapters can determine which models and prompts to use, how to investigate changes, and what development methods are appropriate for a particular codebase.
taisan controls how work progresses based on the reported results and observed evidence.
The orchestrator should not dictate a universal software engineering methodology.
2. Automate execution, preserve human judgment
I want agents to proceed autonomously when they can, but I also want them to stop when a decision about requirements or repair strategy requires human judgment.
While operating the prototype, I repeatedly investigated halted workflows with an agent and classified their causes.
Some failures could be recovered mechanically. Others required a genuine decision.
For example:
- A temporary timeout while retrieving issue information can be retried.
- A permission denial should be recorded and surfaced rather than resolved by automatically expanding permissions.
- A review finding that requires a design decision should be returned to a human.
taisan incorporates these boundaries into its workflow.
The goal is to progressively automate recovery where the recovery conditions are understood, while preserving human control over decisions that cannot safely be automated.
How taisan works
taisan separates workflow control from the components that perform individual development tasks.
The main components are:
- Core: owns workflow progression and persisted work state.
- Selector Adapter: proposes issues to work on.
- Worker Adapter: performs implementation, review, and repair.
- Worker Supervisor: launches workers and observes execution.
- GitHub Adapter: handles pull request publication and observation.
The Core accepts work, persists its state, and requests execution through the appropriate adapter.
When a worker reports its results, taisan checks the artifacts and verification results before deciding whether to publish a pull request, continue with repair, or request human intervention.
A particularly important boundary is that adapters report results but do not control the workflow state.
As documented in the adapter contract:
Neither adapter writes core state, reserves capacity, creates Executions, retries Work, or declares a Work completed.
Consider a failure scenario.
taisan crashes around the time a worker is launched. After restarting, it cannot immediately determine whether that worker actually started.
Launching a replacement worker could result in two processes modifying the same worktree or branch.
Instead, taisan retains the execution slot and prevents a replacement from starting until it can establish what happened to the original worker.
Uncertainty is represented explicitly rather than treated as permission to retry.
This is the kind of operational behavior that becomes increasingly important when development runs unattended.
Further reading:
When automated code reviews do not converge
One of the more surprising lessons from operating my factory was that repeated AI reviews could continue finding actionable defects after several rounds of repair.
I had expected the process to settle after a few passes, as I was accustomed to in human review workflows. That expectation turned out to be an unreliable stopping rule.
A concrete example is taisan PR #436, which received five automated review submissions on successive revisions, with repairs in between.
| Review submission | Example finding | Repair commit |
|---|---|---|
| Second | A delayed start could report an invocation as started despite a durable stop intent. | 309fe0a |
| Third | Deadline enforcement skipped an exited leader with surviving descendant processes. | 1491ebb |
| Fourth | Unknown descendant liveness could be omitted from the calculation of stop proof. | 568f075 |
These were correctness issues in execution control, not stylistic suggestions. Each listed finding has a corresponding repair. This is one development case, not a benchmark comparing AI and human reviewers, and it does not establish that every automated finding was valid.
The lesson for me was that AI code review is not simply human code review performed faster. It changes the assumptions under which I design the review process.
In taisan, the repair decision is explicit:
- Review decisions are bound to a specific revision; an old decision cannot authorize repair on a newer head.
- Findings receive explicit dispositions:
Fix,Dismiss,Accept, orWait. - Repair requires a matching revision and a complete set of dispositions, including at least one
Fix. - A work-wide repair budget limits further repair and escalates when exhausted instead of declaring the code correct.
The review contract tests cover stale decisions, new findings on the same head, decision history, and budget exhaustion.
A budget bounds resource use; it does not tell me how many defects remain. Finding validity, semantic deduplication, repair strategy, and detection coverage are still separate problems. I want to explore those further rather than equating termination with correctness.
Running a development workflow
taisan v0.3.0 includes public reference adapters, so you can try it without access to my private devflow and coding-worker implementations.
The following example assumes a configured test repository, GitHub access, and the taisan-worker-claude reference adapter, which drives the Claude Code CLI.
Follow the installation guide and run taisan check before submitting work.
taisan --db "$TAISAN_STATE_DIR/store.db" submit \
--intent "Implement greet(name) and add unit tests" \
--verification "python3 -m unittest discover -s tests -v" \
--idempotency-key greet-demo-1
taisan --db "$TAISAN_STATE_DIR/store.db" run
The submitted work enters the queue, and taisan launches a worker.
Once the worker produces a change, taisan runs the specified verification against the resulting commit. If the publication requirements are satisfied, it creates a pull request on GitHub.
When a review finding requires human judgment, the workflow pauses.
The taisan attention command surfaces the reason for the pause and the next action required.
After inspecting the pull request and recording a decision, the human can release the workflow to continue with repair and verification.
The final merge decision remains with the human.
In a separate live acceptance test for v0.3.0, I confirmed that a workflow paused for review judgment could resume after a human decision and proceed to repair.
The recorded execution transitioned from paused_judgment back into the queue with next_role=fix, then continued execution.
You can also configure scheduled issue intake using the public selector adapter instead of submitting work manually.
Reference adapter configuration
Current status and roadmap
With v0.3.0, I've verified that taisan can independently verify worker-produced changes, publish pull requests, and resume repair after human judgment.
The next milestones focus on bringing the operational capabilities of my earlier prototype into taisan's execution model.
- v0.4 — Remote execution: Run workers in separate environments, starting with automated PR review.
- v0.5 — Operational resource management: Control execution based on memory and disk usage, and handle credential expiration.
- v0.6 — Automatic recovery: Recover from understood failure conditions using bounded attempts and renewed verification, while escalating unresolved decisions to humans.
Beyond those milestones, I want to introduce end-to-end tracing across the development workflow.
Much like distributed tracing in microservices, a single unit of work should be traceable from issue intake through implementation, review, and repair.
Aggregating execution time and model usage per pull request would make it possible to understand the actual cost of development and identify bottlenecks in the factory itself.
I also plan to release devflow and coding-worker as open source.
From generating code to maintaining software
As coding agents become more capable, the question I find increasingly interesting is not just how to make an individual agent write better code.
It is how to build a system around those agents that can keep producing and maintaining software over time.
That involves persistent state, verification, failure recovery, explicit execution boundaries, and human judgment.
taisan is my attempt to make those concerns explicit and provide a foundation for building software factories without prescribing a single development methodology.
Using the existing factory to develop taisan itself gives me a way to keep testing these ideas against real development work. The goal is not simply to generate working code once, but to maintain a codebase that can keep evolving through repeated agent contributions.
There is still a long way to go.
But the first version of that foundation is now available as open source.
- taisan: https://github.com/ttbc-dev/taisan
- v0.3.0 release: https://github.com/ttbc-dev/taisan/releases/tag/v0.3.0
- Tokyo Tiny Builders Club: https://github.com/ttbc-dev
If you're building or operating a software factory of your own, I'd be interested in hearing how you approach workflow state, verification, and recovery.
Top comments (0)