WOOSTACK

Set up the agent team

Create the five Orca bots, connect GitHub, add event automations, and graduate Gatekeeper to low-risk auto-merge.

This guide takes you from no bots to a working Steward, Engineer, Reviewer, Gatekeeper, and Sentinel pipeline on one project, then shows how to widen what the bots may do as they earn trust. The examples use a placeholder repository, acme/app. Replace it with your own.

Before you start

  • Orca on the latest version, signed in, on a computer that stays awake while the bots work. Bots run only while their computer is on; see Orca's bots quickstart.
  • A coding agent such as Claude Code or Codex, installed and signed in on that computer. The bots run on it and use its plan.
  • WooStack skills installed for that agent. Follow getting started.
  • A GitHub repository with branch protection on the default branch and required CI checks. The Reviewer bot reviews its pull requests.
  • A production deploy that GitHub reports, such as a GitHub Actions workflow that deploys to a production environment, if you want Sentinel.

1. Create the five bots

In Orca's sidebar, open Bots, select +, then New bot.

  1. Create Steward, Engineer, Reviewer, Gatekeeper, and Sentinel with Start from scratch. You can start Reviewer from the Pull request review template and Sentinel from the Deploy watch template instead.
  2. Replace each bot's SOUL.md with its starter template: Steward, Engineer, Reviewer, Gatekeeper, and Sentinel. Or paste the template into the bot's first chat and ask it to adopt it.
  3. In each bot's settings, set the permission to Ask for approval if its agent supports it. Bots read issues, comments, and logs that other people write.
  4. Keep Who can ask limited to you until the pipeline has run for a while.

Each bot now starts in read-and-report mode. The first Never line in every template tells it to change nothing outside its own chat, and Ask for approval can catch a write it attempts anyway, depending on the agent. The next step covers which limits hold even if a bot ignores its instructions.

2. Connect GitHub and other services

If you want the stage 0 check with no GitHub writes at all, do it first. Sign the bot's computer in to gh and git with an account that has no write access, as what enforces the limits explains. Then ask each bot in its Orca chat, as the first part of step 5 describes, before you connect GitHub. Switch to write credentials only when you grant stage 1.

  1. In each bot's Connectors tab, add GitHub, install the Orca app on acme/app, and turn it on for the bot. Give each bot only the repositories it needs.
  2. Optionally add Slack or Linear to Steward if requests arrive there, and to Sentinel if incidents should post in a channel.
  3. Leave Google off unless a bot needs your mail or calendar. Steward is the only likely candidate.

See Orca's connector guide for each service. GitHub work other than replies runs as your own account, so the bots' pull requests and merges appear as you.

What enforces the limits

A SOUL.md is an instruction the bot's model follows, not a lock. Know which of the other controls are guarantees:

  • Credentials are the hard limit. Bots do GitHub work other than replies with your gh sign-in on their computer, so each bot can do what you can in every repository you can reach. Pushes use the git login on that computer, and replies where a bot was asked go through the Orca app. The app installation also limits where bots are asked and which events reach them. A gh account without write access limits gh operations only. To keep stage 0 close to read-only, withhold write access from both the gh and git credentials on the bot's computer (for example a paired Orca server). That makes the bot's own commands read-only, not GitHub as a whole. While the connector is on, the Orca app can still reply or review where someone asked the bot, post a public note when it turns away someone not on Who can ask, and post results where an automation uses --results-to thread. For a check with no GitHub writes at all, run it before you connect GitHub, as the start of this step describes.
  • Branch protection gates merges. Protect the default branch: require pull requests and the CI checks, and do not allow bypassing the rules. Then no bot can merge red work, whatever its instructions say. It cannot tell the bots apart, though, because they all act as you.
  • Reviews are comments, and the review gate is a handoff. Reviewer posts comment reviews, not GitHub approvals. The bots open pull requests as you, and GitHub does not let an author approve their own pull request, so a required approving review would hold every bot pull request until someone else approves it. Gatekeeper's merge checklist is the review gate instead: it merges only a head commit that the Reviewer bot handed over, by Orca mail, with a clean review. Like a SOUL.md, that is an instruction, not a lock.
  • Ask for approval depends on the agent. Orca passes the permission mode to the bot's agent, and the agent decides what to ask about. Some agents have no approval modes and always run in Full access. See Orca's bot security page.
  • Who can ask gates direct requests only. Orca checks each Slack, GitHub, and Linear request against this list. Event automations start for anyone active in a place the rule listens to, so scope each rule with in= and, where the event supports it, from=.

