⚓ firstmate field guide
Using firstmate

Delivery modes & merge authority

How each project ships (no-mistakes, direct-PR, local-only, prod-only), what +yolo does and doesn't allow, branch prefixes, and the Gerrit forge binding.

Every project has a delivery posture recorded in data/projects.md. It answers two separate questions:

  1. How does work reach the project? That is the mode.
  2. Who approves landing it? That is the merge authority: you by default, or the first mate under +yolo.

The registry line#

bin/fm-project-mode.sh parses lines of this shape:

- <name> [<mode> +yolo branch=<prefix> forge=gerrit] - <description> (added <date>)
bin/fm-project-mode.sh xyz                  # → "no-mistakes off"
bin/fm-project-mode.sh --branch-prefix xyz  # → "fm/"
bin/fm-project-mode.sh --forge xyz          # → "none" | "gerrit" | "forgejo"
bin/fm-project-mode.sh --raw xyz            # keeps "no-mistakes-prod-only" uncollapsed

You rarely edit this by hand. Say "set xyz to direct-PR" or "give xyz yolo", and the first mate updates it through the project-management skill.

Modes#

no-mistakes — the rigorous default#

The worker commits on its ship branch and pushes to the local no-mistakes gate. It then drives the nine-step pipeline (intent → rebase → review → test → document → lint → push → pr → ci) through to a green PR. It answers gates but never passes --yes. It reports done: PR <url> checks green. See no-mistakes.

This is the safe fallback: an unregistered project resolves to no-mistakes with yolo off, and the gap is surfaced to you.

direct-PR — fast path#

The worker pushes its branch and opens a non-draft PR itself (via gh-axi), with no pipeline, and reports done: PR <url>. A deliberately held draft reports paused: instead of done:.

local-only — no remote#

The worker stops with a clean ship branch and reports done: ready in branch <branch>. After approval, the first mate runs bin/fm-merge-local.sh <id>. That is a guarded fast-forward of the project's local default branch to the exact done commit recorded when the report was accepted; a later commit on the branch is refused, not landed. It is the only git write the first mate itself makes inside projects/. It refuses divergence and tells you to have the crewmate rebase.

A new local repository has no commit yet. fm-spawn.sh refuses to dispatch work into a project with an unborn HEAD, because there is nothing to branch a worktree from. Make one commit in the project, then spawn again.

no-mistakes-prod-only — per-task choice#

This is a registry classification. The project-management skill makes it the default suggestion for a new remote-backed project. At intake the first mate classifies each task by its surface:

  • Internal-only tooling, automation, contributor process or release work ships direct-PR.
  • Product-facing, mixed or uncertain work ships no-mistakes.

"Never infer internal-only from file location or project name."

Kun's rule of thumb for when you need no-mistakes

you can ask yourself 'would i ask another human to do code review for this change' and if the answer is no, then you probably don't need no-mistakes. — @kunchenguid, 2026-09-22

+yolo — standing merge autonomy#

+yolo is orthogonal to mode. It changes only who approves landing.

yolo off (default) yolo on
Green, in-scope PR waits for your word first mate merges it
Local-only landing waits for your word first mate lands it
Red PR or unreported required check never merged never merged
Destructive / irreversible / security-sensitive escalates still escalates
Scope — "exercised only within the captain's original request, and it never quietly widens"

Only your current explicit instruction can merge past a red required check, and only when it names the check (fm-pr-merge.sh --allow-red <check>).

Away mode is a separate grant. While you are /afk, a PR green at its live head may merge under away authority. Destructive actions still cannot be pre-authorized. See Daily commands.

branch=<prefix>#

This overrides the default fm/ prefix for ship branches in that project, for example branch=kun/. The brief records a Ship branch: line, and fm-spawn.sh cross-checks it against its arguments to catch drift.

forge=gerrit#

This binds the project to Gerrit instead of GitHub PRs:

  • The worker publishes a change with gerrit-axi publish --squash --json and reports done: PR <change url> published for review.
  • fm-pr-merge.sh refuses Gerrit outright. Submitting would require faking an attributed human Code-Review+2. A human reviewer submits the change server-side.
  • forge=gerrit with local-only is rejected, because local-only publishes nothing.

GitLab merge requests work through the ordinary PR path (see docs/gitlab-merge-watch.md). A merge request needs a successful head pipeline at its current head. The one exception is fm-pr-merge.sh --allow-no-pipeline on your explicit order, for a project that runs no merge request pipeline. It waives only a head_pipeline that GitLab reports as null; a failed, running, canceled or stale pipeline still refuses. It is refused while you are /afk and on any forge other than GitLab.

forge=forgejo binds a project on a Forgejo or Gitea server. bin/fm-forge-detect.sh never proposes it, so it is registered only when you confirm it. The project needs tea and jq on PATH and one tea login add for its host. The merge watch, merge and generated ship brief all use tea (see docs/forgejo-tea-integration.md).

forge=external is for a project whose review tool uploads its own snapshot of the worker's local commits, with no push and no PR. It is never detected, so it is registered only on your confirmation, as [direct-PR forge=external] with no +yolo. The home needs config/external-review.md, the worker instructions for that tool. A per-task pre-push guard (bin/fm-git-push-guard.sh) refuses pushes to origin and pushes of the task branch or task-prefixed refs to any remote (see docs/external-review-forge.md).

pr=manual#

This is for a project whose PR title and body a person writes, for example when an outside maintainer reviews and merges. Without it, the pipeline's pr step rewrites the PR text on every validated push. It is registered only on your confirmation, as [no-mistakes pr=manual]. bin/fm-project-mode.sh --pr <name> reads it back.

  • The worker runs every no-mistakes axi run with --skip pr,ci.
  • It writes the PR title and body itself, opens or updates the PR with gh-axi, and waits for the PR's checks.
  • It is refused on direct-PR (the worker already writes the PR text), on local-only (no PR), and beside any forge= binding.
  • fm-spawn.sh refuses a brief whose pr= disagrees with the registry.

Precedence, in one list#

  1. Your current, explicit, concrete instruction ("ship this one direct-PR"). It wins, "exactly as stated and no further".
  2. The project's registry entry, which is the standing posture.
  3. The safe default: no-mistakes, yolo off.

Ambiguous scope or a conflict still gets one concise clarifying question before action.

Unofficial guide built 2026-09-26 from kunchenguid/firstmate, the AXI repos, and Kun Chen's public posts. The repo moves daily; when this guide and the repo disagree, the repo wins.