Files
passepartout/docs/PROTOCOL_dynamic_model_switching.org

1.7 KiB

PROTOCOL: Skill-Based Configuration

Overview

This protocol defines the skill-to-skill interface for retrieving environment configuration from the Org-mode Object-Store. It leverages the Skill Graph to provide a centralized configuration API for all other skills.

The Configuration Skill (`skill-environment-config.org`)

1. Internal Logic

The skill iterates over the kernel's `*object-store*` to find headlines containing specific properties.

(defun get-config-attribute (property-key &optional default)
  "Searches the global *object-store* for any headline containing PROPERTY-KEY."
  (let ((store org-agent:*object-store*))
    (maphash (lambda (id obj)
               (declare (ignore id))
               (when (eq (org-agent:org-object-type obj) :HEADLINE)
                 (let ((val (getf (org-agent:org-object-attributes obj) property-key)))
                   (when val
                     (return-from get-config-attribute val)))))
             store)
    default))

Skill Graph Integration

2. Dependency Declaration

Other skills requiring configuration MUST declare a dependency on this skill.

#+DEPENDS_ON: skill-environment-config

3. Provider Integration Example

Provider skills will invoke the config skill's API during the System 1 prompt generation.

(let ((model (org-agent.skills.skill-environment-config:get-config-attribute :LLM_MODEL_OPENAI "gpt-4-turbo-preview")))
  ;; ... use model in API call ...
  )

No Core Modifications Required

This protocol adheres to the Minimalist Core mandate by implementing the entirety of the "Dynamic Model Switching" logic within the Skill Layer.