Overview
Enable dev-agent to index Go codebases with the same quality as TypeScript - semantic search, relationship queries, and context assembly for Go projects.
Target: v0.5.0 or v0.6.0
Motivation
- Team uses Go as primary language
- Python deprioritized (not used by team)
- Go support enables dogfooding on real, mature Go codebases
Scope
In Scope
- Tree-sitter WASM infrastructure (reusable for future languages)
- Go scanner extracting: functions, structs, interfaces, types, constants
- Method extraction with receiver information
- Go doc comment extraction
- Exported detection (capital letter convention)
- Generics support (
[T any])
- Generated file skipping (
// Code generated)
- 90%+ test coverage (matching TypeScript scanner quality)
Out of Scope (Future)
- Package/module context from
go.mod
- Import relationship tracking
- Build tag awareness
- Cross-package analysis
Technical Approach
Parsing: Tree-sitter with WASM bindings (web-tree-sitter + tree-sitter-go)
- No Go installation required to index Go code
- ~2MB grammar file
- Reusable infrastructure for Python/Rust later
Document Types:
| Go Construct |
Document Type |
Example |
func foo() |
function |
CreateEmbedding, TopK[T any] |
func (e *Exp) Method() |
method |
ExpBackoff.MarkFailAndGetWait |
type Server struct {} |
class |
ExpBackoff, SplitClient |
type Reader interface {} |
interface |
DistributedRateLimiter |
type ID string |
type |
MapStringAny |
const/var (exported) |
variable |
ErrNotFound, ErrAuth |
Sub-Issues
Success Criteria
References
Overview
Enable dev-agent to index Go codebases with the same quality as TypeScript - semantic search, relationship queries, and context assembly for Go projects.
Target: v0.5.0 or v0.6.0
Motivation
Scope
In Scope
[T any])// Code generated)Out of Scope (Future)
go.modTechnical Approach
Parsing: Tree-sitter with WASM bindings (
web-tree-sitter+tree-sitter-go)Document Types:
func foo()functionCreateEmbedding,TopK[T any]func (e *Exp) Method()methodExpBackoff.MarkFailAndGetWaittype Server struct {}classExpBackoff,SplitClienttype Reader interface {}interfaceDistributedRateLimitertype ID stringtypeMapStringAnyconst/var(exported)variableErrNotFound,ErrAuthSub-Issues
Success Criteria
dev index .successfully indexes mature Go codebasesdev_searchfinds Go functions, structs, interfaces by meaningdev_refstraces Go method callers/callees.gen.go,.pb.go) are skippedReferences
packages/core/src/scanner/README.md