Skip to content

Configuration

tmux Theme

The theme lives in tmux/tmux.conf. It uses a dark blue-gray background with cyan accents.

Color Palette

ElementColorHex
BackgroundDark blue-gray#1a1a2e
ForegroundWarm gray#a8a8b0
Accent (active borders, highlights)Cyan#00d4ff
SecondaryBlue#0066ff
TertiaryPurple#7c3aed
Inactive bordersMuted indigo#333355
Inactive elementsZinc#71717a
Active pane backgroundLifted dark#1e1e34

Visual Features (v2.1.0)

Role-Colored Pane Borders — active pane border color reflects the agent role:

RoleColorHex
BuilderBlue#0066ff
ReviewerOrange#f59e0b
TesterYellow#eab308
OptimizerPurple#7c3aed
SecurityRed#ef4444
DocsGreen#4ade80

Pipeline Stage Badge — the status bar shows a live pipeline stage indicator (⚙ BUILD, ⚡ TEST, ↑ PR) with stage-specific colors.

Agent Count Widget — displays λN in the status bar showing the count of active agents from heartbeat files.

Active Pane Lift — subtle background depth effect distinguishes the active pane from inactive panes.

To customize colors, edit the hex values in tmux/tmux.conf and reload with prefix + r.

Keybindings

The prefix key is Ctrl-a (remapped from the default Ctrl-b).

General

KeyAction
prefix + rReload tmux config
prefix + |Split pane vertically
prefix + -Split pane horizontally
prefix + cNew window
prefix + xKill pane (with confirmation)
prefix + XKill window (with confirmation)
prefix + sChoose session (tree view)
prefix + NNew session

Pane Navigation (vim-style)

KeyAction
prefix + h/j/k/lMove between panes
Ctrl + h/j/k/lSmart pane switching (vim-tmux-navigator)
prefix + H/J/K/LResize pane (repeatable)

Agent Teams

KeyAction
prefix + TLaunch team session
prefix + Ctrl-tShow team status dashboard
prefix + gDisplay pane numbers
prefix + GToggle zoom on current pane
prefix + SToggle synchronized panes
prefix + M-tToggle team sync mode
prefix + M-1Layout: main-horizontal (leader 65% left)
prefix + M-2Layout: main-vertical (leader 60% top)
prefix + M-3Layout: tiled (equal sizes)
prefix + M-sCapture current pane scrollback
prefix + M-aCapture all panes in window
prefix + RReap dead panes (one-shot cleanup)

Copy Mode (vi-style)

KeyAction
vBegin selection
yCopy selection
rToggle rectangle mode
prefix + pPaste buffer

Claude Code Settings

The claude-code/settings.json.template configures Claude Code for agent teams.

Key Settings

SettingDefaultDescription
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS"1"Enable agent teams (required)
CLAUDE_CODE_AUTOCOMPACT_PCT_OVERRIDE"70"Context compaction threshold
CLAUDE_CODE_SUBAGENT_MODEL"haiku"Model for subagent lookups
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY"5"Parallel tool calls per agent

Installation

  1. Copy the template: cp claude-code/settings.json.template ~/.claude/settings.json
  2. Customize the enabledPlugins section
  3. Adjust environment variables as needed

Hooks

Hooks are shell scripts that run on Claude Code lifecycle events.

Included Hooks

HookEventWhat It Does
teammate-idle.shTeammateIdleRuns typecheck — blocks idle until errors are fixed
task-completed.shTaskCompletedRuns lint + test — blocks completion until quality passes
notify-idle.shNotificationDesktop alert when agents need attention
pre-compact-save.shPreCompactSaves git context before compaction

Installing Hooks

