feat(arch): implement 'Code as Thought' architecture and formalize PSF Consensus Loop

This commit is contained in:
2026-03-31 13:03:26 -04:00
parent 5a9129132e
commit 1712b1e4a9
114 changed files with 3652 additions and 2581 deletions

View 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)))