Problem: after the wiki-hq reorg, agent-instruction and human-doc domains were still scattered across the repo root, with three now-redundant stub files cluttering it. The organizing principle wasn't visible in the layout. Change — enforce three clear buckets: - .agents/ = how agents operate: OIKOS.md, HERMES.md (moved from root), shared/ conventions, domains/ schemas, skills/, and operations/ (operator cheatsheet + enrollment + hermes-agent, moved from root). - knowledge/ = what exists + evidence: wiki/, GLOSSARY.md, and sources/ now including investigations/ (incident records are evidence/sources). - root = substrate + two entry points (AGENTS.md, README.md), plus plans/ as its own design-intent domain. Moves: - investigations/ -> knowledge/sources/investigations/ (incl. archive/, index). - operations/ -> .agents/operations/. - HERMES.md -> .agents/HERMES.md. - Deleted unreferenced root stubs CAVEMAN.md, CONTRIBUTING.md, and OIKOS.md (its 7 remaining linkers repointed to .agents/OIKOS.md). Consumers updated: - inventory.yaml doc_page (agent-enrollment) + regenerated hosts/*.yaml + cards. - tools/setup-hermes-soul.sh and bootstrap.sh (x2) -> .agents/HERMES.md. - bin/homelab help string -> .agents/operations/hermes-agent.md. - knowledge/operations schemas, llm-wiki, page-templates, incident-investigation skill, AGENTS.md/README nav -> new investigations/operations paths. - All markdown links rewritten via the path-resolving mapper. Left in place (substrate/executable/separate-domain): hosts/, ledger/, tools/, plans/, oikos/, mcp/, secrets/, bin/, inventory.yaml. Verification: docs-lint at baseline (2 intentional cross-repo refs, no new breakage); gen-topology.py --check exit 0; build_host_files.py idempotent; all doc_page targets resolve; Hermes provisioning scripts point at the new path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
49 lines
2.9 KiB
Markdown
49 lines
2.9 KiB
Markdown
# Knowledge domain — schema
|
|
|
|
The knowledge domain is the durable, authoritative current-state documentation of the homelab: one
|
|
page per node and per cross-cutting system, synthesized from live state and evidence. It answers
|
|
"what exists and how does it work right now."
|
|
|
|
It follows the [LLM Wiki layer model](../../shared/llm-wiki.md) and the
|
|
[writing-style](../../shared/writing-style.md) and [page-templates](../../shared/page-templates.md)
|
|
rules.
|
|
|
|
## The narrative / substrate split
|
|
|
|
The knowledge wiki is **narrative**. It sits alongside a **machine-readable substrate** that it
|
|
describes but never contains. The split is load-bearing: several programs read the substrate at
|
|
fixed paths, so the wiki reorganization never moves it.
|
|
|
|
| Layer | Location | Consumed by |
|
|
|-------|----------|-------------|
|
|
| Substrate — source of truth | `inventory.yaml` (root) | MCP server, `homelab` CLI, `oikos/` scheduler/drift/relations/gen-topology |
|
|
| Substrate — generated host records | `hosts/*.yaml` (root) | `mcp/server.py` (`HOSTS_DIR`), `bin/homelab`; written by `mcp/build_host_files.py` |
|
|
| Substrate — kernel + context cards | `oikos/` (code, `oikos/cards/`, `oikos/state.json`) | MCP `explain`, scheduler |
|
|
| Narrative — synthesized wiki | `knowledge/wiki/{hosts,containers,vms,infrastructure}/` | humans, agents via MCP `get_page` / `search_docs` |
|
|
| Evidence — immutable sources | `knowledge/sources/` (references + investigations) | synthesis into wiki pages |
|
|
|
|
## Wiki pages
|
|
|
|
- **Node pages** (`knowledge/wiki/containers/<id>-<name>.md`, `.../vms/<id>-<name>.md`,
|
|
`.../hosts/<name>.md`) follow the container/host template in
|
|
[page-templates.md](../../shared/page-templates.md): opening definition, `## At a glance`,
|
|
`## Role`, service/port map, storage, auto-deploy, `## Related`, `## Changelog`.
|
|
- **Cross-cutting pages** (`knowledge/wiki/infrastructure/<topic>.md`) follow the cross-cutting
|
|
template: `## Why`, `## Components`, `## How to apply`, `## Gotchas`, `## Related`, `## Changelog`.
|
|
- Each `inventory.yaml` host entry carries a `doc_page:` field pointing at its narrative page.
|
|
Changing where a page lives means updating that field (read by `bin/homelab`).
|
|
|
|
## The two logs
|
|
|
|
- The per-page **`## Changelog`** records infrastructure changes and is machine-parsed
|
|
(`get_changelog`, the Oikos ledger). Keep the `### YYYY-MM-DD — title` shape.
|
|
- **`knowledge/log.md`** is append-only and records *documentation-maintenance* operations only
|
|
(restructures, source ingests, lint sweeps): `## [YYYY-MM-DD] <op> | <summary>`. It never
|
|
duplicates the Oikos change ledger (`oikos/ledger.py`).
|
|
|
|
## Same-session update rule
|
|
|
|
A change to a node updates every page that references it in the same session — the node page, the
|
|
section `README.md` table, the root `README.md`, the Caddy/DNS/ingress pages, the host page, and
|
|
`inventory.yaml`. See [page-templates.md](../../shared/page-templates.md#same-session-update-rule).
|