PSF: Stabilizing workspace after crash. Valid kernel/skill fixes.
This commit is contained in:
11
projects/org-skill-delegation/src/delegation.lisp
Normal file
11
projects/org-skill-delegation/src/delegation.lisp
Normal file
@@ -0,0 +1,11 @@
|
||||
(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))
|
||||
Reference in New Issue
Block a user