Boatman Ecosystem documentation is live!
BoatmanMode CLI
API Reference

API Reference

Complete reference for BoatmanMode's internal packages and public interfaces.

Core Types

Task Interface

// Task represents a unit of work for the agent
type Task interface {
    GetID() string
    GetTitle() string
    GetDescription() string
    GetBranchName() string
    GetLabels() []string
    GetMetadata() TaskMetadata
}

TaskMetadata

type TaskMetadata struct {
    Source    TaskSource  // "linear", "prompt", "file"
    CreatedAt time.Time
    FilePath  string     // Only for file-based tasks
}

TaskSource

type TaskSource string
 
const (
    TaskSourceLinear TaskSource = "linear"
    TaskSourcePrompt TaskSource = "prompt"
    TaskSourceFile   TaskSource = "file"
)

Config Types

Config

type Config struct {
    LinearKey      string        // Linear API key
    BaseBranch     string        // Base branch (default: "main")
    MaxIterations  int           // Max review/refactor cycles (default: 5)
    ReviewSkill    string        // Claude skill for review (default: "peer-review")
    ExtraReviewSkills []string    // Additional review skills
    KeepDraftPR    bool          // Leave successful PRs as draft
    EnableTools    bool          // Enable Claude tools (default: true)
    AutoPR         bool          // Auto-create PR (default: true)
 
    // Feature toggles
    EnablePreflight  bool
    EnableTests      bool
    EnableDiffVerify bool
    EnableMemory     bool
    CheckpointDir    string
    MemoryDir        string
 
    // Sub-configs
    Claude      ClaudeConfig
    Runtime     RuntimeConfig
    Review      ReviewConfig
    Coordinator CoordinatorConfig
    Retry       RetryConfig
    TokenBudget TokenBudgetConfig
}

RuntimeConfig

type RuntimeConfig struct {
    DefaultProvider  string            // Default provider, usually "claude-cli"
    RoleProviders    map[string]string // e.g. planner -> claude-cli
    ProfileProviders map[string]string // e.g. triage-scorer -> openai-responses
}
 
func (r RuntimeConfig) ProviderFor(role, profile string) string

Profile routes take precedence over role routes. Role routes take precedence over DefaultProvider.

ClaudeConfig

type ClaudeConfig struct {
    Command              string  // CLI command (default: "claude")
    UseTmux              bool    // Use tmux for large prompts
    LargePromptThreshold int     // Character count for tmux
    Timeout              int     // Timeout in seconds (0 = no timeout)
    EnablePromptCaching  bool    // Enable prompt caching
 
    Models struct {
        Planner    string  // Model for planning
        Executor   string  // Model for execution
        Reviewer   string  // Model for review and skill execution
        Refactor   string  // Model for refactoring
        Preflight  string  // Model for preflight validation
        TestRunner string  // Model for test parsing
    }
}

boatman work can override common phase models per run:

FlagInternal model slot
--plan-modelClaude.Models.Planner
--implementation-modelClaude.Models.Executor and Claude.Models.Refactor
--skill-modelClaude.Models.Reviewer

ReviewConfig

type ReviewConfig struct {
    MaxCriticalIssues         int   // Max critical issues to pass (default: 1)
    MaxMajorIssues            int   // Max major issues to pass (default: 3)
    MinVerificationConfidence int   // Min confidence % (default: 50)
    StrictParsing             bool  // Strict keyword parsing (default: false)
}

CoordinatorConfig

type CoordinatorConfig struct {
    MessageBufferSize    int  // Main channel buffer (default: 1000)
    SubscriberBufferSize int  // Per-agent buffer (default: 100)
}

RetryConfig

type RetryConfig struct {
    MaxAttempts  int           // Number of attempts (default: 3)
    InitialDelay time.Duration // Initial delay (default: 500ms)
    MaxDelay     time.Duration // Max delay (default: 30s)
}

Agent Types

Agent

type Agent struct {
    Config *config.Config
}
 
func New(cfg *config.Config) (*Agent, error)
func (a *Agent) Work(ctx context.Context, t task.Task) (*WorkResult, error)

WorkResult

type WorkResult struct {
    PRCreated bool   // Whether a PR was created
    PRURL     string // URL of the created PR
    Message   string // Status message
}

Event Types

Event

type Event struct {
    Type        string                 `json:"type"`
    ID          string                 `json:"id,omitempty"`
    Name        string                 `json:"name,omitempty"`
    Description string                 `json:"description,omitempty"`
    Status      string                 `json:"status,omitempty"`
    Message     string                 `json:"message,omitempty"`
    Data        map[string]interface{} `json:"data,omitempty"`
}

Event Functions

func Emit(event Event)
func AgentStarted(id, name, description string)
func AgentCompleted(id, name, status string)
func AgentCompletedWithData(id, name, status string, data map[string]interface{})
func TaskCreated(id, name, description string)
func TaskUpdated(id, status string)
func Progress(message string)

Runtime Events

The normalized runtime event contract lives in github.com/philjestin/boatman-ecosystem/shared/agentruntime.

type Event struct {
    Version   int
    Type      EventType
    RunID     string
    PhaseID   string
    TaskID    string
    Provider  string
    Model     string
    Role      Role
    Name      string
    Status    Status
    Message   string
    Usage     *Usage
    Tool      *ToolEvent
    Artifact  *ArtifactEvent
    Schema    *SchemaEvent
    Raw       json.RawMessage
    Data      map[string]any
    Timestamp time.Time
}

