MarkdownDataStore

MarkdownDataStore is the shared file-based storage utility for structured markdown files under a configured data directory.

Purpose

The class centralizes markdown section parsing, rendering, and updates so agent-level code can remain thin and rely on generic APIs. Files are grouped by optional type folders and sections are normalized to the numbered form ### N. Section Name.

Empty section content is normalized to *None* at write time, so consumers do not need custom fallback logic.

Core API Surface

The canonical file-level methods are listFiles, getFile, updateFile, replaceFile, appendToFile, deleteFile, getSectionMap, and getFileStats.

Selection and mutation can target sections by name or by numeric index, allowing callers to work with stable section numbering when needed.