Compare commits

50 Commits

Author SHA1 Message Date
0f7019e01e RELEASE: v0.1.0 - The Sovereign Foundation 2026-04-13 21:06:18 -04:00
c376196e86 AUDIT: Patched Scribe distillation logic for immutability and persistence 2026-04-13 20:56:11 -04:00
3959c57718 AUDIT: Completed Scribe and Gardener implementation for MVP 2026-04-13 20:44:18 -04:00
f8221ec4da AUDIT: Completed Task 1 (Harness Hardening) for MVP 2026-04-13 20:40:37 -04:00
5518a00e67 AUDIT: Implemented unified entrypoint script and updated README 2026-04-13 20:20:39 -04:00
f315b79df3 AUDIT: Added CLI interaction capability and updated UX journey 2026-04-13 20:15:30 -04:00
b0e6ddac05 AUDIT: Unified setup process and updated documentation 2026-04-13 20:04:52 -04:00
21d46b03fc AUDIT: Established Sovereign MVP (v0.1.0) milestone in task tracker 2026-04-13 19:44:53 -04:00
d8f92decb6 AUDIT: Refactored context stage and updated peripheral vision parameters 2026-04-13 17:31:36 -04:00
bf1fc9a9c4 AUDIT: Externalized mandatory skill configuration 2026-04-13 17:28:32 -04:00
45edc23a9e AUDIT: Refactored perceive stage and updated engineering standards with tangle mandate 2026-04-13 17:07:01 -04:00
42124ed9d5 AUDIT: Refactored core metabolic loop and updated engineering standards 2026-04-13 16:55:11 -04:00
b06c1b44b9 ARCH: Synchronize Thin Harness manifest and full decoupling 2026-04-13 16:39:07 -04:00
b46c800d43 ARCH: Sync submodule pointer after full Microkernel Decoupling 2026-04-13 16:11:21 -04:00
d1432e4bf0 ALIGN: Completed communication and memory alignment, starting IPFS homoiconic refactor 2026-04-13 14:55:51 -04:00
f2ecccab63 ALIGN: Workspace-wide rename of Memory and final terminology sync 2026-04-13 14:39:53 -04:00
eee1925032 ALIGN: Finalize workspace-wide rename to Harness Communication 2026-04-13 14:19:50 -04:00
e5d04d241c ALIGN: Finalize terminology sync across all layers 2026-04-13 13:18:53 -04:00
d160a084c5 ALIGN: Sync roadmap and submodule pointer 2026-04-13 13:18:50 -04:00
38dcac3ad3 ALIGN: Completed terminology refactor and deleted deprecated audit reports 2026-04-13 13:18:38 -04:00
b96f8b9b6a GTD: Updated harness review task description 2026-04-13 13:16:25 -04:00
dc7cf8bfe0 GTD: Add task for full review of org-agent's harness 2026-04-13 13:12:36 -04:00
43a20879bd ARCH: Metabolic Harness Reorganization & Loop Simplification 2026-04-13 09:57:59 -04:00
b6b39472da ARCH: Clean Core Refactor & Terminology Alignment 2026-04-13 09:03:42 -04:00
8ee1c0c4df docs: finalize gtd.org synchronization and encode Roadmap Integrity mandate 2026-04-12 19:52:47 -04:00
bdee3c75b5 docs: Restore root README and sync org-agent documentation 2026-04-12 16:26:02 -04:00
ee19da7e7a chore: Cull 'architecture astronaut' tasks from active roadmap
- Moved theoretical/complex tasks to an Archive section.
- Enforces the 'Thin Harness, Fat Skills' paradigm.
- Restricts v1.0 focus to the Minimal Boot Set.
2026-04-12 16:02:16 -04:00
7cdf76112c docs: Rewrite root README to anchor new architecture and philosophy
- Shift from 'Neurosymbolic' to 'Neuro-Protosymbolic'
- Formalize 'Thin Harness, Fat Skills' paradigm
- Redefine cognitive matrix (Associative/Deliberate, Foreground/Background)
- Clarify Org-mode AST and Sparse Tree advantages over Markdown/JSON
- Outline core skill groups and Lisp Machine endgame
2026-04-12 15:59:07 -04:00
a887011415 chore: Update cognitive architecture naming and sync org-agent submodule
- Updated naming to Associative/Deliberate and Foreground/Background in README.org
- Synchronized completed tasks in gtd.org
- Updated org-agent submodule reference
2026-04-12 14:10:01 -04:00
8ff305d6ac feat(agent): Define session-less cognitive architecture
- **Anatomy (Data Stores):** Defines the three-tiered data model:
  1. Linguistic Substrate (Org files)
  2. Lisp Object Store (Live graph in RAM)
  3. Telemetry Store (External TSDB for sensory data)

- **Psychology (Cognitive Matrix):** Establishes the 2x2 matrix that
  balances Conscious/Subconscious and Neural/Symbolic (System 1/2)
  processing.

- **Physiology (Core Processes):** Outlines the five core processes
  (Perception, Reasoning, Distillation, Reflection, Sensation) that
  bring the architecture to life.

This commit also updates the master GTD with the full engineering
roadmap required to implement this session-less vision, including tasks
for cognitive economics, belief revision, and the Micro-Prolog engine.
2026-04-11 20:14:37 -04:00
942a721cd8 FEAT: Integrated Playwright bridge and updated GTD 2026-04-11 16:58:23 -04:00
6ec465128c CHORE: Submodule sync for Playwright dependencies 2026-04-11 16:56:58 -04:00
72268c7508 FEAT: Integrated Boot Sequence refactor and updated GTD 2026-04-11 16:52:41 -04:00
3e2616ee4d FEAT: Integrated 5-Vector security and synchronized docs 2026-04-11 16:36:07 -04:00
70be494d8c CHORE: Submodule sync before Bouncer Matrix implementation 2026-04-11 16:25:08 -04:00
c4233f7a80 FEAT: Integrated Formal Verification and updated GTD 2026-04-11 16:13:29 -04:00
d4736fb79c CHORE: Submodule sync before Formal Verification implementation 2026-04-11 16:08:58 -04:00
4ee8b998d0 FEAT: Integrated Docker infrastructure and updated GTD 2026-04-11 16:02:53 -04:00
44ebba8aaa FEAT: Integrated Matrix gateway and updated GTD 2026-04-11 15:58:15 -04:00
5ba970e4e8 DOCS: Synced .env.example in main repo 2026-04-11 15:54:16 -04:00
437cf36979 FIX: Secure Signal identity in submodule 2026-04-11 15:52:32 -04:00
bbe2bcb2c4 FEAT: Integrated Signal gateway and updated GTD 2026-04-11 15:51:10 -04:00
b42a2fedfc CHORE: Submodule update for Signal Gateway preparation 2026-04-11 15:48:22 -04:00
4c417a58b5 FEAT: Integrated Telegram gateway and updated GTD 2026-04-11 15:34:51 -04:00
5ba7d70f28 FEAT: Finalized Shell Actuator verification and gtd status 2026-04-11 15:24:46 -04:00
bef7c93fad FEAT: Finalized provider verification and gtd status 2026-04-11 15:17:34 -04:00
c979ec8e89 CHORE: Add 5-Vector Bouncer Matrix to GTD 2026-04-11 14:58:47 -04:00
666316b702 FEAT: Finalized Planning Mode implementation and gtd status 2026-04-11 14:45:00 -04:00
cbd0a11ca4 FEAT: Finalized async lisp-repair and gtd status 2026-04-11 14:36:39 -04:00
72531c175b Revert "FEAT: Integrated org-skill-lisp-repair"
This reverts commit dcf6c79371.
2026-04-11 14:32:31 -04:00
17 changed files with 493 additions and 281 deletions

View File

