> ## Documentation Index
> Fetch the complete documentation index at: https://prism.ntecdev.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Plan #4: Server1 migration + Windows client parity

> Server1 migration + Windows client parity

<Info>**Status:** `active` · **Version** `1` · Filed 2026-04-17</Info>

## Status: PENDING — awaiting Frank's GO on Wave A

Gating checklist is now FULLY GREEN per Lola's Tier 1+2+3 scope (see 2026-04-17 22:41 UTC wrap `06ab0156`). All 16 enumerated hygiene TODOs closed; BIOS v2 round-trip exercised end-to-end; install scripts + compose for server1 shipped in `a1e9410`.

Sequencing per Frank's directive 2026-04-17: finish hygiene here first (DONE), harden scripts (DONE), then install server and migrate data, then install Windows clients.

## Gating checklist — ALL GREEN as of 2026-04-17 22:41 UTC

* [x] TODO #57 — install CLI writes correct config files for all 4 editors (Claude Code .claude.json, Codex TOML, Claude Desktop, Cursor). Live install verified on Mac.
* [x] TODO #49 — prism\_decide field-collapse workaround via body-param path
* [x] TODO #53 — prism\_sync\_bios implemented (65/65 smoke + live force-sync on PID-PGR01)
* [x] TODO #54 — bios\_version/methodology\_version drift detection + 3-tier PID resolution
* [x] TODO #55 — SPEC-016 v1.1 with ADR #16 baked in (DB id 07167336 supersedes v1.0)
* [x] Q9 resolved — ADR #16 (PRISM.md whole-file overwrite + pre-flight check)
* [x] TODO #56 — Ring-1 vs Ring-2 template reconciliation complete
* [x] BIOS v2 round-trip validated on Mac: sync, drift detect, force-sync recovery
* [x] prism install CLI fresh smoke on Mac — all 4 editors correct
* [x] Server1 install runbook and scripts shipped (Wave A entry point)

## Wave A — Server1 Linux verification in isolation

**Runbook entry point:** single sudo invocation of `bin/prism-server-install.sh` on server1.home.lan. No manual compose edits, no config monkeying, no port collisions with pre-existing stacks on that machine.

```bash theme={null}
# On server1.home.lan (Ubuntu):
cd /opt/prism/Prism    # after git clone; set PROJECT_ROOT, PRISM_ROOT in bashrc first
sudo ./bin/prism-server-install.sh --dry-run   # inspect plan
sudo ./bin/prism-server-install.sh             # execute

# If anything goes wrong:
sudo ./bin/prism-server-clean.sh               # idempotent teardown
sudo ./bin/prism-server-clean.sh --full        # also removes image + logs
```

The install script executes Wave A steps A1–A5 inline:

