AUDIT: Hardened harness with mandatory skill verification and literacy audit

This commit is contained in:
2026-04-13 20:40:37 -04:00
parent fb7e658419
commit 51ff6b2e61
8 changed files with 102 additions and 64 deletions

View File

@@ -3,7 +3,8 @@
(defun policy-check-sovereignty (action context)
"Ensures the action does not violate the Sovereignty invariant."
(declare (ignore context))
;; Implementation placeholder
;; Implementation placeholder: currently permits all actions.
;; Future: Scan for non-sovereign domain names or proprietary API endpoints.
action)
(defun policy-deterministic-gate (action context)

View File

@@ -32,12 +32,13 @@
(let* ((active-skill (find-triggered-skill context))
(tool-belt (generate-tool-belt-prompt))
(global-context (context-assemble-global-awareness))
(system-logs (context-get-system-logs))
(assistant-name (or (uiop:getenv "MEMEX_ASSISTANT") "Agent")))
(if active-skill
(let* ((prompt-generator (skill-probabilistic-prompt active-skill))
(raw-prompt (when prompt-generator (funcall prompt-generator context)))
(system-prompt (format nil "IDENTITY: Actuator for ~a. MANDATE: ONE Lisp plist. ~a ~a"
assistant-name global-context tool-belt)))
(system-prompt (format nil "IDENTITY: Actuator for ~a. MANDATE: ONE Lisp plist. ~a ~a RECENT_LOGS: ~a"
assistant-name global-context tool-belt system-logs)))
(if (and raw-prompt (> (length raw-prompt) 1))
(let* ((thought (probabilistic-call raw-prompt :system-prompt system-prompt :context context))
;; Ensure we are working with a string for read-from-string

View File

@@ -211,9 +211,14 @@
(harness-log " LOADER: Initializing ~a skills..." (length sorted-files))
(dolist (file sorted-files)
(let ((skill-name (pathname-name file)))
(let* ((skill-name (pathname-name file))
(is-mandatory (member skill-name mandatory-skills :test #'string-equal)))
(harness-log " LOADER: Loading ~a..." skill-name)
(load-skill-with-timeout file 5)))
(let ((status (load-skill-with-timeout file 5)))
(unless (eq status :success)
(if is-mandatory
(error "BOOT FAILURE: Mandatory skill '~a' failed to load (Status: ~a)." skill-name status)
(harness-log "LOADER WARNING: Skill '~a' failed to load." skill-name))))))
;; Final Summary
(let ((ready 0) (failed 0))