--- name: note description: > Capture notes, texts, URLs, or whole articles into a personal knowledge base and answer questions against it. Triggers on "note X", "/note cron X", "search my notes for X", "delete/edit the note about X", "forget X". For filing reference material to search later — not a short durable fact/preference to just remember, and not a bare URL saved only to read later with no filing. --- # Note A personal capture-to-knowledge-base skill. The user throws in notes, texts, URLs, or whole articles from any channel; each input is captured raw, then reformulated and filed into one structured markdown document (`notes/notes.md`) organized into thematic sections that the LLM owns and grows. Search = load the whole document and answer from it. ## Architecture — read this first Two-stage pipeline, one shared compile step: - **Capture (always, instant, dumb).** `note_capture.py` writes the raw input verbatim into `notes/inbox/` (atomic) plus one line to `log/note.log`. No reformulation, no reading of `notes.md`, no fetching. This is all capture ever does. - **Compile (reformulate + file into `notes/notes.md`).** Runs either **inline** in the immediate mode, or in the **background** cron drain. Same workflow either way. Storage layout under the workspace root (fixed locations): ```text notes/ ├── notes.md ← THE structured doc (thematic ## sections, LLM-owned) ├── inbox/ ← pending captures (one file each); compile drains this ├── done/ ← successfully compiled captures (sibling of inbox/) ├── hard/ ← held back: paywalled / unreadable / ambiguous — for manual review └── .compile.lock ← concurrency lock shared by inline compile and cron drain log/note.log ← append-only audit of every capture ``` **No database — ever.** Notes live *only* in `notes/notes.md` (prose) plus the `notes/` pipeline dirs above. There is **no** SQLite/DB backend. To find a note, `grep` or read `notes/notes.md` — **never search `db/`, never run `sqlite3`, never create or open any `.sqlite`/`.db` file.** (The AGENTS.md "store SQLite under `db/`" convention does **not** apply to notes — that is for other skills.) An older version of this skill used a database; it is gone. If you catch yourself opening a DB, stop — the answer is in `notes/notes.md`. **Separate store.** `notes/` is not agent memory: keep it distinct from `keep`, `MEMORY.md`, and the llm-wiki store (`cml/`). Never cross-read or cross-write between them. The Dream processor must not touch `notes/`. **Run scripts with `uv run`, workspace-relative paths** (exec runs from the workspace root, not the skill dir): `uv run skills/note/scripts/