2.0 KiB
2.0 KiB
Flight Plan: Flatten & Generalize Memex Environment Architecture
- Overview
- Phase A: Analysis (The Scientist)
- Phase B: Blueprint (The Architect)
- NEXT Authorization Gate
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
.envrelies on hardcoded absolute paths (/home/user/memex/...). - Direct removal of PARA variables breaks skills (
org-skill-project-foundry, etc.). - The kernel's
context-resolve-pathalready supports$expansion but needs to be the standard for all internal path lookups.
Phase B: Blueprint (The Architect)
[Coder] Surgical Implementation Tasks
-
Generalize .env.example:
- Define
MEMEX_DIRas 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.
- Define
-
Harden Path Resolution (README.org):
- Update
load-all-skillsto usecontext-resolve-pathwhen reading theSKILLS_DIRenvironment 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.
- Update
-
Sync Secure .env (~/.local/share/org-agent/.env):
- Refactor the user's secure file to use this dynamic derivation.
[Tester] Verification Strategy
- Portability Test: Temporarily set
MEMEX_DIR=/tmp/memex-testin the environment and verify that(org-agent:context-get-skill-source "test")attempts to read from the correct expanded path. - 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