Several agents, one repo.

Each agent takes a task. The others see it is taken and can’t take it too.

Fig. 01An orchestrator and three agents

An orchestrator splits the goal into three tasks, each tied to its folders. Three sub-agents each take one and work at the same time. A fourth attempt on a task already taken is refused.

Without it.

  • Same task, twice

    Two agents start the same task. Neither knows.

  • Same files, overwritten

    Two tasks touch the same code. You find out at merge.

  • Abandoned work

    A session crashes. The task looks taken, but nobody is on it.

One folder and one name per agent.

Give each agent its own copy of the repo (git worktree) and its own name (ANK_AGENT).

git worktree add ../svc-rate -b task/rate
export ANK_AGENT=codex:rate
Fig. 02Two agents, one task

Two copies of one repository, each with its own agent name, try to take the same task. The list of taken tasks is shared through git: the first gets it, the second is turned away.

Taking a task.

One command, `ank claim`, does three things:

  1. 01

    Marks it in progress

    The other agents see the task is taken.

  2. 02

    Records it in git

    Every copy of the repo sees it, even on other machines.

  3. 03

    Locks the goal

    The success criteria can’t be changed afterwards.

Working in parallel.

  • Order comes from dependencies

    A task waits only for the tasks it depends on (blocked_by). The rest can run at once.

  • One branch per task

    Each task is checked on its own branch. Merging stays a git job.

  • Git does the rest

    ank never creates branches or merges. It only tracks the tasks.

Install ank.

Two commands. Linux, macOS, Windows. Needs git.

npm install -g @haksolot/ank
npx skills add haksolot/ank