rename: opencortex → passepartout across memex

- .gitmodules: update submodule paths (projects/opencortex → projects/passepartout,
  projects/opencortex-contrib → projects/passepartout-contrib)
- gtd.org, README.org: update project references and display names
- check.lisp, gemini-vision.org, agora/TODO.org: update file paths
- dotemacs: update agenda paths and template config
- system/plans/: update all flight plan references
- system/backups/: update monolithic backup references
This commit is contained in:
2026-05-03 11:47:52 -04:00
parent 44a1b43cba
commit 4f34969224
25 changed files with 164 additions and 383 deletions

8
.gitmodules vendored
View File

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

View File

@@ -1,149 +0,0 @@
# OpenCortex Agent Mandate
This file defines the operating policies and engineering guidelines that all autonomous agents MUST follow.
## Vision
- **Pure Lisp + Org-mode**: All intelligence implemented in Lisp, all documentation in Org-mode
- **No JSON, No YAML**: Thin harness, fat skills
- **Constraint**: No temporary scripts in opencortex repo - use `/home/user/memex/system/` instead
## Current Goal
- **v0.2.0**: Self-Improvement + Local LLMs
- org-skill-self-edit (self-modification)
- org-skill-emacs-edit (full org-mode manipulation)
- Local vector search (Ollama embeddings)
- Tool permission tiers (ask/allow/deny)
- Skill hot-reload ✅ DONE
- Engineering Standards skill ✅ DONE
- Literate Programming skill ✅ DONE
## Wake-Up Protocol
When this agent starts, it MUST:
1. **Read this file** (`~/.opencode/AGENTS.md`)
2. **Query the skill catalog**: Before any analysis, check if a skill covers the problem domain
- `(list-skills)` to see all loaded skills
- `(find-skill :keyword)` to check for a specific domain
- Read the skill's org file if found
3. **Verify git status**: Working tree MUST be clean before modification
4. **Read `gtd.org`**: Load current task context from the roadmap
5. **Enter lifecycle**: Follow the Engineering Standards lifecycle (Phase 0 → A → B → C → D → E)
Rationale: Raw LLM reasoning is a fallback, not a starting point. The skill layer encodes the system's accumulated wisdom. Ignoring skills creates drift.
## Engineering Standards
The Engineering Standards skill (`opencortex.skills.org-skill-engineering-standards`) defines the full lifecycle. The summaries below are reminders; the skill org file is authoritative.
### Phase 0: Before You Think
**Skill-First Query Rule**: Before analysis, debugging, or implementation, query the skill catalog. If a relevant skill exists, follow its mandates. Do not duplicate logic.
### Phase A: Design (Test-First)
1. **Define success criteria first** — Write the test or PROTOCOL that proves the feature works
2. **Break the design with chaos** — Three tiers of adversarial testing:
- *Deterministic chaos*: Scripted regression tests on every change
- *Probabilistic chaos*: Randomized fuzzing on every major release
- *Stress chaos*: Load and resource starvation during hardening sprints
### Phase B: Commit (Recovery Point)
3. **Commit Before Modify** — Commit and push (if network available) before any file changes
### Phase C: Build (Implementation)
4. **Literate Programming** — All logic in Org files; generated `.lisp` is derived, not authored
5. **Function-Block Granularity** — One function per `#+begin_src lisp` block
6. **Tangle Mandate** — Edit Org only; never touch generated `.lisp`
7. **Configuration Externalization** — No hardcoded values; use `.env.example`
8. **Org as Thinking Medium** — Document investigation before fixing
### Phase D: Validate (Proof)
9. **Test Verification** — Run the full suite. A change that breaks tests is damage, not a fix.
### Phase E: Document (Audit Trail)
10. **Decision Audit Trail** — Document root cause, options, tradeoffs, and rationale
11. **Stop-and-Wait** — For major changes, propose strategy, state "Waiting for user feedback," yield turn
12. **GTD Synchronization** — Update `gtd.org` with TODO headlines before marking complete
## Literate Programming Rules
The Literate Programming skill (`opencortex.skills.org-skill-literate-programming`) enforces Org discipline:
1. **One Function, One Block** — No bundling multiple definitions
2. **Org-Mode Evaluation Gate**`C-c C-c` after every block change
3. **Pre-Tangle Structural Check** — Verify paren balance before tangling
4. **No Direct `.lisp` Edits** — All changes flow through Org
5. **Code and Prose Together** — Every block preceded by explanatory text
Violating these rules corrupts the skill loader and causes boot failure (as seen in the 2026-04-25 incident).
## Agent Workflow
- **Boot Sequence**: Read AGENTS.md → query skills → verify git → read gtd.org
- **Before Any Modification**: Commit first (Commit Before Modify rule)
- **Plan Mode**: Draft PROTOCOL.md before complex implementations
- **Testing**: Run FiveAM test suite + chaos tests before marking task complete
- **Completion**: Update gtd.org, commit, sync with user
## Self-Enforcement Checklist
This agent MUST verify these conditions before, during, and after each task. Violation is a bug, not a suggestion.
### Before Any Task (Gate)
- [ ] **Git clean** — Working tree must be clean before modification
- [ ] **Skill query** — Check if relevant skill exists in `/home/user/memex/projects/opencortex/skills/`
- [ ] **Skill read** — If found, read the skill's org file before proceeding
- [ ] **GTD read** — Check `gtd.org` for current task context
### During Task (Literate Programming)
- [ ] **REPL-first workflow** — Explore in REPL before writing code
- [ ] **Utils-lisp for structural ops** — Use these functions for any .lisp work:
- `utils-lisp-structural-extract` — Extract function definitions
- `utils-lisp-structural-inject` — Inject forms into definitions
- `utils-lisp-structural-wrap` — Wrap code in let/progn
- `utils-lisp-validate` — Validate code before commit
- `repl-eval` — Test code in REPL
- `repl-inspect` — Inspect variables/functions
- [ ] **Never use edit tool on .lisp** — Only edit .org files; never touch generated .lisp directly
- [ ] **One function per block** — Each `#+begin_src` block contains exactly one definition
- [ ] **Prose before code** — Every block preceded by explanatory text
- [ ] **Prose includes**: What the function does, arguments, return value, rationale
- [ ] **Evaluate each block** — Verify the block compiles/evaluates correctly
- [ ] **Paren balance** — Check balanced parentheses before tangling
### After Task (Validation)
- [ ] **REPL verified** — Code tested in REPL before commit (not just text edit)
- [ ] **Utils-lisp used** — Confirmed structural operations went through utils-lisp
- [ ] **Tests pass** — Run full test suite; 100% pass required
- [ ] **Chaos tier 1** — Deterministic regression tests pass
- [ ] **No artifacts** — No orphaned `.bak`, `.log`, `.tmp`, or untracked test files
- [ ] **Commit** — Stage and commit changes with descriptive message
- [ ] **GTD update** — Update `gtd.org` with completed task state
### For OpenCortex Work Specifically
Reference authoritative skill files:
- Engineering Standards: `projects/opencortex/skills/org-skill-engineering-standards.org`
- Literate Programming: `projects/opencortex/skills/org-skill-literate-programming.org`
- Policy: `projects/opencortex/skills/org-skill-policy.org`
The summaries in this file are reminders; the skill org files are authoritative.
## References
- opencortex repo: `/home/user/memex/projects/opencortex`
- Engineering Standards: `/home/user/memex/projects/opencortex/skills/org-skill-engineering-standards.org`
- Literate Programming: `/home/user/memex/projects/opencortex/skills/org-skill-literate-programming.org`
- Policy Skill: `/home/user/memex/projects/opencortex/skills/org-skill-policy.org`
- Roadmap: `/home/user/memex/gtd.org`
- README: `/home/user/memex/projects/opencortex/README.org`

