The same questions come up on every agent task: what should it change, how will it check the result, and when should it stop for me? I built those decisions into a repeatable workflow at Rogii and on my own products.
From a spec to a reviewed change
I work through the feature with the agent until the open questions are answered, then split the spec into small issues. Each issue gets a fresh session. The agent writes a test before the implementation, runs type checks and the affected tests, and checks the change in a browser.
A separate agent reviews the diff. At Rogii I built a review plugin with reviewers for acceptance criteria, architecture and runtime cost. Each finding must point to a line of code. Failed lint, type or test checks rule out approval from the review agent.
The implementation session produces one commit and a manual test note. I read the diff before merge. At work, each ticket has its own worktree, so several sessions can run without changing each other's files.
Dark Factory: running the issue queue
I built Dark Factory to start each session automatically. It takes a queue of issues and runs them one at a time, with a local UI showing progress. The agent changes the code, but the app owns git. A completed issue becomes one commit that I can review or roll back.
| When the session ends with | Dark Factory |
|---|---|
| Exit 0 and the issue's verify command passes | commits, moves to the next issue |
A final message starting with NEEDS_INPUT: | stops, shows me the question, resumes the same session with my answer |
| An error, a red check, a crash or the 30-minute timeout | commits nothing and halts the whole queue |
Two decisions worth explaining:
- I ran sessions through the CLI so they would use my existing subscription.
- I based throttling on the CLI's rate-limit events because it does not expose a usage percentage. The queue lets the current issue finish and commit, stops, and resumes at the reset time the event reports.
A test run
I gave it an empty folder and nine issues. The first scaffolded a React app. The second asked the agent to write a design document and issue files for a two-player creature battle game. The other seven were the same prompt repeated: take the next unfinished issue, implement it, test it in the browser, mark it done.
| Issues committed | 9 of 9 |
| Agent time | about 70 min |
| Per issue | 4 to 14 min |
| Cost reported by the CLI (covered by the subscription) | $32.82 |
| Tokens, mostly cache reads | about 26.8M |
These figures come from one prototype run. Resumed-session logs can be incomplete, so the cost and token figures are the CLI's reported totals.
What changed for my team
By the summer of 2026 the whole frontend team used agents every day. Following our August retro, we added end-to-end tests for key scenarios and the review plugin above to catch defects earlier in delivery.
In September I strengthened our tree tests by checking them against a deliberately broken copy of the source. I fixed assertions that missed those defects and verified that the tests caught them (details). We now keep unit-test coverage at about 98% of lines, as recorded on the 15 October 2026 dashboard.
Dark Factory is a private repository for now. I'm glad to walk through it on a call.