From 3c3557f519fdfde960fb948530f80aa7e5987878 Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sun, 3 May 2026 20:18:57 -0400 Subject: [PATCH] fix: add find-triggered-skill alias for skill-triggered-find 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. --- lisp/core-skills.lisp | 6 +++++- org/core-skills.org | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lisp/core-skills.lisp b/lisp/core-skills.lisp index 526cb99..49db7f1 100644 --- a/lisp/core-skills.lisp +++ b/lisp/core-skills.lisp @@ -23,6 +23,10 @@ (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) "Returns the highest priority skill whose trigger matches context." (let ((triggered nil)) @@ -31,7 +35,7 @@ (when (and (skill-probabilistic-prompt skill) (ignore-errors (funcall (skill-trigger-fn skill) context))) (push skill triggered))) - *skill-registry*) + *skill-registry*) (first (sort triggered #'> :key #'skill-priority)))) (defmacro defskill (name &key priority dependencies trigger probabilistic deterministic system-prompt-augment) diff --git a/org/core-skills.org b/org/core-skills.org index c749c8a..5ff9f0e 100644 --- a/org/core-skills.org +++ b/org/core-skills.org @@ -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. #+begin_src lisp +;; Alias: find-triggered-skill → skill-triggered-find +(defun find-triggered-skill (context) + (skill-triggered-find context)) + (defun skill-triggered-find (context) "Returns the highest priority skill whose trigger matches context." (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) (ignore-errors (funcall (skill-trigger-fn skill) context))) (push skill triggered))) - *skill-registry*) + *skill-registry*) (first (sort triggered #'> :key #'skill-priority)))) #+end_src