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

@@ -33,7 +33,7 @@ This means the reasoning pipeline can generate, modify, and execute its own comm
* Package Context
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(in-package :opencortex)
#+end_src
@@ -43,7 +43,7 @@ The probabilistic engine is responsible for all neural/LLM operations. It mainta
** Backend Registry Variables
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defvar *probabilistic-backends* (make-hash-table :test 'equal)
"Registry mapping provider keywords (:openrouter, :ollama) to their calling functions.")
@@ -60,7 +60,7 @@ The probabilistic engine is responsible for all neural/LLM operations. It mainta
** register-probabilistic-backend: Backend Registration
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defun register-probabilistic-backend (name fn)
"Register a neural provider backend.
@@ -79,7 +79,7 @@ The probabilistic engine is responsible for all neural/LLM operations. It mainta
** probabilistic-call: Cascade Dispatch
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defun probabilistic-call (prompt &key
(system-prompt "You are the Probabilistic engine.")
(cascade nil)
@@ -129,7 +129,7 @@ The `think` function is the heart of the probabilistic engine. It constructs a p
** strip-markdown: Clean LLM Output
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defun strip-markdown (text)
"Strip markdown formatting from LLM output.
@@ -152,7 +152,7 @@ The `think` function is the heart of the probabilistic engine. It constructs a p
** normalize-plist-keywords: Fix LLM Keyword Output
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defun normalize-plist-keywords (plist)
"Normalize all keys in a plist to keywords.
@@ -176,7 +176,7 @@ The `think` function is the heart of the probabilistic engine. It constructs a p
** think: Generate Action Proposal
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defun think (context)
"Generate a Lisp action proposal based on current context.
@@ -320,7 +320,7 @@ The deterministic engine runs all registered skills' verification functions. Thi
** deterministic-verify: Skill Chain Verification
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defun deterministic-verify (proposed-action context)
"Run all skill deterministic gates on a proposed action.
@@ -391,7 +391,7 @@ The deterministic engine runs all registered skills' verification functions. Thi
** reason-gate: The Stage Function
#+begin_src lisp :tangle ./reason.lisp
#+begin_src lisp :tangle (expand-file-name "reason.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defun reason-gate (signal)
"Stage 2 of the metabolic pipeline: Reason.
@@ -448,7 +448,7 @@ The deterministic engine runs all registered skills' verification functions. Thi
These tests verify the Reason (cognitive) pipeline. Run with:
~(fiveam:run! 'pipeline-reason-suite)~
#+begin_src lisp :tangle ./tests/pipeline-reason-tests.lisp
#+begin_src lisp :tangle (expand-file-name "tests/pipeline-reason-tests.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defpackage :opencortex-pipeline-reason-tests
(:use :cl :fiveam :opencortex)
(:export #:pipeline-reason-suite))