Factories > Guides
Testing and tuning your factory
Evaluate your factory's output and cost with small test changes, then tune one setting at a time before expanding its workload.
Test your factory on small changes from your backlog before expanding its workload. Record output quality and cost as a baseline, change one setting, then compare a fresh trial from the same starting commit.
The example adds a “Copy link” button to an existing app. If you do not have an app to test, use the committed-spec exercise to document helper tests in a disposable fork. That draft exercise still needs setup and runtime verification. Configure approval and review in your Blueprint before sending a request.
Prerequisites
Section titled “Prerequisites”- A factory connected to your repository, with workers assigned to planning, implementation, and independent review.
- A runner with your project’s toolchain and access to the repository’s documented checks.
- Permission to edit the factory.
- A Blueprint with planning, implementation, independent review, and a plan-review gate that waits for approval.
Test with a small change
Section titled “Test with a small change”-
Choose two or three changes, each small enough for one pull request. Use agreed requirements or reproducible bugs; resolve major product questions before testing.
-
Record the starting commit, current behavior, requested behavior, and acceptance criteria for the first change.
For example, if your app has a share dialog with a URL field, request a “Copy link” button. Require it to copy the displayed URL, show confirmation for two seconds, and work with the keyboard. Ask the planning worker to specify behavior for copy failures and accessibility before implementation.
-
In the Warp Factories web app, click New Chat and choose your factory below the prompt input. Send the test prompt, adapted to your change.
Check for a draft pull request containing the spec and a request for your approval. Implementation must wait.
-
Review the committed spec. Ask for revisions or edit its branch if needed.
-
In the same conversation, explicitly approve the spec’s current committed revision, including any direct edits you made. Check that implementation reuses the spec PR and reports the requested checks and independent review. Request a revision on that PR and confirm another independent review covers the new head. Do not merge test output.
Evaluate the run
Section titled “Evaluate the run”Inspect the worker runs
Section titled “Inspect the worker runs”- In the web app sidebar, click Runs. Related worker runs group under their parent.
- Check that the spec preceded implementation and implementation waited for your approval. The factory can answer questions while it waits, but it must not implement.
- Open the runs to inspect their timelines, cost, and sessions. Check which files the spec worker read, whether implementation ran the reported checks, and whether review examined the diff.
Check the outputs
Section titled “Check the outputs”- Describes behavior, scope, assumptions, and decisions needing your approval.
- Gives an executable check for each acceptance criterion.
- Scales to the change rather than prescribing unnecessary implementation detail.
For the button example, “copies the URL” needs a test of the exact copied value. “Works with the keyboard” needs evidence of keyboard activation, not only a screenshot.
Pull request
Section titled “Pull request”- Uses the approved spec’s branch and pull request.
- Meets the acceptance criteria without unrelated changes.
- Lists actual verification commands and results, including visual evidence for UI behavior.
Review
Section titled “Review”- Findings identify the problem, location, severity, and correction.
- Defects are distinguished from product decisions requiring your judgment.
- The reviewed SHA matches the delivered head after corrections. Contract changes return to the spec for revision and fresh approval.
For example, a missing assertion for a required fallback is a test gap. Choosing behavior the spec never defined needs a product decision, not an automatic correction.
Handoff
Section titled “Handoff”- The foreman returns the pull request, verification evidence, review summary, and remaining questions.
- The handoff includes a merge-risk assessment explaining remaining verification gaps, potential impact, and what recovery would require.
- The pull request remains unmerged.
Check cost and quality
Section titled “Check cost and quality”- Record each worker run’s cost alongside its timeline. Compare the same stage across trials.
- On the factory’s Dashboard page, compare Cost per PR and Most expensive PRs across runs. These are comparison metrics, not invoice totals. See factory cost metrics.
- Record gaps against your team’s standards for scope, tests, and description quality.
A Scorer evaluates completed runs against criteria you write, such as whether the worker ran tests before opening the PR. Try it from a completed run’s page. Compare its reasoning with your review before using it on a sample of runs.
Tune one setting
Section titled “Tune one setting”Use the table below to choose an adjustment based on a gap you found in the output. Keep required approvals and review in place while testing an adjustment. Compare prompt and model changes separately.
| Observation | Adjustment to test | Stage or worker |
|---|---|---|
| Implementation made an unresolved product decision | Require the spec to surface that decision for approval | Planning stage |
| The spec is too detailed | Shorten its template for small changes | Planning stage |
| Implementation costs too much | Compare another supported model on the same task | Implementation worker |
| Review reports irrelevant style findings | Narrow the blocking criteria without removing correctness checks | Review stage |
| Review misses defects | Add the missed failure mode to the instructions | Review stage |
| A worker skips a required check | Name the repository’s exact check command | The worker that skipped it |
| A UI result is described but not demonstrated | Require a capture of the changed interaction, not only the final screen | Verification stage |
| A PR omits how to recover if the change fails | Require rollback cost and unresolved recovery decisions in the risk assessment | Implementation handoff |
-
Edit the configuration that controls the result you want to change. For stage procedures, transitions, or gates, edit the Blueprint in
factory.yaml. For shared procedures, edit the attached skill. For a worker’s model or instructions shared across stages, open that worker on Workers and edit its “Model” setting or Prompt. In a GitHub-backed factory, edit the existing file underworkers/oragents/. Keep its directory and filename. -
Apply a definition-file change by saving Factory definition for a Warp-managed factory, or merging the definition pull request into its production branch for a GitHub-backed factory. Confirm validation passes. See where the definition lives.
Change one worker’s model, not
agentDefaults.model, which also affects workers inheriting that default. For model comparisons, use a benchmark before changing production; a completed run’s page can supply a benchmark task. -
Start a fresh trial from New Chat using the same requirements and recorded starting commit. Ask for a new test branch and pull request, with no commits from the earlier trial. If you track tests in issues, use a separate test issue rather than continuing the old work item.
-
Review the new spec and approve it separately. Compare outputs and the same stage’s cost with the baseline.
Existing work keeps its selected Blueprint. Closing a pull request or reapplying a trigger label is not a reset. Check the new branch’s starting commit and diff before treating trials as comparable.
Repeat, then widen the scope
Section titled “Repeat, then widen the scope”Repeat a test with unchanged settings before attributing a difference to tuning. Two or three small changes are a starting sample, not proof of reliability. Expand only when the results consistently include:
- A spec you can approve without edits.
- An implementation meeting the acceptance criteria.
- Review findings that match the checks you would make yourself.
Expand one dimension at a time: task size, task type, or intake source. Choose workers for the task rather than sending every request through the same stages. See factory use cases.
As volume grows, use sampled Scorers and the practical improvement loop, while keeping human review.
Start a test with a prompt
Section titled “Start a test with a prompt”- Replace the uppercase placeholders with your repository, starting commit, change, and checks.
- Send the prompt to your foreman through New Chat or a coding agent connected through Factory MCP.
Run a test change in OWNER/REPO from BASE_COMMIT.Requested change: CHANGE_DESCRIPTION.Acceptance criteria: ACCEPTANCE_CRITERIA.Documented checks: CHECK_COMMANDS.
Use a new test branch and pull request, without changes from earlier trials.Run the planning stage to write a short spec in a draft pull request. Ask me aboutunresolved behavior, name a check for each acceptance criterion, and stopfor my explicit approval. Do not start implementation before I approvethis spec, even if a previous test was approved.
After approval, implement on the spec's branch and pull request, run thedocumented checks, and run independent review. Correct actionable findingson the same PR, then independently review the revised head. Ask me aboutcontract changes and get fresh approval of the revised spec.Before handoff, assess alignment, impact, verification, rollback cost,and error detection for the delivered head. Mitigate gaps within theapproved scope. Ask me about changes to behavior or rollout.Return the pull request, verification results, risk assessment, andunresolved questions. Never merge. Report amissing tool or permission rather than claiming an unrun check passed.Troubleshooting
Section titled “Troubleshooting”Implementation starts before approval. Stop the run and inspect its Blueprint. Check that the stage that writes the spec has an approval gate and that the route into implementation requires approval of the current committed spec. Also check overlapping automations before starting a fresh test.
The new trial continues earlier work. A follow-up retains context. Start through New Chat, remove references to the earlier work item, and verify the requested baseline and new branch before approving.
Results vary with unchanged settings. Repeat the test before tuning. For model comparisons, use a benchmark with repetitions and review individual trials.
A run costs more than expected. Inspect cost by stage and look for repeated validation or revision rounds. Test one adjustment rather than assuming the model caused the increase.
Guide navigation
Section titled “Guide navigation”- Previous stage: Configure your factory - Revisit the complementary setup options
- Next stage: Connect work intake through the tools your team uses:
- All stages: Factory guides
Related pages
Section titled “Related pages”- Configuring factory workers - Change one worker’s instructions or model
- Measure and improve a factory - Move from manual checks to sampled evaluation
- Factory benchmarks - Compare configurations on fixed tasks