Files
memex/notes/personal-software-foundry.org

77 lines
5.2 KiB
Org Mode

#+TITLE: Personal Software Foundry (PSF)
#+ID: personal-software-foundry
#+DATE: 2026-03-30
#+FILETAGS: :philosophy:psf:os:lisp:engineering:
#+STARTUP: content
* Overview
The **Personal Software Foundry (PSF)** is a highly integrated, neurosymbolic "virtual software house" embedded within the Memex. It is the overarching system used to design, implement, and maintain all software projects. The PSF ensures that every line of code is provably correct, secure, and part of a self-improving cognitive loop.
It operates as a proactive agentic layer that handles the entire lifecycle of software creation—from proactive need-discovery to autonomous maintenance—adhering to the technical rigor of a native Lisp Machine.
* The PSF Mandates
All software developed within the Foundry must adhere to these foundational principles:
** 1. Lisp Machine Sovereignty
The agent is a Lisp Machine image (SBCL). The system is a "Living Organism" where code is updated via hot-reloading into the active image. Manual "Restarts" are considered a failure of the late-binding architecture.
** 2. Homoiconic Memory (The Org Mandate)
Every document, plan, PRD, and skill in the system MUST be written in Org-mode (.org). Markdown (.md) and JSON/YAML/XML are strictly prohibited for internal system logic and institutional memory. Org-mode provides a rigorous, hierarchical AST for both humans and machines.
** 3. Literate Programming (The Knuth-Sovereign Principle)
The PSF treats code not as a series of instructions for a computer, but as a "work of literature" for humans that happens to be executable.
- **Implementation:** All `org-agent` skills and system logic MUST be implemented as Literate Org files using `#+begin_src` blocks.
- **Rationale:** By weaving documentation and code together, we ensure that the "Why" (Architectural Intent) is never separated from the "How" (Implementation). This is the key to the PSF's **Institutional Memory**.
** 4. Hardware Compartmentalization
The runtime environment is an enclosure (Docker, LXC, VM, or Bare Metal). The PSF kernel remains agnostic to its enclosure.
** 5. Educational & Sovereign Interaction
The Foundry serves as a mentorship environment. Agents must explain the "Why" and distill knowledge to increase user technical mastery. The user (Sovereign Executive) retains absolute right to deep-dive into any technical layer.
* Architectural Foundation (CLOSOS Principles)
The PSF is built on the **Common Lisp Object-Store Operating System (CLOSOS)** specification:
- [[file:closos_attributed_object_store.org][Object-Store First]]: Data is treated as Attributed Lisp Objects (via `org-element` AST), not flat files.
- [[file:closos_single_address_space.org][Single Address Space]]: The CL Daemon and Emacs share a conceptual address space via OACP (Remote Object Proxy).
- [[file:closos_memory_persistence.org][Persistence by Default]]: The Lisp Image is persistent; state is unalterable and auditable.
- [[file:closos_multiple_environments.org][Multiple Environments]]: Isolation by scope allows for safe, simultaneous global environments.
- [[file:closos_protection_mechanisms.org][Language-Based Protection]]: Security is enforced by the compiler and runtime (tagged pointers, capabilities).
* The Foundry Workflow (The "Consensus Loop")
Projects pass through sequential "Safety Gates" managed by specialized departments:
| Phase | Department | Responsibility | Key Instrument |
| :--- | :--- | :--- | :--- |
| **A: Demand** | **Product** | User Interview & Needs | `PRD.org` |
| **B: Blueprint** | **Design** | Structural Integrity & API | [[file:../system/skills/org-skill-architect.org][Architect Skill]] |
| **C: Success** | **Quality** | TDD Inception & Security Audit | [[file:../system/skills/org-skill-tech-analyst.org][Analyst Skill]] |
| **D: Build** | **Engineering** | Minimal Implementation | `src/`, [[file:skill-project-foundry.org][Foundry Skill]] |
| **E: Chaos** | **Chaos** | Dynamic Testing & Chaos Eng. | [[file:org-skill-chaos.org][Chaos Skill]] |
| F: Memory | **Optimization** | Institutional Memory & RCA | [[file:institutional_memory.org][institutional_memory.org]], [[file:../system/skills/org-skill-scribe-rca.org][Scribe-RCA Skill]] |
** Success Matrix: "The Level 3 Standard"
A project is not complete until it achieves **Evolutionary Completion**:
1. **Functional:** Code merged and passing all audits (Chaos Gauntlet).
2. **Institutional:** Session distilled into atomic notes; code groomed for zero bloat.
3. **Evolutionary:** Automated health checks and recurring maintenance tasks established in `gtd.org` as standard task sequences.
* Operational Standards
- **Project Root:** All projects live in `memex/5_projects/`.
- **Common Structure:**
- `README.org` (Vision)
- `PRD.org` (Requirements)
- `PROTOCOL.org` (Interfaces)
- `src/` (Implementation)
- `tests/` (Verification)
- `docs/` (Architecture/Chaos/RCA)
- **Self-Improvement (RCA):** Every bug triggers a **Root Cause Analysis** note to update "Permanent Learnings" in `SOUL.org`.
* See Also
- [[file:../projects/org-agent/README.org][org-agent (The Neurosymbolic Kernel)]]
- [[file:../SOUL.org][SOUL (Architectural Learnings & RCA)]]
- [[file:../gtd.org][GTD.org (Implementation Roadmap)]]
- [[file:skill-project-foundry.org][skill-project-foundry (The Factory Floor)]]
]]