v0.8.10
[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,buildRepoMapcomputes 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.--querymatches normalized paths, symbol names, signatures, jsdoc, and (capped) excerpt/content;--focus-pathboosts 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-entryfocusScore/focusReasons. Exposed throughcreateOcc().code.map(index, { focus })and re-exported asRepoMapFocus/RepoMapFocusResultfrom@cesarandreslopez/occ- Focus metadata is surfaced in every renderer — markdown/plain headers,
<repomap>focusQuery/focusPaths/focusMatchedattributes 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...]