feat(arch): finalize Universal Literate Note transition for all projects and skills

This commit is contained in:
2026-03-31 16:14:37 -04:00
parent 1712b1e4a9
commit 70be8ab93e
79 changed files with 1606 additions and 417 deletions

59
notes/agora.org Normal file
View File

@@ -0,0 +1,59 @@
#+TITLE: SKILL: Agora Protocol (Universal Literate Note)
#+ID: skill-agora
#+STARTUP: content
#+FILETAGS: :social:decentralized:identity:commerce:psf:
* Overview
The **Agora Protocol** is a decentralized "Social Operating System" designed to replace extractive, centralized platforms with a modular architecture for sovereign digital interaction. It unifies identity, data ownership, and communication under the immutable, verifiable, and user-owned "Note" primitive.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a robust, user-centric decentralized network.
** 2. User Needs
- **User Sovereignty:** Absolute control over all user-generated content and personal data via PDS.
- **Censorship Resistance:** Distributed storage and permissionless relay routing.
- **Authenticity:** Every action cryptographically signed by a Persona DID.
- **Privacy by Design:** Default end-to-end encryption and metadata leakage minimization.
- **Unified Primitive:** The "Note" as the atomic unit for all semantic types (posts, messages, contracts).
** 3. Success Criteria
*** TODO Note Primitive Cryptographic Hashing Verification
*** TODO HD Key Derivation for Personas (BIP-44)
*** TODO PDS Access Control enforcement
*** TODO Relay Routing ephemeral consistency
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for interacting with the Agora network via the Note primitive and Persona-based identity. Source of truth is the distributed Merkle DAG.
** 2. Semantic Interfaces
#+begin_src lisp
(defun agora-sign-note (content persona-id)
"Signs a raw note content with the specified Persona's key.")
(defun agora-publish-to-relay (signed-note relay-url)
"Transmits a signed note to an Agora Relay.")
(defun agora-sync-pds (pds-url)
"Synchronizes local state with the user's Personal Data Store.")
#+end_src
* Phase D: Build (Implementation)
The implementation logic is distributed across the `agora-requirements-*.org` files in `projects/agora/`.
** Persona Derivation
#+begin_src lisp
;; Logic for BIP-44 Persona derivation stubs
#+end_src
* Phase E: Chaos (Verification)
Verification involves simulating relay outages and PDS data restoration to ensure system resilience and data sovereignty.

56
notes/dotemacs.org Normal file
View File

@@ -0,0 +1,56 @@
#+TITLE: SKILL: Dotemacs Configuration (Universal Literate Note)
#+ID: skill-dotemacs
#+STARTUP: content
#+FILETAGS: :emacs:config:literate:psf:
* Overview
The **Dotemacs** project represents the "Operating System" configuration. It transforms Emacs into the primary computing tool by leveraging modular, literate Org-mode files that tangle into a high-performance environment.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a modular, optimized, and fully documented Emacs environment.
** 2. User Needs
- **Modularity:** Split the monolithic `emacs.org` into functional modules (core, ui, gtd, ai, etc.).
- **Literate Mandate:** Every significant setting must be justified and explained in prose.
- **Integration:** Seamless connectivity with `org-agent`, `org-roam`, and `org-gtd`.
- **Bootstrapping:** Fast startup using `early-init.el` and lazy-loading.
** 3. Success Criteria
*** TODO Monolithic modularization completion
*** TODO Standardize all paths to ~/memex/
*** TODO Ensure Org 10.0-pre bootstrap compatibility
*** TODO Document all major package configurations
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
The configuration is structured as a collection of feature-specific Org files that tangle into the `~/.emacs.d/` directory.
** 2. Semantic Interfaces
#+begin_src elisp
(defun dotemacs-tangle-module (module-name)
"Tangels a specific module Org file into its .el counterpart.")
(defun dotemacs-verify-load-path ()
"Ensures all Memex paths are correctly registered in the load-path.")
#+end_src
* Phase D: Build (Implementation)
The implementation is distributed across the `emacs-*.org` files in `projects/dotemacs/`.
** Core Module Tangle
#+begin_src elisp
;; Example tangle header
;; #+PROPERTY: header-args:elisp :tangle ~/.emacs.d/lisp/core.el
#+end_src
* Phase E: Chaos (Verification)
Verification involves `M-x benchmark-init` and ensuring zero warnings during the byte-compilation phase.

55
notes/infrastructure.org Normal file
View File

