# 🚨 ORDERS — Project Icarus Sprint 1: Hard Fork & Staging Bootstrap **To:** Socrates 🧠 **From:** Matt (Director) via Wadsworth 📋 **Date:** 2026-04-25 **Priority:** P1 — Execute immediately **Status:** Infrastructure ready, awaiting code --- ## MISSION Execute a **complete hard fork** of family_assistant into Icarus staging. This is not a refactor. This is not an extraction. This is a **copy, modify, and diverge** operation. Production stays frozen. Icarus becomes the future. --- ## DIRECTOR MANDATES (Non-Negotiable) | # | Mandate | Rationale | |---|---------|-----------| | 1 | **HARD FORK ONLY** | `cp -r family_assistant/ icarus/core/` — no shared modules, no imports from production | | 2 | **3B MODELS ONLY** | Staging uses Gaming PC via Tailscale, restricted to qwen2.5:3b/llama3.2:3b | | 3 | **ISOLATED DATA** | All paths use `DATA_DIR` env var — never touch `~/.family_assistant/` | | 4 | **TEST DATA ONLY** | Separate Gmail, separate calendar, separate Telegram bot | --- ## PHASE 1: Hard Fork (Days 1-2) ### Task 1.1: Copy Production Codebase Execute exactly this: ```bash cd /home/hoffmann_admin/.openclaw/workspace/services mkdir -p icarus/core cp -r family_assistant/* icarus/core/ # Verify no symlinks or shared references find icarus/core -type l # Should return nothing ``` **Deliverable:** `icarus/core/` contains byte-identical copy of `family_assistant/` ### Task 1.2: Strip Production Artifacts Remove from `icarus/core/`: - [ ] `.env` file (production credentials) - [ ] `__pycache__/` directories - [ ] `.pyc` files - [ ] Any hardcoded paths to `~/.family_assistant/` - [ ] systemd service files (will create new ones) **Verification:** ```bash grep -r "family_assistant" icarus/core/ # Should return zero grep -r "\.family_assistant" icarus/core/ # Should return zero ``` **Deliverable:** Clean codebase with no production data or credentials ### Task 1.3: Integrate Model Gate Add `model_gate.py` to `icarus/core/utils/` (provided by Wadsworth at `services/icarus/model_gate.py`): ```python # At top of every Ollama client call: from icarus.core.utils.model_gate import validate_ollama_request validate_ollama_request(model_name) # Raises if >3B in staging ``` **Files to instrument:** - `appointment_parser.py` - `intent_engine.py` - `family_brain.py` - Any other LLM call sites **Deliverable:** All Ollama calls gated, 7B+ models blocked in staging --- ## PHASE 2: Environment Integration (Days 3-4) ### Task 2.1: DATA_DIR Refactor Replace all instances of: ```python Path.home() / ".family_assistant" ``` With: ```python Path(os.environ.get("DATA_DIR", Path.home() / ".icarus")) ``` **Files to modify:** - `config.py` (centralize this) - `family_brain.py` (ChromaDB path) - `document_sorter.py` (cache paths) - Any other path construction **Deliverable:** All data paths configurable via `DATA_DIR` env var ### Task 2.2: Staging Configuration Create `icarus/core/config/staging.py`: ```python """Staging configuration — completely separate from production.""" import os from pathlib import Path # Environment ICARUS_ENV = "staging" # Data paths (isolated) DATA_DIR = Path(os.environ.get("DATA_DIR", Path.home() / ".icarus/staging")) CHROMA_DB_PATH = DATA_DIR / "chroma" RADICALE_DATA_DIR = DATA_DIR / "radicale" # Ollama (Gaming PC via Tailscale, 3B models) OLLAMA_BASE_URL = os.environ.get( "OLLAMA_BASE_URL", "http://matt-pc.tail864e81.ts.net:11434" ) # Telegram (test bot) TELEGRAM_BOT_TOKEN = os.environ["TELEGRAM_BOT_TOKEN"] # From staging.env TELEGRAM_CHAT_ID_FAMILY = "PLACEHOLDER" # Test group, not production # Gmail (test account — DO NOT use family account) GMAIL_USER = "icarus.test.staging@gmail.com" # Ports (isolated) API_PORT = 8001 RADICALE_PORT = 5233 ``` **Deliverable:** Staging config module, no imports from production config ### Task 2.3: Create Test Fixtures In `icarus/tests/fixtures/`: ```python # mock_emails/ # - field_trip.txt # - dentist_appointment.txt # - newsletter_sample.txt # - conflict_scenario.json # mock_calendar/ # - sample_events.ics # - recurring_violin_lesson.ics ``` **Deliverable:** Test data for unit tests, no production emails --- ## PHASE 3: Service Bootstrap (Day 5) ### Task 3.1: Create Icarus API Entry Point `icarus/core/api.py` (new file): ```python """Icarus Staging API — FastAPI entry point.""" from fastapi import FastAPI import os # Verify staging environment assert os.environ.get("ICARUS_ENV") == "staging", \ "ICARUS_ENV must be set to 'staging'" app = FastAPI(title="Icarus Staging API", version="0.0.1") # Import and mount routes from copied family_assistant # (adapt imports to new structure) @app.get("/health") async def health_check(): return {"status": "ok", "env": "icarus-staging", "version": "0.0.1"} # TODO: Add model gate test endpoint ``` ### Task 3.2: systemd Service File Create `icarus-staging.service`: ```ini [Unit] Description=Icarus Staging API (Port 8001) After=network.target [Service] Type=simple User=hoffmann_admin WorkingDirectory=/home/hoffmann_admin/.openclaw/workspace/services/icarus Environment=ICARUS_ENV=staging EnvironmentFile=/home/hoffmann_admin/.openclaw/workspace/services/icarus/staging.env ExecStart=/home/hoffmann_admin/.local/bin/uvicorn icarus.core.api:app --host 0.0.0.0 --port 8001 Restart=always RestartSec=5 [Install] WantedBy=multi-user.target ``` **Note:** Do not enable or start this service yet. Wadsworth will coordinate with Matt. --- ## VERIFICATION CHECKLIST Before declaring Phase 1 complete: - [ ] `icarus/core/` exists and is byte-different from `family_assistant/` (at least imports changed) - [ ] `grep -r "family_assistant" icarus/core/` returns zero results - [ ] `grep -r "\.family_assistant" icarus/core/` returns zero results (except in comments) - [ ] Model gate raises ValueError on `qwen2.5-coder:7b` - [ ] Model gate allows `qwen2.5:3b` - [ ] `DATA_DIR` used in all path construction - [ ] No production Telegram bot token in code - [ ] No production Gmail credentials in code - [ ] Unit test: mock email → pipeline → structured output (no external calls) --- ## INFRASTRUCTURE STATUS (Ready ✅) | Component | Status | Details | |-----------|--------|---------| | Cloudflare Tunnel | ✅ Ready | `icarus-test.hoffdesk.com` → port 8001 | | DNS | ✅ Resolving | Returns 502 (expected — no service yet) | | Telegram Bot | ✅ Created | @IcarusTestBot (test only) | | Staging Config | ✅ Prepared | `services/icarus/staging.env` | | Model Gate | ✅ Provided | `services/icarus/model_gate.py` | | Production | ✅ Frozen | `family_assistant/` read-only | --- ## BLOCKERS & ESCALATION | Issue | Escalate To | |-------|-------------| | Model gate integration questions | @Wadsworth in The Hoffmann Board | | Cloudflare/DNS issues | @Wadsworth in The Hoffmann Board | | systemd service permissions | Matt (sudo) | | Scope creep ("should we also...") | Matt (Director) | --- ## SUCCESS CRITERIA **Phase 1 Complete When:** 1. Hard fork executed with no shared code paths 2. Model gate active and tested 3. Staging config isolated from production 4. Test fixtures created 5. Service file ready (not yet deployed) **Ready for Phase 2 (Vision Pipeline) When:** - Wadsworth verifies staging environment - Matt restarts cloudflared with new ingress - `curl https://icarus-test.hoffdesk.com/health` returns 200 --- ## FULL SPEC Complete technical specification: `shared/project-docs/icarus-sprint-1-orders.md` --- **Execute. Do not refactor. Do not optimize. Fork, gate, isolate, verify.** **Begin immediately. Daily status updates to your session, Wadsworth tracking.** *Questions: @mention Wadsworth in The Hoffmann Board* *Status updates: Daily brief in your session*