#+TITLE: SKILL: Org-Native Delivery Agent (Universal Literate Note) #+ID: skill-org-delivery #+STARTUP: content #+FILETAGS: :delivery:actuator:external:psf: * Overview The *Org-Native Delivery Agent* is the primary outbound actuator for external messaging. It uses the "Inbox-as-a-Queue" pattern, enqueuing structured Org-mode headlines for external bridges (Signal, Telegram, etc.). * Phase A: Demand (PRD) :PROPERTIES: :STATUS: FROZEN :END: ** 1. Purpose Define the interfaces for asynchronous external message enqueuing. ** 2. User Needs - *Asynchronous Dispatch:* Persistence via `delivery.org` file. - *Multi-Channel Support:* Routing to Signal, Telegram, Discord. - *Structured Provenance:* Timestamped entries with recipient IDs. ** 3. Success Criteria *** TODO Queue Appending Verification *** TODO Channel-specific ID Resolution *** TODO Org Timestamp Formatting Accuracy * Phase B: Blueprint (PROTOCOL) :PROPERTIES: :STATUS: SIGNED :END: ** 1. Architectural Intent Interfaces for external communication. Source of truth is the `delivery.org` queue and system credentials. ** 2. Semantic Interfaces #+begin_src lisp (defun execute-org-delivery (action) "Enqueues a message in delivery.org.") (defun format-universal-time-org (ut) "Formats time for Org-mode properties.") #+end_src * Phase D: Build (Implementation) ** Queue Actuation #+begin_src lisp :tangle projects/org-skill-org-delivery/src/delivery-logic.lisp (defun execute-org-delivery (action) (let* ((payload (getf action :payload)) (system-dir (or (uiop:getenv "SYSTEM_DIR") "system/")) (delivery-file (format nil "~adelivery.org" system-dir))) ;; Logic to format and append to file (format nil "Enqueued message to ~a" delivery-file))) #+end_src * Registration #+begin_src lisp (org-agent:register-actuator :delivery #'execute-org-delivery) (defskill :skill-org-delivery :priority 100 :trigger (lambda (context) nil) :neuro (lambda (context) nil) :symbolic (lambda (action context) action)) #+end_src