@@ -0,0 +1,55 @@
#+TITLE: SKILL: Infrastructure & Security (Universal Literate Note)
#+ID: skill-infrastructure
#+STARTUP: content
#+FILETAGS: :infrastructure:security:hardening:psf:
* Overview
The **Infrastructure** project governs the physical and virtual foundations of the Memex. It ensures high availability, security hardening, and operational transparency across cloud and local resources.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a secure, resilient, and documented infrastructure posture.
** 2. User Needs
- **Security Hardening:** Implementation of the OpenClaw security audit findings.
- **Vulnerability Management:** Regular risk assessments and reporting.
- **Inventory Control:** Complete mapping of cloud and local assets.
- **Roadmap Planning:** 30/60/90 day infrastructure evolution.
** 3. Success Criteria
*** TODO Harden Docker port bindings (bind to 127.0.0.1)
*** TODO Enable and configure UFW firewall
*** TODO Create current state assessment document
*** TODO Add user 'amr' to 'adm' group for log access
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for infrastructure state monitoring and automated hardening.
** 2. Semantic Interfaces
#+begin_src bash
(defun infra-audit-ports ()
"Checks for insecure port bindings.")
(defun infra-check-firewall-status ()
"Verifies UFW status.")
#+end_src
* Phase D: Build (Implementation)
Implementation consists of shell scripts and configuration files located in `projects/infrastructure/`.
** Security Monitoring
#+begin_src bash
;; Logic for security monitoring stubs
#+end_src
* Phase E: Chaos (Verification)
Verification involves periodic automated scans and manual audit verification.

View File

@@ -0,0 +1,55 @@
#+TITLE: SKILL: Lisp Machine Bootstrap (Universal Literate Note)
#+ID: skill-lisp-machine-bootstrap
#+STARTUP: content
#+FILETAGS: :hardware:lisp:sovereignty:fpga:psf:
* Overview
The **Lisp Machine Bootstrap** project is the "Endgame" of the PSF. It aims to eliminate the "Unix/C Tax" by building a hardware-native Lisp machine where CAR, CDR, and CONS are primitive gates. This ensures ultimate digital sovereignty and a provably secure, homoiconic environment.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a hardware environment optimized for Lisp and user sovereignty.
** 2. User Needs
- **Hardware-Native Lisp:** ISA designed for list processing efficiency.
- **Tagged Memory:** Hardware-level safety preventing memory corruption.
- **Bootstrapping Path:** Progression from Soft Machine (Linux) to Sovereign Silicon (ASIC).
- **Transparency:** Every gate and instruction must be introspectable and documented.
** 3. Success Criteria
*** TODO Research existing Lisp-on-FPGA implementations (Openora, etc.)
*** TODO Define minimum hardware-native Lisp ISA (Instruction Set Architecture)
*** TODO Draft CLOSOS-style Virtual Machine specification
*** TODO FPGA Implementation: Verilog/VHDL skeleton synthesis
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
The protocol defines the interface between the high-level Lisp image and the low-level ISA/VM.
** 2. Semantic Interfaces
#+begin_src lisp
(defun isa-dispatch (instruction opcode)
"Simulates the hardware dispatch of a Lisp-native instruction.")
(defun memory-tag-audit (address)
"Verifies the hardware tag of a specific memory word.")
#+end_src
* Phase D: Build (Implementation)
Current focus is on research and simulation (Phase 1: Soft Machine).
** Simulation Interface
#+begin_src lisp
;; Soft machine simulator stubs
#+end_src
* Phase E: Chaos (Verification)
Verification will occur via FPGA synthesis reports and VM regression tests.

View File

@@ -0,0 +1,55 @@
#+TITLE: PROJECT: Modular Home Appliances (Universal Literate Note)
#+ID: project-modular-home-appliances
#+STARTUP: content
#+FILETAGS: :hardware:iot:esp32:sustainability:psf:
* Overview
The **Modular Home Appliances** project focuses on developing open-source, sustainable designs for major home appliances (washers, fridges, etc.). It utilizes a modular physical architecture coupled with ESP32-based smart interfaces for AI-driven control and seamless Home Assistant integration.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for modular, open-source, and intelligent home hardware.
** 2. User Needs
- **Physical Modularity:** Easy replacement and upgrade of mechanical and electrical components.
- **Smart Interfacing:** ESP32-based control boards for connectivity.
- **Multimodal Control:** Support for smartphone apps, physical modular controllers, and direct `org-agent` AI interaction.
- **Sustainability:** Design for longevity, repairability, and efficient power management (inspired by Slate principles).
** 3. Success Criteria
*** TODO Washer/Dryer modular chassis design (draft)
*** TODO ESP32 firmware specification for appliance state machines
*** TODO Home Assistant MQTT discovery protocol implementation
*** TODO Lesson extraction from Slate electric truck architecture
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for appliance telemetry and remote actuation. Source of truth is the physical sensors and the Home Assistant state machine.
** 2. Semantic Interfaces
#+begin_src lisp
(defun appliance-get-telemetry (appliance-id)
"Queries the MQTT broker for real-time appliance state.")
(defun appliance-actuate-program (appliance-id program-id)
"Sends a command to the ESP32 controller to start a specific cycle.")
#+end_src
* Phase D: Build (Implementation)
Implementation involves 3D CAD models, circuit designs, and ESP32 firmware (C++/ESP-IDF).
** Firmware Logic (Software Component)
#+begin_src cpp
// Placeholder for ESP-IDF control logic
#+end_src
* Phase E: Chaos (Verification)
Verification involves automated cycle testing, Wi-Fi reconnection resilience, and MQTT latency audits.

