feat(context): symbol index for ContextPack.symbols (§0.1)#9
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Finishes the symbol-index follow-up — the context pack's
symbolsslice is now populated.What
InProcessWorkspaceextracts 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 byHEADSHA.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. SameSymbolSliceshape; tree-sitter/LSP remains the documented multi-language escalation.typescriptpromoted devDeps → deps.Gates
typecheck✅ ·lint✅ ·test:coverage✅ (402 tests, 100%) ·build✅.🤖 Generated with Claude Code