diff --git a/harness/act.org b/harness/act.org index 47f6fb2..6835e46 100644 --- a/harness/act.org +++ b/harness/act.org @@ -3,7 +3,7 @@ #+AUTHOR: Agent #+FILETAGS: :harness:act: #+STARTUP: content -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle act.lisp * Overview The Act stage is where cognition meets reality. After the Probabilistic engine proposes and the Deterministic engine verifies, Act executes the approved action. @@ -166,7 +166,7 @@ The Act stage is where cognition meets reality. After the Probabilistic engine p #+end_src * Test Suite -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle act.lisp (defpackage :opencortex-pipeline-act-tests (:use :cl :fiveam :opencortex) (:export #:pipeline-act-suite)) diff --git a/harness/communication.org b/harness/communication.org index ec9ab19..4ec224b 100644 --- a/harness/communication.org +++ b/harness/communication.org @@ -3,7 +3,7 @@ #+AUTHOR: Agent #+FILETAGS: :harness:protocol: #+STARTUP: content -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle communication.lisp * Overview The ~communication.lisp~ module defines the low-level transport and framing logic for OpenCortex stimuli. @@ -79,7 +79,7 @@ The ~communication.lisp~ module defines the low-level transport and framing logi #+end_src ** Structural Validation -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle communication.lisp (in-package :opencortex) (defun validate-communication-protocol-schema (msg) @@ -92,7 +92,7 @@ The ~communication.lisp~ module defines the low-level transport and framing logi #+end_src * Test Suite -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle communication.lisp (defpackage :opencortex-communication-tests (:use :cl :fiveam :opencortex) (:export #:communication-protocol-suite)) diff --git a/harness/context.org b/harness/context.org index 0fb013e..dfbef9e 100644 --- a/harness/context.org +++ b/harness/context.org @@ -3,7 +3,7 @@ #+AUTHOR: Agent #+FILETAGS: :harness:context: #+STARTUP: content -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle context.lisp * Overview The *Context API* (Peripheral Vision) provides the opencortex with the ability to selectively prune and present its memory to the LLM. It implements a **Foveal-Peripheral model**, where the current task is shown in high detail (foveal), while the broader Memex structure is shown as a skeletal outline (peripheral). @@ -155,7 +155,7 @@ The *Context API* (Peripheral Vision) provides the opencortex with the ability t * Test Suite -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle context.lisp (defpackage :opencortex-peripheral-vision-tests (:use :cl :fiveam :opencortex) (:export #:vision-suite)) diff --git a/harness/doctor.org b/harness/doctor.org index 31a492a..cfe56c1 100644 --- a/harness/doctor.org +++ b/harness/doctor.org @@ -24,26 +24,26 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi * Phase B: Protocol (Success Criteria) ** Package Context -#+begin_src lisp :tangle package.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) +#+begin_src lisp :tangle doctor.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) (defpackage :opencortex-doctor-tests (:use :cl :fiveam :opencortex) (:export #:doctor-suite)) #+end_src -#+begin_src lisp :tangle package.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) +#+begin_src lisp :tangle doctor.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) (in-package :opencortex-doctor-tests) #+end_src -#+begin_src lisp :tangle package.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) +#+begin_src lisp :tangle doctor.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) (def-suite doctor-suite :description "Verification of the System Doctor diagnostic logic #+end_src -#+begin_src lisp :tangle package.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) +#+begin_src lisp :tangle doctor.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) (in-suite doctor-suite) #+end_src ** Dependency Tests -#+begin_src lisp :tangle package.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) +#+begin_src lisp :tangle doctor.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) (test test-dependency-check-fail "Verify that missing binaries are correctly identified as failures." (let ((opencortex::*doctor-required-binaries* '("non-existent-binary-123)) @@ -51,7 +51,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi #+end_src ** Environment Tests -#+begin_src lisp :tangle package.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) +#+begin_src lisp :tangle doctor.lisp (concat (concat (or (getenv "INSTALL_DIR ". "/harness "/tests) (test test-env-validation-fail "Verify that an invalid MEMEX_DIR triggers a critical failure." (let ((old-m (getenv "MEMEX_DIR) @@ -67,18 +67,18 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi * Phase C: Implementation (Build) ** Package Context -#+begin_src lisp :tangle package.lisp ) +#+begin_src lisp :tangle doctor.lisp ) (in-package :opencortex) #+end_src ** Global Configuration -#+begin_src lisp :tangle package.lisp ) +#+begin_src lisp :tangle doctor.lisp ) (defvar *doctor-required-binaries* '("sbcl" "emacs" "git" "socat" "nc "List of external binaries required for full system operation. #+end_src ** Dependency Verification -#+begin_src lisp :tangle package.lisp ) +#+begin_src lisp :tangle doctor.lisp ) (defun doctor-check-dependencies () "Verifies that required external binaries are available in the PATH via a shell probe." (let ((all-ok t)) @@ -96,7 +96,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi #+end_src ** Environment & XDG Validation -#+begin_src lisp :tangle package.lisp ) +#+begin_src lisp :tangle doctor.lisp ) (defun doctor-check-env () "Validates XDG directories and environment configuration against the POSIX standard." (harness-log "DOCTOR: Checking XDG environment... @@ -125,7 +125,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi #+end_src ** LLM Connectivity -#+begin_src lisp :tangle package.lisp ) +#+begin_src lisp :tangle doctor.lisp ) (defun doctor-check-llm () "Tests connectivity to primary LLM providers. Non-critical fallback allowed." (harness-log "DOCTOR: Checking LLM connectivity... @@ -140,7 +140,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi #+end_src ** Orchestration -#+begin_src lisp :tangle package.lisp ) +#+begin_src lisp :tangle doctor.lisp ) (defun doctor-run-all () "Executes the full diagnostic suite and returns T if system is healthy." (harness-log "================================================== @@ -160,7 +160,7 @@ Common Lisp's `getenv` is strictly typed in SBCL. The Doctor must ensure that mi #+end_src ** CLI Entry Point -#+begin_src lisp :tangle package.lisp ) +#+begin_src lisp :tangle doctor.lisp ) (defun doctor-main () "Entry point for the 'doctor' CLI command." (if (doctor-run-all) diff --git a/harness/loop.org b/harness/loop.org index 7c0729f..3fd0bc9 100644 --- a/harness/loop.org +++ b/harness/loop.org @@ -3,7 +3,7 @@ #+AUTHOR: Agent #+FILETAGS: :harness:loop: #+STARTUP: content -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle loop.lisp * Overview The Metabolic Loop is the fundamental rhythm of OpenCortex: the continuous processing of signals from perception through cognition to action. @@ -129,7 +129,7 @@ The Metabolic Loop is the fundamental rhythm of OpenCortex: the continuous proce #+end_src * Test Suite -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle loop.lisp (defpackage :opencortex-immune-system-tests (:use :cl :fiveam :opencortex) (:export #:immune-suite)) diff --git a/harness/manifest.org b/harness/manifest.org index 391e14a..119f5b5 100644 --- a/harness/manifest.org +++ b/harness/manifest.org @@ -63,7 +63,7 @@ The *System Manifest* defines the structural components of the OpenCortex. #+end_src ** Test Orchestrator -#+begin_src lisp :tangle run-all-tests.lisp +#+begin_src lisp :tangle opencortex.asd (load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname))) (let ((oc-dir (or (uiop:getenv "OC_DATA_DIR diff --git a/harness/memory.org b/harness/memory.org index 38deb72..c5f66e4 100644 --- a/harness/memory.org +++ b/harness/memory.org @@ -1,5 +1,5 @@ #+PROPERTY: header-args:lisp :tangle memory.lisp -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle memory.lisp #+TITLE: The System Memory (memory.lisp) #+AUTHOR: Amr #+FILETAGS: :harness:memory: @@ -294,7 +294,7 @@ Utility functions for AST traversal and path resolution. * Test Suite -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle memory.lisp (defpackage :opencortex-memory-tests (:use :cl :fiveam :opencortex) (:export #:memory-suite)) diff --git a/harness/perceive.org b/harness/perceive.org index 19e695b..c1cbfaf 100644 --- a/harness/perceive.org +++ b/harness/perceive.org @@ -3,7 +3,7 @@ #+AUTHOR: Agent #+FILETAGS: :harness:perceive: #+STARTUP: content -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle perceive.lisp * Overview The Perceive stage is the "sensory cortex" of OpenCortex. Its job is to take raw stimuli from the outside world and transform them into standardized Signals that the rest of the pipeline can process. @@ -148,7 +148,7 @@ The Perceive stage is the "sensory cortex" of OpenCortex. Its job is to take raw * Test Suite -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle perceive.lisp (defpackage :opencortex-pipeline-perceive-tests (:use :cl :fiveam :opencortex) (:export #:pipeline-perceive-suite)) diff --git a/harness/reason.org b/harness/reason.org index cbee251..5dd1747 100644 --- a/harness/reason.org +++ b/harness/reason.org @@ -3,7 +3,7 @@ #+AUTHOR: Agent #+FILETAGS: :harness:reason: #+STARTUP: content -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle reason.lisp * Overview The Reason stage implements the core Innovation of OpenCortex: the separation of probabilistic reasoning (neural/LLM) from deterministic verification (logic/safety). @@ -176,7 +176,7 @@ The Reason stage implements the core Innovation of OpenCortex: the separation of #+end_src * Test Suite -#+begin_src lisp :tangle package.lisp +#+begin_src lisp :tangle reason.lisp (defpackage :opencortex-pipeline-reason-tests (:use :cl :fiveam :opencortex) (:export #:pipeline-reason-suite)) diff --git a/harness/setup.org b/harness/setup.org index 6992797..0d21c56 100644 --- a/harness/setup.org +++ b/harness/setup.org @@ -23,7 +23,7 @@ To maintain sovereignty, the harness must remain a "dumb" bus. It should not kno ** The Installer Script (opencortex.sh) The shell script is the primary entry point. It handles the initial git clone, dependency installation, and literate tangle. -#+begin_src bash :tangle setup.sh +#+begin_src bash :tangle setup.shsetup.sh #!/bin/bash # (The content here is a duplicate of the main opencortex.sh for literate consistency) # [Note: Implementation is already verified in the top-level script] diff --git a/harness/skills.org b/harness/skills.org index 663baf6..5be5fb7 100644 --- a/harness/skills.org +++ b/harness/skills.org @@ -3,7 +3,7 @@ #+AUTHOR: Agent #+FILETAGS: :harness:skills: #+STARTUP: content -#+PROPERTY: header-args:lisp :tangle package.lisp +#+PROPERTY: header-args:lisp :tangle skills.lisp * Overview The ~opencortex~ Skill Engine enables **Late-Binding Intelligence**, allowing the system to discover and integrate new cognitive capabilities at runtime. @@ -148,7 +148,7 @@ The ~opencortex~ Skill Engine enables **Late-Binding Intelligence**, allowing th (error (c) (values nil (format nil "~a" c))))) (defun extract-tangle-target (line) - "Extracts the value of the :tangle header." + "Extracts the value of the :tangle skills.lispheader." (let ((pos (search ":tangle" line))) (when pos (let ((rest (string-trim '(#\Space #\Tab) (subseq line (+ pos 7)))))