Skip to content

feat(context): symbol index for ContextPack.symbols (§0.1)#9

Merged
casabre merged 1 commit into
mainfrom
feat/symbol-index
Jul 4, 2026
Merged

feat(context): symbol index for ContextPack.symbols (§0.1)#9
casabre merged 1 commit into
mainfrom
feat/symbol-index

Conversation

@casabre

@casabre casabre commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Finishes the symbol-index follow-up — the context pack's symbols slice is now populated.

What

InProcessWorkspace extracts top-level declarations (function / class / interface / type / enum / variable) from supported TS/JS source files and includes them in the pack — capped at 200 files/build, cached by HEAD SHA.

Mechanism deviation (flagged)

Decision B chose tree-sitter. Implemented on the TypeScript compiler API (pure JS, no wasm) instead, because Docker's npm prune --omit=dev + wasm-grammar bundling made tree-sitter a red-Docker risk vs the green-pipeline goal. Same SymbolSlice shape; tree-sitter/LSP remains the documented multi-language escalation. typescript promoted devDeps → deps.

Gates

typecheck ✅ · lint ✅ · test:coverage ✅ (402 tests, 100%) · build ✅.

🤖 Generated with Claude Code

Fill in the symbol slices left empty by the Workspace cache: InProcessWorkspace
now extracts top-level declarations (function/class/interface/type/enum/variable)
from supported TS/JS source files and includes them in the context pack, capped
at 200 files per build and cached by HEAD SHA like the rest of the pack.

Implementation note: uses the TypeScript compiler API (pure JS, no native/wasm)
rather than tree-sitter, to keep the runtime and Docker image dependency-light
for this TypeScript-centric tool — `npm prune --omit=dev` + wasm grammar bundling
made tree-sitter a real packaging risk. Multi-language indexing via tree-sitter
or LSP remains the documented escalation behind the same SymbolSlice shape.
typescript is promoted from devDependencies to dependencies accordingly.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@casabre casabre merged commit b096668 into main Jul 4, 2026
10 checks passed
@casabre casabre deleted the feat/symbol-index branch July 4, 2026 08:35
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