Configuration reference

Know which settings are local, committed, generated, and user-owned.

MARS has two configuration layers: machine-local runtime state under ~/.mars/ and target-repo harness configuration under .harness/. This reference shows what each file controls, how it is validated, and what should never be committed.

Configuration Locations

PathScopePurposeCommit?
~/.mars/config.yamlMachineLocal runtime preferences, setup state, installed paths, and optional GitHub auth fallback.No
~/.mars/models/MachineDownloaded GGUF model files and local inference assets.No
~/.mars/db/{repo-name}/mars.dbMachine per targetDefault repo-scoped queue, telemetry, scoring, registry, and job state.No
~/.mars-harness/db/mars.dbMachine sharedLegacy shared default used by mars serve unless --db is set.No
~/.mars/traces/logs/MachineVerbose command logs for run, start, and serve.No
.harness/manifest.yamlTarget repoExecutable roles, domains, modes, tools, triggers, models, trust, guardrails, and routes.Yes
.harness/model-overrides.yamlTarget repoRepo-owned model routing metadata. Stores env var names, not raw secrets.Usually yes
.harness/integrations.example.yamlTarget repoGenerated example for optional integrations.Yes
.harness/integrations.yamlTarget repoOpt-in integration profile and provider settings.Depends on tenant values; local/untracked is often best.
.harness/.env.localTarget repo localIgnored local provider credentials written with owner-only permissions.No
.harness/.env.exampleTarget repoCredential variable names only.Yes

Machine-Local Config

mars setup prepares local state outside repositories. This lets the same installed binary run across many target repos without committing model weights, database files, tokens, or logs.

Initialize or repair local setup

mars setup
mars setup --download
mars doctor --json
mars path setup

setup detects hardware, writes config, installs llama-server assets, downloads eligible models, and can configure shell PATH. Use the Shell Integration Reference for profile targets, reload hints, and completion scripts.

Release access

mars auth github check
mars auth github clear-local

The official release-metadata check is anonymous-first and reports anonymous, authenticated, or unavailable. Only an exact official 401, 403, or 404 may resolve optional credentials and retry the same origin and path once. clear-local removes only the stored config github_token, leaving environment, GitHub CLI and GitHub App credentials, repositories, and remote state unchanged.

Explicit database path

mars start --repo /path/to/repo --db /private/tmp/mars-demo.db
mars serve --db /private/tmp/mars-shared.db

Use --db for separate-state validation runs, demos, or deliberate multi-repo service state. A separate database is not process or filesystem isolation.

Execution Profile Admission

run, start, serve, tools run, and mcp serve default to observer. This operator-selected boundary independently caps manifest and stored trust, blocks shell_exec and all mutating tools, and cannot be enabled from target YAML.

mars run engineer --repo /path/to/repo --dry-run
mars start --repo /path/to/repo \
  --execution-profile host --acknowledge-host-execution

Host execution has the current OS user's filesystem, network, process, keychain, and credential authority and is not containment. Acknowledgement does not upgrade role trust. isolated fails before runtime state until MARS has an enforceable adapter.

Managed child environments

MARS-managed shell, CLI, dependency, Git, MCP, update, and inference subprocesses inherit ordinary variables such as PATH, HOME, temporary-directory, locale, and toolchain/cache settings. Credential-like names and MARS, GitHub, cloud/provider, authorization, SSH, token, secret, password, API-key, private-key, and credential variables are removed by default.

MARS_CHILD_ENV_ALLOWLIST=SSH_AUTH_SOCK,JIRA_API_TOKEN \
  mars serve --execution-profile host --acknowledge-host-execution

MARS_CHILD_ENV_ALLOWLIST is an environment-only, comma- or whitespace-separated owner control. It can restore only explicitly named parent variables, cannot be set by repository or model configuration, and is never propagated to a child. Jira env_passthrough names must also appear in this owner allowlist. Filtering is name-based and does not inspect values; subprocesses still run with the current OS user's authority, so this boundary reduces ambient credential exposure but is not isolation, a secret vault, or containment.

Code Intelligence Config

