Completing the `pai-*` → `lifeos-*` rename: a census of the remaining runtime strings, with a migration design per string
Running LifeOS 7.1.1. RenameMap.json marks the prose, Pulse-UI, and PascalCase-identifier classes done, and #1497 notes the full end-to-end rename of the pai-* marker taxonomy is on the backlog. We went through the 7.1.1 tree and traced every remaining pai string to its actual readers, so the survey work is done when you want the backlog item. The census and a migration design per string are below; the short version is that the rename is much smaller than it looks.
What the census says
Of everything still carrying pai, only three strings are load-bearing: matched by a live reader across a real boundary. The rest are write-only provenance, self-contained filenames, or internal identifiers.
| String | Hits | Writer → reader | Boundary |
|---|---|---|---|
<pai-memory-delta> |
16 | hooks/MemoryDeltaSurface.hook.ts → hooks/FormatGate.hook.ts (substring match) + the system-prompt render contract |
hook → transcript → hook + model |
pai-sync |
17 | LIFEOS/TOOLS/WorkSweep.ts (issue label) → LIFEOS/PULSE/modules/work.ts:issueSource() + CSS |
tool → GitHub → daemon/UI |
pai_system_prompt |
5 | LIFEOS/TOOLS/TelosFreshness.ts (registry slug) → LIFEOS/TOOLS/ContextAudit.ts (exact match) |
intra-repo + cached in freshness state |
Not load-bearing, with evidence:
convention: pai-freshness-v1(64 hits, the biggest by volume) is write-only. Three generators stamp it; no code anywhere reads or validates it (the freshness engine grades offlast_updated/last_reviewedand never touches the field). Renaming it breaks nothing.<pai-memory-health>(9) is emitted and consumed only via the system prompt; no hook gates on it.pai-memory-v1(6) is a dead dialect: the kb-v3 validator already flags any old convention generically. Best left alone.MEMORY/STATE/pai-settings-snapshot.json(5) has one writer and one reader, the same hook. Worst case after a rename is a single noisy settings-diff.# pai-user-data-sync(3) is the git-hook marker inLifeosUpgrade.tsm-007, whose apply isn't implemented yet — renaming it now is free; after m-007 ships it needs a compat check.- Lowercase identifiers (
paiPath,paiUserDir,paiRoot, and friends) never serialize and never cross a process. Same argument your class-5 rationale already made for the PascalCase sweep.
Three things we'd flag before any sweep
- The memory-tag family is already inconsistent in stock.
hooks/LoadMemory.hook.tsemits<lifeos-memory>while its delta/health siblings still emitpai-*. Because FormatGate's gate is a substring match on the transcript, a half-rename doesn't error — it silently stops enforcing the memory line. The fix that works: rename emitter + system prompt atomically and have FormatGate accept both tags for one release. We ran exactly this shape on our install and can confirm the gate holds through the transition. - Installs are additive and never touch
USER/**, so stamped user data outlives every release. A rename shipped without a migrator strandspai-freshness-v1in users' constitutional files forever. AMigrateContextFreshness-style restamp (registry-driven, dry-run, content-hash guard) closes it; happy to include one. pai-synclives on users' own GitHub issues, outside the tree. A code-only swap would silently declassify every historical issue on the Pulse work board. The safe path is your #1497 pattern generalized: writers emitlifeos-sync,issueSource()accepts both, and aLifeosUpgrademigration renames the label via the API, which preserves it on existing issues.
Proposed shape
A short ordered series, one subsystem each, every PR verified-not-swept with a found-but-not-changed list, and each one leaving the tree consistent if it lands alone: (1) the no-reader strings plus their migrators, (2) the memory-tag family, (3) the freshness slug, (4) the sync label with its label migration. Identifiers and prose we'd leave for your cut unless you want them as follow-ups.
We're happy to submit the series (the memory-tag change is already built and validated live), or to leave this census with you to fold into the broader cleanup, whichever is less work on your side. With the dual-name windows in place, nothing breaks in either order.
Done, scoped to the part that was actually load-bearing: the five context tags and the pai_system_prompt slug are renamed, emitters write lifeos- only, and FormatGate accepts both prefixes through an explicitly droppable migration window — the dual-name shape you proposed.
Your FormatGate warning was exactly right, and it was closer than the issue implies. The gate was matching the single literal pai-memory-delta, so renaming the emitters alone would have silently stopped enforcing the memory-line contract with nothing failing loudly. We proved it by running the old gate against a new-form tag: false. The contract survived only because the gate and the emitters moved in the same change. That warning was the most valuable thing in this report.
Deliberately not renamed, each for a specific reason rather than as backlog:
convention: pai-freshness-v1in 82 data-file frontmatters — migrating real data buys nothing here. There is no parser: three writers stamp the key and everything else preserves it verbatim, so every value is already accepted and there is no code site for a dual-accept branch.- Archived
LIFEOS/ALGORITHM/v*.mdand oldpai-memory-v1notes — historical record; renaming would falsify it. pai-sync— a live GitHub label. Renaming locally without the repo-side rename would silently drop the marker, since the sync pre-filters against the repo's real label set.- Filesystem paths, state filenames, and the
pai-markercomment IDs — those IDs are live keys on already-published comments.
Net residual is 276 hits across 169 files, every one in a category above. Credited in source.