Skip to main content

mnemo_md_sync/
lib.rs

1//! v0.4.0 (P2-6) — Markdown+Git working-set adapter.
2//!
3//! Wuphf (Show HN, 2026-04-27) popularized the Karpathy-style
4//! "agent wiki": a git repo of Markdown notes that the agent reads
5//! and writes directly. The complaint Mnemo gets is that operators
6//! who already have such a wiki don't want to re-platform onto a
7//! database — they want recall + provenance over the files they
8//! already have. This crate solves that by syncing a git-tracked
9//! Markdown directory into Mnemo's hot tier:
10//!
11//! * Each `.md` file's frontmatter (`mnemo_id`, `tags`, `expires_at`)
12//!   maps to a Mnemo memory record.
13//! * Heading + body content lands in `MemoryRecord.content`.
14//! * Edits round-trip: changing a file produces a new memory version;
15//!   appending a memory in Mnemo can be flushed back to disk.
16//!
17//! This crate ships the **contract layer** (parser, spec, tests).
18//! The notify-based watcher and the gix-backed commit-on-flush are
19//! follow-ups that swap in heavier deps without changing this API.
20
21pub mod parser;
22pub mod spec;
23
24pub use parser::{ParseError, ParsedMarkdown, parse_markdown};
25pub use spec::{MdSyncSpec, SyncFlushPolicy};