Skip to content

Orvix 0.3.0 - #14

Merged
lightningpixel merged 27 commits into
mainfrom
dev
Oct 27, 2026
Merged

lightningpixel merged 27 commits into
mainfrom
dev

Conversation

@lightningpixel

Copy link
Copy Markdown
Owner

Brings everything planned for 0.3.0 from dev into main.

Added

  • orvix map --focus and the orvix-focus prompt hook: a map centred on what the task touches
  • orvix impact, and a hook that warns about broken callers as soon as an edit breaks them
  • Session memory: a re-read is answered from what the session was already sent
  • A benchmark that measures savings over a whole recorded session
  • An MCP server that serves the index
  • orvix diff: what changed since a ref, symbol by symbol
  • orvix replace, guarded behind --write

Resolution

  • Member calls resolved by the receiver's declared type
  • Calls dispatched through a channel name are linked
  • Declarations scoped to a top-level block are no longer indexed

Checks

  • npm run build ✅ · npx tsc --noEmit ✅ · npm test ✅ 529/529

🤖 Generated with Claude Code

lightningpixel and others added 27 commits October 26, 2026 21:30
The dirty hook's extension list and the agent instruction block both stopped
at Rust when Java, C#, C++ and C were added. Edits to those files were never
marked, so queries answered from a stale index, and agents were told to read
them directly. A test now ties the hook's list to the language registry.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`orvix map --focus` restarts PageRank at the named symbols and walks call
edges both ways, so the neighbourhood of a task outranks unrelated exported
surface. The orvix-focus UserPromptSubmit hook runs it for code-like words in
the prompt and attaches the result as context, which is the first point at
which Orvix can act before the model goes searching.

PageRank itself moves into a shared `pagerank` so the index-time ranking and
the focused one cannot drift. The query entry point is split from its
dispatch so tests can import `run` without executing it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`orvix impact <id>` walks caller edges breadth-first and reports every
dependant at its shortest distance, then the test files among them, which
are the tests worth running after a change.

Test files were invisible to that walk: every call inside `test(() => ...)`
sits in an anonymous callback and belongs to no symbol. Such calls are now
persisted as `fileCallers`, spliced by the incremental path exactly like
symbol edges and checked against a full rebuild byte for byte. The
projection version moves to 3.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The orvix-impact PostToolUse hook runs `orvix-query edited <file>` after
every Edit, Write and MultiEdit. That command reads the file's symbols from
the index, reindexes the file, and compares by id: a changed signature or a
removed symbol that still has callers is reported, with the callers, as
additional context. A body-only edit keeps every id and signature and
prints nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`orvix-query edited src/../../x.ts` passed the containment check, which
only looked for a leading `..`, and the file outside the project was then
marked dirty and indexed. The path is now resolved against the root first.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The compression hook records each full delivery of a file by content
hash. An unchanged re-read gets a one-line note instead of the text, and a
re-read after a small edit gets only the changed region. The read after a
note or a patch is always sent whole, so the model can still insist.

Compaction is the moment that note stops being true, so a new PreCompact
hook, orvix-compact, drops the session's memory.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
scripts/session-replay.mjs replays a Claude Code transcript through the
real compression hook and charges each saving once per later API call,
until the next compaction, against the input the API reported. That is
the figure the per-result benchmark cannot give: an early saving is
re-sent on every turn that follows it.

The replay runs in a scratch copy of the index, so it never touches the
session memory of an agent working in the same project.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`orvix mcp` speaks newline-delimited JSON-RPC on stdio and exposes the
query commands as six tools. Hooks only reach Claude Code; MCP reaches
every other agent. A failed lookup is a tool result with isError, so its
explanation reaches the model.

Also says "1 symbol reaches" rather than "1 symbols reach" in impact.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Changed, deleted and untracked files come from git and are filtered by
the index's own ignore rules. Both versions of each file are extracted
exactly as indexing does, so symbols are matched by id and classified as
added, removed, signature changed or body changed. Changed signatures
list their callers; removed symbols list the files still naming them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`const input` inside a top-level `try` is block-scoped, yet was indexed as
a module constant; every hook script contributed one. A statement block
now opens a local scope in ECMAScript, except a namespace body, whose
members are its surface. Found by diffing this repository.

INDEX_VERSION moves to 3: an unchanged file's cached facts were extracted
by the old rule and would otherwise be kept.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`r.save()` with two classes defining save had two candidates and no edge.
The receiver's type is often written down — a typed parameter, local or
field, `new Repo()`, `this`, `this.field` — and a declared type is the
same kind of evidence as an import. Extraction now records it on the
reference, and resolution tries methods of that class first, in the
usual order of same file, imports, then the family. With no such method
it falls back to the old rules unchanged.

On gson this lifts resolved call sites from 24.3% to 35.6%, and the 65
edges it removes were wrong ones made by the same-file rule.

Go and Rust are not covered: their methods carry no container, and
giving them one would change their ids.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
`ipcRenderer.invoke("config:get")` and `ipcMain.handle("config:get",
getConfig)` are one call split by a process boundary. Extraction now
records literal channel sites for TS and JS; each dispatch is linked to
every handler on the same channel in the same package, recomputed whole
from the facts on every index. The links live in graph.dispatch, apart
from call edges, and who-calls, calls and impact show them with their
channel.

Generic event names are ignored, handlers must resolve to one named
function, and matching stops at the nearest package.json, since monorepo
examples reuse channel names.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Replaces one symbol's source by id with text from a file or stdin. The
symbol is relocated in the file as it is on disk rather than at indexed
offsets, a replacement that breaks parsing is refused, and after writing
the broken callers are reported as the edit hook reports them. Without
--write it only describes the change. Text copied with a leading
`export` is accepted as well as text shaped like `orvix show` output.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The README now covers --focus, impact, diff, replace and mcp, the six
hooks and their switches, and the receiver-type figures. The section
saying hooks cannot create initiative is replaced, since two of them now
act before the model asks. Measured figures are re-run on the current
source.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@lightningpixel
lightningpixel merged commit fc88770 into main Oct 27, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant