Preview a role prompt
mars run engineer --repo ~/my-project --dry-run
Dry-run mode prints assembled context and exits before calling the model.
Task guide
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.
git clone https://github.com/greaveselliott/MARS.git
cd MARS
make install
mars version
make install installs the current checkout and runs shell PATH setup through the installed binary.
mars setup
mars doctor
Ordinary setup requires no GitHub credential; authenticated release access remains optional.
go build ./cmd/mars; ./mars .... Prefer
make install or go build -o build/mars ./cmd/mars.
The target project is the repo MARS will manage. Do not point ordinary autonomous runs at the MARS source repo.
mars init --repo ~/my-project
This writes .harness/, AGENTS.md, goals, feature contracts, tickets, plans, release files, and guidance docs.
After init, role prompts, manifests, guardrails, knowledge routes, tickets, and docs are target-owned. Edit them deliberately.
mars doctor --repo ~/my-project --json
mars run engineer --repo ~/my-project --dry-run
Dry-run mode prints assembled context and exits before calling the model.
mars run engineer --repo ~/legacy-project --dry-run --no-init
--no-init prevents automatic harness scaffolding.
mars tools list --json
mars mcp serve --repo ~/my-project --trust observer
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.
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.
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.
| Key | Action | Result |
|---|---|---|
| p | Pause or resume | Running jobs finish; no new jobs are claimed while paused. |
| r | Warm restart | Reloads manifests and triggers without killing HTTP. |
| s | Scan | Scans registered repos and can create findings/tickets. |
| q | Stop | Graceful shutdown through the normal cancellation path. |
| h | Help | Shows terminal control help. |
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.
# 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.
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.
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.
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.
| Outcome | What to do | When to use it |
|---|---|---|
| Accept | Commit the target-owned code, docs, and evidence together. | The diff matches the request and checks pass. |
| Repair | Create or update a bounded ticket with the failing evidence, then run the right role again. | The direction is useful but incomplete or failing. |
| Reject | Discard only the output you have reviewed and chosen not to keep. | The work is off-goal, unsafe, or not worth repairing. |
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.
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.
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.
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.
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.
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.
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.
| View | What to inspect | Operator action |
|---|---|---|
| Pipeline Flow | Role state, trust, score, and next trigger. | Pause, scan, stop, restart, or enqueue a role. |
| Orchestration | Dispatch mode, topology, decisions, and stop reasons. | Identify why work routed or stopped. |
| Role Health | Scores, guardrail violations, and quality links. | Decide whether to tune prompts, trust, skills, or guardrails. |
| Throughput | Job stats, inference speed, and output counts. | Diagnose pace or model performance. |
| Debug | Job timeline, trace viewer, webhook log, and errors. | Investigate blocked jobs. |
| Evolution History | Self-improvement timeline and guardrail inventory. | Review whether repeated failures become durable improvements. |
Use local open models through llama.cpp for data control and no API cost.
mars setup --inference local --local-bundle auto
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
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
Default model changes need benchmark evidence, immutable artifact revision, SHA256, and docs rationale.
mars models evaluate --provider ollama --model qwen3.6:27b
mars update check --repo ~/my-project --json
mars auth github check
mars update tool
Use the Authentication And Credentials Reference when release auth or provider credentials are unclear.
mars update harness --repo ~/my-project
Updates fill missing defaults while preserving user-owned target config.
mars release notes --repo . --bump auto
mars release backfill-notes --repo . --check
git commit -m "release: notes X.Y.Z"
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.
Each target repository chooses and documents its own producer and artifact contract. MARS does not inject its source-specific release workflow into targets.
mars eject --repo ~/my-project
mars eject --repo ~/my-project --apply --confirm my-project
Use --keep-db to leave the associated database in place. Use --delete-shared-db only when deliberately deleting the legacy shared DB.
| Problem | First check | Likely fix |
|---|---|---|
| Command not found | command -v mars | Open 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 update | mars auth github check | Run gh auth login, set GH_TOKEN/GITHUB_TOKEN, or run mars auth github setup. |
| Missing local model | mars doctor --json | Run mars setup --download --local-bundle auto or configure cloud/deferred routing. |
| Slow local generation | mars models eligible | Use a smaller local bundle, balanced profile, or a real OpenAI-compatible endpoint. |
| Dashboard port conflict | Command log listener line | Pass --addr or --dashboard-addr, or free the port. |
| Guardrail block | Rule ID and message | Change the work, narrow the rule, or use an audited override only when policy allows. |
| Release notes fail backfill check | mars release backfill-notes --repo . --check | Run backfill and commit the corrected changelog in the release-note commit. |