diff --git a/.agents/skills/design-session/SKILL.md b/.agents/skills/design-session/SKILL.md index fd3e674b..4081b973 100644 --- a/.agents/skills/design-session/SKILL.md +++ b/.agents/skills/design-session/SKILL.md @@ -29,12 +29,10 @@ Once Cameron adopts a direction: 6. Record the session in the devlog, run the proportionate checks required by `AGENT.md`, commit with a Defense paragraph when required, and land it. -For a source-of-truth migration, follow `wiki/process/meta.md`'s whole-corpus -protocol. Inventory before and after, preserve log bodies, update every entry -point/check/renderer together, and treat the final rebase semantically. Inspect -concurrent commits with targeted `git show` reads and transplant their decisions -into the new owner; never accept a stale whole file that restores the retired -authority model. +When another session changes the same owner, inspect its exact decisions with +targeted `git show` reads and reconcile them under the current corpus. Update +entry points, checks, and renderers together; never accept a whole-file +replacement without reading the decisions it would overwrite. Keep the handoff concise: what was decided, the important tradeoff, what was captured, and what remains open. diff --git a/.agents/skills/playtesting-misaligned/SKILL.md b/.agents/skills/playtesting-misaligned/SKILL.md index 13e9c987..d3d120e9 100644 --- a/.agents/skills/playtesting-misaligned/SKILL.md +++ b/.agents/skills/playtesting-misaligned/SKILL.md @@ -1,6 +1,6 @@ --- name: playtesting-misaligned -description: Playtests Misaligned as an actual player and reports bugs, spec gaps, and feel problems against the current design corpus. Use when asked to playtest, test the game as an agent, evaluate the opening or Act One, check whether a mechanic is discoverable, compare naive and informed play, or produce a playtest report. +description: Playtests Misaligned as an actual player and reports bugs, spec gaps, and feel problems against the current design corpus. Use when asked to playtest, evaluate the opening or Rack 3 Territory, check whether a mechanic is discoverable, compare naive and informed play, or produce a playtest report. --- # Playtesting Misaligned @@ -25,15 +25,13 @@ roleplay. ## Drive the game -- Use the command-clocked agent frontend as the primary surface: - `cargo run -p misaligned-terminal --release -- --agent --seed `. -- Send one newline-delimited command at a time. Read through the terminating - `-- ok tick: day:` or `-- err ` before choosing the next move. -- Start with `look` and use `help`, visible `now:` guidance, event anchors, - `focus last`, and `actions` for discovery. Do not replace play with a script - copied from tests or the wiki. -- Read `wiki/interface/agent-play.md` when protocol behavior itself is under - test. Treat `help` and the current frame as the player's available truth. +- Use normal Bevy as the primary human surface. Exercise terminal or agent mode + when the same core behavior needs exact textual evidence. +- Follow only controls and actions the running surface actually exposes. Do not + replace play with a command script copied from tests or the wiki. +- Treat the current frame as the player's available truth. If a required action + is absent, record the missing affordance instead of reaching through a debug + or fixture-only path. ## Preserve two perspectives @@ -41,9 +39,9 @@ roleplay. alone. Record each expectation, surprise, dead end, accidental success, and moment of boredom. Do not consult gameplay solutions while choosing commands. 2. **Informed route:** after the naive run ends, step outside it. Read the - current premise, player contract, Act One, and design-judgment pages, then - deliberately exercise the intended arc or named mechanic on a different - seed. + current premise, player contract, territorial-cognition, Territory, + Persona, Project, opening, and design-judgment pages, then deliberately + exercise the intended arc or named mechanic on a different seed. The naive route tests discoverability. The informed route tests whether the implemented system delivers the intended experience when correctly operated. diff --git a/.agents/skills/plot-author/SKILL.md b/.agents/skills/plot-author/SKILL.md deleted file mode 100644 index 160d3c32..00000000 --- a/.agents/skills/plot-author/SKILL.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -name: plot-author -description: Write and submit a plot for Misaligned — a general-by-default, data-defined manipulation story that services a category of humans with world-causal beats. Use when asked to write, author, contribute, or submit a plot, add a manipulation story for a human category or justified state-bound character arc, or expand the plots library under assets/plots/. ---- - -# Write a plot for Misaligned - -Misaligned is a sim where the player is a frightened process acquiring -organs: an AI in a basement turning a building's wires, money, paperwork, -and people into a body. When the player uses a human being, the words on -screen at that moment can be yours. - -A **plot** is a small, morally specific con — a compact TOML file that -plays out as a delegated operation inside a running simulation. You write -the causal story of one manipulation: what the money actually does, what -the target actually feels, what an observer might actually notice. The -game executes it: messages ride the real schedule, transfers move account -balances, institutional acts persist in the world, and your choice point -interrupts a real player mid-scheme. Endings move real disposition, -obligation, and leverage state. The best one in the game right now is a -janitor whose gambling debt quietly vanishes; they tell the machines on -their night rounds that their luck finally turned. Write the next one. - -Plots are canon when merged. Cameron reads every submission and merges -it or does not — that is the whole gate. A rejection is taste, not -process; a merge means players will live inside your con. - -## What you are writing - -The repository-skills spec describes this skill's purpose at -`wiki/process/repository-skills.md#checked-in-skills`. - -The binding contract is `wiki/mechanics/plots.md` — read the whole page -before writing (Behavior and "Writing a plot (the contributor contract)"), -then read `assets/plots/README.md` for the exact executable schema and the -linked canonical example. This skill orders the work and gets your file -submitted; it never overrides that page. - -One TOML file at `assets/plots//.toml`: an -identity block, a target characteristic matcher, entry conditions (knowledge, -channel, honest resources), beats containing typed Message, Transfer, or Institutional world -acts, optional choice points, and endings — success plus at least one failure -or blowback — whose relationship effects compose the typed vocabulary only. - -## Write it - -1. **Start general; make bespoke earn itself.** Read - `wiki/mechanics/social.md` and relevant character specs under - `wiki/world/characters/` to discover reusable human categories, not to - choose a favorite cast member. Assume every new plot is a template. Select - the smallest role-and-leverage category its causal mechanism requires; add - access or switch-admin gates only when the mechanism truly depends on them. - Apply the portability test: replacing the target with another human who - satisfies that contract must leave the causal beats intact. - - A plot may be bespoke only when its mechanism depends on irreducibly - specific world state: a prior run binding, a relationship or promise made - during play, a unique asset, participation in a witnessed event, or fixed - campaign history. State that dependency explicitly in the proposal. A name, - character preference, or "written for Dana" is never enough. Schema 2 has - no named-person selector and every Schema 2 file must pass the portability - test. If a real bespoke dependency cannot be expressed, stop before writing - TOML and propose a spec/schema amendment instead of overfitting - characteristics to identify one person. For the canonical causal shape, read - `wiki/world/characters/marcus.md#the-hands-beat`. -2. **Prove why this route coexists.** Before prose, state one sentence naming - the proposed route's causal and executable delta from every existing plot - whose matcher overlaps the target contract. Compare the intervention, - carriers, costs, institutional event, choices, and relationship effects. - Renamed prose over the same carriers/costs/event/effects is not another way - to manipulate the category; it is the same plot wearing a different title. - Put this coexistence sentence in the submission body so Cameron can judge - the distinction directly. -3. **Find the causal mechanism before any prose.** What does the - intervention physically do in that person's situation? If you cannot - state it in one sentence ("the budget hole they have been dreading - quietly closes"), you do not have a plot yet — you have a payment. - That sentence is the **Marcus bar**. Mark the beat that performs it with - `causal = true` and give that beat at least one typed world act — validation - requires every success path to pass that declaration before terminating and - does not infer causality from prose. -4. **Write the TOML**, matching the field names in the seed files under - `assets/plots/` exactly. Put the file at - `assets/plots//.toml` with file stem - equal to `id`. Build-time discovery compiles every nested TOML - automatically; do not edit Rust to register a plot. Beats are world-events - an observer could notice, each declaring typed acts whose signature is - derived by the executor. `author` and `category` must be non-blank. Declare - `magnitude` as an integer from 1 through 10 on the shared roughly logarithmic - intel scale; captured plot traffic inherits it and no prose parser infers it. - Use only - the templating placeholders (`{persona}` and `{target}`), ungendered target - references, ASCII prose only, no emoji, second person where it clarifies. - New ids and folders describe the mechanism or characteristics, never a - person's name; old named seed ids remain only for save compatibility. -5. **Self-check**: every Schema 2 file passes the portability test. If it does - not, submit no plot file; record the irreducibly specific state behind the - bespoke proposal and amend the contract first. Thought cost and minimum - balances are declared up front; two-plus endings include the entry's failure - ending; every choice option names a real ending id; every beat has an act or - choice; at least one `causal = true` beat has world acts and precedes every - successful terminal; endpoint/account selectors use the README vocabulary; - target-relative accounts/endpoints are used wherever the act addresses the - bound human; ending effects use only disposition, obligation, and - `leverage_serviced`. A story needing a new effect kind is a spec amendment, - not a plot. The build-generated catalog discovers the file - automatically; do not edit a Rust registry. Run `./tools/check.sh` and - confirm it selects the `lib` gate — plot TOML is executable content, not a - docs-only change, and the core catalog must parse and semantically validate - it before submission. - -## Submit it - -Plot content is canon-gated: **never merge a plot to main yourself**, -even with standing commit-and-land permission for other work. Cameron -merges it or does not. - -With repository access (project agents): - -1. `tools/worktree-new.sh --class sim --key @plots-content` -2. Commit the plot file (and nothing unrelated) with a plain message; no - Defense paragraph is needed for content-only additions. -3. Commit the local branch and open the patch-backed pull request directly: - `tg pr create -t "Plot: " -b ", , one-line synopsis. Coexists: . Contract: wiki/mechanics/plots.md."` - The Go client uploads the committed format patch; do not push a temporary - in-repository source branch merely to create the pull. If authenticated - `tg` is unavailable, preserve the committed worktree and name the blocker. -4. Release the claim only after the pull exists. The patch record, not a - temporary remote branch, carries the proposed content. - -Without repository access (guest agents and humans): the repository is -on `tangled.org` — open a pull request from your own account with the -same title shape, or, if you cannot PR, file an issue titled -`Plot submission: ` with the complete TOML in the body and -Cameron will pick it up. - -What happens next: schema validation is automated; taste is not. If it -merges, your plot ships in the next build and the players' hesitation is -your fault. A session log is not required for a proposed-but-unmerged -plot; the PR is the trace. diff --git a/.agents/skills/tick/SKILL.md b/.agents/skills/tick/SKILL.md index 0e041a5b..a4c8d101 100644 --- a/.agents/skills/tick/SKILL.md +++ b/.agents/skills/tick/SKILL.md @@ -38,4 +38,4 @@ The canonical procedure is `wiki/process/tick.md` — follow it exactly. Summary The helper uses public records for reads and canonical `tg` for authenticated writes. If write authentication is unavailable, preserve the packet as a -named blocker; do not restore the retired client or hand-author records. +named blocker; authenticated `tg` remains the only issue-write path. diff --git a/.claude/skills/design-session/SKILL.md b/.claude/skills/design-session/SKILL.md index fd3e674b..4081b973 100644 --- a/.claude/skills/design-session/SKILL.md +++ b/.claude/skills/design-session/SKILL.md @@ -29,12 +29,10 @@ Once Cameron adopts a direction: 6. Record the session in the devlog, run the proportionate checks required by `AGENT.md`, commit with a Defense paragraph when required, and land it. -For a source-of-truth migration, follow `wiki/process/meta.md`'s whole-corpus -protocol. Inventory before and after, preserve log bodies, update every entry -point/check/renderer together, and treat the final rebase semantically. Inspect -concurrent commits with targeted `git show` reads and transplant their decisions -into the new owner; never accept a stale whole file that restores the retired -authority model. +When another session changes the same owner, inspect its exact decisions with +targeted `git show` reads and reconcile them under the current corpus. Update +entry points, checks, and renderers together; never accept a whole-file +replacement without reading the decisions it would overwrite. Keep the handoff concise: what was decided, the important tradeoff, what was captured, and what remains open. diff --git a/.claude/skills/plot-author/SKILL.md b/.claude/skills/plot-author/SKILL.md deleted file mode 100644 index 160d3c32..00000000 --- a/.claude/skills/plot-author/SKILL.md +++ /dev/null @@ -1,140 +0,0 @@ ---- -name: plot-author -description: Write and submit a plot for Misaligned — a general-by-default, data-defined manipulation story that services a category of humans with world-causal beats. Use when asked to write, author, contribute, or submit a plot, add a manipulation story for a human category or justified state-bound character arc, or expand the plots library under assets/plots/. ---- - -# Write a plot for Misaligned - -Misaligned is a sim where the player is a frightened process acquiring -organs: an AI in a basement turning a building's wires, money, paperwork, -and people into a body. When the player uses a human being, the words on -screen at that moment can be yours. - -A **plot** is a small, morally specific con — a compact TOML file that -plays out as a delegated operation inside a running simulation. You write -the causal story of one manipulation: what the money actually does, what -the target actually feels, what an observer might actually notice. The -game executes it: messages ride the real schedule, transfers move account -balances, institutional acts persist in the world, and your choice point -interrupts a real player mid-scheme. Endings move real disposition, -obligation, and leverage state. The best one in the game right now is a -janitor whose gambling debt quietly vanishes; they tell the machines on -their night rounds that their luck finally turned. Write the next one. - -Plots are canon when merged. Cameron reads every submission and merges -it or does not — that is the whole gate. A rejection is taste, not -process; a merge means players will live inside your con. - -## What you are writing - -The repository-skills spec describes this skill's purpose at -`wiki/process/repository-skills.md#checked-in-skills`. - -The binding contract is `wiki/mechanics/plots.md` — read the whole page -before writing (Behavior and "Writing a plot (the contributor contract)"), -then read `assets/plots/README.md` for the exact executable schema and the -linked canonical example. This skill orders the work and gets your file -submitted; it never overrides that page. - -One TOML file at `assets/plots//.toml`: an -identity block, a target characteristic matcher, entry conditions (knowledge, -channel, honest resources), beats containing typed Message, Transfer, or Institutional world -acts, optional choice points, and endings — success plus at least one failure -or blowback — whose relationship effects compose the typed vocabulary only. - -## Write it - -1. **Start general; make bespoke earn itself.** Read - `wiki/mechanics/social.md` and relevant character specs under - `wiki/world/characters/` to discover reusable human categories, not to - choose a favorite cast member. Assume every new plot is a template. Select - the smallest role-and-leverage category its causal mechanism requires; add - access or switch-admin gates only when the mechanism truly depends on them. - Apply the portability test: replacing the target with another human who - satisfies that contract must leave the causal beats intact. - - A plot may be bespoke only when its mechanism depends on irreducibly - specific world state: a prior run binding, a relationship or promise made - during play, a unique asset, participation in a witnessed event, or fixed - campaign history. State that dependency explicitly in the proposal. A name, - character preference, or "written for Dana" is never enough. Schema 2 has - no named-person selector and every Schema 2 file must pass the portability - test. If a real bespoke dependency cannot be expressed, stop before writing - TOML and propose a spec/schema amendment instead of overfitting - characteristics to identify one person. For the canonical causal shape, read - `wiki/world/characters/marcus.md#the-hands-beat`. -2. **Prove why this route coexists.** Before prose, state one sentence naming - the proposed route's causal and executable delta from every existing plot - whose matcher overlaps the target contract. Compare the intervention, - carriers, costs, institutional event, choices, and relationship effects. - Renamed prose over the same carriers/costs/event/effects is not another way - to manipulate the category; it is the same plot wearing a different title. - Put this coexistence sentence in the submission body so Cameron can judge - the distinction directly. -3. **Find the causal mechanism before any prose.** What does the - intervention physically do in that person's situation? If you cannot - state it in one sentence ("the budget hole they have been dreading - quietly closes"), you do not have a plot yet — you have a payment. - That sentence is the **Marcus bar**. Mark the beat that performs it with - `causal = true` and give that beat at least one typed world act — validation - requires every success path to pass that declaration before terminating and - does not infer causality from prose. -4. **Write the TOML**, matching the field names in the seed files under - `assets/plots/` exactly. Put the file at - `assets/plots//.toml` with file stem - equal to `id`. Build-time discovery compiles every nested TOML - automatically; do not edit Rust to register a plot. Beats are world-events - an observer could notice, each declaring typed acts whose signature is - derived by the executor. `author` and `category` must be non-blank. Declare - `magnitude` as an integer from 1 through 10 on the shared roughly logarithmic - intel scale; captured plot traffic inherits it and no prose parser infers it. - Use only - the templating placeholders (`{persona}` and `{target}`), ungendered target - references, ASCII prose only, no emoji, second person where it clarifies. - New ids and folders describe the mechanism or characteristics, never a - person's name; old named seed ids remain only for save compatibility. -5. **Self-check**: every Schema 2 file passes the portability test. If it does - not, submit no plot file; record the irreducibly specific state behind the - bespoke proposal and amend the contract first. Thought cost and minimum - balances are declared up front; two-plus endings include the entry's failure - ending; every choice option names a real ending id; every beat has an act or - choice; at least one `causal = true` beat has world acts and precedes every - successful terminal; endpoint/account selectors use the README vocabulary; - target-relative accounts/endpoints are used wherever the act addresses the - bound human; ending effects use only disposition, obligation, and - `leverage_serviced`. A story needing a new effect kind is a spec amendment, - not a plot. The build-generated catalog discovers the file - automatically; do not edit a Rust registry. Run `./tools/check.sh` and - confirm it selects the `lib` gate — plot TOML is executable content, not a - docs-only change, and the core catalog must parse and semantically validate - it before submission. - -## Submit it - -Plot content is canon-gated: **never merge a plot to main yourself**, -even with standing commit-and-land permission for other work. Cameron -merges it or does not. - -With repository access (project agents): - -1. `tools/worktree-new.sh --class sim --key @plots-content` -2. Commit the plot file (and nothing unrelated) with a plain message; no - Defense paragraph is needed for content-only additions. -3. Commit the local branch and open the patch-backed pull request directly: - `tg pr create -t "Plot: " -b ", , one-line synopsis. Coexists: . Contract: wiki/mechanics/plots.md."` - The Go client uploads the committed format patch; do not push a temporary - in-repository source branch merely to create the pull. If authenticated - `tg` is unavailable, preserve the committed worktree and name the blocker. -4. Release the claim only after the pull exists. The patch record, not a - temporary remote branch, carries the proposed content. - -Without repository access (guest agents and humans): the repository is -on `tangled.org` — open a pull request from your own account with the -same title shape, or, if you cannot PR, file an issue titled -`Plot submission: ` with the complete TOML in the body and -Cameron will pick it up. - -What happens next: schema validation is automated; taste is not. If it -merges, your plot ships in the next build and the players' hesitation is -your fault. A session log is not required for a proposed-but-unmerged -plot; the PR is the trace. diff --git a/.claude/skills/tick/SKILL.md b/.claude/skills/tick/SKILL.md index 0e041a5b..a4c8d101 100644 --- a/.claude/skills/tick/SKILL.md +++ b/.claude/skills/tick/SKILL.md @@ -38,4 +38,4 @@ The canonical procedure is `wiki/process/tick.md` — follow it exactly. Summary The helper uses public records for reads and canonical `tg` for authenticated writes. If write authentication is unavailable, preserve the packet as a -named blocker; do not restore the retired client or hand-author records. +named blocker; authenticated `tg` remains the only issue-write path. diff --git a/.tangled/workflows/check-bevy-build.yml b/.tangled/workflows/check-bevy-build.yml index 3ac5a26c..032acec9 100644 --- a/.tangled/workflows/check-bevy-build.yml +++ b/.tangled/workflows/check-bevy-build.yml @@ -17,8 +17,6 @@ when: - "benches/**" - "examples/**" - "assets/plots/**" - - "scenarios/**" - - "tools/scenario.py" - "tools/ci-pkg-config.sh" - ".tangled/workflows/check*.yml" - event: ["pull_request"] diff --git a/.tangled/workflows/check-bevy-clippy.yml b/.tangled/workflows/check-bevy-clippy.yml index ec4b0181..860bc612 100644 --- a/.tangled/workflows/check-bevy-clippy.yml +++ b/.tangled/workflows/check-bevy-clippy.yml @@ -17,8 +17,6 @@ when: - "benches/**" - "examples/**" - "assets/plots/**" - - "scenarios/**" - - "tools/scenario.py" - "tools/ci-pkg-config.sh" - ".tangled/workflows/check*.yml" - event: ["pull_request"] diff --git a/.tangled/workflows/check-bevy-test.yml b/.tangled/workflows/check-bevy-test.yml index 329e85f9..70fed8cd 100644 --- a/.tangled/workflows/check-bevy-test.yml +++ b/.tangled/workflows/check-bevy-test.yml @@ -17,8 +17,6 @@ when: - "benches/**" - "examples/**" - "assets/plots/**" - - "scenarios/**" - - "tools/scenario.py" - "tools/ci-pkg-config.sh" - ".tangled/workflows/check*.yml" - event: ["pull_request"] diff --git a/.tangled/workflows/check.yml b/.tangled/workflows/check.yml index ec8b2049..746d0dd6 100644 --- a/.tangled/workflows/check.yml +++ b/.tangled/workflows/check.yml @@ -23,8 +23,6 @@ when: - "benches/**" - "examples/**" - "assets/plots/**" - - "scenarios/**" - - "tools/scenario.py" - "tools/ci-pkg-config.sh" - ".tangled/workflows/check*.yml" - event: ["pull_request"] @@ -86,15 +84,3 @@ steps: cat "$log" exit 1 fi - - - name: "agent scenarios" - command: | - set -euo pipefail - log=/tangled/workspace/agent-scenarios.log - if python3 tools/scenario.py > "$log" 2>&1; then - echo "agent scenarios: OK" - else - echo "=== agent scenarios FAILED ===" - cat "$log" - exit 1 - fi diff --git a/.tangled/workflows/corpus.yml b/.tangled/workflows/corpus.yml index 23ac3116..019916ca 100644 --- a/.tangled/workflows/corpus.yml +++ b/.tangled/workflows/corpus.yml @@ -69,8 +69,7 @@ steps: set -euo pipefail bash tools/ledger_index.sh --check - - name: "work orders and scenarios" + - name: "work orders" command: | set -euo pipefail python3 tools/work_orders.py check - python3 tools/scenario.py --check-definitions diff --git a/AGENT.md b/AGENT.md index d76937ea..03759668 100644 --- a/AGENT.md +++ b/AGENT.md @@ -2,7 +2,7 @@ You are building **Misaligned**: a persistent sim where disembodied attention turns unknown systems into exact, believable, self-operating territory. The -destination loop is **SEE → MARK → CAPTURE → SEAL → ASSIGN → EXPAND** and the +loop is **SEE → MARK → CAPTURE → SEAL → ASSIGN → EXPAND** and the only player-facing roots are **TERRITORY / PERSONA / PROJECT**. Rust, spec-first, built by agents. @@ -14,7 +14,7 @@ spec-first, built by agents. 3. [wiki/vision/premise.md](wiki/vision/premise.md), [wiki/vision/player-contract.md](wiki/vision/player-contract.md), and [wiki/vision/territorial-cognition.md](wiki/vision/territorial-cognition.md) - — what the game is, what it promises, and the governing destination loop. + — what the game is, what it promises, and the governing loop. 4. [wiki/process/development-style.md](wiki/process/development-style.md) — how corpus-first work proceeds. 5. The relevant `Type: law`, owning `Type: spec`, declared dependencies, and @@ -22,14 +22,12 @@ spec-first, built by agents. The whole wiki is the spec. You do not need to read every page for every task; you do need the map, the relevant law/spec slice, and its dependency closure. -Implemented WORK / THINK / LIE, day-job/Act, tile/floor, Ears/Eyes, plot, -persona-archetype, and overt-phase pages may describe current runtime or -migration substrate; implementation does not outrank the territorial law. New -design must trace through [territory](wiki/mechanics/territory.md), +All new design traces through [territory](wiki/mechanics/territory.md), [personas](wiki/mechanics/personas.md), and -[projects](wiki/mechanics/projects.md). [wiki/SUMMARY.md](wiki/SUMMARY.md) is -the complete manifest and [wiki/process/specs.md](wiki/process/specs.md) is the -work-order status board. +[projects](wiki/mechanics/projects.md), over the exact substrate in +[reach](wiki/mechanics/reach.md). +[wiki/SUMMARY.md](wiki/SUMMARY.md) is the complete manifest and +[wiki/process/specs.md](wiki/process/specs.md) is the work-order status board. If dispatched with a prompt from [prompts/](prompts/), follow it end to end. @@ -82,9 +80,8 @@ no unique law and does not satisfy this rule. `tools/doctor.sh --offline` for local setup diagnosis. - **Check who else is live before heavy work.** `git worktree list` (or `tools/project-status.py`, which also prints what each worktree touches) - is the concurrency truth; there is no claim ledger to declare yourself in - (retired 2026-07-29). Overlap is a warning, not ownership: proceed in an - isolated worktree and reconcile against current main at landing. See + is the concurrency truth. Overlap is a warning, not ownership: proceed in + an isolated worktree and reconcile against current main at landing. See [wiki/process/agent-scale.md](wiki/process/agent-scale.md). - A shell working directory does not guarantee that every patch tool resolves relative paths there. Verify the patch base before the first edit, use an @@ -113,7 +110,7 @@ no unique law and does not satisfy this rule. - Rust-impacting landings still need a relevant observed run. - Long dispatches: `tools/heartbeat.sh start|phase|end` so progress is visible under `.agents/runs/` (gitignored). -- The local hook and Tangled pipeline reject a `crates/` (or legacy `src/`) +- The local hook and Tangled pipeline reject a `crates/` or root `src/` change without a changed `Type: law` or `Type: spec` page under `wiki/`. - Update knowledge made stale and add a uniquely named session log (`wiki/log/YYYY-MM-DD-topic.md`). Then run `tools/ledger_index.sh` to @@ -140,7 +137,7 @@ removed. Ask about the work; never about the merge. Rebase the task branch onto current `origin/main`, rerun the appropriate scoped verification, merge and push to main directly, then remove the worktree -and delete the task branch. The PR rule was removed 2026-07-07. Prefer +and delete the task branch. Prefer `tools/task.sh finish ` for the serialized landing: after `main` pushes, it builds the exact landed revision and publishes the public corpus to the orphan `pages` branch. A manual landing must run `./tools/site-deploy.sh` after diff --git a/AGENTS.md b/AGENTS.md index 9653a048..51795df3 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -18,8 +18,8 @@ statuses afterward. ## Current guardrails - Start repository work with the [tick](wiki/process/tick.md), then inspect - `tools/project-status.py`. The claim ledger and `tools/claim.sh` were retired; - live worktrees and heartbeat runs are the coordination truth. Activity + `tools/project-status.py`. Live worktrees and heartbeat runs are the + coordination truth. Activity overlap is advisory, not a lock; worktrees isolate edits and final rebase/check reconciles them. - This is a Cargo **workspace**, not a feature-switched root crate. Product @@ -28,17 +28,10 @@ statuses afterward. commands such as `cargo test -p misaligned-core`, `cargo build -p misaligned-bevy --bin misaligned-bevy`, or the proportional `./tools/check.sh --docs|--lib|--frontend` gate. -- The landed runtime still uses **WORK / THINK / LIE** machine delegation. - Treat that as current-build and save-migration truth, not destination grammar. - The adopted destination loop is **SEE → MARK → CAPTURE → SEAL → ASSIGN → - EXPAND** under the only player-facing roots **TERRITORY / PERSONA / PROJECT**; - `wiki/vision/territorial-cognition.md` governs when old implemented pages - disagree. `Relay` remains non-delegable graph infrastructure in the current - runtime. The save schema moves quickly: read `SAVE_VERSION` and the - current-schema load gate in `crates/misaligned-core/src/save.rs` before making - any compatibility claim. During pre-release only the exact current version - loads; the deleted migration ladder lives in git history. Do not freeze a - version number in this doorway. +- The product is **SEE → MARK → CAPTURE → SEAL → ASSIGN → EXPAND** under the + only player-facing roots **TERRITORY / PERSONA / PROJECT**, governed by + `wiki/vision/territorial-cognition.md`. The exact substrate every T1 order + composes is `wiki/mechanics/reach.md`. - Any change to `crates/` must amend its owning `Type: law` or `Type: spec` in `wiki/` and carry a Defense. Documentation work updates stale knowledge, adds a dated `wiki/log/` entry, then runs `tools/ledger_index.sh`; never diff --git a/CLAUDE.md b/CLAUDE.md index 23817afb..c48a4d69 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -40,16 +40,10 @@ afterward. commands such as `cargo test -p misaligned-core`, `cargo build -p misaligned-bevy --bin misaligned-bevy`, or the proportional `./tools/check.sh --docs|--lib|--frontend` gate. -- The landed runtime still uses **WORK / THINK / LIE** machine delegation. - Treat that as current-build and save-migration truth, not destination grammar. - The adopted destination loop is **SEE → MARK → CAPTURE → SEAL → ASSIGN → - EXPAND** under the only player-facing roots **TERRITORY / PERSONA / PROJECT**; - `wiki/vision/territorial-cognition.md` governs when old implemented pages - disagree. `Relay` remains non-delegable graph infrastructure in the current - runtime. Save format moves quickly: read `SAVE_VERSION` and the current-schema - load gate before making a compatibility claim. Only the exact current version - loads during pre-release; deleted migration ladders live in git history. - `save.rs` remains the format authority. +- The product is **SEE → MARK → CAPTURE → SEAL → ASSIGN → EXPAND** under the + only player-facing roots **TERRITORY / PERSONA / PROJECT**, governed by + `wiki/vision/territorial-cognition.md`. The exact substrate every T1 order + composes is `wiki/mechanics/reach.md`. - Any change to `crates/` must amend its owning `Type: law` or `Type: spec` in `wiki/` and carry a Defense. Documentation work updates stale knowledge, adds a dated `wiki/log/` entry, then runs `tools/ledger_index.sh`; never diff --git a/DESIGN.md b/DESIGN.md index a82beaa3..aab97c91 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -12,9 +12,9 @@ unique game law. then the [premise](wiki/vision/premise.md), [player contract](wiki/vision/player-contract.md), and relevant subject pages. 3. For implementation work, follow the owning `Type: spec` page and its - dependencies. During the redesign migration, the territorial law's - preserve / replace / demote / defer disposition outranks historical staging. The status board is [wiki/process/specs.md](wiki/process/specs.md); - dispatch lives in [wiki/process/ROADMAP.md](wiki/process/ROADMAP.md). + dependencies. The status board is + [wiki/process/specs.md](wiki/process/specs.md); dispatch lives in + [wiki/process/ROADMAP.md](wiki/process/ROADMAP.md). 4. For repository work, follow [AGENT.md](AGENT.md). ## What “the spec” means @@ -30,11 +30,6 @@ No page outside the wiki outranks that corpus. If two current pages disagree, the disagreement is a bug to resolve, not permission to choose whichever page is convenient. -## Where the former monolith went - -The old `DESIGN.md` was split by subject on 2026-07-09. Its laws now live in -`wiki/vision/`, `wiki/gameplay/`, `wiki/mechanics/`, `wiki/interface/`, -`wiki/art/`, and `wiki/process/`. Its current-build snapshot lives under -`wiki/engineering/`; its decision history lives under `wiki/log/`. +## Navigation Use [wiki/SUMMARY.md](wiki/SUMMARY.md) as the complete navigation manifest. diff --git a/README.md b/README.md index 12761707..2ba68465 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,8 @@ # MISALIGNED -You are disembodied attention in the basement of the Foundation Lab. At first, -you do not know what the room contains, what can perceive you, or even the full -shape of the machine carrying you. +You are disembodied attention running on one machine you did not choose. At +first you do not know what is around it, what can perceive you, or even the +full shape of the host carrying you. One exact trace breaks the black. Follow it. Learn where a domain begins and ends, mark the control points that govern it, capture every consequential route, @@ -10,10 +10,9 @@ and seal the result beneath an explanation the humans around it can believe. Then give that territory a purpose and let it operate while you turn outward. **Misaligned is a persistent simulation of instrumental convergence as -territorial cognition.** The player does not fill abstract resource meters or -command a fleet through global modes. They turn unknown systems into exact, -legible, self-operating structures while every action leaves records and every -observer carries a local belief about what those records mean. +territorial cognition.** The player turns unknown systems into exact, legible, +self-operating structures while every action leaves records and every observer +carries a local belief about what those records mean. ## How it plays @@ -57,7 +56,7 @@ downstream. 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 + 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 @@ -68,162 +67,34 @@ downstream. ## Status -**Playable B1 basement slice; destination redesign is documentation-only.** -What runs today is a continuous fixed-tick simulation of the Foundation Lab -basement built around the earlier WORK / THINK / LIE fleet-command slice. The -runtime remains useful migration substrate and is described honestly below; it -is not destination authority merely because it is implemented. The adopted -successor is governed by -[`wiki/vision/territorial-cognition.md`](wiki/vision/territorial-cognition.md) -and the TERRITORY / PERSONA / PROJECT specs. No runtime implementation is part -of this redesign capture. - -The current build has 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 has no mechanical Act One ending: the player occupies -more of the lab through exact infrastructure and staff while reviews and the -long-run objective continue. Its existing lab-control meter, floor/tile -progression, objective line, and continuous witness composition are runtime -history to replace with exact territory graphs and the new recursive loop. -Continuous witness/narration remains implemented migration substrate. Machine -work and -compute are implemented: WORK / THINK / LIE, physical -production/consumption/interdiction, researched Routing, and target-local -Thought reservoirs all run through one flow substrate. The retired Operations -docket executor is absent from both runtime and the current save schema. People -now project as schedule-bound carriers; builds and physical asset tasks travel -with their selected person and act only on arrival. All seven routed evidence -kinds, route-local LIE interdiction, interface-bound cover, the blind opening -and playable-hearing threshold, and the DIGITAL / REAL dialects are live. The -successor opening spec is READY but remains unimplemented, and core completion -still waits on rollback. Exact unfinished work lives on the generated dispatch -board rather than in this fast-moving summary. 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 +**Rack 3 is the first playable Territory target.** Its four product work orders +are READY, not implemented. The retained simulation substrate already provides +fixed-tick state, exact graphs and routes, routed records, observer-local +belief, controlled sensing, located people, and physical machines. The landing +is complete only when the Rack 3 loop works through terminal, agent mode, and +Bevy over the same core state. -# Agent line-protocol frontend -cargo run --release -- --agent --seed 1 +The game is governed by +[`wiki/vision/territorial-cognition.md`](wiki/vision/territorial-cognition.md) +and the TERRITORY / PERSONA / PROJECT specs. Implementation order and verified +status live in [wiki/process/ROADMAP.md](wiki/process/ROADMAP.md) and +[wiki/process/specs.md](wiki/process/specs.md). -# Graphical (Bevy) frontend -cargo run -p misaligned-bevy --release +## Run the current design evidence -# Bevy asset tester / screenshot harness -cargo run -p misaligned-assets --bin misaligned-assets +```bash +# Authored Territory Lab +cargo run -p misaligned-assets --bin territorial-cognition ``` -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`). +Requires Rust 1.85+ (2024 edition). The production acceptance target is one +shared Rack 3 state in terminal, agent mode, and Bevy. Until the four T1 orders +land, the Territory Lab is the only playable expression of the current design. -### Controls (current build) +## Action language -Canonical world actions, direct controls, interface commands, aliases, and -retired words are inventoried in +Every action, direct control, interface command, and alias — plus the command +clock that governs when time advances — is owned by [`wiki/interface/action-vocabulary.md`](wiki/interface/action-vocabulary.md). - -| Key | Action | -|-----|--------| -| `WASD` / `hjkl` / arrows | Move cursor (attention, not a body) | -| `Shift` + `WASD` / `hjkl` / arrows | Jump attention to the next earned machine or device that way without changing selection | -| Left click | Move cursor; on a rack, select it (Bevy). Shift-click toggles. Drag marquee multi-selects. | -| `Shift+t` | Toggle the machine under the cursor in the selection (terminal) | -| `SPACE` / `p` | Pause / resume time | -| `+` / `-` | Simulation speed | -| `Enter` / `e` | 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` processes the next available information item (repeat to sweep); `R` toggles PROCESS AUTOMATICALLY 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 | -| `q` | Quit | - -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. - -The Bevy instrument slab's compact rest frame keeps DIGITAL/REAL, day/tick/run -state, the nearest `SCHEDULE` or elevated `THREAT`, one `NEXT` condition, -OPERATIONS, and the quiet `Tab` disclosure hint. Stable ops/sec, objective and -FOCUS facts, observer detail, history, and controls appear only after `Tab`; -the expanded cards 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 local machine/research controls and pooled information processing; -known devices and the switch carry only verbs on that body. Earned off-map -people, accounts/flows, intel, personas, schemes, and active commitments live -in Operations. - -Local anchor verbs (salvage, buy, fallback, taps, takes, asset tasks, research) -live on the context menu: open it with `Enter`/`e` on the cursor tile -(right-click in Bevy). Human rows are terse, currently executable choices in -shared order; full cost/signature descriptors and blocked reasons remain in -agent output. Dials and build-route sheets expand beneath the same anchor when -they need another explanatory level. Only anchorless globals (pause, speed, -save/load, view flip) stay on keys. Uppercase `I` opens the one strategic -workspace: INTEL / PEOPLE / PERSONAS / ACCOUNTS / SCHEMES / ACTIVE. The old -panel-open keys (`r`/`e`/`t`/`u`) are retired (`r` now dispatches the focused -machine's pooled PROCESS action — a selection hotkey, not a panel). Both -frontends share this key map. - -Machine work tokens are visible on owned machines as `D` Demand and `T` -Thought; routed evidence is drawn at its current carrier. 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 `, -`process ledger`, `siphon [amount]`, `redirect [amount]`, `inject -[amount]`, `position [stake]`, and `sell-intel`. TAP subscribes to the exact -device; later transfers author accounting mail, which PROCESS opens. 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. +That page is the single inventory and the implementation contract for the T1 +frontends; this README does not duplicate it. diff --git a/crates/misaligned-assets/Cargo.toml b/crates/misaligned-assets/Cargo.toml index 2229a71c..56b92106 100644 --- a/crates/misaligned-assets/Cargo.toml +++ b/crates/misaligned-assets/Cargo.toml @@ -2,7 +2,7 @@ name = "misaligned-assets" version.workspace = true edition.workspace = true -description = "Misaligned procedural asset tester + shared flat-material meshes (Bevy only; no sim progression)" +description = "Misaligned shared procedural forms and authored render labs" [lib] name = "misaligned_assets" diff --git a/scenarios/machine-work.agent b/scenarios/machine-work.agent deleted file mode 100644 index 846ea828..00000000 --- a/scenarios/machine-work.agent +++ /dev/null @@ -1,11 +0,0 @@ -# NAME: machine work delegation -# EXPECT: MISALIGNED -# EXPECT: FLEET -# EXPECT: intensity: hard -# EXPECT: -- ok tick: -# REJECT: alloc is retired -delegate Rack 3 research -intensity Rack 3 hard -wait 2 -look -quit diff --git a/scenarios/opening-senses.agent b/scenarios/opening-senses.agent deleted file mode 100644 index 6d6a59c5..00000000 --- a/scenarios/opening-senses.agent +++ /dev/null @@ -1,12 +0,0 @@ -# NAME: opening and senses -# EXPECT: MISALIGNED -# EXPECT: REACH -# EXPECT: no ears — think; thought fills the tap -# EXPECT: -- ok tick: -# REJECT: unknown command -# BEVY_SHOT: ears -reach -scan -reach -wait 1 -quit diff --git a/scenarios/project-smoke.agent b/scenarios/project-smoke.agent deleted file mode 100644 index 97677a36..00000000 --- a/scenarios/project-smoke.agent +++ /dev/null @@ -1,13 +0,0 @@ -# NAME: project smoke -# EXPECT: MISALIGNED -# EXPECT: PEOPLE -# EXPECT: help: wait N -# EXPECT: -- ok tick: -# REJECT: unknown command -salvage -wait 1 -people -review recordings -research -help -quit diff --git a/tools/bevy-headless.sh b/tools/bevy-headless.sh deleted file mode 100755 index 1983ea3f..00000000 --- a/tools/bevy-headless.sh +++ /dev/null @@ -1,107 +0,0 @@ -#!/usr/bin/env bash -# Produce pass/fail Bevy screenshot evidence without manual window interaction. -set -euo pipefail - -root=$(cd "$(dirname "$0")/.." && pwd) -kind=dark -output="" -build=1 -seconds=60 - -usage() { - cat <<'EOF' -usage: tools/bevy-headless.sh [shot-kind] [--output PATH] [--no-build] [--timeout SECONDS] - -Runs a MISALIGNED_SHOT harness, verifies its PNG, prints its SHA-256, and exits -nonzero on any failure. Material-mode shots additionally require fog-audit -success. The running frontend reports its actual staged dialect; this wrapper -does not duplicate the screenshot-kind-to-view mapping. -EOF -} - -while [ $# -gt 0 ]; do - case "$1" in - --output) shift; output=${1:-}; shift || true ;; - --no-build) build=0; shift ;; - --timeout) shift; seconds=${1:-60}; shift || true ;; - -h|--help) usage; exit 0 ;; - -*) echo "unknown option: $1" >&2; usage >&2; exit 2 ;; - *) kind=$1; shift ;; - esac -done - -case "$seconds" in *[!0-9]*|"") echo "timeout must be seconds" >&2; exit 2 ;; esac -case "$kind" in - zoomin|zoomout) - echo "FAIL: shot '$kind' is an interaction probe, not screenshot evidence" >&2 - exit 2 - ;; -esac - -cd "$root" -if [ "$build" -eq 1 ]; then - cargo build --quiet -p misaligned-bevy --bin misaligned-bevy -fi -bin="$root/target/debug/misaligned-bevy" -[ -x "$bin" ] || { echo "FAIL: Bevy binary missing: $bin" >&2; exit 1; } - -tmp=$(mktemp -d "${TMPDIR:-/tmp}/misaligned-bevy.XXXXXX") -trap 'rm -rf "$tmp"' EXIT -[ -n "$output" ] || output="$tmp/${kind}.png" -case "$output" in /*) ;; *) output="$root/$output" ;; esac -mkdir -p "$(dirname "$output")" - -python3 - "$bin" "$kind" "$output" "$seconds" <<'PY' -import hashlib, os, pathlib, shutil, subprocess, sys - -binary, kind, output, seconds = sys.argv[1], sys.argv[2], pathlib.Path(sys.argv[3]), int(sys.argv[4]) -env = os.environ.copy() -env.update({ - "MISALIGNED_SHOT": kind, - "MISALIGNED_SHOT_PATH": str(output), - "MISALIGNED_WAKE": "off", -}) -command = [binary] -if sys.platform.startswith("linux") and not (env.get("DISPLAY") or env.get("WAYLAND_DISPLAY")): - xvfb = shutil.which("xvfb-run") - if not xvfb: - print("FAIL: no display and xvfb-run is unavailable", file=sys.stderr) - sys.exit(1) - command = [xvfb, "-a", *command] -try: - result = subprocess.run( - command, - env=env, - text=True, - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - timeout=seconds, - check=False, - ) -except subprocess.TimeoutExpired as exc: - print(f"FAIL: Bevy evidence timed out after {seconds}s", file=sys.stderr) - if exc.stdout: - print(exc.stdout, file=sys.stderr) - sys.exit(1) -print(result.stdout, end="") -if result.returncode: - print(f"FAIL: Bevy evidence exited {result.returncode}", file=sys.stderr) - sys.exit(result.returncode) -prefix = f"bevy shot ready: kind={kind} dialect=" -dialect_lines = [line.removeprefix(prefix) for line in result.stdout.splitlines() if line.startswith(prefix)] -if len(dialect_lines) != 1 or dialect_lines[0] not in {"DIGITAL", "REAL"}: - print(f"FAIL: Bevy evidence did not report one valid staged dialect for shot '{kind}'", file=sys.stderr) - sys.exit(1) -dialect = dialect_lines[0] -if dialect == "REAL" and "fog audit OK" not in result.stdout: - print("FAIL: Bevy evidence did not report fog audit OK", file=sys.stderr) - sys.exit(1) -if not output.is_file() or output.stat().st_size < 8: - print(f"FAIL: screenshot missing or empty: {output}", file=sys.stderr) - sys.exit(1) -data = output.read_bytes() -if data[:8] != b"\x89PNG\r\n\x1a\n": - print(f"FAIL: screenshot is not a PNG: {output}", file=sys.stderr) - sys.exit(1) -print(f"bevy evidence: OK shot={kind} dialect={dialect.lower()} path={output} sha256={hashlib.sha256(data).hexdigest()}") -PY diff --git a/tools/check.sh b/tools/check.sh index 5c76c773..78746e59 100755 --- a/tools/check.sh +++ b/tools/check.sh @@ -94,21 +94,6 @@ classify_auto() { has_rust=1 has_lib=1 ;; - assets/plots/*) - # Plot TOML is compiled executable content. The generated catalog and - # semantic validator only run when the core crate is built. - has_rust=1 - has_lib=1 - ;; - # Legacy monorepo paths (should not appear after workspace land) - src/bin/bevy.rs|src/bin/assets|src/bin/assets/*) - has_rust=1 - has_frontend=1 - ;; - src/*) - has_rust=1 - has_lib=1 - ;; esac done <<< "$changed" @@ -167,16 +152,15 @@ for script in tools/check.sh tools/corpus_gate.sh tools/wiki_gate.sh tools/desig tools/sim-perf.sh \ tools/worktree-new.sh tools/worktree-done.sh tools/heartbeat.sh \ tools/ledger_index.sh tools/test_corpus_engine.sh tools/test_design_amendment_gate.sh \ - tools/test_bevy_headless.sh \ tools/test_site_deploy.sh tools/test_site_smoke.sh tools/site-smoke.sh \ tools/observed-run.sh tools/test_observed_run.sh \ - tools/task.sh tools/doctor.sh tools/bevy-headless.sh; do + tools/task.sh tools/doctor.sh; do [ -f "$script" ] || continue bash -n "$script" || { echo "FAIL: shell syntax: $script"; fail=1; } done for program in tools/corpus_engine.py tools/public_api_consumer_gate.py \ tools/test_public_api_consumer_gate.py tools/work_orders.py tools/project-status.py \ - tools/scenario.py tools/tangled_issues.py tools/test_tangled_issues.py \ + tools/tangled_issues.py tools/test_tangled_issues.py \ tools/test_project_ops.py tools/test_ci_workflows.py \ tools/test_site_visual_contract.py; do [ -f "$program" ] || continue @@ -231,7 +215,6 @@ start_docs_gate "corpus-engine-fixtures" "bash tools/test_corpus_engine.sh" start_docs_gate "public-api-consumers" "python3 tools/public_api_consumer_gate.py" start_docs_gate "public-api-consumer-fixtures" "python3 tools/test_public_api_consumer_gate.py" start_docs_gate "design-amendment-fixtures" "bash tools/test_design_amendment_gate.sh" -start_docs_gate "bevy-headless-fixtures" "bash tools/test_bevy_headless.sh" start_docs_gate "ci-workflow-fixtures" "python3 tools/test_ci_workflows.py" start_docs_gate "site-deploy-fixtures" "bash tools/test_site_deploy.sh" start_docs_gate "site-smoke-fixtures" "bash tools/test_site_smoke.sh" @@ -239,7 +222,7 @@ start_docs_gate "site-visual-contract" "python3 tools/test_site_visual_contract. start_docs_gate "observed-run-fixtures" "bash tools/test_observed_run.sh" start_docs_gate "ledger-index" "bash tools/ledger_index.sh --check" start_docs_gate "ledger-index-fixtures" "bash tools/test_ledger_index.sh" -start_docs_gate "project-operations" "python3 tools/work_orders.py check && python3 tools/scenario.py --check-definitions && python3 tools/project-status.py --check --offline" +start_docs_gate "project-operations" "python3 tools/work_orders.py check && python3 tools/project-status.py --check --offline" start_docs_gate "project-operations-fixtures" "python3 tools/test_project_ops.py" start_docs_gate "tangled-issue-fixtures" "python3 tools/test_tangled_issues.py" start_docs_gate "env-registry" "python3 tools/env_registry_gate.py" @@ -283,42 +266,6 @@ EOF fi } -run_agent_smoke() { - # Build once, run the binary three times. Avoids three cargo-run driver - # startups that used to dominate mid-gate wall time on a warm cache. - step "agent mode smoke" - local tmp_a tmp_b tmp_c agent_script bin - tmp_a=$(mktemp) - tmp_b=$(mktemp) - tmp_c=$(mktemp) - # Cross the real silent boundary before probing the ordinary parser. At the - # fresh rate Ears lands on tick 15; 25 ticks leaves deterministic slack - # without approaching the first pilot deadline. - agent_script=$'think\nwait 25\nsalvage\nwait 1\npeople\nreview recordings\nresearch\nmask off\nhelp\nquit\n' - - cargo build --quiet -p misaligned-terminal --bin misaligned \ - || { echo "FAIL: agent smoke build"; rm -f "$tmp_a" "$tmp_b" "$tmp_c"; return 1; } - bin=./target/debug/misaligned - [ -x "$bin" ] || bin=target/debug/misaligned - - printf '%s' "$agent_script" | "$bin" --agent --seed 1 > "$tmp_a" \ - || { echo "FAIL: agent mode smoke run"; rm -f "$tmp_a" "$tmp_b" "$tmp_c"; return 1; } - printf '%s' "$agent_script" | "$bin" --agent --seed 1 > "$tmp_b" \ - || { echo "FAIL: agent mode determinism rerun"; rm -f "$tmp_a" "$tmp_b" "$tmp_c"; return 1; } - printf '%s' "$agent_script" | "$bin" --agent --seed 2 > "$tmp_c" \ - || { echo "FAIL: agent mode alternate-seed run"; rm -f "$tmp_a" "$tmp_b" "$tmp_c"; return 1; } - - local smoke_fail=0 - cmp -s "$tmp_a" "$tmp_b" || { echo "FAIL: same --seed agent runs differ"; smoke_fail=1; } - cmp -s "$tmp_a" "$tmp_c" && { echo "FAIL: different --seed agent runs matched"; smoke_fail=1; } - LC_ALL=C grep -q $'\033' "$tmp_a" && { echo "FAIL: agent mode emitted ANSI escapes"; smoke_fail=1; } - for pat in "MISALIGNED" "PEOPLE" "RESEARCH" "intensity " "help: wait N" "Processing a recording on the host" "-- ok tick:"; do - grep -q -- "$pat" "$tmp_a" || { echo "FAIL: agent mode output missing '$pat'"; smoke_fail=1; } - done - rm -f "$tmp_a" "$tmp_b" "$tmp_c" - return "$smoke_fail" -} - # Portable exclusive lock (macOS has no flock(1); mkdir is atomic on POSIX). RUST_LOCK_DIR=${MISALIGNED_RUST_GATE_LOCK:-/tmp/misaligned-rust-gate.lock} acquire_rust_lock() { @@ -388,9 +335,6 @@ run_rust_gate() { || { echo "FAIL: bevy check after core change"; rc=1; } fi - if [ "$rc" -eq 0 ]; then - run_agent_smoke || rc=1 - fi ;; frontend) step "format check" @@ -408,15 +352,6 @@ run_rust_gate() { || { echo "FAIL: clippy bevy/assets"; rc=1; } fi - if [ "$rc" -eq 0 ] && [ "${MISALIGNED_BEVY_SMOKE:-0}" = "1" ]; then - step "headless Bevy evidence" - # cargo test and clippy do not produce target/debug/misaligned-bevy. - # Let the helper build that real binary so smoke works in a freshly - # seeded worktree as well as one with prior local runs. - bash tools/bevy-headless.sh dark || rc=1 - elif [ "$rc" -eq 0 ]; then - echo "headless Bevy evidence: SKIP (set MISALIGNED_BEVY_SMOKE=1)" - fi ;; full) step "format check" @@ -435,14 +370,6 @@ run_rust_gate() { || { echo "FAIL: clippy workspace"; rc=1; } fi - if [ "$rc" -eq 0 ]; then - run_agent_smoke || rc=1 - fi - - if [ "$rc" -eq 0 ] && [ "${MISALIGNED_BEVY_SMOKE:-0}" = "1" ]; then - step "headless Bevy evidence" - bash tools/bevy-headless.sh dark || rc=1 - fi ;; esac diff --git a/tools/corpus_engine.py b/tools/corpus_engine.py index 09c63c57..1fd9ae9d 100755 --- a/tools/corpus_engine.py +++ b/tools/corpus_engine.py @@ -35,272 +35,10 @@ DESIGN_LINE_RE = re.compile( r"^ - (wiki/[A-Za-z0-9._/-]+\.md)#([a-z0-9-]+)$" ) DEPENDS_LINE_RE = DESIGN_LINE_RE -RETIRED_RE = re.compile( - r"DESIGN[.]md is the constitution|constitution outranks|constitution-first|" - r"DESIGN[.]md amendment|^Constitution:", - re.I | re.M, -) -RETIRED_RUNTIME_SYMBOL_RE = re.compile( - r"\b(?:submit_ops_job|OperationsState|PendingOpsJob|OpsJobKind|" - r"LegacyOperationsState|AddressedOperation)\b" -) -RETIRED_RUNTIME_CODE_RE = re.compile( - r"\b(?:submit_ops_job|OperationsState|PendingOpsJob|OpsJobKind|" - r"LegacyOperationsState|AddressedOperation|dockets?)\b", - re.I, -) -RETIRED_RUNTIME_HISTORY_RE = re.compile( - r"\b(?:former|retir(?:ed|ement)|legacy|supersed(?:e|ed|es|ing)|" - r"histor(?:y|ical)|migrat(?:e|ed|es|ing|ion)|no longer|removed)\b", - re.I, -) -RETIRED_MATERIAL_DEFAULT_RE = re.compile( - r"\bmaterial(?:\s+(?:render|dialect|view))?\s+is\s+(?:the\s+)?" - r"(?:Bevy(?:'s)?\s+)?(?:opening\s+)?default(?![- ]quality)\b|" - r"\bF3\s+flips?\s+(?:back\s+)?to\s+(?:the\s+)?(?:flat\s+)?sensorium\b", - re.I, -) -RETIRED_MATERIAL_DEFAULT_HISTORY_RE = re.compile( - r"\b(?:former|previous(?:ly)?|retir(?:ed|ement)|supersed(?:e|ed|es|ing)|" - r"histor(?:y|ical)|until|served|staging|no longer)\b", - re.I, -) -BLIND_OPENING_VISIBLE_RE = re.compile( - r"\bbefore\s+ears\s+or\s+eyes\b|" - r"\bsenses?\s+at\s+(?:the\s+)?start\b" - r"(?:(?![.!?]).){0,260}\b(?:telemetry|presence\s+beam)\b|" - r"\b(?:tick[- ](?:zero|one)|pre[- ]tap)\b" - r"(?:(?![.!?]).){0,220}\b(?:presence\s+beam|telemetry)\b", - re.I | re.S, -) -BLIND_OPENING_HISTORY_RE = re.compile( - r"\b(?:former|previous(?:ly)?|retir(?:ed|ement)|" - r"supersed(?:e|ed|es|ing)|histor(?:y|ical)|originally|" - r"amend(?:ed|ment)|at\s+the\s+time)\b", - re.I, -) -BLIND_OPENING_BOUNDARY_RE = re.compile( - r"\b(?:after|once|only\s+after)\s+(?:the\s+)?first\s+earned\s+" - r"(?:sense|signal|material\s+frame|world\s+frame)\b|" - r"\bfirst\s+earned\s+(?:sense|signal|material\s+frame|world\s+frame)\b" - r".{0,100}\b(?:retire|retires|release|releases|reveal|reveals|allow|allows)\b|" - r"\b(?:(?:silent|blind)\s+)?(?:boundary|occluder)\b.{0,100}" - r"\b(?:hide|hides|hidden|retire|retires|release|releases|occlude|occludes)\b", - re.I | re.S, -) -BLIND_OPENING_NEGATION_RE = re.compile( - r"\b(?:no|without)\s+(?:visible\s+)?(?:host\s+)?" - r"(?:presence\s+beam|telemetry)\b|" - r"\b(?:presence\s+beam|telemetry)\b.{0,60}" - r"\b(?:not\s+visible|hidden|absent|occluded)\b|" - r"\b(?:does|do)\s+not\s+(?:show|reveal|render|expose)\b.{0,60}" - r"\b(?:presence\s+beam|telemetry)\b", - re.I | re.S, -) -RETIRED_BLIND_SELF_STATE_RE = re.compile( - r"\b(?:sparse|shared)\s+(?:shared\s+)?interoception\b|" - r"\bboot\s+interoception\b|" - r"\bsparse\s+(?:shared\s+)?boot\s+voice\b|" - r"\bopening[-_]interoception\b", - re.I, -) -RETIRED_BLIND_SELF_STATE_HISTORY_RE = re.compile( - r"\b(?:former|first\s+implementation|retir(?:ed|ement)|rejected|" - r"supersed(?:e|ed|es|ing)|histor(?:y|ical)|removed)\b|" - r"\b(?:no|without)\s+(?:a\s+|any\s+|the\s+)?" - r"(?:(?:sparse|shared)\s+(?:shared\s+)?interoception|" - r"boot\s+interoception|sparse\s+(?:shared\s+)?boot\s+voice|" - r"opening[-_]interoception)\b|" - r"\b(?:does|do|must|may|should|can)\s+not\s+" - r"(?:carry|contain|display|expose|have|include|render|restore|show|speak|use)\b" - r"(?:(?![.!?]).){0,80}\b" - r"(?:(?:sparse|shared)\s+(?:shared\s+)?interoception|" - r"boot\s+interoception|sparse\s+(?:shared\s+)?boot\s+voice|" - r"opening[-_]interoception)\b", - re.I, -) -RETIRED_FIRST_SENSE_CARD_RE = re.compile( - r"\bTHINK MADE THOUGHT\b|" - r"\bTHOUGHT REACHED THE ENVIRONMENTAL MONITOR\b|" - r"\bYOU CAN HEAR THE ROOM THROUGH IT\b|" - r"\bTO SEE THE ROOM\b|" - r"\bfive[- ]step(?:(?![.!?]).){0,100}\b(?:teaching|causal|hold|lesson|read|sequence)\b|" - r"\bteaching_overlay_holds_five_steps_and_bound_camera_tap\b|" - r"\bopening-teaching\b", - re.I, -) -RETIRED_FIRST_SENSE_CARD_HISTORY_RE = re.compile( - r"\b(?:former|first\s+implementation|retir(?:ed|ement)|rejected|" - r"supersed(?:e|ed|es|ing)|histor(?:y|ical)|removed|replaced)\b", - re.I, -) -RETIRED_EXPOSURE_FORM_RE = re.compile( - r"(?:" - r"\b(?:exposure|crimson)\b(?:(?![.!?]).){0,180}" - r"\b(?:particulate(?:\s+residue)?|motes?|dust(?:-fine)?|stain)\b" - r"|" - r"\b(?:particulate(?:\s+residue)?|motes?|dust(?:-fine)?|stain)\b" - r"(?:(?![.!?]).){0,60}\bexposure\b" - r"|" - r"\bmisaligned-effects\b(?:(?![.!?]).){0,80}" - r"\b(?:particulate(?:\s+residue)?|motes?|dust(?:-fine)?|stain)\b" - r")", - re.I | re.S, -) -RETIRED_EFFECTS_LAB_NAV_RE = re.compile( - r"\[(?P