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) stringProfile 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:
| Flag | Internal model slot |
|---|---|
--plan-model | Claude.Models.Planner |
--implementation-model | Claude.Models.Executor and Claude.Models.Refactor |
--skill-model | Claude.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:
| Event | Purpose |
|---|---|
run.started / run.completed / run.failed | Run lifecycle |
phase.started / phase.completed | Workflow phase lifecycle |
message.delta / message.completed | Provider output |
tool.call / tool.result | Local or hosted tool activity |
usage.updated | Token and cost usage |
schema.result | Structured output validation |
artifact.changed | Durable output tracking |
memory.loaded | Runtime memory context loaded |
integration.state | Integration 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> --jsonThe 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 checkRoutines
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-runThe 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:
| Flag | Purpose |
|---|---|
--graph-area | Required graph/product area to inspect |
--top-n | Number of slow GraphQL operations to inspect |
--lookback | Datadog lookback window such as 24h or 7d |
--environment | Datadog environment tag |
--service | Optional Datadog service tag |
--max-remediations | Maximum high-confidence findings Desktop should route into remediation |
--report-out | Override Markdown report path, or - to skip file output |
--provider / --model | Override runtime provider or model |
--mcp-url | Use a remote MCP URL instead of the local descriptor command |
--param key=value | Pass additional routine parameters |
Integrations
boatman integrations
boatman integrations --json
boatman integrations check [name...]
boatman integrations check --emit-eventsRuns
boatman runs list
boatman runs show <run-id>
boatman runs request <run-id>
boatman runs artifacts <run-id>Flags:
| Flag | Commands | Purpose |
|---|---|---|
--store-dir | runs * | Override runtime run store directory |
--json | runs show/request/artifacts | Print machine-readable JSON |
Memory
boatman memory list
boatman memory show <id>
boatman memory context [id...]Flags:
| Flag | Commands | Purpose |
|---|---|---|
--memory-dir | memory * | Override memory document directory |
--json | memory list/show | Print machine-readable JSON |
--include-expired=false | memory list | Hide expired documents |
--max-bytes | memory context | Limit rendered context size |
--emit-event | memory context | Print a normalized memory.loaded event |
--run-id | memory context | Run 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) errorRetry 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) errorHealth Check Functions
func CheckAll() (*HealthReport, error)
func CheckGit() error
func CheckGH() error
func CheckClaude() error
func CheckTmux() errorHealthReport
type HealthReport struct {
Passed []string
Failed []string
Warnings []string
}CLI Commands
| Command | Description |
|---|---|
boatman work <ticket|--prompt|--file> | Execute a task |
boatman watch | Watch agent activity live |
boatman sessions list | List active sessions |
boatman sessions kill [-f] | Kill sessions |
boatman sessions cleanup | Clean up idle sessions |
boatman worktree list | List all worktrees |
boatman worktree commit [name] [msg] | Commit worktree changes |
boatman worktree push | Push worktree branch |
boatman worktree clean | Remove 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 workflows | List built-in workflow templates |
boatman workflows show <id> | Show workflow template stages and gates |
boatman routines | List repeatable routine definitions |
boatman routines run datadog-gql-slow-queries --graph-area <area> | Run the Datadog GraphQL performance routine |
boatman providers | Inspect registered model providers |
boatman runs list | List recorded runtime runs |
boatman version [--verbose] | Show version information |