/** * HTMX surface analyzer. * * For sites with significant HTMX usage (the deco-cx Fresh stack * embraced htmx as the interactivity model), the migration to TanStack * Start has to either rewrite or eliminate every `hx-*` attribute. * Per D2 in the migration tooling policy we don't ship a runtime — * everything gets rewritten to React. This analyzer is the first step: * it inventories the `hx-*` surface so the engineer (or the next * codemod wave) knows exactly what shapes are out there before * starting the rewrite. * * The output is a structured `HtmxInventory`: per-category counts, * per-file counts, and three sample call sites per category. The * report is the source of truth for the rewrite recipes documented * in `references/htmx-rewrite.md` (Wave 13-B). * * Categorization is heuristic — we group elements by their **attribute * cluster** rather than by individual attribute, because the rewrite * recipe depends on the cluster (e.g. `hx-post + hx-target + hx-swap` * on a `
` is a different rewrite than `hx-get + hx-target` on a * `