Skip to content

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.

  1. Classify risk — usually STANDARD unless the change spans multiple services (/guides/switch-lanes/).
  2. Planner sets language + work items; Coder loads golang-conventions / typescript-conventions / dotnet-conventions via the Skill tool before editing.
  3. Code-reviewer subagent invokes cross-cutting-review (STANDARD/DEEP) to catch observability + abuse edge cases.
  4. Evaluator confirms behaviour with unit tests and optional loki_query canaries 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.

  1. Force DEEP (switch_workflowworkflows/job-deep/workflow.md) so Analyser + QA phases run.
  2. Early: invoke db-migrations-safe skill (Analyzer + code-reviewer L4).
  3. Document rollout flags + reversibility in register.json per register-convention skill.
  4. Evaluator runs migration in CI and validates row counts / guard queries; capture insights with add_insight if provider quirks appear (/guides/manage-memory/).

Dependency version bump (FAST lane)

Goal: Patch-level library bump with no API redesign.

  1. Start from STANDARD intake; Planner confirms all FAST signals — single package family, tests green expectation, no public contract edits.
  2. Call switch_workflow({ workflowPath: "workflows/job-fast/workflow.md", reason: "Patch bump scoped to one module" }).
  3. Coder runs focused test targets from language skill; skip heavy L4 lenses automatically on FAST.
  4. 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.

  1. File ticket / coro job with explicit multi-repo scope — allow Planner to convert_to_campaign (or start in campaign workflow if your automation supports it).
  2. Campaign planner registers children with dependsOn edges matching integration order (/guides/run-campaign/).
  3. Use campaign-contracts skill expectations so each child records interface snapshots.
  4. 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.

  1. During any job, agents record raw learnings through add_insight with concrete recipes.
  2. Evaluator opens one propose_change PR adding a short entry to memory/successful-patterns.md (or a new file linked from MEMORY.md) — respect append budgets (/guides/manage-memory/).
  3. Reviewers follow /guides/review-proposals/ — reject narrative essays; demand checklists.
  4. Optional hygiene: schedule memory-curator workflow when files grow past token targets.