Files
memex/inbox/flight-plan-flatten-env.org
Amr Gharbeia fdb55c616d feat: stabilized org-agent two-way communication and UX
- Fixed kernel-to-Emacs communication bridge.
- Resolved boot-time crashes in multiple skeletal skills.
- Refined Chat skill prompt to eliminate conversational filler.
- Updated Emacs UI to automatically clean up status markers.
- Synchronized all fixes via Literate Org-mode documents.
- Verified physical two-way interaction via simulation.
2026-04-03 17:25:01 -04:00

2.0 KiB

Flight Plan: Flatten & Generalize Memex Environment Architecture

Overview

Refactor the .env.example and secure local .env to remove the legacy PARA structure and replace it with a generalized, anchor-based architecture. Move towards a unified MEMEX_DIR foundation while ensuring portability for different users and folder structures.

Phase A: Analysis (The Scientist)

Findings

  • Current .env relies on hardcoded absolute paths (/home/user/memex/...).
  • Direct removal of PARA variables breaks skills (org-skill-project-foundry, etc.).
  • The kernel's context-resolve-path already supports $ expansion but needs to be the standard for all internal path lookups.

Phase B: Blueprint (The Architect)

[Coder] Surgical Implementation Tasks

  1. Generalize .env.example:

    • Define MEMEX_DIR as the single mandatory anchor.
    • Use variable references for all sub-directories (e.g., PROJECTS_DIR"${MEMEX_DIR}/projects"=).
    • Add documentation explaining how to override these for custom structures.
  2. Harden Path Resolution (README.org):

    • 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.
  3. Sync Secure .env (~/.local/share/org-agent/.env):

    • Refactor the user's secure file to use this dynamic derivation.

[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.
  2. Boot Test: Restart daemon and ensure all skills load via the new expanded paths.

NEXT Authorization Gate

Sovereign, do you approve this Generalized Flattening plan?

  • APPROVED
  • REJECTED