Overview
StretchDev includes an optional AI code reviewer. You give it a snippet of code and an optional description of the task, and it returns a plain-language summary, a list of issues (each with a detail, a severity, and a line where identifiable), and a set of concrete suggestions. It's a complement to rule-based scans: where a scan measures metrics and fires deterministic rules, the AI reviewer reasons about intent and gives review-style feedback.
The AI reviewer is flag-gated and fail-safe. It runs only when an administrator has enabled it, and if it's off or the model is unavailable, StretchDev simply tells you so instead of blocking your work — the rest of the app is unaffected.
Run an AI review
1. Open the AI review panel.
2. Paste the code you want reviewed.
3. Optionally add a short task/context note — for example, "This function validates a coupon code before applying a discount." Context sharpens the review.
4. Submit. When enabled, StretchDev returns:
- Summary — a short overall assessment of the code.
- Issues — each with a detail, a severity of low, medium, or high, and a line when the model can pinpoint one.
- Suggestions — concrete, actionable improvements.
Read the result
Start with the summary for the big picture, then work through issues highest-severity first, and finally apply the suggestions. Because this is AI-generated review, treat it as an experienced second reader: high-value and fast, but confirm each point against your own judgment before acting — especially for security-sensitive code.
Example
You paste a short function that builds a database query from a request parameter and add the context "applies a user-supplied filter." The reviewer returns:
- Summary: "The function works for well-formed input but concatenates user data directly into a query and lacks input validation."
- Issues: one
high— "Line 4: user input is interpolated into the query string, enabling injection"; onemedium— "Line 2: missing null/empty check on the filter parameter." - Suggestions: "Use a parameterized query," "Validate and normalize the filter before use," "Add a unit test for empty and malicious input."
You apply the parameterized-query fix and re-run a full scan to confirm the Security rating improves.
Tips
- Always add a task/context line — the review is noticeably more relevant when the model knows what the code is supposed to do.
- Keep snippets focused. Reviewing one function or module at a time yields sharper feedback than pasting an entire file.
- Pair AI review with a rule-based scan: the scan gives you deterministic ratings and a gate; the AI gives you reasoning and suggestions.
- Verify security-critical suggestions independently before shipping.
Troubleshooting
- The reviewer reports it's disabled or not ready. The AI feature is off, or the underlying model isn't available. Ask an administrator to enable it; meanwhile, scans and all other features keep working.
- You submitted but got no review back. If the code field was empty, there's nothing to review — paste a snippet. If the model was momentarily unavailable, try again shortly.
- The review missed something a scan caught (or vice-versa). That's expected — the two are complementary. Use both for full coverage.
Was this helpful?
Help us improve this article
Use these controls to share whether this answer solved the issue. Feedback helps prioritize updates to StretchSuite Support.

