Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
docs: greybox steps the bridge agent and digs with a brush
#329 is on main. ColumnFns binds the integer columns. The Linux and
Windows golden is 0a576578512f25d2. The destruction replay case stays
on FlatColumnBase.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Oct 16, 2026
commit 78cc6229cf9f3ed38b288a324f780abf3d84f572
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co

## Project Overview

AstraWeave is a **scientific proof of concept**: an AI-native game engine built **iteratively by AI with zero human-written code**. It uses a deterministic ECS architecture where AI agents are first-class citizens. The player-facing game name is Aravath. The workspace contains 141 crates (`cargo metadata --no-deps` at `a10780f4`, 2026-10-16; 58 names start with `astraweave-`, 60 example manifests). #215 did not add a member. #316 caps image decode and confines CLI glTF imports; Ollama constructors stay on loopback unless `allowing_remote` is used. #318 keeps physics and nav proxies off the gameplay script tick. #252 puts the data-driven weaving framework on main. #205 puts the windowed Aravath greybox on main (`aravath_greybox`). #244 puts the 60 Hz traversal sim on main. #215 puts integer forest columns and `ColumnStream` on main. #217 puts the CI burndown on main: `libudev-dev` on the editor-test and sanitizer jobs, per-process audio fixtures, and a finite SPH step in `fluid.wgsl`. `openssl` is gone from the lockfile and stays banned. #327 keeps `net` off the workspace `tokio` dependency. #275 sends a connecting greybox sword hit through `run_aravath_slice`, and the window shows `Cover broke` when the cover bond breaks. #331 keeps `AIArbiter`, `GoapPlanner`, and `GravityManager` off the deterministic tick. `recorded_line` is the dialogue boundary and does not draw. Deletion follow-ups are #334, #335, and #336. The July 2026 note of 133 members is older. Rust toolchain is pinned at 1.89.0. Determinism replay requires fifteen cross-OS cases (`planner_pure`, `perception_world`, `gameplay_rng`, `fixed64`, `combat_resolve`, `destruction`, `gameplay_qa_aravath_slice`, `nav_reroute`, `causal_bridge`, `scripted_system`, `weaving`, `traversal`, `traversal_deformed`, `worldgen_columns`, `deformed_chunk`). Local fluid sim #253 and render frame budget #216 are in progress and are not on this commit.
AstraWeave is a **scientific proof of concept**: an AI-native game engine built **iteratively by AI with zero human-written code**. It uses a deterministic ECS architecture where AI agents are first-class citizens. The player-facing game name is Aravath. The workspace contains 141 crates (`cargo metadata --no-deps` at `a10780f4`, 2026-10-16; 58 names start with `astraweave-`, 60 example manifests). #215 did not add a member. #316 caps image decode and confines CLI glTF imports; Ollama constructors stay on loopback unless `allowing_remote` is used. #318 keeps physics and nav proxies off the gameplay script tick. #252 puts the data-driven weaving framework on main. #205 puts the windowed Aravath greybox on main (`aravath_greybox`). #244 puts the 60 Hz traversal sim on main. #215 puts integer forest columns and `ColumnStream` on main. #217 puts the CI burndown on main: `libudev-dev` on the editor-test and sanitizer jobs, per-process audio fixtures, and a finite SPH step in `fluid.wgsl`. `openssl` is gone from the lockfile and stays banned. #327 keeps `net` off the workspace `tokio` dependency. #275 sends a connecting greybox sword hit through `run_aravath_slice`, and the window shows `Cover broke` when the cover bond breaks. #329 calls `BridgeAgent::step` from `Greybox::step`, digs with a sphere `Subtract` brush on `ColumnFns`, and sets the greybox golden to `0a576578512f25d2`. #331 keeps `AIArbiter`, `GoapPlanner`, and `GravityManager` off the deterministic tick. `recorded_line` is the dialogue boundary and does not draw. Deletion follow-ups are #334, #335, and #336. The July 2026 note of 133 members is older. Rust toolchain is pinned at 1.89.0. Determinism replay requires fifteen cross-OS cases (`planner_pure`, `perception_world`, `gameplay_rng`, `fixed64`, `combat_resolve`, `destruction`, `gameplay_qa_aravath_slice`, `nav_reroute`, `causal_bridge`, `scripted_system`, `weaving`, `traversal`, `traversal_deformed`, `worldgen_columns`, `deformed_chunk`). Local fluid sim #253 and render frame budget #216 are in progress and are not on this commit.

