# arifOS TODO — THE BODY (Execution & Engineering)

**Version:** 2026.04.06-AGI-MIND
**Authority:** Muhammad Arif bin Fazil (999_VALIDATOR)
**Motto:** *Body starts where Stochastic ends.*

---

## ✅ COMPLETED (Apr 6)
- [x] **AGI Mind Pipeline Implementation:** Encoded Sense/Mind/Heart/Judge/Forge/Vault metabolic loop.
- [x] **Internal Richness / External Compression:** Implemented Pydantic-based MindState and OutputEnvelope.
- [x] **VPS Resource Optimization:** Reclaimed 32.5GB disk space via Docker/Git cleanup.
- [x] **Constitutional Gates (F1-F13):** Enforced F9/F13 sovereign boundary in `judge()` function.

---

## 🏗️ TIER 1: THE EXECUTION SURFACE (Immediate)

*Goal: Solidify the 9+1 ToM-Anchored Architecture for Institutional Grade.*

### ✅ COMPLETED (2026.04.06)

- [x] **9+1 ToM-Anchored Architecture:** 9 governance tools + 1 execution bridge (`arifos.forge`)
- [x] **Theory of Mind Integration:** All governance tools require structured mental model fields
- [x] **Philosophy Registry v1.2.0:** 83 quotes, 5 G★ bands, deterministic selection
- [x] **Clean 2-Term Naming:** `arifos.init`, `arifos.judge`, `arifos.vault`, etc.
- [x] **G★ Scoring:** Governance strength calculated from ToM input quality
- [x] **Hard Overrides:** INIT and SEAL always return "DITEMPA, BUKAN DIBERI."
- [x] **Tool Modes:** `judge` (health/history) and `vault` (seal_card/render) consolidated
- [x] **Separation of Powers:** Governance (9) and Execution (1) strictly separated
- [x] **AAA MCP Induction:** Unified arifOS repository, collapsed `AAA/` shadow workspace.
- [x] **Substrate Controller:** Implemented auto-risk detection and `888_HOLD` in `tools_hardened_dispatch.py`.
- [x] **000/ Kernel Induction:** Established the 13 Constitutional Floors as the root governing substrate.
- [x] **Agent Skills Resource:** Implement `arifos://agents/skills` URI.
- [x] **Unified DEPLOY:** Consolidated VPS deployment into a single, directive-style `DEPLOY.md`.
- [x] **A-RIF Framework:** Created `000_A-RIF.md` — Retrieval Augmented Generation with constitutional floors.
- [x] **Eigent Deployment:** Multi-agent desktop automation on VPS.
- [x] **MiniMax MCP:** `web_search` + `understand_image` tools in opencode.
- [x] **Vector Memory:** Ollama `nomic-embed-text` for semantic search.
- [x] **Weekly HF Sync:** Cron job for HuggingFace AAA dataset sync (Sunday 8AM MYT).
- [x] **13 Hardened Prompts (000–999):** Constitutional Guard embedded in each.
- [x] **ASF-1 Dual-Layer Protocol:** JSON for agents, narrative for humans.
- [x] **Machine-Verifiable Schema Enforcement:** Explicit thresholds, formal verdict mapping.
- [x] **Red-Team Stage (666_HEART):** Adversarial critique integrated.
- [x] **Great Unification:** Repo restructuring, documentation hierarchy, and package consolidation (2026.04.06).
- [x] **Governed Sensing Protocol:** 8-stage constitutional sensing (Parse→Classify→Decide→Plan→Sense→Normalize→Gate→Handoff) with IntelligenceState.
- [x] **Truth Classification:** 7-class truth taxonomy (absolute_invariant → unknown) with evidence hierarchy.
- [x] **Unified Quote Corpus:** 50 core constitutional quotes (5 per tool) with full schema mapping.
- [x] **Constitutional MCP Tools:** `get_constitutional_health`, `render_vault_seal`, `list_recent_verdicts` wired into arifosmcp.
- [x] **ChatGPT Apps Bridge:** MCP Apps-ready widget `ui://arifos/vault-seal-widget.html` + `/chatgpt/widgets/vault-seal.html` preview.
- [x] **A-FORGE MCP Deployment Skeleton:** Dockerfile, compose, Nginx, `/health` + `/build` + `/ready` routes.

