Entry gate
Assemble’s exit gate: the unit built clean from parts and BOM, zero manual intervention, with Design’s red eval waiting to be run for real.Standard work
Three layers, fail-closed, in order of increasing judgment:- Proof-of-work (deterministic). The six-layer stack: static checks, unit tests, integration tests, regression, complexity analysis, evidence capture. Zero-judgment, scriptable, cheap to run — so it runs always. For skills: the skill validator plus planted-bug fixtures, which already exist and already work. They are poka-yoke, and they are un-skippable.
- Reference-free judgment (probabilistic). LLM-as-judge with explicit criteria — “quality” is not a criterion; “does not hallucinate dates” is — and confidence-graded routing: high-confidence pass proceeds; low confidence routes to human review; actively-wrong pulls the andon. Judge independence is dual-sourcing: the judge runs on a different model than the generator, because shared failure modes defeat the gate. This layer is where human review capacity earns its leverage — the operator audits the auditor instead of checking everything.
- Conscience check. The unit’s output is compared against its own contract and values documents — the loop that separates an agent that knows its values from one that checks them. It runs before output, preventively. The factory holds itself to the same rule: each station agent checks its work against the station’s standard work before signaling complete.
Exit gate
All deterministic layers green; judge confidence above threshold; conscience clean. Every failure produces a structured defect record — the input to a Five Whys investigation if the defect later proves to have escaped.Escalation
Three-way routing is the escalation policy, compiled: proceed, human review, or andon. An actively-wrong verdict is a red — the line segment halts. And the generator never judges its own work; any path where it might is itself a defect in the station.Enforcement
Four rows of the compilation table land here:- Row 3 — skill quality gates:
agents/qa/tools/validate-skill.py, which validates a skill against the quality profile and emits a JSON report; wired as an un-skippable pre-merge hook. It exists — the work is enforcement. - Row 4 — proof-of-work stack: CI pipeline per family with automated evidence capture.
- Row 5 — judge independence and confidence routing: judge harness pinned to a non-generator model, router with the three-way outcome.
- Row 6 — conscience loop: pre-output check of unit output against its contract; hard stop on mismatch.
Self-audit
| Claim | Source |
|---|---|
| Three layers, fail-closed; deepest capital investment | docs/factory-design.md:121 |
| Proof-of-work six-layer stack; validate-skill.py + planted-bug fixtures as poka-yoke, un-skippable | docs/factory-design.md:123 |
| Judge criteria example; three-way routing; judge independence as dual-sourcing | docs/factory-design.md:124 |
| Conscience check; knows-vs-checks; stations check their own work | docs/factory-design.md:125 |
| Exit gate: deterministic green, judge above threshold, conscience clean, structured defect records | docs/factory-design.md:127 |
| Rows 3–6 of the compilation table | docs/factory-design.md:196–199 |
| Skill validator: validates SKILL.md against the quality profile, JSON report | agents/qa/tools/validate-skill.py (module docstring) |