Expand description
ultron memory import --from claude-code|codex: the notes other harnesses keep on disk become typed memory
records (crate::memory_records), stored through memory.propose with the user’s evidence, so the same secret
check refuses what holds a secret. Which files are read follows Mirror (memory/import/*.rs):
- Claude Code: every
<config>/projects/<encoded project>/memory/directory (<config>isCLAUDE_CONFIG_DIR, else~/.claude): one note per Markdown file,MEMORY.md(the index), dotfiles, symlinks andold/left out. YAML frontmatternamegives the key,descriptionthe situation andmetadata.type(ortype) the record type:feedback→ preference,user/project→ fact, else reference. A project directory whose encoded name maps back to exactly one existing directory makes its notesprojectrecords of that directory; otherwise they areglobal. - Codex:
<codex home>/memories/(CODEX_HOME, else~/.codex):memory_summary.md(User Profile → fact, User preferences → preference, General Tips → procedure) andMEMORY.md(per task group: User preferences, Reusable knowledge → fact, Failures and how to do differently → pitfall;[Task n]tags name the situation). Bullets are the unit. Allglobal.
Every record is tagged with its source file (source: harness and home-relative path). Keys are the note’s
slug plus a hash of what identifies it in its source (the file for Claude Code, file and text for Codex), so a
rerun finds the same keys: a record whose key is already indexed with the same text and fields is unchanged,
one with other text is replaced. Notes over their type’s cap, or holding a secret, are refused.
Structs§
Enums§
Functions§
- claude_
code_ notes - Every note under a Claude Code memory directory, in path order.
- codex_
notes - Notes of a Codex memories directory:
memory_summary.md, thenMEMORY.md. - discover
- The note directories of
harnessunderroot(notes_root), in path order. - home_
relative pathwith the home directory written as~.- import_
all - Import every planned note: one memory service per scope group, over the one import
journal(each loads what the previous one wrote).eachhears every note’s outcome, in order. - import_
one - Store one planned record (an
AddorReplace) throughservice: the written operation, or why not. - notes_
root - Where a harness keeps its notes, given the injected environment.
- plan
- The plan for
sources: every note with its key, scope and action againstindex. - project_
path - The checkout a Claude Code project directory stands for, when its encoded name (
-home-me-src-repo) maps back to exactly one existing directory (a-is a separator or a literal hyphen). - propose_
payload - The
memory.proposepayload of a planned record: the user’s own notes, with the source file as evidence. - slug_
key - A kebab-case key of at most 60 bytes from free text (Mirror
slug_key).
Type Aliases§
- Backend
For - The memory backend of one scope group (
None: global notes;Some: a project’s). - Scope
Tags - The identity tags a record of
scopegets (as a session inprojectwould tag it; hindsightworker_scope_tags): computed by the caller, which knows the server’s tagging.