Advisory code deep-dive
analyze_codeReview code to uncover performance bottlenecks, scalability risks, and tech debt with quantified impact. Read-only analysis provides scores and findings without pass/fail verdicts.
Instructions
Advisory deep-dive on existing code — scores and findings, deliberately NO pass/fail verdict, so it never blocks an agent. Surfaces performance hot paths, scalability cliffs, reliability gaps and tech debt with concrete latency/throughput arithmetic (e.g. 'O(n²) dedup: ~4s at 10k items'). Read-only: the code is analyzed, never executed. Use it to understand a validate_ai_output rejection or review inherited code; use validate_ai_output when you need an accept/reject decision.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | The source code to analyze — a function, file or pasted excerpt. | |
| language | No | Source language, e.g. 'python', 'typescript', 'cpp', 'sql', 'swift'. Inferred if omitted; stating it sharpens findings. | |
| analysis_type | No | Lens for the review: 'quality' (default, broad ISO/IEC 25010 pass) or a focused pass on one dimension. | quality |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| issues | Yes | Findings as 'severity|category|detail' with supporting arithmetic | |
| provider | No | ||
| complexity | No | low | medium | high | |
| suggestions | No | ||
| quality_score | Yes | 0-100 advisory score for the chosen lens |