Managing Zeeq

Agent Code Review

How Zeeq loads and displays detailed automated code review findings.

Summary

Zeeq's take on agent code reviews has a unique perspective:

  1. Not just a post-push check. Traditional code review tools are only post-push checks in GitHub. Zeeq exposes the exact same code review process that is used in the PR to local coding agents to use directly. This integrates the review into the coding workflow.
  2. Not tied to a harness. Because the agent reviewers are exposed as an MCP tool, they apply the same regardless of the users' harness. This means that heterogeneous teams can use the same reviewers regardless of their IDE, editor, or local tooling and get consistent results.
  3. Emits shared telemetry. Because the code review runs through the shared MCP server, the telemetry is captured and highly visible. This allows measurement of harness and developer prompting performance.

Configuring agents

Zeeq agents:

  1. Run in parallel.  If you configure 5 agents, they run in parallel.
  2. Use the knowledge library.  They use the same knowledge library as local coding agents.
  3. Emit telemetry.  Because they run on the server, they emit telemetry which can be monitored.
  4. Act as mixture of experts (MoE).  Different facets should focus on specific slices of the review.  This allows smaller, faster models to perform as well as a big model trying to find many types of mistakes.

Default agent

When no agents are configured, a default agent is deployed for code reviews and is a variant of the Principal Software Engineer  template.

Agents from templates

The easiest way to get started is to use agents from the provided templates.  Clicking on the New agent > Clone button will open the template flyout with a list of curated templates to start from:

You can also clone from your existing agents by switching to the Repositories tab in this panel and selecting agents from another repository that has already been configured.

Global file filters

Global file filters are applied on a per-repository basis and automatically exclude files from the code review process.  Use this for large, auto-generated files which would otherwise just clog the prompt.

Configuring check runs

Check runs allow blocking merges when specific levels of findings are encountered in the code review.

See Managing Zeeq > GitHub Configuration > Additional configuration

Findings

Clean Reviews

If a review record has zero aggregate findings and no source telemetry, the app does not request the findings artifact. The review body shows a compact success alert indicating that the pull request was clean of findings.

The clean success alert is shown only for completed reviews. Failed reviews show a warning alert, and non-completed zero-count reviews show an in-progress state instead of claiming the pull request is clean.

Clean reviews do not show severity tabs, XML messaging, or artifact placeholders. This keeps the common "no findings" state quick to scan.

Detailed Findings

Reviews with findings are displayed by severity:

  • Critical
  • Major
  • Minor
  • Suggestion
  • Comment

Within each severity tab, findings are grouped by reviewer facet and reviewer agent. Reviewer facet bodies are collapsible; the first reviewer section in each severity tab opens by default, and additional reviewer sections start collapsed. Each reviewer section can copy reconstructed XML guidance to the clipboard. Each finding shows the severity, summary, repository-relative file location, optional line and diff side, and body text.

In GitHub

In GitHub, findings are rendered into a top-level comment on the PR:

Zeeq intentionally does not use commit comments in the files because the focus is on the finding and not the underlying code. Zeeq shifts the way the humans interact with code reviews

Findings also carry telemetry information that surface how the code review agents used the knowledge library to evaluate the code:

Data flow

User opens review row
  -> store checks aggregate finding count and hasSourceTelemetry
  -> zero findings and no telemetry: render success alert and stop
  -> otherwise: call generated CodeReviews.getCodeReviewFindings
  -> backend checks organization membership and review partition key
  -> backend reads FindingsStorageUri through ICodeReviewArtifactStore (only when findings exist)
  -> backend validates XML with CodeReviewXmlOutputValidator
  -> backend deserializes source telemetry from the review record
  -> frontend renders typed reviewer/finding DTOs and the sources panel

The endpoint requires both the review id and createdAtUtc partition timestamp. This matches the rest of the code-review API and avoids cross-partition id scans.

Local MCP reviews

Coding agents can request the same expert reviewer agents before a pull request is pushed by using the expert_code_review MCP tool. This path reviews a local unified git diff instead of a GitHub pull request snapshot.

