|
| 1 | +# SPDX-License-Identifier: PMPL-1.0-or-later |
| 2 | +# IDApTIK — Situation Report |
| 3 | +**Date**: 2026-03-01 |
| 4 | +**Branch**: `master` @ `f66606e` |
| 5 | +**Scanned by**: Claude Opus 4.6 |
| 6 | + |
| 7 | +--- |
| 8 | + |
| 9 | +## 1. Project Identity |
| 10 | + |
| 11 | +**IDApTIK** is an asymmetric co-op stealth puzzle-platformer and adaptive game engine ecosystem. Players hack simulated networks through a reversible virtual machine — undo is the defence, forward execution is the attack, and the ordering of reversals creates emergent tactical depth. |
| 12 | + |
| 13 | +- **Created by**: Joshua B. Jewell |
| 14 | +- **Developed under**: hyperpolymath (Jonathan D.A. Jewell) |
| 15 | +- **License**: PMPL-1.0-or-later |
| 16 | +- **Repo age**: 8 days active (2026-02-22 → 2026-03-01), 44 commits, single primary author |
| 17 | +- **Velocity**: ~5.5 commits/day — extremely high throughput sprint |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## 2. Codebase Metrics |
| 22 | + |
| 23 | +| Metric | Value | |
| 24 | +|--------|-------| |
| 25 | +| Total files | 985 | |
| 26 | +| Total LOC scanned | 116,148 | |
| 27 | +| Primary language | ReScript (285 files, ~11,100 LOC) | |
| 28 | +| Secondary languages | Idris2 (22 files, ~3,700 LOC), Elixir (~3,000 LOC), Shell (~2,800 LOC), Zig (13 files, ~2,100 LOC), Scheme (32 files, ~850 LOC) | |
| 29 | +| Other | Rust (escape-hatch), JSON (60), YAML/TOML configs | |
| 30 | +| Git tags | None | |
| 31 | +| Open PRs/Issues | None visible | |
| 32 | + |
| 33 | +--- |
| 34 | + |
| 35 | +## 3. Architecture Overview |
| 36 | + |
| 37 | +``` |
| 38 | + PLAYER (Browser / Desktop / TUI) |
| 39 | + │ |
| 40 | + ├── main-game/ PixiJS 8 + ReScript 12 + Vite + Deno [98%] |
| 41 | + ├── idaptik-ums/ Tauri 2 + ReScript + Idris2 + Zig [30%] |
| 42 | + └── escape-hatch/ ratatui TUI (Rust) [20%] |
| 43 | + │ |
| 44 | + ├── shared/ Cross-component types & kernels [100%] |
| 45 | + ├── vm/ Reversible VM engine (24 instrs) [ 95%] |
| 46 | + ├── dlc/ 29 puzzles + CLI + bundler [ 90%] |
| 47 | + └── sync-server/ Elixir/Phoenix co-op multiplayer [ 60%] |
| 48 | + │ |
| 49 | + └── containers/ Podman + Wolfi (3 images) [ 40%] |
| 50 | +``` |
| 51 | + |
| 52 | +**Key architectural insight**: The reversible VM (`vm/`) is the central engine. Five tiers of instructions (register arithmetic → conditionals → stack/memory → subroutines → I/O → multi-VM networking) provide the full execution model. Reversibility is the core gameplay mechanic, not an implementation detail. |
| 53 | + |
| 54 | +--- |
| 55 | + |
| 56 | +## 4. Component Status |
| 57 | + |
| 58 | +### Mature / Near-Complete |
| 59 | +| Component | Status | Notes | |
| 60 | +|-----------|--------|-------| |
| 61 | +| **main-game/** | 98% | Full game engine — HUD, inventory, resource kernel, combat, 3 training screens, hardware wiring | |
| 62 | +| **shared/** | 100% | Kernel scheduler, 10 domain kernels, all resource types | |
| 63 | +| **vm/** | 95% | 24 instructions incl. CPCALL, pure library, extensive tests | |
| 64 | +| **dlc/idaptik-reversible/** | 90% | 29 puzzles, REPL, validator, 42/42 CLI tests pass | |
| 65 | +| **Justfile orchestrator** | 95% | Full-stack build verification | |
| 66 | + |
| 67 | +### In Active Development |
| 68 | +| Component | Status | Notes | |
| 69 | +|-----------|--------|-------| |
| 70 | +| **Multiplayer (sync-server)** | 60% | Phoenix Endpoint, GameChannel, sessions, PubSub, PhoenixSocket client, 6/6 connectivity tests | |
| 71 | +| **Bebop Connections** | 60% | 7 types, registry, terminal commands | |
| 72 | +| **Hardware Wiring** | 60% | UI implemented, physical ports interactable | |
| 73 | +| **VMMessageBus** | 50% | Co-op event queue, port routing | |
| 74 | + |
| 75 | +### Early / Scaffolded |
| 76 | +| Component | Status | Notes | |
| 77 | +|-----------|--------|-------| |
| 78 | +| **idaptik-ums/** | 30% | Tauri 2.0 migrated, Idris2 ABI (14 modules), Zig FFI solvers, procedural generators | |
| 79 | +| **escape-hatch/** | 20% | Rust scaffold, classified mainframe theme | |
| 80 | +| **Containers** | 40% | 3 Containerfiles built, but not production-hardened | |
| 81 | +| **Mod Minter & Editor** | 0% | Not started | |
| 82 | + |
| 83 | +--- |
| 84 | + |
| 85 | +## 5. Health Assessment |
| 86 | + |
| 87 | +### Strengths |
| 88 | +- **Core engine is solid**: vm/ at 95%, shared/ at 100%, main-game/ at 98% |
| 89 | +- **Good architectural documentation**: 15 ADRs, white paper, TOPOLOGY.md, DESIGN-DECISIONS.adoc |
| 90 | +- **Testing exists across the stack**: 53 test files across 5 languages |
| 91 | +- **Security-conscious**: panic-attacker audit pipeline, Trustfile, SECURITY.md, threat model |
| 92 | +- **Polyglot but purposeful**: each language serves a clear role (ReScript=UI, Idris2=formal ABI, Zig=performance solvers, Elixir=real-time sync, Rust=TUI) |
| 93 | + |
| 94 | +### Risks & Blockers |
| 95 | + |
| 96 | +#### CRITICAL (3 findings) |
| 97 | +1. **Rust edition typo**: `edition = "2024"` in two Cargo.toml files — Rust 2024 edition doesn't exist. Blocks `escape-hatch/` and `main-game/src-tauri/` from compiling. |
| 98 | +2. **Documentation drift**: `idaptik-level-architect/` referenced in 8+ files but directory was renamed to `idaptik-ums/`. Stale paths in Trustfile, CONTRIBUTING, DESIGN-DECISIONS, AI-MANIFEST. |
| 99 | + |
| 100 | +#### HIGH (17 findings) |
| 101 | +- **CI runs no tests**: `quality.yml` does linting only — no `just test-all` |
| 102 | +- **`test-all` is incomplete**: only runs vm/ and game/, skips shared/, dlc/, ums/, escape-hatch/ |
| 103 | +- **Test failures silently swallowed**: `|| true` in test-game recipe |
| 104 | +- **4 unwrapped `parseExn` calls** in UMS generators and vm/ (crash on malformed input) |
| 105 | +- **WebSocket CSRF disabled** (`check_origin: false` in sync-server config) |
| 106 | +- **Unencrypted DB connections** (ArangoDB + VerisimDB over HTTP) |
| 107 | +- **Dependency version drift**: `@rescript/core` is `^1.5.0` in UMS vs pinned `1.6.1` elsewhere |
| 108 | +- **Broken external repo references** in UMS Justfile (4 non-existent paths) |
| 109 | + |
| 110 | +#### MEDIUM (33 findings) |
| 111 | +- 1,723 deprecated `Js.*` API calls need migration to `@rescript/core` |
| 112 | +- 24 `getExn`/`parseExn` calls need safer alternatives |
| 113 | +- Container base images use `:latest` (non-reproducible) |
| 114 | +- Shell scripts have unquoted variables in `kill` commands |
| 115 | +- 6 ADRs declared in META.scm but files don't exist |
| 116 | + |
| 117 | +--- |
| 118 | + |
| 119 | +## 6. Technical Debt Summary |
| 120 | + |
| 121 | +| Category | Count | Effort | |
| 122 | +|----------|-------|--------| |
| 123 | +| Deprecated API migration (`Js.*` → `@rescript/core`) | ~1,723 calls | Large (multi-session) | |
| 124 | +| Unsafe unwrap calls (`parseExn`, `getExn`, `getUnsafe`) | ~24 sites | Small-medium | |
| 125 | +| Doc/path rename drift (`level-architect` → `ums`) | ~12 files | Small | |
| 126 | +| Missing CI test integration | 1 workflow | Small | |
| 127 | +| Container hardening (image pinning, healthchecks) | 3 Containerfiles | Small | |
| 128 | + |
| 129 | +--- |
| 130 | + |
| 131 | +## 7. Recent Sprint Activity (Feb 22–Mar 1) |
| 132 | + |
| 133 | +The last 8 days represent an intense development sprint: |
| 134 | + |
| 135 | +1. **Feb 22-26**: Foundation — co-op multiplayer (Phoenix + WebSocket), container orchestration, E2E tests (Playwright), PWA icons, DLC tests (42/42 pass), combat overhaul |
| 136 | +2. **Feb 27**: Major expansion — level architect → UMS rename, Idris2 ABI (14 modules), Zig solvers, procedural generators (network topology, power systems, campaigns), database federation (ArangoDB + VerisimDB), A2ML metadata wiring |
| 137 | +3. **Mar 1**: Stabilization — rename cleanup PR (#27), critical fixes |
| 138 | + |
| 139 | +--- |
| 140 | + |
| 141 | +## 8. Recommended Next Actions |
| 142 | + |
| 143 | +### Immediate (unblocks correctness) |
| 144 | +1. Fix `edition = "2024"` → `"2021"` in both Cargo.toml files |
| 145 | +2. Complete `idaptik-level-architect` → `idaptik-ums` rename across all docs/configs |
| 146 | +3. Fix `test-all` to cover all components; remove `|| true` from test recipes |
| 147 | +4. Update Trustfile paths to match actual directory structure |
| 148 | + |
| 149 | +### Short-term (unblocks quality) |
| 150 | +5. Add test execution to CI (`just test-all` in quality.yml) |
| 151 | +6. Wrap unwrapped `parseExn` calls in UMS generators |
| 152 | +7. Pin `@rescript/core` version consistently across all components |
| 153 | +8. Add production config for WebSocket origin checking and DB TLS |
| 154 | + |
| 155 | +### Medium-term (reduces debt) |
| 156 | +9. Begin `Js.*` → `@rescript/core` migration (1,723 calls) |
| 157 | +10. Pin container base images to specific digests |
| 158 | +11. Create missing ADR files (016-021) or remove from META.scm |
| 159 | +12. Implement or defer the `#/editor` route stub in UMS |
| 160 | + |
| 161 | +--- |
| 162 | + |
| 163 | +*Generated 2026-03-01 by Claude Opus 4.6.* |
0 commit comments