go build . or go run .task test or go test ./... (run single test: go test ./internal/llm/prompt -run TestGetContextFromPaths)go test ./... -update (regenerates .golden files when test output changes)
go test ./internal/tui/components/core -update (in this case, we're updating "core")task lint:fixtask fmt (gofumpt -w .)task modernize (runs modernize which make code simplifications)task dev (runs with profiling enabled)goimports formatting, group stdlib, external, internal packagestype AgentName string)fmt.Errorf for wrappingcontext.Context as first parameter for operationsrequire package, parallel tests with t.Parallel(),
t.SetEnv() to set environment variables. Always use t.Tempdir() when in
need of a temporary directory. This directory does not need to be removed.task lint:log which runs as part of task lintWhen writing tests that involve provider configurations, use the mock providers to avoid API calls:
func TestYourFunction(t *testing.T) {
// Enable mock providers for testing
originalUseMock := config.UseMockProviders
config.UseMockProviders = true
defer func() {
config.UseMockProviders = originalUseMock
config.ResetProviders()
}()
// Reset providers to ensure fresh mock data
config.ResetProviders()
// Your test code here - providers will now return mock data
providers := config.Providers()
// ... test logic
}
gofumpt -w ..gofumpt is not available, use goimports.goimports is not available, use gofmt.task fmt to run gofumpt -w . on the entire project,
as long as gofumpt is on the PATH.fix:, feat:, chore:, refactor:, docs:, sec:, etc).Anytime you need to work on the tui before starting work read the internal/ui/AGENTS.md file