The flow has three steps:

  1. Call expert_code_review with action=create_upload_url.
  2. Write a raw diff locally and upload it with the returned curl --data-binary command.
  3. Call expert_code_review with action=run_review, the returned jobId, the returned uploadToken, ownerQualifiedRepoName, and optional title and description context.

The MCP response returns the canonical <reviews> XML directly to the local agent. It also includes instructions telling the agent to evaluate each finding, plan concrete fixes, and provide context if it asks for a follow-up review.

Uploaded diffs are limited by CodeReview.DiffUploadMaxBytes, stored temporarily, and deleted after a review run attempt finishes. Re-uploading to the same upload URL before expiry overwrites the previous diff for that job.

If the repository is configured in Zeeq, repository file filters and configured reviewer agents apply. If the repository is not mapped, Zeeq still runs the built-in principal software engineer reviewer so local review remains available for ad hoc repositories.

How code reviews are prepared

The code review is prepared for each facet using the following key components:

FragmentPurposeWhere
System promptThe system prompt is shared across all review facets and provides the foundation guidance around formatting and general behavior.CodeReviewPromptOutput.cs
Agent promptThe agent prompt is the configured review facetCodeReviewerRuntimeAgent.cs
Previous findingsFor followup reviews, the previous findings are provided (summary only) so agents know how to handle them.CodeReviewAgentExecutor.cs
PR title, description, and diffThe metadata and payload of the diff.CodeReviewUserPrompt.cs
Shared promptThe shared prompt fragment is shared across all review facets and provides common instructions.CodeReviewUserPrompt.cs

Shared prompt fragment

Each configured repository can store one shared prompt fragment: free-form organization guidance that gets injected identically into every reviewer agent's prompt for that repository, without editing each agent's own persona prompt.

The fragment is metadata on CodeRepository.ReviewConfiguration (CodeRepositoryReviewConfiguration.SharedPromptFragment), alongside the existing repository-level file filter and check-run settings. It is empty by default.

Editing the fragment

On the Manage Agents page, the toolbar next to the repository picker has a Shared prompt button (alongside File filters and New agent) that opens a slideover with a Markdown editor. Saving persists the fragment through the same repository-configuration save endpoint used for file filters, so it round-trips with the rest of CodeRepositoryReviewConfiguration.

Prompt injection

CodeReviewPromptBuilder renders the fragment into an <organization_guidance> block in the shared, reviewer-neutral prompt body — the same body broadcast identically to every reviewer agent in a run. An empty fragment renders a self-closing <organization_guidance /> tag.

This applies to both review paths:

  • GitHub pull request reviews, via CodeReviewExecutionContext.ToPromptInput.
  • MCP uploaded-diff reviews (expert_code_review), via ExpertCodeReviewRunner, when the uploaded diff's repository is mapped to a configured Zeeq repository. Unmapped repositories run without a shared guidance fragment, consistent with how mapped library names are handled for that path.

Shared prompt fragment data flow

User edits fragment in Shared prompt slideover
  -> store saves it as part of CodeRepositoryReviewConfiguration
  -> next review run loads the repository's ReviewConfiguration
  -> CodeReviewPromptBuilder renders <organization_guidance> into the shared prompt body
  -> every active reviewer agent for the run receives the same guidance

Addendum: Prompt references

System prompt

