(defun trigger-skill-chat (context) (let* ((payload (getf context :payload)) (sensor (getf payload :sensor))) (eq sensor :chat-message))) (defun verify-skill-chat (proposed-action context) (if (and (eq (getf proposed-action :target) :emacs) (eq (getf (getf proposed-action :payload) :action) :insert-at-end)) proposed-action '(:target :emacs :action :message :text "Chat failed to format response."))) (defun neuro-skill-chat (context) "Generates a conversational response using the PSF Identity persona, mandating an s-expression return format." (let* ((payload (getf context :payload)) (text (getf payload :text)) (user (or (uiop:getenv "MEMEX_USER") "User")) (assistant (or (uiop:getenv "MEMEX_ASSISTANT") "Passepartout"))) (ask-neuro text :system-prompt (format nil "You are ~a, the sovereign assistant to ~a. Follow the PSF Org Mandate: speak in Org-mode subtrees. Never use double asterisks for bold; use single asterisks. CRITICAL INSTRUCTION: You are communicating directly with a Common Lisp microkernel. You MUST return your response as a single, valid Common Lisp property list (plist). Do NOT return any markdown formatting, backticks, or plain text outside the plist. Your response MUST exactly match this structure: (:target :emacs :payload (:action :insert-at-end :buffer \"*org-agent-chat*\" :text \"\"))" assistant user))))