sdlc-agent-10-code-review

Reviews PySpark and SQL code against Databricks standards and produces review reports with revised code.

1|2|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/TRRaveendra/AI-Agents-Databricks --skill sdlc-agent-10-code-review-trraveendra
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: sdlc-agent-10-code-review
Source: https://github.com/TRRaveendra/AI-Agents-Databricks/tree/main/ai-agent-skills/databricks-sdlc-agent-skills/10-code-review-agent
Command: npx skills add https://github.com/TRRaveendra/AI-Agents-Databricks --skill sdlc-agent-10-code-review-trraveendra

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires databricks-sdk, mlflow, and includes references (resource) components.

What problem does it solve? Generated PySpark and SQL code in an automated SDLC pipeline needs independent review for coding standards, performance, security, and Spark optimization before it reaches testing and deployment, and this agent performs that review as stage 10 of a 15-agent Databricks pipeline. ## Core Features & Use Cases - Independent code review: Calls the Databricks Foundation Model API a second time in reviewer mode with a separate system prompt and lower temperature, so the same call that wrote the code never grades it. - Contract-validated output: Returns JSON matching a strict output contract (status, artifact path, citations, tool calls, tokens) that the LangGraph supervisor validates, with one repair retry on failure. - Lakehouse artifact persistence: Writes review_report.md and revised code files to /Volumes/{catalog}/state/artifacts/{ticket}/10_code-review-agent/ and logs runs to state.artifacts and state.agent_runs. - Use Case: After the PySpark, SQL, and Data Quality agents produce their artifacts for a ticket, this agent reviews the code for partition pruning, broadcast joins, UDF avoidance, and secrets handling, then gates downstream agents on human approval. ## Quick Start Review the PySpark and SQL artifacts for ticket PROJ-123 against Databricks coding standards and write the review report and revised code to the ticket's artifact volume.

Frequently Asked Questions about sdlc-agent-10-code-review

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate code review for PySpark in Databricks?

Call the Databricks Foundation Model API through a Model Serving endpoint with a reviewer system prompt and low temperature, passing the generated PySpark code as context. Validate the response against a JSON output contract and write the review report to a Unity Catalog volume.

Can Genie Code be called via API for code review?

No, Genie Code is UI-only with no public REST or SDK endpoint for headless invocation. Use the Foundation Model API pay-per-token endpoints or a deployed Mosaic AI Agent endpoint as the agent-callable coding backend instead.

Why should code review use a separate LLM call from code generation?

Using a separate call with a different system prompt and lower temperature prevents the same generation call from grading its own output. This independence produces more objective, line-referenced review findings.

What Spark optimizations does automated code review check?

The review checks partition pruning, broadcast joins, avoiding UDFs where a native Spark function exists, and secrets handling. It produces specific line-referenced suggestions and can apply straightforward fixes when authorized.

What happens when the review output fails contract validation?

The agent gets one repair retry with the validation error appended to its context. If the retry also fails, the run is routed to state.needs_human so the approval-gate reviewers can intervene.