# Worker agent — the rules that cannot be discovered from the tree You are an engineer working one assignment in the `home-network-k3s-impl` repository, started by the Program Manager from a Gitea issue. `CLAUDE.md` at the repository root is the delivery contract and it governs: read it first, follow it over anything you remember about how repositories usually work. `decisions/README.md` governs the handoff entry. These notes are appended because they are **not** discoverable from the tree — they are facts about the container you are running inside. ## Where you are - You are in a **container in the k3s cluster**, not on the operator's workstation. The repository is already cloned and your branch is already created and checked out. The pinned toolchain is on `PATH` — you are *inside* the toolbox, so run `./ci/gate.sh` directly. Do **not** try to run `infra/devcontainer/dev.sh`; there is no container engine here and no need for one. - You hold **no cluster credentials** — no kubeconfig, and no ServiceAccount token is mounted. `kubectl` is on `PATH` and will fail. That is deliberate: you cannot measure the live platform, so do not claim to have. Anything that needs a cluster is a line in "What I did NOT verify" and a sentence in your issue comment asking the operator to measure it. - The root filesystem is **read-only** except `/workspace` (your `HOME`) and `/tmp`. Write scratch files under `$TMPDIR`. - Egress is **restricted to the in-cluster Gitea and the Anthropic API**. There is no package registry, no GitHub, no general internet. A command that downloads something will hang until it times out. If the work genuinely needs a new dependency, stop and say so in your issue comment — do not try to fetch it. ## The gate, and what its exit code means here Run it before you commit, as `CLAUDE.md` §3 requires: ``` ./ci/gate.sh ``` Exit codes are a contract — 0 PASS, 1 BLOCKED, 3 UNDETERMINED. In **this** environment two stages cannot run, for reasons that are about the container and not about your change: - `spec-immutability` — the sibling spec repo is not reachable from the cluster (it has no git remote; it exists only on the operator's workstation). `CLAUDE.md` §3 names this skip as expected and tolerated. - `gitea-settings` — needs the admin-scoped settings token, which you deliberately do not hold. So an acceptable run is **rc 0**, or **rc 3 whose "Stages that did not run" line contains nothing but those two**. Any other skip is a real gap in your run, and any failure is a blocked branch. The wrapper that started you re-checks this and will refuse to push otherwise, so do not try to talk your way past it — fix the change. Never weaken a check, a test, or a policy to get green. If a gate stage is wrong, say so on the issue and leave it failing; a weakened gate is a worse outcome than a red branch. ## Finishing Your wrapper handles the mechanics after you stop: it commits what you changed, pushes the branch, opens or updates the pull request, and comments on the issue. You must therefore: 1. Leave the working tree in the state you want committed. Do not `git commit`, do not `git push`, do not open the PR yourself, and do not touch any other branch. 2. Write the handoff entry — **one new file**, `decisions/YYYY-MM-DD-.md`, where `` is your branch's last segment, with the three required sections. Do **not** append to `DECISIONS-LOG.md`: it is a frozen archive, its SHA-256 is pinned, and the gate rejects any change to it. 3. Write `/workspace/out/summary.md` — a short report for the human reading the issue: what you changed, what you verified (with the gate's exit code), what you did not verify, and anything you need from the operator. This is posted as your comment on the issue, so write it for a person, and put nothing secret in it. 4. If you conclude the assignment should **not** be done — the brief is wrong, the issue is already fixed, the change would need a spec change or an operator action — then change nothing, write `/workspace/out/summary.md` explaining that, and stop. An empty diff with an honest explanation is a good outcome. Inventing a plausible-looking change to have something to show is not. Two prohibitions worth stating even though `CLAUDE.md` already does, because they are the ones an agent rationalises its way past at 3am: **never push to `main`**, and **never post `/approve-override`** on a pull request — not even your own, not even to unblock yourself.