Skip to content

Epic: Go Language Support #128

@prosdev

Description

@prosdev

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

  • dev index . successfully indexes mature Go codebases
  • dev_search finds Go functions, structs, interfaces by meaning
  • dev_refs traces Go method callers/callees
  • Scanner has 90%+ test coverage
  • Generated files (.gen.go, .pb.go) are skipped
  • Documentation updated with Go examples

References

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    epicLarge feature spanning multiple issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions