aien-architecture-mv
Canonical architecture for the AIEN ecosystem: flows, boundaries, ADRs, and the map from design to implementation repositories.
Brought by drakestapleton
aien-architecture-mv / docs / 06-jspace.md
| 1 | # J-Space |
| 2 | |
| 3 | > **Implementation status (2026-09-30).** A host reference exists in omega `src/runtime/rx_jspace.{c,h}`, built only into the `rx_branch_reuse` test target (evidence `evidence/BRANCH_REUSE`). It is not on the production reaction path. aienos `crates/aienos-aegis/src/world.rs` `JSpaceWorld` is a separate legacy Rust sandbox. Details: `02-implementation-status.md`; ownership: `doctrine/ARCHITECTURE.md` ยง2.8. |
| 4 | |
| 5 | ## Definition |
| 6 | |
| 7 | J-Space is the typed search/evaluation space over possible World transitions. |
| 8 | |
| 9 | It is not Cortex, not WorldStore, not a generic graph database, and not necessarily token-level tree search. |
| 10 | |
| 11 | ```rust |
| 12 | pub struct JNode { |
| 13 | pub id: JNodeId, |
| 14 | pub parent: Option<JNodeId>, |
| 15 | pub world: WorldId, |
| 16 | pub sequence: SequenceId, |
| 17 | pub memory_view: MemoryViewId, |
| 18 | pub proposal: ProposalRef, |
| 19 | pub score: ScoreVector, |
| 20 | pub evidence_root: Digest32, |
| 21 | pub status: JNodeStatus, |
| 22 | } |
| 23 | ``` |
| 24 | |
| 25 | ## Why |
| 26 | |
| 27 | Agents often face multiple plausible approaches. AIEN should be able to: |
| 28 | |
| 29 | - fork state cheaply, |
| 30 | - execute reversible work, |
| 31 | - compare evidence, |
| 32 | - prune dominated candidates, |
| 33 | - choose a winner, |
| 34 | - commit only the winner's external effects. |
| 35 | |
| 36 | ## Effect rule |
| 37 | |
| 38 | ```text |
| 39 | Pure/read-only/local reversible: |
| 40 | may run speculatively |
| 41 | |
| 42 | World mutation: |
| 43 | only inside draft World |
| 44 | |
| 45 | External write/irreversible: |
| 46 | stage EffectIntent only |
| 47 | execute after winner + AEGIS |
| 48 | ``` |
| 49 | |
| 50 | ## Multi-objective scoring |
| 51 | |
| 52 | Keep dimensions separate: |
| 53 | |
| 54 | ```text |
| 55 | task quality |
| 56 | verifier confidence |
| 57 | safety margin |
| 58 | latency |
| 59 | compute |
| 60 | memory |
| 61 | uncertainty |
| 62 | ``` |
| 63 | |
| 64 | Use Pareto filtering before expensive judging. |
| 65 | |
| 66 | ## Distributed execution |
| 67 | |
| 68 | J-Space is the preferred first use of the Fabric because entire branches tolerate normal network latency much better than per-layer model sharding. |