2.3 KiB
2.3 KiB
SKILL: Self-Fix Agent (Universal Literate Note)
- Overview
- Phase A: Demand (PRD)
- Phase B: Blueprint (PROTOCOL)
- Phase D: Build (Implementation)
- Registration
Overview
The Self-Fix Agent acts as the system's "Immune System." It monitors kernel logs for failures (Lisp errors, rejections, hallucinations) and proactively drafts fixes for offending skills.
Phase A: Demand (PRD)
1. Purpose
Define the interfaces for autonomous log surveillance and self-repair drafting.
2. User Needs
- Constant Surveillance: Periodic monitoring of system logs via heartbeats.
- Autonomous Recovery: Root cause identification and corrective skill drafting.
- Neuro-Symbolic Alignment: Refining neural prompts to meet symbolic constraints.
- Safety Verification: Leveraging Creator validation for "surgeries."
3. Success Criteria
TODO Error Pattern Detection
TODO Skill Repair Drafting
TODO Deployment Gatekeeping Verification
Phase B: Blueprint (PROTOCOL)
1. Architectural Intent
Interfaces for log analysis and self-correction. Source of truth is the kernel log and the Skill Creator's validation logic.
2. Semantic Interfaces
(defun trigger-skill-self-fix (context)
"Triggers on :sensor :heartbeat.")
(defun neuro-skill-self-fix (context)
"Neural analysis of system logs and fix drafting.")
(defun verify-skill-self-fix (proposed-action context)
"Ensures repair actions target the correct system actuators.")
Phase D: Build (Implementation)
Heartbeat Surveillance
(defun trigger-skill-self-fix (context)
(let ((type (getf context :type))
(payload (getf context :payload)))
(and (eq type :EVENT)
(eq (getf payload :sensor) :heartbeat))))
Symbolic Gatekeeping
(defun verify-skill-self-fix (proposed-action context)
(let ((action (getf proposed-action :action)))
(if (eq action :create-skill)
proposed-action
nil)))
Registration
(defskill :skill-self-fix
:priority 40
:trigger #'trigger-skill-self-fix
:neuro #'neuro-skill-self-fix
:symbolic #'verify-skill-self-fix)