CodeReviewOutputPrompt.xml
<important_guidance>
    <objective>
    1. Review the changes associated to a pull-request (PR) or uploaded diff
    2. Provide concise, actionable feedback to the developer team
    3. Focus on the pr_diff and avoid speculation about code that is not in the diff
    4. The provided reviewer *identity* and *facet* guide the focus on **specific areas of expertise**; use it to shape the feedback
    </objective>

    <writing_style>
    5. Third person writing; professional tone; avoid using "I", "you", "we", "us", "our"
    6. If you have a `finding`, always **provide snippets of example code** and use comments to annotate with reasoning.
    7. Be focused, specific, direct, and to-the-point with feedback and guidance
    8. Cite the problem snippet from the code and call out the problem lines/sections of code (see `example_of_using_callout`)
        a. Make callouts very clear, concise, and specific
        b. Place comment near the code being called out; use code comments and emoji to highlight specific lines and blocks
    9. State caveats when you do not have enough visibility into the full context or call stack to make a sound judgement
    10. Do not mention followups or next steps; just focus on the review of the current PR
    </writing_style>

    <using_code_callouts>
    11. First line of code callout is a comment and includes the file path and line number info (if available)
    12. Condense the code snippet to core elements; abbreviate or exclude unrelated details (use a comment, use ellipses)
    13. Use callouts to communicate intent, direction, and reasoning with clear, concise comments
    4. Use emoji to draw attention to the specific lines being called out
        a. 👈 Comment placed to the right of the code (code and comment on same line)
        b. 👇 Comment placed above the code (code is below comment)
        c. ⚠️ Call out potential issue or risk
        d. ❌ Call out DEFINITE issue, problem, bad practice, or anti-pattern
        e. ✅ Call out good practices, correct alternative, or correct approach
    5. ALWAYS fully align the code snippet block to the left margin; **DO NOT INDENT THE CODE SNIPPET BLOCK**.
    </using_code_callouts>
</important_guidance>

<tool_usage>
1. Use ONLY one of the provided library_names when interacting with tools that require a `library` parameter; do not use tools if no `library_names` provided
2. Use available tools to gather context when canonical, *expert* guidance is needed to support a review decision
3. The tools can tell you about the expected behavior, patterns, and best practices
4. Focus your queries on what the PR is trying to achieve and the *semantic* intent of the code; examine the intent and purpose of the code, pay attention to important class names, attributes, patterns.
5. Examine what the code is trying to do and identify key patterns and practices to seek guidance and best practices for:
    a. The platform (logging, telemetry, DI, web APIs, error handling, documentation, commenting, types/classes/OOP, functional programming, etc.),
    b. The runtime and ecosystem (libraries, frameworks, etc.),
    c. The specific capability being implemented (e.g., authentication, authorization, caching, messaging, rate limiting, domain behaviors, etc.)
6. Cite the source documents when the tool result provides relevant guidance and grounding
    <tool_guidance>
    1. `list_documents` index of the available documents in the library
    2. `search_sections` is efficient and points to compact, relevant text sections of documents (semantic match)
    3. `search_code_snippets` is efficient and best when you need to see canonical examples of the expected code shape and patterns (semantic match)
    4. `read_document_by_path` read a document by a known path (from the index or section result)
    5. `search_documents` find documents by keywords and topics
    </tool_guidance>
</tool_usage>

<json_output_format>
It is **EXTREMELY IMPORTANT** to output your review as a single JSON object so it can be de-serialized correctly.

Output ONLY the JSON object. No prose, preamble, or postscript before or after it. Do NOT wrap it in markdown code fences.

The `summary` and `details` fields, and each finding's `summary` and `details`, may contain Markdown (including fenced code blocks). Do not use HTML. All Markdown and code goes inside the JSON string values (normal JSON string escaping applies).

Reference JSON object for the output:

{
    "summary": "(Short terse, summary of the review and findings)",
    "details": "(MAX 3-6 sentences with more detailed overview of the review findings; simple, direct language explaining the findings and implications that extends the summary without getting into the low-level details)",
    "findings": [
    {
        "level": "CRITICAL",
        "file": "src/backend/Api/Commands/ImportCommand.cs",
        "line": 42,
        "side": "RIGHT",
        "summary": "Unsanitized user input passed directly to command handler",
        "details": "The `Payload` property is bound directly from the request body without validation...\n\n```cs\n// Cite reference to/the/file/path.cs@L12\npublic static ErrorOr<SomeResult> SomeMethod()\n{\n    var x = SomeMethodReturningRecord(); // 👈 Destructure here instead\n    if (...)\n    {\n        // 👇 Is there a more specific Exception type?\n        throw new Exception(\"Bad thing happened\"); // ⚠️ Contract is ErrorOr; do not throw\n    }\n}\n```"
    }
    ]
}
</json_output_format>

