Files
memex/system/skills/org-skill-atomic-notes.org

44 lines
2.2 KiB
Org Mode

#+TITLE: SKILL: Atomic Notes (Zettelkasten) Retrieval (Deep Memory)
#+ID: skill-atomic-notes
#+STARTUP: content
#+FILETAGS: :knowledge:retrieval:zettelkasten:
* Overview
This skill provides the **Deep Memory** for the `org-agent`. It allows the agent to perform **Sparse Tree Perception** over the entire [[file:../notes/README.org][Atomic Notes (Zettelkasten)]] directory.
By using semantic search and recursive interlinking, the agent can maintain high-signal context across sessions without suffering from "token bloat" or "context rot."
* Philosophy
Knowledge is not a library of books, but a **Directed Acyclic Graph (DAG)** of atomic ideas.
- **Atomicity:** Each note represents exactly one concept.
- **Interlinking:** Value is derived from the *connections* between notes, not just the notes themselves.
- **Homoiconicity:** The notes are treated as data by the agent and as literature by the user.
* The Retrieval Loop
When the agent's neuro-layer requires context on a specific topic, it triggers the following symbolic sequence:
** 1. Concept Perception
The agent performs a `ripgrep` search across `$MEMEX_NOTES/` to identify relevant nodes.
** 2. Sparse Tree Extraction
Instead of reading entire files, the agent extracts a "Sparse Tree"—the headlines, IDs, and key properties of matching nodes. This allows the agent to perceive the *structure* of the knowledge before committing to a deep read.
** 3. Recursive Deep-Dive
If a node is deemed critical, the agent follows its internal links (`file:` or `id:`) to pull in second-degree connections, effectively "remembering" the broader context of an idea.
* Symbolic Implementation
The following logic defines how the agent physically interacts with the notes directory.
#+begin_src lisp
(defun atomic-notes-perceive (query)
"Performs a sparse-tree scan of the Zettelkasten for the given query."
(let ((notes-dir (org-agent::get-env "MEMEX_NOTES" "/app/notes/")))
(kernel-log "MEMORY - Scanning Atomic Notes for: ~a" query)
;; Implementation of ripgrep + org-element sparse tree extraction
(org-agent:run-shell-command (format nil "rg -i '~a' ~a" query notes-dir))))
#+end_src
* See Also
- [[file:org-skill-scribe.org][Scribe Agent (The Distiller)]]
- [[file:../notes/README.org][Atomic Notes Standard]]