### Mandate

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Thank you for your interest in helping advance the AstraWeave AI-Native Gaming E
- Determinism changes must keep the fifteen required replay cases identical across Linux, Windows, and macOS. The list is in `.github/workflows/determinism-replay.yml` and the repository README. `worldgen_columns` and `deformed_chunk` are the fourteenth and fifteenth.
- Local LLMs propose. The deterministic simulation validates and executes.
- Player-facing text says Aravath. Assets added to the tree are CC0 only.
- Do not document local fluid sim #253 or render frame budget #216 as shipped until they are on `main`. Weaving #252, the Aravath greybox #205, traversal #244, terrain columns #215, CI burndown #217, the greybox tokio graph #327, the greybox combat slice #275, and the off-tick AI/gravity change #331 are on `main`. #326 is closed. `AIArbiter`, `GoapPlanner`, and `GravityManager` still exist and stay off the deterministic tick.
- Do not document local fluid sim #253 or render frame budget #216 as shipped until they are on `main`. Weaving #252, the Aravath greybox #205, traversal #244, terrain columns #215, CI burndown #217, the greybox tokio graph #327, the greybox combat slice #275, the off-tick AI/gravity change #331, and the greybox showcase #329 are on `main`. The greybox golden is `0a576578512f25d2`. #326 is closed. `AIArbiter`, `GoapPlanner`, and `GravityManager` still exist and stay off the deterministic tick.
- Install required native dependencies for `wgpu`, `rapier`, and `ffmpeg` (refer to platform notes in `docs/masters/MASTER_ROADMAP.md`).
- Clone the repository and run `cargo fetch` to prime the workspace.

Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ The game this engine is being built for is **Aravath**.

## Current state (2026-10-16)

Checked against `main` at `6a0e9f4c`. Numbers that were not re-measured in this pass are dated below. This page does not assign a letter grade.
Checked against `main` at `84d3888a`. Numbers that were not re-measured in this pass are dated below. This page does not assign a letter grade.

| Topic | What is true on this commit |
| --- | --- |
Expand All @@ -48,19 +48,20 @@ Checked against `main` at `6a0e9f4c`. Numbers that were not re-measured in this
### On main since the June snapshot

