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

53
gtd.org
View File

@@ -695,6 +695,59 @@ See project documents: [[file:5_projects/token-optimization/README.org][token-op
:CREATED: [2026-03-17 Tue 13:40] :CREATED: [2026-03-17 Tue 13:40]
:END: :END:
** PSF Skill: Architect Agent
:PROPERTIES:
:ID: proj-skill-architect
:PROJECT-PATH: $PROJECTS_DIR/org-skill-architect
:PSF-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Technical Analyst Agent
:PROPERTIES:
:ID: proj-skill-tech-analyst
:PROJECT-PATH: $PROJECTS_DIR/org-skill-tech-analyst
:PSF-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Project Foundry Agent
:PROPERTIES:
:ID: proj-skill-project-foundry
:PROJECT-PATH: $PROJECTS_DIR/org-skill-project-foundry
:PSF-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Scribe Agent
:PROPERTIES:
:ID: proj-skill-scribe
:PROJECT-PATH: $PROJECTS_DIR/org-skill-scribe
:PSF-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Memex Manager
:PROPERTIES:
:ID: proj-skill-memex
:PROJECT-PATH: $PROJECTS_DIR/org-skill-memex
:PSF-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Infrastructure & Providers (Batch refactor)
:PROPERTIES:
:ID: proj-skill-batch-refactor
:PSF-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Refactored 28 infrastructure, provider, and intelligence skills into the Universal Note architecture.
* Incubate * Incubate
:PROPERTIES: :PROPERTIES:
:ID: gtd-incubate :ID: gtd-incubate

257
inbox.org
View File

@@ -8747,3 +8747,260 @@ Org Social is a decentralized social network that runs on an Org Mode file over
:CREATED: [2026-03-31 Tue 13:02] :CREATED: [2026-03-31 Tue 13:02]
:END: :END:
* [[https://github.com/timkosters/agent-yolo-build][timkosters/agent-yolo-build: Run /yolo, walk away, come back to a working MVP. Autonomous build skill for AI coding agents.]]
:PROPERTIES:
:TITLE: timkosters/agent-yolo-build: Run /yolo, walk away, come back to a working MVP. Autonomous build skill for AI coding agents.
:URI: https://github.com/timkosters/agent-yolo-build
:CREATED: [2026-03-31 Tue 13:03]
:END:
* [[https://github.com/AlexsJones/llmfit][AlexsJones/llmfit: Hundreds of models & providers. One command to find what runs on your hardware.]]
:PROPERTIES:
:TITLE: AlexsJones/llmfit: Hundreds of models & providers. One command to find what runs on your hardware.
:URI: https://github.com/AlexsJones/llmfit
:CREATED: [2026-03-31 Tue 13:04]
:END:
Hundreds of models & providers. One command to find what runs on your hardware.
* [[https://github.com/Polymarket/polymarket-cli][Polymarket/polymarket-cli]]
:PROPERTIES:
:TITLE: Polymarket/polymarket-cli
:URI: https://github.com/Polymarket/polymarket-cli
:CREATED: [2026-03-31 Tue 13:05]
:END:
* [[https://github.com/ComposioHQ/agent-orchestrator][ComposioHQ/agent-orchestrator: Agentic orchestrator for parallel coding agents — plans tasks, spawns agents, and autonomously handles CI fixes, merge conflicts, and code reviews.]]
:PROPERTIES:
:TITLE: ComposioHQ/agent-orchestrator: Agentic orchestrator for parallel coding agents — plans tasks, spawns agents, and autonomously handles CI fixes, merge conflicts, and code reviews.
:URI: https://github.com/ComposioHQ/agent-orchestrator
:CREATED: [2026-03-31 Tue 13:05]
:END:
Agentic orchestrator for parallel coding agents — plans tasks, spawns agents, and autonomously handles CI fixes, merge conflicts, and code reviews.
* [[https://github.com/crshdn/mission-control][crshdn/mission-control: The world's first Autonomous Product Engine (APE): AI agents research your market, generate features, and ship code as PRs. Convoy mode, crash recovery, cost tracking, 80+ API endpoints. Self-hosted via OpenClaw Gateway.]]
:PROPERTIES:
:TITLE: crshdn/mission-control: The world's first Autonomous Product Engine (APE): AI agents research your market, generate features, and ship code as PRs. Convoy mode, crash recovery, cost tracking, 80+ API endpoints. Self-hosted via OpenClaw Gateway.
:URI: https://github.com/crshdn/mission-control
:CREATED: [2026-03-31 Tue 13:06]
:END:
The world's first Autonomous Product Engine (APE): AI agents research your market, generate features, and ship code as PRs. Convoy mode, crash recovery, cost tracking, 80+ API endpoints. Self-hosted via OpenClaw Gateway.
* [[https://github.com/obra/superpowers][obra/superpowers: An agentic skills framework & software development methodology that works.]]
:PROPERTIES:
:TITLE: obra/superpowers: An agentic skills framework & software development methodology that works.
:URI: https://github.com/obra/superpowers
:CREATED: [2026-03-31 Tue 13:08]
:END:
* [[https://github.com/paperclipai/paperclip][paperclipai/paperclip: Open-source orchestration for zero-human companies]]
:PROPERTIES:
:TITLE: paperclipai/paperclip: Open-source orchestration for zero-human companies
:URI: https://github.com/paperclipai/paperclip
:CREATED: [2026-03-31 Tue 13:08]
:END:
* [[https://github.com/bytedance/deer-flow][bytedance/deer-flow: An open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message gateway, it handles different levels of tasks that could take minutes to hours.]]
:PROPERTIES:
:TITLE: bytedance/deer-flow: An open-source long-horizon SuperAgent harness that researches, codes, and creates. With the help of sandboxes, memories, tools, skill, subagents and message gateway, it handles different levels of tasks that could take minutes to hours.
:URI: https://github.com/bytedance/deer-flow
:CREATED: [2026-03-31 Tue 13:10]
:END:
* [[https://github.com/FujiwaraChoki/MoneyPrinterV2][FujiwaraChoki/MoneyPrinterV2: Automate the process of making money online.]]
:PROPERTIES:
:TITLE: FujiwaraChoki/MoneyPrinterV2: Automate the process of making money online.
:URI: https://github.com/FujiwaraChoki/MoneyPrinterV2
:CREATED: [2026-03-31 Tue 13:12]
:END:
* [[https://github.com/sickn33/antigravity-awesome-skills][sickn33/antigravity-awesome-skills: Installable GitHub library of 1,340+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.]]
:PROPERTIES:
:TITLE: sickn33/antigravity-awesome-skills: Installable GitHub library of 1,340+ agentic skills for Claude Code, Cursor, Codex CLI, Gemini CLI, Antigravity, and more. Includes installer CLI, bundles, workflows, and official/community skill collections.
:URI: https://github.com/sickn33/antigravity-awesome-skills
:CREATED: [2026-03-31 Tue 13:12]
:END:
* [[https://github.com/RKiding/Awesome-finance-skills][RKiding/Awesome-finance-skills: A collection of Awesome Finance Agent Skills for free and easy to start | 一系列开源免费的金融分析Agent Skills]]
:PROPERTIES:
:TITLE: RKiding/Awesome-finance-skills: A collection of Awesome Finance Agent Skills for free and easy to start | 一系列开源免费的金融分析Agent Skills
:URI: https://github.com/RKiding/Awesome-finance-skills
:CREATED: [2026-03-31 Tue 13:13]
:END:
* [[https://github.com/nullclaw/nullclaw][nullclaw/nullclaw: Fastest, smallest, and fully autonomous AI assistant infrastructure written in Zig]]
:PROPERTIES:
:TITLE: nullclaw/nullclaw: Fastest, smallest, and fully autonomous AI assistant infrastructure written in Zig
:URI: https://github.com/nullclaw/nullclaw
:CREATED: [2026-03-31 Tue 13:14]
:END:
* [[https://github.com/financial-datasets/mcp-server][financial-datasets/mcp-server: An MCP server for interacting with the Financial Datasets stock market API.]]
:PROPERTIES:
:TITLE: financial-datasets/mcp-server: An MCP server for interacting with the Financial Datasets stock market API.
:URI: https://github.com/financial-datasets/mcp-server
:CREATED: [2026-03-31 Tue 13:15]
:END:
* [[https://github.com/wangziqi06/724-office][wangziqi06/724-office: 7/24 Office — Self-evolving AI Agent system. 26 tools, 3500 lines pure Python, MCP/Skill plugins, three-layer memory, self-repair, 24/7 production.]]
:PROPERTIES:
:TITLE: wangziqi06/724-office: 7/24 Office — Self-evolving AI Agent system. 26 tools, 3500 lines pure Python, MCP/Skill plugins, three-layer memory, self-repair, 24/7 production.
:URI: https://github.com/wangziqi06/724-office
:CREATED: [2026-03-31 Tue 13:16]
:END:
* [[https://github.com/usestrix/strix][usestrix/strix: Open-source AI hackers to find and fix your apps vulnerabilities.]]
:PROPERTIES:
:TITLE: usestrix/strix: Open-source AI hackers to find and fix your apps vulnerabilities.
:URI: https://github.com/usestrix/strix
:CREATED: [2026-03-31 Tue 13:16]
:END:
* [[https://github.com/builderz-labs/mission-control][builderz-labs/mission-control: Self-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.]]
:PROPERTIES:
:TITLE: builderz-labs/mission-control: Self-hosted AI agent orchestration platform: dispatch tasks, run multi-agent workflows, monitor spend, and govern operations from one mission control dashboard.
:URI: https://github.com/builderz-labs/mission-control
:CREATED: [2026-03-31 Tue 13:17]
:END:
* [[https://github.com/0xNyk/awesome-hermes-agent][0xNyk/awesome-hermes-agent: A curated list of awesome skills, tools, integrations, and resources for Hermes Agent by Nous Research]]
:PROPERTIES:
:TITLE: 0xNyk/awesome-hermes-agent: A curated list of awesome skills, tools, integrations, and resources for Hermes Agent by Nous Research
:URI: https://github.com/0xNyk/awesome-hermes-agent
:CREATED: [2026-03-31 Tue 13:17]
:END:
* [[https://github.com/tlehman/litprog-skill][tlehman/litprog-skill: Literate programming skill for agent harnesses like Claude Code, OpenCode and Hermes Agent]]
:PROPERTIES:
:TITLE: tlehman/litprog-skill: Literate programming skill for agent harnesses like Claude Code, OpenCode and Hermes Agent
:URI: https://github.com/tlehman/litprog-skill
:CREATED: [2026-03-31 Tue 13:18]
:END:
* [[https://github.com/mvanhorn/last30days-skill][mvanhorn/last30days-skill: AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary]]
:PROPERTIES:
:TITLE: mvanhorn/last30days-skill: AI agent skill that researches any topic across Reddit, X, YouTube, HN, Polymarket, and the web - then synthesizes a grounded summary
:URI: https://github.com/mvanhorn/last30days-skill
:CREATED: [2026-03-31 Tue 13:18]
:END:
* [[https://github.com/danveloper/flash-moe][danveloper/flash-moe: Running a big model on a small laptop]]
:PROPERTIES:
:TITLE: danveloper/flash-moe: Running a big model on a small laptop
:URI: https://github.com/danveloper/flash-moe
:CREATED: [2026-03-31 Tue 13:18]
:END:
* [[https://www.theregister.com/2025/11/27/tenstorrent_quietbox_review/?hl=en-US][Blackhole QuietBox, Tenstorrent's AI workstation reviewed • The Register]]
:PROPERTIES:
:TITLE: Blackhole QuietBox, Tenstorrent's AI workstation reviewed • The Register
:URI: https://www.theregister.com/2025/11/27/tenstorrent_quietbox_review/?hl=en-US
:CREATED: [2026-03-31 Tue 13:18]
:END:
$12K machine promises performance that can scale to 32 chip servers and beyond but immature stack makes harnessing compute challenging
* [[https://paulgraham.com/rootsoflisp.html][The Roots of Lisp]]
:PROPERTIES:
:TITLE: The Roots of Lisp
:URI: https://paulgraham.com/rootsoflisp.html
:CREATED: [2026-03-31 Tue 13:20]
:END:
* [[https://lisp-lang.org/learn/getting-started/][Getting Started | Common Lisp]]
:PROPERTIES:
:TITLE: Getting Started | Common Lisp
:URI: https://lisp-lang.org/learn/getting-started/
:CREATED: [2026-03-31 Tue 13:20]
:END:
* [[https://gigamonkeys.com/book/][Practical Common Lisp]]
:PROPERTIES:
:TITLE: Practical Common Lisp
:URI: https://gigamonkeys.com/book/
:CREATED: [2026-03-31 Tue 13:20]
:END:
* [[https://nyxt.atlas.engineer/documentation#extensions][Nyxt browser: Documentation]]
:PROPERTIES:
:TITLE: Nyxt browser: Documentation
:URI: https://nyxt.atlas.engineer/documentation#extensions
:CREATED: [2026-03-31 Tue 13:22]
:END:
* [[https://github.com/MatthewZMD/aidermacs][MatthewZMD/aidermacs: AI Pair Programming in Emacs with Aider]]
:PROPERTIES:
:TITLE: MatthewZMD/aidermacs: AI Pair Programming in Emacs with Aider
:URI: https://github.com/MatthewZMD/aidermacs
:CREATED: [2026-03-31 Tue 13:23]
:END:
* [[https://github.com/lizqwerscott/mcp.el][lizqwerscott/mcp.el: An Mcp client inside Emacs]]
:PROPERTIES:
:TITLE: lizqwerscott/mcp.el: An Mcp client inside Emacs
:URI: https://github.com/lizqwerscott/mcp.el
:CREATED: [2026-03-31 Tue 13:23]
:END:
* [[https://github.com/vivekhaldar/emacs-mcp-server][vivekhaldar/emacs-mcp-server]]
:PROPERTIES:
:TITLE: vivekhaldar/emacs-mcp-server
:URI: https://github.com/vivekhaldar/emacs-mcp-server
:CREATED: [2026-03-31 Tue 13:24]
:END:
* [[https://github.com/MatthewZMD/emigo][MatthewZMD/emigo: Future of Agentic Development in Emacs]]
:PROPERTIES:
:TITLE: MatthewZMD/emigo: Future of Agentic Development in Emacs
:URI: https://github.com/MatthewZMD/emigo
:CREATED: [2026-03-31 Tue 13:24]
:END:
* [[https://github.com/froggey/Mezzano][froggey/Mezzano: An operating system written in Common Lisp]]
:PROPERTIES:
:TITLE: froggey/Mezzano: An operating system written in Common Lisp
:URI: https://github.com/froggey/Mezzano
:CREATED: [2026-03-31 Tue 13:24]
:END:
* [[https://github.com/andreasjansson/greger.el][andreasjansson/greger.el: Agentic coding in Emacs]]
:PROPERTIES:
:TITLE: andreasjansson/greger.el: Agentic coding in Emacs
:URI: https://github.com/andreasjansson/greger.el
:CREATED: [2026-03-31 Tue 13:25]
:END:
* [[https://mwolson.org/blog/emacs/2025-12-03-my-emacs-ai-setup/][Mike Olson - My Emacs AI Setup]]
:PROPERTIES:
:TITLE: Mike Olson - My Emacs AI Setup
:URI: https://mwolson.org/blog/emacs/2025-12-03-my-emacs-ai-setup/
:CREATED: [2026-03-31 Tue 13:25]
:END:
* [[https://spatial-lang.org/][Spatial]]
:PROPERTIES:
:TITLE: Spatial
:URI: https://spatial-lang.org/
:CREATED: [2026-03-31 Tue 13:25]
:END:
A high-level language for programming accelerators
* [[https://clash-lang.org/][Clash: Home]]
:PROPERTIES:
:TITLE: Clash: Home
:URI: https://clash-lang.org/
:CREATED: [2026-03-31 Tue 13:26]
:END:
Clash is an open-source project, licensed under the permissive BSD2 license, and actively maintained by QBayLogic. The Clash project is a Haskell Foundation affiliated project.
* [[https://github.com/QubesOS/qubes-issues/issues/1908][Port Guix for reproducible builds · Issue #1908 · QubesOS/qubes-issues]]
:PROPERTIES:
:TITLE: Port Guix for reproducible builds · Issue #1908 · QubesOS/qubes-issues
:URI: https://github.com/QubesOS/qubes-issues/issues/1908
:CREATED: [2026-03-31 Tue 13:27]
:END:

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) * 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 ** Blueprint Actuation
#+begin_src lisp :tangle projects/org-skill-architect/src/architect-logic.lisp #+begin_src lisp :tangle projects/org-skill-architect/src/architect-logic.lisp
(defun architect-actuate (project-name blueprint-content) (defun architect-actuate (action context)
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/")) (let* ((payload (getf action :payload))
(project-dir (format nil "~a/~a/" projects-dir project-name)) (note-path (getf payload :path))
(protocol-path (format nil "~aPROTOCOL.org" project-dir))) (blueprint-content (getf payload :content)))
(with-open-file (out protocol-path :direction :output :if-exists :supersede)
(format out "#+TITLE: PROTOCOL: ~a~%#+AUTHOR: Architect-Agent~%#+STATUS: DRAFT~%~%~a" (kernel-log "ARCHITECT - Appending PROTOCOL to ~a" note-path)
project-name blueprint-content)) (with-open-file (out note-path :direction :output :if-exists :append)
(format nil "SUCCESS - Architect established PROTOCOL for ~a" project-name))) (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 #+end_src
* Registration * 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 #+end_src
* Phase D: Build (Implementation) * Phase D: Build (Implementation)
** Workspace Scaffolding ** Workspace Scaffolding
#+begin_src lisp :tangle projects/org-skill-project-foundry/src/foundry-logic.lisp #+begin_src lisp :tangle projects/org-skill-project-foundry/src/foundry-logic.lisp
(defun scaffold-project (name type) (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/")) (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")) (gtd-file (or (uiop:getenv "GTD_FILE") "gtd.org"))
(timestamp (local-time:format-timestring nil (local-time:now) :format '("[" :year "-" :month "-" :day " " :weekday "]")))) (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 (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 "~asrc/" project-dir))
(ensure-directories-exist (format nil "~atests/" project-dir)) (ensure-directories-exist (format nil "~atests/" project-dir))
(ensure-directories-exist (format nil "~adocs/" 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 #+end_src
* Registration * Registration

View File

@@ -44,17 +44,84 @@ Interfaces for TDD suite actuation and protocol perception. Source of truth is t
* Phase D: Build (Implementation) * 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 ** TDD Suite Actuation
#+begin_src lisp :tangle projects/org-skill-tech-analyst/src/analyst-logic.lisp #+begin_src lisp :tangle projects/org-skill-tech-analyst/src/analyst-logic.lisp
(defun tech-analyst-actuate (project-name test-content) (defun tech-analyst-actuate (action context)
(let* ((projects-dir (or (uiop:getenv "PROJECTS_DIR") "projects/")) (let* ((payload (getf action :payload))
(project-dir (format nil "~a/~a/" projects-dir project-name)) (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-dir (format nil "~atests/" project-dir))
(test-path (format nil "~atests/test-suite.lisp" 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) (ensure-directories-exist test-dir)
(with-open-file (out test-path :direction :output :if-exists :supersede) (with-open-file (out test-path :direction :output :if-exists :supersede)
(format out ";;; TDD Suite for ~a~%~a" project-name test-content)) (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 #+end_src
* Registration * 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.

View File

@@ -1,31 +0,0 @@
#+TITLE: PRD: Skill - Architect Agent
#+STATUS: FROZEN
#+AUTHOR: Agent
#+CREATED: [2026-03-31 Tue 12:15]
* 1. Purpose
Define the automated architectural behaviors for the PSF Consensus Loop. The Architect skill transforms a FROZEN PRD (Demand) into a rigorous PROTOCOL (Blueprint).
* 2. User Needs
** 2.1 PRD Perception
As the system orchestrator, I need the Architect to identify when a project is ready for blueprinting.
- The Architect MUST monitor `$PROJECTS_DIR` for `PRD.org` files with `#+STATUS: FROZEN`.
** 2.2 Semantic Translation
I need ambiguous requirements translated into executable interfaces.
- The Architect MUST generate `PROTOCOL.org` with Lisp-style function signatures for all core requirements.
- It MUST define the "Architectural Intent" to maintain long-term system integrity.
** 2.3 Institutional Memory Integration
I need architectural decisions to be grounded in experience.
- The Architect MUST reference `notes/institutional-memory.org` when making significant design choices.
** 2.4 Physical Actuation
I need the blueprint to be physically written to the project directory.
- The skill must have a symbolic (Lisp) actuator that writes the generated Org content to the disk.
* 3. Success Criteria
- [ ] **Trigger Accuracy:** Architect correctly identifies a `FROZEN` PRD and ignores `DRAFT` PRDs.
- [ ] **Protocol Generation:** Architect generates a `PROTOCOL.org` that contains at least one valid Lisp interface signature.
- [ ] **File Integrity:** The generated `PROTOCOL.org` is syntactically valid Org-mode and contains the correct front matter (`#+TITLE`, `#+STATUS: DRAFT`).

View File

@@ -1,40 +0,0 @@
#+TITLE: PROTOCOL: Skill - Architect Agent
#+STATUS: DRAFT
#+AUTHOR: Architect-Agent
#+CREATED: [2026-03-31 Tue 12:20]
* 1. Architectural Intent
This protocol defines the shared Lisp interfaces for the Architect skill. It ensures a rigorous "Consensus Loop" by defining how the Architect perceives requirements and actuates blueprints.
Following the **Literate Mandate**, the Architect skill's own implementation must be generated from its Org-mode source.
* 2. Semantic Interfaces
** 2.1 Requirements Perception
#+begin_src lisp
(defun architect-perceive-frozen-prd (project-name)
"Checks if a project has a FROZEN PRD.
Returns a plist: (:status :frozen :path \"path/to/PRD.org\") or NIL."
)
#+end_src
** 2.2 Blueprint Actuation
#+begin_src lisp
(defun architect-actuate-protocol (project-name blueprint-content)
"Physically writes the PROTOCOL.org file.
Input: project name and generated Org content.
Returns a success message or error signal."
)
#+end_src
** 2.3 Memory Retrieval
#+begin_src lisp
(defun architect-query-institutional-memory (context-tags)
"Retrieves relevant architectural patterns from notes/institutional-memory.org.
Input: tags like :emacs:gtd:psf.
Returns a list of relevant patterns/learnings."
)
#+end_src
* 3. Integration with PSF Lifecycle
The Architect is triggered when a project transitions from `:DEMAND` to `:BLUEPRINT`. Its output (a SIGNED Protocol) is the "Safety Gate" for the **Analyst** phase.

View File

@@ -0,0 +1,75 @@
;;;; architect-logic.lisp --- Architectural automation for the PSF (Unified).
;;;; This file is TANGLED from notes/org-skill-architect.org. DO NOT EDIT MANUALLY.
(defpackage :org-skill-architect
(:use :cl :uiop :local-time)
(:export #:architect-perceive-frozen-prd
#:architect-scan-all-notes
#:trigger-skill-architect
#:neuro-skill-architect
#:architect-actuate))
(in-package :org-skill-architect)
(defun kernel-log (message &rest args)
(format t "~&[ARCHITECT] ~?" message args))
(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))
(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)))))
(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)))
(defun architect-actuate (action context)
(let* ((payload (getf action :payload))
(note-path (getf payload :path))
(blueprint-content (getf payload :content)))
(kernel-log "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)))

View File

@@ -0,0 +1,47 @@
import os
import shutil
def simulate_perceive(project_name, projects_dir):
prd_path = os.path.join(projects_dir, project_name, "PRD.org")
protocol_path = os.path.join(projects_dir, project_name, "PROTOCOL.org")
if not os.path.exists(prd_path):
return None
with open(prd_path, 'r') as f:
content = f.read()
if "#+STATUS: FROZEN" in content and not os.path.exists(protocol_path):
return {"project": project_name, "prd_path": prd_path, "content": content}
return None
if __name__ == "__main__":
test_dir = "/tmp/architect_test_projects"
if os.path.exists(test_dir):
shutil.rmtree(test_dir)
os.makedirs(os.path.join(test_dir, "test-project"))
prd_file = os.path.join(test_dir, "test-project", "PRD.org")
print("--- Test 1: Draft PRD ---")
with open(prd_file, "w") as f:
f.write("#+TITLE: Test\n#+STATUS: DRAFT\n")
res = simulate_perceive("test-project", test_dir)
print(f"Result: {res}")
status1 = "PASS" if res is None else "FAIL"
print("\n--- Test 2: Frozen PRD ---")
with open(prd_file, "w") as f:
f.write("#+TITLE: Test\n#+STATUS: FROZEN\n")
res = simulate_perceive("test-project", test_dir)
print(f"Result: {res['project'] if res else None}")
status2 = "PASS" if res and res['project'] == "test-project" else "FAIL"
print("\n--- Test 3: Protocol already exists ---")
with open(os.path.join(test_dir, "test-project", "PROTOCOL.org"), "w") as f:
f.write("exists")
res = simulate_perceive("test-project", test_dir)
print(f"Result: {res}")
status3 = "PASS" if res is None else "FAIL"
print(f"\nFinal Status: {'PASS' if all(s == 'PASS' for s in [status1, status2, status3]) else 'FAIL'}")

View File

@@ -1,47 +0,0 @@
#+TITLE: PRD: Org-Agent Memex (Knowledge Management Standards)
#+STATUS: FROZEN
#+AUTHOR: Agent
#+CREATED: [2026-03-31 Tue 11:45]
* 1. Purpose
Define the functional and technical requirements for an integrated Org-mode workflow that synchronizes Atomic Notes (Zettelkasten) and GTD task management. This PRD serves as the foundational specification for the "Memex Agent" skill.
* 2. User Needs
** 2.1 Unified Knowledge & Task Capture
As a user (Amr), I need a single entry point for all information.
- All new captures MUST land in `memex/inbox.org`.
- No other files are permitted for general inbox capture.
** 2.2 Strict Metadata Compliance
I need my PKM system to maintain high structural integrity.
- Every Org item must have a `:PROPERTIES:` drawer with a `:CREATED:` property in `[YYYY-MM-DD Day HH:MM]` format.
- Collaborative items must use `:AUTHOR:` and `:ASSIGNED:` properties.
- State changes MUST be tracked in a `:LOGBOOK:` drawer following the `:PROPERTIES:` drawer.
** 2.3 Automated Task Lifecycle
I need the agent to manage the "boring" parts of GTD.
- **Automatic NEXT Promotion:** When a `NEXT` item in a sequential project is marked `DONE`, the agent MUST automatically promote the subsequent `TODO` item to `NEXT`.
- **Agenda Coordination:** The agent must place items requiring my attention as `TODO` (planned) or `NEXT` (immediate) in my agenda.
** 2.4 Mobile Sovereignty
I need to interact with my Memex on the go.
- The system must remain compatible with Markor (for text editing) and Orgzly (for agenda management) on Android.
- Sync must be handled via a Git-based state machine (commits as source of truth).
** 2.5 Agentic Distillation (The Scribe)
I need my daily logs transformed into timeless knowledge.
- The agent must read from immutable daily logs (`daily/`).
- It must extract "Evergreen" concepts and write them to `notes/` as atomic notes.
- Atomic notes must have descriptive snake_case filenames (no dates) and a `Source:` backlink.
* 3. Success Criteria
- [ ] **Promotion Logic:** Agent successfully identifies a completed `NEXT` task and promotes its successor in a sequential project.
- [ ] **Metadata Audit:** Agent can identify and flag any Org item missing `:CREATED:` or `:LOGBOOK:` headers.
- [ ] **Scribe Accuracy:** Agent extracts a concept from a daily log and creates a correctly formatted atomic note in `notes/` without user intervention.
- [ ] **Git Synchronization:** All changes are automatically committed to the local repository for versioning and state tracking.
* 4. Constraints
- **Single User/Single Agent:** Designed exclusively for Amr and his Assistant. No multi-user conflict resolution.
- **Environment Driven:** All identity and path values must be pulled from `.env` (e.g., `$MEMEX_USER`, `$MEMEX_NOTES`).
- **Org-mode Native:** No external databases. The `.org` files ARE the database.

View File

@@ -1,57 +0,0 @@
#+TITLE: PROTOCOL: Org-Agent Memex (Knowledge Management Standards)
#+STATUS: SIGNED
#+AUTHOR: Architect-Agent
#+CREATED: [2026-03-31 Tue 12:00]
#+SIGNED: [2026-03-31 Tue 12:45] Agent (Architect)
* 1. Architectural Intent
This protocol defines the shared Lisp interfaces for the "Memex Agent" skill. Its goal is to automate the "boring" parts of the knowledge and task management lifecycle while maintaining strict structural integrity.
Following the **Single User/Single Agent** philosophy, all state transitions are event-driven and strictly reference the Org-mode AST as the primary data store. No external databases are permitted.
* 2. Semantic Interfaces
** 2.1 Metadata Integrity Audit
#+begin_src lisp
(defun memex-audit-metadata (file-path)
"Parses an Org file to ensure all entries comply with KM standards.
Checks for: :CREATED: property, :LOGBOOK: drawer placement, and :AUTHOR:/:ASSIGNED: for collaborative items.
Returns a plist of non-compliant entries: (:file \"path\" :errors (list-of-errors))"
)
(defun memex-fix-metadata (entry-id)
"Attempts to automatically fix missing headers (e.g., adding a missing :LOGBOOK: drawer or current timestamp to :CREATED:)."
)
#+end_src
** 2.2 GTD Task Promotion (The "Baton Pass")
#+begin_src lisp
(defun memex-promote-next-task (project-id)
"Triggered when a NEXT item in a sequential project is marked DONE.
1. Locates the project by ID in gtd.org.
2. Identifies the NEXT available TODO item in the sequence.
3. Promotes it to NEXT, updating the :LOGBOOK: state transition.
4. Returns the promoted task ID or NIL if no tasks remain."
)
#+end_src
** 2.3 Agentic Distillation (The Scribe Loop)
#+begin_src lisp
(defun memex-distill-atomic-note (daily-file-path concept-query)
"Extracts a specific concept from an immutable daily log and transforms it into a timeless atomic note.
1. Scans daily log for headers or tags matching the query.
2. Formats the note with concept-snake_case filename.
3. Adds a 'Source:' backlink to the original daily file.
4. Writes the result to $MEMEX_NOTES/.
Returns the path of the newly created note."
)
#+end_src
* 3. Integration with PARA and Git
The Memex Agent MUST perform a `git commit` after every successful task promotion or note distillation to ensure state persistence and provide a clear audit trail.
#+begin_src lisp
(defun memex-sync-state (commit-message)
"Stages and commits all changes to the local Git repository."
)
#+end_src

View File

@@ -1,34 +0,0 @@
#+TITLE: PRD: Skill - Project Foundry Agent
#+STATUS: FROZEN
#+AUTHOR: Agent
#+CREATED: [2026-03-31 Tue 14:15]
* 1. Purpose
Define the automated project instantiation behaviors for the PSF. The Project Foundry skill transforms a natural language project request (Demand) into a physically scaffolded, high-integrity project structure (Blueprint).
* 2. User Needs
** 2.1 Workspace Scaffolding
As a user (Amr), I need a consistent environment for every new project.
- The Foundry MUST create the standard PSF directory layout (`src/`, `tests/`, `docs/`).
- It MUST generate boilerplate literate files: `README.org`, `PRD.org`, and `PROTOCOL.org`.
** 2.2 Version Control Initialization
I need every project to be a Git repository from day one.
- The Foundry MUST run `git init` in the new project directory.
** 2.3 GTD Integration
I need new projects to be automatically tracked in my task management system.
- The Foundry MUST append the project and its initial tasks (`Draft PRD`, `Draft PROTOCOL`) to `gtd.org`.
- It MUST use `org-edna` or sibling-based triggers to maintain sequential integrity.
** 2.4 Idempotency and Safety
I need to prevent accidental data loss.
- The Foundry MUST NOT overwrite an existing project directory.
- It MUST log all physical actions to the kernel log.
* 3. Success Criteria
- [ ] **Structural Compliance:** Scaffolded project contains all required directories and files.
- [ ] **GTD Linkage:** New project appears in `gtd.org` with correct properties (`:PROJECT-PATH:`, `:PSF-STATE:`).
- [ ] **Literate Boilerplate:** Generated `PRD.org` and `PROTOCOL.org` contain the standard PSF templates.
- [ ] **Error Handling:** Foundry returns a clean error message if the project directory already exists.

View File

@@ -1,33 +0,0 @@
#+TITLE: PROTOCOL: Skill - Project Foundry Agent
#+STATUS: SIGNED
#+AUTHOR: Architect-Agent
#+CREATED: [2026-03-31 Tue 14:20]
* 1. Architectural Intent
This protocol defines the shared Lisp interfaces for the Project Foundry skill. It ensures that every project in the Memex is instantiated with high structural and semantic integrity.
* 2. Semantic Interfaces
** 2.1 Project Scaffolding
#+begin_src lisp
(defun scaffold-project (name type)
"Physically creates the PSF project structure on disk and links it to GTD."
)
#+end_src
** 2.2 Trigger Perception
#+begin_src lisp
(defun trigger-skill-project-foundry (context)
"Determines if the current context warrants a project instantiation."
)
#+end_src
** 2.3 Proposal Verification
#+begin_src lisp
(defun verify-skill-project-foundry (proposed-action context)
"Validates the Neuro-cognitive proposal before physical actuation."
)
#+end_src
* 3. Integration with GTD
The Foundry MUST append a new project entry to `gtd.org` using the standard PSF template, including `:PSF-STATE: A: DEMAND` and `:TRIGGER: next-sibling!`.

View File

@@ -0,0 +1,57 @@
;;;; foundry-logic.lisp --- Universal project scaffolding.
;;;; This file is TANGLED from notes/org-skill-project-foundry.org. DO NOT EDIT MANUALLY.
(defpackage :org-skill-project-foundry
(:use :cl :uiop :local-time)
(:export #:scaffold-project
#:trigger-skill-project-foundry
#:verify-skill-project-foundry))
(in-package :org-skill-project-foundry)
(defun kernel-log (message &rest args)
(format t "~&[FOUNDRY] ~?" message args))
(defun trigger-skill-project-foundry (context)
(let ((type (getf context :type))
(payload (getf context :payload)))
(and (eq type :EVENT)
(eq (getf payload :sensor) :delegation)
(eq (getf payload :target-skill) :foundry))))
(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/"))
(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 " " :hour ":" :min "]"))))
(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 "Scaffolding Universal PSF project: ~a" name)
(ensure-directories-exist (format nil "~asrc/" project-dir))
(ensure-directories-exist (format nil "~atests/" project-dir))
(ensure-directories-exist (format nil "~adocs/" project-dir))
(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))
(uiop:run-program (list "ln" "-sf" note-path skill-link))
(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)))))
(defun verify-skill-project-foundry (proposed-action context)
(let* ((payload (getf proposed-action :payload))
(action (getf proposed-action :action))
(name (getf payload :name))
(type (getf payload :type)))
(if (eq action :scaffold)
(let ((result (scaffold-project name type)))
`(:target :emacs :action :message :text ,result))
nil)))

View File

@@ -1,36 +0,0 @@
#+TITLE: PRD: Skill - Scribe Agent
#+STATUS: FROZEN
#+AUTHOR: Agent
#+CREATED: [2026-03-31 Tue 13:45]
* 1. Purpose
The Scribe Agent is the automated distillation and auditing engine for the PSF. Its primary goal is to prevent "context rot" by transforming daily captures into atomic notes and ensuring project compliance with PSF standards.
* 2. User Needs
** 2.1 Knowledge Distillation
As a user (Amr), I need my ephemeral daily thoughts transformed into a structured knowledge base.
- The Scribe MUST extract core concepts from `$MEMEX_DAILY`.
- It MUST generate normalized atomic notes in `$MEMEX_NOTES`.
- It MUST preserve provenance via `Source:` backlinks.
** 2.2 Incremental Processing
I need the system to be efficient and avoid redundant work.
- The Scribe MUST use Git state tracking (commit hashes) to identify only new content.
- It MUST maintain state in a Lisp-native format (`scribe-state.lisp`) for full system introspection.
** 2.3 PSF Mandate Audit
I need my foundry projects to maintain high integrity.
- The Scribe MUST audit active projects for `PRD.org`, `PROTOCOL.org`, and Literate Programming blocks.
- It MUST flag "Mandate Violations" in `institutional-memory.org`.
** 2.4 Autonomous Execution
I need the Scribe to run reliably without manual intervention.
- The skill must be compatible with cron-based triggers.
- It must handle path normalization via environment variables.
* 3. Success Criteria
- [ ] **Distillation Accuracy:** Scribe identifies a concept in a daily log and creates a correctly formatted atomic note.
- [ ] **Provenance Check:** Atomic notes contain a valid `Source:` link back to the daily file.
- [ ] **Audit Trigger:** Scribe correctly identifies a project missing a `PROTOCOL.org` and records the violation.
- [ ] **State Persistence:** `distillation-state.json` is updated after every successful run.

View File

@@ -1,48 +0,0 @@
#+TITLE: PROTOCOL: Skill - Scribe Agent
#+STATUS: SIGNED
#+AUTHOR: Architect-Agent
#+CREATED: [2026-03-31 Tue 13:50]
#+SIGNED: [2026-03-31 Tue 13:55] Agent (Architect)
* 1. Architectural Intent
This protocol defines the shared Lisp interfaces for the Scribe skill. It ensures that the distillation of ephemeral thoughts and the auditing of foundry integrity are performed deterministically and with clear provenance.
Following the **Literate Mandate**, the Scribe skill's implementation must be tangled from its Org-mode source.
* 2. Semantic Interfaces
** 2.1 State Perception
#+begin_src lisp
(defun scribe-scan-for-knowledge-gaps ()
"Uses 'git diff' against the last processed commit hash to identify new content in $MEMEX_DAILY.
Returns a list of daily files with new content."
)
#+end_src
** 2.2 Concept Distillation
#+begin_src lisp
(defun scribe-distill-concept (daily-path concept-meta)
"Transforms a raw capture into an atomic note.
Input: (:title \"Concept Title\" :content \"Body text\" :source \"daily/2026-03-31.org\")
Output: Path to the new note in $MEMEX_NOTES."
)
#+end_src
** 2.3 Mandate Auditing
#+begin_src lisp
(defun scribe-audit-foundry-mandate (project-name)
"Checks a project for compliance with PSF Level 3 standards.
Checks: PRD.org exists, PROTOCOL.org exists, src/ contains tangled blocks.
Returns a list of violations or NIL if compliant."
)
#+end_src
** 2.4 Integrity Reporting
#+begin_src lisp
(defun scribe-record-violation (project-name violation-type)
"Appends a Mandate Violation entry to notes/institutional-memory.org."
)
#+end_src
* 3. Integration with Cron and Git
The Scribe runs as an asynchronous process. It MUST update `scribe-state.lisp` (containing a Lisp alist) and perform a Git commit after each successful batch.

View File

@@ -1,33 +0,0 @@
#+TITLE: PRD: Skill - Technical Analyst Agent
#+STATUS: FROZEN
#+AUTHOR: Agent
#+CREATED: [2026-03-31 Tue 12:25]
* 1. Purpose
Define the automated testing and analysis behaviors for the PSF Consensus Loop. The Technical Analyst skill transforms a SIGNED PROTOCOL (Blueprint) into a comprehensive, failing TDD suite (Success Criteria).
* 2. User Needs
** 2.1 Protocol Perception
As the system orchestrator, I need the Analyst to identify when an architecture is ready for testing.
- The Analyst MUST monitor `$PROJECTS_DIR` for `PROTOCOL.org` files with `#+STATUS: SIGNED`.
** 2.2 TDD Inception (Success Criteria)
I need rigorous test cases generated from semantic interfaces.
- The Analyst MUST generate a test suite in the project's `tests/` directory.
- It MUST cover both the "Happy Path" and "Edge Case" scenarios.
- It MUST ensure that all tests match the function signatures defined in the project's `PROTOCOL.org`.
** 2.3 Automated Test Execution (Initial)
I need the Analyst to verify that the tests *fail* initially (Red-Green-Refactor).
- The skill must have a symbolic (Lisp) actuator that writes the generated test code and confirms its existence.
** 2.4 Structural Enforcement
I need the Analyst to ensure the project's `tests/` directory is correctly initialized.
- The Analyst MUST be able to scaffold the `tests/` directory if it is missing.
* 3. Success Criteria
- [ ] **Trigger Accuracy:** Analyst correctly identifies a `SIGNED` PROTOCOL and ignores `DRAFT` Protocols.
- [ ] **TDD Suite Generation:** Analyst generates a test suite that references at least one interface from the PROTOCOL.
- [ ] **Physical Inception:** The generated test code is physically written to `tests/test-suite.lisp` (or equivalent).
- [ ] **Edge Case Coverage:** The generated suite includes at least one negative test case (error handling).

View File

@@ -1,40 +0,0 @@
#+TITLE: PROTOCOL: Skill - Technical Analyst Agent
#+STATUS: DRAFT
#+AUTHOR: Tech-Analyst-Agent
#+CREATED: [2026-03-31 Tue 12:30]
* 1. Architectural Intent
This protocol defines the shared Lisp interfaces for the Technical Analyst skill. It ensures that the PSF Consensus Loop follows a strict TDD mandate by defining how the Analyst perceives signed architectures and actuates failing test suites.
Following the **Literate Mandate**, the Analyst skill's own implementation must be generated from its Org-mode source.
* 2. Semantic Interfaces
** 2.1 Blueprint Perception
#+begin_src lisp
(defun tech-analyst-perceive-signed-protocol (project-name)
"Checks if a project has a SIGNED PROTOCOL.
Returns a plist: (:status :signed :path \"path/to/PROTOCOL.org\") or NIL."
)
#+end_src
** 2.2 TDD Suite Actuation
#+begin_src lisp
(defun tech-analyst-actuate-tdd-suite (project-name test-content)
"Physically writes the TDD suite (test code) to the project.
Input: project name and generated Lisp/Python test code.
1. Ensures the 'tests/' directory exists.
2. Writes the content to 'tests/test-suite.*'.
Returns a success message or error signal."
)
#+end_src
** 2.3 Success Criteria Generation
#+begin_src lisp
(defun tech-analyst-generate-success-criteria (project-name)
"Extracts success criteria from the PROTOCOL and PRD to generate the 'RED' test suite."
)
#+end_src
* 3. Integration with PSF Lifecycle
The Analyst is triggered when a project transitions from `:BLUEPRINT` to `:SUCCESS`. Its output (a failing TDD suite in `tests/`) is the "Safety Gate" that permits the **Coder** (Phase D: Build) to begin implementation.

View File

@@ -0,0 +1,83 @@
;;;; analyst-logic.lisp --- TDD automation for the PSF (Unified).
;;;; This file is TANGLED from notes/org-skill-tech-analyst.org. DO NOT EDIT MANUALLY.
(defpackage :org-skill-tech-analyst
(:use :cl :uiop :local-time)
(:export #:tech-analyst-perceive-signed-protocol
#:tech-analyst-scan-all-notes
#:trigger-skill-tech-analyst
#:neuro-skill-tech-analyst
#:tech-analyst-actuate))
(in-package :org-skill-tech-analyst)
(defun kernel-log (message &rest args)
(format t "~&[ANALYST] ~?" message args))
(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))
(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)))))
(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)))
(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 "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 - Technical Analyst established TDD Suite for ~a" project-name)))

View File

@@ -0,0 +1,47 @@
import os
import shutil
def simulate_perceive(project_name, projects_dir):
protocol_path = os.path.join(projects_dir, project_name, "PROTOCOL.org")
test_path = os.path.join(projects_dir, project_name, "tests", "test-suite.lisp")
if not os.path.exists(protocol_path):
return None
with open(protocol_path, 'r') as f:
content = f.read()
if "#+STATUS: SIGNED" in content and not os.path.exists(test_path):
return {"project": project_name, "protocol_path": protocol_path, "content": content}
return None
if __name__ == "__main__":
test_dir = "/tmp/analyst_test_projects"
if os.path.exists(test_dir):
shutil.rmtree(test_dir)
os.makedirs(os.path.join(test_dir, "test-project", "tests"))
proto_file = os.path.join(test_dir, "test-project", "PROTOCOL.org")
print("--- Test 1: Draft Protocol ---")
with open(proto_file, "w") as f:
f.write("#+TITLE: Test\n#+STATUS: DRAFT\n")
res = simulate_perceive("test-project", test_dir)
print(f"Result: {res}")
status1 = "PASS" if res is None else "FAIL"
print("\n--- Test 2: Signed Protocol ---")
with open(proto_file, "w") as f:
f.write("#+TITLE: Test\n#+STATUS: SIGNED\n")
res = simulate_perceive("test-project", test_dir)
print(f"Result: {res['project'] if res else None}")
status2 = "PASS" if res and res['project'] == "test-project" else "FAIL"
print("\n--- Test 3: TDD suite already exists ---")
with open(os.path.join(test_dir, "test-project", "tests", "test-suite.lisp"), "w") as f:
f.write("exists")
res = simulate_perceive("test-project", test_dir)
print(f"Result: {res}")
status3 = "PASS" if res is None else "FAIL"
print(f"\nFinal Status: {'PASS' if all(s == 'PASS' for s in [status1, status2, status3]) else 'FAIL'}")

View File

@@ -0,0 +1 @@
/home/user/memex/notes/org-skill-org-gtd-archive-roam-daily.org

View File

@@ -0,0 +1 @@
/home/user/memex/notes/org-skill-org-json-bridge.org