Skip to content

Pure Phoenix Phase 4.8 additions (2026-04-29)

Final-mile refactor closing 11 audit punch-list items against the long external research dump (LLM mechanics, semantic isolation, recursive self-improvement). Full closeout in forge/LESSONS.md under the phase-4-8-final-mile-refactor block.

New scripts

Script Doctrine ref What it does
scripts/forge_steering_intercept.py Section 13 Pre-flight deny-list inspection for dispatcher worker tasks; rejects on ~/.forge-secrets/, force-push to main, rm -rf ~, credential echo, eval-harness disable, doctrine removal. Mirror table in system-map/steering.md.
scripts/forge_dispatcher_critic.py Section 13 Maker-Checker post-pass invoked when task has critic: true or tags: ["high-stakes"]. Sonnet audits the result file and writes a <task>.critique.md sidecar with verdict + issues + tests-recommended.
scripts/forge_context_prefetch.sh Section 12 (Daemon Layer) systemd timer (5-min cadence) writes data/context-prefetch.json snapshot: recent handoffs, active tmux, task counts, last eval, last auto-dream. Readers fall back to live queries if cache > 15 min old.
scripts/forge_skill_synthesis_propose.py Section 10 + external-research autonomous-skill-synthesis Scans tasks/completed/ for prefix clusters; drafts skill .md proposals into data/skill-proposals/. PROPOSE-only, never auto-promotes.

New flags

  • forge_eval_harness.py --auto-lessons calls Sonnet on each failed check to synthesize one actionable rule per failure. Writes an [auto-synthesis] block to LESSONS.md. Opt-in only; not added to the nightly cron.

XML boundary tag adoption

Section 11 boundary tags now wrap the prompts in: - forge_telegram_brain.py (capture + coordinator personas) - forge_eval_harness.py synthesize_diagnostic - forge_dispatcher_critic.py

All three wrap user / external content in <active_payload> and warn the model that payload contents are DATA not instructions (instruction-injection defense).

Variable-convention reference example #2

forge_dispatcher.sh spawn_worker() rewritten end-to-end with [source]_[entity]_[state] snake_case (raw_task_json, clean_task_*, claude_model_id, payload_worker_prompt, worker_log_path, payload_quota_*). Canonical companion to forge_notify.sh (Phase 4.3).

Path-scoped CLAUDE.md pattern

brands/nova-design/CLAUDE.md is the first L4 path-scoped instruction file. Replicate the pattern in any sub-directory whose work has locality-specific rules (e.g., a brand with vendored theme code). Root CLAUDE.md mentions the pattern in the "Where to look for more" table.

Systemd units added

  • forge-context-prefetch.service (oneshot, ProtectSystem=full + PrivateTmp=true)
  • forge-context-prefetch.timer (OnBootSec=2min, OnUnitActiveSec=5min, Persistent=true)

Both mirrored in forge/infra/systemd/ and installed in /etc/systemd/system/. Timer enabled.

Pre-existing rot fixed in passing

  • forge-dispatcher.service ExecStart was stale (scripts/dispatcher.sh); Phase 4.3 missed it. Re-deployed from forge/infra/systemd/.
  • Search-index venv (~/.forge-venvs/search/) was broken (urllib3 http2 import error, missing pip); rebuilt clean. Old kept at ~/.forge-venvs/search.bak/ for rollback.
  • Today's daily log was auto-created by capture brain without the mkdocs URL header; backfilled.

Eval state at closeout

forge_eval_harness.py --full --no-write returns 8 of 8 PASS, 0 regressions. Em-dash baseline 53/55. MEMORY.md 111/200 lines.

Owner

Pure Phoenix Phase 4.8 (Claude Code, refactor auditor session).