PSF: Mass-regeneration complete. 53/53 high-fidelity blueprints and TDD suites established. Zero-cost Pro bridge active.
This commit is contained in:
@@ -1 +0,0 @@
|
||||
../system/skills/org-skill-environment-config.org
|
||||
65
notes/org-skill-environment-config.org
Normal file
65
notes/org-skill-environment-config.org
Normal file
@@ -0,0 +1,65 @@
|
||||
#+TITLE: SKILL: Environment Configuration Manager (Universal Literate Note)
|
||||
#+ID: skill-environment-config
|
||||
#+STARTUP: content
|
||||
#+FILETAGS: :system:config:sovereignty:psf:
|
||||
|
||||
* Overview
|
||||
The *Environment Configuration Manager* is the source of truth for user preferences. It persists settings (like LLM Model Fleets) into the kernel's Object Store, allowing for dynamic runtime reconfiguration without environment variable bloat.
|
||||
|
||||
* Phase A: Demand (PRD)
|
||||
:PROPERTIES:
|
||||
:STATUS: SIGNED
|
||||
:END:
|
||||
|
||||
** 1. Purpose
|
||||
Provide a programmatic and literate interface for managing system-wide settings.
|
||||
|
||||
** 2. User Needs
|
||||
- *Fleet Management:* Define preferred models for each LLM provider.
|
||||
- *Persistence:* Ensure settings survive kernel restarts via the Object Store.
|
||||
- *Transparency:* Allow the user to audit current settings via the REPL or Org tables.
|
||||
|
||||
* Phase B: Blueprint (PROTOCOL)
|
||||
:PROPERTIES:
|
||||
:STATUS: SIGNED
|
||||
:END:
|
||||
|
||||
** 1. Architectural Intent
|
||||
Define a standardized `CONFIG` object type in the Object Store. Provide getter/setter functions for the "LLM Fleet."
|
||||
|
||||
** 2. Semantic Interfaces
|
||||
|
||||
*** Fleet Configuration
|
||||
#+begin_src lisp :tangle ../projects/org-skill-environment-config/src/config-logic.lisp
|
||||
(in-package :org-agent)
|
||||
|
||||
(defun set-llm-model (provider model-id)
|
||||
"Registers a preferred model for a provider in the Object Store."
|
||||
(let ((config-id (format nil "config-llm-~a" (string-downcase (string provider)))))
|
||||
(let ((obj (make-org-object
|
||||
:id config-id
|
||||
:type :CONFIG
|
||||
:attributes `(:provider ,provider :model-id ,model-id)
|
||||
:content (format nil "Fleet preference for ~a set to ~a" provider model-id)
|
||||
:version (get-universal-time))))
|
||||
(setf (gethash config-id *object-store*) obj)
|
||||
(kernel-log "CONFIG - Fleet updated: ~a -> ~a" provider model-id)
|
||||
t)))
|
||||
|
||||
(defun get-llm-model (provider &optional default)
|
||||
"Retrieves the preferred model for a provider from the Object Store."
|
||||
(let* ((config-id (format nil "config-llm-~a" (string-downcase (string provider))))
|
||||
(obj (gethash config-id *object-store*)))
|
||||
(if obj
|
||||
(getf (org-object-attributes obj) :model-id)
|
||||
default)))
|
||||
#+end_src
|
||||
|
||||
* Registration
|
||||
#+begin_src lisp
|
||||
(defskill :skill-environment-config
|
||||
:priority 100
|
||||
:trigger (lambda (context) nil) ; Passive utility skill
|
||||
:neuro (lambda (context) nil)
|
||||
:symbolic (lambda (action context) action))
|
||||
#+end_src
|
||||
Reference in New Issue
Block a user