Code Health Monitor#

The Code Health Monitor is a proactive background analysis layer that continuously inspects your codebase for structural problems, regression risks, and refactoring opportunities — without requiring a model call for every insight.

Available since version 1.5.0.

Enabling it#

  1. Open Settings → Llamatik Code → Code Health Monitor.
  2. Toggle Enable Code Health Monitor.
  3. Choose an analysis mode and run trigger.

Analysis modes#

ModeFiles per scanMax runtimeModel calls/hourWho
LIGHT58 s3Free + Pro
BALANCED3030 s20Pro only
AGGRESSIVE150120 s50Pro only

Free users are always capped at LIGHT mode regardless of settings.

Run triggers#

TriggerWhen it firesWho
MANUALOnly when you explicitly request a scanFree + Pro
ON_SAVE3 seconds after a file is saved (debounced)Pro only
IDLEWhen the IDE has been idlePro only
BEFORE_COMMITBefore a git commitPro only

Static analysis (no model required)#

CheckTriggerSeverity
Large file>300 linesWARNING
TODO/FIXME accumulation≥3 occurrences in a fileINFO
Empty catch blockcatch (...) {}WARNING
Deprecated API usage@Deprecated presentINFO

Regression risk detection#

When a git diff is present, the analyser scans it for regression patterns:

PatternSeverity
Removed public function / class / interfaceHIGH
Deleted @Test annotationHIGH
Changed Gradle dependencyWARNING
Removed try or catch blockWARNING
Modified AndroidManifest.xmlWARNING

Refactor opportunity detection#

  • Long functions — functions exceeding 40 lines
  • Repeated catch patterns — four or more identical catch blocks in a file

Insight severity#

SeverityMeaningNotification
HIGHLikely regression or broken callersBalloon notification
WARNINGWorth reviewing before releaseInsights panel only
INFOLow-priority improvementInsights panel only

Watched areas#

Pin paths to prioritise their insights:

ToolDescription
watch_area_addAdd a file, directory, package, or module
watch_area_removeRemove a watched area by ID
watch_area_listList all watched areas
FreePro
Watched areas120

Before-commit assistant#

Run on demand or automatically before every commit (Pro). Produces:

  • Lines added/removed across all staged files
  • A suggested commit message
  • All regression-risk and dependency-risk insights from the diff
  • A flag if any watched areas are affected

All Code Health agent tools#

ToolDescription
code_health_statusCurrent monitor status, mode, and last scan time
code_health_refreshTrigger an immediate scan
code_health_list_insightsList all insights, filtered by severity or type
code_health_explain_insightDetailed explanation with session context
code_health_create_fix_planStep-by-step fix plan for an insight
code_health_ignore_insightSuppress an insight by ID
watch_area_addAdd a watched area
watch_area_removeRemove a watched area
watch_area_listList watched areas
session_context_getRead the current session context
session_context_clearReset the session context
before_commit_reviewReview staged changes for regression risks
regression_risk_analyzeAnalyse a git diff for regression patterns
refactor_analyze_fileAnalyse a file for refactoring opportunities