fix(v0.2.0): resolve macro conflicts, sync load order, and fix skill packaging

- Standardized def-cognitive-tool to 5-argument signature.
- Consolidated *cognitive-tools* as a hash table in package.lisp.
- Removed skills from opencortex.asd to enforce dynamic Skill Engine loading.
- Added missing (in-package :opencortex) to various skill files.
- Fixed let/let* sequential binding issues in emacs-edit and self-edit.
- Updated opencortex.sh to initialize skills before running doctor.
- Fixed uiop:user-homedir-pathname usage in config-manager.
This commit is contained in:
2026-04-28 10:46:24 -04:00
parent 3dddfe3e3d
commit 80e327dd20
10 changed files with 81 additions and 63 deletions

View File

@@ -400,18 +400,8 @@ EXAMPLES:
#+begin_src lisp
** Cognitive Tool Registration
#+begin_src lisp :tangle (expand-file-name "skills.lisp" (concat (or (getenv "INSTALL_DIR") ".") "/harness"))
(defvar *cognitive-tools* nil "Registry of available Agent capabilities.")
(defmacro def-cognitive-tool (name arg-list &body body)
"Registers a new cognitive tool (capability) into the global registry."
`(setf (getf *cognitive-tools* ,name)
(list :args ',arg-list
:executor (lambda (args)
(let ,(mapcar (lambda (arg)
(let ((arg-name (if (listp arg) (first arg) arg)))
`(,arg-name (getf args ,(intern (string arg-name) :keyword)))))
arg-list)
,@body)))))
;; Cognitive tools are registered in *cognitive-tools* (defined in package.lisp)
;; using the def-cognitive-tool macro.
#+end_src
(def-cognitive-tool :eval "Evaluates raw Common Lisp code in the harness image. Use this for complex calculations or internal state inspection."