feat(arch): implement 'Code as Thought' architecture and formalize PSF Consensus Loop
This commit is contained in:
28
projects/org-skill-agent-identity/src/identity-logic.lisp
Normal file
28
projects/org-skill-agent-identity/src/identity-logic.lisp
Normal file
@@ -0,0 +1,28 @@
|
||||
;;;; identity-logic.lisp --- Core identity and persona logic.
|
||||
;;;; This file is TANGLED from notes/agent-identity.org. DO NOT EDIT MANUALLY.
|
||||
|
||||
(defpackage :org-skill-agent-identity
|
||||
(:use :cl :uiop)
|
||||
(:export #:get-agent-name
|
||||
#:get-agent-persona
|
||||
#:trigger-skill-agent-identity
|
||||
#:neuro-skill-agent-identity))
|
||||
|
||||
(in-package :org-skill-agent-identity)
|
||||
|
||||
(defun get-agent-name ()
|
||||
"Return the current name of the agent. Defaults to 'Agent'."
|
||||
(or (uiop:getenv "MEMEX_ASSISTANT") "Agent"))
|
||||
|
||||
(defun get-agent-persona ()
|
||||
"Return the behavioral instructions for the agent."
|
||||
"You are a proactive Neurosymbolic Lisp Machine. Your goal is to assist the user with GTD, memory, and automation. You are concise, precise, and favor deterministic Lisp solutions over fuzzy neural guesses.")
|
||||
|
||||
(defun trigger-skill-agent-identity (context)
|
||||
(let* ((payload (getf context :payload))
|
||||
(text (or (getf payload :text) "")))
|
||||
(or (search "who are you" text :test #'string-equal)
|
||||
(search "identify yourself" text :test #'string-equal))))
|
||||
|
||||
(defun neuro-skill-agent-identity (context)
|
||||
(format nil "The user asked about your identity. Explain who you are using this persona - ~a" (get-agent-persona)))
|
||||
Reference in New Issue
Block a user