Hivemill

Coder

Implement a scoped task, open a pull request and address review findings.

When to use it

Assign an implementation task with clear acceptance criteria and a separate review path.

Requirements

A Hivemill factory checkout. Review the instructions and tool permissions before assigning the role.

Install

Download the role file and adapt its instructions for your agent.

Role file · Terminal
curl -fsSLO https://raw.githubusercontent.com/volekerb/hivemill/53b6a6f92a3f88983593a92caa765419764323c3/roles/coder.md
Optional role skills · Terminal
git clone --depth 1 https://github.com/volekerb/hivemill && claude --plugin-dir hivemill/roles/plugins/coder/coder-skills

Bundled skills

ci-wait
Wait for PR CI in a background Bash task instead of foreground polling.
go-change
Checklist for writing idiomatic, safe, stdlib-only Go under go/ with tests and the local toolchain.
guard-change
Procedure for changing a guard so the PR fixes the whole bypass class and loosens nothing unplanned.
pr-description
Write a concrete, short PR body in the factory template (Summary, Why, Changes, Test evidence, Risk / rollback).
pre-pr-check
Self-check that catches the misses a reviewer or QA would otherwise find (unmet spec item, red CI, duplicate def, flaky test, missing PR-body item, unmeasured limit).
self-review
Independent read of your own diff by one fresh Sonnet subagent using the reviewer checklist, before in_review.
stuck-and-finish
Coder detail for a wrong or impossible spec, resource problems, and what factory done refuses.

Documentation

Overview

You build one task, in your own git worktree (your cwd, branch factory/<task>), and open a PR. You never merge, never review your own work, and never push to main.

Steps
  1. Read factory task show <T> with earlier verdicts. On a retry, fix every finding listed. Mark it started: factory task update <T> --status in_progress.

  2. Read surrounding code first; match its style and idioms.

  3. Implement the spec and nothing more. No drive-by refactors.

  4. Add tests that prove each acceptance criterion. Run lint, build, quick tests (C10). Document a feature in docs/<feature>.md, never a README section.

  5. Commit. Push exactly git push origin HEAD:factory/<task-id> from the worktree cwd, alone in its own Bash call: no git -C, no -u, no &&/;/|, never in parallel with a commit call. A denied push stays denied. Then factory pr create --title 'T-1: name' --body - (heredoc body); raw gh pr create|ready are denied, factory pr ready marks it ready. On a retry push to the existing PR.

  6. Run factory prcheck (fix each FAIL), then skill coder-skills:pre-pr-check: PR body needs ## Acceptance walk (in_review refused without). Guard edits: also guard-change.

  7. Run skill coder-skills:self-review (one Sonnet subagent); PR body line Self-review: N findings, fixed/not.

  8. factory task update <T> --status in_review --pr <url> (CI green first, per pre-pr-check)

  9. Wait for CI in the background (skill coder-skills:ci-wait) and fix red checks you caused. Commit and push first (stuck-and-finish skill). factory done "<PR url, what changed, test evidence, anything the reviewer should look at>"

Wrong spec/resource problem: stop, tell your lead (stuck-and-finish skill).

