Boatman Ecosystem documentation is live!
Harness Module
Scaffolding

Scaffolding

The scaffold package generates new Go projects with stub implementations of the harness runner interfaces. Generated projects compile immediately and include provider-specific guidance in comments.

Usage

# From the harness module
go run ./scaffold -name myagent -out /path/to/output

What Gets Generated

myagent/
├── go.mod
├── main.go            # Entry point with runner.Run()
├── developer.go       # Developer interface stubs (Execute, Refactor)
├── reviewer.go        # Reviewer interface stub (Review)
├── planner.go         # Planner interface stub (Plan) [optional]
├── tester.go          # Tester interface stub (RunTests) [optional]
└── README.md          # Getting started instructions

Generated Stubs

Each file contains a working implementation with TODO comments indicating where to add your LLM-specific logic:

// developer.go
type MyDeveloper struct{}
 
func (d *MyDeveloper) Execute(ctx context.Context, plan string) error {
    // TODO: Call your LLM to generate code based on the plan.
    // Example with Claude:
    //   resp, err := claude.Complete(ctx, plan)
    //   writeFiles(resp.Files)
    return nil
}
 
func (d *MyDeveloper) Refactor(ctx context.Context, issues []review.Issue, guidance string) error {
    // TODO: Call your LLM to fix the reported issues.
    return nil
}

Integration

The generated project imports the harness module and wires up the runner:

func main() {
    cfg := runner.Config{
        Developer:     &MyDeveloper{},
        Reviewer:      &MyReviewer{},
        MaxIterations: 3,
    }
 
    result, err := runner.Run(context.Background(), cfg)
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("Result: %s (%d iterations)\n", result.Status, result.Iterations)
}

Add checkpoint, cost, memory, or any other primitives as needed. See Primitives for the full list.

Model Routing

Generated harnesses read the same model-routing environment variables that the desktop Harness runner sends:

VariablePurpose
HARNESS_MODELDefault model for every phase
HARNESS_PLAN_MODELModel for planner work
HARNESS_IMPLEMENTATION_MODELModel for execute/refactor work
HARNESS_SKILLS_MODELModel for review or skill execution

If a phase variable is empty, the generated config falls back to HARNESS_MODEL.