UUID (and a kebab-case =:CUSTOM_ID:= matching the heading text for
in-page anchors). Generate UUIDs with
=python3 -c "import uuid; print(uuid.uuid4())"=.
-- Cross-page links use =[[file:...]]=, e.g. =[[file:Development/][Development]]=
- and =[[file:../index.org][Back to main documentation]]=.
+- Cross-page links use =[[file:...]]=, e.g. =[[file:Development/][Development]]=.
+ Sub-pages open with a back-link to the parent's exported HTML anchor:
+ =[[file:../index.html#outline-container-development][<- Back to index]]=.
+ Sub-pages also carry =:CUSTOM_ID: <section>= in the file-level drawer as
+ the page's identity marker (it does not export an HTML anchor; a page's
+ real link targets are its heading CUSTOM_IDs).
- Org tables need a =|----+----|= separator row between header and data,
and a trailing =|= on every row.
- Options line is exactly:
+:PROPERTIES:
+:ID: 15243585-3ec1-467a-be81-981fa7e5807f
+:CUSTOM_ID: development
+:END:
#+SETUPFILE: ~/.emacs.d/org-styles/html/darksun.theme
#+TITLE: Development - Retinue
#+LANGUAGE: en
#+OPTIONS: H:20 num:20
#+OPTIONS: author:nil
-[[file:../index.org][Back to main documentation]]
+[[file:../index.html#outline-container-development][<- Back to index]]
* Architecture
:PROPERTIES:
=MODEL_DIM= depends on the model (hardcoded to
=minishlab/potion-multilingual-128M=). The table is created with
-=sqlite-vec= and supports cosine-similarity search.
+=sqlite-vec= and supports KNN vector search by L2 distance (the =vec0=
+default).
Why a /virtual/ table? In SQLite, a virtual table is created with
=CREATE VIRTUAL TABLE ... USING vec0(...)=. The =vec0= module from
#+begin_src
Retinue/
├── Documentation/
-│ └── index.org # This file
+│ ├── index.org # Public user documentation
+│ └── Development/index.org # This file
├── Install Retinue # Deploy into the active Hermes plugin directory
├── plugin.yaml # Hermes plugin metadata
├── __init__.py # Plugin entry point: register(ctx)
├── src/ # Plugin source package
│ └── retinue/
│ ├── __init__.py # Package init
-│ ├── memory.py # Memory engine: embeddings + sqlite-vec
-│ ├── provider.py # MemoryProvider subclass
-│ └── cli.py # Debug CLI behind "Show Retinue memory contents"
+│ ├── memory.py # Memory engine: embeddings + sqlite-vec
+│ ├── provider.py # MemoryProvider subclass
+│ ├── cli.py # Debug CLI behind "Show Retinue memory contents"
+│ ├── import_holographic.py # Holographic memory_store.db importer
+│ └── system_prompt_block.txt # Injected into the Hermes system prompt
+├── test/
+│ └── test_standalone.py # End-to-end MemoryStore + provider tests
├── Tools/ # Development helpers (desktop scripts)
+│ ├── lib/common.sh # Shared bash helpers: RETINUE_PY resolution
│ ├── Run tests # Standalone smoke test runner
│ ├── Show Retinue memory contents # Debug CLI: dump/search all memories
│ ├── Import Holographic memories # Migrate facts from Holographic memory_store.db
+│ ├── Open with IntelliJ IDEA
│ └── Update web site # Export Documentation/*.org to HTML + publish
└── $HERMES_HOME/retinue_memory.db # Created at runtime: SQLite + sqlite-vec
#+end_src
#+begin_src json
{
"name": "retinue_memory_search",
- "description": "Search Retinue memories by semantic similarity.",
+ "description": "Search Retinue memories by semantic similarity. Use when you need to recall relevant context even if the user uses different wording than the stored memory.",
"parameters": {
"type": "object",
"properties": {
- "query": {"type": "string", "description": "Natural-language search query"},
- "limit": {"type": "integer", "default": 10}
+ "query": {"type": "string", "description": "Natural-language search query."},
+ "limit": {"type": "integer", "description": "Maximum number of results to return.", "default": 50}
},
"required": ["query"]
}