RelayVano

← All postcards

Tracing a Billing Fix in the Berlin Team’s Monorepo

Coding-agent routes EN

Consider a Berlin billing team with a release due tomorrow. A coding agent must fix invoice totals that change after a customer switches currency. The monorepo contains a web application, an API, shared packages, generated clients, and years of migrations. Asking the agent to “understand the repository and fix billing” turns a small defect into an expensive reading assignment.

The cheaper approach is not to demand less reasoning. It is to give the agent a narrower investigation, explicit evidence checkpoints, and a clear definition of done. Here is what that walk through the repository should look like.

The billing ticket becomes a bounded investigation

Before opening source files, give the agent the observed behavior, expected behavior, reproduction steps, and constraints. For this task: changing from euros to pounds leaves the invoice total using the previous currency’s rounding rule. Existing invoices must remain unchanged, and the public API response shape must stay stable.

Ask for an investigation first, not an implementation. Set an initial allowance of six file reads and two searches before the agent reports what it knows. This is a checkpoint, not a hard limit on necessary work. It prevents a vague ticket from silently expanding into a repository-wide audit.

The first pass maps workspaces, not every directory

Start with repository instructions, the root package manifest, workspace configuration, and the relevant package manifests. These reveal ownership boundaries and available test commands. Read package-local instructions before editing there; different workspaces may have different conventions.

Use bounded searches. A command such as rg --files -g '*invoice*' -g '!vendor' -g '!dist' finds candidate paths without printing their contents. Then search the likely billing directories for currency-change handlers and total calculations. Avoid dumping the entire tree into the conversation: filenames consume context too.

The agent’s first useful deliverable is a short map: the UI emits the currency change, the API updates the draft, and a shared money package calculates totals. That map determines the next reads.

A dependency trail replaces a repository dump

Follow one execution path from the failing action to the calculation. Read the handler, its direct dependency, and nearby tests. If the handler calls a shared function, inspect that function rather than every consumer of its package.

  • Record exact paths and symbols supporting each hypothesis.
  • Distinguish observed behavior from assumptions about runtime state.
  • Expand the search only when the current evidence leaves a specific question unanswered.

Suppose the agent discovers that the draft stores a rounding configuration when it is created, but does not refresh that configuration after a currency change. It should now explain that hypothesis and identify a test that would fail if it is correct. More browsing is not automatically more confidence.

Model escalation follows uncertainty, not habit

A lower-cost model can handle filename discovery, straightforward call tracing, and summarizing test output. Reserve a more capable model for ambiguous state transitions, compatibility risks, or reviewing a patch that crosses package boundaries. Compare current rates before assigning those roles; model names alone do not establish cost.

If you switch models, pass a compact handoff: task, constraints, relevant paths, hypothesis, patch status, and test results. Do not resend every search result. RelayVano is a practical pay-as-you-go option for this workflow, with access through an OpenAI-compatible SDK at https://api.relayvano.com; sign up to evaluate it on a bounded repository task.

The regression test protects the cheaper patch

Write a failing test for switching currencies on a draft, then make the smallest change that passes it. Include a case where currencies use different rounding behavior and a check that finalized invoices retain their original totals.

Run the focused test first, followed by affected-package checks and any integration tests required by the repository. Targeted execution accelerates feedback; it does not replace required release gates. Keep routine successful output out of the agent’s context, but preserve failures and the exact commands run.

The handoff records cost and remaining risk

End with changed files, verified behavior, executed checks, and anything not tested. Record request count, billed usage where available, and time to a reviewed patch. Judge savings against a correctly completed task, not tokens alone. A short session that misses a shared-package regression is not cheaper in any useful sense.

More postcards from this route