From df101aa61057881c4e56de4021aeb601b9bd319b Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Thu, 9 Apr 2026 16:33:09 -0400 Subject: [PATCH] chore: cleanup notes and sync contrib submodule state --- notes/org-skill-loop-automator.org.disabled | 98 ------------------- ...org-skill-performance-auditor.org.disabled | 78 --------------- 2 files changed, 176 deletions(-) delete mode 100644 notes/org-skill-loop-automator.org.disabled delete mode 100644 notes/org-skill-performance-auditor.org.disabled diff --git a/notes/org-skill-loop-automator.org.disabled b/notes/org-skill-loop-automator.org.disabled deleted file mode 100644 index 404bb29..0000000 --- a/notes/org-skill-loop-automator.org.disabled +++ /dev/null @@ -1,98 +0,0 @@ -#+TITLE: SKILL: PSF Loop Automator (Universal Literate Note) -#+ID: skill-loop-automator -#+STARTUP: content -#+FILETAGS: :psf:automation:meta-cognitive:orchestration: - -* Overview -The *PSF Loop Automator* is the meta-cognitive orchestrator of the Personal Software Foundry. It monitors the state of all Master Notes and autonomously triggers the transition between PSF phases (e.g., waking the Architect when a PRD is frozen), ensuring the Consensus Loop maintains high momentum without manual intervention. - -* Phase A: Demand (PRD) -:PROPERTIES: -:STATUS: FROZEN -:END: - -** 1. Purpose -Define automated state transitions and role-triggering for the PSF Consensus Loop. - -** 2. User Needs -- *State Surveillance:* Monitor `notes/org-skill-*.org` for `#+STATUS:` changes. -- *Proactive Role Triggering:* - - If `PRD` is `FROZEN` -> Trigger *Architect* (Phase B). - - If `PROTOCOL` is `SIGNED` -> Trigger *Technical Analyst* (Phase C). - - If `TDD Suite` is `RED` -> Trigger *Coder* (Phase D). -- *GTD Synchronization:* Automatically update the `:PSF-STATE:` property in `gtd.org` during transitions. - -** 3. Success Criteria -*** TODO Successful detection of #+STATUS: FROZEN in a Master Note -*** TODO Autonomous stimulus injection for the Architect skill -*** TODO Verified update of :PSF-STATE: in gtd.org - -* Phase B: Blueprint (PROTOCOL) -:PROPERTIES: -:STATUS: SIGNED -:END: - -** 1. Architectural Intent -Interfaces for cross-note state perception and kernel-level stimulus injection. Source of truth is the Master Note collection and the global skill graph. - -** 2. Semantic Interfaces -#+begin_src lisp -(defun loop-automator-perceive-phase (note-path) - "Determines the current PSF phase of a Master Note based on status and sections.") - -(defun loop-automator-orchestrate () - "Scans all notes and dispatches necessary stimuli to the kernel.") -#+end_src - -* Phase D: Build (Implementation) - -** State Perception -#+begin_src lisp :tangle projects/org-skill-loop-automator/src/automator-logic.lisp -(defun loop-automator-perceive-phase (note-path) - (let ((content (uiop:read-file-string note-path))) - (cond - ((and (search ":STATUS: FROZEN" content) - (not (search "* Phase B: Blueprint (PROTOCOL)" content))) - :trigger-architect) - ((and (search ":STATUS: SIGNED" content) - (not (search "* Phase D: Build" content))) - :trigger-analyst) - (t :stable)))) -#+end_src - -** Orchestration Loop -#+begin_src lisp :tangle projects/org-skill-loop-automator/src/automator-logic.lisp -(defun loop-automator-sync-gtd (note-path new-state) - "Updates the :PSF-STATE: property in gtd.org for the project linked to NOTE-PATH." - (let* ((filename (pathname-name note-path)) - (project-id (format nil "proj-~a" (subseq filename 10))) ; e.g. proj-memex - (gtd-file (or (uiop:getenv "GTD_FILE") "gtd.org"))) - (kernel-log "GTD SYNC - Updating ~a to state ~a" project-id new-state) - ;; Dispatches an actuator request to Emacs to perform the surgical property update - (org-agent:inject-stimulus - `(:type :REQUEST :target :emacs - :payload (:action :refactor-subtree - :target-id ,project-id - :properties (("PSF-STATE" . ,new-state))))))) - -(defun loop-automator-orchestrate () - (let ((notes-dir (or (uiop:getenv "MEMEX_NOTES") "notes/"))) - (dolist (file (uiop:directory-files notes-dir "org-skill-*.org")) - (let ((intent (loop-automator-perceive-phase file))) - (case intent - (:trigger-architect - (loop-automator-sync-gtd file "B: BLUEPRINT") - (org-agent:inject-stimulus `(:type :EVENT :payload (:sensor :foundry-event :action :blueprint :note ,file)))) - (:trigger-analyst - (loop-automator-sync-gtd file "C: SUCCESS") - (org-agent:inject-stimulus `(:type :EVENT :payload (:sensor :foundry-event :action :tdd :note ,file))))))))) -#+end_src - -* Registration -#+begin_src lisp -(defskill :skill-loop-automator - :priority 95 ; High priority meta-cognition - :trigger (lambda (context) (eq (getf (getf context :payload) :sensor) :heartbeat)) - :neuro (lambda (context) nil) - :symbolic (lambda (action context) (loop-automator-orchestrate))) -#+end_src diff --git a/notes/org-skill-performance-auditor.org.disabled b/notes/org-skill-performance-auditor.org.disabled deleted file mode 100644 index 626a9a7..0000000 --- a/notes/org-skill-performance-auditor.org.disabled +++ /dev/null @@ -1,78 +0,0 @@ -#+TITLE: SKILL: Autonomous Performance Auditor (Universal Literate Note) -#+ID: skill-performance-auditor -#+STARTUP: content -#+FILETAGS: :telemetry:audit:self-improvement:psf: - -* Overview -The *Autonomous Performance Auditor* is the system's "Quality Control" agent. It monitors the internal `*skill-telemetry*` registry to identify skills with high failure rates or excessive latency. When a performance threshold is breached, it autonomously triggers the *Scribe-RCA* role to analyze the failure and record it in the Institutional Memory. - -* Phase A: Demand (PRD) -:PROPERTIES: -:STATUS: FROZEN -:END: - -** 1. Purpose -Define automated behaviors for system-wide skill performance monitoring and failure alerting. - -** 2. User Needs -- *Continuous Monitoring:* Analyze skill metrics (executions, failures, latency) on every heartbeat. -- *Threshold Alerts:* Detect skills with failure rates exceeding a defined limit (e.g., >20%). -- *Loop Closure:* Autonomously trigger Root Cause Analysis (RCA) for offending skills. -- *Transparency:* Log audit results to the kernel history for user visibility. - -** 3. Success Criteria -*** TODO Failure rate calculation logic verification -*** TODO Autonomous stimulus injection for Scribe-RCA skill -*** TODO Verified logging of audit results in kernel history - -* Phase B: Blueprint (PROTOCOL) -:PROPERTIES: -:STATUS: SIGNED -:END: - -** 1. Architectural Intent -Interfaces for telemetry inspection and diagnostic dispatch. Source of truth is the kernel's internal `*skill-telemetry*` hash table. - -** 2. Semantic Interfaces -#+begin_src lisp -(defun audit-calculate-failure-rate (skill-name) - "Returns the percentage of failed executions for a given skill.") - -(defun audit-scan-all-skills () - "Iterates through the telemetry registry and identifies failing components.") -#+end_src - -* Phase D: Build (Implementation) - -** Diagnostic Logic -#+begin_src lisp :tangle projects/org-skill-performance-auditor/src/audit-logic.lisp -(defun audit-calculate-failure-rate (skill-name) - (let ((metrics (org-agent:context-get-skill-telemetry skill-name))) - (if (and metrics (> (getf metrics :executions) 0)) - (* 100 (/ (getf metrics :failures) (getf metrics :executions))) - 0))) - -(defun audit-scan-all-skills () - (let ((failing-skills '())) - (dolist (skill-info (org-agent:context-list-all-skills)) - (let* ((name (getf skill-info :name)) - (rate (audit-calculate-failure-rate name))) - (when (> rate 20) ; Threshold: 20% failure rate - (kernel-log "AUDITOR - FAILURE DETECTED: Skill '~a' is failing at ~a%" name rate) - (push name failing-skills)))) - failing-skills)) -#+end_src - -* Registration -#+begin_src lisp -(defskill :skill-performance-auditor - :priority 95 ; High-priority meta-cognition - :trigger (lambda (context) (eq (getf (getf context :payload) :sensor) :heartbeat)) - :neuro (lambda (context) nil) - :symbolic (lambda (action context) - (let ((failing (audit-scan-all-skills))) - (dolist (name failing) - ;; Trigger Scribe-RCA for each failing skill - (org-agent:inject-stimulus - `(:type :EVENT :payload (:sensor :audit-failure :skill ,name))))))) -#+end_src