#+TITLE: PRD: Skill - Scribe Agent #+STATUS: FROZEN #+AUTHOR: Agent #+CREATED: [2026-03-31 Tue 13:45] * 1. Purpose The Scribe Agent is the automated distillation and auditing engine for the PSF. Its primary goal is to prevent "context rot" by transforming daily captures into atomic notes and ensuring project compliance with PSF standards. * 2. User Needs ** 2.1 Knowledge Distillation As a user (Amr), I need my ephemeral daily thoughts transformed into a structured knowledge base. - The Scribe MUST extract core concepts from `$MEMEX_DAILY`. - It MUST generate normalized atomic notes in `$MEMEX_NOTES`. - It MUST preserve provenance via `Source:` backlinks. ** 2.2 Incremental Processing I need the system to be efficient and avoid redundant work. - The Scribe MUST use Git state tracking (commit hashes) to identify only new content. - It MUST maintain state in a Lisp-native format (`scribe-state.lisp`) for full system introspection. ** 2.3 PSF Mandate Audit I need my foundry projects to maintain high integrity. - The Scribe MUST audit active projects for `PRD.org`, `PROTOCOL.org`, and Literate Programming blocks. - It MUST flag "Mandate Violations" in `institutional-memory.org`. ** 2.4 Autonomous Execution I need the Scribe to run reliably without manual intervention. - The skill must be compatible with cron-based triggers. - It must handle path normalization via environment variables. * 3. Success Criteria - [ ] **Distillation Accuracy:** Scribe identifies a concept in a daily log and creates a correctly formatted atomic note. - [ ] **Provenance Check:** Atomic notes contain a valid `Source:` link back to the daily file. - [ ] **Audit Trigger:** Scribe correctly identifies a project missing a `PROTOCOL.org` and records the violation. - [ ] **State Persistence:** `distillation-state.json` is updated after every successful run.