Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 3s
- Folders: literate->harness, src->library, system->environment, scripts->interfaces. - Synchronized all :tangle paths and system definitions. - Hardened .gitignore for binary and log artifacts. - Consolidated all documentation into docs/.
87 lines
4.1 KiB
Org Mode
87 lines
4.1 KiB
Org Mode
#+TITLE: Manifest (opencortex.asd)
|
|
#+AUTHOR: Amr
|
|
#+FILETAGS: :harness:system:
|
|
#+STARTUP: content
|
|
|
|
* Manifest (opencortex.asd)
|
|
|
|
** Architectural Intent: The ASDF Skeleton
|
|
The ~opencortex.asd~ file is the physical blueprint of the Lisp Machine. It uses **Another System Definition Facility (ASDF)** to orchestrate the compilation, dependency resolution, and loading of all harness modules.
|
|
|
|
In standard Common Lisp projects, dependency graphs can be complex and non-linear. However, the OpenCortex harness mandates a strict, linear bootstrap sequence.
|
|
|
|
*** Strict Serial Loading (:serial t)
|
|
The harness uses the ~:serial t~ flag. This is a critical design choice that ensures every file is compiled and loaded in the exact order it appears in the ~:components~ list.
|
|
- *Why?* This eliminates "macro-not-found" errors by guaranteeing that the ~package.lisp~ (where the core namespace is defined) and ~skills.lisp~ (where core macros are defined) are always established before any behavioral logic or dynamic skills are loaded.
|
|
|
|
*** Separation of Concerns
|
|
The manifest defines three distinct systems to minimize runtime bloat and maximize portability.
|
|
|
|
#+begin_src mermaid
|
|
flowchart TD
|
|
Org[Literate Org Files] -- Tangle --> Lisp[Source .lisp Files]
|
|
Lisp --> ASDF[ASDF Manifest: .asd]
|
|
ASDF --> Loader[SBCL Compiler / Loader]
|
|
Loader --> Image[Live Harness Image]
|
|
Image -- Build --> Binary[Standalone Binary]
|
|
#+end_src
|
|
|
|
** Core Harness System
|
|
This system defines the "Thin Harness"—the minimalist microkernel responsible for the protocol and the metabolic loop.
|
|
|
|
#+begin_src lisp :tangle ../opencortex.asd
|
|
(defsystem :opencortex
|
|
:name "opencortex"
|
|
:author "Amr"
|
|
:version "0.1.0"
|
|
:license "AGPLv3"
|
|
:description "The Probabilistic-Deterministic Lisp Machine Harness"
|
|
:depends-on (:usocket :bordeaux-threads :dexador :uiop :cl-dotenv :cl-ppcre :hunchentoot :ironclad :str :cl-json :uuid)
|
|
:serial t
|
|
:components ((:file "src/package")
|
|
(:file "src/skills")
|
|
(:file "src/policy")
|
|
(:file "src/communication-validator")
|
|
(:file "src/communication")
|
|
(:file "src/memory")
|
|
(:file "src/context")
|
|
(:file "src/probabilistic")
|
|
(:file "src/perceive")
|
|
(:file "src/reason")
|
|
(:file "src/act")
|
|
(:file "src/loop"))
|
|
:build-operation "program-op"
|
|
:build-pathname "opencortex-server"
|
|
:entry-point "opencortex:main")
|
|
#+end_src
|
|
|
|
** Verification Suite
|
|
The Verification Suite contains the empirical tests required by the Engineering Standards. It is isolated from the core system to ensure that production environments do not load the FiveAM framework or test data.
|
|
|
|
#+begin_src lisp :tangle ../opencortex.asd
|
|
(defsystem :opencortex/tests
|
|
:depends-on (:opencortex :fiveam)
|
|
:components ((:file "tests/communication-tests")
|
|
(:file "tests/pipeline-tests")
|
|
(:file "tests/act-tests")
|
|
(:file "tests/boot-sequence-tests")
|
|
(:file "tests/memory-tests")
|
|
(:file "tests/immune-system-tests"))
|
|
:perform (test-op (o s)
|
|
(uiop:symbol-call :fiveam :run! (uiop:find-symbol* :communication-protocol-suite :opencortex-tests))
|
|
(uiop:symbol-call :fiveam :run! (uiop:find-symbol* :pipeline-suite :opencortex-pipeline-tests))
|
|
(uiop:symbol-call :fiveam :run! (uiop:find-symbol* :safety-suite :opencortex-safety-tests))
|
|
(uiop:symbol-call :fiveam :run! (uiop:find-symbol* :boot-suite :opencortex-boot-tests))
|
|
(uiop:symbol-call :fiveam :run! (uiop:find-symbol* :memory-suite :opencortex-memory-tests))
|
|
(uiop:symbol-call :fiveam :run! (uiop:find-symbol* :immune-suite :opencortex-immune-system-tests))))
|
|
#+end_src
|
|
|
|
** TUI Client
|
|
The TUI Client is a standalone consumer of the OpenCortex protocol. It uses the ~croatoan~ library for native terminal rendering.
|
|
|
|
#+begin_src lisp :tangle ../opencortex.asd
|
|
(defsystem :opencortex/tui
|
|
:depends-on (:opencortex :croatoan :usocket :bordeaux-threads)
|
|
:components ((:file "src/tui-client")))
|
|
#+end_src
|