PSF: Mass-regeneration complete. 53/53 high-fidelity blueprints and TDD suites established. Zero-cost Pro bridge active.

This commit is contained in:
2026-04-07 08:58:08 -04:00
parent f4a91ae747
commit 77c0dac025
58 changed files with 2154 additions and 1671 deletions

View File

@@ -27,36 +27,40 @@ Define automated behaviors for verifying and configuring the PSF environment.
*** TODO Model Tiering Property Injection
*** TODO Delivery Channel Actuator Verification
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: DRAFT
:END:
** 1. Architectural Intent
Interfaces for system state verification and environment manipulation. Source of truth is the OS environment and the `.env` file.
The Onboarding Protocol aims for a modular, extensible, and interactive configuration process. We will leverage Lisp's interactive environment and metaprogramming capabilities to guide the user through setup and validation. The core principle is *gradual disclosure* and *progressive enhancement*. The system first checks for minimal requirements and then interactively enhances the configuration. Configuration data is stored in a `.env` file, ensuring persistence and easy modification. Modules (Actors in the system) are responsible for specific aspects of configuration and are designed to be easily added or modified. Error handling is proactive, guiding the user through resolution steps rather than crashing. Logging and audit trails will be implemented.
** 2. Semantic Interfaces
#+begin_src lisp
(defun onboarding-verify-env ()
"Checks host for required runtimes and libraries.")
** 2. Semantic Interfaces (Lisp Signatures)
(defun onboarding-calibrate-paths (base-dir)
"Calculates absolute paths for all PARA directories.")
*** `verify-system-dependencies &key (sbcl-present-p t) (quicklisp-present-p t) -> boolean`
Verifies the presence and basic functionality of essential system dependencies like SBCL and Quicklisp. Returns `T` if all specified dependencies are met, `NIL` otherwise. Accepts keyword arguments to selectively disable verification of specific dependencies (useful during development).
(defun onboarding-set-identity (user-name assistant-name)
"Writes identity parameters to the kernel configuration.")
#+end_src
*** `calibrate-memex-paths &key (memex-root "/home/user/memex/") -> plist`
Interactively guides the user to define the absolute paths for the Memex PARA structure (Projects, Areas, Resources, Archive). Stores these paths in a plist and updates the `.env` file. `memex-root` provides a default value; the user can override this. Returns a plist of the form `(:projects "/path/to/projects/" :areas "/path/to/areas/" ...)`
* Phase D: Build (Implementation)
The current implementation utilizes a hybrid Bash/Lisp approach located in `projects/org-agent/scripts/onboard.sh`.
*** `calibrate-neural-provider &key (default-provider :openai) (default-model "gpt-3.5-turbo") -> plist`
Presents the user with a choice of LLM providers and models. Validates API keys (if required) and stores the chosen provider, model, and API key in the `.env` file. `default-provider` and `default-model` provide starting defaults. Returns a plist of the form `(:provider :openai :model "gpt-4" :api-key "sk-...")`
** Verification Logic
#+begin_src lisp :tangle projects/org-skill-onboarding/src/onboard-logic.lisp
(defun onboarding-verify-env ()
(let ((results '()))
(push (list :sbcl (uiop:run-program "sbcl --version" :output :string)) results)
results))
#+end_src
*** `configure-delivery-channel &key (channel-type :signal) -> plist`
Guides the user through the configuration of a specific delivery channel (e.g., Signal, Telegram). Interactively prompts for necessary credentials and validates the configuration. Returns configurations as plist, containing `:channel-type` and other necessary credentials, e.g., `(:channel-type :signal :phone-number "+15551234567" :signal-cli-path "/usr/bin/signal-cli")`
* Phase E: Chaos (Verification)
Verification involves running the onboarding loop on a clean Memex instance and verifying that the resulting `.env` allows the kernel to boot without errors.
*** `setup-identity &key (memex-user "user") (memex-assistant "Assistant") -> plist`
Sets up the `$MEMEX_USER` and `$MEMEX_ASSISTANT` environment variables, allowing customization of the user and assistant names used within the Lisp Machine. Interactively prompts the user for confirmation or modification of the default values. Returns a plist `(:memex-user "NewUser" :memex-assistant "NewAssistant")`.
*** `generate-env-file &key (template-path "/path/to/default/.env.template") (output-path ".env") (config-data plist) -> boolean`
Generates the `.env` file from a template, populating it with the configuration data gathered from the other calibration functions. Returns `T` on success, `NIL` on failure.
*** `validate-env-variables -> plist`
Validates .env variables are set and functional for the kernel, actuators, and models. Returns a plist `(:kernel t :actuators t :models t)`. This is the main test before boot.