fix: add find-triggered-skill alias for skill-triggered-find
Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s

Another naming drift: the think function in core-loop-reason calls
find-triggered-skill but the actual function was skill-triggered-find
in core-skills. This crashed the daemon on every user-input signal.
This commit is contained in:
2026-05-03 20:18:57 -04:00
parent b728f73ded
commit 3c3557f519
2 changed files with 10 additions and 2 deletions

View File

@@ -23,6 +23,10 @@
(defstruct skill-entry filename (status :discovered) error-log (load-time 0)) (defstruct skill-entry filename (status :discovered) error-log (load-time 0))
;; Alias: find-triggered-skill → skill-triggered-find
(defun find-triggered-skill (context)
(skill-triggered-find context))
(defun skill-triggered-find (context) (defun skill-triggered-find (context)
"Returns the highest priority skill whose trigger matches context." "Returns the highest priority skill whose trigger matches context."
(let ((triggered nil)) (let ((triggered nil))
@@ -31,7 +35,7 @@
(when (and (skill-probabilistic-prompt skill) (when (and (skill-probabilistic-prompt skill)
(ignore-errors (funcall (skill-trigger-fn skill) context))) (ignore-errors (funcall (skill-trigger-fn skill) context)))
(push skill triggered))) (push skill triggered)))
*skill-registry*) *skill-registry*)
(first (sort triggered #'> :key #'skill-priority)))) (first (sort triggered #'> :key #'skill-priority))))
(defmacro defskill (name &key priority dependencies trigger probabilistic deterministic system-prompt-augment) (defmacro defskill (name &key priority dependencies trigger probabilistic deterministic system-prompt-augment)

View File

@@ -90,6 +90,10 @@ Iterates the registry and returns the highest-priority skill whose trigger funct
This is how the system determines which skill "owns" the current user input. For example, if the REPL skill's trigger matches the input, the REPL skill provides the prompt template that shapes how the LLM responds. This is how the system determines which skill "owns" the current user input. For example, if the REPL skill's trigger matches the input, the REPL skill provides the prompt template that shapes how the LLM responds.
#+begin_src lisp #+begin_src lisp
;; Alias: find-triggered-skill → skill-triggered-find
(defun find-triggered-skill (context)
(skill-triggered-find context))
(defun skill-triggered-find (context) (defun skill-triggered-find (context)
"Returns the highest priority skill whose trigger matches context." "Returns the highest priority skill whose trigger matches context."
(let ((triggered nil)) (let ((triggered nil))
@@ -98,7 +102,7 @@ This is how the system determines which skill "owns" the current user input. For
(when (and (skill-probabilistic-prompt skill) (when (and (skill-probabilistic-prompt skill)
(ignore-errors (funcall (skill-trigger-fn skill) context))) (ignore-errors (funcall (skill-trigger-fn skill) context)))
(push skill triggered))) (push skill triggered)))
*skill-registry*) *skill-registry*)
(first (sort triggered #'> :key #'skill-priority)))) (first (sort triggered #'> :key #'skill-priority))))
#+end_src #+end_src