Files
memex/notes/org-skill-creator.org

83 lines
2.9 KiB
Org Mode

:PROPERTIES:
:ID: e8de10bb-bc62-41cb-b445-e9b1615b2d3a
:END:
#+TITLE: SKILL: Skill Creator Agent (Universal Literate Note)
#+STARTUP: content
#+FILETAGS: :creator:reproductive:meta-cognitive:psf:
* Overview
The *Skill Creator Agent* is the "Reproductive System" of the Lisp Machine. It enables autonomous generation of new Org-Native skills, facilitating a "Self-Editing OS" philosophy through neural drafting and symbolic validation.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the interfaces for autonomous skill generation and syntax validation.
** 2. User Needs
- *Autonomy:* Draft complete skill files from natural language requirements.
- *Safety First:* Mandatory symbolic syntax validation of generated code.
- *Hierarchical Negotiation:* Automatic priority assignment based on existing brain structure.
** 3. Success Criteria
*** TODO Skill Draft Generation
*** TODO Lisp Syntax Validation Gate
*** TODO Skill Registration Verification
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
*** Phase B: Blueprint (PROTOCOL)
**** 1. Architectural Intent
The Skill Creator follows a three-stage pipeline: *Drafting*, *Validation*, and *Registration*. The *Drafting* stage leverages a neural network to create a candidate skill file. The *Validation* stage uses symbolic Lisp parsing to ensure syntactic correctness, preventing the introduction of invalid code. *Registration* adds the new skill to the system's active skill registry. The architecture emphasizes safety by making syntax validation mandatory, and promoting autonomy through automated skill generation. Hierarchical negotiation will be accomplished by inspecting the new skill's tags and comparing them to existing skills' tags, prioritizing skills that complement existing brain structure.
**** 2. Semantic Interfaces (Lisp Signatures)
***** a. Skill Drafting Interface
``lisp
(defun draft-skill (description &key (author "System") (tags '()))
"Generates a skill file as an org-mode string based on a natural language description.
:param description: Natural language description of the skill.
:type description: string
:param author: Author of the skill. Defaults to "System".
:type author: string
:param tags: List of tags for the skill.
:type tags: list
:returns: Org-mode string representing the skill file.
:rtype: string")
``
***** b. Lisp Syntax Validation Interface
``lisp
(defun validate-lisp-syntax (lisp-code)
"Validates the syntax of a given Lisp code string.
:param lisp-code: Lisp code as a string.
:type lisp-code: string
:returns: T if the syntax is valid, NIL otherwise.
:rtype: boolean")
``
***** c. Skill Registration Interface
``lisp
(defun register-skill (skill-file-path)
"Registers a skill by adding it to the active skill registry.
:param skill-file-path: Path to the skill file.
:type skill-file-path: string
:returns: T if registration is successful, NIL otherwise.
:rtype: boolean")
``