Files
memex/projects/org-skill-scribe/PROTOCOL.org

1.8 KiB

PROTOCOL: Skill - Scribe Agent

1. Architectural Intent

This protocol defines the shared Lisp interfaces for the Scribe skill. It ensures that the distillation of ephemeral thoughts and the auditing of foundry integrity are performed deterministically and with clear provenance.

Following the Literate Mandate, the Scribe skill's implementation must be tangled from its Org-mode source.

2. Semantic Interfaces

2.1 State Perception

(defun scribe-scan-for-knowledge-gaps ()
  "Uses 'git diff' against the last processed commit hash to identify new content in $MEMEX_DAILY.
   Returns a list of daily files with new content."
  )

2.2 Concept Distillation

(defun scribe-distill-concept (daily-path concept-meta)
  "Transforms a raw capture into an atomic note.
   Input: (:title \"Concept Title\" :content \"Body text\" :source \"daily/2026-03-31.org\")
   Output: Path to the new note in $MEMEX_NOTES."
  )

2.3 Mandate Auditing

(defun scribe-audit-foundry-mandate (project-name)
  "Checks a project for compliance with PSF Level 3 standards.
   Checks: PRD.org exists, PROTOCOL.org exists, src/ contains tangled blocks.
   Returns a list of violations or NIL if compliant."
  )

2.4 Integrity Reporting

(defun scribe-record-violation (project-name violation-type)
  "Appends a Mandate Violation entry to notes/institutional-memory.org."
  )

3. Integration with Cron and Git

The Scribe runs as an asynchronous process. It MUST update `scribe-state.lisp` (containing a Lisp alist) and perform a Git commit after each successful batch.