diff --git a/plans/0012-the-archivist.md b/plans/0012-the-archivist.md index 9f14a63..c9856f2 100644 --- a/plans/0012-the-archivist.md +++ b/plans/0012-the-archivist.md @@ -166,6 +166,16 @@ Backfill stays cheap the same way. It is triggered by a new entity or a new alias, and it visits the places a search for those names turns up. It is not a standing re-read of all history. +One writer at a time. A play session and an Archivist pass each hold +the world lock, a lock file at the world root, for as long as they +run. Note writes are atomic regardless, a temp file renamed into +place, so injection can never read a half-written note. But renames, +merges, and record annotation change what other files point at, and +those happen only under the lock. Chris's hand edits stay +uncoordinated; the Archivist's conservative charter is what makes them +safe. This is also why live trailing waits: an Archivist inside a live +session needs finer locks than one world lock. + ## The guard on the record Backfilling means the Archivist touches the record, and that needs a @@ -305,8 +315,11 @@ before the agent that uses it, and the Archivist earns record access last. 1. **The note format.** Seeded stubs, frontmatter, alias-aware - resolution; the `## Mentions` stamp folds into the seed line. *You - can now: open a stub and read the scene that created it.* + resolution; the `## Mentions` stamp folds into the seed line. The + session loads every note's address and aliases into the resolver at + startup, so a bare name cannot re-establish an entity that already + exists on disk. *You can now: open a stub and read the scene that + created it.* 2. **Injection.** 0011 step 3 on the new format: referenced notes reach the next turn's prompt. *You can now: watch the DM keep an entity's facts straight two turns after naming it.*