Skip to content

Guidelines

PT | EN

Guia completo para contribuir com Vectora: setup, código, commits, PRs e melhores práticas.

Setup

git clone https://github.com/kaffyn/vectora
cd vectora
go mod tidy
go build -o vectora ./cmd/vectora

Code Style

  • Golang: Go 1.22+, seguir Go Code Review Comments
  • Formatting: gofmt ou goimports
  • Linting: golangci-lint (rodar golangci-lint run)
  • Tests: go test, cobertura >80%

Git Workflow

  1. Fork repo
  2. Create branch: git checkout -b feature/your-feature
  3. Commit: conventional commits (feat:, fix:, docs:)
  4. Push: git push origin feature/your-feature
  5. PR com descrição clara

PR Requirements

  • Testes passando (go test ./...)
  • Linting limpo (golangci-lint run)
  • Sem fmt.Printf (usar logger interno)
  • Documentação atualizada (PT + EN)
  • Descrição do PR explica o PORQUÊ

Commit Message Format

type(scope): brief description

Longer explanation if needed.

Closes #123

Types: feat, fix, docs, test, refactor, perf, chore

Documentation

  • Update CHANGELOG.md
  • Add JSDoc para funções públicas
  • Portuguese + English (i18n)

Testing

go test ./... # Rodar todos os testes
go test -v ./pkg/core # Testar pacote específico
go test -coverprofile=coverage.out ./... # Relatório de cobertura

Performance

  • Benchmark antes/depois: go test -bench=. ./...
  • Vector search deve ser <500ms
  • Não adicione dependências pesadas

Security

  • Use BYOK para APIs
  • Sem segredos hardcoded
  • Rodar go nancy ou govulncheck antes do PR

Questions?


External Linking

ConceptResourceLink
MCPModel Context Protocol Specificationmodelcontextprotocol.io/specification
MCP Go SDKGo SDK for MCP (mark3labs)github.com/mark3labs/mcp-go

Parte do ecossistema Vectora · Open Source (MIT) · Contribuidores