using-wiki-gatewaylisted
Install: claude install-skill phense/ultra-memory
# Using the wiki gateway
ultra-memory's durable knowledge **wiki** is written through `ultra_memory.wiki_gateway.WikiGateway` —
the generic engine (page materialization, embedding dedup, the fcntl write-lock, secret redaction, the
audit row). A project customizes it by **subclassing** and overriding a few hooks; everything else is
inherited and must not be re-implemented.
## Start here: scaffold a subclass
```bash
python -m ultra_memory.wiki_gateway scaffold --out scripts/my_wiki.py --class-name MyWikiGateway --topic mytopic
```
(or the `/ultra-memory:wiki-gateway-scaffold` slash command). It emits a `class MyWikiGateway(WikiGateway)` stub with
all 6 hooks (each defaulting to `super()`), their contracts, and the config snippet.
## The 6 override hooks (override ONLY what differs)
- **`route(claim) -> Path`** — where a new page lands. Default `<topic>/concepts/<slug(title)>.md`.
- **`theme_for(claim) -> str`** — the theme-index a new atomic registers under. Default `claim["theme"]` or "general".
- **`render_frontmatter(claim) -> dict`** — the page's YAML frontmatter. Default `{"type":"mechanism","title":…}`.
- **`dedup_check(text, topic) -> match|None`** — semantic dedup-on-write. Default OFF; turn on with `self.find_overlap_match(...)`.
- **`derive_anchor(claim, existing) -> str|None`** — a stable in-page section anchor. Default None.
- **`confidence_label(claim) -> str`** — a confidence tag on the page. Default "Standard".
## Inherited — do NOT re-implement
`create_p