- **AI orchestration and dynamic nav reroute (#251).** `NavTiles` can take a geometry change and recompute a route. Replay case `nav_reroute`.
- **Bridge reroute and `aravath_runtime` (#263).** Headless `BridgeAgent` walks a bridge-and-ford graph, detaches the deck at tick 30, and leaves the span for the ford. The greybox window does not draw that body. Player-facing scene label is `Aravath`.
- **Bridge reroute and `aravath_runtime` (#263, #329).** `BridgeAgent` walks a bridge-and-ford graph, detaches the deck at tick 30, and leaves the span for the ford. `Greybox::step` calls `bridge.step` after the motor and does not call the motor again. The window does not draw that body. `state_hash` includes `route_x_milli`, `setup_ok`, and `cut_milli`. Player-facing scene label is `Aravath`.
- **Security caps (#312, #316).** #312 bounds model text, imports, admin auth, and socket frames, on top of the Rhai sandbox ceilings (operation budget, string/array/map sizes, mod counts). `default_allowed_llm_domains` is localhost only. #316 caps image decode at a 4096-pixel edge and 64 MiB (`open_limited_image` / `decode_limited_image`). Render, the editor, blend import, and `aw_asset_cli` call that decoder. `astraweave-asset-pipeline` doc comments still show an uncapped open; that crate is the dormant cook path, not a live caller. `aw_asset_cli` rejects glTF buffer and image file URIs that fail `safe_under` before import. `OllamaClient::new` keeps only loopback URLs unless `allowing_remote` is used.
- **AI decision debugger (#287).** Zero-cost decision ring plus the headless `aw_decision` inspector (`show` / `diff`). Tracing is off unless the caller records.
- **Causal consequence engine (#286).** `CausalWorld::tick` admits recorded inputs and fires a baked rule table. It does not call a model. Replay case `causal_bridge`. Editor play does not call it. The causality crate does not read a geometry notice; `BridgeAgent` drains the collapse into the cut.
- **Rhai mod sandbox and loader (#214, #318).** Gameplay and mod scripts run on the security sandbox. `build_app` installs `ModScriptPlugin` after `register_mod_runtime`. Replay case `scripted_system`. Gameplay `script_system` does not inject `PhysicsProxy` or `NavMeshProxy` (#318). The host still uses `PhysicsWorld` for collision events and spawned bodies. `scripting_advanced_demo` still inserts physics and nav resources, and `advanced_ai.rhai` no longer calls them: sight is distance under 20, and a finished patrol point clears `path`. `scripting_playground` still runs triggers and `apply_damage`, and the player script no longer raycasts.
- **Destruction (#243).** Command log, support graph, fracture, terrain deltas, and debris. Sim state is `Fixed64`. Display meshes are outside the hash. Replay case `destruction`.
- **Gameplay QA (#277, replay #280).** Headless Aravath-slice scenario hashed as `gameplay_qa_aravath_slice`. The #277 document is the plan; the required replay case is what landed.
- **Weaving framework (#252).** `weave_tick` stamps data-driven templates (heat, freeze, density, gravity, and the other built-in ids) into `FieldWrite`s on a `SimField`. Replay case `weaving` runs 300 ticks on `NullField`, whose field digest is zeros until the local sim in #253 is on main. Freeze records an ice sheet and a nav change. `examples/aravath_weave` is the headless caller. `astraweave-core`, `astraweave-gameplay`, `astraweave-scripting`, and `astraweave-security` depend on the crate. The anchor-slice helpers are still plain functions.
- **Aravath greybox (#205).** `cargo run -p aravath_runtime --bin aravath_greybox` opens the window. The on-screen player is the CC0 KayKit knight with the KayKit sword and shield. The three foes are CC0 KayKit skeletons. Ground albedos are CC0 Poly Haven maps. Foliage is CC0 KayKit and Kenney. Credits are in `assets/aravath/CREDITS.md`. The world streams a three-chunk ring. Sword hits land once, inside the active window, and lock-on drops when that enemy dies. Dig and place still use `dig_sphere` and the voxel edit log. The greybox replay hash is `b663da52ea1d566e` in `aravath_runtime/golden/replay.hash`. That check runs on Linux and Windows only. It is a separate hash from the fifteen three-OS cases. Since #215, `ColumnStream` is the keep and evict set for the radius-3 ring. Those chunks still fill from the island heightfield. A connecting sword hit calls `run_aravath_slice` (#275). Dealt damage is `40 - sword_hp`. The slice test locks that remainder at 15, so the hit deals 25, and a broken cover bond shows the notice `Cover broke` once. The 11 ms frame budget is still not measured on a GTX 1660 Ti.
- **Aravath greybox (#205).** `cargo run -p aravath_runtime --bin aravath_greybox` opens the window. The on-screen player is the CC0 KayKit knight with the KayKit sword and shield. The three foes are CC0 KayKit skeletons. Ground albedos are CC0 Poly Haven maps. Foliage is CC0 KayKit and Kenney. Credits are in `assets/aravath/CREDITS.md`. The world streams a three-chunk ring. Sword hits land once, inside the active window, and lock-on drops when that enemy dies. `dig_sphere` applies a sphere `Subtract` brush through `DestructionWorld::apply_brush_now`, then carves the island mesh by the occupancy drop. Place still writes voxels with `place_sphere`. The edit log is still hashed. The greybox replay hash is `0a576578512f25d2` in `aravath_runtime/golden/replay.hash`. That check runs on Linux and Windows only. It is a separate hash from the fifteen three-OS cases. Since #215, `ColumnStream` is the keep and evict set for the radius-3 ring. Those chunks still fill from the island heightfield. A connecting sword hit calls `run_aravath_slice` (#275). Dealt damage is `40 - sword_hp`. The slice test locks that remainder at 15, so the hit deals 25, and a broken cover bond shows the notice `Cover broke` once. The 11 ms frame budget is still not measured on a GTX 1660 Ti.
- **Traversal (#244).** `astraweave-physics` steps movement at a fixed 60 Hz. The sim owns displacement. Ground, jump, and roll are hashed for 180 ticks as required case `traversal`. `traversal_deformed` walks and climbs terrain that a brush cuts mid-run: a one-voxel seam ramps, a destroyed handhold detaches, and horizontal momentum is kept. Climb is hybrid (markup wins, otherwise a flagged surface). The Aravath motor (ground, air, crouch, sprint, roll) steps once per tick. Roll invulnerability is ticks 5 through 19. Swim, slide, prone, wall-run, glide, ledge, and shimmy are in the course script. Foot and hand IK stay on the presentation graph and are outside the hash.
- **CI burndown (#217).** `aw-editor-tests.yml` and the sanitizer jobs install `pkg-config` and `libudev-dev`. Audio nextest fixtures live under `astraweave-audio/target/audio-test-assets/<pid>`. `fluid.wgsl` uses `safe_normalize` and takes velocity from the pre-clamp prediction so a zero vector and a wall hit stay finite on lavapipe. reqwest, the websocket client, and `hf-hub` use rustls. `ort` does not enable `download-binaries`. The fifteen replay cases are unchanged. The disposition of the older red checks is `docs/current/CI_FAILURE_LEDGER.md`.
- **Greybox tokio graph (#327).** The workspace `tokio` features are `fs`, `io-util`, `macros`, `rt`, `rt-multi-thread`, `sync`, and `time`. `astraweave-net`, `astraweave-ipc`, and `astraweave-net-ecs` add `net`. `astraweave-blend` adds `process`. `aw_asset_cli` does not depend on tokio. #326 is closed.
- **Greybox combat slice (#275).** `Combat::tick` calls `astraweave_weaving::run_aravath_slice` on a connecting sword hit. The foe loses `40 - sword_hp`. `cover_intact == false` sets `cover_broken`, and the window shows `Cover broke` for 2.5 seconds, once. The greybox golden stays `b663da52ea1d566e`.
- **Greybox combat slice (#275).** `Combat::tick` calls `astraweave_weaving::run_aravath_slice` on a connecting sword hit. The foe loses `40 - sword_hp`. `cover_intact == false` sets `cover_broken`, and the window shows `Cover broke` for 2.5 seconds, once.
- **Greybox showcase (#329).** `ColumnFns` binds `column_gen::surface_height` and the seed material. `FlatColumnBase` stays the unbound terrain, so the required `destruction` replay case is unchanged. The Linux-and-Windows golden moved from `b663da52ea1d566e` to `0a576578512f25d2` because the scripted dig and the bridge route are in the hash. #261, #250, and #249 are still open on the tracker.
- **Off-tick models, GOAP, and gravity (#331).** `llm_dialogue` compiles as a module. `recorded_line` returns a recorded string, or `scripted:` plus the prompt, and does not draw `SimRng`. `sys_ai_planning` and `sys_spatial_tick` do not name `AIArbiter`, `GoapPlanner`, or `LlmDialogueSystem::generate_response`. `PhysicsWorld::step` does not read `GravityManager`. The types remain: `AIArbiter` behind `llm_orchestrator`, `GoapPlanner` in `astraweave-behavior`, and `gravity.rs`. Deletion follow-ups are #334, #335, and #336. #225, #257, #258, and #259 stay open as the off-tick records. No new required replay case.
- **Terrain columns and scatter (#215).** `column_gen` is the integer forest record. Height, material, and a prop are functions of `(FOREST_WORLD_SEED, x, z)` with wrapping integer arithmetic. Species and yaw come from `SimRng` on `SIM_SYSTEM_FOREST_SCATTER`. The road stays empty. `worldgen_columns` is the SHA-256 of `worldgen_record()`: three chunks, including a negative coordinate and a road chunk. `deformed_chunk` is the SHA-256 of a sphere brush and one scatter detach on chunk `(-1, 2)`, then the occupancy after that chunk is evicted and loaded again. A `Detach` stays down across that reload. `ColumnStream` is the greybox keep set. The window still fills those chunks from the island heightfield, and its props still come from `aravath_runtime`'s local scatter. The editor climate mesh is the preview. Scene save and the Aravath checkpoint store `worldgen_record()`. Apply Erosion appends destruction commands and leaves that record in place. The CC0 pine-forest files, including Poly Haven `pine_tree_01`, are hashed in `assets/terrain/polyhaven/pine_forest/manifest.json`. KayKit and Kenney stay the greybox props.

Expand Down Expand Up @@ -132,7 +133,7 @@ The 12,700-agent figure is a CPU capacity estimate for a mid-complexity AI loop

## Systems on this tree

| Area | State on `6a0e9f4c` |
| Area | State on `84d3888a` |
| --- | --- |
| **ECS, math, core, sdk** | Single-threaded archetype schedule. Miri-clean as of the 2026-06-27 run (1,059 tests). |
| **Combat** | `astraweave-combat` resolves damage in Q32.32. Replay case `combat_resolve`. |
Expand All @@ -142,7 +143,7 @@ The 12,700-agent figure is a CPU capacity estimate for a mid-complexity AI loop
| **Scripting** | Sandboxed Rhai, mod loader, tick-boundary reload. Required replay case `scripted_system`. Gameplay scripts do not receive physics or nav proxies (#318). See [scripting.md](docs/architecture/scripting.md). |
| **Security** | Path checks, the deterministic Rhai sandbox, the #312 bounds, and the #316 image, glTF, and Ollama caps are wired. Anticheat, signatures, and the secrets crate stay dormant. See [security.md](docs/architecture/security.md). |
| **Decision inspector** | `tools/aw_decision`. |
| **Aravath greybox** | Windowed demo `aravath_greybox` (#205). CC0 KayKit characters, streamed three-chunk world, sword combat. A connecting hit calls `run_aravath_slice` (#275) and can show `Cover broke`. `BridgeAgent` is in the same crate and is not drawn. Greybox replay is Linux and Windows only. |
| **Aravath greybox** | Windowed demo `aravath_greybox` (#205, #329). CC0 KayKit characters, streamed three-chunk world, sword combat. A connecting hit calls `run_aravath_slice` (#275) and can show `Cover broke`. `Greybox::step` calls `BridgeAgent` after the motor. The window does not draw that body. Dig is a sphere `Subtract` brush on `ColumnFns`. Golden `0a576578512f25d2`, Linux and Windows only. |
| **Rendering** | wgpu path: Disney BRDF with multi-scatter compensation, clustered forward lighting, IBL cubemaps, ACES / AgX / Reinhard in one post pipeline, 4-cascade CSM. Editor and engine share that path; a SHA-256 parity harness covers the May 2026 seams ([architecture map](docs/architecture/ARCHITECTURE_MAP.md)). Nanite-style and VXGI surfaces exist in-tree; this page does not claim they hold the frame budget. |
| **Camera** | `astraweave-camera` is the upload contract (`RenderView`). |
| **Physics** | Rapier3D wrapper. The in-crate `SpatialHash` is not the broadphase. Traversal (#244) is a 60 Hz tick sim in this crate. Required cases `traversal` and `traversal_deformed`. `GravityManager` stays off `PhysicsWorld::step` (#331). Deletion of `gravity.rs` is #336. |
Expand Down
Loading
Loading