Releases: stainless-code/codemap
v0.4.0
Minor Changes
- #28
91598bcThanks @SutuSebastian! -symbols.visibilitycolumn — JSDoc visibility tag (@public/@private/@internal/@alpha/@beta) extracted at parse time and stored as a real column. Replaces theLIKE '%@beta%'regex in thevisibility-tagsrecipe.SCHEMA_VERSIONbumps from 3 to 4 —.codemap.dbrebuilds automatically on next index. HelperextractVisibility(doc)exported fromparser.ts. New partial indexidx_symbols_visibilitycoversWHERE visibility IS NOT NULLqueries.
Patch Changes
-
#29
03fbddfThanks @SutuSebastian! - Update bundledtemplates/agents/rule and skill to cover the recent CLI surface —codemap query --summary/--changed-since <ref>/--group-by owner|directory|package, per-row recipeactions, and the newsymbols.visibilitycolumn. The dev-side.agents/mirror is updated in lockstep so this clone stays self-consistent. -
#26
c32f052Thanks @SutuSebastian! -codemap queryTier A flags —--summary,--changed-since <ref>,--group-by owner|directory|package, plus per-rowactionstemplates on bundled recipes. All output filters; the SQL still executes against the index. Ad-hoc SQL and thecm.query()programmatic API stay unchanged.
v0.3.0
Minor Changes
- #23
ebd4c34Thanks @SutuSebastian! - Agent-friendly CLI surface plus a schema v3 bump that tightensNOT NULLinvariants. Existing.codemap.dbfiles auto-rebuild on first open.- New:
codemap validate [--json] [paths...]— diffs the on-disk SHA-256 of indexed files againstfiles.content_hashand prints stale / missing / unindexed rows. Lets agents skip re-reads they don't need; exits1on any drift (git-status semantics) - New:
codemap context [--compact] [--for "<intent>"]— emits a stable JSON envelope (project metadata, top hubs, recent markers, recipe catalog) for any agent or editor that wants the index in one cheap shot.--forruns lightweight intent classification (refactor / debug / test / feature / explore / other) and returns matched recipe ids plus a hint - New:
codemap --performanceflag — prints a per-phase timing breakdown (collect / parse / insert / index_create) and the top-10 slowest files by parse time during full rebuilds, for triaging giant or pathological inputs - New:
-rshort alias forcodemap query --recipe+ cleaner organizedcodemap query --help(sectioned flags, dynamic recipe-id padding, examples for both forms) - New recipes:
deprecated-symbols(@deprecatedJSDoc tag scan),visibility-tags(@internal/@private/@alpha/@beta),files-hashes(powersvalidate),barrel-files(top files by export count) - Friendlier no-
.codemap.dberror:no such table: <X>now rewrites to an actionable hint pointing atcodemap/codemap --full, on both the JSON and human paths - Public type surface: new
IndexPerformanceReport;IndexRunStats.performance?field; per-field JSDoc coverage onIndexResult,IndexRunStats,ResolvedCodemapConfig, alldb.tsrow interfaces (FileRow,SymbolRow,ImportRow,ExportRow,ComponentRow,DependencyRow,MarkerRow,CssVariableRow,CssClassRow,CssKeyframeRow,CallRow,TypeMemberRow), andParsedFile - Documentation: README now leads with a "What you get" Grep/Read vs Codemap capability table and a "Daily commands" stripe;
docs/why-codemap.mdadds a "What Codemap is not" anti-pitch section and a scenario-keyed token-savings table (single lookup → 50-turn session) replacing the earlier hand-wave - Stricter lint baseline: enabled
prefer-const,consistent-type-specifier-style,consistent-type-definitions,no-confusing-non-null-assertion,no-unnecessary-{boolean-literal-compare,template-expression,type-assertion},prefer-{includes,nullish-coalescing,optional-chain}, andunicorn/switch-case-braces - Schema v3 — tighter
NOT NULLinvariants: every column whoseRow-interface type was non-nullable is nowNOT NULLin the SQLite DDL (files.size/line_count/language/last_modified/indexed_at,symbols.line_start/line_end/signature/is_exported/is_default_export,imports.specifiers/is_type_only/line_number,exports.kind/is_default,components.hooks_used/is_default_export,markers.line_number/content,css_variables.scope/line_number,css_classes.is_module/line_number,css_keyframes.line_number,type_members.is_optional/is_readonly). Existing v2 databases auto-rebuild viacreateSchema()'s version-mismatch detector — no manual action needed
- New:
v0.2.2
Patch Changes
5f65c33Thanks @SutuSebastian! - Use vendor-neutral.mdextension for agent rules in templates; Cursor integration remaps to.mdcat wiring timecodemap agents initnow writes.mdrule files to.agents/rules/(plain Markdown with YAML frontmatter)- Cursor target automatically renames rules to
.mdc(required for frontmatter parsing); all other targets (Windsurf, Continue, Cline, Amazon Q) keep.md SKILL.mdnow includesnameanddescriptionfrontmatter per the Agent Skills spec
v0.2.1
Patch Changes
7f663beThanks @SutuSebastian! - Sync bundled agent rule template with schema v2: addtype_members,calls, anddoc_commenttrigger patterns and query rows. Add golden scenarios and fixture coverage for both new tables.
v0.2.0
Minor Changes
- #19
53b2c52Thanks @SutuSebastian! - Richer symbol metadata: generics, return types, JSDoc, type members, const values, symbol nesting, call graph- Signatures now include generic type parameters, return type annotations, and heritage clauses (extends/implements)
- New
doc_commentcolumn on symbols extracts leading JSDoc comments - New
type_memberstable indexes properties and methods of interfaces and object-literal types - New
valuecolumn on symbols captures const literal values (strings, numbers, booleans, null) - New
parent_namecolumn on symbols tracks scope nesting; class methods/properties/getters extracted as individual symbols - New
callstable tracks function-scoped call edges withcaller_scopefor qualified disambiguation (deduped per file) - Enum members extracted into
memberscolumn as JSON - Performance: cached scope strings, hoisted hot-path regex, batch deletes, reduced redundant I/O, BATCH_SIZE 100→500
- SCHEMA_VERSION bumped to 2
v0.1.9
Patch Changes
- #17
e962326Thanks @SutuSebastian! - Fix incremental detection reporting unchanged files as "changed" on every run when the working tree has uncommitted modifications.getChangedFilesnow compares content hashes against the index before including candidates, so only truly modified files enter the indexing pipeline.
v0.1.8
Patch Changes
-
#15
f2362f9Thanks @SutuSebastian! - Fix three HIGH-severity bugs found via cross-audit triangulation, plus performance and docs improvements.Bug fixes
- Add missing
onerrorhandler on Bun Worker — prevents silent promise hang when a parse worker crashes - Require JSX return or hook usage for component detection — eliminates false positives (e.g.
FormatCurrency()in.tsxfiles no longer indexed as a component) - Include previously-indexed files in incremental and
--filesmodes — custom-extension files indexed during--fullno longer silently go stale
Performance
- Batch CSS imports instead of inserting one-at-a-time (both full-rebuild and incremental paths)
- Add
Map<string, Statement>cache forbetter-sqlite3run()/query()— avoids ~2,000+ redundantprepare()calls on large projects - Hoist
inner.query()inwrap()to prepare once per call instead of per.get()/.all() - Skip
PRAGMA optimizeoncloseDbfor read-only query paths
Docs
- Fix Wyhash → SHA-256 in architecture.md and SKILL.md (3 locations)
- Correct
symbols.kindvalues (variable→const,type_alias→type) andexports.kindvalues - Clarify
Database.query()caching is Bun-only; Node statement cache via wrapper - Update architecture.md: component heuristic, statement cache,
closeDbreadonly, incremental/--filescustom extensions - Update benchmark.md and golden-queries.md for enriched fixture
Testing
- Enrich
fixtures/minimal/to cover all 10 indexed tables (CSS module,@keyframes,@import, non-component PascalCase export, FIXME marker) - Add 7 new golden scenarios (exports, css_variables, css_classes, css_keyframes, css_imports, markers-all-kinds, components-no-false-positives)
Cleanup
- Remove unused
analyzeDependencies: truefrom CSS parser - Deduplicate
fetchTableStats(was duplicated acrossindex-engine.tsandrun-index.ts) - Remove dead
eslint-disable-next-linedirectives (oxlint doesn't enforce those rules) - Fix
SCHEMA_VERSIONcomment (said "2", value is1)
- Add missing
v0.1.7
Patch Changes
- #13
13a2c14Thanks @SutuSebastian! - Replacefast-globwithtinyglobbyfor Node include globs. Smaller dependency footprint;expandDirectories: falsekeeps matching aligned with the previous behavior.
v0.1.6
Patch Changes
ca4b47aThanks @SutuSebastian! - Shipped agent rules and skills now lead withcodemap query --json(optional table output when--jsonis omitted). Addbun run benchmark:queryto compareconsole.tablevs JSON stdout size, plus integration tests for--jsonvs default output when.codemap.dbis present. README anddocs/(includingbenchmark.md§ Query stdout) updated to match.
v0.1.5
Patch Changes
-
#10
9d37bd5Thanks @SutuSebastian! - Agent templates (templates/agents/)- Align
codemap.mdcandskills/codemap/SKILL.mdwith the currentcodemap query --jsoncontract (bootstrap / DB / SQL failures,process.exitCode). - SKILL:
QUERY_RECIPES-aligned fan-out SQL examples and bundled-recipe determinism note.
- Align