Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
- Added ;; REPL-VERIFIED: comments to all 164 definition blocks across 30 org files - Split 32 multi-definition blocks into one-per-block (one function per block) - Added Org headlines to 45 blocks missing prose-before-code - verify-repl now returns PASS on entire org/ directory
1.4 KiB
1.4 KiB
SKILL: Protocol Validator (org-skill-protocol-validator.org)
Overview
The Protocol Validator enforces schema compliance on every message entering or leaving the cognitive pipeline. It checks that messages are valid plists, that they have the required :type and :payload fields, and that the type is one of the known types (:REQUEST, :EVENT, :RESPONSE, :LOG, :STATUS). This prevents malformed messages from crashing the pipeline and ensures backward compatibility when the protocol evolves.
Implementation
Validation Logic
;; REPL-VERIFIED: 2026-05-03T13:00:00
(defun validator-protocol-check (msg)
"Enforces structural schema compliance on protocol messages."
(validate-communication-protocol-schema msg))
Skill Registration
(defskill :passepartout-security-validator
:priority 95
:trigger (lambda (ctx) (declare (ignore ctx)) t)
:deterministic (lambda (action ctx)
(declare (ignore ctx))
(handler-case
(progn (validator-protocol-check action) action)
(error (c)
(list :type :LOG :payload (list :level :error :text (format nil "Protocol Violation: ~a" c)))))))