fix(chaos): switch to definitive absolute paths via expand-file-name for reliable tangling
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "act.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "act.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#+TITLE: Stage 3: Act (act.lisp)
|
#+TITLE: Stage 3: Act (act.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:act:
|
#+FILETAGS: :harness:act:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "communication.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "communication.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#+TITLE: Communication Protocol (communication.lisp)
|
#+TITLE: Communication Protocol (communication.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:protocol:
|
#+FILETAGS: :harness:protocol:
|
||||||
@@ -79,7 +79,7 @@ The ~communication.lisp~ module defines the low-level transport and framing logi
|
|||||||
** Structural Validation (communication-validator.lisp)
|
** Structural Validation (communication-validator.lisp)
|
||||||
The validator ensures that incoming messages adhere to the strict property list schema of the communication protocol.
|
The validator ensures that incoming messages adhere to the strict property list schema of the communication protocol.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "communication-validator.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "communication-validator.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
|
|
||||||
(defun validate-communication-protocol-schema (msg)
|
(defun validate-communication-protocol-schema (msg)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "context.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "context.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#+TITLE: Peripheral Vision (context.lisp)
|
#+TITLE: Peripheral Vision (context.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:context:
|
#+FILETAGS: :harness:context:
|
||||||
|
|||||||
@@ -66,18 +66,18 @@ Common Lisp's `uiop:getenv` is strictly typed in SBCL. The Doctor must ensure th
|
|||||||
* Phase C: Implementation (Build)
|
* Phase C: Implementation (Build)
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Global Configuration
|
** Global Configuration
|
||||||
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *doctor-required-binaries* '("sbcl" "emacs" "git" "socat" "nc")
|
(defvar *doctor-required-binaries* '("sbcl" "emacs" "git" "socat" "nc")
|
||||||
"List of external binaries required for full system operation.")
|
"List of external binaries required for full system operation.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Dependency Verification
|
** Dependency Verification
|
||||||
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-check-dependencies ()
|
(defun doctor-check-dependencies ()
|
||||||
"Verifies that required external binaries are available in the PATH via a shell probe."
|
"Verifies that required external binaries are available in the PATH via a shell probe."
|
||||||
(let ((all-ok t))
|
(let ((all-ok t))
|
||||||
@@ -95,7 +95,7 @@ Common Lisp's `uiop:getenv` is strictly typed in SBCL. The Doctor must ensure th
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Environment & XDG Validation
|
** Environment & XDG Validation
|
||||||
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-check-env ()
|
(defun doctor-check-env ()
|
||||||
"Validates XDG directories and environment configuration against the POSIX standard."
|
"Validates XDG directories and environment configuration against the POSIX standard."
|
||||||
(harness-log "DOCTOR: Checking XDG environment...")
|
(harness-log "DOCTOR: Checking XDG environment...")
|
||||||
@@ -124,7 +124,7 @@ Common Lisp's `uiop:getenv` is strictly typed in SBCL. The Doctor must ensure th
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** LLM Connectivity
|
** LLM Connectivity
|
||||||
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-check-llm ()
|
(defun doctor-check-llm ()
|
||||||
"Tests connectivity to primary LLM providers. Non-critical fallback allowed."
|
"Tests connectivity to primary LLM providers. Non-critical fallback allowed."
|
||||||
(harness-log "DOCTOR: Checking LLM connectivity...")
|
(harness-log "DOCTOR: Checking LLM connectivity...")
|
||||||
@@ -139,7 +139,7 @@ Common Lisp's `uiop:getenv` is strictly typed in SBCL. The Doctor must ensure th
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Orchestration
|
** Orchestration
|
||||||
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-run-all ()
|
(defun doctor-run-all ()
|
||||||
"Executes the full diagnostic suite and returns T if system is healthy."
|
"Executes the full diagnostic suite and returns T if system is healthy."
|
||||||
(harness-log "==================================================")
|
(harness-log "==================================================")
|
||||||
@@ -159,7 +159,7 @@ Common Lisp's `uiop:getenv` is strictly typed in SBCL. The Doctor must ensure th
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** CLI Entry Point
|
** CLI Entry Point
|
||||||
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "doctor.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-main ()
|
(defun doctor-main ()
|
||||||
"Entry point for the 'doctor' CLI command."
|
"Entry point for the 'doctor' CLI command."
|
||||||
(if (doctor-run-all)
|
(if (doctor-run-all)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "loop.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "loop.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#+TITLE: The Metabolic Loop (loop.lisp)
|
#+TITLE: The Metabolic Loop (loop.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:loop:
|
#+FILETAGS: :harness:loop:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ The *System Manifest* defines the structural components of the OpenCortex. It se
|
|||||||
* Implementation
|
* Implementation
|
||||||
|
|
||||||
** Main System
|
** Main System
|
||||||
#+begin_src lisp :tangle (expand-file-name "../opencortex.asd" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "opencortex.asd" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defsystem :opencortex
|
(defsystem :opencortex
|
||||||
:name "opencortex"
|
:name "opencortex"
|
||||||
:author "Amr Gharbeia"
|
:author "Amr Gharbeia"
|
||||||
@@ -31,7 +31,7 @@ The *System Manifest* defines the structural components of the OpenCortex. It se
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Test System
|
** Test System
|
||||||
#+begin_src lisp :tangle (expand-file-name "../opencortex.asd" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "opencortex.asd" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defsystem :opencortex/tests
|
(defsystem :opencortex/tests
|
||||||
:depends-on (:opencortex :fiveam)
|
:depends-on (:opencortex :fiveam)
|
||||||
:components ((:file "tests/pipeline-act-tests")
|
:components ((:file "tests/pipeline-act-tests")
|
||||||
@@ -55,14 +55,14 @@ The *System Manifest* defines the structural components of the OpenCortex. It se
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** TUI System
|
** TUI System
|
||||||
#+begin_src lisp :tangle (expand-file-name "../opencortex.asd" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "opencortex.asd" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defsystem :opencortex/tui
|
(defsystem :opencortex/tui
|
||||||
:depends-on (:opencortex :croatoan :usocket :bordeaux-threads)
|
:depends-on (:opencortex :croatoan :usocket :bordeaux-threads)
|
||||||
:components ((:file "harness/tui-client")))
|
:components ((:file "harness/tui-client")))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Test Orchestrator
|
** Test Orchestrator
|
||||||
#+begin_src lisp :tangle (expand-file-name "run-all-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/run-all-tests.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
|
(load (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))
|
||||||
|
|
||||||
(let ((oc-dir (or (uiop:getenv "OC_DATA_DIR")
|
(let ((oc-dir (or (uiop:getenv "OC_DATA_DIR")
|
||||||
|
|||||||
@@ -31,14 +31,14 @@ flowchart TD
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** The Object Repository
|
** The Object Repository
|
||||||
The `*memory*` is the global hash table that holds every Org element by its unique ID. This is the "live RAM" of the agent's memory.
|
The `*memory*` is the global hash table that holds every Org element by its unique ID. This is the "live RAM" of the agent's memory.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *memory* (make-hash-table :test 'equal))
|
(defvar *memory* (make-hash-table :test 'equal))
|
||||||
|
|
||||||
(defvar *history-store* (make-hash-table :test 'equal)
|
(defvar *history-store* (make-hash-table :test 'equal)
|
||||||
@@ -48,7 +48,7 @@ The `*memory*` is the global hash table that holds every Org element by its uniq
|
|||||||
** The Data Structure (org-object)
|
** The Data Structure (org-object)
|
||||||
Every element in the Memex (headlines, paragraphs, etc.) is represented by an `org-object` structure. It contains both semantic metadata (attributes, content) and structural metadata (parent/child pointers, Merkle hashes).
|
Every element in the Memex (headlines, paragraphs, etc.) is represented by an `org-object` structure. It contains both semantic metadata (attributes, content) and structural metadata (parent/child pointers, Merkle hashes).
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defstruct org-object
|
(defstruct org-object
|
||||||
id type attributes content vector parent-id children version last-sync hash)
|
id type attributes content vector parent-id children version last-sync hash)
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ Every element in the Memex (headlines, paragraphs, etc.) is represented by an `o
|
|||||||
** Merkle Tree Integrity (compute-merkle-hash)
|
** Merkle Tree Integrity (compute-merkle-hash)
|
||||||
The `compute-merkle-hash` function ensures the cryptographic integrity of the knowledge graph. A node's hash depends on its own properties and the hashes of all its children. This creates a recursive fingerprint where any change to a single note propagates up to the root hash.
|
The `compute-merkle-hash` function ensures the cryptographic integrity of the knowledge graph. A node's hash depends on its own properties and the hashes of all its children. This creates a recursive fingerprint where any change to a single note propagates up to the root hash.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun compute-merkle-hash (id type attributes content child-hashes)
|
(defun compute-merkle-hash (id type attributes content child-hashes)
|
||||||
"Computes a SHA-256 Merkle hash for a node based on its core properties and children's hashes."
|
"Computes a SHA-256 Merkle hash for a node based on its core properties and children's hashes."
|
||||||
(let* ((alist (loop for (k v) on attributes by #'cddr collect (cons k v)))
|
(let* ((alist (loop for (k v) on attributes by #'cddr collect (cons k v)))
|
||||||
@@ -77,7 +77,7 @@ The `compute-merkle-hash` function ensures the cryptographic integrity of the kn
|
|||||||
** Ingesting the AST (ingest-ast)
|
** Ingesting the AST (ingest-ast)
|
||||||
The `ingest-ast` function is the primary bridge between the external world (Emacs/JSON) and the internal Lisp machine. It recursively parses an Org-mode Abstract Syntax Tree (AST) into `org-object` structures and registers them in the store.
|
The `ingest-ast` function is the primary bridge between the external world (Emacs/JSON) and the internal Lisp machine. It recursively parses an Org-mode Abstract Syntax Tree (AST) into `org-object` structures and registers them in the store.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun ingest-ast (ast &optional parent-id)
|
(defun ingest-ast (ast &optional parent-id)
|
||||||
"Parses an Org AST into the recursive Lisp Memory with Merkle hashing."
|
"Parses an Org AST into the recursive Lisp Memory with Merkle hashing."
|
||||||
(let* ((type (getf ast :type))
|
(let* ((type (getf ast :type))
|
||||||
@@ -116,7 +116,7 @@ The `ingest-ast` function is the primary bridge between the external world (Emac
|
|||||||
** Memory Snapshots (snapshot-memory)
|
** Memory Snapshots (snapshot-memory)
|
||||||
Because objects are stored immutably in the `*history-store*`, a snapshot is a lightweight shallow copy of the active `*memory*` pointers. The system maintains a rolling buffer of 20 snapshots, allowing for near-instant, zero-cost rollback.
|
Because objects are stored immutably in the `*history-store*`, a snapshot is a lightweight shallow copy of the active `*memory*` pointers. The system maintains a rolling buffer of 20 snapshots, allowing for near-instant, zero-cost rollback.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *object-store-snapshots* nil)
|
(defvar *object-store-snapshots* nil)
|
||||||
|
|
||||||
(defun copy-hash-table (hash-table)
|
(defun copy-hash-table (hash-table)
|
||||||
@@ -143,7 +143,7 @@ Because objects are stored immutably in the `*history-store*`, a snapshot is a l
|
|||||||
** Memory Rollback (rollback-memory)
|
** Memory Rollback (rollback-memory)
|
||||||
Restores the state of the Memex from one of the previous snapshots.
|
Restores the state of the Memex from one of the previous snapshots.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun rollback-memory (&optional (index 0))
|
(defun rollback-memory (&optional (index 0))
|
||||||
"Restores the Memory to a previously captured snapshot using immutable history pointers."
|
"Restores the Memory to a previously captured snapshot using immutable history pointers."
|
||||||
(let ((snapshot (nth index *object-store-snapshots*)))
|
(let ((snapshot (nth index *object-store-snapshots*)))
|
||||||
@@ -156,7 +156,7 @@ Restores the state of the Memex from one of the previous snapshots.
|
|||||||
** Disk Persistence (save-memory / load-memory)
|
** Disk Persistence (save-memory / load-memory)
|
||||||
Essential for surviving crashes. Saves the in-memory hash tables to disk and loads them back on restart.
|
Essential for surviving crashes. Saves the in-memory hash tables to disk and loads them back on restart.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *memory-snapshot-path* nil
|
(defvar *memory-snapshot-path* nil
|
||||||
"Path to the memory snapshot file. Set from MEMORY_SNAPSHOT_PATH env or default.")
|
"Path to the memory snapshot file. Set from MEMORY_SNAPSHOT_PATH env or default.")
|
||||||
|
|
||||||
@@ -209,7 +209,7 @@ Reconstitutes alists into hash tables."
|
|||||||
** Semantic Search (get-embedding, semantic-search)
|
** Semantic Search (get-embedding, semantic-search)
|
||||||
Support for vector embeddings via Ollama and semantic search with cosine similarity.
|
Support for vector embeddings via Ollama and semantic search with cosine similarity.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *embedding-cache* (make-hash-table :test 'equal)
|
(defvar *embedding-cache* (make-hash-table :test 'equal)
|
||||||
"Cache for embeddings to avoid redundant API calls.")
|
"Cache for embeddings to avoid redundant API calls.")
|
||||||
|
|
||||||
@@ -258,7 +258,7 @@ Returns up to LIMIT objects with similarity >= MIN-SIMILARITY, sorted by similar
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Cognitive Tool: Semantic Search
|
** Cognitive Tool: Semantic Search
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-cognitive-tool :semantic-search
|
(def-cognitive-tool :semantic-search
|
||||||
"Searches memory for objects semantically similar to a query."
|
"Searches memory for objects semantically similar to a query."
|
||||||
((:query :type :string :description "The search query.")
|
((:query :type :string :description "The search query.")
|
||||||
@@ -271,7 +271,7 @@ Returns up to LIMIT objects with similarity >= MIN-SIMILARITY, sorted by similar
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Cognitive Tool: Generate Embeddings
|
** Cognitive Tool: Generate Embeddings
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-cognitive-tool :generate-embeddings
|
(def-cognitive-tool :generate-embeddings
|
||||||
"Generates vector embeddings for given text via the configured embedding backend (Ollama)."
|
"Generates vector embeddings for given text via the configured embedding backend (Ollama)."
|
||||||
((:texts :type :list :description "List of text strings to embed."))
|
((:texts :type :list :description "List of text strings to embed."))
|
||||||
@@ -294,7 +294,7 @@ Returns up to LIMIT objects with similarity >= MIN-SIMILARITY, sorted by similar
|
|||||||
** Lookup Utilities
|
** Lookup Utilities
|
||||||
Basic functions for retrieving objects by ID or type.
|
Basic functions for retrieving objects by ID or type.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun org-id-new ()
|
(defun org-id-new ()
|
||||||
"Generates a new UUID string for Org-mode identification."
|
"Generates a new UUID string for Org-mode identification."
|
||||||
(string-downcase (format nil "~a" (uuid:make-v4-uuid))))
|
(string-downcase (format nil "~a" (uuid:make-v4-uuid))))
|
||||||
@@ -324,7 +324,7 @@ Basic functions for retrieving objects by ID or type.
|
|||||||
** Structural Helpers
|
** Structural Helpers
|
||||||
Utility functions for AST traversal and path resolution.
|
Utility functions for AST traversal and path resolution.
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "memory.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun find-headline-missing-id (ast)
|
(defun find-headline-missing-id (ast)
|
||||||
"Traverses an AST to find headlines that lack an :ID: property."
|
"Traverses an AST to find headlines that lack an :ID: property."
|
||||||
(when (listp ast)
|
(when (listp ast)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "package.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "harness/package.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
#+TITLE: System Interface (package.lisp)
|
#+TITLE: System Interface (package.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:interface:
|
#+FILETAGS: :harness:interface:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "perceive.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "perceive.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#+TITLE: Stage 1: Perceive (perceive.lisp)
|
#+TITLE: Stage 1: Perceive (perceive.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:perceive:
|
#+FILETAGS: :harness:perceive:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "reason.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "reason.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#+TITLE: Stage 2: Reason (reason.lisp)
|
#+TITLE: Stage 2: Reason (reason.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:reason:
|
#+FILETAGS: :harness:reason:
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ To maintain sovereignty, the harness must remain a "dumb" bus. It should not kno
|
|||||||
** The Installer Script (opencortex.sh)
|
** The Installer Script (opencortex.sh)
|
||||||
The shell script is the primary entry point. It handles the initial git clone, dependency installation, and literate tangle.
|
The shell script is the primary entry point. It handles the initial git clone, dependency installation, and literate tangle.
|
||||||
|
|
||||||
#+begin_src bash :tangle (expand-file-name "../opencortex.sh" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src bash :tangle (expand-file-name "../opencortex.sh" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# (The content here is a duplicate of the main opencortex.sh for literate consistency)
|
# (The content here is a duplicate of the main opencortex.sh for literate consistency)
|
||||||
# [Note: Implementation is already verified in the top-level script]
|
# [Note: Implementation is already verified in the top-level script]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "skills.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "skills.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#+TITLE: The Skill Engine (skills.lisp)
|
#+TITLE: The Skill Engine (skills.lisp)
|
||||||
#+AUTHOR: Amr
|
#+AUTHOR: Amr
|
||||||
#+FILETAGS: :harness:skills:
|
#+FILETAGS: :harness:skills:
|
||||||
@@ -419,7 +419,7 @@ EXAMPLES:
|
|||||||
*** The Eval Tool (Internal Inspection)
|
*** The Eval Tool (Internal Inspection)
|
||||||
#+begin_src lisp
|
#+begin_src lisp
|
||||||
** Cognitive Tool Registration
|
** Cognitive Tool Registration
|
||||||
#+begin_src lisp :tangle (expand-file-name "skills.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "skills.lisp" (expand-file-name "harness/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
;; Cognitive tools are registered in *cognitive-tools* (defined in package.lisp)
|
;; Cognitive tools are registered in *cognitive-tools* (defined in package.lisp)
|
||||||
;; using the def-cognitive-tool macro.
|
;; using the def-cognitive-tool macro.
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: tui-client-spec
|
:ID: tui-client-spec
|
||||||
:CREATED: [2026-04-17 Fri 11:00]
|
:CREATED: [2026-04-17 Fri 11:00]
|
||||||
@@ -57,81 +57,81 @@ A simple MVP console is insufficient for a Lisp Machine. To reach v0.2.0, the TU
|
|||||||
* Phase C: Implementation (Build)
|
* Phase C: Implementation (Build)
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(in-package :cl-user)
|
(in-package :cl-user)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defpackage :opencortex.tui
|
(defpackage :opencortex.tui
|
||||||
(:use :cl :croatoan)
|
(:use :cl :croatoan)
|
||||||
(:export :main))
|
(:export :main))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(in-package :opencortex.tui)
|
(in-package :opencortex.tui)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Global State
|
** Global State
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *daemon-host* "127.0.0.1")
|
(defvar *daemon-host* "127.0.0.1")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *daemon-port* 9105)
|
(defvar *daemon-port* 9105)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *socket* nil)
|
(defvar *socket* nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *stream* nil)
|
(defvar *stream* nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *chat-history* (list) "Full chronological log of messages.")
|
(defvar *chat-history* (list) "Full chronological log of messages.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *scroll-index* 0 "Offset for history rendering.")
|
(defvar *scroll-index* 0 "Offset for history rendering.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *status-text* "Connecting...")
|
(defvar *status-text* "Connecting...")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *input-buffer* (make-array 0 :element-type 'char :fill-pointer 0 :adjustable t))
|
(defvar *input-buffer* (make-array 0 :element-type 'char :fill-pointer 0 :adjustable t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *command-history* (make-array 0 :element-type 't :fill-pointer 0 :adjustable t))
|
(defvar *command-history* (make-array 0 :element-type 't :fill-pointer 0 :adjustable t))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *history-index* -1)
|
(defvar *history-index* -1)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *is-running* t)
|
(defvar *is-running* t)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *queue-lock* (bt:make-lock))
|
(defvar *queue-lock* (bt:make-lock))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defvar *incoming-msgs* nil)
|
(defvar *incoming-msgs* nil)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Utilities
|
** Utilities
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defun enqueue-msg (msg)
|
(defun enqueue-msg (msg)
|
||||||
"Thread-safe addition to incoming message queue."
|
"Thread-safe addition to incoming message queue."
|
||||||
(bt:with-lock-held (*queue-lock*)
|
(bt:with-lock-held (*queue-lock*)
|
||||||
(setf *incoming-msgs* (append *incoming-msgs* (list msg)))))
|
(setf *incoming-msgs* (append *incoming-msgs* (list msg)))))
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defun dequeue-msgs ()
|
(defun dequeue-msgs ()
|
||||||
"Thread-safe retrieval of incoming messages."
|
"Thread-safe retrieval of incoming messages."
|
||||||
(bt:with-lock-held (*queue-lock*)
|
(bt:with-lock-held (*queue-lock*)
|
||||||
@@ -142,7 +142,7 @@ A simple MVP console is insufficient for a Lisp Machine. To reach v0.2.0, the TU
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Styling Engine
|
** Styling Engine
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defun get-line-style (text)
|
(defun get-line-style (text)
|
||||||
"Determines croatoan attributes based on content patterns."
|
"Determines croatoan attributes based on content patterns."
|
||||||
(cond
|
(cond
|
||||||
@@ -154,7 +154,7 @@ A simple MVP console is insufficient for a Lisp Machine. To reach v0.2.0, the TU
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Rendering Orchestrator
|
** Rendering Orchestrator
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defun render-chat (win)
|
(defun render-chat (win)
|
||||||
"Renders the chat history with scrolling and styling."
|
"Renders the chat history with scrolling and styling."
|
||||||
(clear win)
|
(clear win)
|
||||||
@@ -172,14 +172,14 @@ A simple MVP console is insufficient for a Lisp Machine. To reach v0.2.0, the TU
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Input Handling
|
** Input Handling
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defun handle-backspace ()
|
(defun handle-backspace ()
|
||||||
"Deletes last character from input buffer."
|
"Deletes last character from input buffer."
|
||||||
(when (> (fill-pointer *input-buffer*) 0)
|
(when (> (fill-pointer *input-buffer*) 0)
|
||||||
(decf (fill-pointer *input-buffer*))))
|
(decf (fill-pointer *input-buffer*))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defun handle-return (stream)
|
(defun handle-return (stream)
|
||||||
"Process input buffer as message or command."
|
"Process input buffer as message or command."
|
||||||
(let ((cmd (coerce *input-buffer* 'string)))
|
(let ((cmd (coerce *input-buffer* 'string)))
|
||||||
@@ -200,7 +200,7 @@ A simple MVP console is insufficient for a Lisp Machine. To reach v0.2.0, the TU
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Main Entry Point
|
** Main Entry Point
|
||||||
#+begin_src lisp :tangle (expand-file-name "tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "harness/tui-client.lisp" (or (identity (getenv "INSTALL_DIR")) "."))
|
||||||
(defun main ()
|
(defun main ()
|
||||||
"Initializes ncurses and starts the TUI event loop."
|
"Initializes ncurses and starts the TUI event loop."
|
||||||
(handler-case
|
(handler-case
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-bouncer.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-bouncer.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: bouncer-agent-skill
|
:ID: bouncer-agent-skill
|
||||||
:CREATED: [2026-04-11 Sat 15:20]
|
:CREATED: [2026-04-11 Sat 15:20]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-cli-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-cli-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: cli-gateway-skill
|
:ID: cli-gateway-skill
|
||||||
:CREATED: [2026-04-13 Mon 17:00]
|
:CREATED: [2026-04-13 Mon 17:00]
|
||||||
|
|||||||
@@ -16,26 +16,26 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
|
|||||||
* Phase B: Protocol (Success Criteria)
|
* Phase B: Protocol (Success Criteria)
|
||||||
|
|
||||||
** Test Suite Context
|
** Test Suite Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-config-manager-tests
|
(defpackage :opencortex-config-manager-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:config-suite))
|
(:export #:config-suite))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex-config-manager-tests)
|
(in-package :opencortex-config-manager-tests)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-suite config-suite :description "Verification of the Config Manager skill")
|
(def-suite config-suite :description "Verification of the Config Manager skill")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-suite config-suite)
|
(in-suite config-suite)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Registry Tests
|
** Registry Tests
|
||||||
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(test test-provider-registration
|
(test test-provider-registration
|
||||||
"Verify that multiple providers can be registered and saved."
|
"Verify that multiple providers can be registered and saved."
|
||||||
(let ((opencortex::*providers* nil))
|
(let ((opencortex::*providers* nil))
|
||||||
@@ -95,12 +95,12 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
|
|||||||
* Phase C: Implementation (Build)
|
* Phase C: Implementation (Build)
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Skill Metadata
|
** Skill Metadata
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defparameter *skill-config-manager*
|
(defparameter *skill-config-manager*
|
||||||
'(:name "config-manager"
|
'(:name "config-manager"
|
||||||
:description "Manages system settings and LLM provider configurations."
|
:description "Manages system settings and LLM provider configurations."
|
||||||
@@ -110,7 +110,7 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Provider Templates
|
** Provider Templates
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *provider-templates*
|
(defvar *provider-templates*
|
||||||
'((:ollama . (:name "Ollama (Local)" :fields ((:url :label "URL") (:model :label "Model")) :default-url "http://localhost:11434" :default-model "llama3"))
|
'((:ollama . (:name "Ollama (Local)" :fields ((:url :label "URL") (:model :label "Model")) :default-url "http://localhost:11434" :default-model "llama3"))
|
||||||
(:openrouter . (:name "OpenRouter" :fields ((:key :label "API Key" :secret t) (:model :label "Model")) :default-model "anthropic/claude-3-opus-20240229"))
|
(:openrouter . (:name "OpenRouter" :fields ((:key :label "API Key" :secret t) (:model :label "Model")) :default-model "anthropic/claude-3-opus-20240229"))
|
||||||
@@ -122,7 +122,7 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Registry Persistence
|
** Registry Persistence
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *providers* nil "Global registry of configured LLM providers.")
|
(defvar *providers* nil "Global registry of configured LLM providers.")
|
||||||
|
|
||||||
(defun get-oc-config-dir ()
|
(defun get-oc-config-dir ()
|
||||||
@@ -159,14 +159,14 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Registry API
|
** Registry API
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun register-provider (id config)
|
(defun register-provider (id config)
|
||||||
"Update the global provider registry."
|
"Update the global provider registry."
|
||||||
(setf (getf *providers* id) config))
|
(setf (getf *providers* id) config))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Setup Wizard Implementation
|
** Setup Wizard Implementation
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun configure-provider (id)
|
(defun configure-provider (id)
|
||||||
"Guided configuration for a specific LLM provider template."
|
"Guided configuration for a specific LLM provider template."
|
||||||
(let* ((template (cdr (assoc id *provider-templates*)))
|
(let* ((template (cdr (assoc id *provider-templates*)))
|
||||||
@@ -187,7 +187,7 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
|
|||||||
(format t "✓ ~a metadata registered.~%" (getf template :name))))
|
(format t "✓ ~a metadata registered.~%" (getf template :name))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun run-setup-wizard ()
|
(defun run-setup-wizard ()
|
||||||
"Entry point for the interactive OpenCortex Lisp Setup Wizard."
|
"Entry point for the interactive OpenCortex Lisp Setup Wizard."
|
||||||
(format t "=== OpenCortex: Advanced Setup Wizard ===~%")
|
(format t "=== OpenCortex: Advanced Setup Wizard ===~%")
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: credentials-vault-skill
|
:ID: credentials-vault-skill
|
||||||
:CREATED: [2026-04-09 Thu]
|
:CREATED: [2026-04-09 Thu]
|
||||||
@@ -154,7 +154,7 @@ Retained from the legacy Google skill, this provides the instructions for the au
|
|||||||
Note: Tests disabled in jail load.
|
Note: Tests disabled in jail load.
|
||||||
|
|
||||||
** 1. Unit Tests (FiveAM)
|
** 1. Unit Tests (FiveAM)
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
#|
|
#|
|
||||||
(defpackage :opencortex-vault-tests
|
(defpackage :opencortex-vault-tests
|
||||||
(:use :cl :fiveam :opencortex))
|
(:use :cl :fiveam :opencortex))
|
||||||
|
|||||||
@@ -18,26 +18,26 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
|
|||||||
* Phase B: Protocol (Success Criteria)
|
* Phase B: Protocol (Success Criteria)
|
||||||
|
|
||||||
** Test Suite Context
|
** Test Suite Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-diagnostics-tests
|
(defpackage :opencortex-diagnostics-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:diagnostics-suite))
|
(:export #:diagnostics-suite))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex-diagnostics-tests)
|
(in-package :opencortex-diagnostics-tests)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-suite diagnostics-suite :description "Verification of the Diagnostics skill")
|
(def-suite diagnostics-suite :description "Verification of the Diagnostics skill")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-suite diagnostics-suite)
|
(in-suite diagnostics-suite)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Dependency Tests
|
** Dependency Tests
|
||||||
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(test test-dependency-check-fail
|
(test test-dependency-check-fail
|
||||||
"Verify that missing binaries are correctly identified as failures."
|
"Verify that missing binaries are correctly identified as failures."
|
||||||
(let ((opencortex::*doctor-required-binaries* '("non-existent-binary-123")))
|
(let ((opencortex::*doctor-required-binaries* '("non-existent-binary-123")))
|
||||||
@@ -47,12 +47,12 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
|
|||||||
* Phase C: Implementation (Build)
|
* Phase C: Implementation (Build)
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Skill Metadata
|
** Skill Metadata
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defparameter *skill-diagnostics*
|
(defparameter *skill-diagnostics*
|
||||||
'(:name "diagnostics"
|
'(:name "diagnostics"
|
||||||
:description "Performs system health checks and environment validation."
|
:description "Performs system health checks and environment validation."
|
||||||
@@ -62,13 +62,13 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Global Configuration
|
** Global Configuration
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *doctor-required-binaries* '("sbcl" "emacs" "git" "socat" "nc")
|
(defvar *doctor-required-binaries* '("sbcl" "emacs" "git" "socat" "nc")
|
||||||
"List of external binaries required for full system operation.")
|
"List of external binaries required for full system operation.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Dependency Verification
|
** Dependency Verification
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-check-dependencies ()
|
(defun doctor-check-dependencies ()
|
||||||
"Verifies that required external binaries are available in the PATH via a shell probe."
|
"Verifies that required external binaries are available in the PATH via a shell probe."
|
||||||
(let ((all-ok t))
|
(let ((all-ok t))
|
||||||
@@ -86,7 +86,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Environment & XDG Validation
|
** Environment & XDG Validation
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-check-env ()
|
(defun doctor-check-env ()
|
||||||
"Validates XDG directories and environment configuration against the POSIX standard."
|
"Validates XDG directories and environment configuration against the POSIX standard."
|
||||||
(harness-log "DOCTOR: Checking XDG environment...")
|
(harness-log "DOCTOR: Checking XDG environment...")
|
||||||
@@ -115,7 +115,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** LLM Connectivity
|
** LLM Connectivity
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-check-llm ()
|
(defun doctor-check-llm ()
|
||||||
"Tests connectivity to primary LLM providers. Non-critical fallback allowed."
|
"Tests connectivity to primary LLM providers. Non-critical fallback allowed."
|
||||||
(harness-log "DOCTOR: Checking LLM connectivity...")
|
(harness-log "DOCTOR: Checking LLM connectivity...")
|
||||||
@@ -130,7 +130,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Orchestration
|
** Orchestration
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-run-all ()
|
(defun doctor-run-all ()
|
||||||
"Executes the full diagnostic suite and returns T if system is healthy."
|
"Executes the full diagnostic suite and returns T if system is healthy."
|
||||||
(harness-log "==================================================")
|
(harness-log "==================================================")
|
||||||
@@ -150,7 +150,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** CLI Entry Point
|
** CLI Entry Point
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun doctor-main ()
|
(defun doctor-main ()
|
||||||
"Entry point for the 'doctor' CLI command."
|
"Entry point for the 'doctor' CLI command."
|
||||||
(if (doctor-run-all)
|
(if (doctor-run-all)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-emacs-edit.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-emacs-edit.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: emacs-edit-skill
|
:ID: emacs-edit-skill
|
||||||
:CREATED: [2026-04-23 Thu]
|
:CREATED: [2026-04-23 Thu]
|
||||||
@@ -390,7 +390,7 @@ Use this AFTER modifications to save changes."
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Phase E: Chaos (Verification)
|
* Phase E: Chaos (Verification)
|
||||||
#+begin_src lisp :tangle (expand-file-name "emacs-edit-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "emacs-edit-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-emacs-edit-tests
|
(defpackage :opencortex-emacs-edit-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:emacs-edit-suite))
|
(:export #:emacs-edit-suite))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 37f2b59f-4537-4cca-ac7f-5c24b9e2e773
|
:ID: 37f2b59f-4537-4cca-ac7f-5c24b9e2e773
|
||||||
:CREATED: [2026-03-30 Mon 21:16]
|
:CREATED: [2026-03-30 Mon 21:16]
|
||||||
@@ -57,17 +57,17 @@ Every significant fix or architectural decision MUST be documented in an org fil
|
|||||||
* Enforcement Implementation
|
* Enforcement Implementation
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Global Configuration
|
** Global Configuration
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *engineering-std-project-root* nil
|
(defvar *engineering-std-project-root* nil
|
||||||
"Path to the project root for enforcement checks.")
|
"Path to the project root for enforcement checks.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defstruct engineering-violation
|
(defstruct engineering-violation
|
||||||
(phase nil)
|
(phase nil)
|
||||||
(rule nil)
|
(rule nil)
|
||||||
@@ -76,7 +76,7 @@ Every significant fix or architectural decision MUST be documented in an org fil
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** CDD Utilities: Tier 1
|
** CDD Utilities: Tier 1
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun check-structural-balance (file-path)
|
(defun check-structural-balance (file-path)
|
||||||
"Tier 1 Chaos: Verifies that a Lisp file is syntactically balanced."
|
"Tier 1 Chaos: Verifies that a Lisp file is syntactically balanced."
|
||||||
(handler-case
|
(handler-case
|
||||||
@@ -90,7 +90,7 @@ Every significant fix or architectural decision MUST be documented in an org fil
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Git Protocol
|
** Git Protocol
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun verify-git-clean-p (&optional (dir *engineering-std-project-root*))
|
(defun verify-git-clean-p (&optional (dir *engineering-std-project-root*))
|
||||||
"Returns T if the git repository at DIR has no uncommitted changes."
|
"Returns T if the git repository at DIR has no uncommitted changes."
|
||||||
(when dir
|
(when dir
|
||||||
@@ -101,7 +101,7 @@ Every significant fix or architectural decision MUST be documented in an org fil
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Initializer
|
** Initializer
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun engineering-std-init ()
|
(defun engineering-std-init ()
|
||||||
"Initialize the enforcement system."
|
"Initialize the enforcement system."
|
||||||
(let ((env-root (or (uiop:getenv "OC_DATA_DIR")
|
(let ((env-root (or (uiop:getenv "OC_DATA_DIR")
|
||||||
@@ -111,32 +111,32 @@ Every significant fix or architectural decision MUST be documented in an org fil
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
;; Auto-initialize on load
|
;; Auto-initialize on load
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(engineering-std-init)
|
(engineering-std-init)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Test Suite
|
* Test Suite
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-engineering-standards-tests
|
(defpackage :opencortex-engineering-standards-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:engineering-standards-suite))
|
(:export #:engineering-standards-suite))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex-engineering-standards-tests)
|
(in-package :opencortex-engineering-standards-tests)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-suite engineering-standards-suite
|
(def-suite engineering-standards-suite
|
||||||
:description "Tests for Engineering Standards enforcement")
|
:description "Tests for Engineering Standards enforcement")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-suite engineering-standards-suite)
|
(in-suite engineering-standards-suite)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(test git-clean-check-clean
|
(test git-clean-check-clean
|
||||||
"verify-git-clean-p returns T when git tree is clean."
|
"verify-git-clean-p returns T when git tree is clean."
|
||||||
(let ((tmp-dir "/tmp/eng-std-test-clean/"))
|
(let ((tmp-dir "/tmp/eng-std-test-clean/"))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-gardener.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-gardener.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: gardener-skill
|
:ID: gardener-skill
|
||||||
:CREATED: [2026-04-13 Mon 18:50]
|
:CREATED: [2026-04-13 Mon 18:50]
|
||||||
|
|||||||
@@ -13,26 +13,26 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
|
|||||||
* Phase B: Protocol (Success Criteria)
|
* Phase B: Protocol (Success Criteria)
|
||||||
|
|
||||||
** Test Suite Context
|
** Test Suite Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-gateway-manager-tests
|
(defpackage :opencortex-gateway-manager-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:gateway-suite))
|
(:export #:gateway-suite))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex-gateway-manager-tests)
|
(in-package :opencortex-gateway-manager-tests)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-suite gateway-suite :description "Verification of the Gateway Manager skill")
|
(def-suite gateway-suite :description "Verification of the Gateway Manager skill")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-suite gateway-suite)
|
(in-suite gateway-suite)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Logic Tests
|
** Logic Tests
|
||||||
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(test test-gateway-registration
|
(test test-gateway-registration
|
||||||
"Verify that the skill can register a new gateway metadata block."
|
"Verify that the skill can register a new gateway metadata block."
|
||||||
(let ((opencortex::*gateways* nil))
|
(let ((opencortex::*gateways* nil))
|
||||||
@@ -51,12 +51,12 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
|
|||||||
* Phase C: Implementation (Build)
|
* Phase C: Implementation (Build)
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Capability Definition
|
** Capability Definition
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defparameter *skill-gateway-manager*
|
(defparameter *skill-gateway-manager*
|
||||||
'(:name "gateway-manager"
|
'(:name "gateway-manager"
|
||||||
:description "Manages connections to external chat platforms."
|
:description "Manages connections to external chat platforms."
|
||||||
@@ -66,12 +66,12 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Registry Persistence
|
** Registry Persistence
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *gateways* nil "The internal registry of configured gateways.")
|
(defvar *gateways* nil "The internal registry of configured gateways.")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Persistence Stubs
|
** Persistence Stubs
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun save-gateways ()
|
(defun save-gateways ()
|
||||||
"Persist gateway metadata to XDG Config directory."
|
"Persist gateway metadata to XDG Config directory."
|
||||||
(let ((path (merge-pathnames "gateways.lisp" (get-oc-config-dir))))
|
(let ((path (merge-pathnames "gateways.lisp" (get-oc-config-dir))))
|
||||||
@@ -81,14 +81,14 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Registration Logic
|
** Registration Logic
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun skill-gateway-register (platform metadata)
|
(defun skill-gateway-register (platform metadata)
|
||||||
"Internal function to update the gateway registry."
|
"Internal function to update the gateway registry."
|
||||||
(setf (getf *gateways* platform) metadata))
|
(setf (getf *gateways* platform) metadata))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Telegram Verification
|
** Telegram Verification
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun skill-gateway-verify-telegram (token)
|
(defun skill-gateway-verify-telegram (token)
|
||||||
"Verifies a Telegram bot token via the getMe API."
|
"Verifies a Telegram bot token via the getMe API."
|
||||||
(let ((url (format nil "https://api.telegram.org/bot~a/getMe" token)))
|
(let ((url (format nil "https://api.telegram.org/bot~a/getMe" token)))
|
||||||
@@ -103,7 +103,7 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Linkage Command
|
** Linkage Command
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun skill-gateway-link (platform token)
|
(defun skill-gateway-link (platform token)
|
||||||
"Primary capability to link a new platform. Returns status plist."
|
"Primary capability to link a new platform. Returns status plist."
|
||||||
(harness-log "GATEWAY: Attempting to link ~a..." platform)
|
(harness-log "GATEWAY: Attempting to link ~a..." platform)
|
||||||
@@ -120,7 +120,7 @@ In a traditional AI wrapper, the user manually edits a config file to add a bot
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** CLI Main Wrapper
|
** CLI Main Wrapper
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun gateway-manager-main (platform token)
|
(defun gateway-manager-main (platform token)
|
||||||
"Main entry point for CLI-driven linkage."
|
"Main entry point for CLI-driven linkage."
|
||||||
(if (and platform token)
|
(if (and platform token)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-homoiconic-memory.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-homoiconic-memory.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: homoiconic-memory-skill
|
:ID: homoiconic-memory-skill
|
||||||
:CREATED: [2026-04-10 Fri]
|
:CREATED: [2026-04-10 Fri]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-lisp-utils.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-lisp-utils.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: lisp-utils-skill
|
:ID: lisp-utils-skill
|
||||||
:CREATED: [2026-04-23 Thu]
|
:CREATED: [2026-04-23 Thu]
|
||||||
@@ -159,7 +159,7 @@ Returns (VALUES t nil) if clean, or (VALUES nil error-message nil nil)."
|
|||||||
|
|
||||||
* Test Suite
|
* Test Suite
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "lisp-utils-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "lisp-utils-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-lisp-utils-tests
|
(defpackage :opencortex-lisp-utils-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:lisp-utils-suite))
|
(:export #:lisp-utils-suite))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-literate-programming.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-literate-programming.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: literate-programming-skill-2026
|
:ID: literate-programming-skill-2026
|
||||||
:CREATED: [2026-04-25 Sat]
|
:CREATED: [2026-04-25 Sat]
|
||||||
@@ -241,7 +241,7 @@ The LP skill runs at priority 1100 (just below engineering-standards at 1000).
|
|||||||
These tests verify the LP enforcement logic. Run with:
|
These tests verify the LP enforcement logic. Run with:
|
||||||
~(fiveam:run! 'literate-programming-suite)~
|
~(fiveam:run! 'literate-programming-suite)~
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "literate-programming-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "literate-programming-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-literate-programming-tests
|
(defpackage :opencortex-literate-programming-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:literate-programming-suite))
|
(:export #:literate-programming-suite))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llama-backend.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llama-backend.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: llama-backend-skill
|
:ID: llama-backend-skill
|
||||||
:CREATED: [2026-04-17 Fri 20:00]
|
:CREATED: [2026-04-17 Fri 20:00]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: llm-gateway-spec
|
:ID: llm-gateway-spec
|
||||||
:CREATED: [2026-04-10 Thu]
|
:CREATED: [2026-04-10 Thu]
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
The *LLM Gateway* skill provides a unified interface for interacting with multiple Large Language Model providers.
|
The *LLM Gateway* skill provides a unified interface for interacting with multiple Large Language Model providers.
|
||||||
|
|
||||||
* Test Suite
|
* Test Suite
|
||||||
#+begin_src lisp :tangle (expand-file-name "llm-gateway-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "llm-gateway-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-llm-gateway-tests
|
(defpackage :opencortex-llm-gateway-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:llm-gateway-suite))
|
(:export #:llm-gateway-suite))
|
||||||
@@ -41,12 +41,12 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
|
|||||||
* Implementation
|
* Implementation
|
||||||
|
|
||||||
** Package Context
|
** Package Context
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Skill Metadata
|
** Skill Metadata
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defparameter *skill-llm-gateway*
|
(defparameter *skill-llm-gateway*
|
||||||
'(:name "llm-gateway"
|
'(:name "llm-gateway"
|
||||||
:description "Unified provider-agnostic LLM interface."
|
:description "Unified provider-agnostic LLM interface."
|
||||||
@@ -56,7 +56,7 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Request Execution
|
** Request Execution
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defun execute-llm-request (&key prompt system-prompt provider model)
|
(defun execute-llm-request (&key prompt system-prompt provider model)
|
||||||
"Generic executor for all LLM providers."
|
"Generic executor for all LLM providers."
|
||||||
(let* ((active-provider (or provider :ollama))
|
(let* ((active-provider (or provider :ollama))
|
||||||
@@ -76,7 +76,7 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Cognitive Tools
|
** Cognitive Tools
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-cognitive-tool :get-ollama-embedding
|
(def-cognitive-tool :get-ollama-embedding
|
||||||
"Generates vector embeddings via Ollama API."
|
"Generates vector embeddings via Ollama API."
|
||||||
((:text :type :string :description "Text to embed."))
|
((:text :type :string :description "Text to embed."))
|
||||||
@@ -92,7 +92,7 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
|
|||||||
(error (c) (harness-log "OLLAMA EMBED ERROR: ~a" c) nil))))))
|
(error (c) (harness-log "OLLAMA EMBED ERROR: ~a" c) nil))))))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(def-cognitive-tool :ask-llm
|
(def-cognitive-tool :ask-llm
|
||||||
"Unified interface for interacting with LLM providers."
|
"Unified interface for interacting with LLM providers."
|
||||||
((:prompt :type :string :description "The user prompt")
|
((:prompt :type :string :description "The user prompt")
|
||||||
@@ -107,7 +107,7 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
** Skill Registration
|
** Skill Registration
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defskill :skill-llm-gateway
|
(defskill :skill-llm-gateway
|
||||||
:priority 50
|
:priority 50
|
||||||
:trigger (lambda (ctx) (declare (ignore ctx)) t)
|
:trigger (lambda (ctx) (declare (ignore ctx)) t)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-peripheral-vision.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-peripheral-vision.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: org-skill-peripheral-vision
|
:ID: org-skill-peripheral-vision
|
||||||
:CREATED: [2026-04-12 Sun 14:15]
|
:CREATED: [2026-04-12 Sun 14:15]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-policy.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-policy.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 47425a43-2be0-423c-8509-22592cfe9c9e
|
:ID: 47425a43-2be0-423c-8509-22592cfe9c9e
|
||||||
:CREATED: [2026-04-07 Tue 12:57]
|
:CREATED: [2026-04-07 Tue 12:57]
|
||||||
@@ -50,7 +50,7 @@ Every skill executes within its own jailed package namespace, inheriting core ha
|
|||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
* Global Policy Configuration
|
* Global Policy Configuration
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-policy.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-policy.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defvar *policy-invariant-priorities*
|
(defvar *policy-invariant-priorities*
|
||||||
'((:transparency . 500)
|
'((:transparency . 500)
|
||||||
(:autonomy . 400)
|
(:autonomy . 400)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-protocol-validator.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-protocol-validator.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: org-skill-communication-protocol-validator
|
:ID: org-skill-communication-protocol-validator
|
||||||
:CREATED: [2026-04-12 Sun 14:35]
|
:CREATED: [2026-04-12 Sun 14:35]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-scribe.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-scribe.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: scribe-skill
|
:ID: scribe-skill
|
||||||
:CREATED: [2026-04-13 Mon 18:40]
|
:CREATED: [2026-04-13 Mon 18:40]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-edit.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-edit.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: self-edit-001
|
:ID: self-edit-001
|
||||||
:END:
|
:END:
|
||||||
@@ -239,7 +239,7 @@ Swap compiled skill files without breaking active sockets.
|
|||||||
|
|
||||||
* Phase E: Verification
|
* Phase E: Verification
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "self-edit-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "self-edit-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-self-edit-tests
|
(defpackage :opencortex-self-edit-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:self-edit-suite))
|
(:export #:self-edit-suite))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-fix.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-fix.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: 65891ce2-a465-49e6-a0c1-be13d3288d55
|
:ID: 65891ce2-a465-49e6-a0c1-be13d3288d55
|
||||||
:CREATED: [2026-03-30 Mon 21:16]
|
:CREATED: [2026-03-30 Mon 21:16]
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: shell-actuator-skill
|
:ID: shell-actuator-skill
|
||||||
:CREATED: [2026-04-12 Sun]
|
:CREATED: [2026-04-12 Sun]
|
||||||
@@ -12,7 +12,7 @@ The *Shell Actuator* provides a controlled interface for the OpenCortex to execu
|
|||||||
|
|
||||||
* Implementation
|
* Implementation
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(in-package :opencortex)
|
(in-package :opencortex)
|
||||||
|
|
||||||
(defparameter *allowed-commands* '("ls" "git" "rg" "grep" "date" "echo" "cat" "node" "python3" "sbcl"))
|
(defparameter *allowed-commands* '("ls" "git" "rg" "grep" "date" "echo" "cat" "node" "python3" "sbcl"))
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-tool-permissions.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-tool-permissions.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
:PROPERTIES:
|
:PROPERTIES:
|
||||||
:ID: tool-permissions-skill-001
|
:ID: tool-permissions-skill-001
|
||||||
:CREATED: [2026-04-23 Thu]
|
:CREATED: [2026-04-23 Thu]
|
||||||
@@ -135,7 +135,7 @@ Tool permissions and embedding generation via multiple providers.
|
|||||||
These tests verify tool permissions. Run with:
|
These tests verify tool permissions. Run with:
|
||||||
~(fiveam:run! 'tool-permissions-suite)~
|
~(fiveam:run! 'tool-permissions-suite)~
|
||||||
|
|
||||||
#+begin_src lisp :tangle (expand-file-name "tool-permissions-tests.lisp" (or (identity (getenv "INSTALL_DIR")) (file-name-directory (buffer-file-name))))
|
#+begin_src lisp :tangle (expand-file-name "tool-permissions-tests.lisp" (expand-file-name "skills/" (or (identity (getenv "INSTALL_DIR")) ".")))
|
||||||
(defpackage :opencortex-tool-permissions-tests
|
(defpackage :opencortex-tool-permissions-tests
|
||||||
(:use :cl :fiveam :opencortex)
|
(:use :cl :fiveam :opencortex)
|
||||||
(:export #:tool-permissions-suite))
|
(:export #:tool-permissions-suite))
|
||||||
|
|||||||
Reference in New Issue
Block a user