Files
memex/notes/org-skill-task-integrity.org

2.3 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)

Registration

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