# SCHEMA — Hyunsang Cho's hub

This file describes the public surface of `memory.wiki/hub/7hft5x22`. Every URL
below returns plain markdown unless noted; cacheable; no auth required.

## Manifest files

- [`/hub/7hft5x22/index.md`](https://memory.wiki/hub/7hft5x22/index.md) — concept-grouped table of contents.
- [`/hub/7hft5x22/log.md`](https://memory.wiki/hub/7hft5x22/log.md) — append-only activity log (public events only).
- [`/hub/7hft5x22/SCHEMA.md`](https://memory.wiki/hub/7hft5x22/SCHEMA.md) — this file.
- [`/hub/7hft5x22/llms.txt`](https://memory.wiki/hub/7hft5x22/llms.txt) — llmstxt.org manifest with token estimates per doc.
- [`/hub/7hft5x22/llms-full.txt`](https://memory.wiki/hub/7hft5x22/llms-full.txt) — every public doc concatenated, capped to fit a context window. Override the cap with `?cap=200000`.

## Content URLs

- [`/raw/hub/7hft5x22`](https://memory.wiki/raw/hub/7hft5x22) — whole-hub markdown listing.
- [`/raw/hub/7hft5x22?digest=1`](https://memory.wiki/raw/hub/7hft5x22?digest=1) — concept-clustered summary (fewer tokens).
- [`/raw/hub/7hft5x22/c/<concept>`](https://memory.wiki/raw/hub/7hft5x22/c/example) — per-concept passages across docs.
- [`/raw/hub/7hft5x22/lint.md`](https://memory.wiki/raw/hub/7hft5x22/lint.md) — orphan docs + likely-duplicate pairs (the wiki's health snapshot).
- [`/raw/<doc-id>`](https://memory.wiki/raw/abc123) — plain markdown for a single document.
- [`/raw/b/<bundle-id>`](https://memory.wiki/raw/b/abc123) — concatenated markdown for a bundle.

Every `/raw/` URL accepts `?compact=1` to strip whitespace + emojis + redundant
headings for a token-economical fetch (typically 30-50% savings, same answer).

## Query API

- `POST https://memory.wiki/api/hub/7hft5x22/recall` — semantic + keyword search across this hub's public docs.
  Body: `{ "query": string, "k"?: number, "rerank"?: boolean }`.
  Returns top-k matches with snippet, score, and source doc URL.
  Setting `rerank: true` runs a Haiku-based cross-encoder pass for higher precision (one extra Anthropic call).

## Page criteria (when to create vs. update)

When the owner ingests a new source, it lands as a new page if it satisfies any of:
- introduces a **central concept** not already covered;
- the concept **recurs** across two or more sources;
- the topic is **independent** — gluing it onto an existing page would dilute that page's focus.

Otherwise the new content merges into an existing page and the concept index updates.

## Provenance

Documents tagged with `source: github:<owner>/<repo>` or `source: obsidian` carry their
origin in the `compile_from.external` field. Use that to round-trip a doc back to its
original surface or to detect imported (vs. authored) content.