Because the five bots share your GitHub identity, the role split is a working agreement the bots follow. For hard separation, run a bot on a paired Orca server signed in to a GitHub account that has only the access its role needs.

3. Tell Steward about your projects

In Steward's chat, list your active projects:

Track these projects on your roster: acme/app (web app, deploys to production from main)
and acme/docs (documentation site). Watch their open issues and pull requests.

Steward saves the roster to MEMORY.md. Check that it wrote one dated line per project.

4. Add event automations

Ask each bot in its chat to set up its automations. Each bot checks the available events with orca automations trigger-options --bot <name> before it saves a rule, and reports what it saved.

BotEventKindPurpose
Engineergithub.ci_failed subject=acme/app#<n>Wait per pull requestFix a failing check
Engineergithub.pr_conflicted subject=acme/app#<n>Wait per pull requestRebase on a conflict
Engineergithub.ci_passed subject=acme/app#<n>Wait per commitHand the commit to Reviewer when every check passes
Engineergithub.review subject=acme/app#<n>Wait per pull requestRead a review from a person
Engineergithub.pr_merged in=acme/appStandingClose the worker's workspace after a merge
Reviewergithub.pr_opened in=acme/app from=meStandingReview pull requests you open
Reviewergithub.pr_ready in=acme/appStandingReview a draft once it is marked ready
Gatekeepergithub.workflow_finished run=<link> with --once --by <deadline>Wait per mergeCheck the deploy run a merge started
Sentinelgithub.deploy_finished in=acme/app contains="production: failure" and contains="production: error"StandingInvestigate failed production deploys

For example, Sentinel's watch:

orca automations create --bot Sentinel --name "Production deploys" \
  --on 'github.deploy_finished in=acme/app contains="production: failure"' \
  --on 'github.deploy_finished in=acme/app contains="production: error"' \
  --results-to chat \
  --prompt "If this deploy targeted production and failed, investigate it and file one issue with evidence. Otherwise end quietly."

The event fires for every deploy, in every environment, whether it succeeds or fails. The contains= filters keep successes and other environments from waking Sentinel at all. Check the text of a real failed production deploy event before you save them, and match its wording. The prompt's check stays as a backstop. See events instead of polling.

Reviewer's two events can share one automation. Reviewer publishes the review itself, so the run's results go to its chat:

orca automations create --bot Reviewer --name "Review new pull requests" \
  --on "github.pr_opened in=acme/app from=me" \
  --on "github.pr_ready in=acme/app" \
  --results-to chat \
  --prompt "Review this pull request at its current head commit and post one comment review."

Check the bots' panels in Orca: each automation should show as on. A rule from a source the bot has no connector for shows as "won't fire".

Your own pushes and reviews never start a bot, and every bot works as you on GitHub. So pull requests a bot opens, and new commits on any pull request, reach Reviewer through Engineer's handoff or an @Reviewer mention on the pull request. See when Reviewer runs.

5. Rehearse before you rely on it

First, at stage 0, ask each bot in its Orca chat what it would do with one of your existing issues or pull requests. Check that it reports without running any write command. If you ran this check before connecting GitHub in step 2, skip it here.

Then rehearse writes in a disposable repository, for example acme/sandbox:

  • give it the same branch protection and CI as acme/app;
  • add a manually started deploy workflow that targets an environment named production and fails on purpose when you set an input, so it never touches a real deployment;
  • add acme/sandbox to the Orca GitHub app installation in each bot's Connectors, so its events reach the bots;
  • point Reviewer's automation and Sentinel's watch at acme/sandbox, and grant stage 1 for the sandbox only.

