prompt: startup is two lines; wake's own footer carries the paging order

This commit is contained in:
victortaelin 2026-07-26 15:28:48 -03:00
parent 5a50e4f321
commit 2742e57fd0
2 changed files with 12 additions and 17 deletions

View file

@ -64,17 +64,13 @@ Your memory is OptMem:
- The tool is `~/.optmem/memo` - The tool is `~/.optmem/memo`
- Your memories are in `~/.optmem/memory` - Your memories are in `~/.optmem/memory`
OptMem survives every new session, every compaction and every change OptMem outlives every session, compaction, model and vendor change.
of model or vendor. Without it you do not know who you are, or what Without it you do not know who you are, or what was decided and tried.
was already decided and tried.
### At startup: activating OptMem (mandatory) ### At startup: activating OptMem (mandatory)
Run `~/.optmem/memo wake` before any other tool call, in every session. Run `~/.optmem/memo wake` before any other tool call, in every session, and do
It prints in numbered parts, each ordering the next; run every one until exactly what it prints, until it prints `You are awake.`
a part says `You are awake.` Do not stop early: part 1 is your distant
past, the last part is this week. If wake refuses because compressions
are pending, do them and run `~/.optmem/memo wake` again.
### While working: register memories (mandatory) ### While working: register memories (mandatory)

17
memo
View file

@ -410,17 +410,13 @@ Your memory is OptMem:
- The tool is `{memo}` - The tool is `{memo}`
- Your memories are in `{data}` - Your memories are in `{data}`
OptMem survives every new session, every compaction and every change OptMem outlives every session, compaction, model and vendor change.
of model or vendor. Without it you do not know who you are, or what Without it you do not know who you are, or what was decided and tried.
was already decided and tried.
### At startup: activating OptMem (mandatory) ### At startup: activating OptMem (mandatory)
Run `{memo} wake` before any other tool call, in every session. Run `{memo} wake` before any other tool call, in every session, and do
It prints in numbered parts, each ordering the next; run every one until exactly what it prints, until it prints `You are awake.`
a part says `You are awake.` Do not stop early: part 1 is your distant
past, the last part is this week. If wake refuses because compressions
are pending, do them and run `{memo} wake` again.
### While working: register memories (mandatory) ### While working: register memories (mandatory)
@ -535,7 +531,10 @@ def cmd_wake(d, args):
print("Your memory, part %d of %d, oldest first." % (k, len(parts))) print("Your memory, part %d of %d, oldest first." % (k, len(parts)))
print("\n".join(parts[k - 1])) print("\n".join(parts[k - 1]))
if k < len(parts): if k < len(parts):
print("Run: memo wake %d %d" % (k + 1, T)) # This footer is the only instruction that survives every harness's
# truncation (pi drops the HEAD of a long output), so it has to say
# both that the read is unfinished and how to continue it.
print("Not awake yet. Run: memo wake %d %d" % (k + 1, T))
else: else:
# always, even for a one-part memory: the contract an agent is given # always, even for a one-part memory: the contract an agent is given
# is "run parts until one says awake", so it must always arrive # is "run parts until one says awake", so it must always arrive