Files
passepartout/skills/org-skill-protocol-validator.org
Amr Gharbeia dd8bb6e3c8 refactor(skills): use XDG paths for tangle destinations
- Updated all 22 skill org files to use $OC_DATA_DIR/skills/ paths
- Removed manually created .lisp file (tangling now targets XDG)
- Files will now tangle to ~/.local/share/opencortex/skills/
2026-04-30 11:09:21 -04:00

1.0 KiB

SKILL: Protocol Validator (org-skill-protocol-validator.org)

Overview

The Protocol Validator skill enforces strict schema compliance for all internal and external communication.

Implementation

Validation Logic

(defun protocol-validate (msg)
  "Enforces structural schema compliance on protocol messages."
  (validate-communication-protocol-schema msg))

Skill Registration

(defskill :skill-protocol-validator
  :priority 95
  :trigger (lambda (ctx) (declare (ignore ctx)) t)
  :deterministic (lambda (action ctx)
                   (declare (ignore ctx))
                   (handler-case
                       (progn (protocol-validate action) action)
                     (error (c)
                       (list :type :LOG :payload (list :level :error :text (format nil "Protocol Violation: ~a" c)))))))