all posts

Published

Automating feature development with agents and Orca

How I plan to build an automated agent workflow with Kanvas, Orca and Tailscale on an 8 GB laptop, so I get the same workspace wherever I am.

#agents #ai #automation #workflow

Over the last few weeks my Twitter (X) feed has shown me several posts from builders who have multiple agents writing code on their own, coordinated by an orchestrator such as T3 or Orca. Seeing what they’ve built made me want to set up my own version, and it’s going to be my project for this Christmas.

It also solves a real problem for me: having the same workspace running whether I’m in Madrid, at my parents’ place or anywhere else, while depending as little as possible on each machine’s operating system, since in Madrid I use Arch Linux and at my parents’ I use a Windows 11 computer.

Architecture diagram: from two homes and a phone, Tailscale and SSH give access to an old Linux laptop running Kanvas and Orca. Orca creates one worktree and one branch per task, where the Planner, Coder, Reviewer and Simplifier agents work, and each task ends in a GitHub pull request that is merged into main one at a time.

The server: an 8 GB laptop

The server will be the laptop I had through university, running Linux. There’s a catch: it only has 8 GB of RAM. That should be enough for a simple V1 with a couple of projects, but it has its limits:

  • Heavy builds. Rust projects, or mobile apps that need Android emulators, will have to be built on whatever machine I’m using at the time, and the different operating systems can cause problems.
  • Few agents at once. With 8 GB of RAM I can’t run many agents in parallel.

The stack

I’m going with a stack a lot of people have already adopted:

  • Tailscale + SSH to control access to the agents and the repositories. Only the devices or networks I allow can get in.
  • Kanvas, built by Mihura, to track the state of each task and decide which role each agent plays at each point. Its workflow is shaped around the way its creator works (which is completely normal), so I’ll fork it to fit mine.
  • Orca to orchestrate the agents: it opens a session per task, gives it its own worktree and branch, and starts each agent when its turn comes. It runs as a headless CLI or server, so I can drive it over SSH or from its chat.

One task, one worktree, one branch, one PR

The whole system rests on one rule: 1 task = 1 worktree = 1 branch = 1 pull request.

  • Agents never share a folder or a branch. Each task lives in its own worktree of the repository, so several can move forward in parallel without stepping on each other.
  • main only changes through merges, one at a time, after CI and review pass.
  • After each merge, the other branches rebase onto main and run CI again.

Each Kanvas state triggers an action:

Kanvas stateAction
ProposedPlanner
To doCreate worktree and branch
In progressCoder
In reviewReviewer + Simplifier
DoneMerge and delete the worktree

The workflow and the agent roles

Every task goes through four phases, and each phase is handled by an agent with a different role:

  1. Planning (Planner): analyzes the task and proposes a plan.
  2. Implementation (Coder): implements the change and tests it in its worktree.
  3. Review (Reviewer): reviews and validates the work.
  4. Simplification (Simplifier): simplifies the changes before the PR is opened.

If CI fails or the review asks for changes, the task loops back automatically.

Skills

Skills are what will define the workflow and each agent’s role. I haven’t written them yet, but the plan is to have one per role:

  • Planner: read the Kanvas task and the affected code, and return a short plan: which files change, which tests are needed and which questions are still open. If the task is ambiguous, it should ask instead of guessing.
  • Coder: follow the plan without drifting from it, work only inside its worktree, write tests alongside the change, and pass lint, type checks and tests before calling the task done.
  • Reviewer: look for real problems: logic errors, uncovered edge cases, tests that don’t test anything, or security issues. No style comments the linter already catches.
  • Simplifier: remove what isn’t needed without changing behavior, such as duplicated code, premature abstractions or unnecessary dependencies, with tests green before and after.

On top of the roles there will be a set of shared rules that every agent loads:

  • Each project’s conventions: package manager, build and test commands, and folder structure.
  • Branch, commit and PR format, so every PR is reviewed the same way.
  • Clear limits: no agent merges or touches main. That call is mine.

The skills will live in their own repository, alongside the prompts and hooks, so when I improve one, the improvement reaches every project at once. This will probably be the part that changes most during the V1: whenever I review a PR and find a recurring mistake, the fix won’t be to correct it by hand but to adjust the skill that let it through.

My part in all this

The goal is to step in as little as possible in what the agents build. My job should come down to reviewing each PR, especially at first while I test the V1, and checking that:

  • the solution can scale;
  • nothing was built more complex than it needs to be;
  • no bad practice was used to reach the goal, like reaching for useEffect in React where it doesn’t belong and causing unnecessary re-renders.

Legend or clown

I don’t know how this is going to turn out. By January I might have several agents opening PRs while I sleep, or the laptop might explode at the third agent running at once and the project won’t survive a single day. This Christmas I find out whether I end up a legend or a clown, and I can’t wait to see which.