feat(arch): implement 'Code as Thought' architecture and formalize PSF Consensus Loop
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../system/skills/org-skill-workspace-manager.org
|
||||
84
notes/org-skill-workspace-manager.org
Normal file
84
notes/org-skill-workspace-manager.org
Normal file
@@ -0,0 +1,84 @@
|
||||
#+TITLE: SKILL: Workspace Manager Agent (Universal Literate Note)
|
||||
#+ID: skill-workspace-manager
|
||||
#+STARTUP: content
|
||||
#+FILETAGS: :workspace:para:maintenance:psf:
|
||||
|
||||
* Overview
|
||||
The **Workspace Manager Agent** is responsible for the ongoing maintenance and organization of the Memex workspace. It automates the "housekeeping" aspects of the PARA/Zettelkasten workflow, focusing on clutter reduction and structural alignment.
|
||||
|
||||
* Phase A: Demand (PRD)
|
||||
:PROPERTIES:
|
||||
:STATUS: FROZEN
|
||||
:END:
|
||||
|
||||
** 1. Purpose
|
||||
Define automated housekeeping behaviors for PARA/Zettelkasten maintenance.
|
||||
|
||||
** 2. User Needs
|
||||
- **Clutter Reduction:** Identify and archive `DONE` tasks.
|
||||
- **Workflow Alignment:** Ensure consistency with PARA directory structure.
|
||||
- **Proactive Organization:** Trigger on saves and heartbeats.
|
||||
|
||||
** 3. Success Criteria
|
||||
*** TODO Task Identification
|
||||
*** TODO Archiving Suggestion Loop
|
||||
*** TODO Perception Coverage (Buffer & Heartbeat)
|
||||
|
||||
* Phase B: Blueprint (PROTOCOL)
|
||||
:PROPERTIES:
|
||||
:STATUS: SIGNED
|
||||
:END:
|
||||
|
||||
** 1. Architectural Intent
|
||||
Interfaces for workspace auditing and archiving suggestions.
|
||||
|
||||
** 2. Semantic Interfaces
|
||||
#+begin_src lisp
|
||||
(defun trigger-skill-workspace-manager (context)
|
||||
"Triggers on :buffer-update or :heartbeat.")
|
||||
|
||||
(defun archive-completed-tasks ()
|
||||
"Queries store for DONE tasks and returns their IDs.")
|
||||
|
||||
(defun neuro-skill-workspace-manager (context)
|
||||
"Neural synthesis of archiving suggestions.")
|
||||
#+end_src
|
||||
|
||||
* Phase D: Build (Implementation)
|
||||
|
||||
** Dual Perception
|
||||
#+begin_src lisp :tangle projects/org-skill-workspace-manager/src/workspace-logic.lisp
|
||||
(defun trigger-skill-workspace-manager (context)
|
||||
(let* ((payload (getf context :payload))
|
||||
(sensor (getf payload :sensor)))
|
||||
(or (eq sensor :buffer-update)
|
||||
(eq sensor :heartbeat))))
|
||||
#+end_src
|
||||
|
||||
** Stale Task Identification
|
||||
#+begin_src lisp :tangle projects/org-skill-workspace-manager/src/workspace-logic.lisp
|
||||
(defun archive-completed-tasks ()
|
||||
"Identify DONE tasks and suggest archiving."
|
||||
(let ((done-tasks (org-agent:context-query-store :todo-state "DONE" :type :HEADLINE)))
|
||||
(when done-tasks
|
||||
(mapcar #'org-agent:org-object-id done-tasks))))
|
||||
#+end_src
|
||||
|
||||
** Neuro-Cognitive Drafting
|
||||
#+begin_src lisp :tangle projects/org-skill-workspace-manager/src/workspace-logic.lisp
|
||||
(defun neuro-skill-workspace-manager (context)
|
||||
(let ((ready-to-archive (archive-completed-tasks))
|
||||
(archive-dir (or (uiop:getenv "ARCHIVES_DIR") "archives/")))
|
||||
(if ready-to-archive
|
||||
(format nil "I found these completed tasks: ~a. Should I move them to ~a?" ready-to-archive archive-dir)
|
||||
nil)))
|
||||
#+end_src
|
||||
|
||||
* Registration
|
||||
#+begin_src lisp
|
||||
(defskill :skill-workspace-manager
|
||||
:priority 40
|
||||
:trigger #'trigger-skill-workspace-manager
|
||||
:neuro #'neuro-skill-workspace-manager
|
||||
:symbolic (lambda (action context) action))
|
||||
#+end_src
|
||||
Reference in New Issue
Block a user