PSF: Stabilizing workspace after crash. Valid kernel/skill fixes.
This commit is contained in:
19
projects/org-skill-scientist/src/scientist-logic.lisp
Normal file
19
projects/org-skill-scientist/src/scientist-logic.lisp
Normal file
@@ -0,0 +1,19 @@
|
||||
(defun scientist-hypothesis (context)
|
||||
"Neural stage: Formulates a hypothesis about a failure based on logs."
|
||||
(let* ((payload (getf context :payload))
|
||||
(failure-log (getf payload :text))
|
||||
(project (getf payload :project)))
|
||||
(org-agent:ask-neuro
|
||||
(format nil "Project ~a failed with log: ~a. Formulate a 'Theory of Failure' and suggest a surgical fix." project failure-log)
|
||||
:system-prompt "You are a PSF Senior Debugging Scientist. Return a Lisp plist: (:target :scientist :action :propose :hypothesis \"...\" :failure-log \"...\")")))
|
||||
|
||||
(defun scientist-propose-fix (action context)
|
||||
"Symbolic stage: Triggers the Self-Fix agent with the formulated hypothesis."
|
||||
(declare (ignore context))
|
||||
(let* ((payload (getf action :payload))
|
||||
(hypothesis (getf payload :hypothesis))
|
||||
(failure-log (getf payload :failure-log)))
|
||||
(org-agent:kernel-log "SCIENTIST - Hypothesis formulated. Triggering SELF-FIX...")
|
||||
(org-agent:inject-stimulus
|
||||
`(:type :EVENT :payload (:sensor :repair-request :hypothesis ,hypothesis :failure-log ,failure-log)))
|
||||
(format nil "SUCCESS - Scientist proposed fix for failure.")))
|
||||
Reference in New Issue
Block a user