Files
org-agent-contrib/org-skill-hyper-graph.org

62 lines
2.1 KiB
Org Mode

:PROPERTIES:
:ID: d2ab09fe-2e4f-4b1c-913c-55eb0de347b3
:CREATED: [2026-03-31 Tue 20:28]
:EDITED: [2026-04-07 Tue 13:42]
:END:
#+TITLE: SKILL: Unified Knowledge Hyper-Graph (Universal Literate Note)
#+STARTUP: content
#+FILETAGS: :knowledge:graph:zettelkasten:psf:
#+DEPENDS_ON: skill-atomic-notes skill-brain-mapper
* Overview
The *Unified Knowledge Hyper-Graph* extends the agent's memory beyond text. It maps relationships between *Code Blocks, Documents, Media Assets, and Research PDFs*, enabling cross-modal context retrieval.
* Phase A: Demand (PRD)
:PROPERTIES:
:STATUS: FROZEN
:END:
** 1. Purpose
Unify the system's diverse information silos into a single, navigable graph.
** 2. User Needs
- *Cross-Modal Linking:* Connect a Lisp function to a research PDF and an Org PRD.
- *Traceability:* Follow the chain of reasoning from requirement to implementation.
- *Deep Retrieval:* Pull related media assets during plan synthesis.
* Phase D: Build (Implementation)
** Graph Traversal
#+begin_src lisp :tangle projects/org-skill-hyper-graph/src/graph-logic.lisp
(defun hyper-graph-trace-lineage (object-id)
"Recursively follows #+ID and [[file:]] links to find related cross-modal nodes."
(let* ((obj (opencortex:lookup-object object-id))
(links (extract-all-org-links (opencortex:org-object-content obj))))
(kernel-log "MEMORY [Hyper-Graph] - Tracing lineage for ~a..." object-id)
(loop for link in links collect (resolve-hyper-link link))))
#+end_src
* Registration
#+begin_src lisp
(defskill :skill-hyper-graph
:priority 70
:trigger (lambda (context) (eq (getf (getf context :payload) :sensor) :deep-trace))
:probabilistic (lambda (context) "Synthesize a lineage report for the target ID.")
:deterministic (lambda (action context) action))
#+end_src
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: SIGNED
:END:
* Phase B: Blueprint (PROTOCOL)
:PROPERTIES:
:STATUS: DRAFT
:END:
** 1. Architectural Intent
- *Graph Database:* Utilize an in-memory or persistent graph database (e.g., `neo4cl`). Abstract away the underlying implementation via a generic interface.
- *Unified ID Space:* Every