feat(psf): transition to Order 2 (Sovereign Architect) with advanced skill graph and philosophical alignment

This commit is contained in:
2026-03-31 20:28:06 -04:00
parent ec3a572bbb
commit ce39227327
581 changed files with 165563 additions and 25735 deletions

View File

@@ -67,22 +67,51 @@ Interfaces for scanning and resolving nodes in the Zettelkasten. It implements a
results))
#+end_src
** Stage 3: Semantic Search (SOTA)
#+begin_src lisp :tangle projects/org-skill-atomic-notes/src/retrieval-logic.lisp
(defun atomic-notes-semantic-search (query &optional (top-k 5))
"Uses dense vector embeddings to find semantically related notes."
(let* ((query-vec (org-agent:get-embedding query))
(matches (when query-vec (org-agent:find-most-similar query-vec top-k))))
(mapcar (lambda (match)
(let* ((score (car match))
(obj (cdr match))
(attrs (org-agent:org-object-attributes obj)))
(list :score score
:id (org-agent:org-object-id obj)
:title (getf attrs :TITLE))))
matches)))
#+end_src
** Neuro-Cognitive Intelligence
#+begin_src lisp :tangle projects/org-skill-atomic-notes/src/retrieval-logic.lisp
(defun neuro-skill-atomic-notes (context)
"Neural stage of Sparse Perception.
It analyzes the search results and decides which specific IDs to 'deep read'."
(let ((query-results (atomic-notes-scan (getf (getf context :payload) :query))))
"Neural stage of Sparse and Semantic Perception.
It combines ripgrep hits and semantic matches to provide high-fidelity context."
(let* ((query (getf (getf context :payload) :query))
(sparse-results (atomic-notes-scan query))
(semantic-results (atomic-notes-semantic-search query)))
(format nil "
I found the following headlines matching your query:
I have searched your Zettelkasten for '~a'.
KEYWORD MATCHES (Sparse):
---
~a
---
SEMANTIC MATCHES (Dense):
---
~{~a (Score: ~f) [ID: ~a]~%~}
---
TASK:
Identify the IDs of the most relevant notes.
Identify the IDs of the most relevant notes to answer the user's implicit or explicit question.
Return a Lisp plist: (:target :atomic-notes :action :deep-read :ids (\"id1\" \"id2\"))
" query-results)))
" query sparse-results
(loop for m in semantic-results
collect (getf m :title)
collect (getf m :score)
collect (getf m :id)))))
#+end_src
* Registration