Terminal window
# Copy hooks to Claude Code hooks directory
cp claude-code/hooks/*.sh ~/.claude/hooks/
chmod +x ~/.claude/hooks/*.sh

Then wire them up in ~/.claude/settings.json:

{
"hooks": {
"teammate-idle": {
"command": "~/.claude/hooks/teammate-idle.sh",
"timeout": 30000
}
}
}

Writing Custom Hooks

Quality gate hooks use exit codes to control behavior:

Exit CodeMeaning
0Pass — agent continues normally
2Block — agent must fix the issue before proceeding
OtherError — logged but doesn’t block

Example lint check hook:

#!/usr/bin/env bash
cd "$(find_project_root)" || exit 0
pnpm lint 2>&1 || {
echo "::error::Lint errors found. Fix them before going idle."
exit 2
}
exit 0

Daemon Intelligence Configuration

The daemon configuration file at .claude/daemon-config.json controls all daemon intelligence features. Generate it with shipwright daemon init.

Core Settings

FieldDefaultDescription
watch_label"ready-to-build"GitHub label to watch for
poll_interval60Seconds between polls
max_parallel2Maximum concurrent pipeline jobs
pipeline_template"autonomous"Default pipeline template
base_branch"main"Branch to create worktrees from
model"opus"Default Claude model
skip_gatestrueAuto-approve all gates

Adaptive Template Selection

Automatically selects the best pipeline template based on issue labels and triage score.

FieldDefaultDescription
auto_templatefalseEnable adaptive template selection
template_map{}Regex-based template overrides (label pattern → template name)

When auto_template is enabled, template selection uses this priority:

  1. Label overrideshotfix/incident → hotfix template, security → enterprise
  2. template_map overrides — regex patterns matched against issue labels
  3. Score-based — score ≥ 70 → fast, ≥ 40 → standard, below → full
{
"auto_template": true,
"template_map": {
"hotfix|incident": "hotfix",
"security": "enterprise"
}
}

Auto-Retry with Escalation

Automatically retries failed pipelines with optional model/template escalation.

FieldDefaultDescription
max_retries2Maximum retry attempts per issue
retry_escalationtrueEscalate model/template on retry

Self-Optimizing Metrics

Automatically tunes daemon parameters based on DORA metric thresholds.

FieldDefaultDescription
self_optimizefalseEnable self-optimizing loop
optimize_interval10Poll cycles between optimization checks

Self-optimization adjustments:

  • CFR > 40% — switches to full template
  • CFR > 20% — enables compound quality
  • Lead time > 4hrs — increases max_parallel, halves poll_interval
  • Lead time > 2hrs — enables auto_template
  • Deploy freq < 1/day — recommends merge stage
  • MTTR > 2hrs — recommends auto-rollback

Priority Lanes

Allows critical issues to bypass the normal queue and get processed immediately.

FieldDefaultDescription
priority_lanefalseEnable priority bypass queue
priority_lane_labels"hotfix,incident,p0,urgent"Labels that trigger priority lane
priority_lane_max1Maximum extra slots for priority issues

Org-Wide Mode

Watch issues across all repositories in a GitHub organization.

FieldDefaultDescription
watch_mode"repo""repo" for single repo, "org" for org-wide
orgnullGitHub organization name (required for org mode)
repo_filternullRegex filter for repository names (e.g. "api-.*|web-.*")

Patrol Settings

Proactive codebase scanning during quiet periods.

FieldDefaultDescription
patrol.interval3600Seconds between patrol runs
patrol.max_issues5Maximum issues to create per patrol
patrol.label"auto-patrol"Label applied to patrol-created issues

Degradation Alerting

Monitors pipeline success rates and alerts on quality declines.

FieldDefaultDescription
alerts.degradation_window5Number of recent pipelines to evaluate
alerts.cfr_threshold30Change failure rate (%) that triggers alert
alerts.success_threshold50Success rate (%) below which an alert fires

Health Monitoring

FieldDefaultDescription
health.stale_timeout_s1800Seconds before a job is considered stale

Lifecycle Hooks

FieldDefaultDescription
on_success.remove_label"ready-to-build"Label to remove on success
on_success.add_label"pipeline/complete"Label to add on success
on_success.close_issuefalseClose issue on success
on_failure.add_label"pipeline/failed"Label to add on failure
on_failure.comment_log_lines50Log lines to include in failure comment

Notifications

FieldDefaultDescription
notifications.slack_webhooknullSlack webhook URL for alerts

Full Example

{
"watch_label": "ready-to-build",
"poll_interval": 60,
"max_parallel": 2,
"pipeline_template": "autonomous",
"base_branch": "main",
"model": "opus",
"skip_gates": true,
"auto_template": true,
"template_map": {
"hotfix|incident": "hotfix",
"security": "enterprise"
},
"max_retries": 2,
"retry_escalation": true,
"self_optimize": true,
"optimize_interval": 10,
"priority_lane": true,
"priority_lane_labels": "hotfix,incident,p0,urgent",
"priority_lane_max": 1,
"watch_mode": "repo",
"org": null,
"repo_filter": null,
"patrol": {
"interval": 3600,
"max_issues": 5,
"label": "auto-patrol"
},
"alerts": {
"degradation_window": 5,
"cfr_threshold": 30,
"success_threshold": 50
},
"health": {
"stale_timeout_s": 1800
},
"on_success": {
"remove_label": "ready-to-build",
"add_label": "pipeline/complete",
"close_issue": false
},
"on_failure": {
"add_label": "pipeline/failed",
"comment_log_lines": 50
},
"notifications": {
"slack_webhook": null
}
}

Intelligence Configuration

The intelligence layer adds semantic codebase analysis, predictive risk assessment, and self-optimization to the daemon. All intelligence features are optional and configured in the intelligence section of .claude/daemon-config.json.

Core Intelligence Settings

FieldDefaultDescription
intelligence.enabledautoMaster switch: auto enables when Claude CLI is available; true/false to override
intelligence.cache_ttl_seconds3600Cache duration for intelligence responses (prevents re-analyzing the same issue)

Intelligence Feature Flags

FieldDefaultDescription
intelligence.composer_enabledfalseEnable dynamic pipeline composition (replaces static template selection)
intelligence.optimization_enabledfalseEnable self-optimization (outcome analysis, template tuning, model A/B testing)
intelligence.prediction_enabledfalseEnable predictive analytics (risk assessment, anomaly detection, AI patrol)
intelligence.adversarial_enabledfalseEnable adversarial code review (red-team review after primary agent)
intelligence.simulation_enabledfalseEnable developer simulation (simulated PR review with multiple personas)
intelligence.architecture_enabledfalseEnable architecture enforcer (living architectural model and validation)

Intelligence Tuning Parameters

FieldDefaultDescription
intelligence.ab_test_ratio0.1Fraction of runs using composed pipelines for A/B testing
intelligence.anomaly_threshold3.0Standard deviations for anomaly detection

All intelligence features degrade gracefully when disabled or when Claude API calls fail. The system falls back to existing static behavior.

Auto-Scaling Configuration

The daemon supports resource-aware dynamic worker scaling based on system capacity and budget.

FieldDefaultDescription
auto_scalefalseEnable resource-aware dynamic worker scaling
auto_scale_interval5Seconds between scale checks
max_workers8Maximum workers the auto-scaler can allocate
min_workers1Minimum workers (floor)
worker_mem_gb4Memory per worker for capacity calculation
estimated_cost_per_job_usd5.0Cost estimate per job for budget-based scaling

Scaling factors (takes the minimum):

  • CPU: 75% of system cores
  • Memory: available GB / worker_mem_gb
  • Budget: remaining daily budget / estimated_cost_per_job_usd
  • Queue: current demand (active + queued issues)

Worker Pool Configuration

For fleet operations, distribute workers across multiple repositories.

FieldDefaultDescription
worker_pool.enabledfalseEnable shared worker pool across fleet repos
worker_pool.total_workers12Total workers to distribute across repos
worker_pool.rebalance_interval_seconds120Seconds between rebalance cycles

When enabled, the fleet rebalancer runs in the background and redistributes workers every N seconds. Repos with more queued issues get more workers. Each repo always gets at least 1 worker.

Fleet Configuration

The fleet configuration file at .claude/fleet-config.json manages multi-repo daemon orchestration. Generate it with shipwright fleet init.

{
"repos": [
{ "path": "/path/to/api", "template": "autonomous", "max_parallel": 2 },
{ "path": "/path/to/web", "template": "standard" }
],
"defaults": {
"watch_label": "ready-to-build",
"pipeline_template": "autonomous",
"max_parallel": 2,
"model": "opus"
},
"shared_events": true
}

Repo-Level Overrides

Each entry in the repos array can override the fleet defaults:

FieldDefaultDescription
pathRequired. Absolute path to the repository
templatedefaults.pipeline_templatePipeline template override
max_paralleldefaults.max_parallelMax concurrent pipelines for this repo
watch_labeldefaults.watch_labelLabel override for this repo
modeldefaults.modelModel override for this repo

Fleet Defaults

FieldDefaultDescription
defaults.watch_label"ready-to-build"Default issue label to watch
defaults.pipeline_template"autonomous"Default pipeline template
defaults.max_parallel2Default max concurrent pipelines
defaults.model"opus"Default Claude model
shared_eventstrueShare events.jsonl across repos

Deploy Configuration

Deploy configuration is set up via shipwright init --deploy or by using the deployed pipeline template. Deploy adapters live in scripts/adapters/.

Available deploy adapters:

AdapterFileDescription
Verceladapters/vercel-deploy.shVercel deployment
Fly.ioadapters/fly-deploy.shFly.io deployment
Railwayadapters/railway-deploy.shRailway deployment
Dockeradapters/docker-deploy.shDocker-based deployment

The deployed pipeline template uses placeholder commands (__STAGING_CMD__, __PRODUCTION_CMD__, __ROLLBACK_CMD__, __SMOKE_CMD__, __HEALTH_URL__) that are replaced during shipwright init --deploy.

Environment Variables

VariableDefaultDescription
CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMSRequired. Enables agent teams
CLAUDE_CODE_SUBAGENT_MODELparent modelModel for subagent lookups ("haiku" recommended)
CLAUDE_CODE_AUTOCOMPACT_PCT_OVERRIDE"80"Context compaction threshold (lower = more aggressive)
CLAUDE_CODE_MAX_TOOL_USE_CONCURRENCY"3"Parallel tool calls per agent
SHIPWRIGHT_WEBHOOK_URLCustom webhook URL for pipeline notifications

tmux Plugins (TPM)

After installation, press prefix + I to install plugins.

PluginKeyWhat It Does
tmux-fingersprefix + FVimium-style copy hints for URLs, paths, hashes
tmux-fzf-urlprefix + uFuzzy-find and open URLs
tmux-fzfF5Fuzzy finder for sessions, windows, panes
extraktoprefix + tabExtract and copy text from pane output
tmux-resurrectautoSave and restore sessions across restarts
tmux-continuumautoAutomatic continuous session saving