These flows are starting points. Copy one into .orkestra/workflow.yaml, adapt the prompt templates to your project, and run ork trak create --flow <name> to use it.
For the full list of available fields, see the Workflow Reference.
Full product feature
Best for complex features: upfront planning, parallel implementation via Subtraks, automated checks, and a thorough review before merge. This is the structure the default flow from ork init follows.
After the Breakdown stage is approved, Orkestra spawns parallel Subtraks — one per item in the breakdown — using the subtask flow. All Subtraks complete before the parent Trak advances to Work.
The Compound stage is marked is_automated: true, so it runs without a human approval step.
version: 2
flows:
default:
stages:
- name: planning
artifact: plan
description: Clarifies requirements and produces an implementation plan
prompt: planner.md
model: opus
capabilities:
ask_questions: true
- name: breakdown
artifact: breakdown
description: Researches the codebase and breaks the plan into parallel Subtraks
prompt: breakdown.md
capabilities:
subtasks:
flow: subtask # Simpler flow used for child Traks (Subtraks)
- name: work
artifact: summary
description: Implements code changes in an isolated worktree
prompt: worker.md
gate:
command: "$ORKESTRA_PROJECT_ROOT/.orkestra/scripts/checks.sh"
timeout_seconds: 600
- name: review
artifact: verdict
description: Reviews completed work and produces an approve/reject verdict
prompt: reviewer.md
model: opus
capabilities:
approval:
rejection_stage: work
- name: compound
artifact: learnings
description: Captures learnings to improve future Traks
prompt: compound.md
is_automated: true
integration:
on_failure: work
subtask:
stages:
- name: work
artifact: summary
prompt: worker.md
gate:
command: "$ORKESTRA_PROJECT_ROOT/.orkestra/scripts/checks.sh"
timeout_seconds: 600
- name: review
artifact: verdict
prompt: reviewer.md
capabilities:
approval:
rejection_stage: work
integration:
on_failure: work
The prompt templates used here — planner.md, breakdown.md, worker.md, reviewer.md, and compound.md — are created by ork init. The subtask flow reuses worker.md and reviewer.md from the default flow.
Quick fix
Best for bug fixes, small changes, documentation typos, and dependency updates. No planning or breakdown — just implement and review.
# In .orkestra/workflow.yaml, add under flows:
flows:
quick:
stages:
- name: work
artifact: summary
description: Implements the change and produces a summary
prompt: worker.md
gate:
command: "$ORKESTRA_PROJECT_ROOT/.orkestra/scripts/checks.sh"
timeout_seconds: 300
- name: review
artifact: verdict
description: Reviews the fix and produces an approve/reject verdict
prompt: reviewer.md
capabilities:
approval:
rejection_stage: work
integration:
on_failure: work
This flow reuses worker.md and reviewer.md — no additional prompt templates needed.
To create a Trak using this flow:
ork trak create \
-t "Fix null pointer in auth middleware" \
-d "Line 47 of src/auth/middleware.rs panics when the session token is missing." \
--flow quick
Documentation writer
Best for writing or updating documentation, READMEs, API references, and migration guides. No gate script — documentation doesn’t compile.
# In .orkestra/workflow.yaml, add under flows:
flows:
docs:
stages:
- name: research
artifact: findings
description: Explores the codebase and clarifies what needs documenting
prompt: docs-researcher.md
capabilities:
ask_questions: true
- name: draft
artifact: draft
description: Writes the documentation based on research findings
prompt: docs-writer.md
- name: review
artifact: verdict
description: Reviews the draft for accuracy, completeness, and clarity
prompt: docs-reviewer.md
capabilities:
approval:
rejection_stage: draft
integration:
on_failure: draft
This flow uses custom prompt templates that ork init does not create. Add these files to .orkestra/agents/:
docs-researcher.md— instruct the agent to explore relevant source files, understand the feature being documented, and identify what the documentation must cover. Include questions about audience, depth, and scope.docs-writer.md— instruct the agent to write complete, accurate documentation based on the research artifact. Specify the format (MDX, Markdown, etc.) and any style guide requirements.docs-reviewer.md— instruct the agent to evaluate the draft against the research findings for accuracy, check for missing sections, and produce an approve/reject verdict with specific feedback.
See Prompt Templates for guidance on writing effective stage prompts.
Storybook story generator
Best for generating Storybook stories for existing components. A custom gate script verifies that stories build correctly before human review.
# In .orkestra/workflow.yaml, add under flows:
flows:
storybook:
stages:
- name: analyze
artifact: analysis
description: Identifies which components need stories and their required variants
prompt: storybook-analyzer.md
capabilities:
ask_questions: true
- name: generate
artifact: summary
description: Generates Storybook stories for each identified component
prompt: storybook-writer.md
gate:
command: "$ORKESTRA_PROJECT_ROOT/.orkestra/scripts/storybook-check.sh"
timeout_seconds: 120
- name: review
artifact: verdict
description: Reviews stories for accuracy, completeness, and visual correctness
prompt: reviewer.md
capabilities:
approval:
rejection_stage: generate
integration:
on_failure: generate
Create .orkestra/scripts/storybook-check.sh:
#!/bin/bash
set -e
cd "$ORKESTRA_WORKTREE_PATH"
pnpm storybook build --quiet
This flow uses two custom prompt templates:
storybook-analyzer.md— instruct the agent to explore the component library, identify components lacking story coverage, and produce a structured list of required variants (default, loading, error, edge cases).storybook-writer.md— instruct the agent to write complete CSF3 stories based on the analysis artifact, matching the project’s existing story patterns.
The review stage reuses reviewer.md from the default flow.
Using multiple flows
All flows live in a single .orkestra/workflow.yaml under the flows: map. Add each flow as a named entry:
version: 2
flows:
default:
# ...
quick:
# ...
docs:
# ...
storybook:
# ...
You can also share gate scripts across flows. The storybook-check.sh above is a separate file from checks.sh — reference it by path in the gate command field. See Shell Scripts for the gate script interface and available environment variables.