Create your first route
Build a workflow for a small feature. The result is a validated draft, a published revision and a clear next step: a trial run.
This guide uses separate stages with human plan approval. For agent-managed intermediate work, read loop mode.
Before starting
Prepare the project and profile: repositories, runners, commands and task environment. Define acceptance criteria. The example is a product filter for stock in the selected warehouse.
1. Create a draft
Open Routes for the project. Create draft from current copies the published catalog, including routes, scout and instructions. Without a published catalog it creates an empty draft. You can save an incomplete draft, but publication requires validation.
2. Add stages
| Stage | Type | Purpose |
|---|---|---|
| Explore | agent | Find code and constraints. |
| Plan | agent | Describe the approach and checks. |
| Approve plan | gate | Wait for a human decision. |
| Implement | agent | Make the approved change. |
| Check | command | Run a check declared by the profile. |
| Accept work | gate | Inspect the preview and accept the result. |
The list and diagram open the same stage inspector. Real workflows can separate tests, build, review and browser verification.
3. Write instructions
Specify the stage goal, context, expected result, completion criteria and situations requiring a question.
Inspect the current catalog and stock data source.
Plan filtering by availability in the selected warehouse.
Provide a check for each acceptance criterion.
Preserve behavior when the filter is disabled.
Ask a human if required context is missing.Instruction blocks contain Markdown and required context. Show instruction previews the assembled text using learning inputs.
4. Connect outcomes
List order does not create transitions. Configure each outcome explicitly:
- Successful agent work proceeds to the next stage.
- Plan approval proceeds to implementation.
- Plan rejection returns to its author.
- Failed checks return to implementation or stop according to project rules.
- Rejected results return with human feedback.
Return feedback to a stage that can process it. A command cannot read an instruction for rework.
5. Assign runners
Project launch policy selects runners and models. Routes store workflow and instructions rather than provider bindings. See runners and models.
6. Validate the workflow
- Preview instructions with prepared context.
- Simulate the successful path.
- Check plan rejection and acceptance rework.
- Validate the draft and fix reported issues.
Instruction previews and transition simulation do not run AI or project commands. Verify real execution with a separate task.
7. Compare and publish
Compare against current, then publish the validated snapshot. If a profile script previously managed catalog publication, the editor asks you to explicitly switch ownership to the editor.
New attempts use the published revision. Existing attempts keep their previous revision.
Lost publication response
Use the result check action to inspect the operation already submitted. A missing response does not mean publication failed.
8. Run a small task
Confirm its scope, choose the route and observe its first run. Check acceptance criteria in the preview. Use what you learn to improve the next route revision.
Continue with running a task.