factory package

Reviewed against commit 8a2cb42ad on 2026-10-23.

Reference: package page (74 modules, 13,812 lines, sixteen subpackages; each is linked in the table below). How the factory fits the rest of orchestrata is explained in the overview.

The story

orchestrata_ultimate.factory is the SPEC-033 governed autonomous build factory — the machinery that lets agent swarms build software under explicit, machine-checkable governance instead of trust. Work enters as assumptions and anchors, is gated by a Definition-of-Ready, is built in isolated worktrees under a DAG scheduler, and can only be promoted after conformance, evidence, and dispatch gates pass. The package is organized by SPEC-033 §9 row (the B-numbers below); its design decisions live in ADR-0004..0033.

Subpackages

The counts in parentheses are module counts at commit 8a2cb42ad, each including the subpackage __init__ (earlier revisions of this page gave smaller counts).

Subpackage Row Purpose
assumptions/ (8) B13 Assumption ledger + three-stage arbiter cascade (REQ-033-C1, Phase 0)
anchors/ (7) B15a/B15b Semantic anchors — authoring, storage, ratification, evaluation gate
contracts/ (3) B3 Minimal design-node contract schema + structural trace validation (ADR-0007/0008)
conformance/ (2) B2 AST≡design conformance engine (ADR-0007/ADR-0008)
decision/ (3) B8 Design authority + decision phase + DoR gate wiring (ADR-0015/0028)
detectors/ (7) B22 C3 lexical/structural detector set (ADR-0029)
dispatch/ (3) B21 Pre-dispatch / pre-promotion admission gates (ADR-0033/0018/0032)
dor_procedure/ (7) B23 DoR construction procedure with machine-checkable step shapes (REQ-033-C5)
enforcement/ (8) B1a/B1b/B1c State-diff enforcement core + attestations (§3, Phase 1)
evidence/ (3) B6 Red-first ledger + affected-set mutation testing (evidence against false confidence)
fastpath/ (2) B12 Fast-path classifier (ADR-0023)
formalization/ (4) B26 Declared formalization + C4 detection (ADR-0022, REQ-033-C4)
projection/ (3) B5 Rule-driven projection + completeness meta-check (ADR-0006/0025)
promotion/ (3) B4a Fact-namespace promotion + abandoned-worktree GC (§4, ADR-0004/0019)
amendment/ (5) B16 Amendment-direction differential classifier (ADR-0009/0020/0021)
scheduler/ (5) B9 DAG scheduler + level-parallel worktrees + merge queue / integration re-gate

CLIs

Every row has a thin CLI in the orchestrata repo under scripts/factory_*.py (e.g. factory_assumptions.py, factory_enforce.py, factory_pipeline.py) — see the repo's docs/CODEBASE_MAP.md for the full list.

Class map (generated)

Generated from the live source AST by scripts/gen-module-class-diagrams.py — do not hand-edit. Abstract classes have a green border; members listed are those defined on the class itself (inherited members excluded). Solid empty-triangle arrows = in-package inheritance; dashed arrows into dashed boxes = external/stdlib/cross-package bases; filled diamond = composition (constructed in __init__); open diamond = aggregation (annotated/injected reference); diamond edge labels name the owning attribute.

factory class map