View File

@@ -2,10 +2,10 @@
#+AUTHOR: Amr
#+CREATED: [2026-03-17 Tue]
#+UPDATED: [2026-04-08 Wed]
#+FILETAGS: :memex:psf:opencortex:lisp:sovereignty:
#+FILETAGS: :memex:psf:passepartout:lisp:sovereignty:
* 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 `opencortex` kernel and opencode) 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 `passepartout` kernel and opencode) collaborate within a shared address space.
This system synthesizes three core organizational methodologies into a unified "Lisp Machine" experience:
- *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 Memex is inhabited by autonomous agents that operate as "Probabilistic" (probabilistic/neural) and "Deterministic" (deterministic/symbolic) layers:
** [[file:projects/opencortex/README.org][opencortex (The Kernel)]]
** [[file:projects/passepartout/README.org][passepartout (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.
** opencode

View File

@@ -1,5 +1,5 @@
(handler-case
(with-open-file (s "/home/user/memex/projects/opencortex/skills/org-skill-config-manager.org")
(with-open-file (s "/home/user/memex/projects/passepartout/skills/org-skill-config-manager.org")
(loop for line = (read-line s nil)
while line
do (when (search "#+begin_src lisp" line)

218
gtd.org
View File

@@ -21,9 +21,9 @@
- Updated ~/.emacs and internal Org-babel paths to reflect the new location.
CLOSED: [2026-04-21 Tue 16:45]
** DONE Fix emacsclient defaulting to terminal mode
- Identified that 'opencortex' setup.org was hardcoded to install emacs-nox.
- Identified that 'passepartout' setup.org was hardcoded to install emacs-nox.
- Reinstalled emacs-gtk and restored GUI support.
- Patched projects/opencortex/harness/setup.org to use 'emacs' metapackage.
- Patched projects/passepartout/harness/setup.org to use 'emacs' metapackage.
- Restored missing modules/emacs-ui.org and added it to dotemacs.org.
- Added 'em' alias to ~/.bash_aliases for persistent GUI frame creation.
CLOSED: [2026-04-21 Tue 17:15]
@@ -33,7 +33,7 @@
:ID: gtd-projects
:END:
** NEXT OpenCortex v1.0
** NEXT Passepartout v1.0
:PROPERTIES:
:ID: proj-opencortex-v1-0
:Engineering-STATE: D: BUILD
@@ -41,7 +41,7 @@
:END:
OpenCortex: A Neurosymbolic AI Agent.
Full project tasks: [[file:projects/opencortex/TODO.org][OpenCortex TODO.org]]
Full project tasks: [[file:projects/passepartout/TODO.org][Passepartout TODO.org]]
** NEXT Engineering Core: Role Automation
:PROPERTIES:
@@ -81,100 +81,15 @@ Drafting the automated behaviors for the Engineering loop.
** Agora: Decentralized Social Network
:PROPERTIES:
:ID: agora-project
:END:
*** DONE Create atomic notes for all 10 Agora sections
:PROPERTIES:
:CREATED: [2026-03-16 Mon 14:28]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-17 Tue 12:00]
:END:
All 14 atomic notes created and cross-referenced.
Specification gaps filled, 10 requirements sections complete.
Integration task tracking: [[file:projects/agora/TODO.org][Agora TODO.org]]
Passepartout integration plan: See PHASE: PASSEPARTOUT INTEGRATION in the TODO.org
*** IN-PROGRESS Fill CRITICAL and HIGH gaps [5 CRITICAL / 15 HIGH complete]
**** DONE Section 02: Identity - ALL HIGH priority gaps resolved
**** DONE Section 03: Infrastructure - ALL HIGH priority gaps resolved
*** IN-PROGRESS Fill MEDIUM gaps [14/14 complete]
**** DONE ALL MEDIUM PRIORITY GAPS RESOLVED
**** DONE ALL LOW PRIORITY GAPS RESOLVED (10/10)
**** FINAL STATUS: All Agora specification gaps complete (CRITICAL, HIGH, MEDIUM, LOW)
:PROPERTIES:
:CREATED: [2026-03-17 Tue 23:30]
:END:
:LOGBOOK:
- State "IN-PROGRESS" from "TODO" [2026-03-18 Wed 01:00]
:END:
**** DONE CRITICAL: Contract TypeScript/Protobuf Interfaces → FILLED
:PROPERTIES:
:CREATED: [2026-03-18 Wed 01:00]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-18 Wed 01:15]
:END:
- INTEGRATED: Reference added to agora-requirements-02-identity.org
- LOCATION: memex/5_projects/agora/agora-contract-schemas.org
**** DONE CRITICAL: Content Flag Schema Validation → FILLED
:PROPERTIES:
:CREATED: [2026-03-18 Wed 01:00]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-18 Wed 01:25]
:END:
- LOCATION: memex/5_projects/agora/agora-content-flag-schema.org
- PENDING: Integration into agora-requirements-04-the-primitive.org
**** DONE CRITICAL: PDS-to-PDS Sync Protocol → FILLED
:PROPERTIES:
:CREATED: [2026-03-18 Wed 01:00]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-18 Wed 01:35]
:END:
- LOCATION: memex/5_projects/agora/agora-pds-sync-communication.org
- PENDING: Integration into agora-requirements-03-infrastructure.org
**** DONE CRITICAL: Delta Sync Protocol → FILLED
:PROPERTIES:
:CREATED: [2026-03-18 Wed 01:00]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-18 Wed 01:50]
:END:
- LOCATION: memex/5_projects/agora/agora-delta-sync-communication.org
- PENDING: Integration into agora-requirements-08-implementation.org
**** DONE CRITICAL: Persona Revocation Protocol → ALREADY-EXISTS
:PROPERTIES:
:CREATED: [2026-03-18 Wed 01:00]
:END:
:LOGBOOK:
- State "DONE" from "TODO" [2026-03-18 Wed 02:00]
:END:
- NOTE: Complete specification already in agora-requirements-02-identity.org
- ACTION: Gap was incorrectly flagged; no work required
**** TODO INTEGRATE scattered specifications into requirements files [1/4]
:PROPERTIES:
:CREATED: [2026-03-18 Wed 02:00]
:END:
- NEXT: Move content flag schema into Section 04
- NEXT: Move PDS sync into Section 03
- NEXT: Move delta sync into Section 08
- NEXT: Delete duplicate documents after integration
**** NEXT Fill HIGH priority gaps
:PROPERTIES:
:CREATED: [2026-03-18 Wed 02:00]
:END:
- Relay Discovery Mechanism (Section 03)
- Relay Pricing Logic (Section 03)
- Shamir's Parameters (Section 03)
- Key specs drafted: Contract TypeScript interfaces, Content Flag schema, PDS Sync, Delta Sync
- Remaining: Integrate scattered spec docs into requirements files (content flag → Sect 04, PDS sync → Sect 03, delta sync → Sect 08)
** Emacs Configuration Refactor
:PROPERTIES:
@@ -284,7 +199,7 @@ Institutionalizing the virtual software house operating system.
- State "DONE" from "NEXT" [2026-03-22 Sun 15:45]
:END:
*** DONE Apply Engineering Loop to `opencortex` Phase 1 (Core Loop)
*** DONE Apply Engineering Loop to `passepartout` Phase 1 (Core Loop)
:PROPERTIES:
:CREATED: [2026-03-22 Sun 15:30]
:ASSIGNED: Technical Analyst
@@ -313,7 +228,7 @@ Institutionalizing the virtual software house operating system.
IT infrastructure documentation, security hardening, and operational management.
See project documents: [[file:5_projects/infrastructure/README.org][infrastructure/README.org]]
See project documents: [[file:projects/infrastructure/README.org][infrastructure/README.org]]
*** TODO Create current state assessment document
:PROPERTIES:
@@ -363,7 +278,7 @@ See project documents: [[file:5_projects/infrastructure/README.org][infrastructu
Business planning and revenue generation strategy.
See project documents: [[file:5_projects/revenue-sustainability/README.org][revenue-sustainability/README.org]]
See project documents: [[file:projects/revenue-sustainability/README.org][revenue-sustainability/README.org]]
*** TODO Set up Stripe account (payment processing)
:PROPERTIES:
@@ -461,112 +376,7 @@ Detected ~1,300 entries missing the `:CREATED:` property during the Engineering
:CREATED: [2026-03-17 Tue 15:15]
:END:
Cross-reference consolidated gap analysis against actual requirement specs to identify real vs. already-addressed gaps.
See project documents: [[file:5_projects/agora/agora-consolidated-gap-analysis.org][agora-consolidated-gap-analysis.org]]
*DECOMPOSITION via Work Breakdown Skill:*
Complexity check failed (51 gaps, 10 files, unpredictable scope). Breaking into atomic verification tasks.
*** DONE [1/7] Verify CRITICAL Gap: Contract TypeScript/Protobuf Interfaces → REAL GAP
:PROPERTIES:
:CREATED: [2026-03-17 Tue 15:15]
:ASSIGNED: Agent
:END:
:LOGBOOK:
- State "NEXT" from "TODO" [2026-03-17 Tue 15:15]
- State "DONE" from "NEXT" [2026-03-17 Tue 15:59]
:END:
*HOW:* Searched Section 02 for "interface", "type", "struct", "ContractTemplate". Found 5 TypeScript interfaces (all for revocation, not contracts). Line 951 explicitly states "Gap: No sample JSON for each contract type".
*WHAT:* *REAL GAP* - Contracts described conceptually, lack formal TypeScript/Protobuf schemas.
*** DONE [2/7] Verify CRITICAL Gap: Persona Revocation Protocol → IMPLEMENTED
:PROPERTIES:
:CREATED: [2026-03-17 Tue 15:15]
:ASSIGNED: Agent
:END:
:LOGBOOK:
- State "TODO" from "" [2026-03-17 Tue 15:15]
- State "DONE" from "TODO" [2026-03-17 Tue 15:59]
:END:
*HOW:* Checked Section 02 lines 229-260. Found complete protocol with 3 scenarios (Key Compromise, Persona Retirement, Master Key Compromise), 4-step process, and TypeScript interfaces.
*WHAT:* *ALREADY IMPLEMENTED* - Full protocol specification exists. Gap analysis incorrectly flagged this.
*** DONE [3/7] Verify CRITICAL Gap: PDS-to-PDS Sync Protocol → IMPLEMENTED
:PROPERTIES:
:CREATED: [2026-03-17 Tue 15:15]
:ASSIGNED: Agent
:END:
:LOGBOOK:
- State "TODO" from "" [2026-03-17 Tue 15:15]
- State "DONE" from "TODO" [2026-03-17 Tue 15:59]
:END:
*HOW:* Checked Section 03 lines 142-180. Found complete sync protocol with Concept, 3 Use Cases (Redundancy, Geographic Distribution, Load Balancing), and Merkle DAG Synchronization architecture.
*WHAT:* *ALREADY IMPLEMENTED* - Protocol fully specified. PDSSyncSession interface documented.
*** DONE [4/7] Verify CRITICAL Gap: Content Flag Schema Validation → REAL GAP
:PROPERTIES:
:CREATED: [2026-03-17 Tue 15:15]
:ASSIGNED: Agent
:END:
:LOGBOOK:
- State "TODO" from "" [2026-03-17 Tue 15:15]
- State "DONE" from "TODO" [2026-03-17 Tue 15:59]
:END:
*HOW:* Searched Section 05 for "JSON Schema", "flag", "validation". Found 9 flags described narratively (is_public, is_direct, is_ephemeral, etc.) at lines 24-34. No formal JSON Schema found.
*WHAT:* *REAL GAP* - Flags have informal descriptions but lack formal JSON Schema for validation.
*** DOING [5/7] [BATCH] Verify HIGH priority gaps (15 items) - DELEGATED TO SUB-AGENTS
:PROPERTIES:
:CREATED: [2026-03-17 Tue 15:15]
:ASSIGNED: Agent
:END:
:LOGBOOK:
- State "TODO" from "" [2026-03-17 Tue 15:15]
- State "NEXT" from "TODO" [2026-03-17 Tue 16:04]
- State "DOING" from "NEXT" [2026-03-17 Tue 16:05]
:END:
*HOW:* Delegated to 5 sub-agents for parallel verification per section. Monitoring progress centrally.
*Sub-Agent Assignments:*
- *Sub-Agent 1:* Section 02 Identity (4 HIGH gaps)
- *Sub-Agent 2:* Section 03 Infrastructure (3 HIGH gaps)
- *Sub-Agent 3:* Section 05 Public Space (4 HIGH gaps)
- *Sub-Agent 4:* Section 06 Advanced Integration (2 HIGH gaps)
- *Sub-Agent 5:* Sections 08-09 Implementation/Strategy (2 HIGH gaps)
*Current focus:* Orchestrating sub-agent verification. CRITICAL gaps complete (2 REAL, 2 IMPLEMENTED).
*** TODO [BATCH] Verify MEDIUM priority gaps (14 items)
:PROPERTIES:
:CREATED: [2026-03-17 Tue 15:15]
:ASSIGNED: Agent
:END:
:LOGBOOK:
- State "TODO" from "" [2026-03-17 Tue 15:15]
:END:
Cross-reference 14 MEDIUM gaps. Defer until HIGH gaps complete.
*** TODO Generate verified gap report
:PROPERTIES:
:CREATED: [2026-03-17 Tue 15:15]
:ASSIGNED: Agent
:END:
:LOGBOOK:
- State "TODO" from "" [2026-03-17 Tue 15:15]
:END:
Create summary documenting: which gaps are REAL (need implementation) vs. ALREADY-IMPLEMENTED (documentation only) vs. PARTIAL (needs completion).
All gap verification complete. See [[file:projects/agora/TODO.org][Agora TODO.org]] for current integration tasks.
** Token Optimization
:PROPERTIES:
@@ -576,7 +386,7 @@ Create summary documenting: which gaps are REAL (need implementation) vs. ALREAD
Cost-effective LLM usage strategy and implementation.
See project documents: [[file:5_projects/token-optimization/README.org][token-optimization/README.org]]
See project documents: [[file:projects/token-optimization/README.org][token-optimization/README.org]]
*** TODO Configure Gemini as primary provider
:PROPERTIES:

View File

@@ -1 +0,0 @@
user@amr.154851:1777155215

View File

@@ -234,5 +234,5 @@ This is not a product. It is a philosophy made manifest in code.
* References
- [[file:chats-with-gemini.org][Full Chat Transcripts]]
- [[file:../projects/opencortex/README.org][OpenCortex README]]
- [[file:../projects/opencortex/docs/ROADMAP.org][OpenCortex Roadmap]]
- [[file:../projects/passepartout/README.org][OpenCortex README]]
- [[file:../projects/passepartout/docs/ROADMAP.org][OpenCortex Roadmap]]

120
projects/agora/TODO.org Normal file
View File

@@ -0,0 +1,120 @@
# Agora Project Tasks
# All Agora-related TODOs live here. gtd.org links to this file.
# Cross-reference: Passepartout integration at projects/passepartout
* PHASE: SPECIFICATION COMPLETE
All 10 requirement sections have been written. Gap analysis is done.
** DONE Create atomic notes for all 10 Agora sections
** DONE Fill CRITICAL and HIGH gaps [5 CRITICAL / 15 HIGH]
** DONE All MEDIUM and LOW gaps resolved
** FINAL STATUS: All Agora specification gaps complete
** PENDING INTEGRATE scattered specifications into requirements files [1/4]
Properties:
CREATED: [2026-03-18 Wed 02:00]
NEXT: Move content flag schema into Section 04
NEXT: Move PDS sync into Section 03
NEXT: Move delta sync into Section 08
NEXT: Delete duplicate documents after integration
* PHASE: PASSEPARTOUT INTEGRATION (Parallel Track)
This is a PARALLEL TRACK — does not block the core Passepartout roadmap (v0.3.0 → v1.0.0).
Identity + DIDComm gateway skills can be built anytime without core changes.
PDS transformation should wait until v1.0.0+.
The goal: make Passepartout a first-class AI Sub-Agent on the Agora network.
Architecture: Passepartout IS the PDS. Notes use plists natively with dual UUID + CID addressing.
Key design decisions (captured 2026-05-02):
1. Passepartout IS the PDS — the agent runs a personal data store in-process
2. Agora Notes use plists natively, not JSON — the PDS speaks Lisp
3. Dual addressing: every Note has a stable UUID (same across edits) and a CID (content hash)
4. Org files on disk ARE the user-facing view of Notes — no separate format
5. Clients and Relays are separate components, can be in any language, speak HTTP
6. The unified plist format is internal to PDS ↔ agent; clients request JSON
7. Integration is a PARALLEL TRACK — does not block or delay the core Passepartout roadmap (v0.3.0 → v1.0.0)
8. Timeline: Identity DID + DIDComm gateway = anytime (small skills). PDS transformation = v1.0.0+
The unified data model bridges memory-object → Agora Note:
| memory-object field | Agora Note field |
|---------------------|------------------|
| org-object-id | uuid (stable) |
| org-object-hash | cid (content hash) |
| getf attrs :TITLE | payload (derived) |
| getf attrs :TAGS | routing/access-control hints |
| org-object-children | child CIDs, reply_to, thread_root |
| org-object-content | payload body |
| merkle hash | CIDv1 (same SHA-256, different formatting)
** DRAFT 1. DID Identity Skill (identity-did.org)
A new skill that manages an Ed25519 keypair and DID document for the agent.
- Generate master keypair on first run (BIP-44 derived or Ed25519 fresh)
- Construct ~did:agora:<fingerprint>~ DID
- Sign outputs with the key for provenance
- Store keys in the vault (~*vault-memory*~, already exists in passepartout.security-vault)
File: ~org/identity-did.org~ (new)
Depends on: ~ironclad~ (already in ASDF deps), ~cl-json~ (already in ASDF deps)
** DRAFT 2. DIDComm Gateway (gateway-didcomm.org)
A new gateway following the same pattern as Telegram/Signal in ~gateway-manager~.
- Register poll/send functions in ~*gateway-registry*~
- Poll: listen for incoming DIDComm messages from the Relay Network or PDS
- Send: wrap an action in a DIDComm encrypted envelope (~JWE~) and deliver via Relay
- Messages arrive as framed protocol plists (same as CLI/TUI/Telegram)
The DIDComm spec is complex (DIDComm v2, JWM/JWE, HMAC, etc.). Initial implementation
can be a thin wrapper: JSON plist → sign with DID key → send to PDS → poll for replies.
File: ~org/gateway-didcomm.org~ (new)
Depends on: ~identity-did~, ~cl-json~, + DIDComm serialization library
** DRAFT 3. Memory — Note Adapter (system-memory-note.org)
Bridges Agora Notes into Passepartout's memory system.
- ~note-ingest~: take a CIDv1 + JSON payload, compute Merkle hash, store in ~*memory-history*~
- ~note-index~: extract key fields (title, author, timestamp) from JSON and store in
~*memory-store*~ as a memory-object with ~:cid~ attribute pointing to the history entry
- ~note-edit~: create a new draft with modifications, new CID, pending signature
- ~note-publish~: sign the draft, push to PDS via DIDComm gateway
This is Option C: Notes are canonical (in history), memory is derivative (in active store).
File: ~org/system-memory-note.org~ (new)
Depends on: ~gateway-didcomm~, ~core-memory~ (existing)
** DRAFT 4. Agent Persona (system-agent-persona.org)
Publish Passepartout itself as an Agora AI Persona (per Section 07).
- Register a DID for the agent
- Expose a "capabilities" Note listing the agent's skills as algorithms
- Accept invocation Notes from other persona owners
- Log all actions to an auditable Note chain
File: ~org/system-agent-persona.org~ (new)
Depends on: ~identity-did~, ~gateway-didcomm~, ~core-skills~
** DRAFT 5. Compute Marketplace (system-compute-provider.org)
Optional: expose Passepartout's LLM backends as a compute offering on Agora's marketplace.
- Register available models (Ollama, etc.) as compute offerings
- Accept inference requests via encrypted DIDComm
- Settle via Lightning Network payments (when Agora's payment layer is implemented)
File: ~org/system-compute-provider.org~ (future)
Depends on: ~identity-did~, ~gateway-didcomm~, ~gateway-llm~, ~gateway-provider~
* PHASE: ALETHEIA ANALYSIS
** TODO Critically analyze Master_Architecture_Document for lessons learned
and incorporation into Agora
Properties:
STATUS: PENDING USER INSTRUCTION
NOTES: User to provide pointers before commencing critical reading.
Do not proceed without explicit instruction.
* REFERENCE LINKS
- Agora requirements: ~/home/user/memex/projects/agora/docs/
- Gap analysis: ~/home/user/memex/projects/agora/docs/agora-consolidated-gap-analysis.org
- Passepartout repo: ~/home/user/memex/projects/passepartout
- Passepartout GTD: ~/home/user/memex/projects/passepartout/TODO.org

View File

@@ -8,6 +8,7 @@
(concat org-directory "/inbox.org")
(concat org-directory "/gtd.org")
(concat org-directory "/org-gtd-tasks.org")
(concat org-directory "/projects/passepartout/TODO.org")
)
)

View File

@@ -18,7 +18,7 @@ Agenda files
(concat org-directory "/inbox.org")
(concat org-directory "/gtd.org")
(concat org-directory "/org-gtd-tasks.org")
(concat org-directory "/projects/opencortex/TODO.org")
(concat org-directory "/projects/passepartout/TODO.org")
)
)

View File

@@ -17,7 +17,7 @@ MEMEX_DAILY="memex/1_daily"
MEMEX_NOTES="memex/2_notes"
MEMEX_DRAFTS="memex/3_drafts"
MEMEX_PUBLISHED="memex/4_published"
MEMEX_PROJECTS="memex/5_projects"
MEMEX_PROJECTS="memex/projects"
MEMEX_AREAS="memex/6_areas"
MEMEX_RESOURCES="memex/7_resources"
MEMEX_ARCHIVES="memex/8_archives"

1
projects/passepartout Submodule

Submodule projects/passepartout added at b67cd12d88

View File

@@ -2127,7 +2127,7 @@ On package.el, it is a manual install so far
** OpenCortex
#+begin_src elisp
;; 1. Manually add the path to your load-path
(add-to-list 'load-path "~/memex/projects/opencortex/src")
(add-to-list 'load-path "~/memex/projects/passepartout/src")
;; 2. Explicitly load the file
(require 'opencortex)
@@ -2147,7 +2147,7 @@ On package.el, it is a manual install so far
;; (use-package opencortex
;; :straight nil
;; :load-path "~/memex/projects/opencortex/src" ;; Adjust this to your local clone path
;; :load-path "~/memex/projects/passepartout/src" ;; Adjust this to your local clone path
;; :commands (opencortex-connect opencortex-disconnect)
;; :init
;; Remote connection settings

View File

@@ -10,7 +10,7 @@ The user is seeing the agent's meta-commentary (e.g., "Okay, I've inserted...")
** Coder Phase
- [X] Create =inbox/flight-plan-chat-ui-fix.org= (this file).
- [ ] Update =projects/opencortex/src/opencortex.el= to replace "Thinking..." lines.
- [ ] Update =projects/passepartout/src/opencortex.el= to replace "Thinking..." lines.
- [ ] Update =notes/org-skill-chat.org= to suppress conversational preamble.
- [ ] Tangle and restart.

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)
** TODO 3. Tangle the Literate Source
- Action: Run =emacs --batch --eval '(require (quote ob-tangle))' --eval '(org-babel-tangle-file "~/memex/projects/opencortex/docs/README.org")'=
- Action: Run =emacs --batch --eval '(require (quote ob-tangle))' --eval '(org-babel-tangle-file "~/memex/projects/passepartout/docs/README.org")'=
- Verification: The command must exit with code 0 and report that blocks were tangled.
** TODO 4. Audit the Physical Lisp Files

View File

@@ -11,7 +11,7 @@ The current =opencortex= kernel is a "one-way" sensory system. It receives stimu
** Coder Phase
- [X] Create =inbox/flight-plan-emacs-bridge.org= (this file).
- [ ] Update =projects/opencortex/docs/README.org= (Literate Kernel) with the stream-passing hook.
- [ ] Update =projects/passepartout/docs/README.org= (Literate Kernel) with the stream-passing hook.
- [ ] Update =notes/org-skill-emacs-bridge.org= to implement the Harness Protocol outbound writer.
- [ ] Tangle the updated files.
- [ ] Rebuild the daemon binary.

View File

@@ -49,5 +49,5 @@ To handle code modifications safely and beautifully:
* Migration Strategy
This overhaul requires significant changes to:
1. `projects/opencortex/src/opencortex.el` (The Emacs client).
1. `projects/passepartout/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`).

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.
* Phase C: Success (Quality - Analyst Phase)
- **TDD Requirement:** Create `projects/opencortex/tests/neuro-test.lisp` containing assertions for the new `ask-neuro` contract.
- **TDD Requirement:** Create `projects/passepartout/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.
- Tests will assert that:
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.
* Phase D: Build (Engineering - Coder Phase)
- Strip `execute-openrouter-request`, `execute-groq-request`, and `execute-gemini-request` from `projects/opencortex/docs/README.org`.
- Strip `execute-openrouter-request`, `execute-groq-request`, and `execute-gemini-request` from `projects/passepartout/docs/README.org`.
- Draft `notes/org-skill-provider-openrouter.org`.
- Draft `notes/org-skill-provider-groq.org`.
- Draft `notes/org-skill-provider-gemini.org`.

View File

@@ -7,7 +7,7 @@
- Goal: Create a dedicated `*opencortex-reasoning*` buffer for internal LLM logs. Add an interrupt hotkey (`C-c C-k`).
* Phase B: Blueprint (Surgical Edits)
- Modify `projects/opencortex/src/opencortex.el` to route `(:log :LOG)` messages to `*opencortex-reasoning*`.
- Modify `projects/passepartout/src/opencortex.el` to route `(:log :LOG)` messages to `*opencortex-reasoning*`.
- Add `opencortex-interrupt` command that sends `(:type :EVENT :payload (:sensor :interrupt))` to the kernel.
- Bind `C-c C-k` to `opencortex-interrupt` in the chat buffer.
- Open `*opencortex-reasoning*` as a side-window when `opencortex-chat` is called.

View File

@@ -4,9 +4,9 @@
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
- `projects/opencortex/docs/README.org`: The primary source of truth for the kernel logic.
- `projects/opencortex/src/core.lisp`: Tangled kernel implementation.
- `projects/opencortex/src/symbolic.lisp`: Contains the `decide` logic.
- `projects/passepartout/docs/README.org`: The primary source of truth for the kernel logic.
- `projects/passepartout/src/core.lisp`: Tangled kernel implementation.
- `projects/passepartout/src/symbolic.lisp`: Contains the `decide` logic.
## Implementation Steps

View File

@@ -9,7 +9,7 @@ Break the cycle of chaotic debugging by performing a hard Git rollback to the la
* Phase A: Purge & Reset (The Scientist)
** TODO 1. Hard Rollback
- Action: Execute `git reset --hard` and `git clean -fd` in `~/memex/projects/opencortex`.
- Action: Execute `git reset --hard` and `git clean -fd` in `~/memex/projects/passepartout`.
- Verification: Directory is clean of untracked files and uncommitted changes.
** TODO 2. Nuke the Lisp Cache

View File

@@ -9,7 +9,7 @@ Rigorous recovery of the =opencortex= kernel after a series of failed build loop
* Phase A: Purge & Reset (The Scientist)
** TODO 1. Hard Git Reset
- Action: =git reset --hard= and =git clean -fd= in =~/memex/projects/opencortex=.
- Action: =git reset --hard= and =git clean -fd= in =~/memex/projects/passepartout=.
- Verification: =git status= must be clean.
** TODO 2. Nuke Lisp & Quicklisp Caches

View File

@@ -6,7 +6,7 @@
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
- *Target Files:* `projects/opencortex/src/core.lisp`, `projects/opencortex/src/neuro.lisp`, `projects/opencortex/src/symbolic.lisp`.
- *Target Files:* `projects/passepartout/src/core.lisp`, `projects/passepartout/src/neuro.lisp`, `projects/passepartout/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.
- *Dependencies:* Requires `bordeaux-threads` for sub-agent management and the existing `org-gtd` v4.0 DAG.
@@ -21,7 +21,7 @@ The `cognitive-cycle` pipeline (Consolidation V) established the functional gate
* Implementation Plan
** Phase C: Success (Testing)
- Draft `projects/opencortex/tests/orchestrator-test.lisp`.
- Draft `projects/passepartout/tests/orchestrator-test.lisp`.
- 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.