Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
docs: the Aravath greybox is on main
Rebase onto cdea968. #205 is the windowed aravath_greybox demo:
CC0 KayKit characters, a streamed three-chunk world, and sword combat.
Its replay hash is Linux and Windows only, not the eleven-case gate.
Workspace members are 141, including astraweave-veil.

Co-authored-by: Andrew Brown <lazyxeon@users.noreply.github.com>
  • Loading branch information
cursoragent and lazyxeon committed Oct 16, 2026
commit 18974ad5aeb449ec805914af51dfda40b036dff7
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 140 crates (`cargo metadata --no-deps` at `5cba174c`, 2026-10-16; 57 names start with `astraweave-`, 60 example manifests). #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. The July 2026 note of 133 members is older. Rust toolchain is pinned at 1.89.0. Determinism replay requires eleven cross-OS cases (`planner_pure`, `perception_world`, `gameplay_rng`, `fixed64`, `combat_resolve`, `destruction`, `gameplay_qa_aravath_slice`, `nav_reroute`, `causal_bridge`, `scripted_system`, `weaving`). Greybox #205, traversal #244, local fluid sim #253, render frame budget #216, and CI #217 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 `cdea968c`, 2026-10-16; 58 names start with `astraweave-`, 60 example manifests). #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`). The July 2026 note of 133 members is older. Rust toolchain is pinned at 1.89.0. Determinism replay requires eleven 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 #244, local fluid sim #253, render frame budget #216, and CI #217 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 eleven required replay cases identical across Linux, Windows, and macOS. The list is in `.github/workflows/determinism-replay.yml` and the repository README. The eleventh case is `weaving`.
- 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 greybox #205, traversal #244, local fluid sim #253, render frame budget #216, or CI #217 as shipped until they are on `main`. Weaving #252 is on `main`.
- Do not document traversal #244, local fluid sim #253, render frame budget #216, or CI #217 as shipped until they are on `main`. Weaving #252 and the Aravath greybox #205 are on `main`.
- 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
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,38 +29,38 @@ The game this engine is being built for is **Aravath**.

## Current state (2026-10-16)

