Planner domain
Strategy, goals, plans, architecture fit, scenario schedules, and tradeoffs.
Target harness
MARS adds .harness/, AGENTS.md, docs,
tickets, guardrails, roles, and release files to a target repo.
You can read them, review them, change them, update them, commit
them, or remove them.
mars init creates a target-owned harness plus durable
planning, delivery, quality, and release artifacts. For the full
ownership, local state, and cleanup map, use the
Files And State Reference.
.
|-- AGENTS.md
|-- VERSION
|-- CHANGELOG.md
|-- .harness/
| |-- manifest.yaml
| |-- metadata.yaml
| |-- roles/
| |-- skills/
| |-- guardrails/
| +-- knowledge/
+-- docs/
|-- goals/
|-- features/
|-- tickets/
|-- exec-plans/
|-- design-docs/
|-- references/
+-- QUALITY_SCORE.md
| Surface | User purpose | Upgrade behavior |
|---|---|---|
AGENTS.md | Compact first-read map for agents and humans. | Preserved after init. |
.harness/manifest.yaml | Executable role, model, tool, trigger, guardrail, and context routing config. | Preserved after init. |
.harness/metadata.yaml | Generated harness version drift signal. | Harness-owned. |
.harness/roles/ | Editable role prompts. | Existing prompts are preserved. |
.harness/skills/ | Reusable compact procedures. | Existing skills are preserved. |
.harness/guardrails/ | Hard and advisory safety rules. | User-owned. |
.harness/knowledge/ | Context routes into repo docs. | User-owned. |
docs/features/ | BDD contracts and business logic. | User-owned source of truth. |
docs/tickets/ | Work item lifecycle. | User-owned source of truth. |
VERSION, CHANGELOG.md | Semantic version and generated patch notes. | User-owned release state. |
.harness/manifest.yaml is the entrypoint for executable
agent behavior. It names roles, prompts, canonical domains, modes,
model tiers, tool allowlists, guardrails, knowledge routes, and
triggers. For exact field validation, routing modes, schedules,
generated defaults, and manifest troubleshooting, open the
Bundle And Manifest Reference.
name: my-project
description: MARS bundle for my-project
roles:
engineer:
prompt: roles/engineer.md
domain: engineer
mode: ticket-delivery
model: coding
tools:
- file_read
- file_write
- shell_exec
- grep
- mars_cli
guardrails:
- guardrails/safety.yaml
knowledge:
- knowledge/context-glossary.yaml
triggers:
- ticket.assigned
| Field | Meaning | User guidance |
|---|---|---|
name | Bundle identifier. | Keep stable unless renaming the target harness. |
description | Human-readable bundle description. | Use domain-specific language for your project. |
roles | Map of executable role keys. | Role keys are what you pass to mars run <role>. |
prompt | Role prompt file path relative to .harness/. | Keep prompts focused and route longer context through knowledge files. |
domain | Canonical operating domain. | Use planner, engineer, reviewer, maintainer, end-to-end-tester, or orchestrator vocabulary. |
mode | Lower-kebab-case reason the role runs. | Examples: ticket-delivery, quality-review, pipeline-repair. |
model | Model tier or hint. | Prefer fast, reasoning, or coding for tier routing. |
tools | Allowed tool names. | Grant the smallest tool set that can do the role's job. |
guardrails | Guardrail YAML files. | Attach role-specific policies instead of making every rule global. |
knowledge | Route files for contextual docs. | Point to docs; avoid stuffing long content into the manifest. |
triggers | Events or schedules that enqueue work. | Use explicit triggers for automation and manual mars run for one-off work. |
Roles are executable personas with prompts, tools, guardrails, knowledge routes, model tiers, trust levels, scores, and triggers. Generated roles are starter defaults. Target owners should tune them to their product domain and risk tolerance.
Strategy, goals, plans, architecture fit, scenario schedules, and tradeoffs.
Ticket-bound implementation through the next thin, verifiable slice.
Quality review, regression risk, missing tests, and completion truth.
Dependency, release, docs, housekeeping, and sustained repo health.
Reproducible user-path validation and evidence collection.
Routing ambiguous follow-up, respecting active plans and work state.
Knowledge routes are compact YAML maps that tell MARS which repo docs to include when a role needs specific context. They are the antidote to giant prompts: keep instructions small and route the right durable docs only when relevant.
routes:
- when: project terminology, domain concepts, architecture vocabulary, naming, or unclear intent
paths: AGENTS.md, docs/design-docs/context-glossary.md, docs/design-docs/index.md
Guardrails are YAML rules that constrain file writes and tool use. Hard rules block operations; advisory rules become prompt guidance.
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
| Field | Use |
|---|---|
id | Stable unique rule ID shown in violations. |
severity | hard blocks; advisory informs. |
scope | global or a role key. |
pattern | Regex matched against content. |
file_pattern | Optional file glob to narrow the rule. |
message | Actionable explanation for the agent and human reviewer. |
stale_days | Review cadence; use -1 only for permanent rules. |
Skills are compact reusable workflows in
.harness/skills/<name>/SKILL.md. They guide an
agent through recurring judgment-heavy procedures without granting
new tool authority. Use skills when a human recovery step repeats,
when a process is easy to forget, or when the role prompt would
otherwise grow too large.
Release publication, private release auth, persona design, validation replay, recurring dependency update checks.
One-off project facts, secrets, raw data dumps, or behavior that should be enforced mechanically by a tool or guardrail.
| Artifact | What users put there | Why it matters |
|---|---|---|
docs/goals/active.md | Current user-visible priorities. | Prevents agents from optimizing for stale chat context. |
docs/exec-plans/active/ | The one active plan and evidence schedule. | Keeps delivery order explicit. |
docs/features/ | BDD feature contracts and business logic. | Defines done before implementation claims. |
docs/tickets/ | Backlog, in-progress, review, and done tickets. | Scopes the next walking-skeleton slice. |
docs/design-docs/ | Architecture and product decisions. | Gives future agents rationale, not just final code. |
docs/references/ | Research and external context. | Keeps evidence durable and linkable. |
Product rules, state transitions, validations, permissions, scoring/trust behavior, routing rules, release classification, and user-visible outcomes belong in BDD feature contracts before or alongside implementation.
docs/QUALITY_SCORE.md is refreshed from live score, telemetry, ticket, dogfood, guardrail, check, no-op, and human follow-up evidence.
observer, contributor, and autonomous determine progressive role permission inside the independently selected execution profile. Mutation also requires acknowledged host execution; target config cannot grant it.
VERSION and CHANGELOG.md are generated release state in both MARS source and initialized target repos.
Completion claims should link to tests, traces, commits, docs, release notes, and validation evidence.
Keep role keys stable once automation depends on them.
Grant mutation only where the role's job requires it.
Prefer scoped rules over broad global blocks.
Route architecture, API, domain, and style guidance from durable docs.
Use local by default, cloud when configured, and overrides for explicit repo or role needs.
When behavior changes, update the owning docs in the same change.
mars update harness --repo ~/my-project
Missing defaults are filled, but local prompts, manifests, guardrails, knowledge routes, tickets, plans, references, and target docs are preserved. For init, register, start, run, scan, upgrade, and eject behavior, open the Target Lifecycle Reference.
To adopt changed starter prompts, initialize a temporary repo with the new binary and copy only the changes you want.
mars eject --repo ~/my-project
mars eject --repo ~/my-project --apply --confirm my-project
Removal deletes working-tree harness artifacts and the associated database unless you pass --keep-db. It does not rewrite git history.