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
| Path | Scope | Purpose | Commit? |
~/.mars/config.yaml | Machine | Local runtime preferences, setup state, installed paths, and optional GitHub auth fallback. | No |
~/.mars/models/ | Machine | Downloaded GGUF model files and local inference assets. | No |
~/.mars/db/{repo-name}/mars.db | Machine per target | Default repo-scoped queue, telemetry, scoring, registry, and job state. | No |
~/.mars-harness/db/mars.db | Machine shared | Legacy shared default used by mars serve unless --db is set. | No |
~/.mars/traces/logs/ | Machine | Verbose command logs for run, start, and serve. | No |
.harness/manifest.yaml | Target repo | Executable roles, domains, modes, tools, triggers, models, trust, guardrails, and routes. | Yes |
.harness/model-overrides.yaml | Target repo | Repo-owned model routing metadata. Stores env var names, not raw secrets. | Usually yes |
.harness/integrations.example.yaml | Target repo | Generated example for optional integrations. | Yes |
.harness/integrations.yaml | Target repo | Opt-in integration profile and provider settings. | Depends on tenant values; local/untracked is often best. |
.harness/.env.local | Target repo local | Ignored local provider credentials written with owner-only permissions. | No |
.harness/.env.example | Target repo | Credential 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 key | Environment override | User meaning |
telemetry.reporting | MARS_TELEMETRY_REPORTING | off 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.endpoint | MARS_TELEMETRY_ENDPOINT | Base collector URL. MARS appends /v1/anonymous-telemetry/reports when sending. |
telemetry.token | MARS_TELEMETRY_TOKEN | Optional bearer token for the collector request. Treat it like a secret. |
telemetry.report_interval | MARS_TELEMETRY_INTERVAL | Local 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
| Field | Allowed or expected values | User guidance |
name | Non-empty string. | Stable bundle name used in logs and jobs. |
description | String. | Human-readable target harness summary. |
orchestration_mode | Empty, legacy, or dispatch. | Use dispatch for new targets unless preserving a legacy chain deliberately. |
roles | Map of role key to role config. | Every executable role lives here. |
prompt | Path relative to .harness/. | Required for every role. |
domain | planner, engineer, reviewer, maintainer, end-to-end-tester, orchestrator. | Optional for compatibility, recommended for all active roles. |
mode | Lower-kebab-case purpose. | Use names like ticket-delivery or quality-review. |
model | fast, reasoning, coding, or model hint. | Prefer tier names so routing can adapt to hardware and overrides. |
trust_level | observer, 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. |
tools | Tool names from the MARS tool registry. | Explicit allowlist. Roles with no tools cannot mutate or inspect through tools. |
guardrails | Files under .harness/. | Attach global and role-specific policy. |
knowledge | Route files under .harness/knowledge/. | Keep context routed, not stuffed. |
triggers | Event expressions or shorthand trigger names. | Optional compatibility input for events like failed workflows or stale tickets. |
schedule | Named preset or 5-field cron. | Use explicit cron for recurring autonomous roles. |
then, idle_then | Existing role keys. | Legacy mode only. Dispatch mode routes through Orchestrator. |
max_turns | Integer. | Caps role conversation turns. |
context_size | Integer 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.
| Field | Meaning | Safety rule |
routing | Default route family, such as local or cloud. | Use commands where possible so validation runs. |
local_bundle | Local bundle name or auto. | auto chooses the highest-ranked eligible bundle. |
provider | Provider name such as ollama, openai, anthropic, or openai-compatible. | Provider support must be backed by adapter tests and docs. |
model | Provider model identifier. | Ad-hoc candidates do not become defaults without benchmark evidence. |
endpoint | OpenAI-compatible base URL. | Use local URLs or trusted gateways; avoid committing tenant-secret endpoints when inappropriate. |
api_key_env | Name of the environment variable containing the credential. | Commit env var names only, never raw values. |
reason | Human-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
| Section | Purpose | Containment rule |
flow_profile | ceo-led or board-driven. | Board-driven behavior is never inferred from partial config. |
ingestion.jira | JIRA webhook and polling mirror config. | Requires explicit enablement, repo mapping, and scope gates before ticket writes. |
auth | Names credential environment variables. | Never store token values. |
mcp | Optional Atlassian MCP endpoint and proxy settings. | MCP sessions are job-scoped and cleaned up after sync. |
scope | Allowed workspaces, board ID, labels, and field indirection. | Drops unmapped or out-of-scope issues instead of widening intake. |
design_sources.figma | Future bounded design context. | Token env var name only. |
delivery | Trunk 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
| Need | Use | Do not use |
| Optional GitHub release auth | GH_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 key | api_key_env plus process environment or ignored .harness/.env.local. | Raw API keys in model-overrides.yaml. |
| JIRA auth | Env var names such as JIRA_EMAIL, JIRA_API_TOKEN, and JIRA_BEARER_TOKEN. | Committed auth values or broad unscoped JQL. |
| Tenant-specific IDs | Env var indirection for cloud ID, board ID, field IDs, and workspace URLs. | Hardcoded instance-specific constants in Go or generated defaults. |
| Local experiment endpoint | Local ignored config or explicit CLI flags. | Committed private endpoints if they identify an internal tenant. |
Validation Commands
| Change | Minimum user validation |
| Manifest role, tool, trigger, or registry change | mars doctor --repo ., relevant mars run role --dry-run, and role-registry review. |
| Model override | mars models evaluate for candidates where possible, mars doctor --repo ., and a dry run against the affected role. |
| Integration config | Config parse through the command using it, no-config smoke, and scoped provider validation when enabled. |
| Guardrail rule | mars guardrails secret-scan --repo . and a representative role dry run or blocked-write check. |
| Knowledge route | Role dry run to inspect assembled route hints. |
| Docs or source DocSync metadata | mars 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
| Symptom | Likely cause | Recovery |
missing .harness/manifest.yaml | Observer 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_mode | Manifest value is not empty, legacy, or dispatch. | Set orchestration_mode: dispatch unless preserving legacy chains. |
| Role chain points to missing role | then or idle_then references an unknown key. | Correct the role key or move to dispatch mode. |
| Cloud model auth fails | api_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 ignored | Profile is missing, invalid, or left at ceo-led. | Set flow_profile: board-driven and enable the relevant integration section. |
| JIRA tickets are not mirrored | Project 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 file | Hard guardrail matched committed content. | Move the secret to environment or ignored local config and rerun the scan. |