Files
memex/projects/psf-core/PROTOCOL.org

47 lines
1.5 KiB
Org Mode

#+TITLE: PROTOCOL: PSF Core Automation
#+STATUS: SIGNED
* 1. Architectural Intent
This protocol defines the shared Lisp interfaces used by PSF agents to perceive project states and automate the "Consensus Loop."
Following the **Lisp Machine Mandate**, all state transitions are event-driven and handled through the active Lisp image, using the Org-mode AST as the primary data store.
* 2. Semantic Interfaces
** 2.1 Project State Perception
#+begin_src lisp
(defun psf-perceive-state (project-name)
"Parses the PRD and PROTOCOL of a project to return its current Phase (A-F).
Returns a keyword: :DEMAND, :BLUEPRINT, :SUCCESS, :BUILD, :CHAOS, :MEMORY."
;; 1. Open project directory.
;; 2. Read #+STATUS in PRD.org and PROTOCOL.org.
;; 3. Check for existence of tests/ and src/.
)
#+end_src
** 2.2 Transition Gate Enforcement
...
)
#+end_src
** 2.3 Chaos Gauntlet Execution
#+begin_src lisp
(defun psf-run-chaos-gauntlet (project-name)
"Executes a suite of destructive tests against the project.
Includes: Image termination, Fuzzing, and Dependency isolation."
)
(defun psf-sabotage-dependency (project-name dependency-name)
"Simulates a failure of a specific system component to test resilience."
)
#+end_src
* 3. Integration with GTD
The PSF state must be mirrored in `gtd.org` via the `:PSF-STATE:` property.
#+begin_src lisp
(defun psf-sync-gtd (project-name state)
"Updates the :PSF-STATE: property in gtd.org to match the internal PSF state."
)
#+end_src