build: dynamically tangle to INSTALL_DIR without copying .org files
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 2s

- Updated all 150+ :tangle headers across harness/ and skills/ to use elisp (expand-file-name) to target INSTALL_DIR dynamically.
- Cleaned up environment/ directory depth by moving memory-image.lisp to state/.
- Moved test scripts to tests/ and deleted redundant chat scripts.
This commit is contained in:
2026-04-27 12:51:15 -04:00
parent 8be187a968
commit f940861921
41 changed files with 234 additions and 277 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 ./org-skill-scribe.lisp
#+begin_src lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/skills"))
(in-package :opencortex)
#+end_src
** State: Checkpoint Management
We track the last processed universal time to avoid redundant distillation.
#+begin_src lisp :tangle ./org-skill-scribe.lisp
#+begin_src lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/skills"))
(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 ./org-skill-scribe.lisp
#+begin_src lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/skills"))
(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 ./org-skill-scribe.lisp
#+begin_src lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/skills"))
(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 ./org-skill-scribe.lisp
#+begin_src lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/skills"))
(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 ./org-skill-scribe.lisp
#+begin_src lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/skills"))
(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 ./org-skill-scribe.lisp
#+begin_src lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/skills"))
(scribe-load-state)
#+end_src