A memory index can be generated by scanning recent files rather than read from a stored index.
The scan-built index only runs for stores that request a generated index; others keep the on-disk file.
What's wrong with this entry?
New code builds a memory index at load time by walking the memory directory, taking the most recently modified files and reading each one's name and description header fields, falling back to the filename and first heading. The result is rendered as markdown and truncated at a byte budget. It runs only for stores that ask for a generated index; stores without that keep using an index file on disk.
- The walk skips dotfiles and is capped on depth, number of files and per-file size.
- Emits
tengu_memdir_index_assembledwith scan counts, how many files needed the filename fallback, whether output was truncated, and whether a disk index was superseded. - The consolidation prompt has a matching variant that drops the "update the index file" step in favour of keeping each file's header fields accurate.
tengu_memdir_index_assembled
Strings lifted out of the shipped bundle, so the claim above can be checked against them.