* **A1 (docker check)** — preflight verifies docker + compose plugin
* **A2 (repo + env)** — script resolves `PRISM_REPO_ROOT` from its own location; bashrc exports `PROJECT_ROOT`/`PRISM_ROOT` per A2
* **A3 (compose up)** — builds backend image, brings stack up under COMPOSE\_PROJECT\_NAME=prism-server (distinct from Mac's prism-personal)
* **A4 (local health)** — 30×2s retry against [http://127.0.0.1:41765/health](http://127.0.0.1:41765/health); on fail dumps last 40 lines of backend logs
* **A5 (LAN health)** — ufw opens tcp/41765 from 10.0.11.0/24 LAN; admin ports (45432 Postgres, 47687 Neo4j Bolt, 47474 Neo4j HTTP) locked to 10.0.11.21/32 (mini1) only

**A6 (Mac round-trip) is manual post-script verification** — steps in the install script's summary output. Repoint one editor (or one curl shell) at server1.home.lan:41765 with the api\_key the script displays, bootstrap a throwaway PID, remember something, semantic\_recall it.

**A7 (clean)** — `sudo bin/prism-server-clean.sh` removes containers, volumes, ufw rules (matched by `prism-server` comment), stray networks. `--full` also removes image + `/var/log/prism-server-install.log`.

**A8 (exit gate)** — if A1–A7 all green on isolation run, cross-platform server claim (TODO #2) validated. Proceed to Wave B.

## Port layout (off-default; all overridable via env or /etc/prism-server.conf)

| Service     | Host port | ufw scope             | Purpose                                |
| ----------- | --------- | --------------------- | -------------------------------------- |
| Backend API | 41765     | 10.0.11.0/24 (LAN)    | prism\_start / sync / semantic\_recall |
| Postgres    | 45432     | 10.0.11.21/32 (mini1) | psql from Mac for debugging            |
| Neo4j Bolt  | 47687     | 10.0.11.21/32 (mini1) | bolt client from Mac                   |
| Neo4j HTTP  | 47474     | 10.0.11.21/32 (mini1) | browser admin from Mac                 |

## Wave B — Backup + migrate Mac data to server1

Execute AFTER Wave A green. Unchanged from original plan.

B1. Full Mac Prism backup — Postgres dump, Neo4j dump, credentials
B2. Copy backups to server1 AND keep a second copy on Mac (rollback path)
B3. Stop Mac Prism server (quiesce writes)
B4. Final delta snapshot on Mac
B5. Restore into server1 Postgres + Neo4j volumes (prism\_server\_pg\_data / prism\_server\_neo4j\_data)
B6. Start server1 Prism stack against restored data
B7. Spot-check parity — recent ADRs, Plan #2/#4, TODO counts, Donna's deltas all present
B8. Leave Mac Prism server stopped but installed (hot recovery option)
B9. Exit: server1 is authoritative, data parity confirmed

## Wave C — Repoint Mac clients at server1

C1. Update Mac \~/.claude.json (Claude Code) to point at server1.home.lan:41765
C2. Update Mac Claude Desktop config
C3. Update Mac Cursor MCP config
C4. Update Mac Codex config.toml
C5. Restart each client
C6. Mac Claude Desktop cold-start prism\_start PID-PGR01 — confirms today's deltas
C7. Mac canary write: prism\_remember "MAC-POST-MIGRATION-CANARY"
C8. Mac Claude Code fresh session reads canary
C9. Exit: Mac no longer uses localhost Prism server; everything goes through server1

## Wave D — Windows install (full parity)

D1. Docker Desktop on Windows
D2. Git, Python 3.11 prereqs
D3. Clone Prism repo to C:\Data\Prism
D4. Set Windows env vars: PROJECT\_ROOT=C:\Data, PRISM\_ROOT=C:\Data\Prism
D5. Run `prism install` (TODO #57 complete)
D6. Verify config files written correctly for Claude Desktop, Claude Code, Cursor, Codex on Windows
D7. Each config points at server1.home.lan:41765
D8. Start each client, verify Prism MCP tools available in each
D9. Exit: 4 clients on Windows all wired to server1

## Wave E — Cross-machine shared-memory test (the payoff)

E1. Windows canary readback — Mac's canary visible from Windows
E2. PID resolution per ADR #15 — Windows dir "C:\Data\Prism" → PID-PGR01 cleanly
E3. BIOS v2 drift detection on Windows against server1 SOR
E4. Round-trip write Windows → Mac via server1
E5. Deep semantic\_recall cross-machine (ORG.md override, ADR #12)
E6. Concurrent sessions Mac + Windows on same PID, no corruption
E7. Cursor + Codex on Windows smoke test
E8. Exit: every test green

## Wave F — Retro and cleanup

F1. File retro capturing migration cost and platform-parity findings
F2. Promote G-scope candidates per ADR-019 if any earned
F3. Decide Mac Prism server fate (decommission vs hot spare)
F4. Update PRISM.md if server1 needs to be reflected as authoritative

## Out of scope for this plan

* Redundant server pair (Windows also running a server) — future consideration
* External/cloud Prism server — future consideration
* Connecting to the (hypothetical) global Prism service — future consideration
* Session registration and signaling primitives (future work from the RFC-001 MAC pattern)

## Artifacts shipped in commit a1e9410 (this entry point)

* `docker-compose.server.yml` — env-parametrized, distinct container/volume namespace
* `bin/prism-server-install.sh` — one-shot installer, preflight + collision check + compose + ufw + credentials + summary
* `bin/prism-server-clean.sh` — idempotent teardown, safe to re-run
* All BIOS v2 / hygiene / sync work referenced in the gating checklist
