RFC-0030: its decisions in full¶
Rows of the decision inventory, from the RFC.
RFC-0030-1: Planning lives in a stdlib-only library libs/missions that imports nothing of the lab; the build enforces the wall¶
- Decided: Planning (goal schemas, guardrail vocabulary and
merge, the planner, the plan document, the reviewer's rules, sequences) moves into a new librarymissions; execution and config stay in Mission Control.ALLOWED["missions"]is the empty set andmission_controlmay import{robotgate, runfile, missions}. The module is namedmissions(Q1, A). - Why: "The side that decides what to do never touches the robot" (§3). Today the claim that the
planner cannot drive, stop or fire "is a habit, not a rule the build enforces"; a planner that
gains a loop, a model client and a scheduler "will not stay that small, and then the claim needs a
wall" (§1). Name
missionsbecause "a mission is the word the operator uses" (§9 Q1). - How:
scripts/check_boundaries.py(MODULES,ALLOWED),libs-syncandLIBS_TESTSin the Makefile, a[tool.uv.sources]entry (§4.1); the import-wall's limit (it reads imports, not behaviour) is named in §11. Built for step 1 (§4.4 "Built"). - Alternatives rejected: (a) keep as is, (b) a separate app now, (c) Mission Control as config
only with execution in the planner app (puts the planner's complexity on the safety path), plus
the module names
planningandgoalkit(§8, §9 Q1). - RFC status and section: Proposed rev 2; §3, §4.1, §8(d), §9 Q1. Built so far: 4.4 step 1 only.
- Who decided and when: the operator, 2026-11-26 (the cut recommended by the RFC; name A decided in §9 Q1; the sequencing decided in the header).
- Existing ADR: none
- Later changed by: not found in my RFCs (checked RFC-0002..0039 files matching RFC-00[2-3]*,
and the ADRs). RFC-0025 §3.12 (line 1533) uses "module" to mean a code module and cites
"RFC-0030's planning module"; it does not change the decision. RFC-0031 §6.3 copies the pattern
for
libs/learning. - In code: Yes.
libs/missions/src/missions/{errors,goals,guardrails,planner}.pyexist;scripts/check_boundaries.py:50has"missions": set()and line 55"mission_control": {"robotgate", "runfile", "missions"}.
RFC-0030-2: Config (robot files, profiles, sites, goal library) stays in Mission Control; the planner gets a snapshot as arguments¶
- Decided: Sites, areas, objects, the goal library, robot files (
allow_real_runs) and profiles are not moved into the library, and nositeslibrary is made. The planner receives a snapshot as plain data (asplanner.Contextdoes). The planner never gets a robot adapter, the gate, a session token, the lease or the robot file's key. - Why: "A shared library for them would add a second writer's worth of API with no second user"
(§3). Execution writes to sites (
merge_run_objects,set_dock_if_unset), "so they are not the planner's data" (§9 Q2). Revisit "the day" a second program must read config (RFC-0018's "Ready to split when"). - How:
planning.pyis the one module of Mission Control that importsmissions, and a test pins that no other file does (§4.4 "Built"). The "no robot address, no token, no session passed in" rule is a review check, not a build proof (§11). - Alternatives rejected: B, the library takes the read side of sites as types; C, a third
library
sites(§9 Q2). - RFC status and section: Proposed rev 2; §3, §9 Q2.
- Who decided and when: the operator, 2026-11-26 (Q2: A, config).
- Existing ADR: none
- Later changed by: not found in my RFCs (same set as above).
- In code: Yes (partial scope).
apps/mission-control/src/mission_control/planning.pyexists andsites.pystays in Mission Control.
RFC-0030-3: guardrails.merge moves with _LIMITS unchanged; a plan can only add guardrails, folded into each step's must_not; no fourth level¶
Architecture ADR: ADR-0024.
- Decided:
mergeand the limit vocabulary move tomissionsunchanged (option A) and Mission Control still calls it on the safety path for every run; the reviewer's dry run calls the same function. A plan-levelguardrailslist is folded into each step'smust_notat validation, soLEVELS(robot, site, goal) is unchanged. A plan that would loosen a guardrail is rejected, not trimmed. - Why: "so there is one rule and no copy"; the executor "computes the guardrails of every run itself and trusts no review" (§4.1). Cost admitted: the rule that decides what a robot may do now lives in a library, so a change to it "is a change to the executor, and review must say so".
- How: §4.1 "Where
mergegoes"; a "a plan never loosens" test stays in Mission Control's tests (§4.1, §4.4 Built). - Alternatives rejected: B,
LIMITSpublic inmissionsandmergestays in Mission Control (the reviewer would need a copy or a callback, "a copy is two rules") (§4.1). - RFC status and section: Proposed rev 2; §4.1, §12 "Out of scope".
- Who decided and when: recommendation A is the RFC's; the operator's decision to proceed with
the carve-out is 2026-11-26 (header). Option A is built (§4.4 "Built":
mergeunchanged). - Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: Partial.
mergemoved (libs/missions/src/missions/guardrails.py); the plan-level fold is not built (no plan document).
RFC-0030-4: The library raises its own PlanError(code, message) with no HTTP status; Mission Control maps it at one seam¶
- Decided:
missionshas its own error type; Mission Control converts it toApiError(422 with the library's code, 502 forplanner_failed) in one module. - Why:
ApiErrorcarries an HTTP status; an escapedPlanError"would reachapi.py's handler, which catchesApiErroronly and answers 500" (§4.1, review M6). - How:
libs/missions/src/missions/errors.py;apps/mission-control/src/mission_control/planning.py; a test pins that no call site lets aPlanErrorthrough (§4.1, §4.4 Built). - Alternatives rejected: none named (the shared
errors.invalidis removed as a consequence, §12). - RFC status and section: Proposed rev 2; §4.1; built (§4.4).
- Who decided and when: the advisor's review M6, folded in with the operator's approval, 2026-11-26.
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: Yes.
errors.pyandplanning.pyexist (checked with ls and grep forPlanError).
RFC-0030-5: Mission Control and the planner meet at one versioned plan document with a full-digest checksum, provenance and a site stamp¶
Architecture ADR: ADR-0026.
- Decided: Between planning and execution runs a JSON
plan_version: 1document:mission,site,target,approval_mode,budgets,provenance,goals[](withkey,after,needs),binding(filled by Mission Control, not the planner),guardrails,on_failureandchecksum. The checksum is sha256 (all 64 hex) over the canonical JSON of the whole document without the field; a plan edited after approval is refused.goals.version(16 hex, dropsname,folder,sim_first) is not reused. Asite_stampdigest of the areas, objects and site guardrails the planner saw is recorded.approval_modeis the operator's, never the planner's. An LLM plan is marked and "never trusted more". - Why: A plan approved and then edited to
sim_first: false"must not keep its checksum" (§4.2, review H2). The review's proposed stamp (updated_atplus object count) misses moved objects, so a digest is used (§4.2, M2). - How: §4.2; contract versioned "like every contract here (RFC-0018 §5.3: a contract changes only by adding)"; a contract test pins it (§10).
- Alternatives rejected: reusing
goals.versionas the checksum;updated_atplus count as the site stamp (§4.2). - RFC status and section: Proposed rev 2; §4.2, §10. Not built (§7 row 1: 4.4 step 2 not built).
- Who decided and when: the advisor's review (H2, M2) folded in, operator approved folding in, 2026-11-26; the document as a whole is a proposal awaiting the operator.
- Existing ADR: none
- Later changed by: not found in my RFCs. RFC-0031 §6.3 and §12 reuse the shape ("like the plan document of RFC-0030") for the model record, and RFC-0031 §13 says a model record's checksum rule is "not decided". No amendment.
- In code: No.
libs/missions/src/missions/has no plan-document module (only errors, goals, guardrails, planner).
RFC-0030-6: Step outcomes: cancelled and interrupted end the mission stopped and never replan; failure ends follow on_failure¶
Architecture ADR: ADR-0026.
- Decided: A step is a goal run.
reached/donego to the next step;refused,failed,not_found,timeout,stalled,stopped_by_guardrailare decided byon_failure(stopdefault, orcontinuewhich skips dependents) and, in auto mode, are a replan trigger;cancelledandinterruptedend the missionstoppedwhateveron_failuresays. A failed step is not rolled back. - Why: A run "cannot tell a STOP from an operator's cancel"; treating both as a stop "is the safe reading: a mission in mode 3 that replanned after a STOP would drive on" (§4.2, review H1).
- How: the outcome table in §4.2; the vocabulary is
navcontract.ENDS(goals.TERMINAL). - Alternatives rejected: none named. §12 leaves open whether a mid-step trigger may cancel
without ending the mission
stopped. - RFC status and section: Proposed rev 2; §4.2, §6.4.
- Who decided and when: advisor review H1, folded in 2026-11-26.
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: No (no mission runner or plan states; checked
apps/mission-control/srcforplan-run/mission code: none).
RFC-0030-7: sim_first stays per goal; a replanned step is a new goal version and is refused on a real robot until rehearsed¶
Architecture ADR: ADR-0026.
- Decided: The rehearsal rule is not lifted to the whole plan. Each step is rehearsed by its own
goals.versionon a simulator twin within 24 hours. No exception for a "small" replan.confirm_requiredis data, not a gate. - Why: A plan "is not one unit to it" and "That is the rule, with no exception for a 'small' replan" (§4.2).
- How:
core.py:532-553as built (§4.2). §13 proposes adopting RFC-0005's whole-plan rehearsal when auto mode reaches a real robot. - Alternatives rejected: whole-plan rehearsal for now (deferred to §13).
- RFC status and section: Proposed rev 2; §4.2, §13.
- Who decided and when: the RFC's reading of existing code; no separate operator decision recorded.
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: Yes for the per-goal rule (it is today's behaviour, per the RFC;
test_sim_first.pynamed in §4.4); the plan-level consequence is not built.
RFC-0030-8: Plan state machine and approval live in Mission Control; an approval is a record made only by a named token identity, and auto mode needs tokens on¶
Architecture ADR: ADR-0026.
- Decided: Mission Control holds the mission state (
planned -> bound -> reviewed(checksum) -> approved(checksum, mode) -> step k running) and refuses what the state forbids, whoever calls. A step starts only with state approved/running, a matching checksum,aftermet and the stop latch clear. The approval stores checksum, target, bound robots, mode, who, when, and is accepted only from a token identity the operator has named as an approver; the MCP server's token is never one; a server without tokens cannot hold an approval. The MCP guards (sim_robot,target,no_opt_out) are not a defence at this layer and must be applied to every goal of a plan. A single goal keeps its routes (POST /goal-runsuntouched). - Why: "Approval is not a flag in an answer" (§4.5, review H3). The MCP guards "run in the MCP
server's process, so a client that calls the HTTP API directly never meets them". The tokens-on
consequence is "mine, not the review's; it follows from
client()". - How: §4.5;
Ctx.client()(api.py:76),require_tokensdefault False (api.py:661); routesPOST /plans, approve and run under/plans/{id}/...(§4.4 step 2). - Alternatives rejected: none named.
- RFC status and section: Proposed rev 2; §4.5, §11 last bullet. Not built.
- Who decided and when: advisor review H3, folded in with the operator's approval, 2026-11-26.
- Existing ADR: none
- Later changed by: not found in my RFCs. RFC-0031 §7.1 reuses the named-approver mechanism for promotion ("as RFC-0030 4.5 does for approvals"); RFC-0032 §3.5 reuses the signed approval record. Extensions, not amendments.
- In code: No. No plan routes or approval record in
apps/mission-control/src(the onlyapprovalhits are in core/mcp_server/planning for other reasons; no/plansroute found).
RFC-0030-9: Mission records (plans, reviews, approvals, decisions) live in Mission Control's store, not in the run file; the run gets only additive goal_run keys and one why event¶
Architecture ADR: ADR-0026.
- Decided: Mission Control stores plans, review and approval records,
mission_decisionrows and the heartbeat in its own database besidegoal_runs, adds amission_idcolumn and the stepkeyto goal runs (store migration), and serves them through its own routes (the Observatory already proxies/control/). Thegoal_startspec'sgoal_runobject gainsmission,plan,stepandwhy {rule, reason, values}; the navigator forwards them to the run's metadata and writes oneeventwith thatwhyas itsdecisionat goal start.clientstays the token identity, notmission:<id>. - Why: Mission Control "may not write run files (the checker forbids its runfile imports)", and a mission's decisions happen "between runs, when no run is open" (§6.3, review M8). The change is "one additive field of the navigator contract and no change to ADR-0007" (§6.3, §10).
- How: §4.3, §6.3;
validate.py:47-50and:108-115;nav/server.py:153-182(must forward new keys). - Alternatives rejected: a new record kind in the run file (the first draft; "the wrong store") (§6.3).
- RFC status and section: Proposed rev 2; §4.3, §6.3, §10.
- Who decided and when: advisor review M8, folded in, 2026-11-26.
- Existing ADR: ADR-0007 partly (it is the run format this decision declines to change; it
records nothing about mission records or the additive
goal_runkeys). - Later changed by: not found in my RFCs. Side effect: RFC-0031 §6.1 plans schema 4 to 5 for
training_requests, but RFC-0032 §3.1 took schema 5 forgoal_runs.facts(store.py:24-25,SCHEMA_VERSION = 5); a later migration for RFC-0030'smission_idwould also take a new number. Not an amendment of the decision. - In code: No. No
mission_idinapps/mission-control/src.
RFC-0030-10: The platform has two modes, manual and auto; manual stays first-class and both end in Mission Control starting a run¶
Architecture ADR: ADR-0026.
- Decided: Exactly two named modes. Manual (today: forms or words, the operator starts each
goal) keeps
POST /goal-runsandPOST /goals/{id}/runsas they are and no auto feature may make it slower or less safe. Auto is closed-loop AI planning: "Auto changes who proposes the next goal, not who may start it." - Why: The operator asked for "AI-driven mission planning that can react to signals and information, replan, and keep driving the robot in steps, sort of evolutionary planning" (header, verbatim as the RFC quotes it).
- How: §6.1; a plan of one goal is optional, never required (§4.5, §7 row 1).
- Alternatives rejected: none named.
- RFC status and section: Proposed rev 2, "Decided by the operator on 2026-11-26"; §6.1.
- Who decided and when: the operator, 2026-11-26 (header).
- Existing ADR: none
- Later changed by: not found in my RFCs. RFC-0031 §3 maps "mission approval modes" to training plans, nothing more.
- In code: Partial. Manual mode is today's code; auto mode is not built (a spike only, not in the tree).
RFC-0030-11: Auto mode is plan, review, then execute one step at a time; a changed plan always goes back through review¶
Architecture ADR: ADR-0026.
- Decided: The planner writes the whole plan as data; an automated reviewer (rule checks first: guardrail dry-run, reachability, capabilities, budgets, risky steps; a second model may join later) and the operator's approval (per approval mode) review it; execution runs one step as a goal through the same entry as a hand-made goal; on a trigger the planner replans and the changed plan is reviewed again. The reviewer may pass, ask for changes or reject and never edits the plan; its rules run on the validated plan, never the raw model answer. The planner may not skip review "because it is a small change".
- Why: "the checksum changed, and a review is of a checksum" (§6.2). Prompt-injection through
free text (labels, refusal reasons, anomaly summaries, notes) is held by layers: schema
validation, reviewer rules on the validated plan, guardrails and
no_go_area, and approval mode 1 (§11, review M3), named as "Not a complete defence". - How: §6.2, §6.3 (the stage and record table), §11.
- Alternatives rejected: none named.
- RFC status and section: Proposed rev 2, decided as shape by the operator (header); §6.2, §6.3.
- Who decided and when: the operator, 2026-11-26 ("auto works as plan, review, then execute step by step").
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: No.
RFC-0030-12: Replans happen at step boundaries on defined triggers; the loop proposes, Mission Control executes¶
Architecture ADR: ADR-0026.
- Decided: Triggers: a failure end, a new object or area, an alarm or anomaly, a crossed budget,
a changed site stamp (re-taken at each step start), the operator's edit or note. A mid-step
trigger waits for the boundary (cancelling a step ends the mission
stopped). Every step passes the samevalidate,merge,capability_refusal,real_run_refusaland rehearsal as a hand-made goal; the executor validates again and does not trust the review. - Why: Reachability was reviewed on a map, so a changed map invalidates it (§6.4, review M2); a
mid-step cancel would end the mission
stoppedby the outcome table (§6.4, flagged open in §12). - How: §6.4, §6.5.
- Alternatives rejected: none named.
- RFC status and section: Proposed rev 2; §6.4, §6.5.
- Who decided and when: the operator accepted the loop's shape 2026-11-26; the trigger list is the RFC's.
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: No.
RFC-0030-13: STOP and STOP ALL win outside the loop, and a mission stop latch in Mission Control blocks any further step; only a new mission clears it¶
Architecture ADR: ADR-0026.
- Decided: STOP ends the loop and does not resume on its own. Mission Control sets a latch
inside
core.stopandstop_allbefore they call the gate (so a robot that does not answer still latches), scoped to every mission whose robots include the stopped one (every mission for STOP ALL); the step-start path takes the same lock, checks the latch and starts the run in one critical section; the latch is Mission Control state, not the runner thread's; it is cleared "only by the operator starting a new mission, never by the thread and never by time". Safety rule: "after a STOP, no step of a mission that could move the stopped robot starts, in any state of the runner." - Why: Between steps no run is active,
_after_stopacts only whenrt.activeis set, and the gate grants a new lease at once with no memory of the STOP (§6.5, review C1). - How: §6.5; a STOP that skips
core.stop(another gate client, the deadman) is NOT covered and "must be closed before step 3 of section 7" (§12). - Alternatives rejected: none named.
- RFC status and section: Proposed rev 2; §6.5, §12.
- Who decided and when: advisor review C1 (critical), folded in 2026-11-26.
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: No.
core.py:195mentions a STOP latch only in the sense of RFC-0017 §3.4 (the lease ends the run); no mission latch exists.
RFC-0030-14: Three approval modes per mission; mode 3 (autonomous within a budget) is refused in code unless target and every bound robot are the simulator; default is confirm each step¶
Architecture ADR: ADR-0026.
- Decided: Modes: 1 confirm each step, 2 confirm when the plan changes, 3 autonomous within a
budget. Default is 1, and 1 always on a real robot; 2 once a planner has a stored record in the
scenario set; 3 only on the simulator, enforced when the approval is recorded and at every step
start (plan
targetissimand every bound robot hasvariant == "sim"). The automated review runs in every mode. The first version of auto runs on the simulator only. - Why: "A real robot needs the operator's decision in the room" (§6.5); mode 3 "is a rule in code (review L1)". Recommendation A as default, "always on the real robot" (§9 Q5).
- How: §6.5, §9 Q5; reads the profile like
mcp_server.sim_robot(:104-112). - Alternatives rejected: B (confirm when plan changes) as default; C as default (§9 Q5).
- RFC status and section: Proposed rev 2; §6.5, §9 Q5.
- Who decided and when: the operator, 2026-11-26 (Q5: recommendation with the reviewer's terms).
- Existing ADR: none
- Later changed by: not found in my RFCs. RFC-0031 §7.3 and Q4 explicitly copy this shape for learned controllers and GPU budgets.
- In code: No.
RFC-0030-15: A mission has hard budgets it cannot extend itself; an LLM auto mission needs a per-mission cost ceiling in planner.json; the LLM planner is optional and off by default¶
Architecture ADR: ADR-0026.
- Decided: Budgets (steps, wall minutes, LLM cost, distance); on exhaustion the loop stops
issuing and asks, never extends. An LLM auto mission does not start without a cost ceiling in
planner.json. The LLM planner exists only ifplanner.jsonexists; the matcher is always on. - Why: "A model that costs money and can be wrong should be asked for" (§9 Q3).
- How: §6.5, §9 Q3, §4.2
budgets; the spike cap is $1 LLM cost per mission and two working sessions (§9 Q4, a measured number, not a candidate). - Alternatives rejected: LLM planner on when a key is in the environment (§9 Q3 B).
- RFC status and section: Proposed rev 2; §6.5, §9 Q3.
- Who decided and when: the operator, 2026-11-26 (Q3: A with the reviewer's ceiling).
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: Partial. The optional LLM planner (
planner.json) is inlibs/missions/src/missions/planner.py(per §4.4 Built); the ceiling and budgets are not built.
RFC-0030-16: The auto loop first runs in Mission Control's process as a runner thread that holds no lease; thread failure and restart end the mission failed¶
Architecture ADR: ADR-0026.
- Decided: A thread per mission calls the planner's and reviewer's pure functions and submits
steps through the same entry as the HTTP API; it calls no adapter and holds no lease. An exception
ends the mission
failed; a heartbeat on the mission row marks a wedged runner; a mission foundrunningat startup is endedfailed("it was restarted"); nothing resumes. No safety property depends on the thread (the latch does not). - Why: "A mission dies with Mission Control, which fails safe"; a separate process "would need a rule for the dead planner and a token that can start a run" (§6.6). The restart rule is "my addition".
- How: §6.6; the dead-planner rule in §6.5.
- Alternatives rejected: B, its own process from the start as an API client (§9 Q6).
- RFC status and section: Proposed rev 2; §6.6, §9 Q6.
- Who decided and when: the operator, 2026-11-26 (Q6: A with the reviewer's thread rules and latch in Mission Control).
- Existing ADR: none
- Later changed by: not found in my RFCs.
- In code: No.
RFC-0030-17: Planning becomes its own process only when a named trigger fires, and then Mission Control stays the only starter of runs; the planner never holds the lease¶
Architecture ADR: ADR-0026.
- Decided: Triggers: heavy or long planning, fleet scheduling, its own UI, a different owner or release cadence, a model needing a GPU or long context. The split is then a transport change (the plan contract becomes an HTTP or MCP API; the planner is a client with the MCP server's rights).
- Why: Splitting early costs a second token that can start a run, a lease-holder question (the answer can only be Mission Control, else the planner becomes a safety component), a dead-planner rule, and RFC-0024's one-origin reasoning (§5, §8(b)).
- How: §5; the same triggers are reused for a Lab Bench by RFC-0031 §8.
- Alternatives rejected: (b) a separate app now (§8).
- RFC status and section: Proposed rev 2; §5, §8.
- Who decided and when: the RFC's recommendation, accepted with the module option (header, 2026-11-26).
- Existing ADR: none
- Later changed by: not found in my RFCs. RFC-0031 §8 adapts the list; it does not amend it.
- In code: n/a (no split exists). Unknown whether anything enforces it beyond the checker (No).
RFC-0030-18: RFC-0030 stands on its own and uses "mission" for a plan run, distinct from RFC-0005's flotilla case; the flotilla relation is deferred¶
- Decided: The two RFCs use "mission" for different things (a flotilla case with a spec vs a plan run with a state machine); flotilla may later be an outer approver identity and its autonomy ladder maps onto the approval modes. Nothing here depends on flotilla.
- Why: So that "the name
missionsdoes not decide the question by accident" (§13). - How: §13; IDEAS.md "With flotilla", item 5.
- Alternatives rejected: B, this RFC yields to flotilla; C, merge (§9 Q7).
- RFC status and section: Proposed rev 2; §9 Q7, §13. Deferred.
- Who decided and when: the operator, 2026-11-26 deferred it: "maybe"; discussed after MVP 2.
- Existing ADR: none
- Later changed by: not found in my RFCs. RFC-0031 §9 repeats the deferral.
- In code: n/a (naming and deferral).