3.8 KiB
3.8 KiB
SKILL: Scribe Agent (Universal Literate Note)
- Overview
- Phase A: Demand (PRD)
- Phase B: Blueprint (PROTOCOL)
- Phase D: Build (Implementation)
- Registration
Overview
The Scribe Agent is the primary custodian of the Institutional Memory. It distills ephemeral daily thoughts into atomic notes, enriches the knowledge graph via Karpathy-style synthesis, and audits foundry projects.
Phase A: Demand (PRD)
1. Purpose
Define automated distillation, enrichment, and auditing behaviors.
2. User Needs
- Knowledge Distillation: Weekly scan of
daily/files to extract evergreen concepts. - Privacy Mandate: NEVER process subtrees with the
@personaltag. (LLM exclusion). -
Content Enrichment (Karpathy Method):
- Cross-linking to existing notes.
- Merging redundant concepts.
- Splitting bloated notes.
- Deciding on further self-learning (deep or adjacent).
- Generating project ideas from insights.
- Archive Preservation: Never delete originals from
daily/.
3. Success Criteria
TODO Successful distillation of a week's worth of dailies.
TODO Automated link suggestion between new and old notes.
TODO Project idea generation verified by user.
Phase B: Blueprint (PROTOCOL)
1. Architectural Intent
Uses a weekly heartbeat trigger. Employs a "Compiler" approach: System 1 (Neuro) generates synthesis proposals, System 2 (Symbolic) verifies file-system safety and tag constraints.
2. Semantic Interfaces
(defun scribe-distill-weekly ()
"Main entry point for weekly knowledge synthesis.")
(defun scribe-enrich-concept (note-id)
"Triggers neural analysis for linking and project ideas.")
Phase D: Build (Implementation)
Git-based Change Detection
(defun scribe-get-changed-dailies ()
"Returns list of daily files modified in the last 7 days via git."
(uiop:run-program (list "git" "log" "--since='1 week ago'" "--name-only" "--pretty=format:" "--" "daily/") :output :lines))
Pre-Filtering (The Privacy Wall)
(defun scribe-filter-personal (org-ast-node)
"Recursively strips out any headline or content tagged with @personal.
This runs strictly in System 2 BEFORE any data is passed to System 1."
(let ((tags (getf (org-agent:org-object-attributes org-ast-node) :TAGS)))
(when (not (member "@personal" tags :test #'string=))
org-ast-node)))
Karpathy-Style Synthesis
(defun neuro-skill-scribe-enrich (context)
"Neural stage for high-entropy knowledge synthesis.
Assumes 'context' has already passed through scribe-filter-personal."
(let* ((content (getf context :content))
(existing-notes "")) ; Skeletal: would call atomic-notes-scan
(ask-neuro content :system-prompt
(format nil "You are the PSF Scribe. Your goal is to ENRICH this concept.
RULES:
1. CROSS-LINK: Suggest links to existing notes.
2. MERGE/SPLIT: Identify if this should be combined with another or broken down.
3. SELF-LEARNING: Suggest a 'Path to Mastery' (deeper or adjacent).
4. PROJECTS: Suggest a PSF-style project based on this.
5. NO FILLER: Return a Lisp plist."))))
(defun trigger-skill-scribe (context)
"Triggers on delegation to :scribe or :distill."
(let ((payload (getf context :payload)))
(and (eq (getf context :type) :EVENT)
(eq (getf payload :sensor) :delegation)
(member (getf payload :target-skill) '(:scribe :distill)))))
Registration
(defskill :skill-scribe
:priority 60
:trigger #'trigger-skill-scribe
:neuro #'neuro-skill-scribe-enrich
:symbolic #'scribe-get-changed-dailies)