Some checks failed
Deploy (Gitea) / deploy (push) Failing after 11s
- Secret Exposure Gate + Privacy Filter (Bouncer) - Shell actuator safety harness (timeout, blocked patterns) - REPL-first enforcement (lisp validation gate, system-prompt-augment) - Engineering Standards lifecycle (two-track Org-first + REPL-first) - Literate Programming discipline (one function per block, reflect-back) - AGENTS.md: thin routing layer, skills are authoritative - SKILLS_DIR removed, ~/notes fallback eliminated - opencortex.sh: multi-distro (Debian+Fedora), configure, install service, backup, restore, help - infrastructure/opencortex.service (systemd user unit) - Docker: updated to debian:trixie, fixed build context - GitHub CI: lint + test workflows fixed, trigger on tags only - Gitea CI: deploy workflow paths fixed - README: one-line curl install, badges - USER_MANUAL: Deployment section (bare metal, Docker, backup) - .gitignore: skills/*.lisp and tests/*.lisp as generated artifacts - Prose/block refactor across all 35 org files - Test suite Tier 1: 43/45 pass (env-dependent failures isolated)
34 lines
1.2 KiB
Org Mode
34 lines
1.2 KiB
Org Mode
#+TITLE: SKILL: Policy (org-skill-policy.org)
|
|
#+AUTHOR: Agent
|
|
#+FILETAGS: :system:policy:constitutional:
|
|
#+PROPERTY: header-args:lisp :tangle org-skill-policy.lisp
|
|
|
|
* Overview
|
|
The *Policy Skill* is the constitutional layer of OpenCortex. It enforces foundational invariants like transparency and autonomy on all proposed actions.
|
|
|
|
* Implementation
|
|
|
|
** Policy Logic (policy-check)
|
|
#+begin_src lisp
|
|
(defun policy-check (action context)
|
|
"Enforces constitutional invariants on proposed actions."
|
|
(declare (ignore context))
|
|
(let* ((payload (proto-get action :payload))
|
|
(explanation (proto-get payload :explanation)))
|
|
(if (and explanation (stringp explanation) (> (length explanation) 10))
|
|
action
|
|
(progn
|
|
(harness-log "POLICY VIOLATION: Action lacks sufficient explanation.")
|
|
(list :type :LOG
|
|
:payload (list :level :warn
|
|
:text "Action blocked: Missing or insufficient :explanation. Please justify your reasoning."))))))
|
|
#+end_src
|
|
|
|
** Skill Registration
|
|
#+begin_src lisp
|
|
(defskill :skill-policy
|
|
:priority 500
|
|
:trigger (lambda (ctx) (declare (ignore ctx)) t)
|
|
:deterministic #'policy-check)
|
|
#+end_src
|