fix(chaos): standardize tangle paths to robust (identity (getenv ...))

This commit is contained in:
2026-04-28 17:54:12 -04:00
parent 00c3f8ef69
commit 635db05d17
35 changed files with 164 additions and 164 deletions

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-bouncer.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-bouncer.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: bouncer-agent-skill
:CREATED: [2026-04-11 Sat 15:20]

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-cli-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-cli-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: cli-gateway-skill
:CREATED: [2026-04-13 Mon 17:00]

View File

@@ -16,26 +16,26 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
* Phase B: Protocol (Success Criteria)
** Test Suite Context
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-config-manager-tests
(:use :cl :fiveam :opencortex)
(:export #:config-suite))
#+end_src
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-package :opencortex-config-manager-tests)
#+end_src
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(def-suite config-suite :description "Verification of the Config Manager skill")
#+end_src
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-suite config-suite)
#+end_src
** Registry Tests
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "config-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(test test-provider-registration
"Verify that multiple providers can be registered and saved."
(let ((opencortex::*providers* nil))
@@ -95,12 +95,12 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
* Phase C: Implementation (Build)
** Package Context
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(in-package :opencortex)
#+end_src
** Skill Metadata
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defparameter *skill-config-manager*
'(:name "config-manager"
: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
** Provider Templates
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defvar *provider-templates*
'((: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"))
@@ -122,7 +122,7 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
#+end_src
** Registry Persistence
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defvar *providers* nil "Global registry of configured LLM providers.")
(defun get-oc-config-dir ()
@@ -159,14 +159,14 @@ Secrets are appended to `~/.config/opencortex/.env`, while structural metadata i
#+end_src
** Registry API
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun register-provider (id config)
"Update the global provider registry."
(setf (getf *providers* id) config))
#+end_src
** Setup Wizard Implementation
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun configure-provider (id)
"Guided configuration for a specific LLM provider template."
(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))))
#+end_src
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-config-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun run-setup-wizard ()
"Entry point for the interactive OpenCortex Lisp Setup Wizard."
(format t "=== OpenCortex: Advanced Setup Wizard ===~%")

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: credentials-vault-skill
: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.
** 1. Unit Tests (FiveAM)
#+begin_src lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "org-skill-credentials-vault.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
#|
(defpackage :opencortex-vault-tests
(:use :cl :fiveam :opencortex))

View File