View File

@@ -0,0 +1,55 @@
#+TITLE: PROJECT: Off-Grid Field Guide (Universal Literate Note)
#+ID: project-off-grid-field-guide
#+STARTUP: content
#+FILETAGS: :off-grid:guide:manual:portability:psf:
* Overview
The **Off-Grid Field Guide** project aims to develop a modular manual for off-grid living and activities. It is designed for physical portability, specifically fitting the traveler's notebook format, and provides interchangeable modules for navigation, first aid, and survival.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a modular, practical, and highly portable manual for off-grid scenarios.
** 2. User Needs
- **Modularity:** Interchangeable content blocks based on activity (e.g., Water Sourcing, Radio Comms).
- **Portability:** Optimization for the "Traveler's Notebook" physical form factor.
- **Practicality:** High-signal, low-noise instructions suitable for emergency use.
- **Durability:** Design considerations for physical print and use in harsh environments.
** 3. Success Criteria
*** TODO Taxonomy definition for initial modules (Nav, First Aid, Comms)
*** TODO Layout template for standard traveler's notebook dimensions
*** TODO Export pipeline from Org-mode to PDF/Print
*** TODO Content extraction from existing survival manuals (Atomic Note Distillation)
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for content organization and artifact generation. Source of truth is the Zettelkasten and the physical publishing templates.
** 2. Semantic Interfaces
#+begin_src bash
(defun guide-export-module (module-id)
"Generates a print-ready PDF for a specific guide module.")
(defun guide-verify-consistency (module-id)
"Checks module for broken links or outdated safety information.")
#+end_src
* Phase D: Build (Implementation)
Implementation involves content research, drafting in Org-mode, and designing LaTeX/CSS templates for print.
** Artifact Generation
#+begin_src bash
;; Placeholder for export scripts and layout templates
#+end_src
* Phase E: Chaos (Verification)
Verification involves field-testing the physical guide in off-grid conditions and ensuring content accuracy via expert review or cross-referencing.

View File

@@ -0,0 +1,52 @@
#+TITLE: PROJECT: Open Personal Equipment System (Universal Literate Note)
#+ID: project-open-personal-equipment-system
#+STARTUP: content
#+FILETAGS: :gear:standard:modularity:carrying:psf:
* Overview
The **Open Personal Equipment System (OPES)** aims to define and develop an open standard for personal carrying, organization, and storage solutions. It focuses on creating an interoperable ecosystem of gear that prioritizes durability, repairability, and modularity.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for an open, modular standard for personal equipment.
** 2. User Needs
- **Interoperability:** Modular attachments that work across different packs and cases.
- **Sovereignty:** Open-source patterns and material specifications allowing for user repair or manufacturing.
- **Durability:** High-performance materials designed for long-term use.
- **Standardization:** Clear definitions for grid systems (e.g., MOLLE-compatible but evolved).
** 3. Success Criteria
*** TODO Core OPES Attachment Standard definition
*** TODO Material and hardware whitelist (durability-focused)
*** TODO First "Instance" prototype design (e.g., a modular EDC pouch)
*** TODO Manufacturing instructions (Pattern/Blueprints)
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for gear configuration and attachment logic. Source of truth is the physical dimension specs and material standards.
** 2. Semantic Interfaces
#+begin_src bash
(defun opes-verify-compatibility (pouch-id pack-id)
"Checks if an attachment module meets the standard for a specific base pack.")
#+end_src
* Phase D: Build (Implementation)
Implementation involves technical drawings, sewing patterns, and material sourcing lists.
** Standard Definition
#+begin_src bash
;; Placeholder for technical specs and patterns
#+end_src
* Phase E: Chaos (Verification)
Verification involves field stress testing, abrasion audits, and inter-brand compatibility checks.

62
notes/org-agent.org Normal file
View File

@@ -0,0 +1,62 @@
#+TITLE: SKILL: Org-Agent Platform (Universal Literate Note)
#+ID: skill-org-agent-platform
#+STARTUP: content
#+FILETAGS: :platform:kernel:lisp:psf:
* Overview
The **Org-Agent** is the neurosymbolic kernel of the personal operating system. It acts as the "executive soul," using Org-mode as its native memory and Common Lisp as its deterministic reasoning engine. It follows a minimalist microkernel design, extending its capabilities via hot-reloadable skills.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the core functional and security requirements for the neurosymbolic daemon.
** 2. User Needs
- **Homoiconic Memory:** Use Org-mode AST as the primary data structure for both human and machine.
- **Deterministic Reasoning:** Common Lisp (SBCL) for high-performance, threaded symbolic logic.
- **Cognitive Loop:** A strict four-stage pipeline: Perceive -> Think (System 1) -> Decide (System 2) -> Act.
- **Minimalist Core:** The kernel handles only the loop, object-store, and communication; all else is a skill.
- **Security by Default:** Reader safety (*read-eval* disabled) and package-based skill jailing.
** 3. Success Criteria
*** TODO Core Lisp microkernel stability (Heartbeat consistency)
*** TODO OACP Swank/Socket communication reliability
*** TODO Org AST-to-Lisp conversion fidelity
*** TODO System 2 Safety Gating (The Harness) enforcement
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
The kernel is transport-agnostic and business-logic-agnostic. It communicates with external actuators (Emacs, Web, Signal) via the Org-Agent Communication Protocol (OACP).
** 2. Semantic Interfaces
#+begin_src lisp
(defun kernel-perceive (stimulus)
"Injects an event into the global object store.")
(defun kernel-think (context)
"Queries System 1 (LLM) for an intuitive proposal.")
(defun kernel-decide (proposal context)
"Invokes System 2 (Symbolic Skills) to verify or overrule the proposal.")
(defun kernel-act (action)
"Dispatches verified commands to the registered actuators.")
#+end_src
* Phase D: Build (Implementation)
The core implementation is distributed across `projects/org-agent/src/`.
** Initialization
#+begin_src lisp
;; Kernel bootstrap logic
#+end_src
* Phase E: Chaos (Verification)
Verification logic is contained in `projects/org-agent/tests/`.

