59 lines
1.7 KiB
Org Mode
59 lines
1.7 KiB
Org Mode
#+TITLE: SKILL: Delegation Manager (Universal Literate Note)
|
|
#+ID: skill-delegation
|
|
#+STARTUP: content
|
|
#+FILETAGS: :delegation:multi-agent:psf:
|
|
|
|
* Overview
|
|
The *Delegation Manager* orchestrates the dispatch of tasks to sub-agents or specialized skills.
|
|
|
|
* Phase A: Demand (PRD)
|
|
:PROPERTIES:
|
|
:STATUS: FROZEN
|
|
:END:
|
|
|
|
** 1. Purpose
|
|
Define the protocol for delegating work between agents.
|
|
|
|
** 2. User Needs
|
|
- *Trigger:* Detect when a task requires delegation.
|
|
- *Actuate:* Execute the delegation to a target skill or agent.
|
|
|
|
* Phase B: Blueprint (PROTOCOL)
|
|
:PROPERTIES:
|
|
:STATUS: SIGNED
|
|
:END:
|
|
|
|
** 1. Architectural Intent
|
|
Hierarchical task delegation system.
|
|
|
|
** 2. Semantic Interfaces
|
|
#+begin_src lisp
|
|
(defun delegation-trigger (context) "Determine if context requires delegation.")
|
|
(defun delegation-actuate (task target) "Actuate delegation of TASK to TARGET.")
|
|
#+end_src
|
|
|
|
* Phase D: Build (Implementation)
|
|
|
|
#+begin_src lisp :tangle ../projects/org-skill-delegation/src/delegation.lisp
|
|
(defun delegation-trigger (context)
|
|
"Examine CONTEXT to see if delegation is needed.
|
|
Criteria: Task complexity or explicit :delegate-to flag."
|
|
(let ((complexity (getf context :complexity 0))
|
|
(explicit-target (getf context :delegate-to)))
|
|
(or (> complexity 7) explicit-target)))
|
|
|
|
(defun delegation-actuate (task target)
|
|
"Dispatch TASK to TARGET. TARGET can be a sub-agent name or a skill keyword."
|
|
(kernel-log "DELEGATION - Actuating '~a' for task: ~a" target (getf task :title))
|
|
(org-agent:spawn-sub-agent :target target :task task))
|
|
#+end_src
|
|
|
|
* Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-delegation
|
|
:priority 90
|
|
:trigger #'delegation-trigger
|
|
:neuro (lambda (context) nil)
|
|
:symbolic (lambda (action context) action))
|
|
#+end_src
|