Factory docs, home
Page navigation

See the input → responsibility → output diagram.

What it does for you: It turns proposed text-file edits into a sealed Candidate: an exact commit and manifest that cannot quietly change afterwards. It exports those exact bytes in the form the Confined executor takes. When asked, it moves the target branch from the Candidate's base to its commit, at most once per prepared Action occurrence. If it cannot tell whether that move happened, it says "unknown". A caller can also hand it a last check that runs just before the move; if that check does not say yes, nothing moves, the call says "withheld", and that occurrence is used up.

An indigo bob carrying a tied, sealed parcel.

Meet the packer. The exact parcel, every time. Seals Candidate bytes and guards a local branch move; reconciles an uncertain result. Meet the whole Plumb family.

How it links: It takes proposed edits and pinned inputs from a caller, and canonical encoding from Command journal. Its exports fit the Confined executor. Native Delivery, exposed by scripts/factory-delivery.ts, joins Repository with the Product gate, independent collectors and guarded integration. Implementation Workflow seals worker edits, Verification Workflow accepts an exact external native seal, and Factory workflow orders prepared caller-owned stages. Their bounded local proof and remaining gates are recorded in the build review.

Honest limits:

  • It works only on fresh repositories it creates itself, on one Mac with Xcode's Git, in trusted local storage. It does not import existing projects or contact remotes.
  • Not established: crash atomicity across its separate steps, surviving power loss, and protection from a hostile writer. An uncertain move stays "unknown", never "not applied", and "unknown" never permits a retry.
  • The last check narrows the gap before the move but cannot close it: a change in the instant between the check and Git's own update is not seen. Native Delivery passes the final current-authority check before its guarded local move; the same remaining gap applies.

Status: Sealing / export is accepted for fresh owned local repositories. Acceptance and evidence.

Contract and limits

Repository now shares its input grammar with the gate and delivery records. A correctly shaped intent still needs to exist in the owned store before Repository will act. See the contract and compatibility rules.

The private standalone adoption draft now lets a caller use these existing modules in its own application. Its runnable example seals a Candidate and shows why missing authority leaves the target unchanged. Its historical acceptance is retained; current bounded stage and concert evidence, combined acceptance and live commissioning are tracked separately in the build review.

Choose invokeOnceGuarded when admission must be rechecked immediately before the move. invokeOnceUnguarded explicitly performs the low-level effect under caller authority. Both retain once-only claim, uncertainty and replay semantics; the legacy optional-guard method remains compatible.

Source: docs/guide/repository.md