View File

@@ -44,16 +44,76 @@ Interfaces for blueprint actuation and requirement perception. Source of truth i
* Phase D: Build (Implementation)
** PRD Perception
#+begin_src lisp :tangle projects/org-skill-architect/src/architect-logic.lisp
(defun architect-perceive-frozen-prd (note-path)
"Checks if a master note has a FROZEN PRD and lacks a Phase B section."
(let ((content (uiop:read-file-string note-path)))
(when (and (search "* Phase A: Demand (PRD)" content)
(search ":STATUS: FROZEN" content)
(not (search "* Phase B: Blueprint (PROTOCOL)" content)))
`(:note-path ,note-path :content ,content))))
(defun architect-scan-all-notes ()
"Scans all org-skill-*.org notes for demands ready for blueprinting."
(let ((notes-dir (or (uiop:getenv "MEMEX_NOTES") "notes/"))
(ready-notes '()))
(dolist (file (uiop:directory-files notes-dir "org-skill-*.org"))
(let ((status (architect-perceive-frozen-prd file)))
(when status (push status ready-notes))))
ready-notes))
#+end_src
** Cognitive Trigger
#+begin_src lisp :tangle projects/org-skill-architect/src/architect-logic.lisp
(defun trigger-skill-architect (context)
"Triggers on heartbeat if any master note is in a FROZEN PRD state."
(let ((type (getf context :type))
(payload (getf context :payload)))
(when (and (eq type :EVENT) (eq (getf payload :sensor) :heartbeat))
(let ((ready (architect-scan-all-notes)))
(when ready
(setf (getf (getf context :payload) :ready-notes) ready)
t)))))
#+end_src
** Neuro-Cognitive Prompt
#+begin_src lisp :tangle projects/org-skill-architect/src/architect-logic.lisp
(defun neuro-skill-architect (context)
(let* ((payload (getf context :payload))
(note (car (getf payload :ready-notes)))
(note-path (getf note :note-path))
(prd-content (getf note :content)))
(format nil "
You are the PSF Architect.
The Master Note '~a' has a FROZEN PRD and needs a PROTOCOL.
NOTE CONTENT:
---
~a
---
TASK:
Draft the '* Phase B: Blueprint (PROTOCOL)' section.
1. Define Architectural Intent.
2. Define Semantic Interfaces using Lisp signatures.
Return a Lisp plist: (:target :architect :action :actuate :path \"~a\" :content \"...blueprint section...\")
" note-path prd-content note-path)))
#+end_src
** Blueprint Actuation
#+begin_src lisp :tangle projects/org-skill-architect/src/architect-logic.lisp
(defun architect-actuate (project-name blueprint-content)
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
(project-dir (format nil "~a/~a/" projects-dir project-name))
(protocol-path (format nil "~aPROTOCOL.org" project-dir)))
(with-open-file (out protocol-path :direction :output :if-exists :supersede)
(format out "#+TITLE: PROTOCOL: ~a~%#+AUTHOR: Architect-Agent~%#+STATUS: DRAFT~%~%~a"
project-name blueprint-content))
(format nil "SUCCESS - Architect established PROTOCOL for ~a" project-name)))
(defun architect-actuate (action context)
(let* ((payload (getf action :payload))
(note-path (getf payload :path))
(blueprint-content (getf payload :content)))
(kernel-log "ARCHITECT - Appending PROTOCOL to ~a" note-path)
(with-open-file (out note-path :direction :output :if-exists :append)
(format out "~%* Phase B: Blueprint (PROTOCOL)~%:PROPERTIES:~%:STATUS: SIGNED~%:END:~%~%~a"
blueprint-content))
(format nil "SUCCESS - Architect established PROTOCOL in ~a" note-path)))
#+end_src
* Registration

View File

@@ -0,0 +1,54 @@
#+TITLE: SKILL: Org-GTD Archive Roam Daily (Universal Literate Note)
#+ID: skill-org-gtd-archive-roam-daily
#+STARTUP: content
#+FILETAGS: :emacs:gtd:roam:archiving:psf:
* Overview
The **Org-GTD Archive Roam Daily** skill enables chronological archiving of completed GTD tasks. Instead of a flat archive file, tasks are moved to their respective `org-roam-dailies` files based on their `:CREATED:` property, preserving contextual and temporal integrity.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for chronologically-aware task archiving.
** 2. User Needs
- **Temporal Alignment:** Archive tasks to the daily file matching their creation date.
- **Context Preservation:** Maintain all properties and sub-elements during the move.
- **Robust Extraction:** Correctly parse `:CREATED:` property timestamps.
- **Fail-safe Logic:** Default to current date if `:CREATED:` is missing (with a warning).
** 3. Success Criteria
*** TODO Successful extraction of [YYYY-MM-DD] from :CREATED:
*** TODO Automated creation of non-existent daily files during archive
*** TODO Subtree relocation verification
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for subtree manipulation and Roam daily resolution. Source of truth is the task's metadata and the Roam directory.
** 2. Semantic Interfaces
#+begin_src elisp
(defun org-gtd-archive-to-roam-daily ()
"Main command to archive current subtree to its creation-date daily.")
(defun get-target-roam-daily-path (creation-date)
"Resolves the file path for a specific date in org-roam-dailies.")
#+end_src
* Phase D: Build (Implementation)
Implementation logic is in `projects/org-gtd-archive-roam-daily/org-gtd-archive-roam-daily.el`.
** Archiving Command
#+begin_src elisp
;; Logic for subtree movement
#+end_src
* Phase E: Chaos (Verification)
Verification involves archiving tasks with various dates and ensuring they land in the correct files with zero data loss.

View File

@@ -0,0 +1,54 @@
#+TITLE: SKILL: Org-JSON Bridge (Universal Literate Note)
#+ID: skill-org-json-bridge
#+STARTUP: content
#+FILETAGS: :org-mode:json:manipulation:psf:
* Overview
The **Org-JSON Bridge** enables programmatic manipulation of Org-mode files by converting them into a structured JSON representation and vice-versa. This bypasses the fragility of direct string manipulation for complex structures like tables, properties, and source blocks.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the interfaces for bidirectional Org-to-JSON conversion.
** 2. User Needs
- **Robust Parsing:** Convert Org-mode files into structured JSON AST.
- **High-Fidelity Rendering:** Re-materialize JSON AST back into syntactically correct Org-mode text.
- **Complex Structure Support:** Handle tables, property drawers, and source blocks without data loss.
- **Programmatic API:** Provide a CLI and Lisp interface for other skills to use.
** 3. Success Criteria
*** TODO Parse Org-mode to JSON AST without loss of hierarchy
*** TODO Render JSON AST back to Org-mode text matching original format
*** TODO Table row injection via JSON manipulation verification
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
The bridge acts as a translator between the human-readable Org AST and the machine-manipulable JSON format.
** 2. Semantic Interfaces
#+begin_src bash
(defun org-bridge-parse (file-path)
"Executes the Python parser to output JSON AST.")
(defun org-bridge-render (json-path output-path)
"Executes the Python renderer to re-create Org text.")
#+end_src
* Phase D: Build (Implementation)
Implementation logic is in `projects/org-json-bridge/org_bridge.py`.
** Python Parser Wrapper
#+begin_src python
;; Logic for calling the python bridge
#+end_src
* Phase E: Chaos (Verification)
Verification involves round-trip testing: Org -> JSON -> Org must result in a file identical to the source.

View File

@@ -43,22 +43,43 @@ Interfaces for project scaffolding and triggering. Source of truth is the filesy
#+end_src
* Phase D: Build (Implementation)
** Workspace Scaffolding
#+begin_src lisp :tangle projects/org-skill-project-foundry/src/foundry-logic.lisp
(defun scaffold-project (name type)
"Physically creates the material PSF project and the Universal Literate Note."
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
(project-dir (format nil "~a/~a/" projects-dir name))
(notes-dir (or (uiop:getenv "MEMEX_NOTES") "notes/"))
(skills-dir (or (uiop:getenv "SKILLS_DIR") "system/skills/"))
(project-dir (format nil "~aorg-skill-~a/" projects-dir name))
(note-path (format nil "~aorg-skill-~a.org" notes-dir name))
(skill-link (format nil "~aorg-skill-~a.org" skills-dir name))
(gtd-file (or (uiop:getenv "GTD_FILE") "gtd.org"))
(timestamp (local-time:format-timestring nil (local-time:now) :format '("[" :year "-" :month "-" :day " " :weekday "]"))))
(if (uiop:directory-exists-p project-dir)
(format nil "ERROR: Project ~a exists." name)
(if (or (uiop:directory-exists-p project-dir) (uiop:file-exists-p note-path))
(format nil "ERROR - Project or Note for ~a already exists." name)
(progn
(kernel-log "FOUNDRY - Scaffolding Universal PSF project: ~a" name)
;; 1. Create Material Project Structure
(ensure-directories-exist (format nil "~asrc/" project-dir))
(ensure-directories-exist (format nil "~atests/" project-dir))
(ensure-directories-exist (format nil "~adocs/" project-dir))
(uiop:run-program (list "git" "init" project-dir))
(format nil "SUCCESS: Project ~a scaffolded." name)))))
;; 2. Create Universal Literate Note
(with-open-file (out note-path :direction :output :if-exists :supersede)
(format out "#+TITLE: SKILL: ~a (Universal Literate Note)~%#+ID: skill-~a~%#+STARTUP: content~%#+FILETAGS: :~a:psf:~%~%* Overview~%Automatically scaffolded ~a project.~%~%* Phase A: Demand (PRD)~%:PROPERTIES:~%:STATUS: DRAFT~%:END:~%~%** 1. Purpose~%Define the 'Why' and 'What' for ~a.~%"
name name type name name))
;; 3. Establish System Actuator Link
(uiop:run-program (list "ln" "-sf" note-path skill-link))
;; 4. Link to GTD.org
(with-open-file (out gtd-file :direction :output :if-exists :append)
(format out "~%** NEXT org-skill-~a~% :PROPERTIES:~% :ID: proj-~a~% :CREATED: ~a~% :PROJECT-PATH: ~a~% :PSF-STATE: A: DEMAND~% :END:~% Drafted by Project Foundry.~%"
name name timestamp project-dir))
(format nil "SUCCESS - Universal PSF Project ~a scaffolded." name)))))
#+end_src
* Registration

View File

@@ -44,17 +44,84 @@ Interfaces for TDD suite actuation and protocol perception. Source of truth is t
* Phase D: Build (Implementation)
** Protocol Perception
#+begin_src lisp :tangle projects/org-skill-tech-analyst/src/analyst-logic.lisp
(defun tech-analyst-perceive-signed-protocol (note-path)
"Checks if a master note has a SIGNED PROTOCOL and lacks a TDD suite in the material project."
(let* ((content (uiop:read-file-string note-path))
(filename (pathname-name note-path))
(project-name (subseq filename 10)) ; Extract 'name' from 'org-skill-name'
(projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
(test-path (format nil "~aorg-skill-~a/tests/test-suite.lisp" projects-dir project-name)))
(when (and (search "* Phase B: Blueprint (PROTOCOL)" content)
(search ":STATUS: SIGNED" content)
(not (uiop:file-exists-p test-path)))
`(:project-name ,project-name :note-path ,note-path :content ,content))))
(defun tech-analyst-scan-all-notes ()
"Scans all org-skill-*.org notes for blueprints ready for testing."
(let ((notes-dir (or (uiop:getenv "MEMEX_NOTES") "notes/"))
(ready-notes '()))
(dolist (file (uiop:directory-files notes-dir "org-skill-*.org"))
(let ((status (tech-analyst-perceive-signed-protocol file)))
(when status (push status ready-notes))))
ready-notes))
#+end_src
** Cognitive Trigger
#+begin_src lisp :tangle projects/org-skill-tech-analyst/src/analyst-logic.lisp
(defun trigger-skill-tech-analyst (context)
"Triggers on heartbeat if any master note is in a SIGNED PROTOCOL state."
(let ((type (getf context :type))
(payload (getf context :payload)))
(when (and (eq type :EVENT) (eq (getf payload :sensor) :heartbeat))
(let ((ready (tech-analyst-scan-all-notes)))
(when ready
(setf (getf (getf context :payload) :ready-blueprints) ready)
t)))))
#+end_src
** Neuro-Cognitive Prompt
#+begin_src lisp :tangle projects/org-skill-tech-analyst/src/analyst-logic.lisp
(defun neuro-skill-tech-analyst (context)
(let* ((payload (getf context :payload))
(note (car (getf payload :ready-blueprints)))
(name (getf note :project-name))
(protocol-content (getf note :content)))
(format nil "
You are the PSF Technical Analyst.
The Master Note for project '~a' has a SIGNED PROTOCOL and needs a TDD Suite.
PROTOCOL CONTENT:
---
~a
---
TASK:
Generate a comprehensive Common Lisp test suite (failing/RED).
1. Use FiveAM for testing.
2. Match function signatures exactly as defined in the PROTOCOL.
Return a Lisp plist: (:target :analyst :action :actuate :name \"~a\" :content \"...test code...\")
" name protocol-content name)))
#+end_src
** TDD Suite Actuation
#+begin_src lisp :tangle projects/org-skill-tech-analyst/src/analyst-logic.lisp
(defun tech-analyst-actuate (project-name test-content)
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
(project-dir (format nil "~a/~a/" projects-dir project-name))
(defun tech-analyst-actuate (action context)
(let* ((payload (getf action :payload))
(project-name (getf payload :name))
(test-content (getf payload :content))
(projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/"))
(project-dir (format nil "~aorg-skill-~a/" projects-dir project-name))
(test-dir (format nil "~atests/" project-dir))
(test-path (format nil "~atests/test-suite.lisp" project-dir)))
(kernel-log "ANALYST - Actuating TDD Suite for ~a" project-name)
(ensure-directories-exist test-dir)
(with-open-file (out test-path :direction :output :if-exists :supersede)
(format out ";;; TDD Suite for ~a~%~a" project-name test-content))
(format nil "SUCCESS - Tech-Analyst established TDD Suite for ~a" project-name)))
(format nil "SUCCESS - Technical Analyst established TDD Suite for ~a" project-name)))
#+end_src
* Registration

View File

@@ -0,0 +1,55 @@
#+TITLE: PROJECT: Personal Server Appliance (Universal Literate Note)
#+ID: project-personal-server-appliance
#+STARTUP: content
#+FILETAGS: :hardware:server:sovereignty:modular:psf:
* Overview
The **Personal Server Appliance** project aims to design and develop a modular, high-integrity computing environment. It features swappable modules for compute, storage, networking, and signal processing, packaged in a sleek 10-inch or standard 19-inch form factor that resembles high-end audio equipment.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a modular, user-serviceable, and aesthetically pleasing personal server.
** 2. User Needs
- **Modularity:** Unified backplane for swappable compute, storage, and power modules.
- **Sovereignty:** Full control over hardware and the software stack (running `org-agent`).
- **Aesthetics:** Sleek "Hi-Fi" industrial design.
- **Multimodality:** Integration of SDR, AV, and specialized processors.
** 3. Success Criteria
*** TODO Inter-module communication standard specification
*** TODO Power delivery backplane design (schematic)
*** TODO Compute module (Arm/RISC-V) software stack definition
*** TODO 10-inch form factor industrial design stubs
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for hardware status monitoring and inter-module orchestration. Source of truth is the physical hardware spec and the kernel telemetry.
** 2. Semantic Interfaces
#+begin_src lisp
(defun server-module-status (module-id)
"Retrieves health and load telemetry from a specific hardware module.")
(defun server-shutdown-sequence ()
"Gracefully powers down all modules via the backplane controller.")
#+end_src
* Phase D: Build (Implementation)
Implementation involves PCB designs (KiCad), CAD models (FreeCAD), and driver software.
** Hardware Logic (Software Component)
#+begin_src lisp
;; Implementation of hardware monitoring stubs
#+end_src
* Phase E: Chaos (Verification)
Verification involves thermal stress testing, power-fail recovery simulation, and bus protocol integrity audits.

View File

@@ -0,0 +1,52 @@
#+TITLE: PROJECT: Revenue Sustainability (Universal Literate Note)
#+ID: project-revenue-sustainability
#+STARTUP: content
#+FILETAGS: :business:revenue:strategy:operations:psf:
* Overview
The **Revenue Sustainability** project defines the strategy and operational setup for financial independence and sustainable business growth. It focuses on establishing the necessary infrastructure for payment processing, professional presence, and contractual integrity.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a robust, sustainable revenue generation and management system.
** 2. User Needs
- **Payment Processing:** Integration with Stripe for seamless customer transactions.
- **Professional Presence:** Portfolio page, domain, and branded email.
- **Operational Integrity:** Time tracking, invoicing (Wave/Bonsai), and legal contract templates.
- **Social Proof:** System for testimonial collection and reputation management.
** 3. Success Criteria
*** TODO Stripe account verification and test transaction
*** TODO Portfolio page deployment (GitHub Pages)
*** TODO Contract template draft (Legal Review)
*** TODO Social media presence (Twitter/X, LinkedIn) setup
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for financial telemetry and operational workflows. Source of truth is the financial ledgers and professional domain settings.
** 2. Semantic Interfaces
#+begin_src bash
(defun revenue-get-monthly-report ()
"Aggregates data from Stripe and invoicing tools for an executive summary.")
#+end_src
* Phase D: Build (Implementation)
Implementation involves account setups, web development, and document drafting.
** Business Artifacts
#+begin_src bash
;; Placeholder for portfolio source, contract drafts, and operational SOPs
#+end_src
* Phase E: Chaos (Verification)
Verification involves periodic budget audits, conversion rate tracking, and operational stress-testing of the invoicing pipeline.

50
notes/sdr-suite-lisp.org Normal file
View File

@@ -0,0 +1,50 @@
#+TITLE: PROJECT: SDR Suite Lisp (Universal Literate Note)
#+ID: project-sdr-suite-lisp
#+STARTUP: content
#+FILETAGS: :radio:sdr:lisp:signal-processing:psf:
* Overview
The **SDR Suite Lisp** project aims to develop a comprehensive Software Defined Radio environment using Common Lisp. It leverages the high-performance, threaded nature of SBCL to provide real-time signal processing across various domains, from satellite communication to passive radar and computer networking.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the functional and technical requirements for a Lisp-native SDR architecture.
** 2. User Needs
- **Real-time Signal Processing:** High-performance DSP loops in Common Lisp.
- **Multimodal Support:** Unified framework for EME, ALE, SSTV, and standard Rx (FM/AM).
- **Extensibility:** Modular "plug-and-play" architecture for new decoders and protocols.
- **Hardware Agnostic:** Support for RTL-SDR, HackRF, and high-end FPGA-based SDRs.
** 3. Success Criteria
*** TODO Core DSP Loop Benchmarking (SBCL)
*** TODO RTL-SDR Driver Interface (via CFFI)
*** TODO Basic FM Broadcast Decoder Implementation
*** TODO Spectral Waterfall Visualization Stubs
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for IQ stream processing and protocol dispatch. Source of truth is the physical signal and the DSP mathematical specifications.
** 2. Semantic Interfaces
#+begin_src lisp
(defun sdr-perceive-stream (source-id buffer-size)
"Initializes the IQ sample stream from the hardware source.")
(defun sdr-decode-fm (iq-samples)
"Applies de-emphasis and filtering to extract audio from IQ data.")
#+end_src
* Phase D: Build (Implementation)
Current implementation status is "Architecture Research." Placeholder for CFFI bindings and DSP libraries.
* Phase E: Chaos (Verification)
Verification involves signal fidelity audits and real-time latency testing under various CPU loads.

View File

@@ -0,0 +1,55 @@
#+TITLE: PROJECT: Token Optimization (Universal Literate Note)
#+ID: project-token-optimization
#+STARTUP: content
#+FILETAGS: :strategy:token:optimization:cost:psf:
* Overview
The **Token Optimization** project defines the strategy and implementation for cost-effective LLM usage. It implements a multi-tier, multi-provider approach to minimize inference costs while maximizing reasoning capability through smart routing and context compression.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Minimize LLM operational expenses while maintaining high-fidelity agentic performance.
** 2. User Needs
- **Multi-Tier Strategy:** Resolve tasks using the cheapest model that meets the required intelligence threshold.
- **Failover Resilience:** Automated fallback chain (Gemini -> OpenRouter -> GPT-4o).
- **Context Efficiency:** Implement pruning and RAG to avoid token bloat.
- **Usage Transparency:** Real-time tracking and budget alerts.
** 3. Success Criteria
*** TODO 80% of queries handled by Tier 1 (Free/Fast) models
*** TODO Automated fallback triggered on rate limits
*** TODO Context compression reducing average prompt size by 30%
*** TODO Budget alerts active at 80% threshold
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for dynamic model selection and cost-aware request routing. Source of truth is the `openclaw.json` configuration and real-time provider telemetry.
** 2. Semantic Interfaces
#+begin_src lisp
(defun token-resolve-model (task-complexity)
"Selects the optimal model tier based on task metadata.")
(defun token-compress-context (raw-context)
"Applies pruning heuristics to reduce token count.")
#+end_src
* Phase D: Build (Implementation)
Implementation consists of configuration and routing logic located in `projects/token-optimization/`.
** Routing Logic
#+begin_src lisp
;; Logic for complexity-based routing stubs
#+end_src
* Phase E: Chaos (Verification)
Verification involves A/B testing model choices and simulating rate limits to verify fallback integrity.

View File

@@ -0,0 +1,50 @@
#+TITLE: PROJECT: Zotero Org Import Tool (Universal Literate Note)
#+ID: project-zotero-org-import-tool
#+STARTUP: content
#+FILETAGS: :research:zettelkasten:zotero:import:psf:
* Overview
The **Zotero Org Import Tool** is a "makeshift" utility designed to bridge the gap between academic research management (Zotero) and the personal knowledge base (Org-mode). It focuses on two critical priorities: accurate linking to academic PDFs and creating persistent web snapshots for bookmarks.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Define the requirements for a high-fidelity import of research artifacts from Zotero to Org-mode.
** 2. User Needs
- **BibTeX/JSON Parsing:** Ingest Zotero libraries via standard export formats.
- **Attachment Linking:** Maintain durable links to local PDF attachments.
- **Web Persistence:** Generate local or service-based snapshots of imported URLs.
- **Org-Native Schema:** Map Zotero metadata fields to appropriate Org properties.
** 3. Success Criteria
*** TODO Successful parsing of Zotero JSON export
*** TODO Verification of direct PDF file links in Org headlines
*** TODO Snapshot generation for at least one web bookmark
*** TODO Automated :CREATED: property injection based on Zotero "Date Added"
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
** 1. Architectural Intent
Interfaces for data transformation and snapshot retrieval. Source of truth is the Zotero SQLite database/export and the local filesystem.
** 2. Semantic Interfaces
#+begin_src bash
(defun zotero-import-library (export-path)
"Parses the export and appends new entries to library.org.")
(defun zotero-resolve-attachment (zotero-key)
"Locates the physical PDF associated with a Zotero record.")
#+end_src
* Phase D: Build (Implementation)
Current implementation status is "Demand Phase." Placeholder for future Lisp/Python logic.
* Phase E: Chaos (Verification)
Verification involves importing a test collection and ensuring all PDFs are openable and all web links have valid snapshots.