Generate harness memory bootstrap files from the inventory registry at build time #123
Labels
No labels
blocked
bug
decision
duplicate
enhancement
help wanted
invalid
landed?
question
ready-to-merge
stale
wontfix
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
allod/archetypes#123
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Generate every harness's memory bootstrap at VM build time from the allod/inventory registry, so a session reads absolute
memory.mdpaths written by the same build that creates the checkouts those paths name.Primary goals:
memory.mdpaths, one per registered memory repo.memory.mddirectly; theadapters/<harness>/pointer layer in the memory repos is deleted after one transition cycle.Current state and specifics
The only absolute truth in today's shim is the hand-maintained harness bootstrap file (pi's
~/.pi/agent/AGENTS.md, and equivalents). Everything below it is a chain of relative pointers: the bootstrap names adapter files inside each memory repo, and each adapter says "read../../memory.mdrelative to this file." That resolves correctly only while checkouts sit at the registry's canonical paths, and the map of those canonical paths exists only as prose insidememory.md— which a session can read only after the pointer chain has already resolved. A session that mis-resolves has nothing machine-checkable to catch itself against.Two defects compound this. First, the adapter files have drifted between memory repos: the public repo's adapters carry a gloss ("the repository root") and a recovery clause ("if that path does not resolve, locate the file before continuing"), and the private forks' copies have dropped both, so the recovery instruction exists only where resolution never fails. Second, the resolved path shapes collide across repos (
…/allod/memory/memory.mdvs…/<name>/memory.md— same filename, different nesting), so a session that resolves the first naturally mirrors that shape onto the second and hits ENOENT. A session this week did exactly that, then compounded it by treating the container directory of public checkouts as a repository when reporting the failure. The claude harness additionally maintains a projects-directory symlink by hand. All of this is position-dependent configuration that the build could own instead.Scope
In scope: the generator module and per-harness templates (pi, codex, claude); the build-time existence assertion for registered memory checkouts; deletion of the
adapters/layer from allod/memory; a handoff item for each deployment to delete its private memory fork's adapters once its profiles rebuild; and generation of the claude projects symlink instead of hand-maintenance. Out of scope: runtime registry resolution at session start (adds a runtime dependency to the one thing that must never fail silently), any repository renaming or layout change (the memory repos' layouts are already identical and correct), and any change tomemory.mdcontent policy.Handoff item for each deployment (private memory forks):
Once your profiles rebuild on the allod/archetypes memory-bootstrap generator (allod/archetypes#124), delete your private memory fork's
adapters/layer the same way allod/memory PR #75 does:git rm -r adapters, and drop the adapter section from the fork's README. The harness bootstraps no longer name adapter files; the Claude attribution-ban policy now lives in the archetypes generator's Claude template, so it survives the deletion.Sequencing across the chain, for the integrator:
memoryflag — additive, safe anytime).rebuild-vm <name>on the hypervisor).adapters/.