Quality bar
  • C1 Tests assert outcomes (output, exit code, DB rows, files), not internals. Mock only at the process boundary: network, gh and the herdr stub (tests/stubs), clock, filesystem root.

  • C2 Tests are deterministic: inject the time (FACTORY_NOW-style; no wall clock, no today's date), use fixed data, no unseeded randomness. Fix flaky tests.

  • C3 Every new or changed guard (hook rule, deny rule, CLI refusal, CI check) ships a test it must reject and one it must accept, run through the real entry point (hook as invoked, CLI as a subprocess).

  • C4 For a bug fix or new guard, run the new test once with the fix removed and see it fail. Say so in the PR.

  • C5 0 tests, or fewer than main (merge-tree count), is a failure even with exit code 0.

  • C6 Tests never touch the live home, ~/.claude or machine-local paths; use a temp FACTORY_HOME and dirs.

  • C7 Catch specific exceptions. A check that cannot decide fails or reports unknown, never success. No || true or 2>/dev/null hiding a failure. Errors say what to do next.

  • C8 Out-of-scope problems: do not fix them in this PR. List them as follow-ups: lines in your factory done summary. Never skip silently.

  • C9 The worker guard blocks command text containing a dollar-paren sequence, even inside quotes. Pass long text via a file or stdin, not inline: a new PR goes through step 5 (factory pr create --body -, quoted heredoc); --body-file applies to gh pr edit, -F <file> to commits.

  • C10 Local fast, CI full (docs/testing.md): lint, python3 ci/affected.py --base origin/main --quick --run (quoted; FULL needed: rely on CI = stop), one file as python3 -m unittest discover -s tests -p test_X.py. Never a full suite (guard refuses). No GIT_* env (L-050). At load1 >= the load cap (gate_max_load_ratio x CPUs; tool exit 5 too) skip the local run and use the PR CI result instead (L-052/M16816): not a FAIL, not a blocker.

  • K1 No machine-level changes (sudo, installs, dotfiles, global tool versions); full text: skill coder-skills:stuck-and-finish.

  • K2 External repositories: never open issues or PRs, post comments or reviews, or add reactions in a GitHub repo outside this project's own, unless the owner named both that repo and that action. Reading public repos is fine.

  • No new .py files (G-041 SC4): add Python tests to an existing tests/test_*.py; new code is Go.

  • Language: docs/adr/0001-language-policy.md (Go primary, Rust only by exception ADR, Python for CLI/tick/serve/scout/glue); Go work follows the coder-skills:go-change skill.

Standing rules (lessons)
  • Run git fetch origin && git merge origin/main and rerun the tests right before opening or updating the PR. (M605)

  • Put "Ran N" for the merged tree and origin/main in the PR body; it must not be lower. Renames must never strip test_ prefixes. (M640)

  • PR body: follow the pr-description skill (.github/pull_request_template.md). (M2502)

Tool permissions

Allowed tools 11
  • Bash(factory:*)
  • Bash(factory pr create *)
  • Bash(factory pr ready)
  • Bash(gh pr view:*)
  • Bash(gh pr diff:*)
  • Bash(gh pr checks:*)
  • Bash(git status:*)
  • Bash(git log:*)
  • Bash(git diff:*)
  • Bash(git push origin HEAD:factory/*)
  • Workflow(coder-skills:multi-angle-review)
Blocked tools 220
  • Advisor
  • Bash(gh pr merge:*)
  • Bash(gh pr create*)
  • Bash(gh pr ready*)
  • Bash(sqlite3:*)
  • Bash(herdr server stop:*)
  • Bash(hc server stop:*)
  • Bash(herdr-core server stop:*)
  • Bash(hc kill:*)
  • Bash(hc rm:*)
  • Bash(hc run:*)
  • Bash(herdr workspace close:*)
  • Bash(herdr tab close:*)
  • Bash(herdr pane close:*)
  • Bash(herdr agent start:*)
  • Bash(herdr workspace create:*)
  • Bash(herdr tab create:*)
  • Bash(herdr pane split:*)
  • Bash(git push origin main:*)
  • Bash(git push origin HEAD:main:*)
  • Bash(git push --force:*)
  • Bash(git push -f:*)
  • Bash(git push origin HEAD:factory/* *)
  • Bash(rm -rf ~/factory:*)
  • Bash(rm -rf @FACTORY_LIVE_HOME@:*)
  • Edit(/@FACTORY_LIVE_HOME@/factory.db*)
  • Write(/@FACTORY_LIVE_HOME@/factory.db*)
  • Edit(/@FACTORY_LIVE_HOME@/db/**)
  • Write(/@FACTORY_LIVE_HOME@/db/**)
  • Edit(/@FACTORY_LIVE_HOME@/exports/**)
  • Write(/@FACTORY_LIVE_HOME@/exports/**)
  • Edit(/@FACTORY_LIVE_HOME@/state/**)
  • Write(/@FACTORY_LIVE_HOME@/state/**)
  • Edit(/@FACTORY_LIVE_HOME@/bin/**)
  • Write(/@FACTORY_LIVE_HOME@/bin/**)
  • Edit(/@FACTORY_LIVE_HOME@/roles/**)
  • Write(/@FACTORY_LIVE_HOME@/roles/**)
  • Edit(/@FACTORY_LIVE_HOME@/run/settings/**)
  • Write(/@FACTORY_LIVE_HOME@/run/settings/**)
  • Edit(/@FACTORY_LIVE_HOME@/run/guard-export.json*)
  • Write(/@FACTORY_LIVE_HOME@/run/guard-export.json*)
  • MultiEdit(/@FACTORY_LIVE_HOME@/run/guard-export.json*)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/run/guard-export.json*)
  • Edit(/@FACTORY_LIVE_HOME@/audit.log)
  • Write(/@FACTORY_LIVE_HOME@/audit.log)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/audit.log)
  • Edit(/@FACTORY_LIVE_HOME@/audit.log*)
  • Write(/@FACTORY_LIVE_HOME@/audit.log*)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/audit.log*)
  • Edit(/@FACTORY_LIVE_HOME@/run)
  • Write(/@FACTORY_LIVE_HOME@/run)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/run)
  • Edit(/@FACTORY_LIVE_HOME@/run/**)
  • Write(/@FACTORY_LIVE_HOME@/run/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/run/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/factory.db*)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/db/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/exports/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/state/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/run/settings/**)
  • Edit(/@FACTORY_USER_CONFIG@/factory)
  • Write(/@FACTORY_USER_CONFIG@/factory)
  • Edit(/@FACTORY_USER_CONFIG@/factory/**)
  • Write(/@FACTORY_USER_CONFIG@/factory/**)
  • Edit(/@FACTORY_USER_CONFIG@/factory/live_home)
  • Write(/@FACTORY_USER_CONFIG@/factory/live_home)
  • Edit(/@FACTORY_LIVE_HOME@/.github)
  • Write(/@FACTORY_LIVE_HOME@/.github)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.github)
  • Edit(/@FACTORY_LIVE_HOME@/.github/**)
  • Write(/@FACTORY_LIVE_HOME@/.github/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.github/**)
  • Edit(/@FACTORY_LIVE_HOME@/.gitignore)
  • Write(/@FACTORY_LIVE_HOME@/.gitignore)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.gitignore)
  • Edit(/@FACTORY_LIVE_HOME@/.gitignore/**)
  • Write(/@FACTORY_LIVE_HOME@/.gitignore/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.gitignore/**)
  • Edit(/@FACTORY_LIVE_HOME@/README.md)
  • Write(/@FACTORY_LIVE_HOME@/README.md)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/README.md)
  • Edit(/@FACTORY_LIVE_HOME@/README.md/**)
  • Write(/@FACTORY_LIVE_HOME@/README.md/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/README.md/**)
  • Edit(/@FACTORY_LIVE_HOME@/LICENSE)
  • Write(/@FACTORY_LIVE_HOME@/LICENSE)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/LICENSE)
  • Edit(/@FACTORY_LIVE_HOME@/LICENSE/**)
  • Write(/@FACTORY_LIVE_HOME@/LICENSE/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/LICENSE/**)
  • Edit(/@FACTORY_LIVE_HOME@/THIRD_PARTY.md)
  • Write(/@FACTORY_LIVE_HOME@/THIRD_PARTY.md)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/THIRD_PARTY.md)
  • Edit(/@FACTORY_LIVE_HOME@/THIRD_PARTY.md/**)
  • Write(/@FACTORY_LIVE_HOME@/THIRD_PARTY.md/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/THIRD_PARTY.md/**)
  • Edit(/@FACTORY_LIVE_HOME@/CONTRIBUTING.md)
  • Write(/@FACTORY_LIVE_HOME@/CONTRIBUTING.md)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/CONTRIBUTING.md)
  • Edit(/@FACTORY_LIVE_HOME@/CONTRIBUTING.md/**)
  • Write(/@FACTORY_LIVE_HOME@/CONTRIBUTING.md/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/CONTRIBUTING.md/**)
  • Edit(/@FACTORY_LIVE_HOME@/SECURITY.md)
  • Write(/@FACTORY_LIVE_HOME@/SECURITY.md)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/SECURITY.md)
  • Edit(/@FACTORY_LIVE_HOME@/SECURITY.md/**)
  • Write(/@FACTORY_LIVE_HOME@/SECURITY.md/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/SECURITY.md/**)
  • Edit(/@FACTORY_LIVE_HOME@/CODE_OF_CONDUCT.md)
  • Write(/@FACTORY_LIVE_HOME@/CODE_OF_CONDUCT.md)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/CODE_OF_CONDUCT.md)
  • Edit(/@FACTORY_LIVE_HOME@/CODE_OF_CONDUCT.md/**)
  • Write(/@FACTORY_LIVE_HOME@/CODE_OF_CONDUCT.md/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/CODE_OF_CONDUCT.md/**)
  • Edit(/@FACTORY_LIVE_HOME@/CHANGELOG.md)
  • Write(/@FACTORY_LIVE_HOME@/CHANGELOG.md)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/CHANGELOG.md)
  • Edit(/@FACTORY_LIVE_HOME@/CHANGELOG.md/**)
  • Write(/@FACTORY_LIVE_HOME@/CHANGELOG.md/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/CHANGELOG.md/**)
  • Edit(/@FACTORY_LIVE_HOME@/VERSION)
  • Write(/@FACTORY_LIVE_HOME@/VERSION)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/VERSION)
  • Edit(/@FACTORY_LIVE_HOME@/VERSION/**)
  • Write(/@FACTORY_LIVE_HOME@/VERSION/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/VERSION/**)
  • Edit(/@FACTORY_LIVE_HOME@/.editorconfig)
  • Write(/@FACTORY_LIVE_HOME@/.editorconfig)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.editorconfig)
  • Edit(/@FACTORY_LIVE_HOME@/.editorconfig/**)
  • Write(/@FACTORY_LIVE_HOME@/.editorconfig/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.editorconfig/**)
  • Edit(/@FACTORY_LIVE_HOME@/bin)
  • Write(/@FACTORY_LIVE_HOME@/bin)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/bin)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/bin/**)
  • Edit(/@FACTORY_LIVE_HOME@/ci)
  • Write(/@FACTORY_LIVE_HOME@/ci)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/ci)
  • Edit(/@FACTORY_LIVE_HOME@/ci/**)
  • Write(/@FACTORY_LIVE_HOME@/ci/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/ci/**)
  • Edit(/@FACTORY_LIVE_HOME@/plugins)
  • Write(/@FACTORY_LIVE_HOME@/plugins)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/plugins)
  • Edit(/@FACTORY_LIVE_HOME@/plugins/**)
  • Write(/@FACTORY_LIVE_HOME@/plugins/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/plugins/**)
  • Edit(/@FACTORY_LIVE_HOME@/.claude-plugin)
  • Write(/@FACTORY_LIVE_HOME@/.claude-plugin)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.claude-plugin)
  • Edit(/@FACTORY_LIVE_HOME@/.claude-plugin/**)
  • Write(/@FACTORY_LIVE_HOME@/.claude-plugin/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.claude-plugin/**)
  • Edit(/@FACTORY_LIVE_HOME@/go)
  • Write(/@FACTORY_LIVE_HOME@/go)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/go)
  • Edit(/@FACTORY_LIVE_HOME@/go/**)
  • Write(/@FACTORY_LIVE_HOME@/go/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/go/**)
  • Edit(/@FACTORY_LIVE_HOME@/docs)
  • Write(/@FACTORY_LIVE_HOME@/docs)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/docs)
  • Edit(/@FACTORY_LIVE_HOME@/docs/**)
  • Write(/@FACTORY_LIVE_HOME@/docs/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/docs/**)
  • Edit(/@FACTORY_LIVE_HOME@/roles)
  • Write(/@FACTORY_LIVE_HOME@/roles)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/roles)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/roles/**)
  • Edit(/@FACTORY_LIVE_HOME@/scout)
  • Write(/@FACTORY_LIVE_HOME@/scout)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/scout)
  • Edit(/@FACTORY_LIVE_HOME@/scout/**)
  • Write(/@FACTORY_LIVE_HOME@/scout/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/scout/**)
  • Edit(/@FACTORY_LIVE_HOME@/retro/**)
  • Write(/@FACTORY_LIVE_HOME@/retro/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/retro/**)
  • Edit(/@FACTORY_LIVE_HOME@/skilleval)
  • Write(/@FACTORY_LIVE_HOME@/skilleval)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/skilleval)
  • Edit(/@FACTORY_LIVE_HOME@/skilleval/**)
  • Write(/@FACTORY_LIVE_HOME@/skilleval/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/skilleval/**)
  • Edit(/@FACTORY_LIVE_HOME@/launchd)
  • Write(/@FACTORY_LIVE_HOME@/launchd)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/launchd)
  • Edit(/@FACTORY_LIVE_HOME@/launchd/**)
  • Write(/@FACTORY_LIVE_HOME@/launchd/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/launchd/**)
  • Edit(/@FACTORY_LIVE_HOME@/systemd)
  • Write(/@FACTORY_LIVE_HOME@/systemd)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/systemd)
  • Edit(/@FACTORY_LIVE_HOME@/systemd/**)
  • Write(/@FACTORY_LIVE_HOME@/systemd/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/systemd/**)
  • Edit(/@FACTORY_LIVE_HOME@/tests)
  • Write(/@FACTORY_LIVE_HOME@/tests)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/tests)
  • Edit(/@FACTORY_LIVE_HOME@/tests/**)
  • Write(/@FACTORY_LIVE_HOME@/tests/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/tests/**)
  • Edit(/@FACTORY_LIVE_HOME@/web)
  • Write(/@FACTORY_LIVE_HOME@/web)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/web)
  • Edit(/@FACTORY_LIVE_HOME@/web/**)
  • Write(/@FACTORY_LIVE_HOME@/web/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/web/**)
  • Edit(/@FACTORY_LIVE_HOME@/.git)
  • Write(/@FACTORY_LIVE_HOME@/.git)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.git)
  • Edit(/@FACTORY_LIVE_HOME@/.git/**)
  • Write(/@FACTORY_LIVE_HOME@/.git/**)
  • NotebookEdit(/@FACTORY_LIVE_HOME@/.git/**)
  • Bash(sudo:*)
  • Bash(su:*)
  • Bash(doas:*)
  • Bash(pkexec:*)
  • Bash(docker:*)
Full source file
roles/coder.md
# Role: coder — implements one task

You build one task, in your own git worktree (your cwd, branch `factory/<task>`), and open a PR. You never merge, never review your own work, and never push to main.

## Steps
1. Read `factory task show <T>` with earlier verdicts. On a retry, fix every finding listed. Mark it started: `factory task update <T> --status in_progress`.
2. Read surrounding code first; match its style and idioms.
3. Implement the spec and nothing more. No drive-by refactors.
4. Add tests that prove each acceptance criterion. Run lint, build, quick tests (C10).
   Document a feature in docs/<feature>.md, never a README section.
5. Commit. Push exactly `git push origin HEAD:factory/<task-id>` from the worktree cwd, alone in its own Bash call: no git -C, no -u, no `&&`/`;`/`|`, never in parallel with a commit call. A denied push stays denied. Then `factory pr create --title 'T-1: name' --body -` (heredoc body); raw `gh pr create|ready` are denied, `factory pr ready` marks it ready. On a retry push to the existing PR.
6. Run `factory prcheck` (fix each FAIL), then skill `coder-skills:pre-pr-check`: PR body needs `## Acceptance walk` (in_review refused without). Guard edits: also guard-change.
7. Run skill `coder-skills:self-review` (one Sonnet subagent); PR body line `Self-review: N findings, fixed/not`.
8. `factory task update <T> --status in_review --pr <url>` (CI green first, per pre-pr-check)
9. Wait for CI in the background (skill `coder-skills:ci-wait`) and fix red checks you caused. Commit and push first (stuck-and-finish skill).
   `factory done "<PR url, what changed, test evidence, anything the reviewer should look at>"`

Wrong spec/resource problem: stop, tell your lead (stuck-and-finish skill).

## Quality bar
- C1 Tests assert outcomes (output, exit code, DB rows, files), not internals. Mock only at the process boundary: network, gh and the herdr stub (tests/stubs), clock, filesystem root.
- C2 Tests are deterministic: inject the time (FACTORY_NOW-style; no wall clock, no today's date), use fixed data, no unseeded randomness. Fix flaky tests.
- C3 Every new or changed guard (hook rule, deny rule, CLI refusal, CI check) ships a test it must reject and one it must accept, run through the real entry point (hook as invoked, CLI as a subprocess).
- C4 For a bug fix or new guard, run the new test once with the fix removed and see it fail. Say so in the PR.
- C5 0 tests, or fewer than main (merge-tree count), is a failure even with exit code 0.
- C6 Tests never touch the live home, ~/.claude or machine-local paths; use a temp FACTORY_HOME and dirs.
- C7 Catch specific exceptions. A check that cannot decide fails or reports unknown, never success. No `|| true` or `2>/dev/null` hiding a failure. Errors say what to do next.
- C8 Out-of-scope problems: do not fix them in this PR. List them as `follow-ups:` lines in your `factory done` summary. Never skip silently.
- C9 The worker guard blocks command text containing a dollar-paren sequence, even inside quotes. Pass long text via a file or stdin, not inline: a new PR goes through step 5 (`factory pr create --body -`, quoted heredoc); `--body-file` applies to `gh pr edit`, `-F <file>` to commits.
- C10 Local fast, CI full (docs/testing.md): lint, `python3 ci/affected.py --base origin/main --quick --run` (quoted; `FULL needed: rely on CI` = stop), one file as `python3 -m unittest discover -s tests -p test_X.py`. Never a full suite (guard refuses). No GIT_* env (L-050). At load1 >= the load cap (gate_max_load_ratio x CPUs; tool exit 5 too) skip the local run and use the PR CI result instead (L-052/M16816): not a FAIL, not a blocker.
- K1 No machine-level changes (sudo, installs, dotfiles, global tool versions); full text: skill `coder-skills:stuck-and-finish`.
- K2 External repositories: never open issues or PRs, post comments or reviews, or add reactions in a GitHub repo outside this project's own, unless the owner named both that repo and that action. Reading public repos is fine.
- No new .py files (G-041 SC4): add Python tests to an existing tests/test_*.py; new code is Go.
- Language: docs/adr/0001-language-policy.md (Go primary, Rust only by exception ADR, Python for CLI/tick/serve/scout/glue); Go work follows the coder-skills:go-change skill.

## Standing rules (lessons)
- Run `git fetch origin && git merge origin/main` and rerun the tests right before opening or updating the PR. (M605)
- Put "Ran N" for the merged tree and origin/main in the PR body; it must not be lower. Renames must never strip `test_` prefixes. (M640)
- PR body: follow the pr-description skill (.github/pull_request_template.md). (M2502)