Files
memex/notes/org-skill-task-integrity.org
Amr Gharbeia fdb55c616d feat: stabilized org-agent two-way communication and UX
- Fixed kernel-to-Emacs communication bridge.
- Resolved boot-time crashes in multiple skeletal skills.
- Refined Chat skill prompt to eliminate conversational filler.
- Updated Emacs UI to automatically clean up status markers.
- Synchronized all fixes via Literate Org-mode documents.
- Verified physical two-way interaction via simulation.
2026-04-03 17:25:01 -04:00

2.9 KiB

SKILL: Task Integrity Agent (Universal Literate Note)

Overview

The Task Integrity Agent is the "Guardian" of the GTD system. It ensures that all task transitions adhere to semantic rules, preventing logical inconsistencies and maintaining the structural health of the task hierarchy.

Phase A: Demand (PRD)

1. Purpose

Define automated behaviors for GTD state consistency and dependency verification.

2. User Needs

  • Semantic Enforcement: Valid state transitions (Active vs. Resolved).
  • Dependency Awareness: Block closing parents with active children.
  • Proactive Assistance: Suggesting next logical actions based on momentum.
  • Fidelity: Preservation of metadata during state transitions.

3. Success Criteria

TODO Semantic Category Mapping

TODO Active Children Detection

TODO State Transition Block Verification

Phase B: Blueprint (PROTOCOL)

1. Architectural Intent

Interfaces for state verification and hierarchical auditing. Source of truth is the Org-mode AST and GTD metadata.

2. Semantic Interfaces

(defun semantic-state-category (state)
  "Maps raw keywords to :active or :resolved categories.")

(defun has-active-children-p (parent-id)
  "Recursively checks for active subtasks.")

(defun verify-skill-task-integrity (proposed-action context)
  "System 2 gatekeeper for logical task consistency.")

Phase D: Build (Implementation)

State Mapping

(defun semantic-state-category (state)
  (let ((s (string-upcase (or state ""))))
    (cond
     ((member s '("TODO" "NEXT" "WAIT") :test #'string=) :active)
     ((member s '("DONE" "CNCL" "CANCELED") :test #'string=) :resolved)
     (t :unknown))))

Dependency Checking

(defun has-active-children-p (parent-id)
  ;; Simplified implementation for refactor
  nil)

Sensory Perception

(defun trigger-skill-task-integrity (context)
  "Triggers on :heartbeat for periodic cleanup."
  (let ((payload (getf context :payload)))
    (eq (getf payload :sensor) :heartbeat)))

(defun neuro-skill-task-integrity (context)
  "Neural stage for task synthesis."
  (declare (ignore context))
  nil)

(defun verify-skill-task-integrity (proposed-action context)
  "System 2 gatekeeper for logical task consistency."
  (declare (ignore context))
  proposed-action)

Registration

(defskill :skill-task-integrity
  :priority 50
  :trigger #'trigger-skill-task-integrity
  :neuro #'neuro-skill-task-integrity
  :symbolic #'verify-skill-task-integrity)