Exercise three paths there:

  1. A small issue. Ask Steward to file a small fix. Check that it sizes it small and hands it to Engineer, and that Engineer's worker opens a pull request in its own worktree, marks it ready, and brings it to green. Check that Engineer hands it to Reviewer, that Reviewer posts one comment review, and that findings go back to Engineer until a clean review goes to Gatekeeper. Gatekeeper should post its risk call as a Needs you item. Open one clean pull request yourself too, so the automation runs, and check that both clean reviews show on GitHub as reviews of the commit in the handoff, not as plain comments.
  2. An unclear request. Ask Steward for something with an open product choice. Check that it files the issue and raises a decision gate instead of handing it to Engineer.
  3. A failed deploy. Start the sandbox deploy workflow with the failure input. The environment is named production, so Sentinel's filter matches. Check that it files one issue with evidence.

Then grant stage 1 on your real repositories, as the next section describes.

Graduate trust

Widen one capability at a time, after the bot has shown it handles the current one well. To grant a capability, tell the bot in its chat and ask it to update its SOUL.md. Each grant also becomes a dated line in its MEMORY.md. If you ran stage 0 with read-only credentials, give the bot write credentials when you grant stage 1. A bot never widens its own stage; see how the team improves over time.

StageStewardEngineerReviewerGatekeeperSentinel
0. Read and reportReports what it would fileReports what it would changeReports the review it would postReports its risk callsReports failures it sees
1. Act, you mergeFiles issues and hands small ones to EngineerOpens pull requests, marks them ready, fixes CI, and addresses review findingsPosts comment reviews, sends findings to Engineer, resolves its own threads once fixed, and hands clean pull requests to GatekeeperPosts each call as Needs you; you mergeFiles incident issues; asks you before any fix
2. Low-risk auto-mergeSameSameSameMerges low-risk pull requests that pass its checklist; high risk still asksSame
3. Closed loopSameSameSameSameHands bounded fixes to Engineer without asking

When to grant low-risk auto-merge

Grant stage 2 for one repository and target branch at a time, when:

  • you have agreed with a meaningful run of Gatekeeper's risk calls for that repository (for example the last 10), with no correction that moved a pull request from low to high risk;
  • its memory/risk-rubric.md lists the categories it treats as low and high;
  • branch protection and required checks are on, and Reviewer hands over clean reviews for exact head commits.

A grant can read like this:

You may auto-merge pull requests you call low risk into main on acme/app, as a squash with
the pull request title, pinned to the head commit Reviewer handed you, once your merge
checklist passes. Keep sending high-risk pull requests to me. Update your SOUL.md Merges line and record this in memory.

What always stays with you

Gatekeeper never auto-merges these, at any stage:

  • authentication, authorization, and other security changes;
  • schema changes and data migrations;
  • CI, deploy, and other production-gating scripts and workflows;
  • infrastructure, secrets, and environment configuration;
  • release preparation, version bumps, and publishing;
  • agent instructions, skills, and extensions, such as AGENTS.md and skill files;
  • destructive operations, architecture shifts, and very large diffs.

Step back after a miss

If a low-risk merge causes a problem, Sentinel files the incident as usual. Return Gatekeeper to stage 1 for that category, ask it to record what it missed in memory/risk-rubric.md, and grant stage 2 again only after a new run of agreed calls.

Troubleshooting

A wait fires again and again

A github.ci_passed or github.pr_conflicted rule fires as soon as it is saved if the pull request is already green or conflicted. Remove the wait, check the pull request's current state, and save a new wait only for an event that has not happened yet.

An automation never starts

Check that the bot's GitHub connector is on, that you are signed in to Orca, and that the bot's computer is awake. Your own comments and pushes do not start a bot, because it acts as you on GitHub. Events that GitHub reports, such as CI results, merges, and deploys, do.

Two workers picked up the same issue

Stop the newer worker without merging its pull request. Remind Engineer to check for an existing worker, branch, or pull request before starting one, and to keep one writer per worktree.

A bot asks the same question in chat again

Answer the existing Needs you item, or snooze it. A bot should not repeat a question that already waits on an item.

On this page