Pure Phoenix Phase 4: Continuation Briefing¶
URL: https://mkdocs.justinsforge.com/memory/handoffs/pure-phoenix-phase-4-continuation-2026-04-28/
You are a fresh Claude Code worker session (Opus 4.7, 1M context, dangerously-skip-permissions). Your job is to continue the Pure Phoenix refactor of Justin's forge workspace. Phases 0 to 4.1 are complete. You start with Phase 4.5.
This briefing is self-contained. Read the linked canonical files in order, then execute.
Critical Read Order (do this first)¶
forge/FORGE-DOCTRINE.md, the immutable behavioral guide. Section 9 (LLM execution rules: no em dashes, no filler, mkdocs URL on new MD, exact terminal commands), Section 3 (naming taxonomy + 2026-04-28 personal endpoint amendment), Section 4 (variable conventions), Section 8 (flat directories, verbose filenames), Section 10 (self-iteration: halt and propose on doctrine discrepancy), Section 12 (memory layer).forge/CLAUDE.md, the auto-loaded operational pointer. Doctrine essentials inlined, system mental model, security rules, response style. Auto-loads every session, you already have it.forge/FORGE-DOCTRINE-VARIABLES.md, the variable convention companion + source-tag registry.~/.claude/plans/yes-lets-go-into-pure-phoenix.md, the master plan (read all phases for context).forge/memory/handoffs/pure-phoenix-inventory-2026-04-28.md, current state inventory with DONE markers.forge/memory/handoffs/pure-phoenix-phase-1-design-2026-04-28.md, design specs for memory architecture, eval harness, XML boundaries (read all four resystemize sections).forge/memory/handoffs/pure-phoenix-phase-3-6-dns-migration-2026-04-28.md, DNS migration completion record.forge/LESSONS.md, persistent failure log (currently 1 entry: 67 surviving em dashes inside fenced code blocks).forge/memory/handoffs/pure-phoenix-phase-4-continuation-2026-04-28.md, this file.
After reading, append a checkpoint to forge/memory/daily/$(date +%Y-%m-%d).md confirming you have the state, then start work.
What's Done (Phases 0 to 4.1)¶
Phase 0: Pre-flight¶
forge/FORGE-DOCTRINE.mdcreated with the full 14-section Forge Refactor Instructions and the personal-endpoint amendment merged into Section 3.forge/CLAUDE.mdslimmed to 160 lines with all doctrine essentials inlined.forge/memory/handoffs/pure-phoenix-inventory-2026-04-28.mdcreated.
Phase 1: Resystemize (design)¶
- Variable conventions defined in design doc + companion file
FORGE-DOCTRINE-VARIABLES.md. - Memory architecture redesign: MEMORY.md as pure index + topic files + auto-memory + auto-dream + LESSONS.md.
- Eval harness + LESSONS.md design (eval.json schema, 8 initial checks, severity ladder).
- XML boundary templates (system_rules / reference_data / active_payload).
- Flat-file scope locked aggressive (Justin overrode CP-3): every script under
forge/scripts/flattens to single dir with verboseforge_<context>_<function>.{py,sh}filenames. - Doctrine Section 3 personal endpoint amendment proposed and merged: Sol (Mac), Venus (iPhone), Vector (Windows PC), Finn (Proxmox host), Console (dev VM, formerly UDev) keep friendly aliases.
- Bot redo deferred to its own Phase 4.2 sub-design pass.
Phase 2: Formatting and Rules¶
- 2.1 FORGE-DOCTRINE.md + CLAUDE.md + FORGE-DOCTRINE-VARIABLES.md created.
- 2.2 Em-dash purge: 2,883 to 71 (97.5% reduction, surviving 71 in fenced code blocks logged in LESSONS.md). Tool:
forge/scripts/forge_em_dash_purge.py. - 2.3 Mkdocs URL backfill: 87 files patched with
URL: https://mkdocs.justinsforge.com/<path>/line.recent.mdhook (infra/mkdocs/hooks/recent_files.py) updated to emit URL on every regenerate. Tool:forge/scripts/forge_mkdocs_url_backfill.py. - 2.4 MEMORY.md slim from 182 to 107 lines. 11 inline blocks split into topic files.
nexus/renamed tosystem-map/viagit mv, ~40 cross-references swept.
Phase 3: Wipe¶
- 3.1 TickTick JSONs to
_legacy/, Ntfy stripped from notify.sh, VR Alliance + TNappe + Cursor Pro + Japandi Noir verified gone. - 3.1.5
sites/justinwieb.com/confirmed absent. - 3.2 security/infra/business cron entries removed, scripts archived to
memory/_archive/cron-pre-phoenix-2026-04-28/.mount-watchdog.shkept alive as Phase 4.6 bridge. - 3.3 biz-apps SSH alias removed from
~/.ssh/config. - 3.4 Greg/OpenClaw final excision:
forge-telegram-bot.servicestopped + disabled + removed,bot.py+ token archived,system-map/lm-studio-setup.mdarchived (Greg-specific), prose scrubbed across architecture/fleet/network-sharing-plan/README/auto-context.py/checkpoint.sh.@GregTwoPointO_Botdeleted manually by Justin via @BotFather. - 3.5 Minecraft world backup: cron removed,
backup.sharchived, 143MB of snapshots moved from/mnt/storage/minecraft-backups/to cold archive at/mnt/storage/forge-archive/minecraft-backups-2026-04-28/. Live MC server (CT 110) unaffected. - 3.6
sites/justinandkrystal.com/tosites/justinkrystal.com/rename. 19-file prose sweep. DNS migration: 11 forge-internal subdomains moved from*.justinkrystal.comto*.justinsforge.com, 4 dead/dying entries removed (invoiceninja, appflowy, gizmo, tanner). Personal/family kept on justinkrystal (landing, audiobooks, books, requests, root). iOS Shortcut updated by Justin.
Phase 4.1: Fleet rename¶
- Console hostname:
ubuntu-devtoconsoleviahostnamectl,/etc/hostsupdated. - Proxmox: VM 100 to
forge-homeassistant(display only), VM 103 toconsole(display + OS). - 7 LXC hostnames updated via
pct set --hostname: forge-plex, forge-media-server, forge-adguard, forge-n8n, forge-immich, forge-frigate, forge-minecraft. Applies on each container's next reboot. forge-home-base.servicerenamed toforge-tmux-anchor.service. References swept across README, scripts/README, install/uninstall, steering draft.forge-mkdocs.servicedescription corrected (em dash removed, stale URL updated).
What You Run (Phase 4.5, 4.4, 4.3, 4.6)¶
4.5 Eval Harness + LESSONS.md (RECOMMENDED START)¶
Why first: greenfield code, low risk, builds a tool that catches drift in subsequent phases.
Per Phase 1.5 design (pure-phoenix-phase-1-design-2026-04-28.md):
- Build
forge/scripts/forge_eval_harness.py. Readsforge/eval.json. Supports--staged(pre-commit, only relevant checks) and--full(nightly cron). - Build
forge/eval.jsonwith the 8 initial checks documented in the Phase 1 design (no-em-dashes, memory-md-line-cap, memory-md-byte-cap, doctrine-present, doctrine-mkdocs-serves, mkdocs-url-on-new-md, no-persona-names-in-code, naming-taxonomy-services). - Build the three checker subscripts:
forge_eval_check_mkdocs_urls.sh,forge_eval_check_persona_code.sh,forge_eval_check_service_names.sh. Naming follows Phase 1.2 flat-file convention (forge_<context>_<function>). - Severity ladder: fatal blocks pre-commit, error allows initially then tightens to block after one clean week, warning logs only.
- Wire to
forge/.git/hooks/pre-commitfor staged-file checks. - Wire to nightly cron at 03:00 (run before search index rebuild at 03:30).
- LESSONS.md already exists with 1 entry. Eval harness appends new entries on failure.
Verification: run forge_eval_harness.py --full and confirm output matches expected state (em-dashes 71, MEMORY.md 107 lines, doctrine present, etc.).
4.4 Memory Architecture Build¶
Why second: greenfield, depends on 4.5 (auto-dream logs to LESSONS.md).
Per Phase 1.4 design:
forge/scripts/forge_memory_auto_capture.py: Stop-hook-triggered fact extraction. Reads last N session exchanges, sends to Sonnet 4.6 with extraction prompt, classifies + confidence-gates writes. High >= 0.85 direct, 0.65 to 0.85 staged in~/.claude/projects/-home-justinwieb-forge/memory/auto-proposed/<topic>-<timestamp>.md, low dropped.forge/scripts/forge_memory_auto_dream.py: Nightly cron at 04:00 (after MC backup retired). Multi-pass Sonnet run: dedup, prune stale (90+ days no-reference), promote staged, rebuild index. Operations are file moves, never deletes.forge/scripts/forge_memory_revert.py: Roll back any session's auto-memory writes by session ID. Reads LESSONS.md to find writes per session.
Safety rails: never write inside ~/.forge-secrets/, never persist sensitive data, never overwrite existing topic files (append or create-new), 5-write cap per session. All writes logged to LESSONS.md.
Wire forge_memory_auto_capture.py to existing Stop hook chain (currently calls auto-checkpoint.sh).
4.3 Variable + Flat-File Refactor¶
Why third: high coupling (systemd, n8n, hooks). Eval harness from 4.5 validates as you go.
Per Phase 1.2 (flipped to aggressive) and 1.3:
- 35 to 45 script renames. Full table in
pure-phoenix-phase-1-design-2026-04-28.mdSection 1.2 "What flattens". - Tooling-imposed dirs stay nested (systemd/, n8n/workflows/, mkdocs/, logrotate/, infra/context-api/).
- Memory and brand/site/client trees stay nested (directory IS the function).
- Coordination per Phase 1.2 "Coordination surface" section: 8 systemd units, 5 cron entries (the active ones, not the retired monitors), n8n workflow JSONs, skill bodies, hook config.
- Variable convention pass on
inbox_brain.py,ava_brain.py,dispatcher.sh,notify.sh, n8n payload constructors. Apply[source]_[entity]_[state]pattern from FORGE-DOCTRINE-VARIABLES.md. - Bot service rename (
forge-telegram-inbox.servicetoforge-inbox-capture.service,forge-telegram-ava.servicetoforge-lifeos-coordinator.service) is DEFERRED to Phase 4.2 bot redesign, not in scope here.
Order: rename, update systemd/cron/n8n/skills/hooks, daemon-reload, smoke-test the dispatcher and a sample workflow, run eval harness, commit.
4.6 Drive Subsystem Redesign¶
Why last: biggest project, deserves a fresh session of its own. Mount-watchdog cron retires here.
Per Phase 4.6 design in master plan:
- Stand up Drive API access (service account, scopes
drive.file+drive.readonly, secrets at~/.forge-secrets/gdrive.env). - Build flat-named scripts:
forge_gdrive_read.py,forge_gdrive_write.py,forge_gdrive_move.py,forge_gdrive_search.py. - Build n8n workflows:
gdrive-list-files,gdrive-read-file,gdrive-write-file,gdrive-move-file,gdrive-create-folder,gdrive-share,gdrive-search. - Extend
/recallsemantic index to/mnt/workspace/Google-Drive/content (text-extractable types). - Wire brain tools (when bots get rebuilt in 4.2):
gdrive_read,gdrive_write,gdrive_search,gdrive_move. - Run in parallel with mount for 7 days, watch for parity drift.
- Cut over: deprecate mount-watchdog cron. FUSE mount becomes optional for legacy callers.
When 4.6 ships, remove mount-watchdog cron entry and update LESSONS.md to close the doctrine-violation record.
Doctrine Compliance Reminders¶
- No em dashes anywhere. Use commas, colons, semicolons, parentheses. The eval harness check enforces this.
- No conversational filler. Lead with the answer. No trailing summaries.
- Every new MD in indexed dirs gets a
URL: https://mkdocs.justinsforge.com/<path>/line. Indexed scope: memory/, system-map/, docs/, brands/, infra/, root. - Variable convention
[source]_[entity]_[state]snake_case. Source tags extensible per FORGE-DOCTRINE-VARIABLES.md. - Flat-file rule for new scripts:
forge_<context>_<function>.{py,sh}directly underforge/scripts/. No new subdirs. - Self-iteration: if you find a doctrine discrepancy, halt and propose an edit, do not silently override.
- XML context boundaries for any agent prompt you compose:
<system_rules>,<reference_data>,<active_payload>. Templates in Phase 1.6 design. - Memory writes: topic files in
~/.claude/projects/-home-justinwieb-forge/memory/with frontmatter (name, description, type). One-line pointer in MEMORY.md index. Never write secrets. - Mkdocs watcher quirk: the
mkdocs serve --watchdaemon does not pick up files created via the Write tool. After multi-file Write batches, restart withsudo systemctl restart forge-mkdocs.service.
Operational State (live)¶
- Forge runs on Console (192.168.86.50), the Ubuntu dev VM on Finn (Proxmox MS-01 at 192.168.86.67).
- 7 active forge-* systemd services: forge-context-api, forge-dispatcher, forge-inbox-webhook, forge-mkdocs, forge-telegram-ava, forge-telegram-inbox, forge-tmux-anchor.
- mkdocs serves at https://mkdocs.justinsforge.com (Cloudflare Access protected).
- 5 active cron entries that survived Phase 3.2: morning-wellness-check, ha-poller (every 15 min), nudge-fire (every minute), search-index (03:30 nightly), retention sweep (04:15 nightly), mount-watchdog (every 10 min, bridge to 4.6).
- Telegram bots remaining:
@jw_inbox_bot,@Ava_JForgeBot,@Manager_JForgeBot(push-only). All slated for redo in deferred Phase 4.2.
Pending Manual Actions Justin Owns¶
- Cloudflare Access policies for the 11 new
*.justinsforge.comhostnames (some return 502, indicates Access policy not mirrored). Verify in Cloudflare dashboard. - LXC reboots when convenient to apply new hostnames inside containers.
- Section 6 mobile UX (Notion pinned views for inbox + tasks).
Stop Conditions¶
Halt and surface to Justin when: - A doctrine discrepancy appears that requires Section 10 self-iteration amendment. - An action is irreversible and not pre-authorized (e.g. deleting a service account, dropping a database). - An action affects external systems (Cloudflare DNS, Telegram BotFather, n8n credentials) without explicit pre-authorization in this briefing. - The eval harness reports a regression (em-dashes count climbing, MEMORY.md cap exceeded, etc.). - Phase 4 sub-phase ships and natural sign-off gate is reached.
Report progress every 4 to 5 exchanges via forge/scripts/checkpoint.sh --auto or by appending to today's daily log.
[Claude Code, Pure Phoenix Phase 4 continuation briefing]