63 lines
2.5 KiB
Org Mode
63 lines
2.5 KiB
Org Mode
:PROPERTIES:
|
|
:ID: 0f55aff3-a586-409a-9ba9-8c88477a1d1a
|
|
:END:
|
|
#+TITLE: SKILL: Scribe-RCA (Universal Literate Note)
|
|
#+STARTUP: content
|
|
#+FILETAGS: :memory:rca:learning:psf:
|
|
#+DEPENDS_ON: skill-atomic-notes
|
|
|
|
* Overview
|
|
The *Scribe-RCA* agent is responsible for *Phase F: Memory*. It captures "Permanent Learnings" after significant failures or task completions, ensuring the system's *Institutional Memory* grows with every cycle.
|
|
|
|
* Phase A: Demand (PRD)
|
|
:PROPERTIES:
|
|
:STATUS: FROZEN
|
|
:END:
|
|
|
|
** 1. Purpose
|
|
Automate the extraction of root causes and architectural learnings into the Memex.
|
|
|
|
** 2. User Needs
|
|
- *Root Cause Analysis:* Automatically draft an RCA note after a `skip-event` recovery.
|
|
- *Permanent Learning:* Update `SOUL.org` or a dedicated `RCA.org` with new invariants.
|
|
- *Version Control Integration:* Commit new RCA notes to Gitea autonomously.
|
|
- *Traceability:* Link every learning back to the original failure stimulus.
|
|
|
|
* Phase D: Build (Implementation)
|
|
|
|
** Memory Extraction
|
|
#+begin_src lisp :tangle projects/org-skill-scribe-rca/src/rca-logic.lisp
|
|
(defun scribe-rca-draft (failure-context)
|
|
"Drafts an RCA note based on a recent kernel failure."
|
|
(let* ((payload (getf failure-context :payload))
|
|
(error-msg (getf payload :text))
|
|
(timestamp (local-time:format-timestring nil (local-time:now)))
|
|
(gitea-url (org-agent::get-env "GITEA_URL")))
|
|
(org-agent:ask-neuro
|
|
(format nil "Create a Root Cause Analysis (RCA) note for the following error: ~a" error-msg)
|
|
:system-prompt "You are the PSF Scribe. Extract the deep architectural failure and propose a new invariant for SOUL.org.")))
|
|
|
|
(defun scribe-rca-commit (rca-note)
|
|
"Commits the drafted RCA note to the Gitea repository."
|
|
(let ((gitea-url (org-agent::get-env "GITEA_URL")))
|
|
(kernel-log "SCRIBE - Committing learning to Gitea: ~a" gitea-url)
|
|
;; Logic to use 'git commit' via shell-actuator
|
|
(org-agent:spawn-task (format nil "Commit this RCA note to Gitea: ~a" rca-note))))
|
|
#+end_src
|
|
|
|
* Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-scribe-rca
|
|
:priority 90
|
|
:trigger (lambda (context) (search "SYSTEM ERROR" (format nil "~a" (getf (getf context :payload) :text))))
|
|
:neuro #'scribe-rca-draft
|
|
:symbolic (lambda (action context) action))
|
|
#+end_src
|
|
|
|
* Phase B: Blueprint (PROTOCOL)
|
|
:PROPERTIES:
|
|
:STATUS: SIGNED
|
|
:END:
|
|
|
|
** 1. Architectural IntentnEstablish core functional interfaces for this skill.\n\n** 2. Semantic Interfaces\n(defun trigger-skill-org-skill-scribe-rca (context))\n(defun neuro-skill-org-skill-scribe-rca (context))
|