Business logic
Product rules, workflow branches, validations, permissions, state transitions, scoring, trust, routing, release classification, and user-visible outcomes.
Plan and deliver
MARS turns a request into a goal, a small plan, one piece of work, evidence, review, and release notes. This keeps agent work inspectable: you can see the reason for the change, the files it touched, and the proof that it worked.
The core order is strict: active goal, active plan, feature contract, ticket, delivery evidence. If a repo has tickets or code work without that chain, repair the planning state before calling the work complete.
| Stage | Source of truth | Primary owner | Done signal |
|---|---|---|---|
| Outcome | docs/goals/ | CEO | Active goal has hypothesis, success evidence, falsification evidence, and review trigger. |
| Plan | docs/exec-plans/active/current-operating-plan.md | COO | Exactly one active plan names the goal, BDD feature, scenario schedule, current failing scenario, and walking skeleton slice. |
| Behavior | docs/features/F-NNN-*.md | COO with CTO input | Business logic and scenarios describe the full feature step by step. |
| Work item | docs/tickets/ | CTO for shaping, Engineer for delivery | One bounded ticket implements the current failing scenario or scenario group. |
| Implementation | Target source, tests, docs, commits | Engineer | Code, tests, docs, ticket evidence, and lifecycle move are committed. |
| Review | Ticket, trace, tests, BDD, quality evidence | QA, Security, Dogfood | Review approves, requests changes, or records a blocker with concrete next action. |
| Release | VERSION, CHANGELOG.md, release artifacts | Release Manager or maintainer | Shipped scenarios and enabler work are classified honestly. |
Goals are outcome decisions, not tickets. They carry priority, confidence, source, hypothesis, competing goals, support links, review triggers, and success or falsification evidence.
| Status | Meaning | User action |
|---|---|---|
observation | Weak or noisy evidence not ready to drive work. | Keep it in observations until confidence improves. |
active | Allowed to influence the active execution plan. | Ensure COO plan alignment before tickets are created. |
paused | Valid but deliberately not active. | Do not schedule work from it until reactivated. |
validated | Success evidence closed the goal. | Record evidence and move it out of active decision flow. |
superseded, invalidated, merged, split | Closed, replaced, absorbed, or divided. | Preserve lineage and point to the current owner goal. |
docs/goals/active.md
docs/goals/observations.md
docs/goals/superseded.md
There must be exactly one active execution plan. It decides which scenario is next and why that scenario advances the active goal. Backlog plans wait their turn; superseded plans are history.
| Required plan field | User purpose |
|---|---|
Status, Priority, Depends On, Blocks | Make ordering and blockers explicit. |
Related Tickets | Keep plan state connected to work items. |
Goals | Show which active goal this plan advances. |
BDD Feature | Name the behavior contract that defines done. |
Hypothesis | State why the plan should produce value or learning. |
Success Evidence and Falsification Evidence | Make completion and failure tests concrete. |
Scenario Schedule | Order the failing scenarios or scenario groups. |
Current Failing Scenario | Name the next scenario that tickets may implement. |
Walking Skeleton Slice | Describe the thinnest real end-to-end path for the current scenario. |
Learning Or MVP Outcome | Explain what the slice should prove, ship, or teach. |
mars doctor --repo /path/to/repo
go test ./internal/docsconsistency/...
Plan hygiene checks catch drift such as multiple active plans, stale status claims, missing feature pointers, or active tickets that no longer match the plan.
BDD contracts define feature completeness. They are not optional notes. Business logic belongs here before or alongside implementation.
Product rules, workflow branches, validations, permissions, state transitions, scoring, trust, routing, release classification, and user-visible outcomes.
The durable description of how the feature behaves from a user's point of view.
The ordered list of failing scenarios or scenario groups the active plan schedules.
Integration, E2E, dogfood, command, or docs-consistency evidence mapped to scenario IDs.
| Status | Meaning |
|---|---|
draft | Planned behavior exists, but evidence is not expected yet. |
active | Current or near-current work is executing against the schedule. |
partially-passing | Some scenarios have evidence and some remain unproven or pending. |
passing | All in-scope scenarios have evidence or are explicitly descoped. |
superseded | Kept for lineage; do not schedule new tickets from it. |
docs/features/F-001-delivery-operating-model.md
docs/features/README.md
Tickets scope one bounded slice of work. Feature tickets implement the current failing BDD scenario or scenario group. Enabler, research, docs, and intervention-debt tickets must not claim shipped feature behavior unless scenario evidence exists.
| Lifecycle directory | Meaning | Operator rule |
|---|---|---|
docs/tickets/backlog/ | Waiting work. | Do not pick ordinary backlog while eligible in-progress work exists. |
docs/tickets/in-progress/ | Active work. | Drain lowest-numbered eligible ticket first and update blocker metadata when stuck. |
docs/tickets/in-review/ | Awaiting review, approval, or requested changes. | Review against BDD, ticket evidence, tests, docs, and trace. |
docs/tickets/done/ | Completed and committed work. | Feature tickets need BDD scenario evidence before moving here. |
Before a feature ticket moves to done/, it needs
non-empty bdd_scenarios,
end_to_end_evidence: required, non-empty
evidence_links, and a real
verified_by value.
---
work_type: feature
bdd_scenarios: ["F-001-S002"]
end_to_end_evidence: required
evidence_links:
- go test ./internal/serve -run TestValidateEngineerTicketGate
verified_by: command
blocker: none
next_action: none
---
ticket_create for new tickets instead
of hand-writing ticket files. Ticket markdown belongs only in
backlog/, in-progress/,
in-review/, or done/.
The delivery model depends on role boundaries. Dispatch mode keeps those boundaries explicit through dispositions rather than prose.
| Role | Owns | Hands off when |
|---|---|---|
| CEO | Goals, scope, tradeoffs, final strategy decisions. | A goal decision needs an execution plan. |
| COO | Active plan, BDD contracts, scenario schedule, current failing scenario. | Technical decomposition is needed. |
| CTO | Architecture fit and implementation tickets for the current scenario. | A bounded ticket is ready for Engineer. |
| Engineer | One ticket, implementation, tests, docs, evidence, commit, ticket lifecycle move. | QA review or blocker handling is needed. |
| QA | Evidence review against ticket and BDD contract. | Approval, changes requested, or blocker is recorded. |
| Security | Security posture and safe remediation. | Security approval or remediation work is needed. |
| Dogfood | Real user, runtime, or agent path validation. | Evidence is recorded or target/foundation ownership is classified. |
| Release Manager | Version, changelog, tag, assets, and release evidence. | Release is verified or blocked with next action. |
| Orchestrator | Routing the next valid role and stopping unclear loops. | A deterministic next owner is chosen or work stops with a reason. |
| Status | Meaning |
|---|---|
completed | Work reached the required evidence and lifecycle state. |
blocked | Ticket or run has a concrete blocker, blocked-by link, and next action. |
in_review | Work moved to review with reviewer or approval metadata. |
changes_requested | Review sends bounded correction back to the owning role. |
no_work | No repo change was needed and the evidence says why. |
Evidence should be executable or durable. A chat summary is not a substitute for repo-owned proof.
| Evidence type | Good example | Use when |
|---|---|---|
| Command | mars doctor --repo /path/to/repo --json | Health, drift, setup, or target readiness matters. |
| Test | go test ./internal/serve -run TestValidateEngineerTicketGate | Deterministic Go behavior matters. |
| Dogfood or validation report | docs/validation/reports/YYYY-MM-DD-name.md | A runtime, lifecycle, or user path claim is broad. |
| Trace or log | Trace ID, job ID, command log path. | Agent behavior or failure cause matters. |
| Quality score | mars scores export --repo /path/to/repo | A quality or readiness claim cites role outcomes. |
| Docs consistency | mars docsync audit --repo . | Code, CLI, or docs behavior changed. |
Unit tests can support deterministic helpers, but user-visible features need scenario-level evidence: integration, E2E, dogfood, command, or docs-consistency proof mapped to the BDD scenario ID.
Review checks the delivered slice against the ticket and BDD contract. Release notes then classify what shipped. Enabler work can be valuable, but it must not be described as a shipped feature scenario unless the BDD evidence exists.
mars run qa --repo /path/to/repo --dry-run
mars docsync audit --repo /path/to/repo
mars scores export --repo /path/to/repo --window-days 30
Use dry run for review prompt inspection, then run the actual review when the evidence trail is ready.
mars release notes --repo /path/to/repo --bump auto --dry-run
mars release notes --repo /path/to/repo --bump auto
mars release backfill-notes --repo /path/to/repo --check
Patch notes should explain impact, why, and what changed before commit buckets.
Run the no-publish conventional production and verification rehearsal authorized by AD-315. T-080 activates MARS source .github/workflows/release.yml only for exact repository tags after the approved public gates; target repositories choose their own producer and artifact contract. Neither path authorizes publication without the repository's release gates.
read docs/goals/active.md
edit docs/exec-plans/active/current-operating-plan.md
edit docs/features/F-NNN-feature-name.md
mars run cto-weekly --repo /path/to/repo --dry-run
Make the plan and feature contract explicit before creating implementation tickets.
git mv docs/tickets/backlog/T-001-example.md docs/tickets/in-progress/
run the implementation and scenario evidence
edit the ticket evidence fields
git mv docs/tickets/in-progress/T-001-example.md docs/tickets/done/
git commit -m "feat(scope): implement scenario T-001"
The actual evidence command must be real for the target repo; placeholders do not satisfy completion.
blocker: "Cloud model endpoint returned 401 with configured api_key_env"
blocked_by: ["T-014"]
trace_id: tr-...
next_action: "Repair model credential env and rerun engineer on T-001"
Blocked state should be specific enough for Janitor, Doctor, or the next role to resume intelligently.
mars doctor --repo /path/to/repo --json
mars docsync audit --repo /path/to/repo
git status --short --branch
| Symptom | Likely cause | Recovery |
|---|---|---|
| Feature tickets exist without an active plan pointer | Planning order drifted. | Update docs/exec-plans/active/current-operating-plan.md before adding more tickets. |
| Ticket claims shipped behavior but has no BDD scenario | Feature evidence gate was skipped. | Add or update the feature contract and ticket bdd_scenarios, then rerun evidence. |
| Engineer keeps picking backlog while in-progress exists | Ticket drain metadata or cooldown state is misleading. | Repair blocker, blocked_by, trace ID, and next_action fields. |
| Review requests broad extra work | Review scope is not tied to current ticket and scenario. | Route only bounded corrections back to Engineer; create separate tickets for unrelated findings. |
| Release notes overclaim feature value | Enabler work was not separated from scenario evidence. | Rewrite release narrative to distinguish shipped scenarios, enablers, and remaining blockers. |
| Docs disagree with code or ticket state | No-stale-docs workflow missed an owning artifact. | Read changed-file MarsDocSync metadata, update docs, and run mars docsync audit. |