PSF: Mass-regeneration complete. 53/53 high-fidelity blueprints and TDD suites established. Zero-cost Pro bridge active.

This commit is contained in:
2026-04-07 08:58:08 -04:00
parent f4a91ae747
commit 77c0dac025
58 changed files with 2154 additions and 1671 deletions

View File

@@ -21,65 +21,3 @@ Enforce zero-bloat and high-maintainability standards across the PSF.
- *Verification:* Ensure refactors do not break functionality (via TDD Runner).
- *Note Grooming:* Consolidate fragmented atomic notes into coherent structures.
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for codebase auditing and symbolic refactoring.
** 2. Semantic Interfaces
#+begin_src lisp
(defun audit-skill-logic (skill-name)
"Neural audit of a skill's Lisp blocks for complexity.")
(defun propose-refactor (skill-name)
"Drafts a 'Phase D' update for a skill to simplify its logic.")
#+end_src
* Phase D: Build (Implementation)
** Audit & Refactoring Logic
#+begin_src lisp :tangle projects/org-skill-groomer/src/groomer-logic.lisp
(defun audit-skill-logic (skill-name)
"Retrieves skill source and asks Neuro for a 'Complexity Report'."
(let ((source (org-agent:context-get-skill-source skill-name)))
(if source
(org-agent:ask-neuro
(format nil "Audit this skill logic for technical debt and duplication: ~a" source)
:system-prompt "You are a PSF Senior Architect. Identify bloat and propose a MINIMAL refactor.")
(format nil "Skill ~a not found." skill-name))))
(defun audit-kernel-logic ()
"Performs a recursive self-audit of the core org-agent kernel files."
(let* ((kernel-files '("package.lisp" "protocol.lisp" "object-store.lisp" "embedding.lisp" "skills.lisp" "neuro.lisp" "symbolic.lisp" "core.lisp"))
(src-dir (asdf:system-source-directory :org-agent))
(full-report ""))
(dolist (file kernel-files)
(let* ((path (merge-pathnames (format nil "src/~a" file) src-dir))
(content (when (uiop:file-exists-p path) (uiop:read-file-string path))))
(when content
(setf full-report
(concatenate 'string full-report
(format nil "--- FILE: ~a ---~%~a~%~%" file
(org-agent:ask-neuro
(format nil "Audit this kernel file for technical debt: ~a" content)
:system-prompt "You are the Sovereign Architect. Identify critical bottlenecks and logic duplication.")))))))
full-report))
(defun propose-refactor (target type)
"Drafts a surgical refactor proposal. TARGET can be a skill name or a kernel file."
(org-agent:ask-neuro
(format nil "Draft a surgical refactor for ~a (~a). Focus on the 'Minimalist Core' mandate." target type)
:system-prompt "You are a PSF Senior Architect. Provide the refactored code in a Lisp block."))
#+end_src
* Registration
#+begin_src lisp
(defskill :skill-groomer
:priority 50
:trigger (lambda (context) (eq (getf (getf context :payload) :sensor) :grooming-cycle))
:neuro #'audit-skill-logic
:symbolic (lambda (action context) action))
#+end_src