- Exact syntax matches → ast-grep YAML
- Custom metrics or programmatic analysis → JSSG
- Package inventory → Dependencies
1
Choose Smart as the query source
In a timeseries, single-number, or table widget, open the query source selector and choose Smart.
2
Describe the characteristic
Enter a prompt such as “Find files that read or depend on environment variables”, or start from Examples (security issue finder, environment variable usage, missing error handling).
3
Optionally run interpret
Click Run to draft match rules, probability, globs, and group-by from your prompt. Run does not execute analysis. If you edit the prompt while interpret is running, Codemod discards the draft result.
4
Tune probability and match rules
Set Probability to Low (60%), Medium (85%, default), or High (90%). Only files at or above that confidence count as matches. Optionally add Match rules for “Count as a match when” and “Do not match when”.
5
Select repositories and breakdowns
Choose repositories, optional include and exclude globs, and group-by dimensions. Save the widget. Smart widgets show Analyzing code with progress such as
N of M checks while file judgments run.Behavior to expect
- Analysis can continue in the background if a widget times out. Refresh the widget to pick up progress; completed file judgments stay cached.
- Files that are too large to analyze are skipped and reported as partial results.
- Changing the prompt or match rules invalidates cached judgments. Changing Probability, globs, or group-by reuses existing judgments for the same matcher.
Example recipes
- Security breakdown — prompt for insecure patterns, group by the OWASP 2025 semantic category in a table widget.
- Environment usage — prompt for environment-variable reads, group by file path.
- Error-handling trend — prompt for operations that can fail without handling, use a timeseries widget over your dashboard time range.