Skip to main content

Go Documentation

Crux's Go API documentation is available on pkg.go.dev:

pkg.go.dev/github.com/roygabriel/crux →

Key Packages

PackageImport PathDescription
typesgithub.com/roygabriel/crux/pkg/typesShared domain types (Agent, Phase, Decision, etc.)
protocolgithub.com/roygabriel/crux/pkg/protocolJSON message envelope for agent communication

Internal Packages

These packages are internal and cannot be imported by external projects, but their documentation is useful for understanding Crux's architecture:

PackageDescription
internal/orchestratorMain control loop, world state, agent assignment
internal/phasePhase engine: spec parsing, prompt contracts, gate runner
internal/agentAgent registry, lifecycle management, messenger
internal/memoryMemory system: bank, SQLite store, vector index, journal, work notes
internal/tmuxTmux session/pane management, watcher
internal/pluginAgent plugin interface and registry
internal/securityFilesystem sandbox, permissions, audit logging, rate limiting
internal/configYAML configuration loading and validation
internal/tuiTerminal UI dashboard (bubbletea)

Generating Docs Locally

Generate Go documentation locally using godoc:

go install golang.org/x/tools/cmd/godoc@latest
godoc -http=:6060

Then visit http://localhost:6060/pkg/github.com/roygabriel/crux/.