Uozhan Wiki Schema

Правила wiki проекта «Уожан» на основе архитектуры Karpathy (RAW → WIKI → SCHEMA). Ссылается на главный ~/neurport/wiki/SCHEMA.md для платформенных правил.


1. Три слоя Wiki (Karpathy Architecture)

┌─────────────────────────────────────────────────────────┐
│  LAYER 3: SCHEMA                                        │
│  ~/projects/uozhan/CLAUDE.md  ← AI agent instructions  │
│  ~/projects/uozhan/wiki/SCHEMA.md ← Этот файл           │
└───────────────────────┬─────────────────────────────────┘
                        │ tells LLM how to maintain wiki
┌───────────────────────┴─────────────────────────────────┐
│  LAYER 2: WIKI (LLM-generated, human-read)              │
│  ~/projects/uozhan/wiki/                                 │
│  ├── HOME.md, index.md, log.md, SCHEMA.md                │
│  ├── domains/, experts/, frontend/, supabase/             │
│  └── (symlinked from neurport/wiki/projects/uozhan/)    │
└───────────────────────┬─────────────────────────────────┘
                        │ wiki references raw sources
┌───────────────────────┴─────────────────────────────────┐
│  LAYER 1: RAW SOURCES (immutable, human-curated)        │
│  ~/projects/uozhan/docs/                                 │
│  ├── kb/          ← 12 KB файлов (оригиналы)             │
│  ├── experts/     ← 15 экспертных файлов (оригиналы)     │
│  ├── architecture/ ← FRONTEND-ARCHITECTURE.md            │
│  ├── legal/        ← kb-fund.md                          │
│  ├── design/       ← Design_Code.md                     │
│  └── reference/    ← farm-v5-reference.jsx               │
│                                                          │
│  ~/projects/uozhan/research/                              │
│  ~/projects/uozhan/gis/                                  │
└─────────────────────────────────────────────────────────┘

2. Frontmatter Standard (Uozhan)

Every wiki page must have YAML frontmatter:

---
domain: uozhan
category: <adr|decision|procedure|agreement|insight|state>
knowledge_id: <KN-xxx> (optional)
importance: <1-10>
updated: <session_id or date>
tags: [tag1, tag2, ...]
---
  • domain: uozhan for all Uozhan wiki pages
  • category: inherited from platform SCHEMA.md
  • importance: 9-10 = locked decisions, 7-8 = architecture, 4-6 = useful, 1-3 = FYI

3. INGEST — wiki_ingest()

When: New raw source, transcript, decision, report, project doc arrives.

Process:

  1. Raw document arrives in docs/ (LAYER 1)
  2. Agent reads the document and extracts knowledge
  3. Agent creates or updates wiki pages in wiki/ (LAYER 2)
  4. Agent updates wiki/index.md if new pages were created
  5. Agent adds entry to wiki/log.md

Source Type Mapping

Source TypeInput LocationOutput
KB documentdocs/kb/kb-{domain}.mdwiki/domains/{domain}.md
Expert filedocs/experts/{domain}.mdwiki/experts/{domain}.md
Architecture docdocs/architecture/wiki/frontend/architecture.md
Legal docdocs/legal/wiki/legal.md
Design docdocs/design/wiki/frontend/design-system.md
Transcriptdocs/raw/transcripts/New wiki page + log entry
DecisionOperator inputwiki/locked-decisions.md + Supabase decisions
New expertdocs/experts/wiki/experts/ + Supabase experts

4. QUERY — knowledge_query()

When: Agent needs information about Uozhan.

Process:

  1. Search wiki/ (LAYER 2) first
  2. If not found in wiki, consult docs/ (LAYER 1)
  3. Synthesize answer from found sources
  4. If answer is complex, create a wiki page for future reference
  5. Log the query and answer in log.md

5. LINT — wiki_lint()

When: session_close + periodic cron.

Checks:

  • Orphan pages: wiki pages with no inbound links from other pages
  • Broken wikilinks: [[links]] pointing to non-existent pages
  • Stale content: pages not updated > 30 days with importance >= 6
  • Stub pages: pages < 50 words of content (excluding frontmatter)
  • Duplicate content: same knowledge in multiple places
  • Missing frontmatter: pages without proper YAML header
  • Contradiction detection: same topic with conflicting information
  • Cross-reference completeness: every project needs >= 3 inbound links

6. Directory Rules

  • All Uozhan wiki content lives in ~/projects/uozhan/wiki/
  • Neurport vault accesses it via symlink: ~/neurport/wiki/projects/uozhan/~/projects/uozhan/wiki/
  • docs/ is LAYER 1 (RAW): immutable sources, wiki references but does not duplicate
  • wiki/ is LAYER 2: LLM-generated, human-readable, Obsidian-compatible
  • CLAUDE.md and this file are LAYER 3: instructions for AI agents

Current State: L1 ≈ L2 (transitional)

Currently, most wiki pages are near-identical to their RAW sources with frontmatter added. This is acceptable at the current stage. When the wiki matures, L2 pages should be condensed summaries linking back to L1 sources (see Karpathy architecture above). Pages tagged stub in frontmatter have < 50 words of content and should be enriched or merged into parent pages.

File Naming

  • kebab-case for all filenames: my-page-name.md
  • No spaces in filenames
  • Russian text in filenames is allowed (e.g., план-посева-пшеницы-на-5-га.md)
  • Directory hierarchy reflects knowledge hierarchy

7. Cross-Reference Rules

  • Every page links to [[HOME]] as the entry point
  • Domain pages link to their sub-pages and to [[HOME]]
  • Expert pages link to their domain and to [[HOME]]
  • The [[index]] page lists all wiki pages
  • The [[log]] page tracks chronological changes
  • This [[SCHEMA]] page defines the rules

8. Quality Standards

  • Every wiki page must have >= 50 words of content (excluding frontmatter)
  • Navigation-only pages (HOME, index) are exempt from word count
  • Every domain page must have: description, current status, key metrics, linked decisions
  • Expert pages must reference their domain counterpart
  • All financial figures must include TAX_COEFF = 1.43

Uozhan SCHEMA v1 — created 2026-04-27. Evolve as wiki grows. See also: ~/neurport/wiki/SCHEMA.md for platform-wide rules.