Checked against `main` at `5cba174c`. Numbers that were not re-measured in this pass are dated below. This page does not assign a letter grade.
Checked against `main` at `cdea968c`. 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 |
| --- | --- |
| **Workspace** | **140** members via `cargo metadata --no-deps`. **57** of those names start with `astraweave-`. **60** manifests live under `examples/` (`aravath_weave` is the new one). The June 2026 snapshot of 130 members is older. |
| **Workspace** | **141** members via `cargo metadata --no-deps`. **58** of those names start with `astraweave-` (`astraweave-veil` is the new scar-field crate). **60** manifests live under `examples/`. The count at `5cba174c` was 140. |
| **Toolchain** | Rust **1.89.0**, pinned in `rust-toolchain.toml`. Targets: Linux x86_64, Windows MSVC, macOS x86_64 and Apple Silicon. |
| **CI platforms** | Pull-request replay hashes run on `ubuntu-latest`, `windows-latest`, and `macos-latest`. That is the supported cross-OS determinism matrix. It is not a claim that every example window has been run on all three. |
| **Determinism** | Eleven required replay cases, including `weaving`. The compare job fails if any case is missing or its SHA-256 differs across the three OS artifacts. See [Determinism](#determinism). |
| **AI rule** | Local LLMs propose. The deterministic simulation validates and executes. The orchestrator default, when `OLLAMA_MODEL` is unset, is `phi3:medium` (`astraweave-ai`). The Qwen client constant is `qwen3.5:4b`. Ollama constructors keep a loopback URL. A non-loopback URL is replaced with `http://127.0.0.1:11434` unless the caller uses `allowing_remote` (#316). |
| **Assets** | The project rule is **CC0 only**. `assets/README.md` still says "Mixed" and this pass did not re-audit every file's license. |
| **Frame time** | The target is under 11 ms per frame on a GTX 1660 Ti-class GPU. It is not yet measured on that hardware: the GPU timer read 0 ms, and the readback is in progress in #216. Do not treat the older CPU `profiling_demo` times as this measurement. |
| **Coverage and Miri** | Whole-workspace line coverage **57.35%** was measured 2026-06-29 and has not been re-run on the 140-member tree. Miri **1,059** tests, 0 UB, was measured 2026-06-27 across ecs, math, core, and sdk. The February 2026 report records an older, smaller run. Kani proof attributes were **69** on 2026-06-13 and were not re-counted here. |
| **Coverage and Miri** | Whole-workspace line coverage **57.35%** was measured 2026-06-29 and has not been re-run on the 141-member tree. Miri **1,059** tests, 0 UB, was measured 2026-06-27 across ecs, math, core, and sdk. The February 2026 report records an older, smaller run. Kani proof attributes were **69** on 2026-06-13 and were not re-counted here. |
| **Build** | This pass did not run `cargo check --workspace`. The last clean workspace check written into these docs is 2026-06-10, at 130 members. |
| **Traces** | **30** subsystem traces under `docs/architecture/`, listed in the generated table in `CLAUDE.md`. The June "13 traces" figure is the original campaign, not the current set. |
| **Traces** | **31** subsystem traces under `docs/architecture/`, including `veil.md`, listed in the generated table in `CLAUDE.md`. The June "13 traces" figure is the original campaign, not the current set. |

### 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 window is not in this crate. Player-facing scene label is `Aravath`.
- **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`.
- **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 runs on Linux and Windows only. It is not one of the eleven three-OS cases. The 11 ms frame budget is still not measured on a GTX 1660 Ti.

## In progress

These pulls are not on `main`.

- **#205** — greybox demo
- **#244** — traversal
- **#253** — local fluid sim
- **#216** — render frame budget (GPU timer readback)
Expand Down Expand Up @@ -125,7 +125,7 @@ The 12,700-agent figure is a CPU capacity estimate for a mid-complexity AI loop

## Systems on this tree

| Area | State on `5cba174c` |
| Area | State on `cdea968c` |
| --- | --- |
| **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 @@ -135,7 +135,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 bridge** | `aravath_runtime::BridgeAgent`. No window in that crate. |
| **Aravath greybox** | Windowed demo `aravath_greybox` (#205). CC0 KayKit characters, streamed three-chunk world, sword combat. `BridgeAgent` is in the same crate and is not drawn. Greybox replay is 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. |
Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# AstraWeave Documentation Index

> **Current engine status lives in the repository [README](../README.md)** (checked 2026-10-16 against `5cba174c`).
> **Current engine status lives in the repository [README](../README.md)** (checked 2026-10-16 against `cdea968c`).
> The file counts, word counts, and "49 core crates" figure below are a **January 1, 2026 census**. They were not re-counted for this pass. Do not quote them as the live workspace size.

---
Expand Down
14 changes: 9 additions & 5 deletions docs/architecture/ARCHITECTURE_MAP.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# AstraWeave Architecture Map

> **Generated**: 2026-05-07 | **Last reconciled**: 2026-10-16 | **Version**: 0.8.2 | **Rust**: 1.89.0
> **Generated**: 2026-05-07 | **Last reconciled**: 2026-10-16 | **Version**: 0.8.3 | **Rust**: 1.89.0
> Living document — used by all agents as the primary architectural reference.
> **0.8.2 update (2026-10-16)**: Rebased onto `5cba174c`. Weaving #252 is on main. Required replay cases are eleven, including `weaving`. Member count is **140** (`aravath_weave`). Local sim #253 is still in progress; the weaving replay hashes `NullField`.
> **0.8.3 update (2026-10-16)**: Rebased onto `cdea968c`. The Aravath greybox #205 is on main (`aravath_greybox`). Member count is **141** (`astraweave-veil`). Trace count is **31** (`veil.md`). The greybox replay is Linux and Windows only. Traversal #244, local sim #253, frame budget #216, and CI #217 stay in progress.
> **0.8.2 update (2026-10-16)**: Rebased onto `5cba174c`. Weaving #252 is on main. Required replay cases are eleven, including `weaving`. Member count was **140** at that commit (`aravath_weave`). Local sim #253 is still in progress; the weaving replay hashes `NullField`.
> **0.8.1 update (2026-10-16)**: Rebased onto `3971cbe1`. #316 is on main: image decode cap (4096 edge, 64 MiB), CLI glTF URI jail, Ollama loopback unless `allowing_remote`. #318 keeps physics and nav proxies off the gameplay script tick. Member count was **139** at that commit.
> **0.8.0 update (2026-10-16)**: Member count corrected 130 → **139**. Trace count is **30**, generated into `CLAUDE.md`; the §0 table below is the June 2026 index and is not the full set. Landed since that index, and not folded into every row: nav reroute (#251), `aravath_runtime` bridge agent (#263), security caps (#312, #316), `aw_decision` (#287), `astraweave-causality` (#286), Rhai mod loader (#214), `astraweave-destruction` (#243), gameplay QA replay case (#280). Greybox #205, traversal #244, local fluid sim #253, render frame budget #216, and CI #217 are in progress and are not shipped. Weaving #252 is on main. The 12,700-agent line in §0 is a CPU capacity estimate, not a measured full frame. Orchestrator LLM default is still `phi3:medium` when `OLLAMA_MODEL` is unset.
> **0.8.0 update (2026-10-16)**: Member count corrected 130 → **139**. Trace count is **30**, generated into `CLAUDE.md`; the §0 table below is the June 2026 index and is not the full set. Landed since that index, and not folded into every row: nav reroute (#251), `aravath_runtime` bridge agent (#263), security caps (#312, #316), `aw_decision` (#287), `astraweave-causality` (#286), Rhai mod loader (#214), `astraweave-destruction` (#243), gameplay QA replay case (#280). Traversal #244, local fluid sim #253, render frame budget #216, and CI #217 are in progress and are not shipped. Weaving #252 and the Aravath greybox #205 are on main. The 12,700-agent line in §0 is a CPU capacity estimate, not a measured full frame. Orchestrator LLM default is still `phi3:medium` when `OLLAMA_MODEL` is unset.
> **0.7.2 update (2026-06-10)**: Engine-health-audit reconciliation — workspace member count corrected 143 → **130** (root Cargo.toml members verified identical to `cargo metadata --no-deps`); `astraweave-camera` (Unified Camera C.2, `52b9e711c`, 2026-05-18) added to §1/§2.1 and to `astraweave-render`'s dep row; examples count corrected to 59; §0 editor/render trace rows updated for Multi-Tool Sub-phase 3/4 closeouts (SP5 in flight) and Render Parity P.1–P.7 closure.
> **0.7.1 update (2026-06-10)**: Net-Trio-Remediation reconciliation — the standalone-trio HMAC-vs-XOR signature mismatch is RESOLVED (canonical HMAC-SHA256 signing enforced end-to-end, kick-by-default). Updated the net_ecs subsystem row (§0), the known-issues silent-failure row (§4.3), the documentation-hazards row (§7.2), the §8.8 network data-flow diagram, and §14 open-question 17. See `net_ecs.md` §6/§7 and `docs/audits/net_trio_signature_remediation_findings_2026-06.md`.
> **0.7.0 update**: Reconciled against the 13 per-subsystem architecture traces under `docs/architecture/`. Every traced subsystem now linked at section level. Workspace-wide structural axioms (§7.7 wrapped-component resource identity, Fix-27 dual-pipeline lesson, silent-failure policy, "wired beats tested" taxonomy) crystallised into their own section. Dormant-code taxonomy and documentation-hazard inventory consolidated from per-trace evidence. **0.6.0 update (2026-05-07)**: Full cartography audit — impostor infrastructure catalogued, astraweave-alloc added, workspace count verified at 143 members, viewport module inventory updated, Regional Archetype Variation campaign status integrated.
Expand Down Expand Up @@ -38,8 +39,8 @@ The 5-prompt trace toolkit lives at `_meta/` (`ARCHITECTURE_TRACE_TEMPLATE.md`,

## 1. Workspace Overview

- **Total workspace members**: 140 (`cargo metadata --no-deps` at `5cba174c`, 2026-10-16). #252 added `examples/aravath_weave`. The 139 figure is the count at `3971cbe1`. The 130 figure is the 2026-06-10 snapshot.
- **`astraweave-*` names**: 57. The old "~51 production crates" line was a judgment bucket, not a mechanical count, and is not restated as current.
- **Total workspace members**: 141 (`cargo metadata --no-deps` at `cdea968c`, 2026-10-16). #205 added `astraweave-veil`. The 140 figure is the count at `5cba174c`. The 130 figure is the 2026-06-10 snapshot.
- **`astraweave-*` names**: 58, including `astraweave-veil`. The old "~51 production crates" line was a judgment bucket, not a mechanical count, and is not restated as current.
- **Examples**: 60 (manifest path under `examples/`, including `aravath_weave`)
- **Tools**: the June list of 12 is incomplete for this tree (`aw_doc_lint`, `aw_trace_sync`, `aw_decision`, and `xtask` are members). This pass did not republish a closed tool roster.
- **Crates/** subdirectory**: 5 (`astraweave-blend`, `astraweave-alloc`, `astraweave-persistence-player`, `astract`, `astract/astract-macro`)
Expand Down Expand Up @@ -957,6 +958,9 @@ These are decisional questions that cross subsystem boundaries or affect the bro

## Revision History

### v0.8.3 (2026-10-16)
Rebased onto `cdea968c`. Greybox #205 is on main. Member count 140 → 141.

### v0.8.2 (2026-10-16)
Rebased onto `5cba174c`. Weaving #252 is on main. The required replay list is eleven cases, including `weaving`. Member count 139 → 140.

Expand Down
Loading