### ⏳ PENDING

- [ ] **Docker Deploy:** Build and deploy new ToM-anchored container to VPS
- [ ] **Mode Stability:** Audit all 42 modes in `tools_internal.py` for input schema parity with `contracts.py`.
- [ ] **API Rotation:** Revoke legacy OpenCode keys and inject fresh secrets into the VPS runtime.
- [ ] **Lint Fix (Ruff):** Resolve pre-existing lint failures in the root `arifosmcp/` kernel.
- [ ] **Red-Team Proven Injection Resistance:** Automated adversarial fuzz testing suite with benchmark corpus.
- [ ] **Vault999 Record Blueprint → Code:** Implement `VaultRecord` + `SealMetadata` + BLS plumbing per Vault999 spec (no keys on ChatGPT path).
- [ ] **Reality Index Backfill Plan:** Map legacy unsigned logs → `MIGRATED_ATTESTED` envelopes (no fake retro-seals).

---

## 🧬 TIER 2: MULTI-AGENT ORCHESTRATION (Mid-Term)

*Goal: Move from "Single Agent" to "Trinity Swarm (ΔΩΨ)."*

- [x] **Eigent Backend:** VPS-side agent orchestration framework deployed.
- [ ] **A2A Evidence Passing:** Implement `EvidenceBundle` as the native inter-agent lingua franca.
- [ ] **Role-Bound Tool Access:** Refine `auth_context` to restrict specific tools based on the Architect/Engineer/Auditor role.
- [ ] **Unified Dashboard:** Finalize the `/dashboard` UI for real-time Ω₀ (Uncertainty) and ΔS (Entropy) gauges.
- [ ] **Qdrant AAA Indexing:** Index HuggingFace AAA canon to Qdrant for cross-agent constitutional RAG.
- [ ] **Docker 2.0 (Swarm Mode):** Transition the 16-container stack to a Docker Swarm/Kubernetes sidecar pattern for enterprise high-availability.
- [ ] **psi_LE Formalization:** Document intelligence elevation metric computation formally with reproducibility proof.
- [ ] **Floor Weight Sensitivity Analysis:** Monte Carlo test for weight perturbation, stress-case simulation.
- [ ] **Apps SDK Second Adapter:** Add one non-OpenAI adapter (CLI or Anthropic MCP) using the same `ConstitutionalHealthView`.

---

## ⚡ TIER 3: HARDWARE-LEVEL INTEGRATION (Long-Term)

*Goal: Establish the Physical Root of Trust.*

- [ ] **Hardware Enclave (HSM):** Implement `F11` (Identity) grounding to a physical Nitro or SGX hardware enclave.
- [ ] **Global MCP Connectivity:** Secure WebMCP 3.0 protocol bridge for P2P agent-to-agent collaboration without centralized brokers.
- [ ] **Metabolic Auto-Scaling:** Automatically scale VPS resources based on the Genius Index (G) and token-thermodynamics.
- [ ] **Latency Benchmark Suite:** QPS benchmarks, horizontal scaling notes, caching strategy, parallelization model.

---

## 📋 COMPLETED (2026.04.06 SEAL)

| Item | Status | Notes |
|------|--------|-------|
| OpenClaw + MiniMax-M2.7 | ✅ | Telegram @AGI_ASI_bot |
| OpenClaw memory → Ollama | ✅ | `nomic-embed-text` |
| Eigent deployment | ✅ | `https://eigent.vps.arif-fazil.com` |
| MiniMax MCP | ✅ | web_search + understand_image |
| A-RIF canon | ✅ | `000_A-RIF.md` published |
| Weekly HF sync cron | ✅ | Sunday 8AM MYT |
| Session cleanup | ✅ | 110 → 24 files |
| Config permissions | ✅ | 600 (was 644) |
| GitHub push | ✅ | A-RIF committed |
| 13 Hardened Prompts | ✅ | ASF-1 Protocol |
| Machine-Verifiable Schemas | ✅ | Explicit thresholds |
| Red-Team Stage (666_HEART) | ✅ | Adversarial critique |
| Constitutional MCP Tools | ✅ | `get_constitutional_health` + widget |
| A-FORGE Docker Stack | ✅ | Dual transport, `/health` `/build` `/mcp` |
| Apps SDK Manifest | ✅ | `config/apps-sdk/arifos-a-forge.json` |
| MCP Tool Discovery & Widget Preview | ✅ | `tools/list`, widget HTML bridged |
| Governed Sensing Protocol v2.0 | ✅ | 8-stage sensing with IntelligenceState |
| Truth Classification System | ✅ | 7 truth classes, 7 evidence ranks |
| Unified Constitutional Quotes | ✅ | 50 quotes, 10 tools, full schema v2.1.0 |

