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

@@ -4,26 +4,20 @@
#+FILETAGS: :architect:blueprint:design:psf:
* Overview
The *Architect Agent* transforms a FROZEN PRD (Demand) into a rigorous PROTOCOL (Blueprint). It bridges the gap between human requirements and machine code, ensuring structural integrity before implementation.
The *Architect Agent* transforms a FROZEN PRD (Demand) into a rigorous PROTOCOL (Blueprint). It bridges the gap between high-level requirements and technical implementation.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:STATUS: SIGNED
:END:
** 1. Purpose
Define automated architectural behaviors for the PSF Consensus Loop.
Automate the technical design phase of the PSF project lifecycle.
** 2. User Needs
- *PRD Perception:* Monitor for `FROZEN` PRDs.
- *Semantic Translation:* Translate ambiguous needs into Lisp-style interfaces.
- *Memory Integration:* Reference `institutional-memory.org` for design choices.
- *Physical Actuation:* Write the `PROTOCOL.org` to the project directory.
** 3. Success Criteria
*** TODO Trigger Accuracy
*** TODO Protocol Generation Verification
*** TODO File Integrity Check
- *Perception:* Scan the Memex for FROZEN PRDs.
- *Synthesis:* Generate Lisp-idiomatic technical interfaces.
- *Actuation:* Autonomously append Phase B (Blueprint) to master notes.
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
@@ -48,14 +42,24 @@ Interfaces for blueprint actuation and requirement perception. Source of truth i
(search ":STATUS: FROZEN" content)
(not (search "* Phase B: Blueprint (PROTOCOL)" content)))
`(:note-path ,note-path :content ,content))))
#+end_src
** Note Scanning
#+begin_src lisp :tangle ../projects/org-skill-architect/src/architect-logic.lisp
(defun architect-scan-all-notes ()
"Scans all org-skill-*.org notes for demands ready for blueprinting."
(let ((notes-dir (or (uiop:getenv "MEMEX_NOTES") "notes/"))
(ready-notes '()))
(dolist (file (uiop:directory-files notes-dir "org-skill-*.org"))
(let ((status (architect-perceive-frozen-prd file)))
(when status (push status ready-notes))))
"Scans all org-skill-*.org notes for demands ready for blueprinting.
Uses manual filtering to ensure robustness across Lisp environments."
(let* ((notes-dir (or (uiop:getenv "MEMEX_NOTES") "/home/user/memex/notes/"))
(files (uiop:directory-files (uiop:ensure-directory-pathname notes-dir)))
(ready-notes '()))
(dolist (file files)
(let ((name (pathname-name file))
(type (pathname-type file)))
(when (and name type
(uiop:string-prefix-p "org-skill-" name)
(string-equal type "org"))
(let ((status (architect-perceive-frozen-prd file)))
(when status (push status ready-notes))))))
ready-notes))
#+end_src
@@ -78,7 +82,8 @@ Interfaces for blueprint actuation and requirement perception. Source of truth i
(let* ((payload (getf context :payload))
(note (car (getf payload :ready-notes)))
(note-path (getf note :note-path))
(prd-content (getf note :content)))
(prd-content (getf note :content))
(path-str (namestring note-path)))
(format nil "
You are the PSF Architect.
The Master Note '~a' has a FROZEN PRD and needs a PROTOCOL.
@@ -94,27 +99,32 @@ Interfaces for blueprint actuation and requirement perception. Source of truth i
2. Define Semantic Interfaces using Lisp signatures.
Return a Lisp plist: (:target :architect :action :actuate :path \"~a\" :content \"...blueprint section...\")
" note-path prd-content note-path)))
" path-str prd-content path-str)))
#+end_src
** Blueprint Actuation
#+begin_src lisp :tangle ../projects/org-skill-architect/src/architect-logic.lisp
(defun architect-actuate (action context)
(declare (ignore context))
(let* ((payload (getf action :payload))
(note-path (getf payload :path))
(blueprint-content (getf payload :content)))
(org-agent:kernel-log "ARCHITECT - Appending PROTOCOL to ~a" note-path)
(with-open-file (out note-path :direction :output :if-exists :append)
(format out "~%* Phase B: Blueprint (PROTOCOL)~%:PROPERTIES:~%:STATUS: SIGNED~%:END:~%~%~a"
blueprint-content))
(format nil "SUCCESS - Architect established PROTOCOL in ~a" note-path)))
(note-path (or (getf payload :path) (getf action :path)))
(blueprint-content (or (getf payload :content) (getf action :content))))
(if (and note-path blueprint-content)
(progn
(org-agent:kernel-log "ARCHITECT - Appending PROTOCOL to ~a" note-path)
(with-open-file (out note-path :direction :output :if-exists :append)
(format out "~%* Phase B: Blueprint (PROTOCOL)~%:PROPERTIES:~%:STATUS: SIGNED~%:END:~%~%~a"
blueprint-content))
(format nil "SUCCESS - Architect established PROTOCOL in ~a" note-path))
(progn
(org-agent:kernel-log "ARCHITECT FAILURE - Missing path or content in action: ~a" action)
nil))))
#+end_src
* Registration
#+begin_src lisp
(defskill :skill-architect
:priority 70
:priority 110 ; Higher priority to lead the loop
:trigger #'trigger-skill-architect
:neuro #'neuro-skill-architect
:symbolic #'architect-actuate)