feat(psf): transition to Order 2 (Sovereign Architect) with advanced skill graph and philosophical alignment
This commit is contained in:
@@ -53,21 +53,27 @@ Interfaces for background verification and kernel alerting. Source of truth is t
|
||||
(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))))
|
||||
;; Mock execution: If it fails, send to the Scientist Agent
|
||||
(let ((failure-log "ERROR: Expected T but got NIL in test case 42."))
|
||||
(when failure-log
|
||||
(kernel-log "CI ERROR - Test failed in ~a. Pushing to Scientist Agent..." project-name)
|
||||
(org-agent:inject-stimulus
|
||||
`(:type :EVENT :payload (:sensor :test-failure :project ,project-name :text ,failure-log)))))))
|
||||
#+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))
|
||||
:trigger (lambda (context)
|
||||
(let ((sensor (getf (getf context :payload) :sensor)))
|
||||
(or (eq sensor :buffer-update) (eq sensor :file-saved))))
|
||||
: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")))))
|
||||
(let ((parts (uiop:split-string file :separator '(#\/))))
|
||||
(when (> (length parts) 2)
|
||||
;; The project name is typically the directory after "projects/"
|
||||
(tdd-runner-execute (nth 1 (member "projects" parts :test #'string=)))))))))
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user