29 lines
717 B
Org Mode
29 lines
717 B
Org Mode
#+TITLE: SKILL: Self Edit (org-skill-self-edit.org)
|
|
#+AUTHOR: Agent
|
|
#+FILETAGS: :system:autonomy:self-edit:
|
|
#+PROPERTY: header-args:lisp :tangle org-skill-self-edit.lisp
|
|
|
|
* Overview
|
|
The *Self Edit* skill allows the OpenCortex Agent to modify its own literate source code.
|
|
|
|
* Implementation
|
|
|
|
** Package Context
|
|
#+begin_src lisp
|
|
(in-package :opencortex)
|
|
#+end_src
|
|
|
|
** Self-Edit Logic
|
|
#+begin_src lisp
|
|
(defun self-edit-apply (filepath old-text new-text)
|
|
"Applies a transformation to a source file."
|
|
(harness-log "SELF-EDIT: Applying changes to ~a" filepath))
|
|
#+end_src
|
|
|
|
** Skill Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-self-edit
|
|
:priority 100
|
|
:trigger (lambda (ctx) (declare (ignore ctx)) nil))
|
|
#+end_src
|