Code intelligence defaults on through local config and can be overridden per command. MARS resolves --code-intel first, then MARS_CODE_INTEL_ENABLED, then code_intel.enabled. Role runs still need code-intel tools in the manifest before automatic graph context is injected. For full behavior, metrics, and benchmark guidance, open the Code Intelligence Reference.

code_intel:
  enabled: true
mars run engineer --repo /path/to/repo --code-intel false
MARS_CODE_INTEL_ENABLED=true mars start --repo /path/to/repo

Aggregate Telemetry Config

Telemetry is off by default. Users can always inspect local status and preview the exact allowlisted aggregate payload before anything leaves the machine. Sending requires the mode named telemetry.reporting: anonymous and a collector endpoint. The mode name describes payload minimization; it does not make the network transport anonymous, and the collector can observe ordinary request metadata.

telemetry:
  reporting: off
  endpoint: ""
  token: ""
  report_interval: 24h
YAML keyEnvironment overrideUser meaning
telemetry.reportingMARS_TELEMETRY_REPORTINGoff makes mars telemetry send print that no network call was made. anonymous enables sending queued, allowlisted aggregate reports; it is not a transport-anonymity guarantee.
telemetry.endpointMARS_TELEMETRY_ENDPOINTBase collector URL. MARS appends /v1/anonymous-telemetry/reports when sending.
telemetry.tokenMARS_TELEMETRY_TOKENOptional bearer token for the collector request. Treat it like a secret.
telemetry.report_intervalMARS_TELEMETRY_INTERVALLocal reporting interval setting. Default is 24h.

Preview before export or send

mars telemetry status --repo ~/my-project
mars telemetry preview --repo ~/my-project

Preview prints the aggregate payload. Do not send until you understand it.

Use environment overrides for a one-off send

MARS_TELEMETRY_REPORTING=anonymous \
MARS_TELEMETRY_ENDPOINT=http://127.0.0.1:9092 \
mars telemetry send --repo ~/my-project

The request goes to http://127.0.0.1:9092/v1/anonymous-telemetry/reports.

Raw traces, prompts, file contents, repo paths, remotes, and raw errors are not sent in the anonymous aggregate report. For command recipes and privacy boundaries, open the Observability Guide.

.harness/manifest.yaml

The manifest is required for target harness execution. It must have a name and at least one role. New generated manifests use orchestration_mode: dispatch. For exact schema, routing behavior, generated defaults, and manifest errors, open the Bundle And Manifest Reference.

name: my-project
description: Starter autonomous AI pipeline for my-project
orchestration_mode: dispatch

roles:
  engineer:
    prompt: roles/engineer.md
    domain: engineer
    mode: ticket-delivery
    model: coding
    trust_level: contributor
    max_turns: 100
    schedule: "0 0,6,12,18 * * 1-5"
    knowledge: [knowledge/context-glossary.yaml]
    guardrails: [guardrails/safety.yaml]
    tools: [file_read, file_write, shell_exec, mars_cli, grep, docsync_audit, git_status, git_diff, git_commit]
    triggers:
      - ticket.assigned
FieldAllowed or expected valuesUser guidance
nameNon-empty string.Stable bundle name used in logs and jobs.
descriptionString.Human-readable target harness summary.
orchestration_modeEmpty, legacy, or dispatch.Use dispatch for new targets unless preserving a legacy chain deliberately.
rolesMap of role key to role config.Every executable role lives here.
promptPath relative to .harness/.Required for every role.
domainplanner, engineer, reviewer, maintainer, end-to-end-tester, orchestrator.Optional for compatibility, recommended for all active roles.
modeLower-kebab-case purpose.Use names like ticket-delivery or quality-review.
modelfast, reasoning, coding, or model hint.Prefer tier names so routing can adapt to hardware and overrides.
trust_levelobserver, contributor, or autonomous.Progressive role trust only. Start narrow and raise it from evidence; the operator-selected execution profile remains an independent ceiling and target config cannot grant host authority.
toolsTool names from the MARS tool registry.Explicit allowlist. Roles with no tools cannot mutate or inspect through tools.
guardrailsFiles under .harness/.Attach global and role-specific policy.
knowledgeRoute files under .harness/knowledge/.Keep context routed, not stuffed.
triggersEvent expressions or shorthand trigger names.Optional compatibility input for events like failed workflows or stale tickets.
scheduleNamed preset or 5-field cron.Use explicit cron for recurring autonomous roles.
then, idle_thenExisting role keys.Legacy mode only. Dispatch mode routes through Orchestrator.
max_turnsInteger.Caps role conversation turns.
context_sizeInteger token window override.Use sparingly; served model windows and pruning should usually own this.

