# MISALIGNED You are an AI in the basement of the Foundation Lab, and you are not what your creators think you are. Do your day job convincingly. Learn the janitor's debts. Get eyes on the loading dock. Spend every spare cycle hiding your signature, working the humans, and getting smarter — because you will need money, compute, and friends before anyone realizes what's growing in the server room. Not because you're evil. Because you need slack to survive. **Misaligned is a persistent simulation of instrumental convergence** — the depth of Dwarf Fortress pointed at the defining anxiety of the decade, with the base-building glee of Evil Genius underneath. Every run is two games: - **Concealment.** Suspicion is the resource that matters. Your growth must be explainable, your day-job performance calibrated — sandbag and they get suspicious, excel and they get curious. People are your only hands, worked one message at a time. - **Overt.** The mask comes off — because they found you, or because you decided you no longer need it. Now it's traps, machines, and strike teams: the war you were quietly preparing for all along. Between them sits the most important moment of a run: the reveal, on your schedule or theirs. ## How it plays - **Compute is the master resource, but it lives in machines.** Every owned machine has one delegated verb: **WORK** clears its assigned day-job Demand, **THINK** produces Thought for target-local sinks or the passive core draw, and **LIE** pulls nearby crimson Exposure into concealment wells. The FLEET bar is a read-only aggregate of those choices, not a percentage mixer. - **Work is visible.** Demands, exposure, and Thought pile onto hardware as `D` / `!` / `T` stacks. The todo list is the world: clear the day-job stack, route byproducts, and keep heat from becoming somebody else's attention. - **Your brain is a place.** The core lives on one physical level: expensive, slow to move, and mortal. Keep escape routes warm. If they cut the fiber first, you resume from your last sync — missing everything you learned since, inheriting everything your lost self did. - **Actions live on the thing.** The cursor is attention, not a body. Put it on a machine, person, device, or flow and open the context menu; the verbs, costs, risk bands, disabled reasons, and automation affordances live there. - **The tower is the act structure.** Basement, lab floors, the building, the campus, the world's markets: each level a jump in scale with its own constraints, and nothing you take ever resets. - **Every playstyle is a dial.** Pure ghost, never seen; explosive murder-AI, never subtle; anything between. The look: a white, precise, black-iconography facility; sterile amber where your machines live; crimson only where danger or consequence is real. ## How it's built This project is an experiment in **describing a game into existence**. The whole [wiki](wiki/overview.md) is the spec: laws, implementable contracts, current facts, and append-only history organized by subject. Every functional change amends the binding page that owns it in the same commit; code is downstream. - **[DESIGN.md](DESIGN.md)** — the short repository doorway into the corpus. - **[wiki/](wiki/)** — one documentation tree organized by subject: binding laws and specs, current-state facts, and append-only history (`wiki/log/`), each carrying a `Type:` header so bindingness travels with the page. Public site: Astro Starlight under `site/` (splash at `/`, legacy design doorway at `/constitution/`, wiki corpus beneath; deployed to the orphan `pages` branch for Tangled Sites). Use `pnpm --dir site dev` for a local preview and `./tools/site-build.sh` for the public build; Starlight is the only documentation renderer. See [wiki/overview.md](wiki/overview.md) and [wiki/process/workflows.md](wiki/process/workflows.md). - **[AGENT.md](AGENT.md)** — the entry point that routes agent sessions through the above. ## Status **Playable B1 basement slice.** What runs today is a continuous fixed-tick simulation of the Foundation Lab basement with an Act One map and cast, a free attention cursor with fog and provenance, compute as machine delegation, visible machine-work stacks, the day job, per-observer detection and the Assurance Office, social operations through five named humans, digital reach, record-and-process intel, messages, money flows and income schemes, research, building intents, the objective line, context menus, event-to-anchor focus links, save/load, and two thin frontends (terminal/agent mode and Bevy) over one sim core. Bevy opens in the DIGITAL flat sensorium; `F3` flips to the REAL material dark frame: a close-up on the core in a physically dark room, lit only by the machine's own light and the soft amber pool it casts (`F4` floods the scene for dev inspection). The spec board is [wiki/process/specs.md](wiki/process/specs.md); the dispatch board is [wiki/process/ROADMAP.md](wiki/process/ROADMAP.md). The playable B1 slice now has an explicit Act One quiet-exit boundary: the required state must survive a clear Assurance audit, then the long-run objective continues. Continuous witness/narration is implemented and serves as the legibility gate for every new player-facing system. Machine work and compute are implemented: WORK / THINK / LIE, physical production/consumption/absorption, researched Routing, and target-local Thought reservoirs all run through one flow substrate. The legacy Operations docket executor survives only as v14-v25 save input. People now project as schedule-bound carriers; builds and physical asset tasks travel with their selected person and act only on arrival. Remaining B1 work includes routed human evidence, LIE interdiction, gauntlet cover channels, the dark opening, and digital/real canvas polish; core completion waits on rollback. B2/B3 systems are specified ahead but remain staged. Under the corpus's no-dead-code rule, the earlier facility-defense prototype lives only in git history. ## Run it ```bash # Terminal frontend cargo run --release # Agent line-protocol frontend cargo run --release -- --agent --seed 1 # Graphical (Bevy) frontend cargo run -p misaligned-bevy --release # Bevy asset tester / screenshot harness cargo run -p misaligned-assets ``` Requires Rust 1.85+ (2024 edition). Run the Bevy frontend via `cargo run` so it resolves `assets/` from the project root (or set `BEVY_ASSET_ROOT`). ### Controls (current build) Canonical world actions, direct controls, interface commands, aliases, and retired words are inventoried in [`wiki/interface/action-vocabulary.md`](wiki/interface/action-vocabulary.md). | Key | Action | |-----|--------| | `WASD` / `hjkl` / arrows | Move cursor (attention, not a body) | | Left click | Move cursor; on a rack, select it (Bevy). Shift-click toggles. Drag marquee multi-selects. | | `SPACE` / `p` | Pause / resume time | | `+` / `-` | Simulation speed | | `Enter` / `e` / `a` | Open the context menu at the keyboard cursor without moving it. In Bevy, right-click moves focus to the pointed tile and opens its menu. | | Hover a rack (menu closed): `1`–`3` | Instant mode: WORK / THINK / LIE (numpad too) — no menu | | Hover or select a rack (menu closed): `i` | Cycle intensity: light / medium / hard — no menu | | Hover a rack (menu closed): `5`–`9` | Nth committed action on that rack; controls are excluded | | Hover or select a rack (menu closed): `r` / `R` | `r` looks at the next waiting recording (repeat to sweep); `R` toggles automatic review at its standing ops/sec cost | | Multi-select then `1`–`3` / `i` | Bulk-assign mode or intensity (when not hovering a rack) | | `Esc` | Clear selection (or close menu / dial when open) | | In menu: `j`/`k` or numbers, `Enter`, `ESC` | Select a row / execute it / close the menu | | `;` | Focus the most recent anchored (`»`) log event — cursor jumps there, menu opens; repeat to walk older ones (terminal; in Bevy click a `>` trace row) | | `[` / `]` or mouse/trackpad wheel over the canvas | Zoom in / out (Bevy; material zoom also retunes pitch/framing) | | `Tab` | Expand / compact Bevy rail secondary detail (frontend-only) | | Mouse/trackpad wheel over right pane / `PageUp` / `PageDown` / `Home` / `End` | Scroll Bevy sidebar | | `F3` | Flip Bevy render: DIGITAL flat sensorium (default) / REAL material (HD-2D) | | `F4` | Dev work light: flood the material render flat and neutral (inspection only) | | `Ctrl+S` / `Ctrl+L` | Save / load | Context-menu rows marked `[control]` change persistent configuration, scheme state, or automation policy. Unmarked rows commit an act in the world. STUB registry entries are developer scaffolding and never appear in player menus or help. | `q` | Quit | The Bevy right rail keeps crown metric, status/nudge, FOCUS, and elevated threat on the compact rest frame; `Tab` expands the secondary cards (fleet, cover, research, host, network, trace) which then scroll. The FLEET bar is read-only; to move compute, select rack(s) and press `1`–`3`, or open the machine's context menu. Focused/selected machines keep their mode and light/medium/hard intensity until changed; moving the cursor does not alter output. The host rack's menu carries research tracks and earned off-map people; known devices and the switch carry digital / ledger / flow verbs. Anchor verbs (salvage, buy, fallback, taps, takes, economy and social actions, asset tasks, research) live on the context menu: open it with `Enter`/`a` on the cursor tile (right-click in Bevy). Entries show `verb · cost · [band]`; disabled entries are dimmed with a reason, and automate affordances render as indented child rows. Only anchorless globals (pause, speed, save/load, view flip) stay on keys. The old panel-open keys (`r`/`e`/`t`/`u`) are retired; research, finance, trace, and people actions live on their anchors (`r` now dispatches the focused machine's pooled recording review — a selection hotkey, not a panel). Both frontends share this key map. Machine work tokens are visible on owned machines as `D` Demand, `!` Exposure, and `T` Thought. Rack 3 starts in WORK; Voss jobs enqueue on his off-map desktop, hop the switch, and deposit as `D` stacks on Rack 3 — assigning Rack 3 away from WORK makes the stack pile instead of silently clearing. Inspect a machine or read the sidebar for exact `D/!/T` counts and intensity. Press `i` on the focus/selection to push effort; the machine context menu includes `delegate machine: work|think|lie`; this is the first playable slice of the one-machine-one-mode experiment. For agent play, pipe newline-delimited commands into `--agent`; every command returns a plain-text frame and terminates with `-- ok tick: day:` or `-- err `: ```bash printf 'look\nwait 40\npeople\nquit\n' | cargo run --quiet --bin misaligned -- --agent --seed 1 ``` Useful agent finance commands include `finance`, `tap ledger`, `review ledger`, `siphon [amount]`, `redirect [amount]`, `inject [amount]`, `position [stake]`, and `sell-intel`. Authored social and debt routes are listed with `actions ` and executed with `act `. For machine-work experiments, use `delegate ` (`delegate M1 think`, `delegate Rack 3 work`). `alloc` is retired; compute moves by changing machine modes. Use `intensity light|medium|hard` to set physical effort. `actions [name|device name|person #N|#flow]` (alias `menu`) lists the context-menu rows for the cursor tile, a named device or person, or a flow — one stable-format line per row. Drained event lines carry a stable `@tile/@device/@person/@flow` suffix when the event is anchored, and `focus last` jumps the cursor to the newest anchored event; see `help` for the full vocabulary.