Skip to content

Releases: stainless-code/codemap

v0.4.0

30 Apr 19:15
09c6370

Choose a tag to compare

Minor Changes

  • #28 91598bc Thanks @SutuSebastian! - symbols.visibility column — JSDoc visibility tag (@public / @private / @internal / @alpha / @beta) extracted at parse time and stored as a real column. Replaces the LIKE '%@beta%' regex in the visibility-tags recipe. SCHEMA_VERSION bumps from 3 to 4 — .codemap.db rebuilds automatically on next index. Helper extractVisibility(doc) exported from parser.ts. New partial index idx_symbols_visibility covers WHERE visibility IS NOT NULL queries.

Patch Changes

  • #29 03fbddf Thanks @SutuSebastian! - Update bundled templates/agents/ rule and skill to cover the recent CLI surface — codemap query --summary / --changed-since <ref> / --group-by owner|directory|package, per-row recipe actions, and the new symbols.visibility column. The dev-side .agents/ mirror is updated in lockstep so this clone stays self-consistent.

  • #26 c32f052 Thanks @SutuSebastian! - codemap query Tier A flags — --summary, --changed-since <ref>, --group-by owner|directory|package, plus per-row actions templates on bundled recipes. All output filters; the SQL still executes against the index. Ad-hoc SQL and the cm.query() programmatic API stay unchanged.

v0.3.0

27 Apr 12:18
55d9c92

Choose a tag to compare

Minor Changes

  • #23 ebd4c34 Thanks @SutuSebastian! - Agent-friendly CLI surface plus a schema v3 bump that tightens NOT NULL invariants. Existing .codemap.db files auto-rebuild on first open.
    • New: codemap validate [--json] [paths...] — diffs the on-disk SHA-256 of indexed files against files.content_hash and prints stale / missing / unindexed rows. Lets agents skip re-reads they don't need; exits 1 on 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. --for runs lightweight intent classification (refactor / debug / test / feature / explore / other) and returns matched recipe ids plus a hint
    • New: codemap --performance flag — 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: -r short alias for codemap query --recipe + cleaner organized codemap query --help (sectioned flags, dynamic recipe-id padding, examples for both forms)
    • New recipes: deprecated-symbols (@deprecated JSDoc tag scan), visibility-tags (@internal / @private / @alpha / @beta), files-hashes (powers validate), barrel-files (top files by export count)
    • Friendlier no-.codemap.db error: no such table: <X> now rewrites to an actionable hint pointing at codemap / codemap --full, on both the JSON and human paths
    • Public type surface: new IndexPerformanceReport; IndexRunStats.performance? field; per-field JSDoc coverage on IndexResult, IndexRunStats, ResolvedCodemapConfig, all db.ts row interfaces (FileRow, SymbolRow, ImportRow, ExportRow, ComponentRow, DependencyRow, MarkerRow, CssVariableRow, CssClassRow, CssKeyframeRow, CallRow, TypeMemberRow), and ParsedFile
    • Documentation: README now leads with a "What you get" Grep/Read vs Codemap capability table and a "Daily commands" stripe; docs/why-codemap.md adds 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}, and unicorn/switch-case-braces
    • Schema v3 — tighter NOT NULL invariants: every column whose Row-interface type was non-nullable is now NOT NULL in 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 via createSchema()'s version-mismatch detector — no manual action needed

v0.2.2

09 Apr 07:42
56bb673

Choose a tag to compare

Patch Changes

  • 5f65c33 Thanks @SutuSebastian! - Use vendor-neutral .md extension for agent rules in templates; Cursor integration remaps to .mdc at wiring time
    • codemap agents init now writes .md rule 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.md now includes name and description frontmatter per the Agent Skills spec

v0.2.1

08 Apr 17:19
c95fa6c

Choose a tag to compare

Patch Changes

  • 7f663be Thanks @SutuSebastian! - Sync bundled agent rule template with schema v2: add type_members, calls, and doc_comment trigger patterns and query rows. Add golden scenarios and fixture coverage for both new tables.

v0.2.0

08 Apr 15:21
037daff

Choose a tag to compare

Minor Changes

  • #19 53b2c52 Thanks @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_comment column on symbols extracts leading JSDoc comments
    • New type_members table indexes properties and methods of interfaces and object-literal types
    • New value column on symbols captures const literal values (strings, numbers, booleans, null)
    • New parent_name column on symbols tracks scope nesting; class methods/properties/getters extracted as individual symbols
    • New calls table tracks function-scoped call edges with caller_scope for qualified disambiguation (deduped per file)
    • Enum members extracted into members column 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

08 Apr 11:10
630c0b4

Choose a tag to compare

Patch Changes

  • #17 e962326 Thanks @SutuSebastian! - Fix incremental detection reporting unchanged files as "changed" on every run when the working tree has uncommitted modifications. getChangedFiles now compares content hashes against the index before including candidates, so only truly modified files enter the indexing pipeline.

v0.1.8

08 Apr 10:43
b5c2570

Choose a tag to compare

Patch Changes

  • #15 f2362f9 Thanks @SutuSebastian! - Fix three HIGH-severity bugs found via cross-audit triangulation, plus performance and docs improvements.

    Bug fixes

    • Add missing onerror handler 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 .tsx files no longer indexed as a component)
    • Include previously-indexed files in incremental and --files modes — custom-extension files indexed during --full no 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 for better-sqlite3 run()/query() — avoids ~2,000+ redundant prepare() calls on large projects
    • Hoist inner.query() in wrap() to prepare once per call instead of per .get()/.all()
    • Skip PRAGMA optimize on closeDb for read-only query paths

    Docs

    • Fix Wyhash → SHA-256 in architecture.md and SKILL.md (3 locations)
    • Correct symbols.kind values (variableconst, type_aliastype) and exports.kind values
    • Clarify Database.query() caching is Bun-only; Node statement cache via wrapper
    • Update architecture.md: component heuristic, statement cache, closeDb readonly, incremental/--files custom 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: true from CSS parser
    • Deduplicate fetchTableStats (was duplicated across index-engine.ts and run-index.ts)
    • Remove dead eslint-disable-next-line directives (oxlint doesn't enforce those rules)
    • Fix SCHEMA_VERSION comment (said "2", value is 1)

v0.1.7

07 Apr 15:29
5b49b84

Choose a tag to compare

Patch Changes

  • #13 13a2c14 Thanks @SutuSebastian! - Replace fast-glob with tinyglobby for Node include globs. Smaller dependency footprint; expandDirectories: false keeps matching aligned with the previous behavior.

v0.1.6

07 Apr 14:55
f51d77f

Choose a tag to compare

Patch Changes

  • ca4b47a Thanks @SutuSebastian! - Shipped agent rules and skills now lead with codemap query --json (optional table output when --json is omitted). Add bun run benchmark:query to compare console.table vs JSON stdout size, plus integration tests for --json vs default output when .codemap.db is present. README and docs/ (including benchmark.md § Query stdout) updated to match.

v0.1.5

07 Apr 14:07
adb06e5

Choose a tag to compare

Patch Changes

  • #10 9d37bd5 Thanks @SutuSebastian! - Agent templates (templates/agents/)

    • Align codemap.mdc and skills/codemap/SKILL.md with the current codemap query --json contract (bootstrap / DB / SQL failures, process.exitCode).
    • SKILL: QUERY_RECIPES-aligned fan-out SQL examples and bundled-recipe determinism note.