AGENT-ASSISTED RESOLUTION

Turn a disagreement into a verified repair

A minimized counterexample contains the exact input, seed, implementation IDs, and different results. Give that file to the coding agent through Polyform:

polyform resolve fuzz/counterexamples/decode_filename/91c7….json

Codex is the default agent. Polyform supplies the relevant function contract, complete specification, counterexample, observed results, and strict repair instructions.

The safe default keeps the specification immutable

Without another option, the agent must determine the correct result from the existing specification, add the minimized input as a permanent regression test, and repair the incorrect implementation or implementations. It may not edit the specification, weaken tests, disable fuzzing, delete an implementation merely to hide the disagreement, or choose the majority result.

Let the agent clarify an incomplete specification

polyform resolve fuzz/counterexamples/decode_filename/91c7….json --fix-spec

--fix-spec is an explicit authorization. The agent may add a general requirement and behavioral examples when the existing contract does not determine the answer. It is instructed to derive that decision from the application purpose, external standards, and security requirements—not to rewrite the contract around whichever result is most common.

The developer remains the reviewer Polyform validates the edited specification, but an agent’s product decision is still a proposed change. Review the specification diff before committing it.

Polyform verifies the result itself

  1. The agent edits source, tests, and—only with --fix-spec—the specification.
  2. Polyform rejects any attempt to change polyform.toml, then runs the configured verification path after the edit.
  3. Polyform replays the saved minimized input through the fuzz harness.
  4. At least two implementations must now produce the same structured result.
  5. polyform check runs the full conformance suite, deterministic differential fuzzing, and build checks.
  6. A resolution record is appended to .polyform/resolutions.jsonl.

If the case still disagrees, the changes remain available for review and the command fails. Without --fix-spec, Polyform points directly to that option when the missing behavior appears to require a specification decision.

Preview the agent’s instructions

polyform resolve PATH --dry-run
polyform resolve PATH --agent /path/to/another-agent

The completed loop is now: generate implementations, fuzz them against one another, resolve minimized disagreements, run the final checks, and publish.