feat(memory): tighten LocalRecall contract and validator #2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/memory-contract-review"
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?
Why
A review of the memory profile rules and
docs/LOCALRECALL.mdfoundproblems that would cause wrong behavior once a workstation enables
localrecall-automatic:and squash integration this repository prefers.
unavailable,which suspends memory until the operator reruns the preflight.
AGENTS.mdand the contract, and everysession read the retrieval and completion-packet rules, even with
memory disabled.
What changed
AGENTS.mdkeepsonly what every agent needs under every profile. Retrieval, staleness,
the completion packet, triggers, and unavailability move to a new
"Primary agents" section of the contract, which now serves every agent
with memory enabled. Skills point at the contract.
Verified-Againstas<path>@<object-hash>, so a record's freshness survives rebase andsquash and can be checked without the verifying commit. Version-3
records stay valid under the old rule.
supersededstatus. A newer revision of the stem reportssupersededand suspends nothing. Verified-replace lists the stemagain before deleting and stops if a concurrent writer appeared. The
contract states the remaining last-writer-wins window; a conditional
write in LocalRecall would close it.
default trigger list, plus the phrases "remember this" and "save to
memory", so routine work sends no completion packet. A
## Memory triggerssection inAGENTS.local.mdreplaces the default.Memory preflightfield inAGENTS.local.mdholds the date of the last passing preflight. Withmemory enabled and no date, memory is unavailable.
preferencerecords belong only in a global collection.Memory operator;YYYY-MM-DD, and absent under profilenone;localrecall-readerand enable onlylocalrecall-curator;mcpServersmust list onlylocalrecall-curator;Memory support: nonerejects a leftover## Project memorysection.
foundry-upgradegains a migratithe preflight date.
Verification
bash tests/verify-agent-config.sh: all 81 tests pass. The 9 newcases include 8 that failed before the validator change.
bash scripts/verify-agent-config.sh: the source validates asstate=template.git diff --check: clean.tested the new rules with a real agent.
Risks and follow-ups
reruns the preflight and records
Memory preflightMemory operatornowfail validation.
close the concurrent-replace window.