Plan and deliver

How MARS decides what to do next.

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.

Source of truth: this guide explains the delivery chain. The canonical records live in active goals, the active plan, BDD feature contracts, and tickets. Use the documentation map when you need the owner of a rule.

Delivery Flow

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.

StageSource of truthPrimary ownerDone signal
Outcomedocs/goals/CEOActive goal has hypothesis, success evidence, falsification evidence, and review trigger.
Plandocs/exec-plans/active/current-operating-plan.mdCOOExactly one active plan names the goal, BDD feature, scenario schedule, current failing scenario, and walking skeleton slice.
Behaviordocs/features/F-NNN-*.mdCOO with CTO inputBusiness logic and scenarios describe the full feature step by step.
Work itemdocs/tickets/CTO for shaping, Engineer for deliveryOne bounded ticket implements the current failing scenario or scenario group.
ImplementationTarget source, tests, docs, commitsEngineerCode, tests, docs, ticket evidence, and lifecycle move are committed.
ReviewTicket, trace, tests, BDD, quality evidenceQA, Security, DogfoodReview approves, requests changes, or records a blocker with concrete next action.
ReleaseVERSION, CHANGELOG.md, release artifactsRelease Manager or maintainerShipped scenarios and enabler work are classified honestly.
Short form: exec plan first, feature contract second, ticket third, delivery fourth.

Goals

Goals are outcome decisions, not tickets. They carry priority, confidence, source, hypothesis, competing goals, support links, review triggers, and success or falsification evidence.

StatusMeaningUser action
observationWeak or noisy evidence not ready to drive work.Keep it in observations until confidence improves.
activeAllowed to influence the active execution plan.Ensure COO plan alignment before tickets are created.
pausedValid but deliberately not active.Do not schedule work from it until reactivated.
validatedSuccess evidence closed the goal.Record evidence and move it out of active decision flow.
superseded, invalidated, merged, splitClosed, 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

Active Plan

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 fieldUser purpose
Status, Priority, Depends On, BlocksMake ordering and blockers explicit.
Related TicketsKeep plan state connected to work items.
GoalsShow which active goal this plan advances.
BDD FeatureName the behavior contract that defines done.
HypothesisState why the plan should produce value or learning.
Success Evidence and Falsification EvidenceMake completion and failure tests concrete.
Scenario ScheduleOrder the failing scenarios or scenario groups.
Current Failing ScenarioName the next scenario that tickets may implement.
Walking Skeleton SliceDescribe the thinnest real end-to-end path for the current scenario.
Learning Or MVP OutcomeExplain 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 Feature Contracts

BDD contracts define feature completeness. They are not optional notes. Business logic belongs here before or alongside implementation.

Business logic

Product rules, workflow branches, validations, permissions, state transitions, scoring, trust, routing, release classification, and user-visible outcomes.

Step-by-step behavior

The durable description of how the feature behaves from a user's point of view.

Scenario schedule

The ordered list of failing scenarios or scenario groups the active plan schedules.

Evidence

Integration, E2E, dogfood, command, or docs-consistency evidence mapped to scenario IDs.

Contract Status

StatusMeaning
draftPlanned behavior exists, but evidence is not expected yet.
activeCurrent or near-current work is executing against the schedule.
partially-passingSome scenarios have evidence and some remain unproven or pending.
passingAll in-scope scenarios have evidence or are explicitly descoped.
supersededKept for lineage; do not schedule new tickets from it.
docs/features/F-001-delivery-operating-model.md
docs/features/README.md

Tickets

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 directoryMeaningOperator 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.

Feature Evidence Gate

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 creation rule: agents should use ticket_create for new tickets instead of hand-writing ticket files. Ticket markdown belongs only in backlog/, in-progress/, in-review/, or done/.

Role Handoffs

The delivery model depends on role boundaries. Dispatch mode keeps those boundaries explicit through dispositions rather than prose.

RoleOwnsHands off when
CEOGoals, scope, tradeoffs, final strategy decisions.A goal decision needs an execution plan.
COOActive plan, BDD contracts, scenario schedule, current failing scenario.Technical decomposition is needed.
CTOArchitecture fit and implementation tickets for the current scenario.A bounded ticket is ready for Engineer.
EngineerOne ticket, implementation, tests, docs, evidence, commit, ticket lifecycle move.QA review or blocker handling is needed.
QAEvidence review against ticket and BDD contract.Approval, changes requested, or blocker is recorded.
SecuritySecurity posture and safe remediation.Security approval or remediation work is needed.
DogfoodReal user, runtime, or agent path validation.Evidence is recorded or target/foundation ownership is classified.
Release ManagerVersion, changelog, tag, assets, and release evidence.Release is verified or blocked with next action.
OrchestratorRouting the next valid role and stopping unclear loops.A deterministic next owner is chosen or work stops with a reason.

Disposition Statuses

StatusMeaning
completedWork reached the required evidence and lifecycle state.
blockedTicket or run has a concrete blocker, blocked-by link, and next action.
in_reviewWork moved to review with reviewer or approval metadata.
changes_requestedReview sends bounded correction back to the owning role.
no_workNo repo change was needed and the evidence says why.

Evidence Gates

Evidence should be executable or durable. A chat summary is not a substitute for repo-owned proof.

Evidence typeGood exampleUse when
Commandmars doctor --repo /path/to/repo --jsonHealth, drift, setup, or target readiness matters.
Testgo test ./internal/serve -run TestValidateEngineerTicketGateDeterministic Go behavior matters.
Dogfood or validation reportdocs/validation/reports/YYYY-MM-DD-name.mdA runtime, lifecycle, or user path claim is broad.
Trace or logTrace ID, job ID, command log path.Agent behavior or failure cause matters.
Quality scoremars scores export --repo /path/to/repoA quality or readiness claim cites role outcomes.
Docs consistencymars 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 And Release

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.

Review the slice

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.

Generate release notes

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.

Verify the source snapshot contract

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.

Recipes

Start a new product slice

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.

Claim and finish a feature ticket

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.

Record a blocker

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.

Check delivery hygiene

mars doctor --repo /path/to/repo --json
mars docsync audit --repo /path/to/repo
git status --short --branch

Troubleshooting

SymptomLikely causeRecovery
Feature tickets exist without an active plan pointerPlanning order drifted.Update docs/exec-plans/active/current-operating-plan.md before adding more tickets.
Ticket claims shipped behavior but has no BDD scenarioFeature evidence gate was skipped.Add or update the feature contract and ticket bdd_scenarios, then rerun evidence.
Engineer keeps picking backlog while in-progress existsTicket drain metadata or cooldown state is misleading.Repair blocker, blocked_by, trace ID, and next_action fields.
Review requests broad extra workReview 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 valueEnabler work was not separated from scenario evidence.Rewrite release narrative to distinguish shipped scenarios, enablers, and remaining blockers.
Docs disagree with code or ticket stateNo-stale-docs workflow missed an owning artifact.Read changed-file MarsDocSync metadata, update docs, and run mars docsync audit.