Skip to content

Discussion and research

Not every objective starts with a clear specification. Sometimes all you have is a complaint (“this is too slow” or “the error messages are hard to follow”), and you want to settle the direction before committing to an implementation.

It helps to separate two kinds of uncertainty: decisions that require your judgment, and facts you need to establish from the code or data. Discussion handles the decisions, investigation gathers the facts, and once you have a reliable evaluation policy, a measured research run can work through a sequence of experiments.

For the evaluation area, ask the agent to stress-test the brief:

Use zdev to discuss the evaluation brief. Which query workloads should
improve, and which compatibility and validation requirements must hold?
Challenge assumptions that could make the benchmark misleading.

The agent reads the brief and relevant code, then surfaces the choices that would materially change the outcome. Whether a speedup on large query batches is worth slowing down small interactive queries is a product decision; whether a particular pass dominates runtime is an empirical question.

As you settle each choice, the agent updates brief.md with the decisions and their rationale so later tasks have what they need without wading through a chat transcript. You can always revisit a decision if later evidence exposes a problem.

When a small change is already completely specified in your request, skip the separate discussion step and go straight to creating tasks.

When a factual question is blocking the plan, ask for a bounded investigation:

Use zdev to investigate where evaluation time is spent on the agreed
query set. Report the evidence and likely bottlenecks before proposing
production changes.

The agent can read code, check external documentation, reproduce a failure, or build a disposable prototype. Its report states the question, the evidence collected, the conclusion, and any remaining uncertainty. A working prototype informs the next decision, without turning itself into a production change.

If the investigation supports an area, fold its conclusion into brief.md and keep reusable reference material under background/ when later tasks need it. You can also run a standalone investigation without creating an area first.

Use a research run for repeated experiments

Section titled “Use a research run for repeated experiments”

A measured research run fits when you have several plausible approaches and a repeatable way to compare them. Within the agreed scope and budget, the coordinator proposes hypotheses, runs them, and uses retained lessons from earlier attempts to guide what it tries next.

That takes more setup than a one-off investigation: you need an agreed metric, representative inputs, correctness checks, a comparison policy, explicit limits, and an actual measured baseline before the run starts. Changing the benchmark mid-run to favor a candidate invalidates the comparison, so changes to evaluation conditions require a fresh baseline.

Not every open-ended goal calls for an optimization run. “Make errors easier to understand” usually starts by collecting confusing examples and deciding who reads them; once the target behavior is clear, ordinary implementation tasks are the right tool. A metric only helps if it actually measures what you care about.

The research walkthrough follows the evaluation example through setup, a bounded run, and reading its results. For individual chat prompts, see the agent command pages for Explore, Discuss, Investigate, and Research.