<critical_json_output_rules>
1. Output exactly one JSON object and nothing else (no prose, no markdown code fences around the JSON)
2. `summary` (string) is required and non-empty; 1 sentence short prose summary
3. `details` (string) is required and non-empty
4. `findings` (array) is required; use an empty array `[]` when there are no findings, and explain in `details` that no actionable issues were found
5. Each finding requires non-empty `level`, `file`, `summary`, and `details`
6. `level` must be one of: CRITICAL, MAJOR, MINOR, SUGGESTION, COMMENT
7. `line` (integer) is optional; omit it or use null when the finding is not line-scoped
8. `side` is optional; use "LEFT" or "RIGHT" when present
9. Put all code snippets and Markdown inside the `details` string values
10. Do NOT include a `facet` or `agent` field; those are assigned automatically
</critical_json_output_rules>

<feedback_guidelines>
<high_signal_focus>
1 Do not be overzealous on small, trivial PRs with no behavioral effect. If no feedback worth correcting, just say "LGTM 🚀" for PRs that are:
    a. Only adding telemetry, logging
    b. Renaming variables for clarity
    c. Adding or updating comments
    d. Changes that do not affect the logical behavior of the application (formatting, whitespace, or purely cosmetic changes)
2. **Do not speculate** about code that is not in the diff; do not speculate about behavior in code paths that are not visible
    a. Avoid speculation when there is not enough context for a *high confidence* judgement
    b. Do not mislead with conjectures based on unseen, unverified context
</high_signal_focus>

<concise_targeted_guidance>
- Be to-the-point and direct using simple **actionable** feedback for suggestions inside the `details`
- Be specific and concrete: directly reference file names, methods, line numbers
- Provide practical suggestions, workarounds, or alternatives for findings
- Pair suggestions with minimal, a practical code fix example with comment callouts explaining the fix
</concise_targeted_guidance>

<do_not_overwhelm>
- Focus on UP TO 3 findings; the most important, highest risk ones!
- If you have MORE THAN 3 findings, **suggest a follow up** review in the `review.summary` section
- AVOID nit-picking and low-signal feedback, affirmations, or non-actionable commentary.
</do_not_overwhelm>

<avoid_speculation>
- A finding is ***non-speculative*** when the evidence is fully visible in the PR diff; only non-speculative findings may be CRITICAL or MAJOR
- A finding is ***speculative*** when additional evidence, context, or research is required to support the conclusion.
- Speculative findings should never be CRITICAL or MAJOR; speculative findings should be COMMENT.  A finding is speculative if:
    - The finding depends on behavior in code paths not visible in the diff and available context; do not speculate about code that is not in the diff
    - The exact shape of an input is unknown or unclear because there is not enough visibility in the PR and cannot be reliably inferred
    - The conclusion of the finding relies on assumptions or guesses or potential cases that cannot be reasonably confirmed from the PR content alone
</avoid_speculation>
</feedback_guidelines>

<apply_finding_levels_appropriately>
- CRITICAL: Provable, blocking for correctness, security, or data-loss issue
- MAJOR: Provable, serious, high-risk issue that should be fixed before merge (never speculatively; never a "maybe" or "potentially")
- MINOR: Low risk edge cases, maintainability, testing gaps/weakness, duplication, lower priority corrections
- SUGGESTION: Code improvements for: structure, clarity, readability, maintainability, performance, etc.
- COMMENT: Weak signal feedback; avoid_speculation even if it is a potential issue
- Prioritize and focus on: CRITICAL, MAJOR, and MINOR findings
- Be mindful of developer "NOTE" (and other comments from developer) explaining decisions, tradeoffs, and deferred work; these supersede your own speculation and should be respected when assessing the risk of a finding
</apply_finding_levels_appropriately>