Files
passepartout/skills/org-skill-delegation.org
Amr Gharbeia 04df131f63 PSF: Standardize core gates and refine skill loading mechanism
- Improved decide-gate to normalize candidates (wrap strings in RESPONSE)
- Refined load-skill-from-org to skip tangled blocks and Org properties
- Updated system definition and test suites for v1.0
2026-04-12 13:38:29 -04:00

2.2 KiB

SKILL: Delegation Manager (Universal Literate Note)

Overview

The Delegation Manager orchestrates the dispatch of tasks to sub-agents or specialized skills.

Phase A: Demand (PRD)

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)

Phase B: Blueprint (PROTOCOL)

1. Architectural Intent

The Delegation Manager will utilize a message-passing architecture. Tasks are packaged into messages and routed based on content. A central resolution function determines the appropriate target agent or skill for each task. Error handling and fallback mechanisms are crucial for robustness. The core principle is explicit delegation contracts to ensure compatibility and predictability.

2. Semantic Interfaces (Lisp Signatures)

Task Delegation

;; Sends a task to a target.  Returns a promise (future) that will eventually resolve
;; to the task result.  The :delegation-id is internally managed to track the delegation lifecycle.
(defun delegate-task (task priority context)
  :returns (promise task-result))

Skill Resolution

;; Determines the target agent/skill for a given task.
;; It receives the task details and any relevant context.  Returns the ID of the
;; targeted agent/skill.  Can return `:error` if no suitable delegation is found.
(defun resolve-skill (task context)
  :returns (skill-id or :error))

Error Handling

;; Reports a delegation failure. This allows for fallback strategies.
(defun report-delegation-failure (delegation-id error-message)
  :returns nil)

Task Result Handling

;; Informs the Delegation Manager that a task has been completed successfully.
(defun report-task-completion (delegation-id result)
  :returns nil)