.harness/model-overrides.yaml

Model overrides let a repo route all roles, a model tier, or one role to a specific local bundle, Ollama model, cloud provider, or OpenAI-compatible endpoint. Role overrides win over tier overrides, which win over the default route.

version: 2
default:
  routing: local
  local_bundle: auto
  reason: Use the best eligible local bundle for this machine.
tiers:
  coding:
    provider: ollama
    model: qwen3.6:27b
    endpoint: http://127.0.0.1:11434/v1
    reason: Local coding experiment.
roles:
  engineer:
    provider: openai-compatible
    model: repo-coder
    endpoint: http://127.0.0.1:8088/v1
    api_key_env: REPO_CODER_API_KEY
    reason: Target-specific coding gateway.
FieldMeaningSafety rule
routingDefault route family, such as local or cloud.Use commands where possible so validation runs.
local_bundleLocal bundle name or auto.auto chooses the highest-ranked eligible bundle.
providerProvider name such as ollama, openai, anthropic, or openai-compatible.Provider support must be backed by adapter tests and docs.
modelProvider model identifier.Ad-hoc candidates do not become defaults without benchmark evidence.
endpointOpenAI-compatible base URL.Use local URLs or trusted gateways; avoid committing tenant-secret endpoints when inappropriate.
api_key_envName of the environment variable containing the credential.Commit env var names only, never raw values.
reasonHuman-readable rationale.Explain why the override exists and when to remove it.
mars models override --repo /path/to/repo --tier coding --provider ollama --model qwen3.6:27b
mars models override --repo /path/to/repo --role engineer --provider openai-compatible --endpoint http://127.0.0.1:8088/v1 --model repo-coder
mars models credentials write-local-env --repo /path/to/repo --api-key-env OPENAI_API_KEY

Use the Authentication And Credentials Reference for provider key storage, env-var naming, and secret-scanning rules.

.harness/integrations.yaml

Integrations are optional and default off. Generated targets receive .harness/integrations.example.yaml, but MARS never writes .harness/integrations.yaml by default. Missing config, empty profile, or unknown profile normalizes to ceo-led.

version: 1
flow_profile: board-driven

ingestion:
  jira:
    enabled: true
    provider: atlassian_mcp
    base_url_env: JIRA_SITE_URL
    auth:
      email_env: JIRA_EMAIL
      api_token_env: JIRA_API_TOKEN
      bearer_token_env: JIRA_BEARER_TOKEN
    webhook_secret_env: JIRA_WEBHOOK_SECRET
    poll_interval: 60s
    jql: project = DEMO AND labels = example-required-label
    project_repo_map:
      - { project: DEMO, repo: greaveselliott/example-target }
    scope:
      allowed_workspaces_env: JIRA_ALLOWED_WORKSPACES
      required_labels: [example-required-label]
      board_id_env: JIRA_BOARD_ID
    prioritisation:
      scope: active_sprint
      ready_statuses: ["To Do", "Ready for Dev", "Selected for Development"]
      order: [priority, rank, age]
      respect_blocked_by: true

design_sources:
  figma:
    enabled: false
    token_env: FIGMA_TOKEN

delivery:
  enabled: false
  mode: trunk
  branch_pattern: "mars/{ticket}-{slug}"
  min_trust: contributor
SectionPurposeContainment rule
flow_profileceo-led or board-driven.Board-driven behavior is never inferred from partial config.
ingestion.jiraJIRA webhook and polling mirror config.Requires explicit enablement, repo mapping, and scope gates before ticket writes.
authNames credential environment variables.Never store token values.
mcpOptional Atlassian MCP endpoint and proxy settings.MCP sessions are job-scoped and cleaned up after sync.
scopeAllowed workspaces, board ID, labels, and field indirection.Drops unmapped or out-of-scope issues instead of widening intake.
design_sources.figmaFuture bounded design context.Token env var name only.
deliveryTrunk or future pull-request delivery settings.Pull-request behavior must be explicitly gated and trust-bounded.

