PSF: Mass-regeneration complete. 53/53 high-fidelity blueprints and TDD suites established. Zero-cost Pro bridge active.

This commit is contained in:
2026-04-07 08:58:08 -04:00
parent f4a91ae747
commit 77c0dac025
58 changed files with 2154 additions and 1671 deletions

View File

@@ -26,55 +26,54 @@ Define automated behaviors for knowledge and task management integrity.
*** TODO Task Promotion Verification
*** TODO Note Distillation Provenance
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: DRAFT
: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.")
The Memex Manager is designed as a collection of independent, composable functions orchestrated by Emacs Lisp. We prioritize modularity, testability, and adherence to functional programming principles. Each function addresses a specific aspect of PKM automation. The system should be easily extensible to accommodate new workflows and data sources. Core functions must be idempotent where applicable, and failures must be gracefully handled with informative logging. The system will interact with Org mode files primarily via the `org.el` library and file system operations. Error reporting should use Emacs' built-in mechanisms.
(defun memex-promote-next-task (project-id)
"Triggered when a task is marked DONE; promotes the successor.")
** 2. Semantic Interfaces (Lisp Signatures)
(defun memex-distill-atomic-note (daily-file-path concept-query)
"Extracts a concept and creates a permanent note.")
#+end_src
*** `memex-capture-unified (content &key source)`
- *Purpose:* Append `content` to `inbox.org`, tagging with `source`.
- *Input:*
- `content`: String, the text to be captured.
- `source`: Keyword, indicating the origin (e.g., `:email`, `:web`, `:cli`).
- *Output:* Boolean, `t` on success, `nil` on failure.
- *Side Effects:* Modifies `inbox.org`.
- *Example:* `(memex-capture-unified "New idea from a book" :source :book)`
* Phase D: Build (Implementation)
*** `memex-metadata-enforce (filepath)`
- *Purpose:* Ensure `:CREATED:` and `:LOGBOOK:` drawers exist and are populated in the Org file at `filepath`.
- *Input:* `filepath`: String, the path to the Org file.
- *Output:* Boolean, `t` if metadata is compliant, `nil` if not (and log warnings.)
- *Side Effects:* Potentially modifies the Org file.
- *Example:* `(memex-metadata-enforce "/home/user/memex/notes/some-new-note.org")`
** 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
*** `memex-task-promote (filepath &key heading)`
- *Purpose:* Advance the GTD status of the task matching `heading` within `filepath` (NEXT -> DOING -> REVIEW -> DONE).
- *Input:*
- `filepath`: String, the path to the Org file.
- `heading`: String, the exact text of the Org mode heading for the task.
- *Output:* Boolean, `t` on success, `nil` if the task isn't found or promotion fails.
- *Side Effects:* Modifies the Org file if the task is promoted.
- *Example:* `(memex-task-promote "/home/user/memex/tasks.org" :heading "Implement file sync")`
** 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
*** `memex-distill-notes (logfile &key keywords)`
- *Purpose:* Extract and create evergreen notes from a daily log file.
- *Input:*
- `logfile`: String, the path to the daily log Org file.
- `keywords`: List of strings. Focuses extraction based on keywords.
- *Output:* List of strings, representing the filepaths of the newly created evergreen notes extracted from the log.
- *Side Effects:* Creates one or more new Org files for the distilled concepts.
- *Example:* `(memex-distill-notes "/home/user/memex/daily/2024-10-27.org" :keywords '("spaced repetition" "zettelkasten"))`
* Registration
#+begin_src lisp
(defskill :skill-memex
:priority 80
:trigger #'trigger-skill-memex
:neuro #'neuro-skill-memex
:symbolic #'memex-audit-metadata)
#+end_src