factory-implement ยท diff
git:20260905.67e37c7 to git:20260908.31d25b9
29 added, 23 removed. Audit A to A.
---
name: factory-implement
- description: Build one planned issue the way the factory builds it, using Archon's sdlc builder.
- argument-hint: optionally the plan to implement (default: the run's plan.md)
+ description: Take one accepted issue from issue to reviewed pull request, the way the factory does it.
+ argument-hint: the issue, e.g. `gh:issue:12`
---
# factory-implement
- **The builder is Archon's, not ours.**
+ **The whole issue-to-PR path is `archon-ship`'s, not ours.** One governed run: it
+ grounds the item against the current repository, takes the least speculative route
+ (investigate an unknown cause, plan an undecided shape, or deliver directly), then
+ implements, reviews and publishes a pull request.
```bash
- archon workflow run archon-implement "Implement plan.md in full. Nothing outside the plan."
+ archon workflow run archon-ship --branch factory/implement-issue-12 --base main \
+ --input target="https://github.com/OWNER/REPO/issues/12" \
+ --input publication_policy=/absolute/path/outside/the/checkout/publication.json
```
- `archon-implement` ships bundled in the engine. It loops the implement command until it
- reports done (max 5), returns `{done, green, red_cause, summary}`, commits as it goes,
- and ends in a deterministic `assert-changed` guard -- because an AI node that declines
- its task still exits 0.
-
- The factory's own single-shot implement prompt is gone. It had no loop, no green verdict
- and no decline guard, so keeping it alongside this would have meant maintaining the
- weaker of two builders.
+ There is no separate plan step to run first. `archon-ship` decides whether planning is
+ owed, and `factory-plan` exists for when you want that decision on its own.
## What the factory adds around it
- - **`commit`** asserts the branch actually differs from its base. Since the builder
- commits its own work, a clean tree with commits ahead of base is success -- the fatal
- case is a branch identical to base, which is the whole lap being theatre.
- - **`guard`** enforces the protected paths and the size and scope caps, before anything
- judges the diff.
- - **`selfcheck`** runs the full gate for the builder's benefit, so a lap does not spend a
- validation cycle learning it is red.
+ Only the things a generic pipeline cannot know:
+ - **the publication policy.** An absolute path to operator-owned JSON naming one argv
+ command and the protected paths. The factory points it at `factory/fixed_gate.py
+ --publication`, rebuilt from the BASE tree, which enforces the protected list, the
+ size and scope caps and the secret preflight. **A model's summary cannot waive it**,
+ and a nonzero exit refuses publication.
+ - **the issue linkage**, recorded on disk rather than parsed back out of the pull
+ request body. `Closes #N` is prose, an agent writes it, and one run put it inside
+ backticks so GitHub ignored it entirely.
+ - **the state machine.** The issue goes `accepted -> in-progress` before the dispatch
+ and the pull request arrives at `factory:needs-review`. A delivery never marks its
+ own work approved.
+
## The holdout
- The include carries a `denied_tools` list covering `.factory/holdout/**`, and Archon
- unions it onto every node the pack expands into. Verify it rather than trusting it: none
- of those nodes knows this factory has a holdout, and without the deny a builder could
- read the assertions it is being measured against, with every check still green.
+ `.factory/holdout/**` is on the protected list, so no delivery can edit it. Reading is
+ the harder half: every node the pack expands into grants `Read`, and none of them knows
+ this factory has a holdout. Check the deny reaches them -- expand the workflow and look
+ -- because a builder that can read the assertions it is measured against optimises
+ directly against the answer key, with every check still green.