feat(v0.2.0): Self-Improvement & Structural Integrity
Some checks failed
Deploy-Agent-V15-Stdin / JOB-V15-STDIN (push) Failing after 8s

- Fix critical paren balance issues across harness/skills.org, act.org,
  loop.org, memory.org, and skills/self-edit|emacs-edit.org
- Add :reload-skill cognitive tool for hot-reloading without restart
- Add :generate-embeddings tool and self-edit hot-reload infrastructure
- Wire all new skills (self-edit, emacs-edit, lisp-utils) into main ASDF
- Regenerate all .lisp tangled files via emacs --batch org-babel-tangle
- Add :opencortex/tests ASDF system with 14 test suites
- Fix test files to compile cleanly (self-edit-tests symbol vis, etc.)
This commit is contained in:
2026-04-27 07:30:01 -04:00
parent 1e202629ce
commit 43dbe3cf2d
29 changed files with 1980 additions and 590 deletions

View File

@@ -262,7 +262,7 @@ Example feedback chain:
:DEPTH (1+ depth)
:META meta
:PAYLOAD (list :SENSOR :tool-error
:MESSAGE (format nil "Tool '~a' not found" tool-name)))))
:MESSAGE (format nil "Tool '~a' not found" tool-name))))))
#+end_src
** format-tool-result: Human-Readable Output

View File

@@ -202,7 +202,7 @@ The heartbeat thread ensures the agent remains alive even without external input
:payload (list :sensor :heartbeat
:unix-time (get-universal-time)))))
:name "opencortex-heartbeat"))))
:name "opencortex-heartbeat")))))
#+end_src
* Main Entry Point

View File

@@ -202,12 +202,7 @@ These tests verify the Memory system. Run with:
(let* ((ast-v2 '(:type :HEADLINE :properties (:ID "cow-node" :TITLE "State B") :contents nil))
(id-v2 (ingest-ast ast-v2))
(hash-v2 (org-object-hash (lookup-object id-v2))))
(is (equal (org-object-hash (lookup-object "cow-node")) hash-v2))
(rollback-memory 0)
(is (equal (org-object-hash (lookup-object "cow-node")) hash-v1))
(is (not (null (gethash hash-v2 *history-store*))))))
#+end_src
** Disk Persistence (save-memory / load-memory)
Essential for surviving crashes. Saves the in-memory hash tables to disk and loads them back on restart. The path is controlled by the `MEMORY_SNAPSHOT_PATH` environment variable.
@@ -445,7 +440,7 @@ Following the Engineering Standards, the Memory must be empirically verified thr
(let* ((ast-v1 '(:type :HEADLINE :properties (:ID "cow-node" :TITLE "State A") :contents nil))
(id-v1 (ingest-ast ast-v1))
(hash-v1 (org-object-hash (lookup-object id-v1))))
;; Take a snapshot at State A
(snapshot-memory)
@@ -463,7 +458,7 @@ Following the Engineering Standards, the Memory must be empirically verified thr
(is (equal (org-object-hash (lookup-object "cow-node")) hash-v1))
;; Verify State B is still safely in the history store (no data loss)
(is (not (null (gethash hash-v2 *history-store*))))))
(is (not (null (gethash hash-v2 *history-store*)))))))
(test merkle-hash-consistency
"Verify that identical ASTs produce identical Merkle hashes."
@@ -486,6 +481,6 @@ Following the Engineering Standards, the Memory must be empirically verified thr
(let* ((ast-mod '(:type :HEADLINE :properties (:ID "root" :TITLE "Root")
:contents ((:type :HEADLINE :properties (:ID "leaf" :TITLE "Changed") :contents nil))))
(id-mod (progn (clrhash *memory*) (ingest-ast ast-mod)))
(mod-hash (org-object-hash (lookup-object id-mod))))
(mod-hash (org-object-hash (lookup-object id-mod))))
(is (not (equal root-hash mod-hash))))))
#+end_src

View File

@@ -195,9 +195,9 @@ Only loads blocks that specify a .lisp tangle target, ignoring tests and example
(search ".lisp" tl)
(not (search "tests/" tl))
(not (search "test/" tl))))))
((uiop:string-prefix-p "#+end_src" (string-downcase clean-line))
(setf in-lisp-block nil)
(setf collect-this-block nil))
((uiop:string-prefix-p "#+end" (string-downcase clean-line))
(setf in-lisp-block nil)
(setf collect-this-block nil))
((and in-lisp-block collect-this-block)
(unless (or (uiop:string-prefix-p ":PROPERTIES:" (string-upcase clean-line))
(uiop:string-prefix-p ":END:" (string-upcase clean-line)))
@@ -394,7 +394,7 @@ EXAMPLES:
(let ((base-name (pathname-name file)))
(setf (skill-entry-status (gethash base-name *skill-catalog*)) :ready)
(format nil "OK: Skill '~a' reloaded successfully." base-name))
(format nil "ERROR: Reload failed with status ~a" status)))))))))
(format nil "ERROR: Reload failed with status ~a" status))))))))))
#+end_src
*** The File Read Tool (V 0.2.0 File I/O)
@@ -413,7 +413,7 @@ EXAMPLES:
(handler-case
(uiop:read-file-string file)
(error (c)
(format nil "ERROR reading ~a: ~a" file c)))))
(format nil "ERROR reading ~a: ~a" file c))))))
#+end_src
*** The File Write Tool (V 0.2.0 File I/O)
@@ -445,7 +445,7 @@ EXAMPLES:
(if append-p "content appended" "file written")
file))
(error (c)
(format nil "ERROR writing ~a: ~a" file c)))))
(format nil "ERROR writing ~a: ~a" file c))))))
#+end_src
*** The String Replace Tool (V 0.2.0 File I/O)
@@ -476,7 +476,7 @@ EXAMPLES:
(format nil "OK: Replaced first occurrence in ~a" file))
(format nil "ERROR: Pattern not found in ~a" file))))
(error (c)
(format nil "ERROR replacing in ~a: ~a" file c)))))
(format nil "ERROR replacing in ~a: ~a" file c))))))
#+end_src
* Test Suite