#+TITLE: SKILL: Memex Manager (Universal Literate Note) #+ID: skill-memex #+STARTUP: content #+FILETAGS: :memex:gtd:zettelkasten:integrity:psf: * Overview The **Memex Manager** is the primary automation engine for the Personal Knowledge Management system. It enforces metadata standards, automates task lifecycles, and distills ephemeral daily logs into timeless knowledge. * Phase A: Demand (PRD) :PROPERTIES: :STATUS: FROZEN :END: ** 1. Purpose Define automated behaviors for knowledge and task management integrity. ** 2. User Needs - **Unified Capture:** Landing all new information in `inbox.org`. - **Metadata Compliance:** Mandatory `:CREATED:` and `:LOGBOOK:` drawers. - **Automated Task Lifecycle:** `NEXT` promotion logic for GTD. - **Mobile Sovereignty:** Compatibility with Markor and Orgzly. - **Agentic Distillation:** Extracting evergreen concepts from daily logs. ** 3. Success Criteria *** TODO Metadata Audit Accuracy *** TODO Task Promotion Verification *** TODO Note Distillation Provenance * Phase B: Blueprint (PROTOCOL) :PROPERTIES: :STATUS: SIGNED :END: ** 1. Architectural Intent Interfaces for AST-driven task and note manipulation. Source of truth is the Org-mode filesystem. ** 2. Semantic Interfaces #+begin_src lisp (defun memex-audit-metadata (file-path) "Parses an Org file to ensure standards compliance.") (defun memex-promote-next-task (project-id) "Triggered when a task is marked DONE; promotes the successor.") (defun memex-distill-atomic-note (daily-file-path concept-query) "Extracts a concept and creates a permanent note.") #+end_src * Phase D: Build (Implementation) ** Metadata Audit #+begin_src lisp :tangle projects/org-skill-memex/src/memex-logic.lisp (defun memex-audit-metadata (file-path) (let ((content (uiop:read-file-string file-path)) (errors '())) (with-input-from-string (s content) (loop for line = (read-line s nil) while line do (when (cl-ppcre:scan "^\\*+ " line) (let ((next (read-line s nil))) (unless (and next (cl-ppcre:scan ":PROPERTIES:" next)) (push line errors)))))) errors)) #+end_src ** Task Promotion #+begin_src lisp :tangle projects/org-skill-memex/src/memex-logic.lisp (defun memex-promote-next-task (project-id) (let ((gtd-file (or (uiop:getenv "GTD_FILE") "gtd.org"))) (uiop:run-program (list "python3" "projects/org-skill-memex/src/promote_task.py" gtd-file project-id)))) #+end_src * Registration #+begin_src lisp (defskill :skill-memex :priority 80 :trigger #'trigger-skill-memex :neuro #'neuro-skill-memex :symbolic #'memex-audit-metadata) #+end_src