@@ -18,26 +18,26 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
* Phase B: Protocol (Success Criteria)
** Test Suite Context
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-diagnostics-tests
(:use :cl :fiveam :opencortex)
(:export #:diagnostics-suite))
#+end_src
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-package :opencortex-diagnostics-tests)
#+end_src
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(def-suite diagnostics-suite :description "Verification of the Diagnostics skill")
#+end_src
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-suite diagnostics-suite)
#+end_src
** Dependency Tests
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "diagnostics-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(test test-dependency-check-fail
"Verify that missing binaries are correctly identified as failures."
(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)
** Package Context
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(in-package :opencortex)
#+end_src
** Skill Metadata
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defparameter *skill-diagnostics*
'(:name "diagnostics"
: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
** Global Configuration
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defvar *doctor-required-binaries* '("sbcl" "emacs" "git" "socat" "nc")
"List of external binaries required for full system operation.")
#+end_src
** Dependency Verification
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun doctor-check-dependencies ()
"Verifies that required external binaries are available in the PATH via a shell probe."
(let ((all-ok t))
@@ -86,7 +86,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
#+end_src
** Environment & XDG Validation
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun doctor-check-env ()
"Validates XDG directories and environment configuration against the POSIX standard."
(harness-log "DOCTOR: Checking XDG environment...")
@@ -115,7 +115,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
#+end_src
** LLM Connectivity
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun doctor-check-llm ()
"Tests connectivity to primary LLM providers. Non-critical fallback allowed."
(harness-log "DOCTOR: Checking LLM connectivity...")
@@ -130,7 +130,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
#+end_src
** Orchestration
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun doctor-run-all ()
"Executes the full diagnostic suite and returns T if system is healthy."
(harness-log "==================================================")
@@ -150,7 +150,7 @@ The skill strictly validates the POSIX standard paths resolved during bootstrap,
#+end_src
** CLI Entry Point
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-diagnostics.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun doctor-main ()
"Entry point for the 'doctor' CLI command."
(if (doctor-run-all)

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-emacs-edit.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-emacs-edit.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: emacs-edit-skill
:CREATED: [2026-04-23 Thu]
@@ -390,7 +390,7 @@ Use this AFTER modifications to save changes."
#+end_src
* Phase E: Chaos (Verification)
#+begin_src lisp :tangle (expand-file-name "emacs-edit-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "emacs-edit-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-emacs-edit-tests
(:use :cl :fiveam :opencortex)
(:export #:emacs-edit-suite))

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: 37f2b59f-4537-4cca-ac7f-5c24b9e2e773
: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
** Package Context
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(in-package :opencortex)
#+end_src
** Global Configuration
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defvar *engineering-std-project-root* nil
"Path to the project root for enforcement checks.")
#+end_src
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defstruct engineering-violation
(phase nil)
(rule nil)
@@ -76,7 +76,7 @@ Every significant fix or architectural decision MUST be documented in an org fil
#+end_src
** CDD Utilities: Tier 1
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun check-structural-balance (file-path)
"Tier 1 Chaos: Verifies that a Lisp file is syntactically balanced."
(handler-case
@@ -90,7 +90,7 @@ Every significant fix or architectural decision MUST be documented in an org fil
#+end_src
** Git Protocol
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun verify-git-clean-p (&optional (dir *engineering-std-project-root*))
"Returns T if the git repository at DIR has no uncommitted changes."
(when dir
@@ -101,7 +101,7 @@ Every significant fix or architectural decision MUST be documented in an org fil
#+end_src
** Initializer
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun engineering-std-init ()
"Initialize the enforcement system."
(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
;; Auto-initialize on load
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-engineering-standards.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(engineering-std-init)
#+end_src
* Test Suite
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-engineering-standards-tests
(:use :cl :fiveam :opencortex)
(:export #:engineering-standards-suite))
#+end_src
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-package :opencortex-engineering-standards-tests)
#+end_src
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(def-suite engineering-standards-suite
:description "Tests for Engineering Standards enforcement")
#+end_src
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-suite engineering-standards-suite)
#+end_src
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "engineering-standards-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(test git-clean-check-clean
"verify-git-clean-p returns T when git tree is clean."
(let ((tmp-dir "/tmp/eng-std-test-clean/"))

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-gardener.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-gardener.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: gardener-skill
:CREATED: [2026-04-13 Mon 18:50]

View File

@@ -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)
** Test Suite Context
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-gateway-manager-tests
(:use :cl :fiveam :opencortex)
(:export #:gateway-suite))
#+end_src
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-package :opencortex-gateway-manager-tests)
#+end_src
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(def-suite gateway-suite :description "Verification of the Gateway Manager skill")
#+end_src
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(in-suite gateway-suite)
#+end_src
** Logic Tests
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "gateway-manager-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(test test-gateway-registration
"Verify that the skill can register a new gateway metadata block."
(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)
** Package Context
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(in-package :opencortex)
#+end_src
** Capability Definition
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defparameter *skill-gateway-manager*
'(:name "gateway-manager"
: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
** Registry Persistence
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defvar *gateways* nil "The internal registry of configured gateways.")
#+end_src
** Persistence Stubs
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun save-gateways ()
"Persist gateway metadata to XDG Config directory."
(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
** Registration Logic
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun skill-gateway-register (platform metadata)
"Internal function to update the gateway registry."
(setf (getf *gateways* platform) metadata))
#+end_src
** Telegram Verification
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun skill-gateway-verify-telegram (token)
"Verifies a Telegram bot token via the getMe API."
(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
** Linkage Command
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun skill-gateway-link (platform token)
"Primary capability to link a new platform. Returns status plist."
(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
** CLI Main Wrapper
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-gateway-manager.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun gateway-manager-main (platform token)
"Main entry point for CLI-driven linkage."
(if (and platform token)

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-homoiconic-memory.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-homoiconic-memory.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: homoiconic-memory-skill
:CREATED: [2026-04-10 Fri]

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-lisp-utils.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-lisp-utils.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: lisp-utils-skill
:CREATED: [2026-04-23 Thu]
@@ -159,7 +159,7 @@ Returns (VALUES t nil) if clean, or (VALUES nil error-message nil nil)."
* Test Suite
#+begin_src lisp :tangle (expand-file-name "lisp-utils-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "lisp-utils-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-lisp-utils-tests
(:use :cl :fiveam :opencortex)
(:export #:lisp-utils-suite))

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-literate-programming.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-literate-programming.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: literate-programming-skill-2026
: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:
~(fiveam:run! 'literate-programming-suite)~
#+begin_src lisp :tangle (expand-file-name "literate-programming-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "literate-programming-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-literate-programming-tests
(:use :cl :fiveam :opencortex)
(:export #:literate-programming-suite))

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llama-backend.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llama-backend.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: llama-backend-skill
:CREATED: [2026-04-17 Fri 20:00]

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: llm-gateway-spec
: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.
* Test Suite
#+begin_src lisp :tangle (expand-file-name "llm-gateway-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "llm-gateway-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-llm-gateway-tests
(:use :cl :fiveam :opencortex)
(:export #:llm-gateway-suite))
@@ -41,12 +41,12 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
* Implementation
** Package Context
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(in-package :opencortex)
#+end_src
** Skill Metadata
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defparameter *skill-llm-gateway*
'(:name "llm-gateway"
:description "Unified provider-agnostic LLM interface."
@@ -56,7 +56,7 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
#+end_src
** Request Execution
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defun execute-llm-request (&key prompt system-prompt provider model)
"Generic executor for all LLM providers."
(let* ((active-provider (or provider :ollama))
@@ -76,7 +76,7 @@ The *LLM Gateway* skill provides a unified interface for interacting with multip
#+end_src
** Cognitive Tools
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(def-cognitive-tool :get-ollama-embedding
"Generates vector embeddings via Ollama API."
((: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))))))
#+end_src
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(def-cognitive-tool :ask-llm
"Unified interface for interacting with LLM providers."
((: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
** Skill Registration
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-llm-gateway.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defskill :skill-llm-gateway
:priority 50
:trigger (lambda (ctx) (declare (ignore ctx)) t)

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-peripheral-vision.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-peripheral-vision.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: org-skill-peripheral-vision
:CREATED: [2026-04-12 Sun 14:15]

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-policy.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-policy.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: 47425a43-2be0-423c-8509-22592cfe9c9e
: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
* Global Policy Configuration
#+begin_src lisp :tangle (expand-file-name "org-skill-policy.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-policy.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(defvar *policy-invariant-priorities*
'((:transparency . 500)
(:autonomy . 400)

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-protocol-validator.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-protocol-validator.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: org-skill-communication-protocol-validator
:CREATED: [2026-04-12 Sun 14:35]

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-scribe.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: scribe-skill
:CREATED: [2026-04-13 Mon 18:40]

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-edit.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-edit.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: self-edit-001
:END:
@@ -239,7 +239,7 @@ Swap compiled skill files without breaking active sockets.
* Phase E: Verification
#+begin_src lisp :tangle (expand-file-name "self-edit-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "self-edit-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-self-edit-tests
(:use :cl :fiveam :opencortex)
(:export #:self-edit-suite))

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-fix.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-self-fix.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: 65891ce2-a465-49e6-a0c1-be13d3288d55
:CREATED: [2026-03-30 Mon 21:16]

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: shell-actuator-skill
:CREATED: [2026-04-12 Sun]
@@ -12,7 +12,7 @@ The *Shell Actuator* provides a controlled interface for the OpenCortex to execu
* Implementation
#+begin_src lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+begin_src lisp :tangle (expand-file-name "org-skill-shell-actuator.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
(in-package :opencortex)
(defparameter *allowed-commands* '("ls" "git" "rg" "grep" "date" "echo" "cat" "node" "python3" "sbcl"))

View File

@@ -1,4 +1,4 @@
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-tool-permissions.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/skills"))
#+PROPERTY: header-args:lisp :tangle (expand-file-name "org-skill-tool-permissions.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/skills"))
:PROPERTIES:
:ID: tool-permissions-skill-001
:CREATED: [2026-04-23 Thu]
@@ -135,7 +135,7 @@ Tool permissions and embedding generation via multiple providers.
These tests verify tool permissions. Run with:
~(fiveam:run! 'tool-permissions-suite)~
#+begin_src lisp :tangle (expand-file-name "tool-permissions-tests.lisp" (concat (or (uiop:getenv "INSTALL_DIR") ".") "/tests"))
#+begin_src lisp :tangle (expand-file-name "tool-permissions-tests.lisp" (concat (or (identity (getenv "INSTALL_DIR")) ".") "/tests"))
(defpackage :opencortex-tool-permissions-tests
(:use :cl :fiveam :opencortex)
(:export #:tool-permissions-suite))