refactor: Flatten directory structure library->harness, library/gen->skills

This commit is contained in:
2026-04-27 08:41:26 -04:00
parent 43dbe3cf2d
commit 664ba8243d
68 changed files with 637 additions and 666 deletions

View File

@@ -41,14 +41,14 @@ The Scribe reacts to the `:heartbeat` sensor. It maintains a state file (`scribe
* Phase D: Build (Implementation)
** Package Context
#+begin_src lisp :tangle ../library/gen/org-skill-scribe.lisp
#+begin_src lisp :tangle ./org-skill-scribe.lisp
(in-package :opencortex)
#+end_src
** State: Checkpoint Management
We track the last processed universal time to avoid redundant distillation.
#+begin_src lisp :tangle ../library/gen/org-skill-scribe.lisp
#+begin_src lisp :tangle ./org-skill-scribe.lisp
(defvar *scribe-last-checkpoint* 0
"The universal-time of the last successful distillation run.")
@@ -70,7 +70,7 @@ We track the last processed universal time to avoid redundant distillation.
** Filtering: Privacy & Relevance
The Scribe only cares about non-personal, non-distilled headlines.
#+begin_src lisp :tangle ../library/gen/org-skill-scribe.lisp
#+begin_src lisp :tangle ./org-skill-scribe.lisp
(defun scribe-get-distillable-nodes ()
"Returns a list of org-objects from the daily/ folder that require distillation."
(let ((results nil))
@@ -91,7 +91,7 @@ The Scribe only cares about non-personal, non-distilled headlines.
** Probabilistic: Extraction Prompt
The LLM is tasked with identifying atomic concepts within the raw text.
#+begin_src lisp :tangle ../library/gen/org-skill-scribe.lisp
#+begin_src lisp :tangle ./org-skill-scribe.lisp
(defun probabilistic-skill-scribe (context)
"Generates the extraction prompt for the Scribe."
(let* ((payload (getf context :payload))
@@ -122,7 +122,7 @@ TEXT:
** Deterministic: Note Committal
The deterministic gate receives the list of proposed notes and writes them to the filesystem.
#+begin_src lisp :tangle ../library/gen/org-skill-scribe.lisp
#+begin_src lisp :tangle ./org-skill-scribe.lisp
(defun scribe-commit-notes (proposals)
"Writes proposed atomic notes to the notes/ directory. Appends if the note exists."
(let ((notes-dir (uiop:merge-pathnames* "notes/" (asdf:system-source-directory :opencortex))))
@@ -159,7 +159,7 @@ The deterministic gate receives the list of proposed notes and writes them to th
#+end_src
** Skill Registration
#+begin_src lisp :tangle ../library/gen/org-skill-scribe.lisp
#+begin_src lisp :tangle ./org-skill-scribe.lisp
(defskill :skill-scribe
:priority 50
:trigger (lambda (ctx)
@@ -174,6 +174,6 @@ The deterministic gate receives the list of proposed notes and writes them to th
#+end_src
** Initialization
#+begin_src lisp :tangle ../library/gen/org-skill-scribe.lisp
#+begin_src lisp :tangle ./org-skill-scribe.lisp
(scribe-load-state)
#+end_src