How insights work
When you run migrations across many repositories and teams, you need visibility into what changed, what is left, and who owns the remaining work. Insights gives you that visibility through a few reusable building blocks:- Dashboards group related widgets around a migration, initiative, or team.
- Widgets show query results as timeseries charts, single numbers, tables, or notes.
- Queries pull data from repositories using JSSG codemods, ast-grep YAML rules, Smart natural-language checks, or indexed dependency data.
- Template variables let you reuse the same dashboard with different repositories, rules, JSSG sources, Smart prompts, or string inputs.
Dashboards
Dashboards are the top-level container for your insights. Use them to organize widgets by initiative, for example ani18n migration dashboard that tracks old API usage, new API adoption, and files remaining across affected repositories.
To create a new dashboard, go to Insights → Create Dashboard.

Widgets
Widgets are the building blocks of a dashboard. Insights supports four widget types:- Timeseries chart - track how a metric changes over time, such as deprecated API calls trending down week over week.
- Single number - show a point-in-time value, such as total files still using an old pattern.
- Table view - show breakdowns with sorting and row limits, such as remaining work by repository or codeowner.
- Notes - add Markdown context, caveats, interpretation, or next actions.

- JSSG Codemod - runs inline JSSG source, a JSSG codemod package, or a JSSG source template variable.
- ast-grep (YAML) - runs an ast-grep YAML rule against selected repositories.
- Smart - describes a file characteristic in natural language and returns a file count.
- Dependencies - queries indexed dependency data from selected repositories.

Formulas
You can combine multiple query results with a formula. Queries are assigned alphabetical variable names (a, b, c, …) that you can reference in the formula expression.
You can also give the formula result a name using the formula alias field (e.g. Formula Result).

Visualization settings
Each query-backed widget has visualization options in the Visualization tab:- Timeseries chart - choose
Line,Bar, orArea, set a Y-axis label, and choose whether to stack series or show dots. - Single number - set a prefix, suffix, and number format.
- Table view - configure sorting, row limits, and number formatting.
Time range
Timeseries widgets include a time range selector that controls the analysis window. You can inherit the dashboard default or set a widget-specific range. The time range picker supports:- Quick ranges - last 7, 14, 30, 60, or 90 days, and last 4, 8, or 12 weeks.
- Absolute ranges - a start and end date, entered manually or selected from the calendar.
- Now expressions - values such as
now-30d,now-4w, andnow.
Queries
Insights supports four query sources. Each source has its own configuration options and best-fit use cases:JSSG (JS ast-grep) queries
Programmatic analysis, package-backed metrics, and semantic dimensions.
ast-grep YAML queries
Syntax-level pattern counts with ast-grep YAML rules.
Package dependency queries
Track package adoption, exposure, and dependency drift.
Smart (Jev-powered) queries
Natural-language file-count signals before you have an exact rule.
Template variables
Template variables let you parameterize a dashboard so the same widgets can be reused with different inputs. For example, you can define a repository variable and use it across all widgets, then switch the selected repositories from one place. To add a template variable, click Add variable at the top of your dashboard.
Variable types
Use template variables
Once created, template variables appear as selectable options in query configuration fields. When configuring a query’s repository, rule, or JSSG source, you can choose between specifying a value directly or referencing a template variable.
$variableName syntax. For Smart queries, bind a string variable as the prompt in the editor, or set the prompt to $variableName so the same dashboard can switch characteristics without editing every widget.
Variables can be edited from the dashboard view. Widgets that reference a variable refresh with the updated value.
Dashboard templates
When you publish a package with JSSG steps to the Codemod Registry, Codemod attaches a default Insights dashboard template. People who start an Insights dashboard from your package get that template. You can replace the default with a dashboard you built. If the package is published by an organization, any organization member with developer or admin privileges can update the template.Update a package template
1
Build a package-backed dashboard
Create or open an Insights dashboard. Add query-backed widgets that use only your published package. For a bundle, widgets can also be powered by the bundle’s child packages. You can optionally include Notes widgets.
2
Save it as the package template
When the dashboard looks right, click the three-dot menu next to the dashboard name and select Update package template.