Task guide

Run MARS from install to daily operations.

These workflows describe what users actually do: install the command, prepare local inference, bootstrap a target repo, inspect agent context safely, run roles, review the work they leave behind, operate the dashboard, choose models, update surfaces, release changes, and recover from common failures.

Reader action: use this page for day-to-day jobs. If you need source-of-truth records, open the documentation map; if you need approval, ownership, or guardrail context, open security and governance.

Install From Source

  1. Clone the repository

    git clone https://github.com/greaveselliott/MARS.git
    cd MARS
  2. Install the command

    make install
    mars version

    make install installs the current checkout and runs shell PATH setup through the installed binary.

  3. Prepare local inference

    mars setup
    mars doctor

    Ordinary setup requires no GitHub credential; authenticated release access remains optional.

Avoid stale binaries: Do not use go build ./cmd/mars; ./mars .... Prefer make install or go build -o build/mars ./cmd/mars.

Bootstrap Your First Target Repository

  1. Choose a separate git checkout

    The target project is the repo MARS will manage. Do not point ordinary autonomous runs at the MARS source repo.

  2. Initialize the deployed harness

    mars init --repo ~/my-project

    This writes .harness/, AGENTS.md, goals, feature contracts, tickets, plans, release files, and guidance docs.

  3. Review generated ownership

    After init, role prompts, manifests, guardrails, knowledge routes, tickets, and docs are target-owned. Edit them deliberately.

  4. Run a health check

    mars doctor --repo ~/my-project --json

Inspect Before You Let Agents Mutate

Preview a role prompt

mars run engineer --repo ~/my-project --dry-run

Dry-run mode prints assembled context and exits before calling the model.

Inspect an uninitialized repo

mars run engineer --repo ~/legacy-project --dry-run --no-init

--no-init prevents automatic harness scaffolding.

List tools without mutation

mars tools list --json
mars mcp serve --repo ~/my-project --trust observer

Run Agents And The Autonomous Loop

Manual role run

mars run engineer --repo ~/my-project --execution-profile host --acknowledge-host-execution
mars run qa --repo ~/my-project --debug --execution-profile host --acknowledge-host-execution

Use run for one role, one repo, one bounded job.

Single-repo lifecycle

mars start --repo ~/my-project --execution-profile host --acknowledge-host-execution

Use acknowledged-host start for the autonomous path: init if missing, register, reconcile, seed, serve dashboard/control APIs, and run the repo pipeline.

Multi-repo daemon

mars register --repo ~/my-project --remote owner/repo
mars serve --addr 127.0.0.1:9091 --concurrency 2 --execution-profile host --acknowledge-host-execution

Use serve when you want a persistent orchestrator for registered repositories.

run, start, serve, tools run, and mcp serve default to observer, which independently caps trust and blocks every mutator. Host has current-user authority and is not containment; isolated is unavailable.

Control Keys

KeyActionResult
pPause or resumeRunning jobs finish; no new jobs are claimed while paused.
rWarm restartReloads manifests and triggers without killing HTTP.
sScanScans registered repos and can create findings/tickets.
qStopGraceful shutdown through the normal cancellation path.
hHelpShows terminal control help.

Review And Accept Agent Work

After mars run, mars start, or mars serve has touched a target repo, treat the result like a developer handoff. MARS can prepare changes and evidence, but you decide what is accepted into the target history.

  1. Stop new work while you review

    # In the running MARS terminal
    p
    
    # Or through the authenticated local dashboard
    # Log in, then choose Pause.

    Paused workers finish any running job, then claim no new jobs. Use this before reviewing a busy repo.

  2. Check MARS health and the target state

    mars doctor --repo ~/my-project --json
    git -C ~/my-project status --short --branch
    git -C ~/my-project diff --stat

    Start with the health report and the git diff. If either looks surprising, investigate before running more agents.

  3. Read the evidence, not just the summary

    git -C ~/my-project diff
    find ~/my-project/docs/tickets -maxdepth 2 -type f | sort
    find ~/my-project/docs/features -maxdepth 1 -type f | sort

    Check the code, tickets, feature contracts, plans, docs, traces, and dashboard state that support the claim.

  4. Run the target checks

    mars checks run --repo ~/my-project --name test -- go test ./...
    mars scores export --repo ~/my-project --window-days 30

    Use the target's real build, test, lint, or smoke command. Refresh the quality score only when the recorded evidence supports it.

  5. Choose the outcome

    OutcomeWhat to doWhen to use it
    AcceptCommit the target-owned code, docs, and evidence together.The diff matches the request and checks pass.
    RepairCreate or update a bounded ticket with the failing evidence, then run the right role again.The direction is useful but incomplete or failing.
    RejectDiscard only the output you have reviewed and chosen not to keep.The work is off-goal, unsafe, or not worth repairing.
  6. Version accepted target changes

    mars release notes --repo ~/my-project --bump auto
    mars release backfill-notes --repo ~/my-project --check
    git -C ~/my-project status --short

    Generate release notes after accepted semantic changes, not after a rejected experiment.

Keep chat summaries out of the critical path. The repo should show what changed, why it changed, what passed, and what still needs attention.

Record Local Check Evidence

