58 lines
2.4 KiB
Org Mode
58 lines
2.4 KiB
Org Mode
#+TITLE: PROTOCOL: Org-Agent Memex (Knowledge Management Standards)
|
|
#+STATUS: SIGNED
|
|
#+AUTHOR: Architect-Agent
|
|
#+CREATED: [2026-03-31 Tue 12:00]
|
|
#+SIGNED: [2026-03-31 Tue 12:45] Agent (Architect)
|
|
|
|
* 1. Architectural Intent
|
|
This protocol defines the shared Lisp interfaces for the "Memex Agent" skill. Its goal is to automate the "boring" parts of the knowledge and task management lifecycle while maintaining strict structural integrity.
|
|
|
|
Following the **Single User/Single Agent** philosophy, all state transitions are event-driven and strictly reference the Org-mode AST as the primary data store. No external databases are permitted.
|
|
|
|
* 2. Semantic Interfaces
|
|
|
|
** 2.1 Metadata Integrity Audit
|
|
#+begin_src lisp
|
|
(defun memex-audit-metadata (file-path)
|
|
"Parses an Org file to ensure all entries comply with KM standards.
|
|
Checks for: :CREATED: property, :LOGBOOK: drawer placement, and :AUTHOR:/:ASSIGNED: for collaborative items.
|
|
Returns a plist of non-compliant entries: (:file \"path\" :errors (list-of-errors))"
|
|
)
|
|
|
|
(defun memex-fix-metadata (entry-id)
|
|
"Attempts to automatically fix missing headers (e.g., adding a missing :LOGBOOK: drawer or current timestamp to :CREATED:)."
|
|
)
|
|
#+end_src
|
|
|
|
** 2.2 GTD Task Promotion (The "Baton Pass")
|
|
#+begin_src lisp
|
|
(defun memex-promote-next-task (project-id)
|
|
"Triggered when a NEXT item in a sequential project is marked DONE.
|
|
1. Locates the project by ID in gtd.org.
|
|
2. Identifies the NEXT available TODO item in the sequence.
|
|
3. Promotes it to NEXT, updating the :LOGBOOK: state transition.
|
|
4. Returns the promoted task ID or NIL if no tasks remain."
|
|
)
|
|
#+end_src
|
|
|
|
** 2.3 Agentic Distillation (The Scribe Loop)
|
|
#+begin_src lisp
|
|
(defun memex-distill-atomic-note (daily-file-path concept-query)
|
|
"Extracts a specific concept from an immutable daily log and transforms it into a timeless atomic note.
|
|
1. Scans daily log for headers or tags matching the query.
|
|
2. Formats the note with concept-snake_case filename.
|
|
3. Adds a 'Source:' backlink to the original daily file.
|
|
4. Writes the result to $MEMEX_NOTES/.
|
|
Returns the path of the newly created note."
|
|
)
|
|
#+end_src
|
|
|
|
* 3. Integration with PARA and Git
|
|
The Memex Agent MUST perform a `git commit` after every successful task promotion or note distillation to ensure state persistence and provide a clear audit trail.
|
|
|
|
#+begin_src lisp
|
|
(defun memex-sync-state (commit-message)
|
|
"Stages and commits all changes to the local Git repository."
|
|
)
|
|
#+end_src
|