ARCH: Clean Core Refactor & Terminology Alignment

This commit is contained in:
2026-04-13 09:03:42 -04:00
parent 8ee1c0c4df
commit b6b39472da
16 changed files with 163 additions and 78 deletions

View File

@@ -1,6 +1,6 @@
(in-package :org-agent)
(defun ask-neuro (prompt &key (system-prompt "You are the System 1 engine of a Neurosymbolic Lisp Machine.") (cascade nil) (context nil))
(defun ask-neuro (prompt &key (system-prompt "You are the Probabilistic Engine engine of a Neurosymbolic Lisp Machine.") (cascade nil) (context nil))
"Dispatches a neural request through the provider cascade.
If CASCADE is a function, it is called with CONTEXT to determine backends."
(let ((backends (cond
@@ -11,7 +11,7 @@
(dolist (backend backends)
(let ((backend-fn (gethash backend *neuro-backends*)))
(when backend-fn
(kernel-log "SYSTEM 1: Attempting backend ~a..." backend)
(kernel-log "PROBABILISTIC ENGINE: Attempting backend ~a..." backend)
(let* (;; Consult the Economist for the model ID if the skill is available
(model (ignore-errors
(uiop:symbol-call :org-agent.skills.org-skill-economist :economist-get-model-for-provider backend)))
@@ -19,7 +19,7 @@
(funcall backend-fn prompt system-prompt :model model)
(funcall backend-fn prompt system-prompt))))
(if (and (stringp result) (search ":LOG" result) (or (search "Failure" result) (search "missing" result)))
(kernel-log "SYSTEM 1: Backend ~a failed. Falling back..." backend)
(kernel-log "PROBABILISTIC ENGINE: Backend ~a failed. Falling back..." backend)
(return-from ask-neuro result))))))
"(:type :LOG :payload (:text \"Neural Cascade Failure\"))"))