Coding guidelines
Zdev gives planning, implementation, and review agents a shared set of coding expectations covering design, naming, data, control flow, and completion. The goal is consistent judgment across tasks and sessions while respecting the project’s own conventions.
These guidelines apply to both ordinary feature work and research changes. You do not need to paste them into each prompt; the installed integration supplies the relevant sections to workers automatically.
What the guidelines ask for
Section titled “What the guidelines ask for”- Understand the affected behavior before choosing a design: read callers, contracts, tests, and project instructions, and pick the smallest coherent change that satisfies the agreed outcome.
- Name intent and effects clearly at the call site. A function that writes a report should say so in its name; naming it like a read-only lookup misleads callers.
- Keep data and contracts explicit. Preserve distinctions between absence, failure, and valid values, make ownership and mutation obvious, and validate external inputs at the boundary.
- Structure code so the main operation reads before its details. Keep related logic together and split responsibilities when it actually helps readers; one cohesive long function is often clearer than a chain of tiny wrappers, and extra layers need a concrete benefit.
- Follow the repository’s existing formatter, error handling, and configuration patterns. Fix confusing names and structure before reaching for comments, and reserve comments for constraints and rationale.
- Match validation to risk. Existing checks or a focused reproduction are often enough; any new test should add real confidence instead of mirroring the implementation line for line.
These are standards for judgment rather than hard line limits or a push toward a specific architecture. Unrelated cleanup belongs in its own task.
The same expectations through the task
Section titled “The same expectations through the task”During planning, the agent identifies where behavior belongs and which contracts will change. During implementation, it checks that plan against the actual code and reviews its own names and boundaries before handing the diff over.
The verifier then evaluates both the requested behavior and the coding guidelines. Passing tests alone is not enough for acceptance: a misleading name or tangled responsibility is a required correction when the reviewer can point to the misunderstanding or reasoning burden it creates.
A concrete finding looks like this:
export.ts:42 — getResults also writes the output file. Its caller lookslike a read-only query, which hides a filesystem effect. Rename theoperation to make the write explicit, or separate it if callers needthe results without writing them.Required corrections always cite a checked location, a real consequence, and a proportionate fix. Optional preferences are listed separately and never block acceptance. See Review and verification for how findings move through the task workflow.
Language, framework, and project guidance
Section titled “Language, framework, and project guidance”Alongside the common guide, zdev ships supplements for Rust, TypeScript,
MiniZinc, Java, Kotlin, Python, and C++, plus web behavior, React, and React
Router. Agents load only the supplements relevant to the files and
responsibilities being changed; having React in package.json does not turn a
backend utility edit into a React task.
Local project instructions, the area brief, and task requirements always supply the immediate context. Explicit user requirements and project constraints win any conflict, with material exceptions noted in the report. The guidelines are there to protect clarity and scope, not to expand a task during review.
The shared coding guidance holds the full rules and links to every supplement. Because the installed copy travels with your harness integration, refreshing the integration updates the guidance as well.