Production boundaries: roster, Docker, credentials
Keep a successful opt-in provider from silently becoming an unproven production dependency.
Pinned upstream commit: b189869b7755d2b482969acf6c92da3ecfeffd36
- Distinguish provider availability from roster selection.
- List Docker prerequisites without performing an unapproved rollout.
- Keep secrets outside commands, artifacts, and logs.
The big idea
Adding `factory.grok()` makes a capability available to explicit callers. It does not install Grok in the Factory image, authenticate a container, or add Grok to the fixed planner/implementer/reviewer roster. Those are separate decisions with separate proof gates.
Think of it like… Installing a new instrument in the storeroom does not rewrite the orchestra's score or put a musician on stage. The analogy breaks because a CLI also needs credentials, network, version pinning, and sandbox policy before the stage exists.
`.factory/run.ts` remains a small explicit roster: Claude for planning/publishing and Codex routes for implementation/review. `.factory/Dockerfile` installs pinned Codex and Claude tooling, not Grok. Provider export is additive library surface only.
For CI/container use, the upstream auth guide supports `XAI_API_KEY` and device/external auth flows; stored browser credentials take precedence when present. A production design must choose one injection method, prevent logging, pin the CLI, and prove the exact image. It must not copy `~/.grok/auth.json` casually.
Evidence: Pinned authentication guide
Compare the boundaries
Safe: explicit caller, injected secret, pinned image, independent smoke.
Risky: auto-route to a host-only CLI or copy personal auth into an image.
| Surface | Upstream | Alembic | Verdict |
|---|---|---|---|
| Library export | `factory.grok()` available | Already implemented | OPT-IN |
| Factory image | Pinned binary + auth + network | Grok not installed | FUTURE |
| Fixed roster | Planner/implementer/reviewer choice | No Grok route | UNCHANGED |
For CI/container use, the upstream auth guide supports `XAI_API_KEY` and device/external auth flows; stored browser credentials take precedence when present. A production design must choose one injection method, prevent logging, pin the CLI, and prove the exact image. It must not copy `~/.grok/auth.json` casually.
Real code and commands
.factory/run.ts + .factory/Dockerfile
rg -n "planner:|implementer:|reviewer:" .factory/run.ts rg -n "codex|claude|grok" .factory/Dockerfile # Current evidence: # .factory/run.ts -> Claude/Codex fixed roster # .factory/Dockerfile -> Codex + Claude install; no Grok
How to reach it
sed -n '1,90p' .factory/run.ts sed -n '1,90p' .factory/Dockerfile sed -n '1,70p' packages/factory/README.md
Evidence: RESOURCES.md
Visual atlas
Practice and feedback
`factory.grok()` works on the host. Can `.factory/run.ts` route production work to it now?
Retrieval cards
Toggle the production layers
Select a layer and see its prerequisite and current status.
Four-slide summary
Check your model
What changes when `factory.grok()` is exported?