CHORE: Prepare for lisp-repair implementation
This commit is contained in:
@@ -15,14 +15,16 @@ The *Self-Fix Agent* is the system's "Repair Mechanism." It takes failure hypoth
|
||||
* Phase D: Build (Implementation)
|
||||
|
||||
** Repair Logic
|
||||
#+begin_src lisp
|
||||
#+begin_src lisp :tangle ../src/self-fix.lisp
|
||||
(defun self-fix-apply (action context)
|
||||
"Applies a surgical code fix and reloads the modified skill."
|
||||
(declare (ignore context))
|
||||
(let* ((payload (getf action :payload))
|
||||
(target-file (getf payload :file))
|
||||
(old-code (getf payload :old))
|
||||
(new-code (getf payload :new))
|
||||
(is-skill (search "skills/" (namestring target-file))))
|
||||
(is-skill (and (stringp (namestring target-file))
|
||||
(search "skills/" (namestring target-file)))))
|
||||
|
||||
(org-agent:snapshot-object-store)
|
||||
(org-agent:kernel-log "SELF-FIX - Attempting surgical fix on ~a..." target-file)
|
||||
@@ -60,7 +62,7 @@ The *Self-Fix Agent* is the system's "Repair Mechanism." It takes failure hypoth
|
||||
#+end_src
|
||||
|
||||
** Cognitive Tools
|
||||
#+begin_src lisp
|
||||
#+begin_src lisp :tangle ../src/self-fix.lisp
|
||||
(org-agent:def-cognitive-tool :repair-file "Applies a surgical code modification to a file and reloads the skill if applicable."
|
||||
:parameters ((:file :type :string :description "Path to the target file")
|
||||
(:old :type :string :description "The literal code block to find")
|
||||
|
||||
Reference in New Issue
Block a user