diff --git a/skills/org-skill-agent.org b/skills/org-skill-agent.org index 7fe1770..9984bfb 100644 --- a/skills/org-skill-agent.org +++ b/skills/org-skill-agent.org @@ -122,15 +122,6 @@ We register tools for kernel introspection and state management. ** The Executive Soul Skill This skill acts as the default "Moral Compass" for the agent. -** ID Generation (org-id-get-create) -Mandated standard for ID creation. This function ensures that every node in the Memex has a unique, deterministic identifier. - -#+begin_src lisp -(defun org-id-get-create () - "Generates a new unique ID for an Org node. This is the system-wide standard." - (format nil "node-~a" (get-universal-time))) -#+end_src - #+begin_src lisp (org-agent:defskill :skill-agent :priority 1000 ; Absolute highest priority diff --git a/skills/org-skill-homoiconic-memory.org b/skills/org-skill-homoiconic-memory.org index 0e57d67..1e72877 100644 --- a/skills/org-skill-homoiconic-memory.org +++ b/skills/org-skill-homoiconic-memory.org @@ -76,6 +76,15 @@ We define the standard `org-node` structure used throughout the kernel. :contents children)) #+end_src +** ID Generation (org-id-get-create) +Mandated standard for ID creation. This function ensures that every node in the Memex has a unique, deterministic identifier. + +#+begin_src lisp :tangle ../src/homoiconic-memory.lisp +(defun org-id-get-create () + "Generates a new unique ID for an Org node. This is the system-wide standard." + (format nil "node-~a" (get-universal-time))) +#+end_src + ** ID Injection (memory-ensure-id) Ensures every headline has a unique ID property using the system standard `org-id-get-create`. This is foundational for the Merkle-Tree object store. diff --git a/src/homoiconic-memory.lisp b/src/homoiconic-memory.lisp index cc743af..6554c75 100644 --- a/src/homoiconic-memory.lisp +++ b/src/homoiconic-memory.lisp @@ -7,6 +7,10 @@ :content content :contents children)) +(defun org-id-get-create () + "Generates a new unique ID for an Org node. This is the system-wide standard." + (format nil "node-~a" (get-universal-time))) + (defun memory-ensure-id (node) "Injects a unique ID into an Org node if missing, using the standard org-id-get-create mechanism." (let* ((props (getf node :properties))