REFAC: Standardize on Cognitive Cycle and update documentation

This commit is contained in:
2026-04-14 15:59:19 -04:00
parent 34a210228e
commit e29ca5679e
46 changed files with 195 additions and 268 deletions

View File

@@ -1 +0,0 @@
user@amr.100596:1775928523

18
.gitmodules vendored
View File

@@ -1,9 +1,9 @@
[submodule "org-agent"] [submodule "opencortex"]
path = org-agent path = opencortex
url = ssh://git@10.10.10.201:2222/amr/org-agent.git url = ssh://git@10.10.10.201:2222/amr/opencortex.git
[submodule "projects/org-agent"] [submodule "projects/opencortex"]
path = projects/org-agent path = projects/opencortex
url = ssh://git@10.10.10.201:2222/amr/org-agent.git url = ssh://10.10.10.201:2222/amr/opencortex.git
[submodule "projects/org-agent-contrib"] [submodule "projects/opencortex-contrib"]
path = projects/org-agent-contrib path = projects/opencortex-contrib
url = ssh://git@10.10.10.201:2222/amr/org-agent-contrib.git url = ssh://git@10.10.10.201:2222/amr/opencortex-contrib.git

View File

@@ -2,10 +2,10 @@
#+AUTHOR: Amr #+AUTHOR: Amr
#+CREATED: [2026-03-17 Tue] #+CREATED: [2026-03-17 Tue]
#+UPDATED: [2026-04-08 Wed] #+UPDATED: [2026-04-08 Wed]
#+FILETAGS: :memex:psf:org-agent:lisp:sovereignty: #+FILETAGS: :memex:psf:opencortex:lisp:sovereignty:
* Overview * Overview
The *Master Memex* is a sovereign, neurosymbolic intelligence organization system. It is not merely a collection of notes, but a live, programmable environment—a **Personal Software Foundry (PSF)**—where a human (the Sovereign Executive) and agentic co-processes (the `org-agent` kernel and Gemini CLI) collaborate within a shared address space. The *Master Memex* is a sovereign, neurosymbolic intelligence organization system. It is not merely a collection of notes, but a live, programmable environment—a **Personal Software Foundry (PSF)**—where a human (the Sovereign Executive) and agentic co-processes (the `opencortex` kernel and Gemini CLI) collaborate within a shared address space.
This system synthesizes three core organizational methodologies into a unified "Lisp Machine" experience: This system synthesizes three core organizational methodologies into a unified "Lisp Machine" experience:
- *Zettelkasten:* For atomic, evergreen, and interlinked knowledge. - *Zettelkasten:* For atomic, evergreen, and interlinked knowledge.
@@ -33,7 +33,7 @@ The workspace is strictly divided into these zones to facilitate both human ergo
* The Agentic Inhabitants * The Agentic Inhabitants
The Memex is inhabited by autonomous agents that operate as "Probabilistic" (probabilistic/neural) and "Deterministic" (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)]] ** [[file:projects/opencortex/README.org][opencortex (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. 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.
** Gemini CLI ** Gemini CLI

View File

@@ -4,8 +4,8 @@
Consolidate and harden the kernel's skill-loading logic into a stateful "Micro-Loader." This improves boot reliability, provides clear error reporting for malformed skills, and centralizes all capability management within the `skills` module. Consolidate and harden the kernel's skill-loading logic into a stateful "Micro-Loader." This improves boot reliability, provides clear error reporting for malformed skills, and centralizes all capability management within the `skills` module.
## Key Files & Context ## Key Files & Context
- **Target:** `projects/org-agent/literate/skills.org` (Consolidating logic here). - **Target:** `projects/opencortex/literate/skills.org` (Consolidating logic here).
- **Target:** `projects/org-agent/literate/core.org` (Moving `load-all-skills` out of here). - **Target:** `projects/opencortex/literate/core.org` (Moving `load-all-skills` out of here).
- **Mandate:** Syntax Pre-flight and Dependency Assertion. - **Mandate:** Syntax Pre-flight and Dependency Assertion.
## Implementation Steps ## Implementation Steps

View File

@@ -27,10 +27,10 @@ Chronological record of all meetings, fleeting notes, and raw conversation logs
## Major System Developments ## Major System Developments
### Three OpenClaw Skills Deployed ### Three OpenClaw Skills Deployed
Created and deployed three integrated skills for the org-agent-memex system: Created and deployed three integrated skills for the opencortex-memex system:
- *org-agent-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes - *opencortex-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes
- *org-agent-memex-gtd*: Automated task promotion and GTD workflow management - *opencortex-memex-gtd*: Automated task promotion and GTD workflow management
- *org-agent-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation - *opencortex-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation
All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow. All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow.
@@ -93,10 +93,10 @@ Awaiting pressure-testing session for 21-layer audit assumptions. All building p
## Major System Developments ## Major System Developments
### Three OpenClaw Skills Deployed ### Three OpenClaw Skills Deployed
Created and deployed three integrated skills for the org-agent-memex system: Created and deployed three integrated skills for the opencortex-memex system:
- *org-agent-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes - *opencortex-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes
- *org-agent-memex-gtd*: Automated task promotion and GTD workflow management - *opencortex-memex-gtd*: Automated task promotion and GTD workflow management
- *org-agent-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation - *opencortex-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation
All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow. All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow.
@@ -159,10 +159,10 @@ Awaiting pressure-testing session for 21-layer audit assumptions. All building p
## Major System Developments ## Major System Developments
### Three OpenClaw Skills Deployed ### Three OpenClaw Skills Deployed
Created and deployed three integrated skills for the org-agent-memex system: Created and deployed three integrated skills for the opencortex-memex system:
- *org-agent-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes - *opencortex-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes
- *org-agent-memex-gtd*: Automated task promotion and GTD workflow management - *opencortex-memex-gtd*: Automated task promotion and GTD workflow management
- *org-agent-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation - *opencortex-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation
All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow. All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow.
@@ -225,10 +225,10 @@ Awaiting pressure-testing session for 21-layer audit assumptions. All building p
## Major System Developments ## Major System Developments
### Three OpenClaw Skills Deployed ### Three OpenClaw Skills Deployed
Created and deployed three integrated skills for the org-agent-memex system: Created and deployed three integrated skills for the opencortex-memex system:
- *org-agent-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes - *opencortex-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes
- *org-agent-memex-gtd*: Automated task promotion and GTD workflow management - *opencortex-memex-gtd*: Automated task promotion and GTD workflow management
- *org-agent-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation - *opencortex-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation
All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow. All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Atomic Notes (Zettelkasten) + GTD workflow.
@@ -291,10 +291,10 @@ Awaiting pressure-testing session for 21-layer audit assumptions. All building p
## Major System Developments ## Major System Developments
### Three OpenClaw Skills Deployed ### Three OpenClaw Skills Deployed
Created and deployed three integrated skills for the org-agent-memex system: Created and deployed three integrated skills for the opencortex-memex system:
- *org-agent-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes - *opencortex-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes
- *org-agent-memex-gtd*: Automated task promotion and GTD workflow management - *opencortex-memex-gtd*: Automated task promotion and GTD workflow management
- *org-agent-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation - *opencortex-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation
All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Zettelkasten + GTD workflow. All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Zettelkasten + GTD workflow.
@@ -357,10 +357,10 @@ Awaiting pressure-testing session for 21-layer audit assumptions. All building p
## Major System Developments ## Major System Developments
### Three OpenClaw Skills Deployed ### Three OpenClaw Skills Deployed
Created and deployed three integrated skills for the org-agent-memex system: Created and deployed three integrated skills for the opencortex-memex system:
- *org-agent-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes - *opencortex-memex-zettlekasten*: Nightly distillation of daily logs into atomic notes
- *org-agent-memex-gtd*: Automated task promotion and GTD workflow management - *opencortex-memex-gtd*: Automated task promotion and GTD workflow management
- *org-agent-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation - *opencortex-memex-workbreakdown*: Meta-cognitive skill for task decomposition to prevent context saturation
All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Zettelkasten + GTD workflow. All skills follow the established pattern: SKILL.md with YAML frontmatter, README.md for users, and integration with the PARA + Zettelkasten + GTD workflow.

View File

@@ -5,10 +5,10 @@
* Activities * Activities
** OpenClaw Resilience and Memory Restoration ** OpenClaw Resilience and Memory Restoration
- *Problem:* Agent suffered from "context amnesia" after a session reset at 08:10 AM, losing the path to `emacs.org` and failing to rediscover it. - *Problem:* Agent suffered from "context amnesia" after a session reset at 08:10 AM, losing the path to `emacs.org` and failing to rediscover it.
- *Root Cause:* Search depth was too shallow (workspace root only), and the `org-agent-memex-gtd` skill was not in the executable skills directory. - *Root Cause:* Search depth was too shallow (workspace root only), and the `opencortex-memex-gtd` skill was not in the executable skills directory.
- *Resolution:* - *Resolution:*
- Identified canonical path: `/home/amr/.openclaw/workspace/memex/5_projects/dotemacs/emacs.org`. - Identified canonical path: `/home/amr/.openclaw/workspace/memex/5_projects/dotemacs/emacs.org`.
- Restored skills by copying `org-agent-memex-gtd`, `org-agent-memex-workbreakdown`, and `org-agent-memex-zettlekasten` to standard `.openclaw/skills/` directory. - Restored skills by copying `opencortex-memex-gtd`, `opencortex-memex-workbreakdown`, and `opencortex-memex-zettlekasten` to standard `.openclaw/skills/` directory.
- Synced `GTD.org` and `memex/gtd.org` to ensure "Ground Truth" is consistent. - Synced `GTD.org` and `memex/gtd.org` to ensure "Ground Truth" is consistent.
** Emacs Configuration Modularization ** Emacs Configuration Modularization

16
gtd.org
View File

@@ -17,11 +17,11 @@
** NEXT OpenCortex v1.0 ** NEXT OpenCortex v1.0
:PROPERTIES: :PROPERTIES:
:ID: proj-org-agent-v1-0 :ID: proj-opencortex-v1-0
:Engineering-STATE: D: BUILD :Engineering-STATE: D: BUILD
:CREATED: [2026-03-09 Mon 14:23] :CREATED: [2026-03-09 Mon 14:23]
:END: :END:
Org-agent: A Neurosymbolic AI Agent. OpenCortex: A Neurosymbolic AI Agent.
*** PHASE: AUTONOMOUS MVP (v0.1.0 Released) *** PHASE: AUTONOMOUS MVP (v0.1.0 Released)
:PROPERTIES: :PROPERTIES:
@@ -140,7 +140,7 @@ Elevating the user interface from raw shell piping to a high-fidelity, native Li
:PROPERTIES: :PROPERTIES:
:ID: proj-autonomous-boundary :ID: proj-autonomous-boundary
:END: :END:
Slim down the org-agent microharness by moving non-essential cognitive functions to hot-reloadable user-space skills. Slim down the opencortex microharness by moving non-essential cognitive functions to hot-reloadable user-space skills.
**** DONE Extract LLM Provider Routing to a Skill (neuro.lisp) **** DONE Extract LLM Provider Routing to a Skill (neuro.lisp)
**** DONE Extract Vector Embedding Algorithms to a Skill (embedding.lisp) **** DONE Extract Vector Embedding Algorithms to a Skill (embedding.lisp)
@@ -184,7 +184,7 @@ Slim down the org-agent microharness by moving non-essential cognitive functions
CLOSED: [2026-04-12 Sun 19:15] CLOSED: [2026-04-12 Sun 19:15]
**** DONE Feature: Implement Latent Reflection (Proactive Gardening) using heartbeat idle cycles **** DONE Feature: Implement Latent Reflection (Proactive Gardening) using heartbeat idle cycles
CLOSED: [2026-04-12 Sun 19:15] CLOSED: [2026-04-12 Sun 19:15]
**** DONE Simplification: Refactor Cognitive Loop into a Unified Reactive Signal Pipeline **** DONE Simplification: Refactor Cognitive Cycle into a Unified Reactive Signal Pipeline
CLOSED: [2026-04-12 Sun 19:15] CLOSED: [2026-04-12 Sun 19:15]
**** DONE Resilience: Implement Micro-Rollbacks for the Immune System **** DONE Resilience: Implement Micro-Rollbacks for the Immune System
CLOSED: [2026-04-12 Sun 19:15] CLOSED: [2026-04-12 Sun 19:15]
@@ -214,7 +214,7 @@ Slim down the org-agent microharness by moving non-essential cognitive functions
- Implemented Task Integrity (GTD semantics) in symbolic.lisp. - Implemented Task Integrity (GTD semantics) in symbolic.lisp.
- Integrated Consensus Gate and Delegation hooks in core.lisp. - Integrated Consensus Gate and Delegation hooks in core.lisp.
- Verified with new task-orchestrator-tests.lisp. - Verified with new task-orchestrator-tests.lisp.
**** IN-PROGRESS Full review of org-agent's harness **** IN-PROGRESS Full review of opencortex's harness
:PROPERTIES: :PROPERTIES:
:CREATED: [2026-04-13 Mon 13:30] :CREATED: [2026-04-13 Mon 13:30]
:ASSIGNED: Agent :ASSIGNED: Agent
@@ -305,7 +305,7 @@ Slim down the org-agent microharness by moving non-essential cognitive functions
- Added unit tests for each provider in `llm-gateway-tests.lisp`. - Added unit tests for each provider in `llm-gateway-tests.lisp`.
- Mocked `dex:post` to verify JSON payload formatting and response parsing. - Mocked `dex:post` to verify JSON payload formatting and response parsing.
- Implemented robust `get-nested` helper to handle various provider structures. - Implemented robust `get-nested` helper to handle various provider structures.
- Integrated `llm-gateway` and `credentials-vault` into `org-agent.asd`. - Integrated `llm-gateway` and `credentials-vault` into `opencortex.asd`.
**** TODO Verify org-skill-shell-actuator formal safety harnesses **** TODO Verify org-skill-shell-actuator formal safety harnesses
**** DONE Build Playwright-Python Bridge for high-fidelity browsing **** DONE Build Playwright-Python Bridge for high-fidelity browsing
CLOSED: [2026-04-11 Sat 18:30] CLOSED: [2026-04-11 Sat 18:30]
@@ -648,7 +648,7 @@ Institutionalizing the virtual software house operating system.
- State "DONE" from "NEXT" [2026-03-22 Sun 15:45] - State "DONE" from "NEXT" [2026-03-22 Sun 15:45]
:END: :END:
*** DONE Apply Engineering Loop to `org-agent` Phase 1 (Core Loop) *** DONE Apply Engineering Loop to `opencortex` Phase 1 (Core Loop)
:PROPERTIES: :PROPERTIES:
:CREATED: [2026-03-22 Sun 15:30] :CREATED: [2026-03-22 Sun 15:30]
:ASSIGNED: Technical Analyst :ASSIGNED: Technical Analyst
@@ -1121,7 +1121,7 @@ A modular manual of different areas to go with different activities. Fits in the
*** TODO Implement Privacy-Aware Background Indexer (Local hashes for @personal, Semantic for others) *** 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 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 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 Cognitive Cycle "Rut" Recovery (Dynamic Escalation in org-skill-lisp-validator)
*** TODO Implement Asynchronous Event Bus for Telemetry (core.lisp) *** TODO Implement Asynchronous Event Bus for Telemetry (core.lisp)
*** TODO Implement Memory Eviction and Lazy Loading (LRU Cache in memory.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 Two-Speed Reflection (Immediate :post-action + Latent Heartbeat)

View File

@@ -13664,7 +13664,7 @@ CLOSED: [2026-04-04 Sat 17:36]
The Proxmox Migration: Move the agent from the low-power machine into a dedicated LXC container on the new rack. The Proxmox Migration: Move the agent from the low-power machine into a dedicated LXC container on the new rack.
** Phase III: The org-agent Microkernel (The "Native" Phase) ** Phase III: The opencortex Microkernel (The "Native" Phase)
Hollowing out the modern tools in favor of Lisp. Hollowing out the modern tools in favor of Lisp.
The Lisp Transition: Replace OpenClaws Python logic with your minimalist Common Lisp heartbeat. The Lisp Transition: Replace OpenClaws Python logic with your minimalist Common Lisp heartbeat.
@@ -13942,7 +13942,7 @@ Server Rack Assembly: Build the 4080/4040 aluminum skeleton.
Local AI Capability: Install the RTX 6000 Pros. Move from remote APIs to local inference using Ollama/vLLM (DeepSeek-R1 / Qwen3-Coder). Local AI Capability: Install the RTX 6000 Pros. Move from remote APIs to local inference using Ollama/vLLM (DeepSeek-R1 / Qwen3-Coder).
The Proxmox Migration: Move the agent from the low-power machine into a dedicated LXC container on the new rack. The Proxmox Migration: Move the agent from the low-power machine into a dedicated LXC container on the new rack.
***** Phase III: The org-agent Microkernel (The "Native" Phase) ***** Phase III: The opencortex Microkernel (The "Native" Phase)
:PROPERTIES: :PROPERTIES:
:CREATED: [2026-03-20 Fri 08:20] :CREATED: [2026-03-20 Fri 08:20]
:END: :END:
@@ -13956,16 +13956,16 @@ The final evolution into a self-hosted Lisp Machine.
The FPGA Sidecar: Activate the hardware-level "Thalamus" to verify Lisp forms. The FPGA Sidecar: Activate the hardware-level "Thalamus" to verify Lisp forms.
Unikernel/Bare Metal: Bootstrap Sol out of the Linux environment and directly onto the hardware, where the Org-mode tree and the Lisp Heap become the operating system. Unikernel/Bare Metal: Bootstrap Sol out of the Linux environment and directly onto the hardware, where the Org-mode tree and the Lisp Heap become the operating system.
***** Org-agent ***** OpenCortex
:PROPERTIES: :PROPERTIES:
:CREATED: [2026-03-20 Fri 08:00] :CREATED: [2026-03-20 Fri 08:00]
:END: :END:
By formalizing this, you are effectively designing the blueprint for Sol. By formalizing this, you are effectively designing the blueprint for Sol.
To answer your biggest question first: No, org-agent will not replace OpenCode or the Claude Agent SDK—it will act as their orchestrator and wrapper. Tools like OpenCode (which focuses on terminal-based, plan-first coding with AGENTS.md) and the Claude Agent SDK (which provides programmatic access to Anthropic's tool-calling and multi-agent teams) are phenomenal execution engines. However, they are built around Markdown, JSON, and Python/TypeScript ecosystems. To answer your biggest question first: No, opencortex will not replace OpenCode or the Claude Agent SDK—it will act as their orchestrator and wrapper. Tools like OpenCode (which focuses on terminal-based, plan-first coding with AGENTS.md) and the Claude Agent SDK (which provides programmatic access to Anthropic's tool-calling and multi-agent teams) are phenomenal execution engines. However, they are built around Markdown, JSON, and Python/TypeScript ecosystems.
org-agent replaces their management layer. Instead of letting OpenCode or Claude dictate your workflow, org-agent sits above them. When org-agent decides a complex coding task is required, it simply invokes OpenCode or a Claude subagent via a CLI or API call, passing along a compiled .org file as context. opencortex replaces their management layer. Instead of letting OpenCode or Claude dictate your workflow, opencortex sits above them. When opencortex decides a complex coding task is required, it simply invokes OpenCode or a Claude subagent via a CLI or API call, passing along a compiled .org file as context.
Here is the developer brief for building the system. Here is the developer brief for building the system.
Project Brief: org-agent Project Brief: opencortex
Mission: Build a hyper-minimalist, self-editing, proactive AI agent framework in Common Lisp. The system must use Org-mode as its exclusive interface for memory, state, and skill configuration, rejecting Markdown and JSON overhead. Mission: Build a hyper-minimalist, self-editing, proactive AI agent framework in Common Lisp. The system must use Org-mode as its exclusive interface for memory, state, and skill configuration, rejecting Markdown and JSON overhead.
Target Environment: A Linux/Proxmox homelab, running local inference servers, heavily utilizing GitOps and Lisp-based development. Target Environment: A Linux/Proxmox homelab, running local inference servers, heavily utilizing GitOps and Lisp-based development.
1. Core Architecture (The Lisp Microkernel) 1. Core Architecture (The Lisp Microkernel)
@@ -13979,18 +13979,18 @@ Instead of relying on SKILL.md or OpenCode's AGENTS.md, all capabilities are def
* Dynamic Loading: The agent reads these files on boot. If the agent generates a new .org file via an LLM output, it instantly acquires that new skill on the next heartbeat. * Dynamic Loading: The agent reads these files on boot. If the agent generates a new .org file via an LLM output, it instantly acquires that new skill on the next heartbeat.
* Progressive Disclosure: To save token context, the agent only loads the #+DESCRIPTION of a skill initially. It must explicitly request the full #+BEGIN_SRC implementation if it decides to use it. * Progressive Disclosure: To save token context, the agent only loads the #+DESCRIPTION of a skill initially. It must explicitly request the full #+BEGIN_SRC implementation if it decides to use it.
3. LLMs and Coding Agents as "Effectors" 3. LLMs and Coding Agents as "Effectors"
org-agent treats AI models and external SDKs exactly like it treats a Proxmox server—as a downstream tool to be managed. opencortex treats AI models and external SDKs exactly like it treats a Proxmox server—as a downstream tool to be managed.
| External Tool | How org-agent Uses It | Trade-off | | External Tool | How opencortex Uses It | Trade-off |
|------------------------+-----------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------| |------------------------+-----------------------------------------------------------------------------------------------------------------------------------+---------------------------------------------------------------------|
| Local Inference (vLLM) | A base skill (llm-local.org) containing an HTTP POST request to your RTX 6000 cluster for fast, cheap, private reasoning. | Requires manual mapping of Lisp s-expressions to the local model's API. | | Local Inference (vLLM) | A base skill (llm-local.org) containing an HTTP POST request to your RTX 6000 cluster for fast, cheap, private reasoning. | Requires manual mapping of Lisp s-expressions to the local model's API. |
| OpenCode | A wrapper skill (skill-opencode.org) that triggers the opencode CLI to execute a massive refactoring job, returning the git diff to org-agent. | Abandons OpenCode's native TUI in favor of headless execution. | | OpenCode | A wrapper skill (skill-opencode.org) that triggers the opencode CLI to execute a massive refactoring job, returning the git diff to opencortex. | Abandons OpenCode's native TUI in favor of headless execution. |
| Claude Agent SDK | A wrapper skill that triggers a Python script leveraging Anthropic's SDK to spin up a multi-agent "Team" for deep architectural planning. | Costs external API tokens; requires Python alongside Lisp. | | Claude Agent SDK | A wrapper skill that triggers a Python script leveraging Anthropic's SDK to spin up a multi-agent "Team" for deep architectural planning. | Costs external API tokens; requires Python alongside Lisp. |
4. Security & Isolation 4. Security & Isolation
Because org-agent runs directly on the host machine to manage Proxmox and GitOps, security is handled via strict allow-lists within the Lisp kernel. Because opencortex runs directly on the host machine to manage Proxmox and GitOps, security is handled via strict allow-lists within the Lisp kernel.
* The LLM backend is instructed to output strictly formatted Lisp s-expressions (e.g., (invoke-skill "proxmox" "restart-staging")). * The LLM backend is instructed to output strictly formatted Lisp s-expressions (e.g., (invoke-skill "proxmox" "restart-staging")).
* The Lisp Executor will only evaluate forms where the car (the function name) matches a predefined, safe whitelist. * The Lisp Executor will only evaluate forms where the car (the function name) matches a predefined, safe whitelist.
The Verdict on the Workflow The Verdict on the Workflow
By building org-agent, you are creating a system where your daily GTD notes, your infrastructure commands, and your AI's source code all share the exact same syntax. It is the ultimate manifestation of "Code is Data." By building opencortex, you are creating a system where your daily GTD notes, your infrastructure commands, and your AI's source code all share the exact same syntax. It is the ultimate manifestation of "Code is Data."
Would you like me to draft the Lisp parser function that reads an .org skill file and translates its #+NAME and #+BEGIN_SRC blocks into callable Lisp functions for the agent's whitelist? Would you like me to draft the Lisp parser function that reads an .org skill file and translates its #+NAME and #+BEGIN_SRC blocks into callable Lisp functions for the agent's whitelist?
***** Agora ***** Agora

View File

@@ -3,78 +3,6 @@
This is the inbox. Everything goes in here when you capture it. This is the inbox. Everything goes in here when you capture it.
#+end_comment #+end_comment
* [[https://www.arsheef.org/digitized-collections][Digitized Collections — arsheef]]
:PROPERTIES:
:TITLE: Digitized Collections — arsheef
:URI: https://www.arsheef.org/digitized-collections
:CREATED: [2026-04-14 Tue 11:02]
:END:
* [[https://archive.org/search?query=%D9%83%D8%AA%D8%A7%D8%A8+%D8%A7%D9%84%D9%87%D9%84%D8%A7%D9%84][Internet Archive: Digital Library of Free & Borrowable Texts, Movies, Music & Wayback Machine]]
:PROPERTIES:
:TITLE: Internet Archive: Digital Library of Free & Borrowable Texts, Movies, Music & Wayback Machine
:URI: https://archive.org/search?query=%D9%83%D8%AA%D8%A7%D8%A8+%D8%A7%D9%84%D9%87%D9%84%D8%A7%D9%84
:CREATED: [2026-04-14 Tue 11:02]
:END:
A complete archive of كتاب الهلال.
* [[https://community.home-assistant.io/t/new-weather-radar-card/417635][New Weather Radar Card - Share your Projects! / Dashboards & Frontend - Home Assistant Community]]
:PROPERTIES:
:TITLE: New Weather Radar Card - Share your Projects! / Dashboards & Frontend - Home Assistant Community
:URI: https://community.home-assistant.io/t/new-weather-radar-card/417635
:CREATED: [2026-04-14 Tue 11:11]
:END:
* [[https://community.home-assistant.io/t/music-assistant-player-card-control-your-players-adjust-transfer-and-join-queues-and-browse-your-media/929266][Music Assistant Player Card - Control your players, adjust, transfer, and join queues, and browse your media! - Share your Projects! / Dashboards & Frontend - Home Assistant Community]]
:PROPERTIES:
:TITLE: Music Assistant Player Card - Control your players, adjust, transfer, and join queues, and browse your media! - Share your Projects! / Dashboards & Frontend - Home Assistant Community
:URI: https://community.home-assistant.io/t/music-assistant-player-card-control-your-players-adjust-transfer-and-join-queues-and-browse-your-media/929266
:CREATED: [2026-04-14 Tue 11:11]
:END:
* [[https://github.com/nimroddolev/chime_tts][nimroddolev/chime_tts: A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages]]
:PROPERTIES:
:TITLE: nimroddolev/chime_tts: A custom Home Assistant integration to play combined audio files before and/or after text-to-speech (TTS) messages
:URI: https://github.com/nimroddolev/chime_tts
:CREATED: [2026-04-14 Tue 11:11]
:END:
* [[https://github.com/Clooos/bubble-card][Clooos/Bubble-Card: Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.]]
:PROPERTIES:
:TITLE: Clooos/Bubble-Card: Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
:URI: https://github.com/Clooos/bubble-card
:CREATED: [2026-04-14 Tue 11:11]
:END:
* [[https://github.com/PRProd/HA-Firemote][PRProd/HA-Firemote: Apple TV, Amazon Fire TV, Chromecast, Homatics, NVIDIA Shield, onn., Roku, Xiaomi Mi, and Android TV remote control card for Home Assistant]]
:PROPERTIES:
:TITLE: PRProd/HA-Firemote: Apple TV, Amazon Fire TV, Chromecast, Homatics, NVIDIA Shield, onn., Roku, Xiaomi Mi, and Android TV remote control card for Home Assistant
:URI: https://github.com/PRProd/HA-Firemote
:CREATED: [2026-04-14 Tue 11:12]
:END:
* [[https://torath.gov.eg/books/bookAuthority/books-listing?seriesName=%D8%AA%D8%A7%D8%B1%D9%8A%D8%AE%20%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A%D9%8A%D9%86&page=1][تاريخ المصريين - الهيئة المصرية العامة للكتاب - تراث مصر الرقمي]]
:PROPERTIES:
:TITLE: تاريخ المصريين - الهيئة المصرية العامة للكتاب - تراث مصر الرقمي
:URI: https://torath.gov.eg/books/bookAuthority/books-listing?seriesName=%D8%AA%D8%A7%D8%B1%D9%8A%D8%AE%20%D8%A7%D9%84%D9%85%D8%B5%D8%B1%D9%8A%D9%8A%D9%86&page=1
:CREATED: [2026-04-14 Tue 11:14]
:END:
* [[https://sliger.com/products/cx4712][CX4712 | Sliger]] :homelab:years:
:PROPERTIES:
:TITLE: CX4712 | Sliger
:URI: https://sliger.com/products/cx4712
:CREATED: [2026-04-14 Tue 11:14]
:END:
* [[https://www.mogawdat.com/][Mo Gawdat | AI + Happiness]]
:PROPERTIES:
:TITLE: Mo Gawdat | AI + Happiness
:URI: https://www.mogawdat.com/
:CREATED: [2026-04-14 Tue 11:15]
:END:
* [[https://x.com/michael_chomsky/status/2043369126631207096][Michael on X: "Garry is kinda correct here, but is oversimplifying memory. Harrison (the author of the original article) makes a very good point but also makes memory sound easier than it is. (before reading this article, note that I wrote down my thoughts and then passed it through Claude" / X]] * [[https://x.com/michael_chomsky/status/2043369126631207096][Michael on X: "Garry is kinda correct here, but is oversimplifying memory. Harrison (the author of the original article) makes a very good point but also makes memory sound easier than it is. (before reading this article, note that I wrote down my thoughts and then passed it through Claude" / X]]
:PROPERTIES: :PROPERTIES:
:TITLE: Michael on X: "Garry is kinda correct here, but is oversimplifying memory. Harrison (the author of the original article) makes a very good point but also makes memory sound easier than it is. (before reading this article, note that I wrote down my thoughts and then passed it through Claude" / X :TITLE: Michael on X: "Garry is kinda correct here, but is oversimplifying memory. Harrison (the author of the original article) makes a very good point but also makes memory sound easier than it is. (before reading this article, note that I wrote down my thoughts and then passed it through Claude" / X

View File

@@ -12,9 +12,9 @@
- *Solution:* The *Org-Native Skill Standard*. Skills are written entirely as `.org` files. The daemon parses the Org file at startup, extracts `#+begin_src lisp` blocks containing triggers, neuro-prompts, and symbolic verification rules, and dynamically compiles them into the live system using `eval` and `read`. - *Solution:* The *Org-Native Skill Standard*. Skills are written entirely as `.org` files. The daemon parses the Org file at startup, extracts `#+begin_src lisp` blocks containing triggers, neuro-prompts, and symbolic verification rules, and dynamically compiles them into the live system using `eval` and `read`.
- *Heuristic:* The Core is strictly the PTA loop (`core.lisp`, `neuro.lisp`, `symbolic.lisp`). ALL business logic, API connectors, and rule sets MUST live as `.org` files in the `skills/` directory. - *Heuristic:* The Core is strictly the PTA loop (`core.lisp`, `neuro.lisp`, `symbolic.lisp`). ALL business logic, API connectors, and rule sets MUST live as `.org` files in the `skills/` directory.
** [2026-03-23] Cognitive Loop Architecture (org-agent) ** [2026-03-23] Cognitive Cycle Architecture (opencortex)
- *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. - *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. - *Solution:* Implement the *Four-Stage Cognitive Cycle*: Perceive -> Think -> Decide -> Act.
- *Heuristic:* Probabilistic Engine (Neural/LLM) is a proposal engine only. Deterministic Engine (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). - *Verification:* Never execute an action unless it has passed through `decide()` and been verified against the symbolic Object Store (CLOSOS).

View File

@@ -21,7 +21,7 @@ Define the requirements for modular, open-source, and intelligent home hardware.
** 2. User Needs ** 2. User Needs
- *Physical Modularity:* Easy replacement and upgrade of mechanical and electrical components. - *Physical Modularity:* Easy replacement and upgrade of mechanical and electrical components.
- *Smart Interfacing:* ESP32-based control boards for connectivity. - *Smart Interfacing:* ESP32-based control boards for connectivity.
- *Multimodal Control:* Support for smartphone apps, physical modular controllers, and direct `org-agent` AI interaction. - *Multimodal Control:* Support for smartphone apps, physical modular controllers, and direct `opencortex` AI interaction.
- *Sustainability:* Design for longevity, repairability, and efficient power management (inspired by Slate principles). - *Sustainability:* Design for longevity, repairability, and efficient power management (inspired by Slate principles).
** 3. Success Criteria ** 3. Success Criteria

View File

@@ -20,7 +20,7 @@ Define the requirements for a modular, user-serviceable, and aesthetically pleas
** 2. User Needs ** 2. User Needs
- *Modularity:* Unified backplane for swappable compute, storage, and power modules. - *Modularity:* Unified backplane for swappable compute, storage, and power modules.
- *Sovereignty:* Full control over hardware and the software stack (running `org-agent`). - *Sovereignty:* Full control over hardware and the software stack (running `opencortex`).
- *Aesthetics:* Sleek "Hi-Fi" industrial design. - *Aesthetics:* Sleek "Hi-Fi" industrial design.
- *Multimodality:* Integration of SDR, AV, and specialized processors. - *Multimodality:* Integration of SDR, AV, and specialized processors.

View File

@@ -5,7 +5,7 @@
#+STARTUP: overview #+STARTUP: overview
* Overview * Overview
This audit systematically reviews the 39 core skills of the Org-Agent for compliance with the V1.0 standards: This audit systematically reviews the 39 core skills of the OpenCortex for compliance with the V1.0 standards:
1. **Safety:** Prevention of code injection, proper sandboxing, and actuator safety. 1. **Safety:** Prevention of code injection, proper sandboxing, and actuator safety.
2. **Merkle-Tree Integration:** Proper use of the native Lisp Merkle-Tree versioning for undo/rollback. 2. **Merkle-Tree Integration:** Proper use of the native Lisp Merkle-Tree versioning for undo/rollback.
3. **Core Invariants:** Adherence to Sovereignty, Mastery, Zero-Bloat, Transparency, and Sustainability. 3. **Core Invariants:** Adherence to Sovereignty, Mastery, Zero-Bloat, Transparency, and Sustainability.

View File

@@ -4,7 +4,7 @@
Implement a sophisticated "Foveal-Peripheral" context model. This ensures the agent has high-resolution focus on the current task (Foveal) while maintaining a low-resolution "skeletal" awareness of the broader Memex structure (Peripheral), optimized for token efficiency and reasoning accuracy. Implement a sophisticated "Foveal-Peripheral" context model. This ensures the agent has high-resolution focus on the current task (Foveal) while maintaining a low-resolution "skeletal" awareness of the broader Memex structure (Peripheral), optimized for token efficiency and reasoning accuracy.
## Key Files & Context ## Key Files & Context
- **Target:** `projects/org-agent/literate/context.org` (Source of `src/context.lisp`) - **Target:** `projects/opencortex/literate/context.org` (Source of `src/context.lisp`)
- **Core Concept:** Deep pruning of the Org AST based on semantic distance and structural hierarchy. - **Core Concept:** Deep pruning of the Org AST based on semantic distance and structural hierarchy.
## Implementation Steps ## Implementation Steps

View File

@@ -1,11 +1,11 @@
# Implementation Plan: Reactive Signal Pipeline Refactor # Implementation Plan: Reactive Signal Pipeline Refactor
## Objective ## Objective
Refactor the monolithic recursive `cognitive-loop` into a functional, gate-based `reactive-signal-pipeline`. This flattens the execution stack, enables multi-backend consensus, and improves observability according to Component VII of the evolutionary roadmap. Refactor the monolithic recursive `cognitive-cycle` into a functional, gate-based `reactive-signal-pipeline`. This flattens the execution stack, enables multi-backend consensus, and improves observability according to Component VII of the evolutionary roadmap.
## Key Files & Context ## Key Files & Context
- **Target:** `projects/org-agent/literate/core.org` (Source of `src/core.lisp`) - **Target:** `projects/opencortex/literate/core.org` (Source of `src/core.lisp`)
- **Architectural Reference:** `projects/org-agent/literate/evolution.org` - **Architectural Reference:** `projects/opencortex/literate/evolution.org`
## Implementation Steps ## Implementation Steps
@@ -14,7 +14,7 @@ Transition from raw plists to a structured `:SIGNAL` format that tracks state as
- Attributes: `:status`, `:payload`, `:context`, `:depth`, `:proposals`, `:reply-stream`. - Attributes: `:status`, `:payload`, `:context`, `:depth`, `:proposals`, `:reply-stream`.
### 2. Implement the Pipeline Gates ### 2. Implement the Pipeline Gates
Extract existing logic from `cognitive-loop` into discrete functional gates: Extract existing logic from `cognitive-cycle` into discrete functional gates:
- **`perceive-gate`**: Normalizes input, updates `*object-store*`. - **`perceive-gate`**: Normalizes input, updates `*object-store*`.
- **`neuro-gate`**: Invokes Probabilistic Engine. 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). - **`consensus-gate`**: (New) Selects the best proposal from multiple backends (initially a pass-through for the single proposal).
@@ -26,10 +26,10 @@ Create a function that moves a signal through the sequence of gates.
- **Flattening Recursion:** If `dispatch-gate` results in a tool output or error, it MUST NOT call the pipeline recursively. Instead, it returns a new `:SIGNAL` with `depth + 1`, which the orchestrator then re-injects into the top of the pipe via a loop or queue. - **Flattening Recursion:** If `dispatch-gate` results in a tool output or error, it MUST NOT call the pipeline recursively. Instead, it returns a new `:SIGNAL` with `depth + 1`, which the orchestrator then re-injects into the top of the pipe via a loop or queue.
### 4. Refactor `inject-stimulus` ### 4. Refactor `inject-stimulus`
Update `inject-stimulus` to initialize a Signal and hand it to the `process-signal` pipeline instead of `cognitive-loop`. Update `inject-stimulus` to initialize a Signal and hand it to the `process-signal` pipeline instead of `cognitive-cycle`.
### 5. Cleanup ### 5. Cleanup
Remove the obsolete `cognitive-loop` function and update `literate/core.org` documentation/diagrams to reflect the new architecture. Remove the obsolete `cognitive-cycle` function and update `literate/core.org` documentation/diagrams to reflect the new architecture.
## Verification & Testing (Phase E: Chaos) ## Verification & Testing (Phase E: Chaos)
- **Unit Tests:** Verify each gate function in isolation. - **Unit Tests:** Verify each gate function in isolation.

View File

@@ -36,5 +36,5 @@ See the actionable tasks for this project in [[file:../../gtd.org::*Lisp Machine
* Links * Links
- [[file:../org-agent/][Orchestration: org-agent Microkernel]] - [[file:../opencortex/][Orchestration: opencortex Microkernel]]
- [[file:../agora/][Social Layer: Agora Protocol]] - [[file:../agora/][Social Layer: Agora Protocol]]

1
projects/opencortex Submodule

Submodule projects/opencortex added at 2d4a6d1586

View File

@@ -2124,42 +2124,42 @@ On package.el, it is a manual install so far
(use-package chemtable) (use-package chemtable)
#+end_src #+end_src
** Org-agent ** OpenCortex
#+begin_src elisp #+begin_src elisp
;; 1. Manually add the path to your load-path ;; 1. Manually add the path to your load-path
(add-to-list 'load-path "~/memex/projects/org-agent/src") (add-to-list 'load-path "~/memex/projects/opencortex/src")
;; 2. Explicitly load the file ;; 2. Explicitly load the file
(require 'org-agent) (require 'opencortex)
;; 3. Configure the variables AFTER the package is loaded ;; 3. Configure the variables AFTER the package is loaded
(setq org-agent-host "10.10.10.201") (setq opencortex-host "10.10.10.201")
(setq org-agent-port 9105) (setq opencortex-port 9105)
(setq org-agent-executable-path nil) (setq opencortex-executable-path nil)
;; 4. (Optional) Re-enable use-package features if you prefer ;; 4. (Optional) Re-enable use-package features if you prefer
(use-package org-agent (use-package opencortex
:straight nil :straight nil
:commands (org-agent-connect org-agent-disconnect)) :commands (opencortex-connect opencortex-disconnect))
(message "org-agent: Actuator manually verified at %s" org-agent-host) (message "opencortex: Actuator manually verified at %s" opencortex-host)
;; (use-package org-agent ;; (use-package opencortex
;; :straight nil ;; :straight nil
;; :load-path "~/memex/projects/org-agent/src" ;; Adjust this to your local clone path ;; :load-path "~/memex/projects/opencortex/src" ;; Adjust this to your local clone path
;; :commands (org-agent-connect org-agent-disconnect) ;; :commands (opencortex-connect opencortex-disconnect)
;; :init ;; :init
;; Remote connection settings ;; Remote connection settings
;; (setq org-agent-host "10.10.10.43") ;; Your Docker server's IP ;; (setq opencortex-host "10.10.10.43") ;; Your Docker server's IP
;; (setq org-agent-port 9105) ;; Must match ORG_AGENT_DAEMON_PORT in .env ;; (setq opencortex-port 9105) ;; Must match ORG_AGENT_DAEMON_PORT in .env
;; Optimization: Automatically connect when entering Org-mode (optional) ;; Optimization: Automatically connect when entering Org-mode (optional)
;; :hook (org-mode . org-agent-connect) ;; :hook (org-mode . opencortex-connect)
;; :config ;; :config
;; Ensure Emacs is acting as a proper sensor ;; Ensure Emacs is acting as a proper sensor
;; (message "org-agent: Actuator configured for remote brain at %s" ;; (message "opencortex: Actuator configured for remote brain at %s"
;; (org-agent-host)) ;; (opencortex-host))
;; ) ;; )
#+end_src #+end_src

View File

@@ -79,13 +79,13 @@
:embedding-model "nomic-embed-text")) :embedding-model "nomic-embed-text"))
) )
(use-package org-agent (use-package opencortex
:straight nil :straight nil
:load-path "~/.local/share/org-agent/src" :load-path "~/.local/share/opencortex/src"
:commands (org-agent-connect org-agent-disconnect) :commands (opencortex-connect opencortex-disconnect)
:init :init
(setq org-agent-host "127.0.0.1") (setq opencortex-host "127.0.0.1")
(setq org-agent-port 9105) (setq opencortex-port 9105)
(setq org-agent-executable-path "~/.local/share/org-agent/bin/org-agent-server") (setq opencortex-executable-path "~/.local/share/opencortex/bin/opencortex-server")
:config :config
(message "org-agent: Local brain configured at %s" org-agent-executable-path)) (message "opencortex: Local brain configured at %s" opencortex-executable-path))

View File

@@ -104,17 +104,17 @@
) )
#+end_src #+end_src
** Org-agent (Local Foundry) ** OpenCortex (Local Foundry)
#+begin_src elisp :tangle yes #+begin_src elisp :tangle yes
(use-package org-agent (use-package opencortex
:straight nil :straight nil
:load-path "~/.local/share/org-agent/src" :load-path "~/.local/share/opencortex/src"
:commands (org-agent-connect org-agent-disconnect) :commands (opencortex-connect opencortex-disconnect)
:init :init
(setq org-agent-host "127.0.0.1") (setq opencortex-host "127.0.0.1")
(setq org-agent-port 9105) (setq opencortex-port 9105)
(setq org-agent-executable-path "~/.local/share/org-agent/bin/org-agent-server") (setq opencortex-executable-path "~/.local/share/opencortex/bin/opencortex-server")
:config :config
(message "org-agent: Local brain configured at %s" org-agent-executable-path)) (message "opencortex: Local brain configured at %s" opencortex-executable-path))
#+end_src #+end_src

View File

@@ -46,7 +46,7 @@ notes/org-skill-memex.org|2026-03-31T13:03:26-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-model-explorer.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00 notes/org-skill-model-explorer.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-object-store-persistence.org|2026-03-31T18:28:47-04:00|2026-04-07T13:42:42-04:00 notes/org-skill-object-store-persistence.org|2026-03-31T18:28:47-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-onboarding.org|2026-03-31T18:13:26-04:00|2026-04-07T13:42:42-04:00 notes/org-skill-onboarding.org|2026-03-31T18:13:26-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-agent.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00 notes/org-skill-opencortex.org|2026-04-07T12:57:15-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-delivery.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00 notes/org-skill-org-delivery.org|2026-03-30T21:16:05-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-gtd-archive-roam-daily.org|2026-03-31T16:14:37-04:00|2026-04-07T13:42:42-04:00 notes/org-skill-org-gtd-archive-roam-daily.org|2026-03-31T16:14:37-04:00|2026-04-07T13:42:42-04:00
notes/org-skill-org-json-bridge.org|2026-03-31T16:14:37-04:00|2026-04-07T13:42:42-04:00 notes/org-skill-org-json-bridge.org|2026-03-31T16:14:37-04:00|2026-04-07T13:42:42-04:00

View File

@@ -1,6 +1,6 @@
(require 'org) (require 'org)
(defun org-agent-inject-metadata (file created edited) (defun opencortex-inject-metadata (file created edited)
(with-current-buffer (find-file-noselect file) (with-current-buffer (find-file-noselect file)
(org-with-wide-buffer (org-with-wide-buffer
(goto-char (point-min)) (goto-char (point-min))
@@ -9,12 +9,12 @@
(org-id-get-create) ; Ensure drawer exists (org-id-get-create) ; Ensure drawer exists
(setq props (org-get-property-block)))) (setq props (org-get-property-block))))
(org-set-property "CREATED" (org-agent-format-iso created)) (org-set-property "CREATED" (opencortex-format-iso created))
(org-set-property "EDITED" (org-agent-format-iso edited)) (org-set-property "EDITED" (opencortex-format-iso edited))
(save-buffer) (save-buffer)
(kill-buffer)))) (kill-buffer))))
(defun org-agent-format-iso (iso-date) (defun opencortex-format-iso (iso-date)
"Convert 2026-04-07T10:00:00+00:00 to [2026-04-07 Tue 10:00]" "Convert 2026-04-07T10:00:00+00:00 to [2026-04-07 Tue 10:00]"
(let ((time (parse-time-string iso-date))) (let ((time (parse-time-string iso-date)))
(format-time-string "[%Y-%m-%d %a %H:%M]" (apply #'encode-time time)))) (format-time-string "[%Y-%m-%d %a %H:%M]" (apply #'encode-time time))))
@@ -26,4 +26,4 @@
(dolist (line lines) (dolist (line lines)
(let ((parts (split-string line "|"))) (let ((parts (split-string line "|")))
(when (= (length parts) 3) (when (= (length parts) 3)
(org-agent-inject-metadata (nth 0 parts) (nth 1 parts) (nth 2 parts)))))) (opencortex-inject-metadata (nth 0 parts) (nth 1 parts) (nth 2 parts))))))

View File

@@ -2,7 +2,7 @@
(ql:quickload :usocket :silent t) (ql:quickload :usocket :silent t)
(defun send-to-swank (form-string) (defun send-to-swank (form-string)
(let* ((msg (format nil "(:emacs-rex (swank:interactive-eval ~s) :org-agent t 1)" form-string)) (let* ((msg (format nil "(:emacs-rex (swank:interactive-eval ~s) :opencortex t 1)" form-string))
(len (format nil "~6,'0x" (length msg))) (len (format nil "~6,'0x" (length msg)))
(socket (usocket:socket-connect "127.0.0.1" 4005)) (socket (usocket:socket-connect "127.0.0.1" 4005))
(stream (usocket:socket-stream socket))) (stream (usocket:socket-stream socket)))

File diff suppressed because one or more lines are too long

View File

@@ -1,4 +1,4 @@
(in-package :org-agent.skills.org-skill-architect) (in-package :opencortex.skills.org-skill-architect)
(defun architect-actuate (action context) (defun architect-actuate (action context)
(declare (ignore context)) (declare (ignore context))
@@ -9,11 +9,11 @@
(if (and note-path blueprint-content) (if (and note-path blueprint-content)
(progn (progn
(org-agent:kernel-log "ARCHITECT - Appending PROTOCOL to ~a" note-path) (opencortex:kernel-log "ARCHITECT - Appending PROTOCOL to ~a" note-path)
(with-open-file (out note-path :direction :output :if-exists :append) (with-open-file (out note-path :direction :output :if-exists :append)
(format out "~%* Phase B: Blueprint (PROTOCOL)~%:PROPERTIES:~%:STATUS: SIGNED~%:END:~%~%~a" (format out "~%* Phase B: Blueprint (PROTOCOL)~%:PROPERTIES:~%:STATUS: SIGNED~%:END:~%~%~a"
blueprint-content)) blueprint-content))
(format nil "SUCCESS - Architect established PROTOCOL in ~a" note-path)) (format nil "SUCCESS - Architect established PROTOCOL in ~a" note-path))
(progn (progn
(org-agent:kernel-log "ARCHITECT FAILURE - Missing path or content in action: ~a" action) (opencortex:kernel-log "ARCHITECT FAILURE - Missing path or content in action: ~a" action)
nil)))) nil))))

View File

@@ -1,4 +1,4 @@
(in-package :org-agent.skills.org-skill-architect) (in-package :opencortex.skills.org-skill-architect)
(defun neuro-skill-architect (context) (defun neuro-skill-architect (context)
(let* ((payload (getf context :payload)) (let* ((payload (getf context :payload))

View File

@@ -1,10 +1,10 @@
(in-package :org-agent.skills.org-skill-architect) (in-package :opencortex.skills.org-skill-architect)
(defun architect-scan-all-notes () (defun architect-scan-all-notes ()
(let* ((notes-dir (or (uiop:getenv "MEMEX_NOTES") "/home/user/memex/notes/")) (let* ((notes-dir (or (uiop:getenv "MEMEX_NOTES") "/home/user/memex/notes/"))
(files (uiop:directory-files (uiop:ensure-directory-pathname notes-dir))) (files (uiop:directory-files (uiop:ensure-directory-pathname notes-dir)))
(ready-notes '())) (ready-notes '()))
(org-agent:kernel-log "ARCHITECT - Scanning ~a files in ~a" (length files) notes-dir) (opencortex:kernel-log "ARCHITECT - Scanning ~a files in ~a" (length files) notes-dir)
(dolist (file files) (dolist (file files)
(let ((name (pathname-name file)) (let ((name (pathname-name file))
(type (pathname-type file))) (type (pathname-type file)))
@@ -13,5 +13,5 @@
(string-equal type "org")) (string-equal type "org"))
(let ((status (architect-perceive-frozen-prd file))) (let ((status (architect-perceive-frozen-prd file)))
(when status (push status ready-notes)))))) (when status (push status ready-notes))))))
(org-agent:kernel-log "ARCHITECT - Found ~a ready notes." (length ready-notes)) (opencortex:kernel-log "ARCHITECT - Found ~a ready notes." (length ready-notes))
ready-notes)) ready-notes))

View File

@@ -1,4 +1,4 @@
(in-package :org-agent) (in-package :opencortex)
(defun execute-openrouter-request (prompt system-prompt &key model) (defun execute-openrouter-request (prompt system-prompt &key model)
(let ((api-key (uiop:getenv "OPENROUTER_API_KEY")) (let ((api-key (uiop:getenv "OPENROUTER_API_KEY"))
@@ -8,7 +8,7 @@
(kernel-log "OPENROUTER DEBUG - Using Model: ~a" model-id) (kernel-log "OPENROUTER DEBUG - Using Model: ~a" model-id)
(let* ((headers `(("Content-Type" . "application/json") (let* ((headers `(("Content-Type" . "application/json")
("Authorization" . ,(format nil "Bearer ~a" api-key)) ("Authorization" . ,(format nil "Bearer ~a" api-key))
("HTTP-Referer" . "https://github.com/amr/org-agent"))) ("HTTP-Referer" . "https://github.com/amr/opencortex")))
(body (cl-json:encode-json-to-string (body (cl-json:encode-json-to-string
`((model . ,model-id) `((model . ,model-id)
(messages . (( (role . "system") (content . ,system-prompt) ) (messages . (( (role . "system") (content . ,system-prompt) )

View File

@@ -1,4 +1,4 @@
(in-package :org-agent) (in-package :opencortex)
(defun ask-neuro (prompt &key (system-prompt "You are the Probabilistic Engine 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. "Dispatches a neural request through the provider cascade.
@@ -14,7 +14,7 @@
(kernel-log "PROBABILISTIC ENGINE: 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 (let* (;; Consult the Economist for the model ID if the skill is available
(model (ignore-errors (model (ignore-errors
(uiop:symbol-call :org-agent.skills.org-skill-economist :economist-get-model-for-provider backend))) (uiop:symbol-call :opencortex.skills.org-skill-economist :economist-get-model-for-provider backend)))
(result (if model (result (if model
(funcall backend-fn prompt system-prompt :model model) (funcall backend-fn prompt system-prompt :model model)
(funcall backend-fn prompt system-prompt)))) (funcall backend-fn prompt system-prompt))))
@@ -30,7 +30,7 @@
(unless api-key (return-from execute-openrouter-request "(:type :LOG :payload (:text \"OpenRouter API Key missing\"))")) (unless api-key (return-from execute-openrouter-request "(:type :LOG :payload (:text \"OpenRouter API Key missing\"))"))
(let* ((headers `(("Content-Type" . "application/json") (let* ((headers `(("Content-Type" . "application/json")
("Authorization" . ,(format nil "Bearer ~a" api-key)) ("Authorization" . ,(format nil "Bearer ~a" api-key))
("HTTP-Referer" . "https://github.com/amr/org-agent"))) ("HTTP-Referer" . "https://github.com/amr/opencortex")))
(body (cl-json:encode-json-to-string (body (cl-json:encode-json-to-string
`((model . ,model-id) `((model . ,model-id)
(messages . (( (role . "system") (content . ,system-prompt) ) (messages . (( (role . "system") (content . ,system-prompt) )

View File

@@ -1,4 +1,4 @@
(in-package :org-agent) (in-package :opencortex)
(defun ask-neuro (prompt &key (system-prompt "You are the Probabilistic Engine 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 (let ((backends (cond
@@ -11,7 +11,7 @@
(when backend-fn (when backend-fn
(kernel-log "PROBABILISTIC ENGINE: Attempting backend ~a..." backend) (kernel-log "PROBABILISTIC ENGINE: Attempting backend ~a..." backend)
(let* ((model (ignore-errors (let* ((model (ignore-errors
(uiop:symbol-call :org-agent.skills.org-skill-economist :economist-get-model-for-provider backend))) (uiop:symbol-call :opencortex.skills.org-skill-economist :economist-get-model-for-provider backend)))
(result (if model (result (if model
(funcall backend-fn prompt system-prompt :model model) (funcall backend-fn prompt system-prompt :model model)
(funcall backend-fn prompt system-prompt)))) (funcall backend-fn prompt system-prompt))))

View File

@@ -1,4 +1,4 @@
(in-package :org-agent) (in-package :opencortex)
(defun think (context) (defun think (context)
(let ((active-skill (find-triggered-skill context))) (let ((active-skill (find-triggered-skill context)))
@@ -25,7 +25,7 @@
(> (length cleaned-thought) 0)) (> (length cleaned-thought) 0))
(kernel-log "PROBABILISTIC ENGINE: 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 ""))) (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)))) `(:target :emacs :payload (:action :insert-at-end :buffer "*opencortex-chat*" :text ,no-prefix))))
(t (t
(kernel-log "PROBABILISTIC ENGINE ERROR: Could not parse response as Lisp plist.~%") (kernel-log "PROBABILISTIC ENGINE ERROR: Could not parse response as Lisp plist.~%")
nil))) nil)))

View File

@@ -4,11 +4,11 @@
:END: :END:
** Analyst Phase ** Analyst Phase
The Chat skill currently tells the LLM to output Org-mode subtrees, but the =org-agent= kernel evaluates LLM output via =read-from-string=. This expects a valid s-expression, specifically a Common Lisp property list (plist) that targets an Emacs actuator with an =:insert-at-end= action. We must explicitly mandate that the LLM wraps its conversational output in this plist. The Chat skill currently tells the LLM to output Org-mode subtrees, but the =opencortex= kernel evaluates LLM output via =read-from-string=. This expects a valid s-expression, specifically a Common Lisp property list (plist) that targets an Emacs actuator with an =:insert-at-end= action. We must explicitly mandate that the LLM wraps its conversational output in this plist.
** Coder Phase ** Coder Phase
- [X] Create =inbox/flight-plan-chat-fix.org= (this file). - [X] Create =inbox/flight-plan-chat-fix.org= (this file).
- [X] Update =notes/org-skill-chat.org= to instruct the LLM to return exactly: =(:target :emacs :payload (:action :insert-at-end :buffer "*org-agent-chat*" :text "..."))= - [X] Update =notes/org-skill-chat.org= to instruct the LLM to return exactly: =(:target :emacs :payload (:action :insert-at-end :buffer "*opencortex-chat*" :text "..."))=
- [X] Fix tangle paths to root-relative =../projects/...= - [X] Fix tangle paths to root-relative =../projects/...=
** Tester Phase ** Tester Phase

View File

@@ -10,14 +10,14 @@ The user is seeing the agent's meta-commentary (e.g., "Okay, I've inserted...")
** Coder Phase ** Coder Phase
- [X] Create =inbox/flight-plan-chat-ui-fix.org= (this file). - [X] Create =inbox/flight-plan-chat-ui-fix.org= (this file).
- [ ] Update =projects/org-agent/src/org-agent.el= to replace "Thinking..." lines. - [ ] Update =projects/opencortex/src/opencortex.el= to replace "Thinking..." lines.
- [ ] Update =notes/org-skill-chat.org= to suppress conversational preamble. - [ ] Update =notes/org-skill-chat.org= to suppress conversational preamble.
- [ ] Tangle and restart. - [ ] Tangle and restart.
** Tester Phase ** Tester Phase
1. Tangle all modified files. 1. Tangle all modified files.
2. Restart the daemon. 2. Restart the daemon.
3. Reload =org-agent.el= in Emacs. 3. Reload =opencortex.el= in Emacs.
4. Test chat and verify: 4. Test chat and verify:
- "Thinking..." is replaced by the response. - "Thinking..." is replaced by the response.
- No "Okay, I've inserted..." preamble appears. - No "Okay, I've inserted..." preamble appears.

View File

@@ -22,7 +22,7 @@ This flight plan defines the strict, step-by-step protocol for escaping the Lisp
* Phase B: Tangle & Audit (The Coder) * Phase B: Tangle & Audit (The Coder)
** TODO 3. Tangle the Literate Source ** TODO 3. Tangle the Literate Source
- Action: Run =emacs --batch --eval '(require (quote ob-tangle))' --eval '(org-babel-tangle-file "~/memex/projects/org-agent/docs/README.org")'= - Action: Run =emacs --batch --eval '(require (quote ob-tangle))' --eval '(org-babel-tangle-file "~/memex/projects/opencortex/docs/README.org")'=
- Verification: The command must exit with code 0 and report that blocks were tangled. - Verification: The command must exit with code 0 and report that blocks were tangled.
** TODO 4. Audit the Physical Lisp Files ** TODO 4. Audit the Physical Lisp Files
@@ -31,7 +31,7 @@ This flight plan defines the strict, step-by-step protocol for escaping the Lisp
* Phase C: Quality Gate (The Tester) * Phase C: Quality Gate (The Tester)
** TODO 5. Run the Lisp Test Suite ** TODO 5. Run the Lisp Test Suite
- Action: Execute =sbcl --non-interactive --eval "(asdf:test-system :org-agent)"= - Action: Execute =sbcl --non-interactive --eval "(asdf:test-system :opencortex)"=
- Verification: All 13 cognitive tests must pass. If any fail, STOP and return to Phase A. - Verification: All 13 cognitive tests must pass. If any fail, STOP and return to Phase A.
** TODO 6. Compile the Sovereign Binary ** TODO 6. Compile the Sovereign Binary
@@ -40,8 +40,8 @@ This flight plan defines the strict, step-by-step protocol for escaping the Lisp
* Phase D: Live Execution (The Sovereign) * Phase D: Live Execution (The Sovereign)
** TODO 7. Clean Restart ** TODO 7. Clean Restart
- Action: Kill all stale =org-agent-server= processes and start the new binary in the background. - Action: Kill all stale =opencortex-server= processes and start the new binary in the background.
- Verification: The log shows =org-agent Kernel Booted Successfully= and =Daemon Listening=. - Verification: The log shows =opencortex Kernel Booted Successfully= and =Daemon Listening=.
** TODO 8. Live Model Discovery Test ** TODO 8. Live Model Discovery Test
- Action: Send =@agent list models= via Emacs batch script. - Action: Send =@agent list models= via Emacs batch script.

View File

@@ -4,14 +4,14 @@
:END: :END:
** Analyst Phase ** Analyst Phase
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: The current =opencortex= 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. 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 Harness Protocol 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. 3. Update the =skill-chat= to utilize the new bridge.
** Coder Phase ** Coder Phase
- [X] Create =inbox/flight-plan-emacs-bridge.org= (this file). - [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 =projects/opencortex/docs/README.org= (Literate Kernel) with the stream-passing hook.
- [ ] Update =notes/org-skill-emacs-bridge.org= to implement the Harness Protocol outbound writer. - [ ] Update =notes/org-skill-emacs-bridge.org= to implement the Harness Protocol outbound writer.
- [ ] Tangle the updated files. - [ ] Tangle the updated files.
- [ ] Rebuild the daemon binary. - [ ] Rebuild the daemon binary.
@@ -20,4 +20,4 @@ The current =org-agent= kernel is a "one-way" sensory system. It receives stimul
1. Tangle all modified files. 1. Tangle all modified files.
2. Restart the daemon. 2. Restart the daemon.
3. Run the =test-chat.lisp= script to verify two-way communication. 3. Run the =test-chat.lisp= script to verify two-way communication.
4. Verify in Emacs =*org-agent-chat*=. 4. Verify in Emacs =*opencortex-chat*=.

View File

@@ -3,7 +3,7 @@
#+FILETAGS: :plan:ux:emacs:interface:psf: #+FILETAGS: :plan:ux:emacs:interface:psf:
* Phase A: Demand (Verify State) * Phase A: Demand (Verify State)
- Current state: The `org-agent` Emacs client uses a single buffer for both input and output, or a clunky side-window for reasoning. The interface is rudimentary and lacks modern chat application affordances. - Current state: The `opencortex` Emacs client uses a single buffer for both input and output, or a clunky side-window for reasoning. The interface is rudimentary and lacks modern chat application affordances.
- User feedback indicates that responses and reasoning streams are sometimes missing or hard to read. - User feedback indicates that responses and reasoning streams are sometimes missing or hard to read.
- Objective: Design a comprehensive, intuitive, and modern UX for the Emacs client. - Objective: Design a comprehensive, intuitive, and modern UX for the Emacs client.
@@ -18,13 +18,13 @@
** 1. Window Layout Management ** 1. Window Layout Management
We will abandon the single-buffer approach and adopt a dual-window layout for the chat interface: We will abandon the single-buffer approach and adopt a dual-window layout for the chat interface:
- **`*org-agent-chat*` (Top, 80% height)**: A read-only `special-mode` or customized `org-mode` buffer dedicated to displaying the conversation history, agent responses, and tool execution logs. - **`*opencortex-chat*` (Top, 80% height)**: A read-only `special-mode` or customized `org-mode` buffer dedicated to displaying the conversation history, agent responses, and tool execution logs.
- **`*org-agent-input*` (Bottom, 20% height)**: A dedicated `markdown-mode` or `org-mode` buffer for composing messages. Pressing `C-c C-c` here will send the contents to the daemon, clear the input buffer, and append the user's message to the main chat buffer. - **`*opencortex-input*` (Bottom, 20% height)**: A dedicated `markdown-mode` or `org-mode` buffer for composing messages. Pressing `C-c C-c` here will send the contents to the daemon, clear the input buffer, and append the user's message to the main chat buffer.
** 2. The Output Formatting Engine (Syntax & Color) ** 2. The Output Formatting Engine (Syntax & Color)
To make the main chat buffer appealing, we need a robust formatting engine within `org-agent.el`: To make the main chat buffer appealing, we need a robust formatting engine within `opencortex.el`:
- **Structured Insertion**: When the daemon sends an `:insert-at-end` command, the Emacs client will parse the payload. - **Structured Insertion**: When the daemon sends an `:insert-at-end` command, the Emacs client will parse the payload.
- **Font-Lock Extensions**: We will define custom `font-lock` rules for the `*org-agent-chat*` buffer to highlight specific elements: - **Font-Lock Extensions**: We will define custom `font-lock` rules for the `*opencortex-chat*` buffer to highlight specific elements:
- *User Messages*: Distinct background or font face. - *User Messages*: Distinct background or font face.
- *Agent Responses*: Standard Org-mode styling. - *Agent Responses*: Standard Org-mode styling.
- *Tool Executions (Reasoning)*: Dimmed or italicized text for "Thinking..." or "Executing shell command: `ls`". - *Tool Executions (Reasoning)*: Dimmed or italicized text for "Thinking..." or "Executing shell command: `ls`".
@@ -37,11 +37,11 @@ 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. - *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 ** 4. The Reasoning Stream Integration
- 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. - 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 `*opencortex-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. - 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) * Phase C: Tester (Verification Strategy)
- Launch `M-x org-agent`. - Launch `M-x opencortex`.
- Verify the dual-window layout appears correctly. - Verify the dual-window layout appears correctly.
- Type a message in the input buffer, send it, and verify it clears and appears in the main buffer. - Type a message in the input buffer, send it, and verify it clears and appears in the main buffer.
- Trigger a tool call and verify the reasoning stream is formatted clearly (and distinct from the final answer). - Trigger a tool call and verify the reasoning stream is formatted clearly (and distinct from the final answer).
@@ -49,5 +49,5 @@ To handle code modifications safely and beautifully:
* Migration Strategy * Migration Strategy
This overhaul requires significant changes to: This overhaul requires significant changes to:
1. `projects/org-agent/src/org-agent.el` (The Emacs client). 1. `projects/opencortex/src/opencortex.el` (The Emacs client).
2. `notes/org-skill-chat.org` (To update the expected payload formats if we move beyond simple `:insert-at-end`). 2. `notes/org-skill-chat.org` (To update the expected payload formats if we move beyond simple `:insert-at-end`).

View File

@@ -28,11 +28,11 @@ Refactor the =.env.example= and secure local =.env= to remove the legacy PARA st
2. *Harden Path Resolution (README.org):* 2. *Harden Path Resolution (README.org):*
- Update =load-all-skills= to use =context-resolve-path= when reading the =SKILLS_DIR= environment variable. - Update =load-all-skills= to use =context-resolve-path= when reading the =SKILLS_DIR= environment variable.
- This ensures that if a user sets =SKILLS_DIR="$MEMEX_DIR/notes"=, the Lisp kernel expands it correctly regardless of the OS or username. - This ensures that if a user sets =SKILLS_DIR="$MEMEX_DIR/notes"=, the Lisp kernel expands it correctly regardless of the OS or username.
3. *Sync Secure .env (~/.local/share/org-agent/.env):* 3. *Sync Secure .env (~/.local/share/opencortex/.env):*
- Refactor the user's secure file to use this dynamic derivation. - Refactor the user's secure file to use this dynamic derivation.
** [Tester] Verification Strategy ** [Tester] Verification Strategy
1. *Portability Test:* Temporarily set =MEMEX_DIR=/tmp/memex-test= in the environment and verify that =(org-agent:context-get-skill-source "test")= attempts to read from the correct expanded path. 1. *Portability Test:* Temporarily set =MEMEX_DIR=/tmp/memex-test= in the environment and verify that =(opencortex:context-get-skill-source "test")= attempts to read from the correct expanded path.
2. *Boot Test:* Restart daemon and ensure all skills load via the new expanded paths. 2. *Boot Test:* Restart daemon and ensure all skills load via the new expanded paths.
* NEXT Authorization Gate * NEXT Authorization Gate

View File

@@ -11,14 +11,14 @@ Decouple HTTP request logic from the core neuro kernel (`neuro.lisp`) and migrat
- Solution: Move HTTP logic to `org-skill-provider-*` modules. The kernel's `ask-neuro` becomes a pure interface. - Solution: Move HTTP logic to `org-skill-provider-*` modules. The kernel's `ask-neuro` becomes a pure interface.
* Phase C: Success (Quality - Analyst Phase) * Phase C: Success (Quality - Analyst Phase)
- **TDD Requirement:** Create `projects/org-agent/tests/neuro-test.lisp` containing assertions for the new `ask-neuro` contract. - **TDD Requirement:** Create `projects/opencortex/tests/neuro-test.lisp` containing assertions for the new `ask-neuro` contract.
- The tests MUST be executed and PROVE failure before any code is modified. - The tests MUST be executed and PROVE failure before any code is modified.
- Tests will assert that: - Tests will assert that:
1. `ask-neuro` fails gracefully when the `*neuro-backends*` registry is empty. 1. `ask-neuro` fails gracefully when the `*neuro-backends*` registry is empty.
2. `ask-neuro` succeeds when a mock provider is registered and correctly delegates the prompt to the mock function. 2. `ask-neuro` succeeds when a mock provider is registered and correctly delegates the prompt to the mock function.
* Phase D: Build (Engineering - Coder Phase) * Phase D: Build (Engineering - Coder Phase)
- Strip `execute-openrouter-request`, `execute-groq-request`, and `execute-gemini-request` from `projects/org-agent/docs/README.org`. - Strip `execute-openrouter-request`, `execute-groq-request`, and `execute-gemini-request` from `projects/opencortex/docs/README.org`.
- Draft `notes/org-skill-provider-openrouter.org`. - Draft `notes/org-skill-provider-openrouter.org`.
- Draft `notes/org-skill-provider-groq.org`. - Draft `notes/org-skill-provider-groq.org`.
- Draft `notes/org-skill-provider-gemini.org`. - Draft `notes/org-skill-provider-gemini.org`.
@@ -27,4 +27,4 @@ Decouple HTTP request logic from the core neuro kernel (`neuro.lisp`) and migrat
* Phase E: Chaos (Chaos Phase - Final Verification) * Phase E: Chaos (Chaos Phase - Final Verification)
- Hot-load the refactored core and new provider skills. - Hot-load the refactored core and new provider skills.
- Run `neuro-test.lisp` and PROVE it passes. - Run `neuro-test.lisp` and PROVE it passes.
- Inject a complex chat stimulus and monitor `org-agent-repl.log` for successful autonomous execution. - Inject a complex chat stimulus and monitor `opencortex-repl.log` for successful autonomous execution.

View File

@@ -22,7 +22,7 @@ done
#+begin_src elisp :tangle inject-metadata.el #+begin_src elisp :tangle inject-metadata.el
(require 'org) (require 'org)
(defun org-agent-inject-metadata (file created edited) (defun opencortex-inject-metadata (file created edited)
(with-current-buffer (find-file-noselect file) (with-current-buffer (find-file-noselect file)
(org-with-wide-buffer (org-with-wide-buffer
(goto-char (point-min)) (goto-char (point-min))
@@ -31,12 +31,12 @@ done
(org-id-get-create) ; Ensure drawer exists (org-id-get-create) ; Ensure drawer exists
(setq props (org-get-property-block)))) (setq props (org-get-property-block))))
(org-set-property "CREATED" (org-agent-format-iso created)) (org-set-property "CREATED" (opencortex-format-iso created))
(org-set-property "EDITED" (org-agent-format-iso edited)) (org-set-property "EDITED" (opencortex-format-iso edited))
(save-buffer) (save-buffer)
(kill-buffer)))) (kill-buffer))))
(defun org-agent-format-iso (iso-date) (defun opencortex-format-iso (iso-date)
"Convert 2026-04-07T10:00:00+00:00 to [2026-04-07 Tue 10:00]" "Convert 2026-04-07T10:00:00+00:00 to [2026-04-07 Tue 10:00]"
(let ((time (parse-time-string iso-date))) (let ((time (parse-time-string iso-date)))
(format-time-string "[%Y-%m-%d %a %H:%M]" (apply #'encode-time time)))) (format-time-string "[%Y-%m-%d %a %H:%M]" (apply #'encode-time time))))
@@ -48,5 +48,5 @@ done
(dolist (line lines) (dolist (line lines)
(let ((parts (split-string line "|"))) (let ((parts (split-string line "|")))
(when (= (length parts) 3) (when (= (length parts) 3)
(org-agent-inject-metadata (nth 0 parts) (nth 1 parts) (nth 2 parts)))))) (opencortex-inject-metadata (nth 0 parts) (nth 1 parts) (nth 2 parts))))))
#+end_src #+end_src

View File

@@ -3,15 +3,15 @@
#+FILETAGS: :plan:emacs:ui:reasoning: #+FILETAGS: :plan:emacs:ui:reasoning:
* Phase A: Demand (Verify State) * Phase A: Demand (Verify State)
- Current state: `org-agent.el` combines final outputs and internal thoughts into a single `*org-agent-chat*` buffer. - Current state: `opencortex.el` combines final outputs and internal thoughts into a single `*opencortex-chat*` buffer.
- Goal: Create a dedicated `*org-agent-reasoning*` buffer for internal LLM logs. Add an interrupt hotkey (`C-c C-k`). - Goal: Create a dedicated `*opencortex-reasoning*` buffer for internal LLM logs. Add an interrupt hotkey (`C-c C-k`).
* Phase B: Blueprint (Surgical Edits) * Phase B: Blueprint (Surgical Edits)
- Modify `projects/org-agent/src/org-agent.el` to route `(:log :LOG)` messages to `*org-agent-reasoning*`. - Modify `projects/opencortex/src/opencortex.el` to route `(:log :LOG)` messages to `*opencortex-reasoning*`.
- Add `org-agent-interrupt` command that sends `(:type :EVENT :payload (:sensor :interrupt))` to the kernel. - Add `opencortex-interrupt` command that sends `(:type :EVENT :payload (:sensor :interrupt))` to the kernel.
- Bind `C-c C-k` to `org-agent-interrupt` in the chat buffer. - Bind `C-c C-k` to `opencortex-interrupt` in the chat buffer.
- Open `*org-agent-reasoning*` as a side-window when `org-agent-chat` is called. - Open `*opencortex-reasoning*` as a side-window when `opencortex-chat` is called.
* Phase C: Tester (Automated Proof) * Phase C: Tester (Automated Proof)
- Test Emacs evaluation using batch mode to verify the syntax of the modified `org-agent.el`. - Test Emacs evaluation using batch mode to verify the syntax of the modified `opencortex.el`.
- Open Emacs and connect to the live kernel to verify message routing. - Open Emacs and connect to the live kernel to verify message routing.

View File

@@ -1,12 +1,12 @@
# Plan: Recursive Cognitive Kernel # Plan: Recursive Cognitive Kernel
## Objective ## Objective
Implement a recursive `cognitive-loop` that allows the agent to chain multiple actions (tool calls) and observe results before finalising a response, similar to SOTA agents like Claude Code. Implement a recursive `cognitive-cycle` that allows the agent to chain multiple actions (tool calls) and observe results before finalising a response, similar to SOTA agents like Claude Code.
## Key Files & Context ## Key Files & Context
- `projects/org-agent/docs/README.org`: The primary source of truth for the kernel logic. - `projects/opencortex/docs/README.org`: The primary source of truth for the kernel logic.
- `projects/org-agent/src/core.lisp`: Tangled kernel implementation. - `projects/opencortex/src/core.lisp`: Tangled kernel implementation.
- `projects/org-agent/src/symbolic.lisp`: Contains the `decide` logic. - `projects/opencortex/src/symbolic.lisp`: Contains the `decide` logic.
## Implementation Steps ## Implementation Steps
@@ -14,11 +14,11 @@ Implement a recursive `cognitive-loop` that allows the agent to chain multiple a
- Define `*interrupt-flag*` and `*interrupt-lock*` in the kernel state. - Define `*interrupt-flag*` and `*interrupt-lock*` in the kernel state.
- Update the `perceive` function to detect the `:interrupt` sensor stimulus and set the flag. - Update the `perceive` function to detect the `:interrupt` sensor stimulus and set the flag.
### 2. Recursive `cognitive-loop` ### 2. Recursive `cognitive-cycle`
- Modify `cognitive-loop` to accept an optional `depth` parameter (default 0). - Modify `cognitive-cycle` to accept an optional `depth` parameter (default 0).
- Add a check at the beginning of the loop for `depth > 10` or `*interrupt-flag*`. - Add a check at the beginning of the loop for `depth > 10` or `*interrupt-flag*`.
- Refactor the loop to capture the return value of `dispatch-action`. - Refactor the loop to capture the return value of `dispatch-action`.
- If the action was a "Tool Call" (any target except `:emacs` or `:system-message`) and produced a result, recursively call `cognitive-loop` with a new `:EVENT` containing that result. - If the action was a "Tool Call" (any target except `:emacs` or `:system-message`) and produced a result, recursively call `cognitive-cycle` with a new `:EVENT` containing that result.
### 3. Actuator Harmonization ### 3. Actuator Harmonization
- Ensure `execute-system-action` (for `:eval`) returns meaningful results that can be fed back into the loop. - Ensure `execute-system-action` (for `:eval`) returns meaningful results that can be fed back into the loop.
@@ -31,5 +31,5 @@ Implement a recursive `cognitive-loop` that allows the agent to chain multiple a
## Verification & Testing ## Verification & Testing
- **Multi-turn Test**: In the chat, ask the agent to "Calculate the sum of 5+5 and then multiply it by 2 using eval". - **Multi-turn Test**: In the chat, ask the agent to "Calculate the sum of 5+5 and then multiply it by 2 using eval".
- **Introspection Check**: Verify the `*org-agent-reasoning*` buffer shows the two distinct `eval` steps. - **Introspection Check**: Verify the `*opencortex-reasoning*` buffer shows the two distinct `eval` steps.
- **Interrupt Test**: Trigger a long-running or recursive task and press `C-c C-k` in Emacs to verify the loop halts. - **Interrupt Test**: Trigger a long-running or recursive task and press `C-c C-k` in Emacs to verify the loop halts.

View File

@@ -5,19 +5,19 @@
#+STARTUP: content #+STARTUP: content
* Overview * Overview
Break the cycle of chaotic debugging by performing a hard Git rollback to the last known stable state of the `org-agent` repository, surgically applying the verified fixes, and executing the Model Discovery connection test one strict step at a time. Break the cycle of chaotic debugging by performing a hard Git rollback to the last known stable state of the `opencortex` repository, surgically applying the verified fixes, and executing the Model Discovery connection test one strict step at a time.
* Phase A: Purge & Reset (The Scientist) * Phase A: Purge & Reset (The Scientist)
** TODO 1. Hard Rollback ** TODO 1. Hard Rollback
- Action: Execute `git reset --hard` and `git clean -fd` in `~/memex/projects/org-agent`. - Action: Execute `git reset --hard` and `git clean -fd` in `~/memex/projects/opencortex`.
- Verification: Directory is clean of untracked files and uncommitted changes. - Verification: Directory is clean of untracked files and uncommitted changes.
** TODO 2. Nuke the Lisp Cache ** TODO 2. Nuke the Lisp Cache
- Action: Delete `~/.cache/common-lisp/` and `~/.local/share/org-agent/quicklisp/cache/`. - Action: Delete `~/.cache/common-lisp/` and `~/.local/share/opencortex/quicklisp/cache/`.
- Verification: The directories do not exist. - Verification: The directories do not exist.
** TODO 3. Verify Environment ** TODO 3. Verify Environment
- Action: Read `~/.local/share/org-agent/.env`. - Action: Read `~/.local/share/opencortex/.env`.
- Verification: Ensure `OPENROUTER_API_KEY` and `MEMEX_DIR` are correctly set without trailing quotes or comments. - Verification: Ensure `OPENROUTER_API_KEY` and `MEMEX_DIR` are correctly set without trailing quotes or comments.
* Phase B: Surgical Implementation (The Coder) * Phase B: Surgical Implementation (The Coder)
@@ -41,7 +41,7 @@ Break the cycle of chaotic debugging by performing a hard Git rollback to the la
* Phase D: Live Execution (The Sovereign) * Phase D: Live Execution (The Sovereign)
** TODO 9. Foreground Boot Test ** TODO 9. Foreground Boot Test
- Action: Start the `org-agent-server` daemon in the foreground for 10 seconds. - Action: Start the `opencortex-server` daemon in the foreground for 10 seconds.
- Verification: Visually confirm that `org-skill-model-explorer` successfully jails and hot-loads. - Verification: Visually confirm that `org-skill-model-explorer` successfully jails and hot-loads.
** TODO 10. Live Model Discovery Test ** TODO 10. Live Model Discovery Test

View File

@@ -5,19 +5,19 @@
#+STARTUP: content #+STARTUP: content
* Overview * Overview
Rigorous recovery of the =org-agent= kernel after a series of failed build loops. Rigorous recovery of the =opencortex= kernel after a series of failed build loops.
* Phase A: Purge & Reset (The Scientist) * Phase A: Purge & Reset (The Scientist)
** TODO 1. Hard Git Reset ** TODO 1. Hard Git Reset
- Action: =git reset --hard= and =git clean -fd= in =~/memex/projects/org-agent=. - Action: =git reset --hard= and =git clean -fd= in =~/memex/projects/opencortex=.
- Verification: =git status= must be clean. - Verification: =git status= must be clean.
** TODO 2. Nuke Lisp & Quicklisp Caches ** TODO 2. Nuke Lisp & Quicklisp Caches
- Action: Delete =~/.cache/common-lisp/= and =~/.local/share/org-agent/quicklisp/cache/=. - Action: Delete =~/.cache/common-lisp/= and =~/.local/share/opencortex/quicklisp/cache/=.
- Verification: Directories must not exist. - Verification: Directories must not exist.
** TODO 3. Verify Secure Environment ** TODO 3. Verify Secure Environment
- Action: Check =~/.local/share/org-agent/.env=. - Action: Check =~/.local/share/opencortex/.env=.
- Verification: Confirm =MEMEX_DIR= and =OPENROUTER_API_KEY= are correct. - Verification: Confirm =MEMEX_DIR= and =OPENROUTER_API_KEY= are correct.
* Phase B: Restoration (The Coder) * Phase B: Restoration (The Coder)

View File

@@ -3,10 +3,10 @@
#+FILETAGS: :plan:architecture:psf:orchestrator: #+FILETAGS: :plan:architecture:psf:orchestrator:
* Background & Motivation * Background & Motivation
The `cognitive-loop` pipeline (Consolidation V) established the functional gates (`perceive`, `neuro`, `consensus`, `decide`, `dispatch`). However, the `consensus-gate` remains a pass-through. Furthermore, the `org-agent` currently lacks the ability to formally verify GTD state transitions (Task Integrity) and hand off complex logic to background threads (Delegation). The Task Orchestrator integrates these three capabilities. The `cognitive-cycle` pipeline (Consolidation V) established the functional gates (`perceive`, `neuro`, `consensus`, `decide`, `dispatch`). However, the `consensus-gate` remains a pass-through. Furthermore, the `opencortex` currently lacks the ability to formally verify GTD state transitions (Task Integrity) and hand off complex logic to background threads (Delegation). The Task Orchestrator integrates these three capabilities.
* Scope & Impact * Scope & Impact
- *Target Files:* `projects/org-agent/src/core.lisp`, `projects/org-agent/src/neuro.lisp`, `projects/org-agent/src/symbolic.lisp`. - *Target Files:* `projects/opencortex/src/core.lisp`, `projects/opencortex/src/neuro.lisp`, `projects/opencortex/src/symbolic.lisp`.
- *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. - *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. - *Dependencies:* Requires `bordeaux-threads` for sub-agent management and the existing `org-gtd` v4.0 DAG.
@@ -21,7 +21,7 @@ The `cognitive-loop` pipeline (Consolidation V) established the functional gates
* Implementation Plan * Implementation Plan
** Phase C: Success (Testing) ** Phase C: Success (Testing)
- Draft `projects/org-agent/tests/orchestrator-test.lisp`. - Draft `projects/opencortex/tests/orchestrator-test.lisp`.
- Assert that `consensus-gate` correctly handles 3 diverging proposals and selects the safest one. - Assert that `consensus-gate` correctly handles 3 diverging proposals and selects the safest one.
- Assert that `task-integrity-check` rejects closing a parent task with active children. - Assert that `task-integrity-check` rejects closing a parent task with active children.

View File

@@ -20,13 +20,13 @@
- Update `think` in `src/neuro.lisp` to automatically inject the tool belt into the system prompt. - Update `think` in `src/neuro.lisp` to automatically inject the tool belt into the system prompt.
** 4. Recursive Loop Integration ** 4. Recursive Loop Integration
- Update `cognitive-loop` to recognize and execute tool calls. - Update `cognitive-cycle` to recognize and execute tool calls.
* Phase D: Build (Implementation) * Phase D: Build (Implementation)
** 1. Registry & Macro ** 1. Registry & Macro
#+begin_src lisp #+begin_src lisp
(in-package :org-agent) (in-package :opencortex)
(defvar *cognitive-tools* (make-hash-table :test 'equal)) (defvar *cognitive-tools* (make-hash-table :test 'equal))
@@ -63,7 +63,7 @@ Refactor `think` to:
- Generate the tool belt prompt. - Generate the tool belt prompt.
- Prepend it to the `system-prompt` in `ask-neuro`. - Prepend it to the `system-prompt` in `ask-neuro`.
** 4. Integration with 'cognitive-loop' ** 4. Integration with 'cognitive-cycle'
Update the recursive check to: Update the recursive check to:
- Handle `(:target :tool :action :call ...)` specifically. - Handle `(:target :tool :action :call ...)` specifically.
- Look up the tool in `*cognitive-tools*`. - Look up the tool in `*cognitive-tools*`.