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
10 changes: 5 additions & 5 deletions .containerignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@
# --- CI/CD (not needed in container builds) ---
.github/

# --- Level architect (not needed for game or sync containers) ---
# NOTE: Sync server Containerfile copies from idaptik-level-architect/
# --- UMS (not needed for game or sync containers) ---
# NOTE: Sync server Containerfile copies from idaptik-ums/
# idaptik-sync-server/ so we cannot exclude the whole directory.
# Instead, exclude the heavy subdirectories within it.
idaptik-level-architect/src-tauri/target/
idaptik-level-architect/node_modules/
idaptik-level-architect/.devcontainer/
idaptik-ums/src-tauri/target/
idaptik-ums/node_modules/
idaptik-ums/.devcontainer/

# --- Developer docs (not needed in containers) ---
idaptik-developers/
Expand Down
2 changes: 1 addition & 1 deletion .machine_readable/ECOSYSTEM.scm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

(project "idris2-ecosystem"
(relationship "toolchain-dependency")
(description "Idris2 used for ABI definitions in idaptik-level-architect")
(description "Idris2 used for ABI definitions in idaptik-ums")
(location "developer-ecosystem/idris2-ecosystem/"))

(project "elixir-ecosystem"
Expand Down
2 changes: 1 addition & 1 deletion .machine_readable/META.scm
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@
(completed-restructure
(status completed)
(date "2026-02-20")
(layout "vm/ shared/ dlc/idaptik-reversible/ main-game/ escape-hatch/ containers/ idaptik-level-architect/ idaptik-developers/")
(layout "vm/ shared/ dlc/idaptik-reversible/ main-game/ escape-hatch/ containers/ idaptik-ums/ idaptik-developers/")
(rationale "Separate VM core from puzzle content; shared types; containerized deployment; developer TUI portal"))

(infrastructure
Expand Down
5 changes: 3 additions & 2 deletions .machine_readable/STATE.scm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
;; SPDX-License-Identifier: PMPL-1.0-or-later
(state (metadata (version "1.7.0") (last-updated "2026-02-27") (status active))
(state (metadata (version "1.8.0") (last-updated "2026-03-01") (status active))
(project-context
(name "idaptik")
(purpose "Asymmetric co-op stealth puzzle-platformer and adaptive game engine ecosystem")
Expand All @@ -12,7 +12,7 @@
(component "multiplayer" (status "active") (completion 95) (description "Asymmetric co-op — PhoenixSocket V2 wire format (array frames + vsn=2.0.0); player_id URL param; terminal coop connect→join→chat wired; VMMessageBus.readPortOutput implemented; Playwright E2E test written (5 suites: load/connect/join/chat/disconnect)"))
(component "sync-server" (status "active") (completion 88) (description "Elixir sync server — 6/6 connectivity tests pass (REST + WS channel join); GameChannel after_join pattern fixed; check_origin:false; vsn=2.0.0 WS negotiation; ETS cache (Dragonfly removed 2026-02-27); AI-generated resilience core deleted 2026-02-27"))
(component "escape-hatch" (status "active") (completion 85) (description "Developer TUI portal — Rust + ratatui, classified mainframe theme; real Podman subprocess integration (ps/stats/inspect/logs/pull/restart); auto-refresh 5s; log scroll; command history"))
(component "idaptik-level-architect" (status "active") (completion 30) (description "Tauri 2 level editor — Idris2 ABI (14 modules), Zig FFI + solvers (Chapel removed 2026-02-27); V-lang server removed 2026-02-27"))
(component "idaptik-ums" (status "active") (completion 30) (description "Unified Modding Studio (Tauri 2) — Idris2 ABI (14 modules), Zig FFI + solvers, procedural generators (Chapel removed 2026-02-27; V-lang server removed 2026-02-27)"))
(component "idaptik-developers" (status "active") (completion 85) (description "Developer portal — 17 ADRs (incl. coprocessor spec), white paper, TUI mockups"))
(component "containers" (status "active") (completion 95) (description "2 services (game + sync) in podman-compose.yml; Dragonfly removed 2026-02-27 (ETS handles caching); Chainguard nginx on 8080; Elixir/Phoenix sync on 4000")))
;; idaptiky/ deleted 2026-02-27 — legacy artefact, code migrated to vm/ + dlc/
Expand All @@ -24,6 +24,7 @@
(action "Sonnet: migrate 24 getExn/parseExn calls in vm/idaptiky to SafeFloat/SafeJson")
(action "Axiom.jl: consolidate 2,857-line abstract.jl into 4+ focused files — see TODO-URGENT-COPROCESSOR-CONSOLIDATION.md"))
(recent-changes
(change "2026-03-01" "PANIC-ATTACK-AUDIT: 65 real findings (3 CRITICAL, 17 HIGH, 33 MEDIUM, 12 LOW) + 5 false positives across 116,148 LOC. Fixed: Rust edition 2024→2021 (escape-hatch + main-game/src-tauri); idaptik-level-architect→idaptik-ums rename in 15+ docs/configs; Justfile test-all expanded (shared/dlc/ums/escape-hatch); || true removed from test-game; CONTRIBUTING.md updated; Trustfile paths corrected; LOOSE-ENDS.md Zig solver status corrected; containers/sync-server Containerfile paths fixed; CODEOWNERS + SECURITY.md + .containerignore updated")
(change "2026-02-27" "OPUS-SESSION-2: Coprocessor consolidation (10 individual files→3: Coprocessor_Compute.res [Maths+Vector+Tensor+Physics], Coprocessor_Security.res [Crypto+Neural+Quantum+Audio+Graphics], Coprocessor_IO.res [unchanged]); 36 stale copies deleted across build dirs; Kernel_Crypto.res and Kernel_Quantum.res comments updated; Coprocessor_Backends.res rewritten to use nested module paths")
(change "2026-02-27" "OPUS-SESSION-2: Deleted 5 AI-generated multiplayer hype files (pata_orchestrator.ex, consensus_core.ex, bonding_handler.ex, pressure_monitor.ex, control_channel.ex); removed Resilience Core from application.ex; removed control:* channel from user_socket.ex")
(change "2026-02-27" "OPUS-SESSION-2: Created DESIGN-DECISIONS.adoc (developer-facing, 476 lines) and DESIGN-OVERVIEW.adoc (public-facing, 273 lines) at repo root; language stack finalized (ReScript+Idris2+Zig+Elixir+Rust); V-lang, Chapel, Dragonfly removed")
Expand Down
16 changes: 6 additions & 10 deletions 0-AI-MANIFEST.a2ml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

(canonical-locations
(scm-files ".machine_readable/ ONLY — never repository root")
(components "main-game/ idaptiky/ idaptik-level-architect/ idaptik-developers/ vm/ shared/ dlc/ escape-hatch/ containers/")
(components "main-game/ idaptik-ums/ idaptik-developers/ vm/ shared/ dlc/ escape-hatch/ containers/")
(topology "TOPOLOGY.md")
(readme "README.adoc")
(launcher "run-game.sh"))
Expand All @@ -21,7 +21,7 @@
(rule "No .git directories inside component subdirectories")
(rule "This is a monorepo — all components share one git history")
(rule "main-game/ is the IDApixiTIK browser game (formerly IDApixiTIK/)")
(rule "idaptik-level-architect contains Tauri + Idris2 ABI layer")
(rule "idaptik-ums (Unified Modding Studio) contains Tauri + Idris2 ABI layer")
(rule "rescript@12.1.0 has a UTF-8 crash — use rescript-legacy.exe via wrapper scripts")
(rule "Deno --node-modules-dir=auto creates .deno/ symlink layout — native .node addons may not resolve"))

Expand All @@ -30,14 +30,10 @@
(type "game-client")
(tech "ReScript 12 PixiJS 8 Vite Deno")
(description "IDApixiTIK: browser-based hacking and network-simulation game with accessibility support"))
(component "idaptiky"
(type "engine")
(tech "ReScript Deno")
(description "Reversible computation VM with interactive puzzle REPL and 27 puzzles"))
(component "idaptik-level-architect"
(component "idaptik-ums"
(type "editor")
(tech "Tauri ReScript Idris2")
(description "Level architecture and game engine layer"))
(description "Unified Modding Studio — level architecture, generators, and game engine layer"))
(component "idaptik-developers"
(type "documentation")
(tech "Markdown AsciiDoc")
Expand All @@ -56,8 +52,8 @@
(description "Downloadable content packs"))
(component "escape-hatch"
(type "game-module")
(tech "ReScript")
(description "Escape hatch mechanics and puzzle modules"))
(tech "Rust ratatui")
(description "Developer access portal TUI — Podman integration"))
(component "containers"
(type "infrastructure")
(tech "Podman")
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Component owners
/main-game/ @JoshuaJewell @hyperpolymath
/idaptik-level-architect/ @JoshuaJewell @hyperpolymath
/idaptik-ums/ @JoshuaJewell @hyperpolymath
/idaptik-developers/ @JoshuaJewell @hyperpolymath
/shared/ @JoshuaJewell @hyperpolymath
/vm/ @JoshuaJewell @hyperpolymath
Expand Down
17 changes: 10 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,18 @@

## Monorepo Structure

This repository contains four components:
This repository contains the following components:

| Component | Language | Purpose |
|-----------|----------|---------|
| `IDApixiTIK/` | ReScript + PixiJS | Browser-based hacking/network simulator |
| `idaptiky/` | ReScript + Deno | Reversible computation VM engine |
| `idaptik-level-architect/` | ReScript + Tauri | Level editor with desktop shell |
| `main-game/` | ReScript + PixiJS | Browser-based hacking/network simulator |
| `vm/` | ReScript | Reversible VM engine (pure library) |
| `shared/` | ReScript | Cross-component types and kernels |
| `idaptik-ums/` | ReScript + Tauri + Idris2 + Zig | Unified Modding Studio (level editor) |
| `dlc/idaptik-reversible/` | ReScript | Puzzle DLC pack (29 puzzles + CLI) |
| `escape-hatch/` | Rust + ratatui | Developer access portal TUI |
| `idaptik-developers/` | Docs | Developer portal and white paper |
| `containers/` | Podman | Container definitions for deployment |

## Language Policy

Expand All @@ -29,9 +33,8 @@ curl -fsSL https://deno.land/install.sh | sh
deno install -g npm:rescript
cargo install just # or: sudo dnf install just

# Build a component
cd IDApixiTIK && just build
cd idaptiky && just build
# Build all components
just build-all
```

## Before Submitting a PR
Expand Down
6 changes: 3 additions & 3 deletions DESIGN-DECISIONS.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ distinct niche where it is the right tool. No language duplicates another's job.
| **Yes -- this is the one you need.**

| Idris2
| `idaptik-level-architect/src/abi/` (16 modules)
| `idaptik-ums/src/abi/` (16 modules)
| Dependent types prove that level data models are correct _at compile time_.
If a level passes the Idris2 type checker, it will load in the game. No
runtime validation surprises. See <<formal-verification>>.
| No. The ABI is stable.

| Zig
| `idaptik-level-architect/src/ffi/bridge.zig`
| `idaptik-ums/ffi/zig/src/` (bridge + solvers)
| C-compatible FFI bridge between Idris2 proofs and the ReScript runtime.
Also hosts parallel solvers for the level architect's visibility and wiring
calculations. Zero runtime dependencies, cross-compiles trivially.
Expand Down Expand Up @@ -144,7 +144,7 @@ softlock the player, or create impossible puzzles. Traditional approaches:

=== The Solution

Sixteen Idris2 modules in `idaptik-level-architect/src/abi/` define the level
Sixteen Idris2 modules in `idaptik-ums/src/abi/` define the level
data model with dependent types that enforce invariants at compile time:

[cols="1,3", options="header"]
Expand Down
29 changes: 22 additions & 7 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,28 +95,43 @@ build-escape-hatch:
@echo "Building escape-hatch/..."
cd escape-hatch && cargo build --release

# Build level architect (Tauri)
build-level-architect:
@echo "Building idaptik-level-architect/..."
cd idaptik-level-architect && just build
# Build level architect / UMS (Tauri)
build-ums:
@echo "Building idaptik-ums/..."
cd idaptik-ums && just build

# ═══════════════════════════════════════════════════════════════
# Test
# ═══════════════════════════════════════════════════════════════

# Run all tests
test-all: test-vm test-game
test-all: test-shared test-vm test-dlc test-game test-ums test-escape-hatch
@echo "All tests passed."

# Test shared types library
test-shared:
@echo "Testing shared/..."
cd shared && deno task test

# Test VM library
test-vm:
@echo "Testing vm/..."
cd vm && deno task test

# Test DLC puzzle pack
test-dlc:
@echo "Testing dlc/idaptik-reversible/..."
cd dlc/idaptik-reversible && deno task test

# Test browser game
test-game:
@echo "Testing main-game/..."
cd main-game && deno task test || true
cd main-game && deno task test

# Test UMS (level architect)
test-ums:
@echo "Testing idaptik-ums/..."
cd idaptik-ums && deno test --allow-read tests/

# Test Escape Hatch
test-escape-hatch:
Expand Down Expand Up @@ -273,7 +288,7 @@ status:
@echo " dlc/idaptik-reversible/ Puzzle DLC pack (29 puzzles) (~90%)"
@echo " main-game/ Browser game client (~98%)"
@echo " escape-hatch/ Developer TUI (ratatui) (~85%)"
@echo " idaptik-level-architect/ Level editor + Tauri (~30%)"
@echo " idaptik-ums/ Unified Modding Studio (~30%)"
@echo " idaptik-developers/ Developer docs + 18 ADRs (~85%)"
@echo ""
@echo "Infrastructure:"
Expand Down
4 changes: 2 additions & 2 deletions LOOSE-ENDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ Quick wins and half-finished items to follow up on. Most are 5 minutes or less.
- [ ] **idaptik-ums/main.js**: Hash route `#/editor` is stubbed out (renders
GeneratorDemo regardless). Uncomment App import + render when TEA editor is ready,
or delete the stub if editor is deferred beyond MVP.
- [ ] **Zig solvers**: `ffi/zig/src/visibility.zig` and `wiring.zig` are boilerplate
stubs. Need actual solver implementations (Phase 1 per WORKPLAN).
- [x] **Zig solvers**: `ffi/zig/src/visibility.zig` (269L, Bresenham LOS) and
`wiring.zig` (205L, BFS topology) are fully implemented with tests.

## Migrations (Sonnet-scale)

Expand Down
Loading
Loading