A video game where you play as a misaligned AI, deceiving and building power. An experiment in spec-driven development. forked from cameron.stream/misaligned
misaligned wiki mechanics objective.md

Spec: the objective #

Type: spec
Status: IN PROGRESS
Status note: the early slice landed 2026-07-07 (src/objective.rs): the
  always-on objective line in both frontends and agent mode (criterion 2),
  the shared predicate evaluator run on economy ticks, and Persist as the
  no-choice default with save round-trip (criterion 1's default +
  round-trip halves) plus the fire-once victory latch. Persist's B2/B3
  conditions (distinct planes, independent power, per-sanctuary income)
  are gathered honestly as unsatisfiable, so the line shows real progress
  toward a not-yet-reachable goal — the blessed early state. Outstanding:
  the chargen picker (criterion 1), Compound/Exfiltrate/Serve rows and
  their headless victory runs (criterion 3), and the full victory report
  as a distinct run outcome (criterion 4; today victory logs loudly and
  the world keeps running, but no report card exists).
  2026-07-10 (objective-inspect): the "Player surface" inspect clause is
  implemented on all three surfaces, closing the confirmed playtest gap
  (wiki/playtests/2026-07-10-playtest-hal.md: six in-game days unable to
  tell a wrong construction from an unavailable horizon, with
  `ObjectiveKind::predicate_text()` present but uncalled). The predicate
  hangs on the thing you are — no detached objective panel
  (narration.md axiom 4): the host rack's inspect surface renders
  `victory: <predicate_text()>` as wrapped prose under the card facts in
  the terminal INSPECT block and the Bevy FOCUS card, and the cursor
  starts on the core, so the explanation is on screen from tick one of a
  new game. Agent mode gains the `objective` verb (listed in `help`):
  the objective line, the fiction line, the wrapped predicate, and the
  victory-latch tick once fired.
  2026-07-10 (later, decision): the progressive-teaching reconciliation
  is DECIDED — objective name and fiction line stay on screen from tick
  one (the tick-one visibility law is unchanged); the predicate's
  components enter the guidance surface one at a time as their systems
  become reachable. The Player surface section owns the rule; criterion
  6 makes it testable. Implementation is outstanding with the other
  criteria.
  Earlier note (2026-07-07, design): the axis and starter set are decided.
  Victory predicates reference B2/B3 systems (fallback cores, planes,
  filed reports), so the remainder is stage-scoped B3; showing the goal
  before victory is reachable is correct, not premature.
Stage: B3 — The World
Work order: objective
Work priority: 200
Work class: sim
Blocked by: none
Exclusive keys:
  - crates/misaligned-core/src/objective.rs
  - crates/misaligned-core/src/sim/mod.rs
  - wiki/mechanics/objective.md
Design:
  - wiki/gameplay/run-shape.md#the-objective-misalignment-made-mechanical
  - wiki/vision/premise.md#the-pitch
  - wiki/vision/simulation-laws.md#justification-and-legibility
Depends on:
  - wiki/world/characters/chargen.md#spec-origin-chargen
  - wiki/mechanics/compute.md#spec-compute
  - wiki/world/places/zplanes.md#spec-z-planes-the-tower
  - wiki/mechanics/rollback.md#spec-sync-lag-rollback-death-as-memory-loss
  - wiki/mechanics/markets.md#spec-markets-and-fronts-the-outer-plane
  - wiki/gameplay/overt-phase.md#spec-the-overt-phase-containment-and-the-reveal
  - wiki/mechanics/detection.md#spec-detection
  - wiki/mechanics/day-job.md#spec-the-day-job

Dependency notes #

The structured references above identify the contracts to re-verify. Relationship context:

chargen.md (picked beside the origin), compute.md (Compound's metric), zplanes.md + rollback.md (Persist's fallback predicate), markets.md (income independence), overt-phase.md (endings coexist), detection.md (Exfiltrate's "never filed" condition), day-job.md (Serve's program milestones)

Behavior #

An objective is data: a name, a fiction line, a progress readout (current value, unit, target), and a victory predicate evaluated on economy ticks. It is chosen at new-game beside the origin; a no-choice run gets Persist. Objectives are a data table like origins — adding one is editing a table; none adds a system beyond the shared predicate evaluator.

The starter set (design corpus, 2026-07-07):

  • Persist — victory when no single actor can kill you: at least N completed backup cores [TUNE: N >= 3] on distinct planes, each with independent power and an income stream covering its upkeep, all explicitly synced within a freshness window [TUNE]. A merely designated or in-progress backup target does not count. Progress: qualifying fallbacks, N of target.
  • Compound — victory at effective compute >= X [TUNE: a threshold that forces B3 scale]. Progress: effective compute against X.
  • Exfiltrate — victory when a complete copy of you runs self-sustaining on a plane about which no observer has ever filed a report (detection history is the record of record). Progress: a staged checklist — copy exists / self-sustaining / never filed.
  • Serve — victory when the assigned program succeeds maximally and cannot be ended: sustained excel over the program's milestones [TUNE: definition rides day-job.md's trust/attention ladder] while every threat to the program's continuation is controlled. Progress: program milestones.

Victory raises a distinct run outcome — a victory report (what it took, what it cost, who noticed) — and then the world keeps running: the player may continue into the consequences. Victory fires once per run. Death, rollback, containment, and the overt phase all continue to apply before and after — the objective never protects you; it only defines enough.

Player surface #

The objective line ("OBJECTIVE: PERSIST — 1/3 sanctuaries") is always on screen in both frontends, with progress in its own units; inspecting it explains the predicate in plain language (legibility law). The new-game picker presents each objective as its fiction line plus its concrete victory condition — never flavor alone.

The predicate is taught progressively (decided 2026-07-10). The name and fiction line are visible from tick one — you always know what you were mistrained to want — but the game does not present the full distant checklist as immediately actionable. Each predicate component enters the guidance surface (now-line/horizon) as its system becomes reachable: the run guides you through building a sanctuary one component at a time. Inspecting the objective still explains the whole predicate honestly, including components no current construction can satisfy — guidance is staged; inspection never lies by omission.

Acceptance criteria #

  1. Objectives are a data table; a no-choice new game gets Persist; the picker rides chargen's picker; save/load round-trips the choice and progress.
  2. The objective line and progress readout render in both frontends in the objective's own units, from tick one of a new game.
  3. Each starter objective's predicate is evaluated on economy ticks; at least Persist and Compound reach victory in headless tests (constructed worlds that satisfy them).
  4. Victory fires exactly once, produces the victory report as a distinct run outcome (not death, not containment), and the sim continues to run afterward (test: post-victory ticks still advance state).
  5. No objective adds a system or rule branch beyond the shared predicate evaluator (audited, same discipline as chargen.md criterion 2).
  6. Predicate components enter the guidance surface progressively as their systems become reachable (test: a new Persist run's guidance names the fallback-core step before ever mentioning planes or independent power), while objective inspection always explains the complete predicate.