You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add the first community language extractor by implementing Python support against the frozen LanguageExtractor interface. The first version should provide a reliable structural graph for common Python modules without attempting framework-specific behavior.
Scope
Detect .py files as python.
Vendor and register a compatible Tree-sitter Python WASM grammar.
Emit a file node and containment tree.
Extract functions, async functions, classes, methods, module variables, and constants where they can be identified reliably.
Capture signatures, documentation strings, export visibility conventions, and return annotations when present.
Emit imports, calls, containment, inheritance, and instantiation references.
Leave cross-file targets unresolved through targetName for the existing resolution pass.
Required changes
Add src/graph/extraction/languages/python.ts.
Register the extractor in src/graph/extraction/languages/index.ts.
Register .py and the grammar filename in src/graph/extraction/grammars.ts.
Add the grammar WASM under src/graph/wasm/ and document its source, version, and license.
Add a representative Python fixture under src/graph/__tests__/fixtures/.
Add focused extractor tests under src/graph/__tests__/.
Acceptance criteria
The extractor implements the frozen LanguageExtractor interface without changing it.
Extraction is pure, deterministic, and limited to one file.
Node ids use generateNodeId(filePath, kind, name).
Goal
Add the first community language extractor by implementing Python support against the frozen
LanguageExtractorinterface. The first version should provide a reliable structural graph for common Python modules without attempting framework-specific behavior.Scope
.pyfiles aspython.targetNamefor the existing resolution pass.Required changes
src/graph/extraction/languages/python.ts.src/graph/extraction/languages/index.ts..pyand the grammar filename insrc/graph/extraction/grammars.ts.src/graph/wasm/and document its source, version, and license.src/graph/__tests__/fixtures/.src/graph/__tests__/.Acceptance criteria
LanguageExtractorinterface without changing it.generateNodeId(filePath, kind, name).npm run typecheck,npm test, andnpm run buildpass.Out of scope
Contributor references
src/graph/extraction/languages/typescript.tssrc/graph/__tests__/extractor.test.tsContributor workflow
Open the pull request with base branch
code-graph-preview.