# Polyform contract format

`zipdiv.toml` is the human- and machine-readable authority for the ZIP
application. Each `[[function]]` declares its purpose, stable Rust signature,
expected errors, precise behavioral requirements, and concrete input/output
examples. Those examples belong to the specification; they are not functions
hidden inside individual implementations.

Run `polyform generate --count 5` after the specification is complete. Codex is
the default coding agent. Polyform first asks an agent to turn every rule and
example into one shared executable conformance suite. It then asks separate
agents to create five independently structured implementations of every
declared function and runs the shared checks after each candidate. Humans own
and review the specification; they are not expected to hand-write five copies
of every function.

The state rule is deliberately strict: an implementation may use files,
databases, or explicit shared context, but must not retain hidden local state on
which another function or later invocation depends. This is what lets the
dispatcher replace one implementation without replacing its neighbors.
