Skip to content

components C9: '#' memory-append shortcut - #301

Merged
ericleepi314 merged 1 commit into
mainfrom
components/c9-memory-shortcut
Jun 11, 2026
Merged

components C9: '#' memory-append shortcut#301
ericleepi314 merged 1 commit into
mainfrom
components/c9-memory-shortcut

Conversation

@ericleepi314

Copy link
Copy Markdown
Collaborator

Summary

  • A prompt starting with # saves a note to a chosen memory file instead of starting an agent turn: repl routing (precedence /, !, #; bare # falls through to the agent) → MemorySaveScreen over the /memory target hierarchy (build_memory_options promoted to a public shared API so the two pickers can never drift) → services/memory_append.py.
  • Honesty note (recorded in plan §9, gap-doc T7, and the module docstring): the vendored TS snapshot ships only the renderer (UserMemoryInputMessage.tsx# row + random "Got it. / Good to know. / Noted.") and the selector — no # detection or append exists in it. TS-verbatim pieces are ported verbatim (acknowledgement trio, "Cancelled memory editing", target hierarchy); the connective glue is explicitly port-derived: ensure-create, single-newline separation, - bullet unless the note supplies its own punctuation.
  • Every failure/cancel path restores #note into the prompt (nothing typed is lost — deliberate, don't revert as "extra"); notes are recorded in prompt history like ! commands; no agent turn consumed.

Test plan

  • 17 tests: append discipline (create+bullet, newline handling, no double-bulleting, empty rejected, OSError/ValueError → False, parent-dir creation), screen pilot (enter/down-enter/escape), repl routing via the real handler (# intercepts stripped, bare # falls through, ! unaffected), app flow (cancel/success/write-failure/enumeration-failure rows + restore, history recording)
  • TUI + services + memory suites: 762 passed, 0 new failures
  • Full suite BASELINE-IDENTICAL vs the 12 known pre-existing failures
  • Critic: APPROVE (independently re-verified the snapshot claims; 3 MINOR / 4 NIT all applied)

🤖 Generated with Claude Code

A prompt starting with '#' saves a note to a chosen memory file
instead of starting an agent turn: repl routing (precedence /, !, #;
bare '#' falls through) -> MemorySaveScreen over the /memory target
hierarchy (build_memory_options, promoted to a public shared API so
the two pickers can never drift) -> services/memory_append.py.

Honesty note (documented in the plan, gap doc, and module docstring):
the vendored TS snapshot ships only the RENDERER
(UserMemoryInputMessage.tsx - '#' row + random "Got it. / Good to
know. / Noted.") and the selector; no '#' detection or append exists
there. TS-verbatim pieces are ported verbatim (acknowledgement trio,
"Cancelled memory editing", target hierarchy); the connective glue is
explicitly port-derived: ensure-create + single-newline separation +
'- ' bullet unless the note supplies its own punctuation; every
failure/cancel path restores '#note' into the prompt so nothing typed
is lost; notes are recorded in prompt history like '!' commands.

Critic: APPROVE (3 MINOR / 4 NIT, all applied: docstring precision,
history recording, enumeration-failure test, ValueError guard,
UIOption typing, public build_memory_options). 17 tests; full suite
baseline-identical.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@ericleepi314
ericleepi314 merged commit a58566f into main Jun 11, 2026
singlaamitesh pushed a commit to singlaamitesh/clawcodex that referenced this pull request Jul 7, 2026
…-memory-shortcut

components C9: '#' memory-append shortcut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant