AI Features Overview
How Technical Debt Radar uses Claude Sonnet to add explanations, fix generation, cross-file tracing, and executive summaries on top of deterministic analysis.
AI Features Overview
Technical Debt Radar combines deterministic AST analysis with AI-powered features built on the Anthropic API (Claude Sonnet). Deterministic analysis always runs first and catches every violation with zero false positives. AI features layer on top to explain, fix, and trace violations across file boundaries.
AI is never required. Every scan, every gate decision, and every PR block runs without AI. AI adds depth --- not decisions.
How Deterministic and AI Analysis Work Together
┌──────────────────────────────────────────────────────┐
│ Stage 1: Deterministic Analysis (always runs) │
│ 7 AST analyzers → violations with exact locations │
│ Cost: $0 · Latency: < 5 seconds · Accuracy: 100% │
└──────────────────────┬───────────────────────────────┘
│
▼
┌──────────────────────────────────────────────────────┐
│ Stage 2: AI Analysis (optional, credit-gated) │
│ Claude Sonnet → explanations, fixes, cross-file │
│ Cost: 1–5 credits · Latency: 2–8 seconds │
└──────────────────────────────────────────────────────┘
Deterministic analysis identifies what is wrong and where. AI analysis explains why it matters and how to fix it.
The Five AI Features
| Feature | Command / Trigger | What It Does | Cost | Plan |
|---|---|---|---|---|
| AI Fix Generation | radar fix | Generates exact code diffs to resolve violations | 1 credit ($0.003) | Solo+ |
| AI Scan Summary | radar summary | 3-line executive summary in 5 output formats | 1 credit ($0.005) | Solo+ |
| AI PR Comments | Automatic on PR | Top-5 violations explained with impact and fix suggestions | 3 credits ($0.035) | Pro+ |
| AI Cross-File Analysis | radar scan --cross-file | Traces violations through the import graph via reverse BFS | 5 credits ($0.03--0.08) | Pro+ |
| Dashboard Policy Editor | Dashboard UI | 3-tab visual editor for radar.yml | Free | Free |
Credit System
AI features consume credits from your monthly allocation. Credits reset on your billing cycle date.
| Plan | Monthly Credits | Approximate Scans |
|---|---|---|
| Free | 0 | Deterministic only |
| Solo | 50 | ~50 fixes or summaries |
| Pro | 500 | ~100 PRs with AI comments |
| Team | 2,000 | Full team coverage |
| Enterprise | Unlimited | No limits |
When credits are exhausted, deterministic analysis continues unchanged. AI features are temporarily disabled until credits reset or you purchase additional credits. See the Credit System page for details.
Dashboard Policy Editor
The dashboard includes a 3-tab visual editor for managing your radar.yml configuration without editing YAML directly:
- Rules tab --- Enable, disable, and configure severity for each detection rule
- Layers tab --- Define architecture layers, allowed dependencies, and module boundaries
- Tables tab --- Declare data volumes for volume-aware performance scoring
The policy editor is available on all plans, including Free. Changes are saved to your repository via a commit or PR, depending on your integration settings.
AI Provider
All AI features use the Anthropic API with Claude Sonnet. Radar manages the API calls --- you do not need your own Anthropic API key when using Radar Cloud. For self-hosted Enterprise deployments, you provide your own API key.
Privacy: Radar sends only the minimal code context required for each AI operation. Source code is never stored by the AI provider and is not used for model training. See the Security page for details.
Next Steps
- AI Fix Generation --- Generate and apply code fixes from the CLI
- AI Scan Summary --- Get executive summaries in any format
- AI PR Comments --- Automatic explanations on pull requests
- AI Cross-File Analysis --- Trace violations across file boundaries
- AI Feedback Loop --- Use Radar output as input for AI coding tools
- Credit System --- Understand costs and manage your allocation