Run a deep review

Use DeepReviewAgentSDKWorkflow when you want to run a structured, multi-pass code review that covers security vulnerabilities, code quality, and test gaps in a single consolidated report.

Prerequisites

Run a deep review

  1. Import the workflow class.

    from workflows.deep_review import DeepReviewAgentSDKWorkflow
    
  2. Instantiate the workflow.

    workflow = DeepReviewAgentSDKWorkflow()
    
  3. Call execute with the path to your codebase.

    Pass the path keyword argument pointing to the directory you want reviewed:

    result = workflow.execute(path="/path/to/your/codebase")
    

    Internally, execute coordinates three specialized subagents — security-reviewer, quality-reviewer, and test-gap-reviewer — each reporting findings independently before the orchestrator synthesizes them.

  4. Inspect the result.

    The returned WorkflowResult contains a consolidated report with the following sections:

    • Summary — overall code health score (0–100) and a brief executive summary with finding counts by severity
    • Security — findings from security-reviewer, ordered by severity
    • Quality — findings from quality-reviewer, ordered by severity
    • Test Gaps — findings from test-gap-reviewer, ordered by priority
    • Suggestions — the top 5–10 actionable next steps ordered by impact, each referencing the specific finding it addresses

Extend the workflow

If you need to customize review behavior, subclass DeepReviewAgentSDKWorkflow and override execute rather than modifying the base class directly:

from workflows.deep_review import DeepReviewAgentSDKWorkflow

class MyCustomReviewWorkflow(DeepReviewAgentSDKWorkflow):
    def execute(self, **kwargs):
        # pre-processing or custom argument injection
        return super().execute(**kwargs)

Verify the task worked

A successful run returns a WorkflowResult whose report includes all four sections (Summary, Security, Quality, Test Gaps, and Suggestions) and a numeric health score between 0 and 100. If the result is missing any section or the score is absent, check that the path argument resolves to a readable directory and that all three subagents completed without error.

Key files

Unresolved references

Auto-generated by attune-author fact-check. Review and either fix the source code, fix this doc, or add an override.

Location Severity Issue
Line 58 (code fence) error from workflows.deep_review import … — module not importable