factory-judge ยท diff

git:20260902.8605dea to git:20260908.31d25b9

46 added, 18 removed. Audit A to A.

---
name: factory-judge
description: Judge a pull request as an independent reader who did not write it.
argument-hint: the pull request, e.g. `gh:pr:14`
---
# factory-judge
- **The instructions for this step live in `.archon/workflows/factory/validate/commands/judge.md`. Read that file now and follow it.**
- This skill exists so you can run the step by hand; it deliberately does not restate
- the content, because a second copy is a second thing to keep true.
+ **The judgement is `archon-accept`'s, not ours.** It fetches the exact head and base
+ into a temporary repository of its own, runs the commands a trusted profile pins,
+ hands a fresh judge the real streams and the original request, and writes an
+ `acceptance.json` receipt. It never merges, comments, or touches the pull request.
- Two adjustments for running it interactively rather than as a workflow node:
+ ```bash
+ archon workflow run archon-accept --no-worktree \
+ --input target=OWNER/REPO#N \
+ --input work_order=file:/absolute/path/outside/the/checkout/work-order.txt \
+ --input policy=/absolute/path/outside/the/checkout/gate-profile.json
+ ```
- 1. **`$ARTIFACTS_DIR` does not exist here.** Where the file asks for an input from
- that directory, get the same thing from the repository: `MISSION.md`,
- `FACTORY_RULES.md` and `CLAUDE.md` are at the root, the issue is
- `gh issue view <n>`, and anything a previous step wrote is wherever you put it.
- 2. **The line telling you to defer to a `piv-*` skill is for the workflow node, not
- for you.** If this repository has that skill, running it is still the better
- answer. If it does not, work the shape in the file -- which is what the node does.
+ Both paths must resolve OUTSIDE the application checkout. That is not tidiness: a
+ policy the candidate can write is not a policy, and a work order the candidate can edit
+ is not the thing it was asked to do.
- Everything else applies unchanged: the same inputs, the same output, the same
- refusals. That is the point of pointing at one file instead of keeping two.
+ ## What the factory supplies
- ## Why the factory and you read the same prompt
+ `factory/sdlc.py` builds both inputs for every automatic validation, and it is worth
+ knowing what they are before you hand-roll them:
- The node prompts are the personalisation layer -- they are meant to be rewritten into
- your process. If the interactive version were a copy, rewriting one would silently
- leave the other saying something else, and the difference would first show up as an
- unattended run doing something you thought you had changed.
+ - **the work order** is the ORIGINAL issue text, captured the first time the factory
+ needed it and kept outside every checkout. Re-reading the issue now reads whatever it
+ says today.
+ - **the policy** pins one command: `factory/fixed_gate.py`, reconstructed out of the
+ BASE tree along with `config.py`, `guard.py`, `gate.py` and `tripwire.py`. The gate a
+ pull request is held to is the gate a human last agreed to, and the candidate cannot
+ supply it.
+
+ To reproduce one by hand, read the `gate.json` and `policy.json` of a real run under the
+ operator runtime root (`factory doctor` prints where that is).
+
+ ## What the receipt does and does not prove
+
+ `verdict == "approve"` is approval. Workflow success is not: a run that finishes and
+ returns `inconclusive` finished. Read `checks` before you read `summary` -- deterministic
+ failed checks outrank a model's approval, and incomplete evidence outranks findings.
+
+ **These worktrees are not sandboxes.** Candidate code runs as you, with your
+ credentials. The receipt says `isolation: fresh_context_only` and means exactly that.
+
+ ## What the factory adds around it
+
+ - **the identity check, twice.** The receipt certifies one repository, one PR and one
+ pair of commits. The factory re-resolves the live head and base before it applies
+ anything, and a pull request that moved during validation goes to a person.
+ - **the digests.** The stream and evidence hashes in the receipt are re-computed against
+ the run's own artifacts. A digest nobody checks is decoration.
+ - **the hold.** Green with ratchet slack, uncalibrated margins or recorded assumptions
+ becomes `factory:held`, not `factory:approved`. Nothing is wrong; a person has to
+ agree, with `factory accept gh:pr:N`, which is the command that keeps the record.