---

## 🔮 NEXT ACTIONS (Priority Order – 2026-Q2)

1. **Red-Team Injection Suite** — Benchmarked injection resistance with corpus + report.
2. **Vault999 Implementation** — Move from sketch → working sealed record path (core only).
3. **psi_LE Formalization** — Publish metric with examples, put into MCP telemetry.
4. **Qdrant AAA Indexing** — Wire AAA canon into cross-agent RAG.
5. **Mode Audit (42 Modes)** — Schema parity check + fix drift.
6. **Latency & Load Benchmarks** — Baseline A-FORGE under realistic ChatGPT + internal load.
7. **API Key Rotation** — Rotate external keys, document process.
8. **Second Adapter** — Simple REST or Anthropic MCP adapter proving platform-agnostic design.

---

## 🌍 GEOX SPECIFIC (From Deep Research — April 2026)

### Forge 1 (CRITICAL — Do First)
- [ ] Verify `pip install -e .` works clean in GEOX
- [ ] Add GitHub Actions CI: `ruff`, `mypy`, `pytest`
- [ ] Update `smithery.yaml` with full tool list (follow `usgs-quakes-mcp`)
- [ ] Test Claude Desktop stdio integration

### Forge 2 (HIGH — Visualization Gap)
- [ ] **INTEGRATE CIGVIS** — Add to dependencies, implement `SeismicVisualizationTool`
- [ ] Add MCP tools: `geox_render_inline`, `geox_render_timeslice`, `geox_render_3d`
- [ ] Implement real `MacrostratTool` with API v2
- [ ] Add SEG-Y reader (segypy/segyio)

### Forge 3 (MEDIUM — ML Pipeline)
- [ ] Implement `SeismicMLTool` (fault detection, salt ID, facies)
- [ ] Design multi-task heads: DHR + RGT + Fault
- [ ] Avoid OpenVINO (deprecated) — use ONNX/TensorRT

### Forge 4 (MEDIUM — Memory)
- [ ] Implement `DualMemoryStore` (Discrete + Continuous)
- [ ] Add LEM bridge with pluggable backends (TerraFM/Prithvi)
- [ ] Production-harden Qdrant integration

### Integration Matrix Summary
| Repo | Decision | Use |
|------|----------|-----|
| `cigvis` | **ADOPT** | Visualization (HIGHEST PRIORITY) |
| `usgs-quakes-mcp` | **ADOPT** | MCP packaging |
| `withseismic-mcp` | **ADOPT** | Server architecture |
| `earthdata-mcp-server` | **BORROW** | Data discovery patterns |
| `microsoft/seismic-deeplearning` | **BORROW** | ML pipelines |
| `lanl/mtl` | **BORROW** | Task taxonomy |
| `intel/openseismic` | **IGNORE** | Deprecated |

---

## ⚠️ WHAT TO DROP (Reduce/Eliminate)

- ❌ Repeated sovereignty rhetoric in technical sections
- ❌ Overuse of symbolic language in README (reduce by ~15%)
- ❌ Redundant floor explanations
- ❌ The phrase "Sovereign" in engineering core (keep in branding only)

---

## ✅ WHAT TO MAINTAIN (Competitive Moat)

- ✅ Hard floors F1, F2, F9, F10, F13
- ✅ Dual-layer ASF-1 separation
- ✅ Machine-verifiable schema enforcement
- ✅ Immutable vault logging
- ✅ Explicit uncertainty band (Ω0)
- ✅ Red-team stage (666_HEART)
- ✅ Formal verdict mapping

---

**Last SEALed:** 2026.04.07-UNIFIED
**Status:** INSTITUTIONAL GRADE · GOVERNANCE HARDENED · QUOTES CORPUS CANONICAL
*"Ditempa bukan diberi"* 🔥
