From e2fde5914e3209dbf369c293f02cdcab69d7c3fd Mon Sep 17 00:00:00 2001 From: Amr Gharbeia Date: Sun, 3 May 2026 08:14:53 -0400 Subject: [PATCH] feat: UUIDv4 IDs, GTD conventions, backdate ROADMAP - memory-id-generate now produces UUIDv4 (id-87917806-...) - GTD Conventions added to programming-standards.org - ROADMAP.org v0.3.0 tasks have :ID:, :CREATED:, :LOGBOOK:, CLOSED: --- docs/ROADMAP.org | 22 +++++++++++++++++++++- lisp/core-memory.lisp | 4 ++-- org/core-memory.org | 4 ++-- org/programming-standards.org | 25 +++++++++++++++++++++++++ 4 files changed, 50 insertions(+), 5 deletions(-) diff --git a/docs/ROADMAP.org b/docs/ROADMAP.org index 40a10a2..7c2ea14 100644 --- a/docs/ROADMAP.org +++ b/docs/ROADMAP.org @@ -50,10 +50,26 @@ Unified control plane and Human-in-the-Loop state management. ** Tasks -*** DONE Project Renaming (Bouncer → Dispatcher) [2026-05-02 Sat] +*** DONE Project Renaming (Bouncer → Dispatcher) +:PROPERTIES: +:ID: id-9e779580-287b-b3d1-37b9-bcefd750bf9e +:CREATED: [2026-05-01 Fri 15:40] +:END: +:LOGBOOK: +- State "DONE" from "TODO" [2026-05-02 Sat 22:00] +:END: +CLOSED: [2026-05-02 Sat 22:00] The Dispatcher's role has evolved beyond security guard. It is the seed of the deterministic engine — it learns to execute procedures without invoking the neural net. *** DONE Event Orchestrator (unified hooks+cron+routing) +:PROPERTIES: +:ID: id-d35aea3d-2e5f-4a12-a9b0-1c2d3e4f5a6b +:CREATED: [2026-05-02 Sat 14:00] +:END: +:LOGBOOK: +- State "DONE" from "TODO" [2026-05-02 Sat 22:36] +:END: +CLOSED: [2026-05-02 Sat 22:36] Unified control plane for hooks, cron, and complexity-based routing. - *hook-registry* + *cron-registry* + tier classifier - Hooks via ~#+HOOK:~ Org-mode properties @@ -62,6 +78,10 @@ Unified control plane for hooks, cron, and complexity-based routing. - Rule-based tier classifier (overrideable via ~*tier-classifier*~) *** TODO Context Manager (project scoping) +:PROPERTIES: +:ID: id-a10ed34e-9f37-4a15-b499-46672c00d951 +:CREATED: [2026-05-02 Sat 23:00] +:END: Stack-based context with ~push-context~ / ~pop-context~. Path resolution relative to current context. Memory scope: ~:scope~ property on memory-objects (memex/session/project). diff --git a/lisp/core-memory.lisp b/lisp/core-memory.lisp index b503992..ef2ed9d 100644 --- a/lisp/core-memory.lisp +++ b/lisp/core-memory.lisp @@ -19,8 +19,8 @@ (nreverse results))) (defun memory-id-generate () - "Generates a timestamp-based unique ID." - (format nil "id-~36r" (get-universal-time))) + "Generates a UUIDv4 unique ID. Compatible with Agora Note UUIDs." + (concatenate 'string "id-" (string-downcase (format nil "~a" (uuid:make-v4-uuid))))) (defstruct memory-object id type attributes content vector parent-id children version last-sync hash) diff --git a/org/core-memory.org b/org/core-memory.org index b94e0bd..551b4ff 100644 --- a/org/core-memory.org +++ b/org/core-memory.org @@ -85,8 +85,8 @@ Generates a unique identifier string for a new Org node. Uses the universal time #+begin_src lisp (defun memory-id-generate () - "Generates a timestamp-based unique ID." - (format nil "id-~36r" (get-universal-time))) + "Generates a UUIDv4 unique ID. Compatible with Agora Note UUIDs." + (concatenate 'string "id-" (string-downcase (format nil "~a" (uuid:make-v4-uuid))))) #+end_src ** The Data Structure (memory-object) diff --git a/org/programming-standards.org b/org/programming-standards.org index 7818bc1..324c56a 100644 --- a/org/programming-standards.org +++ b/org/programming-standards.org @@ -59,6 +59,31 @@ If a LOADER ERROR or reader-error occurs: Rationale: The two tracks prevent the two failure modes we have observed. Writing implementation code directly in Org (without REPL prototyping) produces syntax errors that require external tools to debug. Skipping Org-first test writing produces code without verified success criteria. The split is not bureaucratic — it is the mechanism by which both failures are prevented. +** GTD Conventions + +Every task headline in the project's ROADMAP.org and gtd.org follows these rules: + +1. **:ID:** — generated by ~memory-id-generate~ (UUIDv4 with ~id-~ prefix), never written manually. Use ~(memory-id-generate)~ in the REPL to produce one. +2. **:CREATED:** — ISO-8601 timestamp: ~[2026-05-02 Sat 14:30]~. Set when the headline is first created, never changed. +3. **:LOGBOOK:** — each state transition is logged: ~- State "DONE" from "TODO" [2026-05-02 Sat 15:00]~. +4. **CLOSED:** — set when the task reaches DONE: ~CLOSED: [2026-05-02 Sat 15:00]~. +5. **TODO keywords** follow the standard sequence: ~TODO~ → ~NEXT~ → ~IN-PROGRESS~ → ~DONE~ / ~BLOCKED~ / ~CANCELLED~. +6. **The Agent** updates these automatically during Phase E of the lifecycle. The human never needs to write a UUID or timestamp manually — the agent generates and inserts them. + +Example: + +#+begin_src org +*** DONE Event Orchestrator +:PROPERTIES: +:ID: id-4a2b9c8f-3d7e-4f12-a9b0-1c2d3e4f5a6b +:CREATED: [2026-05-02 Sat] +:END: +:LOGBOOK: +- State "DONE" from "TODO" [2026-05-02 Sat 18:00] +:END: +CLOSED: [2026-05-02 Sat 18:00] +#+end_src + * Implementation ** Standards Enforcement