# roba-rust-dispatch.toml -- a committed worker-dispatch config for a Rust
# project, proven on a real backlog run (joshrotenberg/cratesio-mcp, ~15 issues).
#
# Copy to your repo as `roba.toml`; roba discovers it via the config pool
# walk-up, so any invocation in the repo (yours or an agent's) inherits it.
#
# The discipline it models: SAFE BY DEFAULT (with no `--profile`, roba's
# built-in read-only posture applies -- Read/Glob/Grep only), and the POWERFUL
# posture is the NAMED `worker` profile -- an explicit opt-in (`--profile
# worker`), never the auto-applied default.

[profile.worker]
# Unattended issue dispatch: full tool access, a capable model with an opus
# fallback for the hard fixes, bounded by turn + dollar seatbelts.
#
# max_turns is high on purpose: a real fix can cascade a signature change
# across many call sites (a 14-file change exhausted 40 turns before it could
# gate + commit), so 80 gives headroom; the dollar cap is the real seatbelt.
full_auto      = true
model          = "sonnet"
fallback_model = "opus"
max_turns      = 80
max_budget_usd = 10.0

[profile.quick]
# Cheap one-shots (trivial docs, surveys). Read-only by default; just a
# cheaper model than `worker`.
model = "haiku"

# --- Aliases: single-shot invocations parameterized by an issue number ---

[alias.fix]
# `roba fix 88` -> embed the issue, dispatch a worker, implement + commit.
# A single roba turn (an alias is width, not depth) -- the multi-step PR
# lifecycle around it is a SKILL, not config.
args     = ["issue"]
flags    = ["--profile", "worker"]
template = """
$(gh issue view ${issue})

Implement this issue and commit. Run fmt/clippy/test first; verify any
counts/names from the CODE, not the issue text.
"""

[alias.design]
# `roba design 55` -> a READ-ONLY design exploration. No code written.
# Validated hard: on one real issue it found a tool-name collision AND
# dissolved the issue's false premise in a single pass. A design alias does
# not just design -- it audits the spec.
args     = ["issue"]
flags    = ["--readonly", "--model", "opus"]
template = """
DESIGN PHASE -- read-only, NO implementation code.

$(gh issue view ${issue})

Survey the relevant code, then produce a design proposal: approach, data
sources, input/output, integration, edge cases, and open questions for the
maintainer. Do NOT implement.
"""
