RAPTORCODE Docs

Using RaptorCode

Tasks and planning

Single-task worktrees with a supervised merge, and the planning and proposal commands that ask DeepSeek for plans without executing anything.

Besides the live swarm, RaptorCode has a slower, fully supervised path: a single task in its own worktree, and planning commands that write Markdown instead of running tools.

#Which path to use

CommandWhat runsWhere changes landHow they reach your branch
raptor or raptor swarm runThe live four-agent swarmRole worktreesYou commit and git merge
raptor run "task"One agent, headlessThe current directoryDirectly
raptor task "description"Nothing; it prepares a worktree.raptor/worktrees/<task-id>raptor merge <task-id> --execute
raptor swarm "description"Planning onlyRAPTOR_PLAN.md in each role worktreeNothing to merge
raptor swarm implement <task-id> <role>A proposal onlyRAPTOR_IMPLEMENTATION_PROPOSAL.mdYou apply it by hand

The planning and proposal paths never execute model output: they only write Markdown files.

#Single-task worktrees

raptor task "Add router tests"

Inside a git repository, raptor task:

  • derives a task id from the description;
  • creates the branch raptor-task-<task-id> and the worktree .raptor/worktrees/<task-id>;
  • records the task in .raptor/tasks/<task-id>.toml with the status planned;
  • refuses if the metadata, the branch or the worktree path already exists.

Nothing runs in the worktree until you do. Work there by hand, or start raptor run from inside it, and commit on the task branch. Then, from your main checkout, review, test and merge it:

raptor review <task-id>
raptor test <task-id>
raptor merge <task-id>             # dry run
raptor merge <task-id> --execute   # asks you to type MERGE <task-id>

#Manage tasks

raptor task list               # id, status, created, worktree, description
raptor task show <task-id>
raptor task abandon <task-id>  # mark a task you won't merge
raptor task cleanup <task-id>  # delete the worktree of a merged or abandoned task
StatusMeaning
plannedCreated by raptor task; not merged or abandoned.
mergedraptor merge --execute succeeded.
merge_conflictraptor merge --execute stopped on a conflict.
abandonedMarked by raptor task abandon.

raptor task abandon keeps the metadata, worktree and branch. raptor task cleanup works only on merged or abandoned tasks: it prints what it will delete, asks you to type CLEANUP <task-id>, deletes only the worktree directory and runs git worktree prune. The metadata, as the local record of the task, and the branch are kept.

#Plan a swarm without running it

raptor swarm "Add SSO login"

This creates the four role branches and worktrees and .raptor/swarms/<task-id>.toml, then asks DeepSeek once per role for a plan, sending only the task id and description and that role’s template. Each plan is written to RAPTOR_PLAN.md in the role worktree; an existing plan is never overwritten.

Without a DeepSeek key, the worktrees and metadata are kept, the run is recorded as blocked_missing_deepseek_api_key, and the command tells you where to get a key.

#Turn a plan into a proposal

raptor swarm implement <task-id> backend-agent

This reads that role’s RAPTOR_PLAN.md, sends DeepSeek the task description, the role and the plan, and writes the answer to RAPTOR_IMPLEMENTATION_PROPOSAL.md in the role worktree. Patch-like content in the proposal stays text; applying it is up to you.

Planning and proposals send DeepSeek only the description, the role, its template and the plan, never your repository contents, .env files, metadata or secrets.