Key event types include:

EventPurpose
run.started / run.completed / run.failedRun lifecycle
phase.started / phase.completedWorkflow phase lifecycle
message.delta / message.completedProvider output
tool.call / tool.resultLocal or hosted tool activity
usage.updatedToken and cost usage
schema.resultStructured output validation
artifact.changedDurable output tracking
memory.loadedRuntime memory context loaded
integration.stateIntegration health or configuration state

Set BOATMAN_RUNTIME_EVENTS=1 to emit runtime events alongside legacy CLI events during migration.


Runtime Inspection Commands

Workflows

boatman workflows
boatman workflows --json
boatman workflows show <template-id>
boatman workflows show <template-id> --json

The built-in templates live in github.com/philjestin/boatman-ecosystem/shared/agentruntime/workflows and model central-plane stages, gates, preview points, skips, and validation loops.

Providers

boatman providers
boatman providers --json
boatman providers check

Routines

boatman routines
boatman routines --json
boatman routines show <routine-id>
boatman routines show <routine-id> --json
boatman routines run datadog-gql-slow-queries --graph-area <area>
boatman routines run datadog-gql-slow-queries --graph-area <area> --max-remediations 3
boatman routines run datadog-gql-slow-queries --graph-area <area> --dry-run

The built-in routines live in github.com/philjestin/boatman-ecosystem/shared/agentruntime/routines. datadog-gql-slow-queries uses the Datadog integration, attaches a runtime MCP config, records the provider run, and writes a Markdown report.

Important flags:

FlagPurpose
--graph-areaRequired graph/product area to inspect
--top-nNumber of slow GraphQL operations to inspect
--lookbackDatadog lookback window such as 24h or 7d
--environmentDatadog environment tag
--serviceOptional Datadog service tag
--max-remediationsMaximum high-confidence findings Desktop should route into remediation
--report-outOverride Markdown report path, or - to skip file output
--provider / --modelOverride runtime provider or model
--mcp-urlUse a remote MCP URL instead of the local descriptor command
--param key=valuePass additional routine parameters

Integrations

boatman integrations
boatman integrations --json
boatman integrations check [name...]
boatman integrations check --emit-events

Runs

boatman runs list
boatman runs show <run-id>
boatman runs request <run-id>
boatman runs artifacts <run-id>

Flags:

FlagCommandsPurpose
--store-dirruns *Override runtime run store directory
--jsonruns show/request/artifactsPrint machine-readable JSON

Memory

boatman memory list
boatman memory show <id>
boatman memory context [id...]

Flags:

FlagCommandsPurpose
--memory-dirmemory *Override memory document directory
--jsonmemory list/showPrint machine-readable JSON
--include-expired=falsememory listHide expired documents
--max-bytesmemory contextLimit rendered context size
--emit-eventmemory contextPrint a normalized memory.loaded event
--run-idmemory contextRun ID for emitted memory events

Coordinator Types

Coordinator

type Coordinator struct{}
 
func NewCoordinator(cfg *config.CoordinatorConfig) *Coordinator
func (c *Coordinator) Start()
func (c *Coordinator) Stop()
func (c *Coordinator) ClaimWork(agentID string, claim *WorkClaim) error
func (c *Coordinator) LockFiles(agentID string, files []string) error
func (c *Coordinator) UnlockFiles(agentID string) error
func (c *Coordinator) SetContext(key string, value interface{})
func (c *Coordinator) GetContext(key string) (interface{}, bool)

WorkClaim

type WorkClaim struct {
    WorkID string
    Files  []string
}

Checkpoint Types

Checkpoint

type Checkpoint struct {
    TaskID    string
    Step      string
    Iteration int
    State     []byte // Serialized agent state
}
 
func Save(cp *Checkpoint) error
func Load(taskID string) (*Checkpoint, error)
func Rollback(taskID string, step string) error
func Squash(message string) error
func Snapshot(name string) error

Retry Functions

func Do(ctx context.Context, fn func() error, opts ...Option) error
func WithMaxAttempts(n int) Option
func WithInitialDelay(d time.Duration) Option
func WithMaxDelay(d time.Duration) Option
func IsPermanent(err error) bool
func NewPermanentError(err error) error

Health Check Functions

func CheckAll() (*HealthReport, error)
func CheckGit() error
func CheckGH() error
func CheckClaude() error
func CheckTmux() error

HealthReport

type HealthReport struct {
    Passed  []string
    Failed  []string
    Warnings []string
}

CLI Commands

CommandDescription
boatman work <ticket|--prompt|--file>Execute a task
boatman watchWatch agent activity live
boatman sessions listList active sessions
boatman sessions kill [-f]Kill sessions
boatman sessions cleanupClean up idle sessions
boatman worktree listList all worktrees
boatman worktree commit [name] [msg]Commit worktree changes
boatman worktree pushPush worktree branch
boatman worktree cleanRemove all worktrees
boatman checkpoint snapshot <name>Create checkpoint snapshot
boatman checkpoint squash <msg>Squash checkpoint commits
boatman checkpoint rollback --step <step>Rollback to step
boatman workflowsList built-in workflow templates
boatman workflows show <id>Show workflow template stages and gates
boatman routinesList repeatable routine definitions
boatman routines run datadog-gql-slow-queries --graph-area <area>Run the Datadog GraphQL performance routine
boatman providersInspect registered model providers
boatman runs listList recorded runtime runs
boatman version [--verbose]Show version information