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
- Access to the codebase you want to review
DeepReviewAgentSDKWorkflowimportable fromworkflows.deep_review
Run a deep review
-
Import the workflow class.
from workflows.deep_review import DeepReviewAgentSDKWorkflow -
Instantiate the workflow.
workflow = DeepReviewAgentSDKWorkflow() -
Call
executewith the path to your codebase.Pass the
pathkeyword argument pointing to the directory you want reviewed:result = workflow.execute(path="/path/to/your/codebase")Internally,
executecoordinates three specialized subagents —security-reviewer,quality-reviewer, andtest-gap-reviewer— each reporting findings independently before the orchestrator synthesizes them. -
Inspect the result.
The returned
WorkflowResultcontains 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
src/attune/workflows/deep_review.py
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 |