AI Features

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

FeatureCommand / TriggerWhat It DoesCostPlan
AI Fix Generationradar fixGenerates exact code diffs to resolve violations1 credit ($0.003)Solo+
AI Scan Summaryradar summary3-line executive summary in 5 output formats1 credit ($0.005)Solo+
AI PR CommentsAutomatic on PRTop-5 violations explained with impact and fix suggestions3 credits ($0.035)Pro+
AI Cross-File Analysisradar scan --cross-fileTraces violations through the import graph via reverse BFS5 credits ($0.03--0.08)Pro+
Dashboard Policy EditorDashboard UI3-tab visual editor for radar.ymlFreeFree

Credit System

AI features consume credits from your monthly allocation. Credits reset on your billing cycle date.

PlanMonthly CreditsApproximate Scans
Free0Deterministic only
Solo50~50 fixes or summaries
Pro500~100 PRs with AI comments
Team2,000Full team coverage
EnterpriseUnlimitedNo 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

Technical Debt Radar Documentation