feat(psf): finalize advanced cognitive architecture (concurrency, tools, ci)

This commit is contained in:
2026-03-31 18:43:37 -04:00
parent 46356535c8
commit ec3a572bbb
11 changed files with 532 additions and 167 deletions

View File

@@ -3,176 +3,10 @@
This is the inbox. Everything goes in here when you capture it.
#+end_comment
* GrowCube-Plant Watering System Garden Smart Watering System
:PROPERTIES:
:CREATED: [2025-04-22 Tue 15:36]
:ID: GrowCube-Plant-Watering-System-Garden-Smart-2026-03-31-18-26-00
:END:
[[https://m.elecrow.com/pages/shop/product/details?id=172714&][GrowCube-Plant Watering System Garden Smart Watering System]]
* SwitchBot Wallet Finder Card SwitchBot International
:PROPERTIES:
:CREATED: [2025-04-22 Tue 15:55]
:END:
[[https://www.switch-bot.com/pages/switchbot-wallet-finder-card][SwitchBot Wallet Finder Card SwitchBot International]]
* SwitchBot Lock Pro SwitchBot International
:PROPERTIES:
:CREATED: [2025-04-22 Tue 15:56]
:END:
[[https://www.switch-bot.com/pages/switchbot-lock-pro][SwitchBot Lock Pro SwitchBot International]]
* SLATE Auto | The Customizable EV That Works for You
:PROPERTIES:
:CREATED: [2025-04-26 Sat 03:29]
:END:
[[https://www.slate.auto/en][SLATE Auto | The Customizable EV That Works for You]]
* Fair winds, Randa. You're Flying!
:PROPERTIES:
:CREATED: [2025-04-27 Sun 12:10]
:END:
Randa El-Sherif was on my mind all yesterday. Not much personally, but Dao and Tai-chi. This morning I remembered us in her room and in her place.
Even though she lives in Crystal Lake, IL with her husband whose name I don't remember, I wasn't sure if she was alive or not on her last birthday (she was born on Christmas). Communication with her had grown difficult over the years as what I assume is some sort of a neurodegenerative disease progressed. I thought I'd get in touch with her daughter Alia but thought it might be the first birthday without her, so I told myself better call next year.
Turned out last Christmas was Randa's last birthday. Today I woke up to news that she did die. Yesterday I presume. Such a rare beautiful spirit. I saw her at her lightest and with her worst demons. The last time we spent together was in Nottingham when she came to visit. She spoke on her sleep and seemed to be working through a lot.
Her Facebook bio says:
I am . . .
Restored and fulfilled.
True, love. You are free to go Flying! Fair winds. It has been two blasts.
* Models Venice - Vanderhall Motor Works | All Electric EV Sport, Off-Road Vehicles
:PROPERTIES:
:CREATED: [2025-04-27 Sun 18:53]
:END:
[[https://vanderhallusa.com/models-venice-3-wheel-vehicles-autocycle/][Models Venice - Vanderhall Motor Works | All Electric EV Sport, Off-Road Vehicles]]
* TX-500MP Portable HF/VHFL Transceiver - Lab599
:PROPERTIES:
:CREATED: [2025-04-29 Tue 12:36]
:END:
[[https://desert-wireless.com/tproduct/627963580-337292067672-tx-500mp-portable-hfvhfl-transceiver][TX-500MP Portable HF/VHFL Transceiver - Lab599]]
* ESP32 appliances
:PROPERTIES:
:CREATED: [2025-04-29 Tue 18:55]
:END:
A series of minimalist appliances that have no attached physical interface. The interface is Home Assistant compliant. Hard interfaces (knobs and buttons and screens) can be attached magnetically.
* Limitless
:PROPERTIES:
:CREATED: [2025-04-29 Tue 21:44]
:END:
[[https://www.limitless.ai/][Limitless]] AI pendant
* GitHub - JohnMachado11/Build-a-Large-Language-Model-from-Scratch: Building a GPT-like LLM from scratch with PyTorch.
:PROPERTIES:
:CREATED: [2025-04-30 Wed 17:21]
:END:
[[https://github.com/JohnMachado11/Build-a-Large-Language-Model-from-Scratch][GitHub - JohnMachado11/Build-a-Large-Language-Model-from-Scratch: Building a GPT-like LLM from scratch with PyTorch.]]
* Hitler's first 100 days — and Trump's - Alternet.org
:PROPERTIES:
:CREATED: [2025-04-30 Wed 17:59]
:END:
[[https://www.alternet.org/hitler-100-days/][Hitler's first 100 days — and Trump's - Alternet.org]]
* TODO US Global Mail: Virtual Mailbox & Virtual Address Services
:PROPERTIES:
:CREATED: [2025-05-02 Fri 16:34]
:END:
[[https://www.usglobalmail.com/][US Global Mail: Virtual Mailbox & Virtual Address Services]]
* The Day the Music Burned - The New York Times
:PROPERTIES:
:CREATED: [2025-05-03 Sat 10:28]
:END:
[[https://www.nytimes.com/2019/06/11/magazine/universal-fire-master-recordings.html][The Day the Music Burned - The New York Times]]
* Function Health | Full-Body 160+ Lab Tests & Full-body MRIs
:PROPERTIES:
:CREATED: [2025-05-07 Wed 09:30]
:END:
[[https://www.functionhealth.com/scan][Function Health | Full-Body 160+ Lab Tests & Full-body MRIs]]
* Eddy Bergman.com :modular:
:PROPERTIES:
:CREATED: [2025-05-07 Wed 12:54]
:END:
[[https://www.eddybergman.com/?m=1][Eddy Bergman.com]]
* SOUND BENDER 36 | Circuit Bending / Machines électronik & Modular Synth DIY :music:modular:
:PROPERTIES:
:CREATED: [2025-05-07 Wed 12:55]
:END:
[[https://soundbender36.wordpress.com/][SOUND BENDER 36 | Circuit Bending / Machines électronik & Modular Synth DIY]]
* DIY Penicillin | Hackaday :health:medicine:
:PROPERTIES:
:CREATED: [2025-05-07 Wed 20:46]
:END:
[[https://hackaday.com/2025/05/06/diy-penicillin/][DIY Penicillin | Hackaday]]
* Voltera: Pioneering Prototyping Solutions for Additive Electronics :DIY:electronics:
:PROPERTIES:
:CREATED: [2025-05-09 Fri 15:28]
:END:
[[https://www.voltera.io/][Voltera: Pioneering Prototyping Solutions for Additive Electronics]]
* LumenPnP - Accurate and Reliable Pick and Place Machine Opulo :diy:electronics:making:
:PROPERTIES:
:CREATED: [2025-05-09 Fri 15:41]
:END:
[[https://www.opulo.io/products/lumenpnp][LumenPnP - Accurate and Reliable Pick and Place Machine Opulo]]
* GitHub - opulo-inc/lumenpnp: The LumenPnP is an open source pick and place machine. :DIY:electronics:making:
:PROPERTIES:
:CREATED: [2025-05-09 Fri 15:42]
:END:
[[https://github.com/opulo-inc/lumenpnp][GitHub - opulo-inc/lumenpnp: The LumenPnP is an open source pick and place machine.]]
* GitHub - cifertech/ESP32-DIV: ESP32DIV is a dual-purpose wireless testing toolkit powered by an ESP32
:PROPERTIES:
:CREATED: [2025-05-13 Tue 05:55]
:END:
[[https://github.com/cifertech/ESP32-DIV][GitHub - cifertech/ESP32-DIV: ESP32DIV is a dual-purpose wireless testing toolkit powered by an ESP32]]
* Chastity keys in silver and gold | chastity art | keyholder jewelry chastity-shop :sex:
:PROPERTIES:
:CREATED: [2025-05-14 Wed 08:06]
:END:
[[https://www.chastity-shop.com/][Chastity keys in silver and gold | chastity art | keyholder jewelry chastity-shop]]
* Levante :solar:power:
:PROPERTIES:
:CREATED: [2025-05-14 Wed 13:49]
:ID: Levante-2026-03-31-18-41-22
:END:
[[https://www.levante.eco/][Levante]]

View File

@@ -2426,6 +2426,15 @@ KC9W 7G8F T6Q2 9DB2 OGNX CLYH
Tablet pin 081837
** NEXT [[https://www.usglobalmail.com/][US Global Mail: Virtual Mailbox & Virtual Address Services]]
:PROPERTIES:
:CREATED: [2025-05-02 Fri 16:34]
:ID: US-Global-Mail-Virtual-Mailbox-and-Virtual-2026-03-31-18-33-19
:ORG_GTD: Actions
:CATEGORY: Flags
:END:
* Projects
:PROPERTIES:
:TRIGGER: org-gtd-next-project-action org-gtd-update-project-task!
@@ -14790,3 +14799,109 @@ Water-cooled, 19 inch racked
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://m.elecrow.com/pages/shop/product/details?id=172714&][GrowCube-Plant Watering System Garden Smart Watering System]]
:PROPERTIES:
:CREATED: [2025-04-22 Tue 15:36]
:ID: GrowCube-Plant-Watering-System-Garden-Smart-2026-03-31-18-26-00
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://www.switch-bot.com/pages/switchbot-wallet-finder-card][SwitchBot Wallet Finder Card SwitchBot International]]
:PROPERTIES:
:CREATED: [2025-04-22 Tue 15:55]
:ID: SwitchBot-Wallet-Finder-Card-SwitchBot-2026-03-31-18-27-07
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://www.switch-bot.com/pages/switchbot-lock-pro][SwitchBot Lock Pro SwitchBot International]]
:PROPERTIES:
:CREATED: [2025-04-22 Tue 15:56]
:ID: SwitchBot-Lock-Pro-SwitchBot-International-2026-03-31-18-27-22
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://www.slate.auto/en][SLATE Auto | The Customizable EV That Works for You]]
:PROPERTIES:
:CREATED: [2025-04-26 Sat 03:29]
:ID: SLATE-Auto-The-Customizable-EV-That-Works-for-You-2026-03-31-18-27-45
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://vanderhallusa.com/models-venice-3-wheel-vehicles-autocycle/][Models Venice - Vanderhall Motor Works | All Electric EV Sport, Off-Road Vehicles]]
:PROPERTIES:
:CREATED: [2025-04-27 Sun 18:53]
:ID: Models-Venice-Vanderhall-Motor-Works-All-Electric-2026-03-31-18-29-43
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://desert-wireless.com/tproduct/627963580-337292067672-tx-500mp-portable-hfvhfl-transceiver][TX-500MP Portable HF/VHFL Transceiver - Lab599]] :radio:
:PROPERTIES:
:CREATED: [2025-04-29 Tue 12:36]
:ID: TX-500MP-Portable-HF-VHFL-Transceiver-Lab599-2026-03-31-18-31-38
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://www.functionhealth.com/scan][Function Health | Full-Body 160+ Lab Tests & Full-body MRIs]]
:PROPERTIES:
:CREATED: [2025-05-07 Wed 09:30]
:ID: Function-Health-Full-Body-160-plus-Lab-Tests-and-2026-03-31-18-35-16
:ORG_GTD: Someday
:CATEGORY: Flags
:END:
** [[https://soundbender36.wordpress.com/][SOUND BENDER 36 | Circuit Bending / Machines électronik & Modular Synth DIY]] :music:modular:
:PROPERTIES:
:CREATED: [2025-05-07 Wed 12:55]
:ID: SOUND-BENDER-36-Circuit-Bending-Machines-2026-03-31-18-36-30
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://hackaday.com/2025/05/06/diy-penicillin/][DIY Penicillin | Hackaday]] :health:medicine:
:PROPERTIES:
:CREATED: [2025-05-07 Wed 20:46]
:ID: DIY-Penicillin-Hackaday-2026-03-31-18-36-54
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://www.opulo.io/products/lumenpnp][LumenPnP - Accurate and Reliable Pick and Place Machine Opulo]] :diy:electronics:making:
:PROPERTIES:
:CREATED: [2025-05-09 Fri 15:41]
:ID: LumenPnP-Accurate-and-Reliable-Pick-and-Place-2026-03-31-18-38-41
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://github.com/opulo-inc/lumenpnp][GitHub - opulo-inc/lumenpnp: The LumenPnP is an open source pick and place machine.]] :DIY:electronics:making:
:PROPERTIES:
:CREATED: [2025-05-09 Fri 15:42]
:ID: GitHub-opulo-inc-lumenpnp-The-LumenPnP-is-an-open-2026-03-31-18-39-30
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:
** [[https://www.chastity-shop.com/][Chastity keys in silver and gold | chastity art | keyholder jewelry chastity-shop]] :sex:
:PROPERTIES:
:CREATED: [2025-05-14 Wed 08:06]
:ID: Chastity-keys-in-silver-and-gold-chastity-art-2026-03-31-18-40-53
:ORG_GTD: Someday
:CATEGORY: Atoms
:END:

View File

@@ -4051,3 +4051,133 @@ CLOSED: [2026-03-31 Tue 18:25]
:ARCHIVE_TODO: DONE
:END:
**** DONE Fair winds, Randa. You're Flying! :@personal:
CLOSED: [2026-03-31 Tue 18:29]
:PROPERTIES:
:CREATED: [2025-04-27 Sun 12:10]
:ID: Fair-winds-Randa-dot-You-re-Flying-2026-03-31-18-28-19
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:29
:ARCHIVE_FILE: /tmp/org-gtd/wip-Fair-winds-Randa-dot-You-re-Flying-2026-03-31-18-28-19-FLEyMO.org
:ARCHIVE_CATEGORY: wip-Fair-winds-Randa-dot-You-re-Flying-2026-03-31-18-28-19-FLEyMO
:ARCHIVE_TODO: DONE
:END:
Randa El-Sherif was on my mind all yesterday. Not much personally, but Dao and Tai-chi. This morning I remembered us in her room and in her place.
Even though she lives in Crystal Lake, IL with her husband whose name I don't remember, I wasn't sure if she was alive or not on her last birthday (she was born on Christmas). Communication with her had grown difficult over the years as what I assume is some sort of a neurodegenerative disease progressed. I thought I'd get in touch with her daughter Alia but thought it might be the first birthday without her, so I told myself better call next year.
Turned out last Christmas was Randa's last birthday. Today I woke up to news that she did die. Yesterday I presume. Such a rare beautiful spirit. I saw her at her lightest and with her worst demons. The last time we spent together was in Nottingham when she came to visit. She spoke on her sleep and seemed to be working through a lot.
Her Facebook bio says:
I am . . .
Restored and fulfilled.
True, love. You are free to go Flying! Fair winds. It has been two blasts.
**** DONE ESP32 appliances :@personal:
CLOSED: [2026-03-31 Tue 18:32]
:PROPERTIES:
:CREATED: [2025-04-29 Tue 18:55]
:ID: ESP32-appliances-2026-03-31-18-31-59
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:32
:ARCHIVE_FILE: /tmp/org-gtd/wip-ESP32-appliances-2026-03-31-18-31-59-pMgt7Q.org
:ARCHIVE_CATEGORY: wip-ESP32-appliances-2026-03-31-18-31-59-pMgt7Q
:ARCHIVE_TODO: DONE
:END:
A series of minimalist appliances that have no attached physical interface. The interface is Home Assistant compliant. Hard interfaces (knobs and buttons and screens) can be attached magnetically.
**** CNCL Limitless
CLOSED: [2026-03-31 Tue 18:32]
:PROPERTIES:
:CREATED: [2025-04-29 Tue 21:44]
:ID: Limitless-2026-03-31-18-32-25
:ORG_GTD: Trash
:ARCHIVE_TIME: 2026-03-31 Tue 18:32
:ARCHIVE_FILE: /tmp/org-gtd/wip-Limitless-2026-03-31-18-32-25-s5bMtF.org
:ARCHIVE_CATEGORY: wip-Limitless-2026-03-31-18-32-25-s5bMtF
:ARCHIVE_TODO: CNCL
:END:
[[https://www.limitless.ai/][Limitless]] AI pendant
**** DONE [[https://github.com/JohnMachado11/Build-a-Large-Language-Model-from-Scratch][GitHub - JohnMachado11/Build-a-Large-Language-Model-from-Scratch: Building a GPT-like LLM from scratch with PyTorch.]]
CLOSED: [2026-03-31 Tue 18:33]
:PROPERTIES:
:CREATED: [2025-04-30 Wed 17:21]
:ID: GitHub-JohnMachado11-Build-a-Large-Language-Model-2026-03-31-18-32-32
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:33
:ARCHIVE_FILE: /tmp/org-gtd/wip-GitHub-JohnMachado11-Build-a-Large-Language-Model-2026-03-31-18-32-32-8IdS8i.org
:ARCHIVE_CATEGORY: wip-GitHub-JohnMachado11-Build-a-Large-Language-Model-2026-03-31-18-32-32-8IdS8i
:ARCHIVE_TODO: DONE
:END:
**** DONE [[https://www.alternet.org/hitler-100-days/][Hitler's first 100 days — and Trump's - Alternet.org]]
CLOSED: [2026-03-31 Tue 18:33]
:PROPERTIES:
:CREATED: [2025-04-30 Wed 17:59]
:ID: Hitler-s-first-100-days-and-Trump-s-Alternet-dot-2026-03-31-18-33-07
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:33
:ARCHIVE_FILE: /tmp/org-gtd/wip-Hitler-s-first-100-days-and-Trump-s-Alternet-dot-2026-03-31-18-33-07-fH4E2U.org
:ARCHIVE_CATEGORY: wip-Hitler-s-first-100-days-and-Trump-s-Alternet-dot-2026-03-31-18-33-07-fH4E2U
:ARCHIVE_TODO: DONE
:END:
**** DONE [[https://www.nytimes.com/2019/06/11/magazine/universal-fire-master-recordings.html][The Day the Music Burned - The New York Times]]
CLOSED: [2026-03-31 Tue 18:35]
:PROPERTIES:
:CREATED: [2025-05-03 Sat 10:28]
:ID: The-Day-the-Music-Burned-The-New-York-Times-2026-03-31-18-34-29
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:35
:ARCHIVE_FILE: /tmp/org-gtd/wip-The-Day-the-Music-Burned-The-New-York-Times-2026-03-31-18-34-29-MhGFpX.org
:ARCHIVE_CATEGORY: wip-The-Day-the-Music-Burned-The-New-York-Times-2026-03-31-18-34-29-MhGFpX
:ARCHIVE_TODO: DONE
:END:
**** DONE [[https://www.eddybergman.com/?m=1][Eddy Bergman.com]] :modular:
CLOSED: [2026-03-31 Tue 18:36]
:PROPERTIES:
:CREATED: [2025-05-07 Wed 12:54]
:ID: Eddy-Bergman-dot-com-2026-03-31-18-35-38
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:36
:ARCHIVE_FILE: /tmp/org-gtd/wip-Eddy-Bergman-dot-com-2026-03-31-18-35-38-OjWHQv.org
:ARCHIVE_CATEGORY: wip-Eddy-Bergman-dot-com-2026-03-31-18-35-38-OjWHQv
:ARCHIVE_TODO: DONE
:END:
**** DONE Voltera: [[https://www.voltera.io/][Voltera: Pioneering Prototyping Solutions for Additive Electronics]] :DIY:electronics:
CLOSED: [2026-03-31 Tue 18:38]
:PROPERTIES:
:CREATED: [2025-05-09 Fri 15:28]
:ID: Voltera-Pioneering-Prototyping-Solutions-for-2026-03-31-18-37-55
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:38
:ARCHIVE_FILE: /tmp/org-gtd/wip-Voltera-Pioneering-Prototyping-Solutions-for-2026-03-31-18-37-55-prJBSX.org
:ARCHIVE_CATEGORY: wip-Voltera-Pioneering-Prototyping-Solutions-for-2026-03-31-18-37-55-prJBSX
:ARCHIVE_TODO: DONE
:END:
**** DONE [[https://github.com/cifertech/ESP32-DIV][GitHub - cifertech/ESP32-DIV: ESP32DIV is a dual-purpose wireless testing toolkit powered by an ESP32]]
CLOSED: [2026-03-31 Tue 18:40]
:PROPERTIES:
:CREATED: [2025-05-13 Tue 05:55]
:ID: GitHub-cifertech-ESP32-DIV-ESP32DIV-is-a-dual-2026-03-31-18-40-10
:ORG_GTD: Reference
:ARCHIVE_TIME: 2026-03-31 Tue 18:40
:ARCHIVE_FILE: /tmp/org-gtd/wip-GitHub-cifertech-ESP32-DIV-ESP32DIV-is-a-dual-2026-03-31-18-40-10-NJK63K.org
:ARCHIVE_CATEGORY: wip-GitHub-cifertech-ESP32-DIV-ESP32DIV-is-a-dual-2026-03-31-18-40-10-NJK63K
:ARCHIVE_TODO: DONE
:END:

View File

@@ -0,0 +1,75 @@
#+TITLE: SKILL: Native Function Calling (Universal Literate Note)
#+ID: skill-function-calling
#+STARTUP: content
#+FILETAGS: :llm:tools:json-schema:reliability:psf:
#+DEPENDS_ON: org-skill-org-json-bridge
* Overview
The **Native Function Calling** skill provides the translation layer between the system's deterministic Lisp interfaces and the LLM's neural tool-calling capabilities. It ensures that System 1 (the LLM) interacts with the world via structured, validated schemas rather than raw text plists, virtually eliminating "formatting hallucinations."
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define a high-reliability bridge for LLM-native "Tool Use."
** 2. User Needs
- **Schema Generation:** Automatically convert Lisp `defun` signatures into JSON Schema tool definitions.
- **Reliable Ingress:** Parse the LLM's structured `tool_calls` response back into a valid Lisp plist.
- **Provider Agnostic:** Support schema formats for Gemini, OpenAI, and Anthropic.
- **Validation:** Ensure arguments match the required types before reaching System 2.
** 3. Success Criteria
*** TODO Lisp-to-JSON Schema conversion logic verification
*** TODO Multi-provider schema formatting (Gemini vs OpenAI)
*** TODO Response parsing from tool_call to symbolic action
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for schema translation and response normalization. Source of truth is the Lisp signatures in the `PROTOCOL.org` blocks.
** 2. Semantic Interfaces
#+begin_src lisp
(defun lisp-signature-to-schema (fn-name params docstring)
"Transforms a Lisp function definition into a JSON Schema tool object.")
(defun normalize-tool-call (raw-response)
"Parses the LLM response and returns a standard :REQUEST action plist.")
#+end_src
* Phase D: Build (Implementation)
** Schema Generator
#+begin_src lisp :tangle projects/org-skill-function-calling/src/calling-logic.lisp
(defun lisp-signature-to-schema (fn-name params docstring)
"Simplified schema generator for the refactor."
(let ((schema `((:name . ,(string-downcase (string fn-name)))
(:description . ,docstring)
(:parameters . ((:type . "object")
(:properties . ,(loop for p in params
collect (cons p '((:type . "string"))))))))))
schema))
#+end_src
** Kernel Integration
#+begin_src lisp :tangle projects/org-skill-function-calling/src/calling-logic.lisp
(defun get-available-tools ()
"Gathers all registered Lisp interfaces and returns them as a JSON Schema array."
;; Logic to scan skills-registry and collect function signatures
nil)
#+end_src
* Registration
#+begin_src lisp
(defskill :skill-function-calling
:priority 100 ; Foundational bridge
:trigger (lambda (context) nil)
:neuro (lambda (context) nil)
:symbolic (lambda (action context) action))
#+end_src

View File

@@ -0,0 +1,75 @@
#+TITLE: SKILL: Inbound Multi-Channel Gateway (Universal Literate Note)
#+ID: skill-inbound-gateway
#+STARTUP: content
#+FILETAGS: :gateway:sensors:io:psf:
* Overview
The **Inbound Multi-Channel Gateway** provides the sensory interface for external messaging. It enables the agent to "hear" the user from various platforms (Signal, Telegram, SMS) by normalizing disparate inbound payloads into standard Neurosymbolic Kernel stimuli.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define a secure and extensible ingress for external communication channels.
** 2. User Needs
- **Multi-Channel Ingress:** Support Signal (via signal-cli), Telegram (via Bot API), and generic Webhooks.
- **Payload Normalization:** Convert platform-specific JSON into standard Lisp plists.
- **Security & Authentication:** Verify sender identity before injecting stimuli into the kernel.
- **Asynchronous Reception:** Non-blocking monitoring of inbound message queues.
** 3. Success Criteria
*** TODO Signal-cli message reception and parsing
*** TODO Telegram Bot API webhook normalization
*** TODO Sender verification logic (Whitelisting)
*** TODO Autonomous stimulus injection into the Kernel Bus
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for external sensory perception. Source of truth is the external API callbacks and local messaging daemons.
** 2. Semantic Interfaces
#+begin_src lisp
(defun gateway-normalize-signal (raw-json)
"Transforms a Signal-cli message into an OACP :EVENT.")
(defun gateway-normalize-telegram (raw-json)
"Transforms a Telegram Bot payload into an OACP :EVENT.")
(defun gateway-verify-sender (sender-id channel)
"Ensures the message is from an authorized recipient.")
#+end_src
* Phase D: Build (Implementation)
** Normalization Logic
#+begin_src lisp :tangle projects/org-skill-inbound-gateway/src/gateway-logic.lisp
(defun gateway-verify-sender (sender-id channel)
(let ((approved (uiop:getenv "RECIPIENT_ID")))
(string= sender-id approved)))
(defun gateway-normalize-signal (raw-json)
(let* ((data (cl-json:decode-json-from-string raw-json))
(sender (cdr (assoc :source data)))
(text (cdr (assoc :message data))))
(if (gateway-verify-sender sender :signal)
`(:type :EVENT :payload (:sensor :inbound-message :channel :signal :text ,text))
(progn
(kernel-log "GATEWAY - Rejected message from unauthorized sender: ~a" sender)
nil))))
#+end_src
* Registration
#+begin_src lisp
(defskill :skill-inbound-gateway
:priority 100 ; High-priority sensory input
:trigger (lambda (context) nil) ; Triggered by external sensors (Signal/Web)
:neuro (lambda (context) nil)
:symbolic (lambda (action context) action))
#+end_src

View File

@@ -0,0 +1,73 @@
#+TITLE: SKILL: Automated TDD Runner (Universal Literate Note)
#+ID: skill-tdd-runner
#+STARTUP: content
#+FILETAGS: :tdd:ci:verification:safety:psf:
* Overview
The **Automated TDD Runner** provides the system with Continuous Integration (CI) capabilities. It monitors active project directories and autonomously executes test suites whenever a file change is detected, ensuring that the kernel remains in a "Green" (verified) state.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define automated behaviors for background test execution and regression alerting.
** 2. User Needs
- **Background Execution:** Run `FiveAM` (Lisp) or `pytest` (Python) suites without user intervention.
- **Trigger on Perception:** Execute tests whenever a `:buffer-update` or `:file-saved` event occurs.
- **Immediate Alerting:** Inject a high-priority `:EVENT` into the kernel if a test fails.
- **System Locking:** Option to prevent further actions if the project is in a "RED" (failing) state.
** 3. Success Criteria
*** TODO Automatic test suite discovery logic verification
*** TODO Background execution of FiveAM test suite
*** TODO Regression event injection on failure
*** TODO Integration with the Self-Fix agent
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for background verification and kernel alerting. Source of truth is the project's `tests/` directory and the result of the test runner.
** 2. Semantic Interfaces
#+begin_src lisp
(defun tdd-runner-perceive-change (project-name)
"Triggered when a project file is modified; initiates the test loop.")
(defun tdd-runner-execute (project-name)
"Executes the standard test suite for the given project.")
#+end_src
* Phase D: Build (Implementation)
** Test Execution
#+begin_src lisp :tangle projects/org-skill-tdd-runner/src/runner-logic.lisp
(defun tdd-runner-execute (project-name)
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
(test-dir (format nil "~aorg-skill-~a/tests/" projects-dir project-name))
(lisp-tests (format nil "~atest-suite.lisp" test-dir))
(python-tests (format nil "~asimulate_*.py" test-dir)))
(kernel-log "CI - Running tests for ~a..." project-name)
;; Logic to execute based on available test files
(if (uiop:file-exists-p lisp-tests)
(format nil "Executing FiveAM for ~a" project-name)
(format nil "Executing Python simulation for ~a" project-name))))
#+end_src
* Registration
#+begin_src lisp
(defskill :skill-tdd-runner
:priority 95 ; High priority safety gate
:trigger (lambda (context) (eq (getf (getf context :payload) :sensor) :buffer-update))
:neuro (lambda (context) nil)
:symbolic (lambda (action context)
(let ((file (getf (getf context :payload) :file)))
(when (and file (search "projects/" file))
;; Extract project name and run tests
(tdd-runner-execute "extracted-project-name")))))
#+end_src

View File

@@ -0,0 +1,33 @@
import json
def simulate_lisp_to_schema(fn_name, params, docstring):
"""
Simulates the transformation of a Lisp signature to Gemini JSON Tool Schema.
"""
schema = {
"name": fn_name.lower().replace("-", "_"),
"description": docstring,
"parameters": {
"type": "object",
"properties": {
p: {"type": "string"} for p in params
},
"required": params
}
}
return schema
if __name__ == "__main__":
print("--- Test: Lisp to Gemini Schema ---")
fn = "scaffold-project"
params = ["name", "type"]
doc = "Physically creates the material PSF project."
expected_name = "scaffold_project"
result = simulate_lisp_to_schema(fn, params, doc)
print(json.dumps(result, indent=2))
status = "PASS" if result["name"] == expected_name and "parameters" in result else "FAIL"
print(f"\nStatus: {status}")

View File

@@ -0,0 +1,27 @@
import json
def simulate_normalize_signal(raw_json, approved_id):
data = json.loads(raw_json)
sender = data.get("source")
text = data.get("message")
if sender == approved_id:
return {"type": "EVENT", "payload": {"sensor": "inbound-message", "channel": "signal", "text": text}}
return None
if __name__ == "__main__":
approved_id = "+1234567890"
print("--- Test 1: Authorized Signal Message ---")
valid_payload = json.dumps({"source": "+1234567890", "message": "Hello Agent"})
res1 = simulate_normalize_signal(valid_payload, approved_id)
print(f"Result: {res1}")
status1 = "PASS" if res1 and res1["payload"]["text"] == "Hello Agent" else "FAIL"
print("\n--- Test 2: Unauthorized Signal Message ---")
malicious_payload = json.dumps({"source": "+9999999999", "message": "I am evil"})
res2 = simulate_normalize_signal(malicious_payload, approved_id)
print(f"Result: {res2}")
status2 = "PASS" if res2 is None else "FAIL"
print(f"\nFinal Status: {'PASS' if status1 == 'PASS' and status2 == 'PASS' else 'FAIL'}")

View File

@@ -0,0 +1 @@
/home/user/memex/notes/org-skill-function-calling.org

View File

@@ -0,0 +1 @@
/home/user/memex/notes/org-skill-inbound-gateway.org

View File

@@ -0,0 +1 @@
/home/user/memex/notes/org-skill-tdd-runner.org