# Wiki Schema

## Domain
This wiki covers research tasks Johannes asks Hermes/Dagobert to perform. It is intentionally broad: AI/LLMs, software, boating, places, websites, project research, market/product research, and any recurring topic that benefits from accumulated notes.

## Operating Principle
This wiki follows [[llm-wiki-pattern]] inspired by Andrej Karpathy's LLM Wiki idea: raw sources are preserved, then Hermes incrementally compiles knowledge into interlinked markdown pages so research compounds over time instead of being rediscovered from scratch.

## Directory Structure
- `SCHEMA.md` — conventions and rules for this wiki
- `index.md` — content catalog; read first before research/query work
- `log.md` — append-only activity log
- `raw/` — immutable source captures; do not edit after ingestion
- `entities/` — people, organizations, products, places, boats, websites, projects
- `concepts/` — topics, ideas, techniques, patterns
- `comparisons/` — side-by-side evaluations
- `queries/` — substantial research answers worth preserving
- `data/` — structured JSON/CSV supporting wiki pages
- `_archive/` — superseded pages

## Conventions
- File names: lowercase, hyphenated, no spaces.
- Every wiki page starts with YAML frontmatter.
- Use `[[wikilinks]]` between pages; aim for at least 2 outbound links per page once the wiki has enough pages.
- When updating a page, bump `updated`.
- Every new page must be listed in `index.md`.
- Every action must be appended to `log.md`.
- Raw sources require frontmatter with `source_url`, `ingested`, and `sha256` of the body.
- Never modify files in `raw/` except to add a new immutable source capture or intentionally re-ingest a changed source.
- Use Dagobert pages/HTML summaries when research output would be too long for Telegram chat.
- After creating or updating Markdown pages, run `scripts/render-wiki.py` from this wiki to generate browser-friendly `.html` siblings with tappable markdown links and `[[wikilinks]]`.
- Root `index.html` is the browser catalog; canonical `index.md` renders to `index-md.html` to avoid clobbering the landing page.

## Frontmatter
```yaml
---
title: Page Title
created: YYYY-MM-DD
updated: YYYY-MM-DD
type: entity | concept | comparison | query | summary
tags: [tag-from-taxonomy]
sources: [raw/articles/source.md]
confidence: high | medium | low
contested: false
---
```

## Tag Taxonomy
Use only these tags unless this schema is updated first:

- `wiki` — wiki operations, methodology, knowledge-base structure
- `research-method` — research workflows, source handling, synthesis methods
- `llm` — large language models and AI systems
- `software` — software development and tooling
- `website` — managed websites and web publishing
- `project` — Johannes' personal/work projects
- `boat` — Bingo, docks, marine maintenance, liveaboard systems
- `dog` — Olaf/Copper care or training research
- `place` — places, geography, local research
- `person` — notable people
- `organization` — companies, labs, institutions
- `product` — products/services/tools
- `comparison` — side-by-side analysis
- `query` — filed research answers
- `operations` — task/process/management operations

## Page Thresholds
- Create a page when an entity/concept is central to a source or appears across multiple sources.
- Add to an existing page when a new source updates something already covered.
- Do not create pages for passing mentions.
- Split pages over roughly 200 lines.
- Mark weak or single-source syntheses as `confidence: medium` or `low`.

## Research Workflow
1. Orient: read `SCHEMA.md`, `index.md`, and recent `log.md`.
2. Capture raw sources in `raw/` with hash frontmatter.
3. Search existing pages before creating new ones.
4. Create/update entity, concept, comparison, or query pages with wikilinks.
5. Update `index.md` and `log.md`.
6. Reply to Johannes with a concise summary and file/link list.

## Update Policy
When new information conflicts with existing content:
1. Prefer newer/better primary sources, but preserve the older claim with date/source if relevant.
2. If contradiction remains unresolved, set `contested: true` and describe the conflict.
3. Flag contradictions in the final report to Johannes.