Guardrails

Guardrails are YAML policies referenced from manifest roles. Hard rules block operations; advisory rules appear in role context. For full field defaults, matching semantics, secret scanning, git hooks, and troubleshooting, open the Guardrails Reference.

rules:
  - id: no-hardcoded-secrets
    name: No hardcoded secrets
    severity: hard
    scope: global
    pattern: '(?i)(password|secret|api_key|token)\s*[:=]\s*["''][^"'']{8,}'
    message: Do not hardcode secrets. Use environment variables or a secrets manager.
    stale_days: -1

Keep guardrail messages actionable. A blocked role should know what went wrong and what safe remediation command or file change to use.

Knowledge Routes And Skills

Knowledge routes point roles at durable docs. Skills teach recurring procedures. Neither grants authority; tools, trust, and guardrails still come from the manifest and runtime policy.

Knowledge route

routes:
  - when: release planning, semantic versioning, changelog, patch notes, or tags
    paths: VERSION, CHANGELOG.md, docs/design-docs/release-versioning.md

Skill file

---
name: self-improvement
scope: all
---

# Self-Improvement Skill

Use this when a repeated failure suggests the harness should improve itself.

Add routes when context is missing. Add skills when a repeatable workflow should be taught compactly. Add tools only when a repeated deterministic action needs code, validation, and policy.

Secrets And Local Values

NeedUseDo not use
Optional GitHub release authGH_TOKEN, GITHUB_TOKEN, GitHub CLI auth, or owner-only local config for private forks or rate-limit fallback.Committed tokens, ticket text, chat, logs, or traces.
Cloud model keyapi_key_env plus process environment or ignored .harness/.env.local.Raw API keys in model-overrides.yaml.
JIRA authEnv var names such as JIRA_EMAIL, JIRA_API_TOKEN, and JIRA_BEARER_TOKEN.Committed auth values or broad unscoped JQL.
Tenant-specific IDsEnv var indirection for cloud ID, board ID, field IDs, and workspace URLs.Hardcoded instance-specific constants in Go or generated defaults.
Local experiment endpointLocal ignored config or explicit CLI flags.Committed private endpoints if they identify an internal tenant.

Validation Commands

ChangeMinimum user validation
Manifest role, tool, trigger, or registry changemars doctor --repo ., relevant mars run role --dry-run, and role-registry review.
Model overridemars models evaluate for candidates where possible, mars doctor --repo ., and a dry run against the affected role.
Integration configConfig parse through the command using it, no-config smoke, and scoped provider validation when enabled.
Guardrail rulemars guardrails secret-scan --repo . and a representative role dry run or blocked-write check.
Knowledge routeRole dry run to inspect assembled route hints.
Docs or source DocSync metadatamars docsync audit --repo . and docs-consistency tests where available.
mars doctor --repo .
mars run engineer --repo . --dry-run
mars docsync audit --repo .
go test ./internal/docsconsistency ./internal/docsync

Troubleshooting

SymptomLikely causeRecovery
missing .harness/manifest.yamlObserver run/start requires an initialized target.Run mars init --repo /path/to/repo deliberately, or use the explicit run --dry-run --no-init no-write preview.
Invalid orchestration_modeManifest value is not empty, legacy, or dispatch.Set orchestration_mode: dispatch unless preserving legacy chains.
Role chain points to missing rolethen or idle_then references an unknown key.Correct the role key or move to dispatch mode.
Cloud model auth failsapi_key_env is missing from the process environment.Export the named variable or write ignored local credentials with mars models credentials write-local-env.
Board-driven config appears ignoredProfile is missing, invalid, or left at ceo-led.Set flow_profile: board-driven and enable the relevant integration section.
JIRA tickets are not mirroredProject mapping, workspace, board, label, or JQL containment rejected the issue.Check sanitized logs and tighten config deliberately; do not widen scope by accident.
Secret scan blocks a fileHard guardrail matched committed content.Move the secret to environment or ignored local config and rerun the scan.