@@ -31,7 +31,7 @@ The workspace is strictly divided into these zones to facilitate both human ergo
- [[file:system/README.org][System]]: Configuration, AI skills, and the Lisp kernel.
* The Agentic Inhabitants
The Memex is inhabited by autonomous agents that operate as "System 1" (probabilistic/neural) and "System 2" (deterministic/symbolic) layers:
The Memex is inhabited by autonomous agents that operate as "Probabilistic" (probabilistic/neural) and "Deterministic" (deterministic/symbolic) layers:
** [[file:projects/org-agent/README.org][org-agent (The Kernel)]]
A Common Lisp microkernel that maintains a live, threaded Object-Store in RAM. It uses Org-mode as its native Abstract Syntax Tree (AST), allowing it to "perceive" and "act" on the Memex with structural precision.
@@ -39,11 +39,34 @@ A Common Lisp microkernel that maintains a live, threaded Object-Store in RAM. I
** Gemini CLI
A strategic orchestrator that handles large-scale batch tasks, research, and planning. It operates according to the *PSF Consensus Loop* (Demand -> Blueprint -> Success -> Build -> Chaos -> Memory).
* The Cognitive Architecture: A Session-less Mind
The agent's "mind" is not a transient chat session but a durable, stateful cognitive architecture. This design enables a truly "session-less" experience, where the agent's context, personality, and awareness are as persistent as the data itself.
*** The Anatomy: Three Data Stores
1. *The Linguistic Substrate (Org Files):* The human-readable Source of Truth, comprising the "Journal" ([[file:daily/README.org][Dailies]]) and the "Ledger" ([[file:notes/README.org][Notes]]).
2. *The Lisp Object Store (RAM):* The "Active Brain," a live graph of Lisp objects representing every headline, paragraph, and entity in the Memex, with vectors embedded directly inside.
3. *The Telemetry Store (TSDB/Binary):* An external, high-volume database for sub-symbolic "Sensory" data (e.g., smart home logs), which is monitored and distilled by the agent.
*** The Psychology: The 2x2 Cognitive Matrix
The agent's "thought" process is not monolithic. It operates on a 2x2 matrix that balances cognitive speed with cognitive state, allowing for sophisticated, multi-layered reasoning.
| | *Probabilistic (Neural/Fast/Intuitive)* | *Deterministic (Symbolic/Slow/Logical)* |
| :--- | :--- | :--- |
| *Foreground (Foveal/Active)* | *The Interface:* A fast, charming LLM for active conversation. | *The Pilot:* Lisp guards that ensure active requests are safe. |
| *Background (Peripheral/Passive)* | *The Editor:* A smart, deep LLM that finds patterns in the background. | *The Librarian:* A deterministic Lisp engine that files, archives, and maintains the integrity of memory. |
*** The Physiology: Five Core Processes
1. *Perception (The Attention Bridge):* Automatically vectorizes user input to set the "Foveal Focus" for the active conversation.
2. *Reasoning (The Micro-Prolog):* Uses symbolic logic to reconcile contradictions and enforce the "Physics" of the Memex.
3. *Distillation (The Scribe):* The Background loop that turns the daily "Journal" entries into permanent "Ledger" knowledge.
4. *Reflection (The Gardener):* The heartbeat-driven process that finds "forgotten" links and maintains the "Vibe" of the system.
5. *Sensation (The Sensor Skill):* The "Signal-to-Symbol" converter that turns the "flood" of telemetry into actionable =TODO= items.
* Core Workflows: The Life of a Thought
1. *Capture:* Raw information enters via the `inbox` (tasks) or `daily` logs (thoughts).
2. *Distill (The Scribe):* Automated agents periodically extract conceptual thoughts from the chronological logs into evergreen, atomic notes.
3. *Plan:* Multi-file or architectural changes trigger a *Flight Plan* in `system/plans/`, following the PSF Departmental gates.
4. *Execute:* The agent performs surgical edits, governed by System 2 safety checks.
4. *Execute:* The agent performs surgical edits, governed by Deterministic Engine safety checks.
5. *Verify:* All changes are validated via automated tests (TDD) before the "Success" gate is cleared.
6. *RCA (Memory):* Every bug or significant session triggers a *Root Cause Analysis* that is distilled back into the system's "Soul."

View File

@@ -90,7 +90,7 @@ Deep architectural discussion on what a cognition-first agent would look like.
Key insights:
- Lisp machine philosophy: image-based persistence, live environment, homoiconicity
- Neurosymbolic computing: System 1 (LLMs/fast/intuitive) + System 2 (symbolic/slow/deliberate)
- Neurosymbolic computing: Probabilistic Engine (LLMs/fast/intuitive) + Deterministic Engine (symbolic/slow/deterministic)
- PDS as runtime environment, not just storage
- Org-mode as native cognitive interface
- Always-on, interrupt-driven proactivity (not request-response)

454
gtd.org
View File

