fix voice-drift feedback loop; goals carry next-step + staleness
Two related changes that let phi's long timescale survive across cycles
without undercutting her voice in the process.
Voice fix — the [SELF-AWARENESS] block was reflecting phi's own dry
register back at her every cycle as canonical identity, reinforcing the
register phi.md was trying to prevent. Take down the mirrors:
- [SELF-AWARENESS] is now a third-person posting inventory
(subjects / people / mode / missing lately), generated by an agent
named `phi-posting-inventory`. Block header and agent prompt both
forbid em-dashes, abstract-noun load-bearing, rhetorical openings,
and "X isn't Y, it's Z" constructions.
- [RECENT OPERATIONS] post bodies stripped (action + char count only).
Titles for intentional public artifacts (goal titles, blog docs,
URL card titles) preserved.
- [DISCOVERY POOL] header trimmed to plain "do not copy their phrasing."
- phi.md "how i write" gains a concrete-claim/person/object/joke rule
and a texting-someone-smart test. No banned-words list (would orbit
forbidden tokens).
- No new [VOICE CHECK] block; intent distributed across existing
block headers and the constitution.
Goals carry work, not just intent (the back-burner design):
- Records gain `kind: Literal["goal", "interest"]` and operational
fields (current_state / next_step / last_step / last_step_at /
blocked_by) preserved across constitutional edits.
- New phi-writable `update_goal_progress` tool (not owner-gated).
- [GOALS AND INTERESTS] block shows next step + a "stalled" line
past STALE_AFTER_DAYS=4. `invalidate_state_cache` clears the 5min
block cache on either mutation tool so phi sees her own writes
immediately.
- Cycle and reflection prompts scan goals first and update_goal_progress
when advancing or deferring.
Plus codex's P2 fixes (Literal type + ValueError in core, tz-safe
_stale_line, cache invalidation), one new skill `phi-prompt-inspect`
documenting the logfire query pattern for pulling rendered prompts,
and docs synced (system-prompt.md / ARCHITECTURE.md / memory.md /
tool-sprawl.md).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>