Documentation & page contents

Agent runtime · propose–verify

Harness

Most of Beforewear is not a happy-path blank. It is a harness: agents propose a cut and sewing, the factory verifies, and refusal is structured so the agent can revise.

Workflows are example walks on this loop. The contract is the loop itself — SDK, MCP, and the workflow runner are three surfaces over the same engine.

Evidence, assumptions, and approval

A sketch or photograph can guide a proposal; it does not establish hidden seams, tolerances, grading rules, or measured cloth behavior. Keep those unknowns explicit in the brief.

InputReview requirement
Reference image or swatchSeparate visible details from inferred construction and material assumptions.
Patterns, size chart, material profileConfirm units, source, body measurements, grading intent, and measured properties with the technical owner.
Proposed garment or tech packReview construction, dimensions, artwork, and manufacturing requirements before handoff.

For example, when a reference does not specify a seam allowance, record it as unresolved and obtain the technical designer’s specification. A successful geometry check does not approve that manufacturing decision. The public preview does not expose a complete approval-management interface; agree these review points in the engagement.

Propose–verify

An agent proposes a Pattern or Construction, then checks it through preflight and arrangement. A refusal returns evidence the agent can use to revise the source. Acceptance comes from those checks; the agent cannot relax clearance bounds to make a failed proposal pass.

Propose feeds verify. Acceptance continues the workflow. Refuse is a GateError, then revise, then propose again.
Expand diagram ↗ · Propose. Verify. Accept or refuse. Revise returns a new Pattern or Construction id. Same Client, same loop.

What agents send

Resources and evidence. Not solver knobs.

JobSendDo not send
CutPieces, a size chart, a sentence, a sketch, product photosStretch, scale, grade rules
SewingFamily, recipes, evidence photosClearance bounds
Avatarsex, size, a library pose or a custom poseA mesh, custom measurements, joint angles, a raw SMPL-X file as if it were the factory body
ClothA library id, or a swatchStretch knobs
Drapedevice: cpu or gpuArtwork
Print{placement: uri} after a blank existsPanel names as if they were placements
Mockupkind, optional photo_uriPrompts, seeds, inpaint — nothing that owns the print
Tech packSealed Pattern + Construction, optional run_idPage layout, stitch codes, nest gap
Cloth in spacekind: flatlay, hanger, or foldSubsteps, gravity, in-between frames

Gates

2D first: pattern.preflight, construction.preflight. Physics next: garment.arrange, implied by garment.drape. A refusal is GateError JSON — gate, phase, counts, witnesses, hint. On MCP it is still a JSON-RPC result with isError: true, not a protocol crash.

Then pattern.revise or construction.revise. New ids. The parent resources stay. Walked example: revise_after_gate — one Client, the stub refuses arrange once.

Immutable Runs

Drape produces a blank: UVs, no artwork. Finish, colorway, and graphic return children with parent_id. Size, pose, body, construction, or cloth require a new drape. Navy and black are stamps, not a second physics job. Cloth in space continues a draped or presented Run off the avatar; it is not a second on-body drape.

Provenance on every resource: observed, derived, human_declared, agent_declared.

Surfaces

SurfaceRole
Python ClientNamespaces over the engine. Same names as the tools.
MCPDotted tools on stdio. The catalog is the contract. Hosted auth later.
Workflow runnerExecutable walks. expect_gate, stable sample paths, stub or a plugged-in engine.
Enginev1 is in-memory. Swap later without changing call sites.

python examples/run_workflow.py --list is how an agent sees the walks. The harness underneath them is this page.

Checks, not jobs

garment.measure is points of measure versus the size chart. uv.audit asks whether printable placements still have honest UVs after drape. They inspect a Run. They do not author one.