Use mars checks run when a build, test, lint, smoke, or release gate should become MARS evidence instead of terminal scrollback. The command runs inside the target repo, streams the check output to your terminal, and records a scoring outcome in the repo database so MARS can use it in quality reports and repair routing.

Record a passing check

mars checks run --repo ~/my-project --name go-test -- go test ./...
mars scores export --repo ~/my-project --window-days 30

Refresh docs/QUALITY_SCORE.md when a quality or readiness claim depends on the new check evidence.

Attribute evidence to a role

mars checks run \
  --repo ~/my-project \
  --role qa \
  --name browser-smoke \
  -- npm test

--role defaults to engineer. Use a stable role when the result should influence that role's quality trail.

Preserve failed evidence

mars checks run --repo ~/my-project --name go-test -- go test ./...

If the command fails, MARS still records checks_failed, then exits non-zero with the check exit code in the error message.

What is stored: mars checks run records one scoring outcome row with the check name, command argv, exit code, duration, role, repo ID, and timestamp. It does not store stdout or stderr, and it does not write .mars/checks/latest.json.

For full semantics, DB behavior, failure routing, and inspection options, open the Local Checks Evidence Guide. For command flags, see CLI operations. For quality interpretation, see evidence workflow, quality score export, and checks and validation boundaries.

Operate The Dashboard

The dashboard is local and embedded in the Go binary today. Use it to observe role state, quality, queue flow, throughput, telemetry, and evolution history. Use --debug when you want inline trace/log streaming instead of the TTY dashboard. Use the Dashboard API Reference when scripting dashboard controls or building a companion UI.

ViewWhat to inspectOperator action
Pipeline FlowRole state, trust, score, and next trigger.Pause, scan, stop, restart, or enqueue a role.
OrchestrationDispatch mode, topology, decisions, and stop reasons.Identify why work routed or stopped.
Role HealthScores, guardrail violations, and quality links.Decide whether to tune prompts, trust, skills, or guardrails.
ThroughputJob stats, inference speed, and output counts.Diagnose pace or model performance.
DebugJob timeline, trace viewer, webhook log, and errors.Investigate blocked jobs.
Evolution HistorySelf-improvement timeline and guardrail inventory.Review whether repeated failures become durable improvements.

Choose Local, Cloud, Or Deferred Model Routing

Local default

Use local open models through llama.cpp for data control and no API cost.

mars setup --inference local --local-bundle auto

Cloud route

Use supported cloud providers when the machine cannot run local models or a target needs remote model quality.

mars init --repo ~/my-project --model-routing cloud --cloud-provider openai --cloud-model gpt-4.1-mini --api-key-env OPENAI_API_KEY --yes

Explicit override

Override one tier or role after init without changing defaults for every repo.

mars models override --repo ~/my-project --tier coding --provider ollama --model qwen3.6:27b

Evaluate before promotion

Default model changes need benchmark evidence, immutable artifact revision, SHA256, and docs rationale.

mars models evaluate --provider ollama --model qwen3.6:27b

Update Installed And Deployed Surfaces

  1. Check drift

    mars update check --repo ~/my-project --json
  2. Update the installed command if needed

    mars auth github check
    mars update tool

    Use the Authentication And Credentials Reference when release auth or provider credentials are unclear.

  3. Update target harness defaults if needed

    mars update harness --repo ~/my-project

    Updates fill missing defaults while preserving user-owned target config.

Release Workflows

Target repo release notes

mars release notes --repo . --bump auto
mars release backfill-notes --repo . --check
git commit -m "release: notes X.Y.Z"

MARS source release snapshots

Follow F-018, AD-315, and the active plan to run the conventional Go/Syft production and verification path. T-080 activates .github/workflows/release.yml only for an exact repository tag after the approved cutover gates; no tag means no release run.

Target repository publication

Each target repository chooses and documents its own producer and artifact contract. MARS does not inject its source-specific release workflow into targets.

Remove MARS From A Target Repo

  1. Preview removal

    mars eject --repo ~/my-project
  2. Apply only after reviewing the preview

    mars eject --repo ~/my-project --apply --confirm my-project
  3. Choose database behavior

    Use --keep-db to leave the associated database in place. Use --delete-shared-db only when deliberately deleting the legacy shared DB.

Troubleshooting Decision Table

ProblemFirst checkLikely fix
Command not foundcommand -v marsOpen a new shell, rerun make install, run mars path setup from a shell that can find the binary, or refresh shell cache with hash -r. See the Shell Integration Reference.
Auth failure during updatemars auth github checkRun gh auth login, set GH_TOKEN/GITHUB_TOKEN, or run mars auth github setup.
Missing local modelmars doctor --jsonRun mars setup --download --local-bundle auto or configure cloud/deferred routing.
Slow local generationmars models eligibleUse a smaller local bundle, balanced profile, or a real OpenAI-compatible endpoint.
Dashboard port conflictCommand log listener linePass --addr or --dashboard-addr, or free the port.
Guardrail blockRule ID and messageChange the work, narrow the rule, or use an audited override only when policy allows.
Release notes fail backfill checkmars release backfill-notes --repo . --checkRun backfill and commit the corrected changelog in the release-note commit.