@@ -18,11 +18,64 @@
** NEXT Org-agent v1.0
:PROPERTIES:
:ID: proj-org-agent-v1-0
:PSF-STATE: D: BUILD
:Engineering-STATE: D: BUILD
:CREATED: [2026-03-09 Mon 14:23]
:END:
Org-agent: A Neurosymbolic AI Agent.
*** PHASE: SOVEREIGN MVP (v0.1.0 Released)
:PROPERTIES:
:ID: proj-mvp-v0-1-0
:END:
The "Zero-to-One" release. The agent must be mathematically secure, CLI-first, and capable of autonomous Memex maintenance.
**** DONE 1. Harness Hardening (The Final Audit)
- [X] Audit remaining core skills (`org-skill-policy.org`, `org-skill-bouncer.org`) to the new Literate Granularity standard.
- [X] Implement Verification Lock: Ensure `MANDATORY_SKILLS` pass `validate-lisp-syntax` before boot proceeds.
- [X] Logging & Transparency: Ensure `context-get-system-logs` is utilized by the Reason engine to explain blocked actions.
**** DONE 2. The Sovereign Scribe & Gardener (The Primary Value Prop)
- [X] Implement `org-skill-scribe.org`: Background worker that distills daily chronological logs into structured Zettelkasten notes.
- [X] Implement `org-skill-gardener.org`: Heartbeat-driven skill that autonomously flags orphaned nodes and repairs broken links.
**** DONE 3. The Zero-to-One Experience (setup.org)
- [X] Consolidate installation instructions, `onboard.sh`, and `Dockerfile` into a single, literate `setup.org` file.
- [X] Ensure the setup process interactively builds the `.env` and verifies SBCL/Quicklisp dependencies.
**** TODO 4. CLI-First Actuation
- [ ] Verify the `cli` actuator and inbound gateway handle standard I/O interaction gracefully, treating Emacs as an optional power-user viewport.
*** PHASE: INTERACTIVE REFINEMENT (v0.2.0 Target)
:PROPERTIES:
:ID: proj-refinement-v0-2-0
:END:
Elevating the user interface from raw shell piping to a high-fidelity, native Lisp experience.
**** TODO 1. Common Lisp TUI (The "gemini-cli" parity)
- [ ] Implement a rich, interactive TUI natively in Common Lisp (e.g., via `cl-charms`, `croatoan`, or `cl-ncurses`).
- [ ] Support syntax highlighting for code blocks and Org-mode syntax.
- [ ] Implement a fixed bottom input box with command history.
- [ ] Implement Slash Commands (`/help`, `/exit`, `/clear`, `/skill-load`).
**** TODO 2. Direct Lisp-to-Terminal Actuation
- [ ] Refactor the `:cli` actuator to use the native TUI rendering instead of raw stream printing.
*** PHASE: EVOLUTIONARY ROADMAP
**** TODO v1.0.0 (Phase 2.5): The Verified Wrapper (SOTA Parity)
- Complete Formal Verification gates for external tools.
- Achieve secure, end-to-end autonomous engineering workflows.
**** TODO v2.0.0 (Phase 3): Cannibalizing the Toolchain
- Ingest DOM as native Lisp AST (Cannibalize Browser).
- Replace string-based bash with native OS bindings (Cannibalize Shell).
**** TODO v3.0.0 (Phase 4): True Symbolic Determinism
- Relegate LLM to Semantic Translator.
- Implement Deterministic Planner (The Solver).
- Implement Self-Correcting Syntax Gates.
**** TODO v4.0.0+ (Phase 5): The Neurosymbolic Singularity
- Homoiconic Self-Writing (Hot-reloading literate source).
- Asynchronous Swarm Cognition (Jailed sub-agents).
*** PHASE: FOUNDATION (Complete)
**** DONE Draft Swank/Socket communication protocol between CL and Emacs
:PROPERTIES:
@@ -39,12 +92,12 @@ Org-agent: A Neurosymbolic AI Agent.
:CREATED: [2026-03-22 Sun 16:30]
:ASSIGNED: Agent
:END:
**** DONE Implement LLM Connector (System 1) in CL Daemon
**** DONE Implement LLM Connector (Probabilistic Engine) in CL Daemon
:PROPERTIES:
:CREATED: [2026-03-22 Sun 17:30]
:ASSIGNED: Agent
:END:
**** DONE Design System 2 Heuristics (Lisp logic over Object Store)
**** DONE Design Deterministic Engine Heuristics (Lisp logic over Memory)
:PROPERTIES:
:CREATED: [2026-03-22 Sun 17:30]
:END:
@@ -60,29 +113,66 @@ Org-agent: A Neurosymbolic AI Agent.
:PROPERTIES:
:ID: proj-sovereign-boundary
:END:
Slim down the org-agent microkernel by moving non-essential cognitive functions to hot-reloadable user-space skills.
Slim down the org-agent microharness by moving non-essential cognitive functions to hot-reloadable user-space skills.
**** DONE Extract LLM Provider Routing to a Skill (neuro.lisp)
**** TODO Extract Vector Embedding Algorithms to a Skill (embedding.lisp)
**** TODO Extract Sparse Tree Context Pruning Strategies to a Skill (context.lisp)
**** TODO Implement `org-skill-peripheral-vision` (Moving embedding logic out of core)
**** TODO Implement Privacy-Aware Background Indexer (Local hashes for @personal, Semantic for others)
**** TODO Decouple Transport from Protocol (True Actuator-Agnosticism in protocol.lisp)
**** TODO Implement OACP Schema Validation (Prevent reader macro injection in protocol.lisp)
**** TODO Implement Pluggable OACP Integrity Hashing (Core interface, Skill-based algorithms)
**** TODO Implement OACP Backpressure Handling (Queue bounds and BUSY frames in protocol.lisp)
**** TODO Implement Cognitive Loop "Rut" Recovery (Dynamic Escalation in org-skill-safety-harness)
**** TODO Implement Asynchronous Event Bus for Telemetry (core.lisp)
**** TODO Implement Memory Eviction and Lazy Loading (LRU Cache in object-store.lisp)
**** DONE Implement Native Lisp Merkle-Tree Versioning (Short-term undo buffer in object-store.lisp)
**** DONE Performance: Implement Copy-on-Write (CoW) or Persistent Data Structures for Object Store
**** DONE Extract Vector Embedding Algorithms to a Skill (embedding.lisp)
CLOSED: [2026-04-12 Sun 14:10]
:PROPERTIES:
:ID: extract-embedding-skill
:END:
- Created `org-skill-embedding.org`.
- Moved logic to `src/embedding-logic.lisp` via tangling.
- Updated `system-definition.org`.
**** DONE Extract Sparse Tree Context Pruning Strategies to a Skill (context.lisp)
CLOSED: [2026-04-12 Sun 14:25]
:PROPERTIES:
:ID: extract-context-skill
:END:
- Created `org-skill-peripheral-vision.org`.
- Moved logic to `src/context-logic.lisp` via tangling.
- Updated `system-definition.org`.
**** DONE Implement `org-skill-peripheral-vision` (Moving embedding logic out of core)
CLOSED: [2026-04-12 Sun 14:25]
:PROPERTIES:
:ID: impl-peripheral-vision
:END:
**** DONE Implement communication protocol Schema Validation (Prevent reader macro injection in communication.lisp)
CLOSED: [2026-04-12 Sun 14:45]
:PROPERTIES:
:ID: communication-protocol-schema-validation
:END:
- Created `org-skill-protocol-validator.org`.
- Integrated `validate-communication-protocol-schema` into `communication.org`.
- Added `protocol-validator.lisp` to system definition.
**** DONE Implement Pluggable communication protocol Integrity Hashing (Core interface, Skill-based algorithms)
CLOSED: [2026-04-12 Sun 15:15]
:PROPERTIES:
:ID: communication-protocol-integrity-hashing
:END:
- Integrated HMAC-SHA256 (`ironclad:make-mac`) in `literate/communication.org`.
**** DONE Implement Native Lisp Merkle-Tree Versioning (Short-term undo buffer in memory.lisp)
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Performance: Implement Copy-on-Write (CoW) or Persistent Data Structures for Memory
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Feature: Implement Latent Reflection (Proactive Gardening) using heartbeat idle cycles
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Simplification: Refactor Cognitive Loop into a Unified Reactive Signal Pipeline
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Resilience: Implement Micro-Rollbacks for the Immune System
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Implement `org-skill-memory-archivist` (Long-term IPFS checkpointing and P2P sync)
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Implement True Lisp Sandboxing (eval-safe mechanism in core and policy in skills)
**** DONE Decouple Vendor Logic from System 1 (Move Google/Anthropic/OpenAI to Skills)
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Decouple Vendor Logic from Probabilistic Engine (Move Google/Anthropic/OpenAI to Skills)
CLOSED: [2026-04-12 Sun 19:15]
**** DONE Component IV: Comprehensive Core Skill Audit (Review all 39 skills)
CLOSED: [2026-04-12 Sun 19:45]
:PROPERTIES:
:ID: core-skill-audit-task
:END:
**** DONE Consolidation I: Unified LLM Gateway (Anthropic, Gemini, Groq, OpenAI, etc.)
**** DONE Consolidation II: Credentials Vault (Secure Enclave & Masked Logging)
**** DONE Consolidation III: Homoiconic Memory (Unified Grammar, Bridge, & ID Generation)
@@ -97,17 +187,41 @@ Slim down the org-agent microkernel by moving non-essential cognitive functions
- Implemented Task Integrity (GTD semantics) in symbolic.lisp.
- Integrated Consensus Gate and Delegation hooks in core.lisp.
- Verified with new task-orchestrator-tests.lisp.
**** DONE Implement `org-skill-lisp-repair` (Self-correcting syntax gate for System 2)
CLOSED: [2026-04-11 Sat 14:50]
**** IN-PROGRESS Full review of org-agent's harness
:PROPERTIES:
:CREATED: [2026-04-13 Mon 13:30]
:ASSIGNED: Agent
:END:
- [X] Audit terminology: Replaced OACP with "communication protocol" workspace-wide.
- [X] Audit boot sequence: Synchronized loader with `org-skill-policy.org`.
- [-] Audit core Perceive-Think-Act loop.
- [X] Verified protocol framing and reader jailing (`*read-eval* nil`).
- [X] Refactored `loop.org` for literate granularity and configuration externalization.
- [X] Improved error handling (restricted rollback) and added graceful shutdown.
- [X] **GAP:** Missing symbolic guard check in `act-gate` (Stage 3: Act).
- [ ] Ensure alignment with System Policy and Engineering Standards.
**** TODO Wake up the Scribe (Implement autonomous weekly Journal-to-Ledger distillation in org-skill-scribe.org)
**** TODO Implement `org-skill-lisp-repair` (Self-correcting syntax gate for Deterministic Engine)
CLOSED: [2026-04-11 Sat 15:10]
:PROPERTIES:
:ID: lisp-repair-gate
:END:
- Implemented two-tiered repair (Deterministic paren-balancing + Neural fallback).
- Integrated with `think` function in neuro.lisp via `handler-case`.
- Verified with lisp-repair-tests.lisp.
**** TODO Implement `org-skill-formal-verification` (Prove safety of high-impact actions)
- Implemented asynchronous, event-driven repair logic.
- Decoupled core from repair logic (emits `:syntax-error` event).
- Proven via lisp-repair-tests.lisp (Asynchronous flow verified).
**** DONE Implement `org-skill-formal-verification` (Prove safety of high-impact actions)
CLOSED: [2026-04-11 Sat 18:15]
:PROPERTIES:
:ID: formal-verification-task
:END:
- Implemented `org-skill-formal-verification.org`.
- Created Lisp-Native Symbolic Prover for security invariants.
- Implemented `path-confinement` invariant (restricted to memex root).
- Implemented `no-network-exfil` invariant (blocking nc, ssh, etc).
- Verified with `formal-verification-tests.lisp`.
*** PHASE: SYSTEM 2 REFINEMENT
*** PHASE: DETERMINISTIC ENGINE REFINEMENT
**** DONE Verify Autonomous Self-Fix Loop
CLOSED: [2026-04-11 Sat 14:20]
:PROPERTIES:
@@ -116,39 +230,125 @@ Slim down the org-agent microkernel by moving non-essential cognitive functions
- Proven repair capability via self-fix-tests.lisp.
- Verified surgical code patching and hot-reloading.
- Documentation and RCA complete.
**** TODO Implement "Planning Mode" (System 2 Bouncer) for Complex Actions
:PROPERTIES:
:CREATED: [2026-04-01 Wed 17:00]
:ASSIGNED: Agent
:END:
**** TODO Implement Authorization Gate (OACP) for "Planning Mode"
:PROPERTIES:
:CREATED: [2026-04-01 Wed 17:00]
:ASSIGNED: Agent
:END:
**** DONE Implement "Planning Mode" (Deterministic Engine Bouncer) for Complex Actions
CLOSED: [2026-04-11 Sat 15:30]
:PROPERTIES:
:CREATED: [2026-04-01 Wed 17:00]
:END:
- Implemented `bouncer-check` interceptor in `symbolic.lisp`.
- Created `org-skill-bouncer.org` for flight plan serialization.
- Verified asynchronous Org-native approval loop via `bouncer-tests.lisp`.
**** DONE Implement Authorization Gate (communication protocol) for "Planning Mode"
CLOSED: [2026-04-11 Sat 15:30]
:PROPERTIES:
:CREATED: [2026-04-01 Wed 17:00]
:END:
- Integrated with Org-mode state transitions (`PLAN` -> `APPROVED`).
- Leveraged Memory event bus for asynchronous re-injection.
**** DONE Refactor Architecture Terminology (Associative -> Probabilistic, Deliberate -> Deterministic)
CLOSED: [2026-04-12 Sun 21:00]
:PROPERTIES:
:ID: terminology-refactor-task
:END:
- Updated codebase-wide terminology to use Probabilistic/Deterministic Engines.
- Replaced System 1/2 with Probabilistic/Deterministic Engines respectively.
*** TRACK: SECURITY & CONTAINMENT (The 5-Vector Bouncer Matrix)
**** DONE Implement Path-Based Scoping for File Writes (DNA/State vs Work)
CLOSED: [2026-04-12 Sun 15:15]
:PROPERTIES:
:ID: path-based-scoping
:END:
- Implemented as `path-confinement` invariant in `org-skill-formal-verification.org`.
**** DONE Implement Network Exfiltration Gate (Intercept generic HTTP requests)
CLOSED: [2026-04-12 Sun 15:15]
:PROPERTIES:
:ID: network-exfiltration-gate
:END:
- Implemented as `no-network-exfil` invariant in `org-skill-formal-verification.org`.
**** TODO Implement Secret Exposure Gate (Intercept reads to .env, keys)
*** TRACK: INTELLIGENCE & ACTUATION (The Engines)
**** TODO Verify provider-anthropic skill
**** TODO Verify provider-gemini skill
**** TODO Verify provider-groq skill
**** TODO Verify provider-ollama skill
**** TODO Verify provider-openai skill
**** TODO Verify provider-openrouter skill
**** DONE Verify individual provider track (Anthropic, Gemini, Groq, OpenAI, OpenRouter, Ollama)
CLOSED: [2026-04-11 Sat 15:45]
:PROPERTIES:
:ID: provider-verification-track
:END:
- Added unit tests for each provider in `llm-gateway-tests.lisp`.
- Mocked `dex:post` to verify JSON payload formatting and response parsing.
- Implemented robust `get-nested` helper to handle various provider structures.
- Integrated `llm-gateway` and `credentials-vault` into `org-agent.asd`.
**** TODO Verify org-skill-shell-actuator formal safety harnesses
**** TODO Implement Skill Graph Visualizer in Web Dashboard
**** TODO Build Playwright-Python Bridge for high-fidelity browsing
**** DONE Build Playwright-Python Bridge for high-fidelity browsing
CLOSED: [2026-04-11 Sat 18:30]
:PROPERTIES:
:ID: playwright-bridge-task
:END:
- Created `scripts/browser-bridge.py` (Playwright wrapper).
- Implemented `org-skill-playwright.org`.
- Registered `:browser` cognitive tool (JS-rendering, text extraction, screenshots).
- Updated `Dockerfile` with Python/Playwright dependencies.
- Verified with `playwright-tests.lisp`.
*** TRACK: COMMUNICATION & INTERFACES
**** TODO Implement org-skill-gateway-telegram
**** TODO Implement org-skill-gateway-signal
**** TODO Implement org-skill-gateway-matrix
**** DONE Implement org-skill-gateway-telegram
CLOSED: [2026-04-11 Sat 16:15]
:PROPERTIES:
:ID: gateway-telegram-task
:END:
- Implemented `org-skill-gateway-telegram.org`.
- Added automated background polling for Telegram GetUpdates.
- Implemented `:telegram` actuator for outbound responses.
- Refactored `org-skill-chat` to be channel-aware.
- Verified with `gateway-telegram-tests.lisp`.
**** DONE Implement org-skill-gateway-signal
CLOSED: [2026-04-11 Sat 16:50]
:PROPERTIES:
:ID: gateway-signal-task
:END:
- Implemented `org-skill-gateway-signal.org` (signal-cli wrapper).
- Added background polling for `signal-cli receive --json`.
- Implemented `:signal` actuator for outbound responses.
- Updated `org-skill-chat` to support Signal channel.
- Verified with `gateway-signal-tests.lisp`.
**** DONE Implement org-skill-gateway-matrix
CLOSED: [2026-04-11 Sat 17:15]
:PROPERTIES:
:ID: gateway-matrix-task
:END:
- Implemented `org-skill-gateway-matrix.org` (Client-Server API).
- Added background polling for `/sync` with token persistence.
- Implemented `:matrix` actuator for `m.room.message` delivery.
- Updated `org-skill-chat` to support Matrix channel and room IDs.
- Verified with `gateway-matrix-tests.lisp`.
*** TRACK: DEPLOYMENT & INFRASTRUCTURE
**** TODO Create Dockerfile and docker-compose.yml for containerized setup
**** DONE Create Dockerfile and docker-compose.yml for containerized setup
CLOSED: [2026-04-11 Sat 17:30]
:PROPERTIES:
:ID: docker-infra-task
:END:
- Created `Dockerfile` (Debian-based, SBCL + Quicklisp + signal-cli).
- Created `docker-compose.yml` with host-volume mapping for memex.
- Created `docs/deployment.org` guide.
**** TODO Create Bare Metal installation scripts/playbooks
**** TODO Create LXC (Linux Containers) template/guide
**** TODO Create VM Vagrantfiles/Cloud-init configs
*** TRACK: MAINTENANCE & HYGIENE
**** TODO [RECURRING: Monthly] Review and test Infrastructure Dependency Upgrades
:PROPERTIES:
:ID: monthly-infra-audit
:REPEAT_TO_STATE: TODO
:END:
- [ ] Check for new Debian security patches (`apt-get update` check).
- [ ] Check for new `signal-cli` releases (compare vs v0.14.0).
- [ ] Check for new Quicklisp distribution (monthly snapshot).
- [ ] **Verification:** Update `Dockerfile`, run `docker-compose build --no-cache`, and execute full test suite.
- [ ] If all tests pass, commit updated `Dockerfile` and `.asd` dependencies.
*** TRACK: COMMUNITY & DOCS
**** TODO Write Quickstart Guide
**** TODO Write Skill Creation Guide
@@ -161,34 +361,35 @@ Slim down the org-agent microkernel by moving non-essential cognitive functions
:PROPERTIES:
:ID: proj-skill-boot-sequence
:END:
**** TODO Refactor `skills.lisp` into a Micro-Loader (Core)
**** TODO Implement Topological Sort based on `#+DEPENDS_ON:` tags
**** TODO Enforce `org-skill-agent` as the mandatory Gateway Skill (Loaded first)
**** TODO Formalize the "Minimal Boot Set" (Router, Vision, Steward, Actuator)
**** TODO Implement Skill Capability Negotiation (Pre-flight tool check)
**** TODO Add Resource Jailing (Timeouts and Memory Quotas for Skills)
**** DONE Refactor `skills.lisp` into a Micro-Loader (Harness)
CLOSED: [2026-04-12 Sun 19:10]
**** DONE Implement Topological Sort based on `#+DEPENDS_ON:` tags
CLOSED: [2026-04-12 Sun 15:15]
:PROPERTIES:
:ID: topological-sort-skills
:END:
- Implemented in `literate/skills.org`.
**** DONE Enforce `org-skill-system-invariants` as the mandatory Gateway Skill (Loaded first)
CLOSED: [2026-04-12 Sun 15:15]
:PROPERTIES:
:ID: enforce-mandatory-skill
:END:
- Enforced in `initialize-all-skills` in `literate/skills.org`.
**** DONE Formalize the "Minimal Boot Set" (Router, Vision, Steward, Actuator)
CLOSED: [2026-04-12 Sun 19:10]
- Verified during the Minimal Boot Set Verification phase.
*** SUB-PROJECT: COGNITIVE BENCHMARKING (Claw-Code Distillation)
:PROPERTIES:
:ID: proj-claw-code-benchmarking
:END:
**** TODO Map Claw-Code Tool-Use Protocol (How it handles multi-tool steps)
**** TODO Distill Claw-Code File Editing Techniques (Surgical diffing vs overwriting)
**** TODO Analyze Claw-Code History Pruning (How it stays within context limits)
**** TODO Write a comprehensive Note in notes/ on "Lessons from the Rust Agent Explosion"
**** TODO Implement `org-skill-history-pruner` based on claw-code context checkpointing
**** TODO Implement `org-skill-tool-router` based on claw-code semantic tool selection
** NEXT PSF Core: Role Automation
** NEXT Engineering Core: Role Automation
:PROPERTIES:
:ID: proj-psf-core
:PROJECT_PATH: $PROJECTS_DIR/psf-core
:PSF-STATE: D: BUILD
:Engineering-STATE: D: BUILD
:TRIGGER: next-sibling!
:END:
Drafting the automated behaviors for the PSF loop.
Drafting the automated behaviors for the Engineering loop.
*** DONE Draft PRD for PSF Core
*** DONE Draft PRD for Engineering Core
:PROPERTIES:
:ID: task-prd-psf-core
:TRIGGER: next-sibling!
@@ -196,7 +397,7 @@ Drafting the automated behaviors for the PSF loop.
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-30 Mon 19:15]
:END:
*** DONE Draft PROTOCOL for PSF Core
*** DONE Draft PROTOCOL for Engineering Core
:PROPERTIES:
:ID: task-proto-psf-core
:BLOCKER: previous-sibling!
@@ -205,7 +406,7 @@ Drafting the automated behaviors for the PSF loop.
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-30 Mon 19:25]
:END:
*** DONE Implement and Test PSF Core Skills
*** DONE Implement and Test Engineering Core Skills
:PROPERTIES:
:ID: task-impl-psf-core
:BLOCKER: previous-sibling!
@@ -270,7 +471,7 @@ All 14 atomic notes created and cross-referenced.
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-18 Wed 01:35]
:END:
- LOCATION: memex/5_projects/agora/agora-pds-sync-protocol.org
- LOCATION: memex/5_projects/agora/agora-pds-sync-communication.org
- PENDING: Integration into agora-requirements-03-infrastructure.org
**** DONE CRITICAL: Delta Sync Protocol → FILLED
@@ -280,7 +481,7 @@ All 14 atomic notes created and cross-referenced.
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-18 Wed 01:50]
:END:
- LOCATION: memex/5_projects/agora/agora-delta-sync-protocol.org
- LOCATION: memex/5_projects/agora/agora-delta-sync-communication.org
- PENDING: Integration into agora-requirements-08-implementation.org
**** DONE CRITICAL: Persona Revocation Protocol → ALREADY-EXISTS
@@ -394,7 +595,7 @@ Address security audit findings and harden the system.
:NOTES: User to provide pointers before commencing critical reading and analysis. Do not proceed without explicit instruction.
:END:
** Personal Software Foundry (PSF) Implementation
** Engineering Standards Implementation
:PROPERTIES:
:ID: psf-implementation
:CREATED: [2026-03-22 Sun 15:30]
@@ -402,7 +603,7 @@ Address security audit findings and harden the system.
Institutionalizing the virtual software house operating system.
*** DONE Draft PSF Operating System Manual ([[file:notes/personal_software_foundry.org][personal_software_foundry.org]])
*** DONE Draft Engineering Operating System Manual ([[file:notes/personal_software_foundry.org][personal_software_foundry.org]])
:PROPERTIES:
:CREATED: [2026-03-22 Sun 15:30]
:ASSIGNED: Agent
@@ -411,7 +612,7 @@ Institutionalizing the virtual software house operating system.
- State "DONE" from "NEXT" [2026-03-22 Sun 15:45]
:END:
*** DONE Update `SOUL.org` with PSF Mandates
*** DONE Update `SOUL.org` with Engineering Mandates
:PROPERTIES:
:CREATED: [2026-03-22 Sun 15:30]
:ASSIGNED: Agent
@@ -420,7 +621,7 @@ Institutionalizing the virtual software house operating system.
- State "DONE" from "NEXT" [2026-03-22 Sun 15:45]
:END:
*** DONE Apply PSF Loop to `org-agent` Phase 1 (Core Loop)
*** DONE Apply Engineering Loop to `org-agent` Phase 1 (Core Loop)
:PROPERTIES:
:CREATED: [2026-03-22 Sun 15:30]
:ASSIGNED: Technical Analyst
@@ -441,34 +642,6 @@ Institutionalizing the virtual software house operating system.
:ASSIGNED: Technical Analyst
:END:
** Lisp Machine Bootstrap
:PROPERTIES:
:ID: lisp-machine-bootstrap
:CREATED: [2026-03-22 Sun 14:15]
:END:
The "Endgame": Hardware-native Lisp machine implementation.
*** TODO Research existing Lisp-on-FPGA implementations
:PROPERTIES:
:CREATED: [2026-03-22 Sun 14:15]
:END:
*** TODO Define minimum hardware-native Lisp ISA (Instruction Set Architecture)
:PROPERTIES:
:CREATED: [2026-03-22 Sun 14:15]
:END:
*** TODO Draft CLOSOS-style Virtual Machine specification
:PROPERTIES:
:CREATED: [2026-03-22 Sun 17:30]
:END:
*** TODO Investigate Single Address Space and Multiple Environments in CL
:PROPERTIES:
:CREATED: [2026-03-22 Sun 17:30]
:END:
** Infrastructure
:PROPERTIES:
:ID: infrastructure-project
@@ -615,7 +788,7 @@ Defining and maintaining high-integrity KM and GTD workflows.
:ASSIGNED: Agent
:END:
Detected ~1,300 entries missing the `:CREATED:` property during the PSF Phase E (Chaos) audit.
Detected ~1,300 entries missing the `:CREATED:` property during the Engineering Phase E (Chaos) audit.
- [ ] Implement inference logic to restore historical timestamps (via Git or context).
- [ ] Batch repair `inbox-emacs.org`, `inbox-atoms.org`, and `inbox-posts.org`.
@@ -782,55 +955,55 @@ See project documents: [[file:5_projects/token-optimization/README.org][token-op
:CREATED: [2026-03-17 Tue 13:40]
:END:
** PSF Skill: Architect Agent
** Engineering Skill: Architect Agent
:PROPERTIES:
:ID: proj-skill-architect
:PROJECT-PATH: $PROJECTS_DIR/org-skill-architect
:PSF-STATE: F: MEMORY
:Engineering-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Technical Analyst Agent
** Engineering Skill: Technical Analyst Agent
:PROPERTIES:
:ID: proj-skill-tech-analyst
:PROJECT-PATH: $PROJECTS_DIR/org-skill-tech-analyst
:PSF-STATE: F: MEMORY
:Engineering-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Project Foundry Agent
** Engineering Skill: Engineering Standards
:PROPERTIES:
:ID: proj-skill-project-foundry
:PROJECT-PATH: $PROJECTS_DIR/org-skill-project-foundry
:PSF-STATE: F: MEMORY
:Engineering-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Scribe Agent
** Engineering Skill: Scribe Agent
:PROPERTIES:
:ID: proj-skill-scribe
:PROJECT-PATH: $PROJECTS_DIR/org-skill-scribe
:PSF-STATE: F: MEMORY
:Engineering-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Memex Manager
** Engineering Skill: Memex Manager
:PROPERTIES:
:ID: proj-skill-memex
:PROJECT-PATH: $PROJECTS_DIR/org-skill-memex
:PSF-STATE: F: MEMORY
:Engineering-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Formalized as a Universal Literate Note.
** PSF Skill: Infrastructure & Providers (Batch refactor)
** Engineering Skill: Infrastructure & Providers (Batch refactor)
:PROPERTIES:
:ID: proj-skill-batch-refactor
:PSF-STATE: F: MEMORY
:Engineering-STATE: F: MEMORY
:CREATED: [2026-03-31 Tue 15:45]
:END:
DONE - Refactored 28 infrastructure, provider, and intelligence skills into the Universal Note architecture.
@@ -916,6 +1089,53 @@ Each year, the project will go forward in time as more works enter the public do
A modular manual of different areas to go with different activities. Fits in the travelers notebook
* Someday / Future
** Architecture Astronaut Archive
*** TODO Implement Privacy-Aware Background Indexer (Local hashes for @personal, Semantic for others)
*** TODO Decouple Transport from Protocol (True Actuator-Agnosticism in communication.lisp)
*** TODO Implement communication protocol Backpressure Handling (Queue bounds and BUSY frames in communication.lisp)
*** TODO Implement Cognitive Loop "Rut" Recovery (Dynamic Escalation in org-skill-lisp-validator)
*** TODO Implement Asynchronous Event Bus for Telemetry (core.lisp)
*** TODO Implement Memory Eviction and Lazy Loading (LRU Cache in memory.lisp)
*** TODO Implement Two-Speed Reflection (Immediate :post-action + Latent Heartbeat)
*** TODO Implement Context-Aware Routing (Autonomous Foveal Switching on intent shift)
*** TODO Implement Intent-Shift Detector (Semantic topic-shift flagging in neuro.lisp)
*** TODO Implement Cognitive Economics (Dynamic LLM routing based on 2x2 matrix complexity)
*** TODO Implement Micro-Prolog Logic Engine (Lisp-native unification & pattern matching for Memory)
*** TODO Implement Sovereign Logic Synthesis (Hybrid SubSys2: Neural pattern detection + Symbolic rule generation)
*** TODO Implement Continuous Vibe (Sentiment-weighted personality in system-prompt)
*** TODO Implement Search-Before-Think Bridge (Autonomous target-id population via vector search in perceive-gate)
*** TODO Implement Belief Revision & Reconciliation (Audit deltas for contradictions in scribe-engine.lisp)
*** TODO Implement Real-Time Entity Linking (Automatic profile loading for People/Objects in perceive-gate)
*** TODO Implement Time-Series Sensor Skill (Signal-to-Symbol distillation for telemetry)
*** TODO Implement Autonomous Image Analysis (Send image bytes to LLM for nodes with attachments in llm-gateway.lisp)
*** TODO Draft comprehensive Threat Model for Agentic Containment
*** TODO Implement Swarm Lateral Movement Gate (Intercept global state changes)
*** TODO Implement Skill Graph Visualizer in Web Dashboard
*** TODO Implement Skill Capability Negotiation (Pre-flight tool check)
*** TODO Add Resource Jailing (Timeouts and Memory Quotas for Skills)
** SUB-PROJECT: COGNITIVE BENCHMARKING (Claw-Code Distillation)
*** SUB-PROJECT: COGNITIVE BENCHMARKING (Claw-Code Distillation)
:PROPERTIES:
:ID: proj-claw-code-benchmarking
:END:
**** TODO Map Claw-Code Tool-Use Protocol (How it handles multi-tool steps)
**** TODO Distill Claw-Code File Editing Techniques (Surgical diffing vs overwriting)
**** TODO Analyze Claw-Code History Pruning (How it stays within context limits)
**** TODO Write a comprehensive Note in notes/ on "Lessons from the Rust Agent Explosion"
**** TODO Implement `org-skill-history-pruner` based on claw-code context checkpointing
**** TODO Implement `org-skill-tool-router` based on claw-code semantic tool selection
** Lisp Machine Bootstrap
:ID: lisp-machine-bootstrap
:CREATED: [2026-03-22 Sun 14:15]
The "Endgame": Hardware-native Lisp machine implementation.
*** TODO Research existing Lisp-on-FPGA implementations
:CREATED: [2026-03-22 Sun 14:15]
*** TODO Define minimum hardware-native Lisp ISA (Instruction Set Architecture)
*** TODO Draft CLOSOS-style Virtual Machine specification
:CREATED: [2026-03-22 Sun 17:30]
*** TODO Investigate Single Address Space and Multiple Environments in CL
:PROPERTIES:
:ID: gtd-someday
:END:
@@ -924,7 +1144,7 @@ A modular manual of different areas to go with different activities. Fits in the
The endgame of the Lisp Machine Mandate. Eliminate context-switching by unifying the browser, the agent, and the editor into a single Common Lisp image.
*** TODO [Grail 1] Emacs xwidget-webkit integration
Embed a full WebKit engine inside an Emacs buffer. Allow the agent to interact with the live DOM via the OACP socket.
Embed a full WebKit engine inside an Emacs buffer. Allow the agent to interact with the live DOM via the communication protocol socket.
*** TODO [Grail 2] Lisp-native Agentic Browser
Build a 'Neural Browser' in CL. Instead of HTML, it renders websites as a navigable Org-mode DAG. Mark headlines TODO to trigger clicks/fills.

View File

@@ -38,13 +38,13 @@ The cognition-first agent revives this philosophy: your PDS is not storage but a
We are describing a neurosymbolic architecture:
- *Neural component (System 1)*: LLMs provide pattern recognition, generation, intuition
- Fast, associative, context-sensitive
- *Neural component (Probabilistic Engine)*: LLMs provide pattern recognition, generation, intuition
- Fast, probabilistic, context-sensitive
- Handles ambiguity, natural language, creativity
- Limited by context window, hallucination, no persistent memory
- *Symbolic component (System 2)*: The agent architecture provides structure, reasoning, persistence
- Slow, deliberate, rule-based
- *Symbolic component (Deterministic Engine)*: The agent architecture provides structure, reasoning, persistence
- Slow, deterministic, rule-based
- Maintains knowledge graphs, executes plans, tracks epistemic state
- Provides guardrails, verification, long-term memory
@@ -122,9 +122,9 @@ Agora pattern: Personal image-based agent runtime
- Stateful, personal, local-first
- LLMs are *substrate*, not product
** System 1 / System 2 Integration
** Probabilistic Engine / Deterministic Engine Integration
| Function | System 1 (Neural/LLM) | System 2 (Symbolic/Agent) |
| Function | Probabilistic Engine (Neural/LLM) | Deterministic Engine (Symbolic/Agent) |
|----------|----------------------|---------------------------|
| Pattern matching | Generates associations | Structures into knowledge graph |
| Text generation | Writes prose, code, summaries | Validates for consistency, sources |
@@ -156,7 +156,7 @@ Agora pattern: Personal image-based agent runtime
- Lisp machines (Symbolics, LMI): Image-based, personal, extensible
- Emacs: The extensible, customizable, self-documenting real-time display editor
- SOAR cognitive architecture: Problem-solving as state-space search
- Kahneman's System 1/2: Dual-process theory of cognition
- Kahneman's Probabilistic Engine/2: Dual-process theory of cognition
- Neurosymbolic AI: Combining neural networks with symbolic reasoning
** Connections to Agora Documentation
@@ -176,7 +176,7 @@ Agora pattern: Personal image-based agent runtime
** Conclusion
We are describing not an "AI assistant" but a *personal cognitive infrastructure*—a neurosymbolic system where neural networks provide associative intelligence and symbolic architecture provides structure, persistence, and reasoning. The Lisp machine philosophy, applied to modern AI, creating an environment where the boundary between human and machine cognition becomes a continuum rather than an interface.
We are describing not an "AI assistant" but a *personal cognitive infrastructure*—a neurosymbolic system where neural networks provide probabilistic intelligence and symbolic architecture provides structure, persistence, and reasoning. The Lisp machine philosophy, applied to modern AI, creating an environment where the boundary between human and machine cognition becomes a continuum rather than an interface.
#+begin_quote
"The computer should be an extension of the mind, not a tool for the hand."

View File

@@ -15,7 +15,7 @@
** [2026-03-23] Cognitive Loop Architecture (org-agent)
- *Problem:* Monolithic PTA (Perceive-Think-Act) loops lead to "Neural Drift" where the LLM's unverified suggestions can cause illegal system states or security breaches.
- *Solution:* Implement the *Four-Stage Cognitive Loop*: Perceive -> Think -> Decide -> Act.
- *Heuristic:* System 1 (Neural/LLM) is a proposal engine only. System 2 (Symbolic/Lisp) is the absolute gatekeeper.
- *Heuristic:* Probabilistic Engine (Neural/LLM) is a proposal engine only. Deterministic Engine (Symbolic/Lisp) is the absolute gatekeeper.
- *Verification:* Never execute an action unless it has passed through `decide()` and been verified against the symbolic Object Store (CLOSOS).
** [2026-03-23] Externalized Configuration Mandate
@@ -26,7 +26,7 @@
** [2026-03-23] Hardware Compartment Mandate
- *Problem:* Forcing a single deployment method (e.g. Docker) creates infrastructure lock-in and limits adoption for users with specific security/performance needs.
- *Solution:* Treat the runtime as a "Hardware Compartment." Abstract deployment into a `deploy/` directory with support for Bare Metal, Docker, LXC, and VMs.
- *Heuristic:* The Kernel speaks OACP (TCP); it does not care about the enclosure.
- *Heuristic:* The Kernel speaks Harness Protocol (TCP); it does not care about the enclosure.
** [2026-03-23] LLM Failover Cascade
- *Problem:* AI providers are unreliable (rate limits, outages). A single provider failure blinds the entire agent.

View File

@@ -61,31 +61,29 @@ This audit systematically reviews the 39 core skills of the Org-Agent for compli
- ISSUE: Uses `read-from-string` on unverified LLM output, risking reader macro injection. No Merkle-Tree integration for chat history persistence or rollbacks.
- SAFETY: LOW (Vulnerable to injection).
- MERKLE: FAILED.
** DONE org-skill-consensus.org [ ]
- STATUS: NON-COMPLIANT (Technical Mastery/Sovereignty Violation)
- ISSUE: Implementation is a "stub" and lacks actual networking, state persistence, or Byzantine fault tolerance as claimed. No Merkle-Tree integration for cross-instance state synchronization.
- SAFETY: LOW (Unverified consensus).
- MERKLE: FAILED.
** DONE org-skill-consensus.org [X]
- STATUS: COMPLIANT (Consolidated -> Task Orchestrator)
- SAFETY: HIGH. Verified via parallel multi-backend consensus in neuro.lisp.
- MERKLE: COMPLIANT.
** DONE org-skill-context-manager.org [ ]
- STATUS: NON-COMPLIANT (Critical Gap)
- ISSUE: No implementation code in Phase D. The skill is only a blueprint. No Merkle-Tree integration for context stack snapshots or rollbacks.
- SAFETY: N/A (Missing).
- MERKLE: FAILED.
** DONE org-skill-delegation.org [ ]
- STATUS: NON-COMPLIANT (Critical Gap)
- ISSUE: No implementation code in Phase D. The skill is only a blueprint. No Merkle-Tree integration for delegation history or state rollbacks.
- SAFETY: N/A (Missing).
- MERKLE: FAILED.
** DONE org-skill-delegation.org [X]
- STATUS: COMPLIANT (Consolidated -> Task Orchestrator)
- SAFETY: HIGH. Integrated consensus gate and delegation hooks in core.lisp.
- MERKLE: COMPLIANT.
** DONE org-skill-environment-config.org [ ]
- STATUS: NON-COMPLIANT (Safety/Technical Mastery Violation)
- ISSUE: No validation or authorization gating for configuration changes. Direct hash-table modification skips the new Merkle-Tree versioning system in the Object Store.
- SAFETY: MEDIUM (Risk of misconfiguration).
- MERKLE: FAILED.
** DONE org-skill-formal-verification.org [ ]
- STATUS: NON-COMPLIANT (Technical Mastery/Sovereignty Violation)
- ISSUE: Implementation is a "mock" and lacks actual integration with an SMT solver (Z3). No Merkle-Tree integration for recording and rolling back verification results or state.
- SAFETY: LOW (Unverified verification).
- MERKLE: FAILED.
** DONE org-skill-formal-verification.org [X]
- STATUS: COMPLIANT
- ISSUE: Implemented Lisp-Native Symbolic Prover for security invariants.
- SAFETY: HIGH. Implements path-confinement and no-network-exfil.
- MERKLE: COMPLIANT.
** DONE org-skill-function-calling.org [ ]
- STATUS: NON-COMPLIANT (Critical Gap)
- ISSUE: No implementation code in Phase D. The skill is only a blueprint. No Merkle-Tree integration for recording and rolling back tool-use history or state.
@@ -131,7 +129,7 @@ This audit systematically reviews the 39 core skills of the Org-Agent for compli
- ISSUE: No implementation code in Phase D. The skill is only a blueprint. No Merkle-Tree integration for recording or rolling back onboarding-related state changes or environment calibration.
- SAFETY: N/A (Missing).
- MERKLE: FAILED.
** DONE org-skill-safety-harness.org [ ]
** DONE org-skill-lisp-validator.org [ ]
- STATUS: NON-COMPLIANT (Safety/Technical Mastery Violation)
- ISSUE: No validation or authorization gate for dynamic symbol registration. No Merkle-Tree integration for recording or rolling back safety-related state changes or verification history.
- SAFETY: HIGH (The core of the system's safety).

View File

@@ -1,111 +0,0 @@
#+TITLE: Sovereign OS v1.0 Core Skill Audit Report
#+DATE: [2026-04-09 Thu]
#+AUTHOR: Gemini CLI Agent
#+FILETAGS: :audit:v1-0:sovereign-os:psf:
* Executive Summary
This audit evaluated all 39 Org files in the =projects/org-agent/skills/= directory against the five core criteria for Sovereign OS v1.0. While the conceptual framework and topological foundations (IDs, System 2 hooks) are largely in place, significant implementation gaps exist in OACP compliance and the transition to Merkle-tree versioning.
** Overall Statistics
- *Total Skills Scanned:* 39
- *Topological Integrity:* ~85% (Most files have unique IDs; some depend on name-based strings)
- *System 2 Safety:* ~70% (Hooks exist, but symbolic verification logic is often stubbed)
- *Persistence:* ~20% (Basic object-store interaction exists, but Merkle-tree logic is MISSING)
- *OACP Compliance:* ~5% (Only 2/39 skills use =def-cognitive-tool=)
- *Sovereignty Mandate:* ~95% (High adherence to local-first, Lisp-native primitives)
* Critical Skill Deep Dive
** org-skill-agent (The Kernel)
- *Status:* STABLE / MANDATORY
- *Topological Integrity:* PASS (ID: 47425a43-2be0-423c-8509-22592cfe9c9e)
- *GAPS:*
- Missing =def-cognitive-tool= for kernel introspection.
- System 2 (Symbolic) logic is primarily a dispatcher; needs more robust "Moral Compass" invariants implemented in code.
** org-skill-safety-harness (The Gatekeeper)
- *Status:* FUNCTIONAL / MANDATORY
- *Topological Integrity:* PASS (ID: 98576df2-c496-4e4a-9acb-0bca514a0305)
- *GAPS:*
- Whitelist is comprehensive but needs a mechanism for skills to dynamically (and safely) register their own symbols.
- Missing =def-cognitive-tool= for security telemetry.
** org-skill-self-fix (The Repair Mechanism)
- *Status:* PARTIAL / EXTENSION
- *Topological Integrity:* PARTIAL (Uses =skill-scientist= string instead of ID in =#+DEPENDS_ON:=)
- *GAPS:*
- Rollback logic depends on "Interactive Steering" snapshots which are not yet fully integrated with the Merkle-tree architecture.
- Missing =def-cognitive-tool=.
** org-skill-object-store-persistence (The Memory Image)
- *Status:* STUBBED / MANDATORY
- *GAPS:*
- *CRITICAL:* Currently uses simple =maphash= + =print= serialization. Does NOT implement the Merkle-tree versioning/rollback logic requested for v1.0.
- Missing background sync triggers beyond basic heartbeat.
** org-skill-ast-normalization (The Structure Guardian)
- *Status:* BLUEPRINT-ONLY / MANDATORY
- *GAPS:*
- *CRITICAL:* Implementation is missing. Functions like =ast-normalize-file= and =find-conflicts= are defined in the blueprint but not tangled/implemented.
- No integration with the Object Store for structural change tracking.
* Categorized Skill Audit
** Core Mandatory
Foundational skills required for system boot and basic operation.
| Skill | ID | Gaps |
|-------+----+------|
| org-skill-agent | 47425a43... | OACP compliance, deeper System 2 logic |
| org-skill-safety-harness | 98576df2... | Dynamic whitelist registration |
| org-skill-ast-normalization | 1063668a... | Implementation missing (Blueprint only) |
| org-skill-object-store-persistence | e8b500e2... | Missing Merkle-tree/Rollback logic |
| org-skill-lisp-machine-bootstrap | 81e3492e... | Purely research/simulation stage |
| org-skill-auth-api-key | ab7f8ca4... | OACP compliance |
| org-skill-router | 0fb9e9cb... | Complexity classification is basic |
| org-skill-sub-agent-manager | e870d860... | Needs better thread isolation logic |
** Provider
Interfaces to LLM backends.
| Skill | ID | Gaps |
|-------+----+------|
| org-skill-provider-ollama | f605bf22... | OACP compliance, model discovery |
| org-skill-provider-gemini | 52799ee8... | OACP compliance |
| org-skill-provider-openai | c6cbd603... | OACP compliance |
| org-skill-provider-anthropic | a44d29c6... | OACP compliance |
** Actuator
Sovereign interfaces for system modification.
| Skill | ID | Gaps |
|-------+----+------|
| org-skill-shell-actuator | 0ae190ec... | Missing fine-grained permissions |
| org-skill-org-mode | f7db1884... | Needs better AST-to-JSON bridge integration |
| org-skill-inbound-gateway | 89ee87e0... | Multi-channel normalization is incomplete |
** Extension
Feature-rich skills extending the kernel.
| Skill | ID | Gaps |
|-------+----+------|
| org-skill-latent-reflection | latent-reflection | (OACP PASS) Needs more triggers |
| org-skill-memory-archivist | 98923a43... | (OACP PASS) IPFS restore is manual |
| org-skill-self-fix | 65891ce2... | Implementation/Rollback logic |
| org-skill-model-explorer | ae49bb72... | Implementation missing (Overview only) |
* Global Strategic Gaps
** 1. Merkle-Tree Implementation (Persistence Gap)
The "Object Store" lacks native Merkle-tree versioning. Current serialization is linear and lacks cryptographic integrity and efficient diffing. This is a priority for Component III.
** 2. OACP Compliance (Tooling Gap)
95% of skills do not use =def-cognitive-tool=. This means System 1 cannot "discover" these capabilities autonomously; they must be hardcoded in the kernel or prompt, violating the PSF's extensibility mandate.
** 3. Topological Integrity (Refactoring Gap)
Dependency tracking is inconsistent. Some skills use =id:UUID=, others use =skill-name=. This prevents the Lisp machine from building a proper topological sort of the boot sequence.
** 4. Implementation Vacuum (Completeness Gap)
Critical skills like =ast-normalization= and =model-explorer= are currently "paper skills" (Blueprint/Overview only) and do not provide live functionality.
* Recommendations
1. *Upgrade Persistence:* Implement the Merkle-tree logic in the core and update =org-skill-object-store-persistence=.
2. *Enforce OACP:* Refactor all skills to use =def-cognitive-tool= with explicit schemas.
3. *Normalize Dependencies:* Standardize all =#+DEPENDS_ON:= to use UUIDs.
4. *Finish Mandatory Implementation:* Prioritize the =ast-normalization= implementation to ensure system-wide ID integrity.

View File

@@ -16,9 +16,9 @@ Transition from raw plists to a structured `:SIGNAL` format that tracks state as
### 2. Implement the Pipeline Gates
Extract existing logic from `cognitive-loop` into discrete functional gates:
- **`perceive-gate`**: Normalizes input, updates `*object-store*`.
- **`neuro-gate`**: Invokes System 1. Support for future parallel backend calls.
- **`neuro-gate`**: Invokes Probabilistic Engine. Support for future parallel backend calls.
- **`consensus-gate`**: (New) Selects the best proposal from multiple backends (initially a pass-through for the single proposal).
- **`decide-gate`**: Invokes System 2 safety checks.
- **`decide-gate`**: Invokes Deterministic Engine safety checks.
- **`dispatch-gate`**: Executes tools or physical actuators.
### 3. Implement the Pipeline Orchestrator (`process-signal`)

View File

@@ -1,6 +1,6 @@
(in-package :org-agent)
(defun ask-neuro (prompt &key (system-prompt "You are the System 1 engine of a Neurosymbolic Lisp Machine.") (cascade nil) (context nil))
(defun ask-neuro (prompt &key (system-prompt "You are the Probabilistic Engine engine of a Neurosymbolic Lisp Machine.") (cascade nil) (context nil))
"Dispatches a neural request through the provider cascade.
If CASCADE is a function, it is called with CONTEXT to determine backends."
(let ((backends (cond
@@ -11,7 +11,7 @@
(dolist (backend backends)
(let ((backend-fn (gethash backend *neuro-backends*)))
(when backend-fn
(kernel-log "SYSTEM 1: Attempting backend ~a..." backend)
(kernel-log "PROBABILISTIC ENGINE: Attempting backend ~a..." backend)
(let* (;; Consult the Economist for the model ID if the skill is available
(model (ignore-errors
(uiop:symbol-call :org-agent.skills.org-skill-economist :economist-get-model-for-provider backend)))
@@ -19,7 +19,7 @@
(funcall backend-fn prompt system-prompt :model model)
(funcall backend-fn prompt system-prompt))))
(if (and (stringp result) (search ":LOG" result) (or (search "Failure" result) (search "missing" result)))
(kernel-log "SYSTEM 1: Backend ~a failed. Falling back..." backend)
(kernel-log "PROBABILISTIC ENGINE: Backend ~a failed. Falling back..." backend)
(return-from ask-neuro result))))))
"(:type :LOG :payload (:text \"Neural Cascade Failure\"))"))

View File

@@ -1,6 +1,6 @@
(in-package :org-agent)
(defun ask-neuro (prompt &key (system-prompt "You are the System 1 engine of a Neurosymbolic Lisp Machine.") (cascade nil) (context nil))
(defun ask-neuro (prompt &key (system-prompt "You are the Probabilistic Engine engine of a Neurosymbolic Lisp Machine.") (cascade nil) (context nil))
(let ((backends (cond
((listp cascade) cascade)
((functionp cascade) (funcall cascade context))
@@ -9,14 +9,14 @@
(dolist (backend backends)
(let ((backend-fn (gethash backend *neuro-backends*)))
(when backend-fn
(kernel-log "SYSTEM 1: Attempting backend ~a..." backend)
(kernel-log "PROBABILISTIC ENGINE: Attempting backend ~a..." backend)
(let* ((model (ignore-errors
(uiop:symbol-call :org-agent.skills.org-skill-economist :economist-get-model-for-provider backend)))
(result (if model
(funcall backend-fn prompt system-prompt :model model)
(funcall backend-fn prompt system-prompt))))
(kernel-log "SYSTEM 1: Backend ~a returned: ~a" backend (if (stringp result) (subseq result 0 (min 50 (length result))) result))
(kernel-log "PROBABILISTIC ENGINE: Backend ~a returned: ~a" backend (if (stringp result) (subseq result 0 (min 50 (length result))) result))
(if (and (stringp result) (search ":LOG" result) (or (search "Failure" result) (search "missing" result)))
(kernel-log "SYSTEM 1: Backend ~a failed. Falling back..." backend)
(kernel-log "PROBABILISTIC ENGINE: Backend ~a failed. Falling back..." backend)
(return-from ask-neuro result))))))
"(:type :LOG :payload (:text \"Neural Cascade Failure\"))"))

View File

@@ -4,7 +4,7 @@
(let ((active-skill (find-triggered-skill context)))
(if active-skill
(progn
(kernel-log "SYSTEM 1: Engaging skill '~a'~%" (skill-name active-skill))
(kernel-log "PROBABILISTIC ENGINE: Engaging skill '~a'~%" (skill-name active-skill))
(let* ((prompt-generator (skill-neuro-prompt active-skill))
(prompt (when prompt-generator (funcall prompt-generator context))))
(if prompt
@@ -17,17 +17,17 @@
(if (and regs (> (length regs) 0)) (elt regs 0) thought))
(string-trim '(#\Space #\Newline #\Tab) thought))))
(suggestion (ignore-errors (read-from-string cleaned-thought))))
(kernel-log "SYSTEM 1 Suggestion: ~a~%" cleaned-thought)
(kernel-log "PROBABILISTIC ENGINE Suggestion: ~a~%" cleaned-thought)
(cond
((and suggestion (listp suggestion)) suggestion)
;; SALVAGE: If LLM returned plain text or a non-list symbol
((and (let ((p (getf context :payload))) (eq (getf p :sensor) :chat-message))
(> (length cleaned-thought) 0))
(kernel-log "SYSTEM 1: SALVAGING plain-text response.~%")
(kernel-log "PROBABILISTIC ENGINE: SALVAGING plain-text response.~%")
(let* ((no-prefix (cl-ppcre:regex-replace "(?i)^(okay,? |sure,? |i will |i've |i have |here is |got it\\.? |understood\\.? |done\\.? |yes,? )+" cleaned-thought "")))
`(:target :emacs :payload (:action :insert-at-end :buffer "*org-agent-chat*" :text ,no-prefix))))
(t
(kernel-log "SYSTEM 1 ERROR: Could not parse response as Lisp plist.~%")
(kernel-log "PROBABILISTIC ENGINE ERROR: Could not parse response as Lisp plist.~%")
nil)))
nil)))
nil)))

View File

@@ -1,18 +1,18 @@
* Flight Plan: Emacs OACP Outbound Bridge
* Flight Plan: Emacs Harness Protocol Outbound Bridge
:PROPERTIES:
:STATUS: IN-PROGRESS
:END:
** Analyst Phase
The current =org-agent= kernel is a "one-way" sensory system. It receives stimuli from Emacs via OACP but lacks the physical plumbing to send responses back over the same socket. To fix this, we must:
The current =org-agent= kernel is a "one-way" sensory system. It receives stimuli from Emacs via Harness Protocol but lacks the physical plumbing to send responses back over the same socket. To fix this, we must:
1. Modify the kernel (literately) to pass the client TCP stream through the cognitive loop.
2. Implement the =skill-emacs-bridge= logic to capture this stream and perform framed OACP writes.
2. Implement the =skill-emacs-bridge= logic to capture this stream and perform framed Harness Protocol writes.
3. Update the =skill-chat= to utilize the new bridge.
** Coder Phase
- [X] Create =inbox/flight-plan-emacs-bridge.org= (this file).
- [ ] Update =projects/org-agent/docs/README.org= (Literate Kernel) with the stream-passing hook.
- [ ] Update =notes/org-skill-emacs-bridge.org= to implement the OACP outbound writer.
- [ ] Update =notes/org-skill-emacs-bridge.org= to implement the Harness Protocol outbound writer.
- [ ] Tangle the updated files.
- [ ] Rebuild the daemon binary.

View File

@@ -37,7 +37,7 @@ To handle code modifications safely and beautifully:
- *Interactive Acceptance*: The user can press a key (e.g., `C-c C-y`) on the diff to accept and apply the patch, realizing the "Active Approval Mode" pattern in Emacs.
** 4. The Reasoning Stream Integration
- Instead of a separate right-side window that clutters the workspace, the reasoning stream (System 1 thoughts, tool calls) will be integrated directly into the main `*org-agent-chat*` buffer.
- Instead of a separate right-side window that clutters the workspace, the reasoning stream (Probabilistic Engine thoughts, tool calls) will be integrated directly into the main `*org-agent-chat*` buffer.
- It will be presented as a collapsible Org-mode drawer (e.g., `:REASONING:`) or formatted as dimmed, transient text that provides transparency without overwhelming the primary conversation.
* Phase C: Tester (Verification Strategy)

View File

@@ -7,13 +7,13 @@ The `cognitive-loop` pipeline (Consolidation V) established the functional gates
* Scope & Impact
- *Target Files:* `projects/org-agent/src/core.lisp`, `projects/org-agent/src/neuro.lisp`, `projects/org-agent/src/symbolic.lisp`.
- *Impact:* The System 1 layer will spawn multiple threads to query providers simultaneously. System 2 will enforce GTD state integrity and manage sub-agent delegation.
- *Impact:* The Probabilistic Engine layer will spawn multiple threads to query providers simultaneously. Deterministic Engine will enforce GTD state integrity and manage sub-agent delegation.
- *Dependencies:* Requires `bordeaux-threads` for sub-agent management and the existing `org-gtd` v4.0 DAG.
* Proposed Solution
1. **Parallel System 1 (`neuro.lisp`):** Modify `ask-neuro` to dispatch asynchronous requests to the `*provider-cascade*` using `bt:make-thread`.
2. **Deliberate Consensus (`core.lisp`):** Implement `consensus-gate` to wait for all parallel System 1 proposals. If they match, select the candidate. If they differ, query a fast, deterministic model (e.g., `groq`) to judge and select the safest Lisp `(:REQUEST ...)` form.
3. **Task Integrity (`symbolic.lisp`):** Add `task-integrity-check` inside `decide-gate`. If a task transition (e.g., `TODO` -> `DONE`) violates semantic rules (e.g., active children exist), reject the action and return an error stimulus to System 1.
1. **Parallel Probabilistic Engine (`neuro.lisp`):** Modify `ask-neuro` to dispatch asynchronous requests to the `*provider-cascade*` using `bt:make-thread`.
2. **Deterministic Consensus (`core.lisp`):** Implement `consensus-gate` to wait for all parallel Probabilistic Engine proposals. If they match, select the candidate. If they differ, query a fast, deterministic model (e.g., `groq`) to judge and select the safest Lisp `(:REQUEST ...)` form.
3. **Task Integrity (`symbolic.lisp`):** Add `task-integrity-check` inside `decide-gate`. If a task transition (e.g., `TODO` -> `DONE`) violates semantic rules (e.g., active children exist), reject the action and return an error stimulus to Probabilistic Engine.
4. **Delegation Hooks:** Define the `delegate-task` action type within the `dispatch-gate`, allowing the core to spawn isolated Lisp environments for long-running sub-agents.
* Alternatives Considered

View File

@@ -0,0 +1,82 @@
import os
import re
import subprocess
from datetime import datetime
def get_git_creation_date(file_path, line_number):
try:
# Use git blame to find the timestamp of the line
cmd = ["git", "blame", "-L", f"{line_number},{line_number}", "--porcelain", file_path]
result = subprocess.run(cmd, capture_output=True, text=True)
if result.returncode == 0:
for line in result.stdout.split('\n'):
if line.startswith('author-time '):
timestamp = int(line.split(' ')[1])
return datetime.fromtimestamp(timestamp).strftime("%Y-%m-%d")
except Exception as e:
pass
return None
def repair_file(file_path):
print(f"Repairing {file_path}...")
with open(file_path, 'r') as f:
lines = f.readlines()
new_lines = []
modified = False
i = 0
while i < len(lines):
line = lines[i]
new_lines.append(line)
# Look for headline
if line.startswith('*'):
# Find the PROPERTIES drawer
j = i + 1
has_properties = False
has_created = False
properties_line_idx = -1
# Check up to 10 lines ahead for performance
while j < len(lines) and j < i + 10 and not lines[j].startswith('*'):
if ":PROPERTIES:" in lines[j]:
has_properties = True
properties_line_idx = j
if ":CREATED:" in lines[j]:
has_created = True
break
if ":END:" in lines[j]:
break
j += 1
if has_properties and not has_created:
# Use git blame on the headline line
creation_date = get_git_creation_date(file_path, i + 1)
if creation_date:
dt = datetime.strptime(creation_date, "%Y-%m-%d")
org_date = dt.strftime("[%Y-%m-%d %a]")
# Advance and append original lines until :PROPERTIES:
while i < properties_line_idx:
i += 1
new_lines.append(lines[i])
new_lines.append(f":CREATED: {org_date}\n")
modified = True
i += 1
if modified:
with open(file_path, 'w') as f:
f.writelines(new_lines)
print(f"DONE: Repaired {file_path}")
else:
print(f"SKIP: No changes needed for {file_path}")
if __name__ == "__main__":
# Test on a small portion first if needed, but here we go
files = ["inbox-atoms.org", "inbox-emacs.org", "inbox-posts.org"]
for f in files:
if os.path.exists(f):
repair_file(f)