Cookbook
These recipes assume workflows from the base layer (workflows/job-fast, workflows/job, workflows/job-deep, workflows/campaign) and the tools described in /concepts/runner-spec/. Adjust names to your tenant overlay.
Rate limiting a REST endpoint
Goal: Add fair queuing / token-bucket limits to an existing HTTP surface without changing public routes.
- Classify risk — usually STANDARD unless the change spans multiple services (/guides/switch-lanes/).
- Planner sets language + work items; Coder loads
golang-conventions/typescript-conventions/dotnet-conventionsvia the Skill tool before editing. - Code-reviewer subagent invokes
cross-cutting-review(STANDARD/DEEP) to catch observability + abuse edge cases. - Evaluator confirms behaviour with unit tests and optional
loki_querycanaries if you document example log lines (/guides/observability/).
Why not FAST? Rate limits touch operational risk and often need L4 review plus metrics — mis-sized FAST jobs should switch_workflow upward.
Safe database migration (DEEP lane)
Goal: Ship additive schema + backfill with expand/contract discipline.
- Force DEEP (
switch_workflow→workflows/job-deep/workflow.md) so Analyser + QA phases run. - Early: invoke
db-migrations-safeskill (Analyzer + code-reviewer L4). - Document rollout flags + reversibility in
register.jsonperregister-conventionskill. - Evaluator runs migration in CI and validates row counts / guard queries; capture insights with
add_insightif provider quirks appear (/guides/manage-memory/).
Dependency version bump (FAST lane)
Goal: Patch-level library bump with no API redesign.
- Start from STANDARD intake; Planner confirms all FAST signals — single package family, tests green expectation, no public contract edits.
- Call
switch_workflow({ workflowPath: "workflows/job-fast/workflow.md", reason: "Patch bump scoped to one module" }). - Coder runs focused test targets from language skill; skip heavy L4 lenses automatically on FAST.
- If diff grows beyond guardrail caps (/guides/configure-guardrails/), split work items or escalate lane.
Cross-service feature as a campaign
Goal: Producer + consumer repos must merge in order without one giant PR.
- File ticket /
coro jobwith explicit multi-repo scope — allow Planner toconvert_to_campaign(or start in campaign workflow if your automation supports it). - Campaign planner registers children with
dependsOnedges matching integration order (/guides/run-campaign/). - Use
campaign-contractsskill expectations so each child records interface snapshots. - Track progress via
coro campaign show --job <id>; aggregate token usage for FinOps.
Adding a team convention via memory update
Goal: Encode “how we do X” without forking the entire Coder agent.
- During any job, agents record raw learnings through
add_insightwith concrete recipes. - Evaluator opens one
propose_changePR adding a short entry tomemory/successful-patterns.md(or a new file linked fromMEMORY.md) — respect append budgets (/guides/manage-memory/). - Reviewers follow /guides/review-proposals/ — reject narrative essays; demand checklists.
- Optional hygiene: schedule
memory-curatorworkflow when files grow past token targets.