Skip to content

v0.8.10

Choose a tag to compare

@github-actions github-actions released this 30 May 01:00
· 4 commits to main since this release

[0.8.10] - 2026-05-29

Added

  • Query- and path-focused repo maps for occ code map / occ code pack. New flags --query <text>, --focus-path <path> (repeatable), and --focus-depth <n> (default 1) bias the map toward task-relevant files instead of only the globally most-depended-upon ones. The global weighted PageRank (rankNodes) is unchanged; when a focus is active, buildRepoMap computes a per-file relevance score and blends it with the structural rank (combined = global * 0.35 + focus * 0.65) to re-order admission within the token budget. --query matches normalized paths, symbol names, signatures, jsdoc, and (capped) excerpt/content; --focus-path boosts exact-file and directory matches plus their import/call/inheritance graph neighbors up to --focus-depth
  • computeFocusScores() (src/code/focus.ts) — the dependency-free scorer behind focus mode (query + path + undirected graph-neighbor signals, keyed by absolute path)
  • RepoMapOptions.focus ({ query?, paths?, graphDepth? }) plus additive result metadata: RepoMapResult.focus ({ query?, paths, matchedFiles }) and per-entry focusScore / focusReasons. Exposed through createOcc().code.map(index, { focus }) and re-exported as RepoMapFocus / RepoMapFocusResult from @cesarandreslopez/occ
  • Focus metadata is surfaced in every renderer — markdown/plain headers, <repomap> focusQuery/focusPaths/focusMatched attributes and per-<file> focusScore, and JSON

Migration notes

  • Purely additive and opt-in. With no focus flags (or an empty focus selector) the map is byte-for-byte identical to before, and the global PageRank remains the default for broad-overview use. The new fields are optional, so existing programmatic callers are unaffected

Install

Global install (requires Node.js 18+):

npm i -g @cesarandreslopez/occ

No-install usage:

npx @cesarandreslopez/occ [directories...]