Harbourmaster configuration
Harbourmaster uses TypeScript model defaults, bundled OpenCode configuration, and environment overrides. The GitHub Action maps its inputs to environment variables before it starts the CLI. Harbourmaster does not read repository YAML configuration.
Precedence
Model routes use this order, from highest to lowest precedence:
- The environment override for the selected tier.
- The general
HARBOURMASTER_BEDROCK_MODELoverride. - The TypeScript defaults.
Model defaults
Use a provider/model-id value for each model. Change per-agent rules, fallback
lists, provider availability, and optional cost metadata in the TypeScript model
configuration when necessary.
| Key | Default |
|---|---|
fast_review | amazon-bedrock/harbourmaster-gpt-5-6-luna-medium |
deep_review | amazon-bedrock/harbourmaster-gpt-5-6-luna-extra-high |
editor | amazon-bedrock/harbourmaster-gpt-5-6-terra-medium |
fallback | amazon-bedrock/harbourmaster-gpt-5-6-terra-medium |
Fast specialist routes use GPT-5.6 Luna with medium reasoning effort, while deep
specialist routes use Luna with extra-high (xhigh) reasoning effort. The
editor, fallback, and adversarial verifier use GPT-5.6 Terra with medium
reasoning effort by default. The code-quality route uses GPT-5.6 Sol with low
reasoning effort, also called Sol Light. A tier override can select another
configured model when needed.
The default fast, deep, and editor fallback is the bundled GPT-5.6 Terra medium model. The fallback tier has no additional fallback.
Model environment variables
| Variable | Effect |
|---|---|
HARBOURMASTER_BEDROCK_MODEL | Default override for every tier. |
HARBOURMASTER_FAST_REVIEW_MODEL | Overrides fast_review; takes precedence over the all-tier override. |
HARBOURMASTER_DEEP_REVIEW_MODEL | Overrides deep_review; takes precedence over the all-tier override. |
HARBOURMASTER_EDITOR_MODEL | Overrides editor; takes precedence over the all-tier override. |
HARBOURMASTER_FALLBACK_MODEL | Overrides fallback; takes precedence over the all-tier override. |
Empty values are ignored.
Bundled OpenCode configuration
The shared action always sets OPENCODE_CONFIG_PATH to Harbourmaster's bundled
.opencode directory. Consumer-owned .opencode content is review context and
is not executed.
The bundled runtime defines the editor, adversarial verifier, and specialist
agents. For each attempt Harbourmaster creates an isolated temporary diff
directory with reviewable patches. Before OpenCode starts, the trusted runner
writes ./review-index.json, ./shared-pr-context.txt, and
./review-discussion.txt. It also copies the root reference paths AGENTS.md,
.agents/, and docs/ when the checkout contains them. OpenCode starts in this
directory with the trusted bundled configuration. Specialist and verifier
prompts refer to the three review files, ./patches/, and the staged reference
paths.
The review workspace files have these roles:
| File | Contents |
|---|---|
review-index.json | Trusted repository root, exact base and head, changed paths, previous paths, statuses, patch paths, and per-hunk base, head, and patch-line ranges. A missing patch path is null. |
shared-pr-context.txt | Pull request facts, change analysis, diff filtering, and known uncertainties. |
review-discussion.txt | Loaded review threads, existing discussion, and trusted lifecycle identifiers for prior findings. |
The editor receives the publication and lifecycle context inline. It invokes
spawn_reviewers directly after it reads the prior discussion. It cannot write
or copy the review workspace files.
Specialists and the verifier can use only read, glob, grep, list, and
read_more. Each result page contains at most 200 lines from read output, or
30 lines from glob, grep, and list output. Each page, including its
continuation notice, has a 48 KiB limit. The read_more tool accepts a cursor
from the previous page in the same session. A cursor works once. The runtime
retains at most 128 results, each with at most 64 KiB of UTF-8 text. It discards
the oldest cursor when it reaches this count. A notice identifies results that
exceed the retention limit. The cursor can return only the retained prefix. If
OpenCode truncates a result first, the cursor cannot recover the omitted text.
Use supported file offsets or a narrower query.
The code-quality reviewer also receives the absolute canonical checkout root in
its prompt. A per-run permission override grants this reviewer
external_directory access to that checkout root. The reviewer can inspect the
checkout alongside the staged diff. All other external-directory access remains
denied, so other specialists and the verifier can inspect only the diff
directory. A trusted hook canonicalizes paths for the repository tools and
rejects symlink escapes. It also rejects .git paths and symlink aliases to Git
metadata. The same guard applies when the runner copies reference files.
Before the editor's first model call, a runtime preflight verifies that OpenCode
registered spawn_reviewers and publish_review and that the editor
configuration allows both. Missing access fails the run before specialists are
started.
The default provider is Amazon Bedrock in us-east-1. The Terra alias resolves
to openai.gpt-5.6-terra with medium reasoning effort. The Luna alias resolves
to openai.gpt-5.6-luna with medium or extra-high (xhigh) reasoning effort.
The code-quality reviewer uses the Sol alias. It resolves to
openai.gpt-5.6-sol with low reasoning effort. These models use the
bedrock-mantle endpoint. The GitHub Actions IAM role must allow these Bedrock
Mantle calls: bedrock-mantle:CreateInference, bedrock-mantle:GetProject, and
bedrock-mantle:ListProjects.
Runtime environment
| Variable | Description |
|---|---|
AWS_REGION, AWS_DEFAULT_REGION | Fixed Bedrock region: us-east-1. |
AWS_PROFILE | Optional named AWS profile for self-hosted runners. |
AWS_BEARER_TOKEN_BEDROCK | Optional Bedrock bearer credential. |
AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN | Standard AWS credential-chain values. |
OPENCODE_COMMAND | OpenCode executable override. |
HARBOURMASTER_OPENCODE_SERVER_START_TIMEOUT_MS | OpenCode server startup timeout in milliseconds; default 30000. |
HARBOURMASTER_STRICT_RUNTIME | Enables strict runtime failure behavior when set to true. |
GitHub-hosted action runs normally use aws_role_to_assume and GitHub OIDC
instead of long-lived AWS credentials.
Review-thread loading, specialist selection, and publication lifecycle rules are in the review behavior reference.