factory-loop
Factory loop
Route one work item through the smallest complete evidence path. The loop owns phase order, admission, evidence freshness, re-entry, and human gates. Each delegated skill owns its method.
select? → admit → contract → shape → execute → Spec → review → show → human promote → deliver → record
↑ │ │
└─ reshape ┴─ successor run ← feedback ─────────────┘
software-factory-maintenance is a separate maintainer workflow for queue cleanup, contributor branches, merge, release, and production verification. Do not silently substitute it for this gated loop.
herdr-workstreams is an optional runtime adapter, not another lifecycle owner. When this loop runs inside Herdr, delegated gates and factory stages may use it for visible on-demand specialists. Topology and lifecycle state never satisfy a phase or upgrade prose into evidence.
1. Locate the earliest incomplete state
Inventory the selected source, source revision, Issue Contract, accepted shape or Formula, repository HEAD, diff, stage evidence, review report, acceptance artifact, promotion state, and case. Treat remembered or agent-reported completion as a lead.
If no item is selected, invoke issue-intake and stop for the user's choice. If a handoff exists, invoke workstream-reconcile and route from its current evidence, not its historical stage label. Do not rerun a complete phase unless later changes invalidated it.