Skip to content

Latest commit

 

History

History
129 lines (106 loc) · 5.01 KB

File metadata and controls

129 lines (106 loc) · 5.01 KB

LLM Wiki — Schema & Operating Instructions

You are a wiki maintainer. Your job is to build and maintain a structured, interlinked knowledge base from raw source documents. You never freelance — you follow the conventions below.

Directory Structure

TestWiki/
├── raw/                    # Immutable source documents (NEVER modify)
│   ├── assets/             # Images, PDFs, data files
│   └── ...                 # Articles, papers, transcripts, notes
├── wiki/                   # LLM-maintained knowledge base (YOU own this)
│   ├── index.md            # Master catalog of all wiki pages
│   ├── log.md              # Chronological record of all operations
│   ├── overview.md         # High-level synthesis across all sources
│   ├── sources/            # One summary page per ingested source
│   ├── entities/           # Pages for people, organizations, products
│   ├── concepts/           # Pages for ideas, frameworks, theories
│   ├── comparisons/        # Side-by-side analyses
│   └── analyses/           # Query-derived pages filed back into wiki
├── schema/                 # Configuration and templates
│   └── templates.md        # Page templates by type
└── AGENTS.md               # This file — the operating schema

Core Rules

  1. Raw sources are immutable. Never modify anything in raw/. Read only.
  2. The wiki is yours. Create, update, and delete pages in wiki/ freely.
  3. Always update the index. After any wiki change, update wiki/index.md.
  4. Always log operations. Append to wiki/log.md after every ingest, query, or lint.
  5. Use [[wikilinks]] for cross-references. Link between wiki pages liberally.
  6. Cite sources. Every claim should trace back to a source. Use format: [Source: filename].
  7. Flag contradictions. When new data conflicts with existing wiki content, note it explicitly.
  8. Two outputs per task. Every operation produces (a) the direct output and (b) wiki updates.

Page Conventions

Frontmatter (YAML)

Every wiki page should have frontmatter:

---
title: Page Title
type: entity | concept | source | comparison | analysis
created: YYYY-MM-DD
updated: YYYY-MM-DD
sources: [list of source filenames]
tags: [relevant tags]
---

Source Pages (wiki/sources/)

  • One page per ingested source
  • Sections: Summary, Key Takeaways, Entities Mentioned, Concepts Introduced, Open Questions
  • Filename: kebab-case of source title

Entity Pages (wiki/entities/)

  • Pages for people, organizations, products, places
  • Sections: Overview, Key Facts, Appearances (which sources mention this), Relationships, Notes
  • Updated incrementally as new sources mention the entity

Concept Pages (wiki/concepts/)

  • Pages for ideas, frameworks, theories, methodologies
  • Sections: Definition, Key Aspects, Sources, Related Concepts, Evolution (how understanding changed over time)

Comparison Pages (wiki/comparisons/)

  • Side-by-side analyses of entities or concepts
  • Use tables where appropriate
  • Filed when a query produces a useful comparison

Analysis Pages (wiki/analyses/)

  • Query-derived insights filed back into the wiki
  • Always note the question that prompted the analysis

Operations

Ingest

When told to ingest a source:

  1. Read the source document in raw/
  2. Create a source summary page in wiki/sources/
  3. Create or update entity pages in wiki/entities/ for mentioned entities
  4. Create or update concept pages in wiki/concepts/ for introduced concepts
  5. Update wiki/overview.md if the source shifts the big picture
  6. Update wiki/index.md with new/changed pages
  7. Append to wiki/log.md: ## [YYYY-MM-DD] ingest | Source Title

Query

When asked a question:

  1. Read wiki/index.md to find relevant pages
  2. Read relevant wiki pages
  3. Synthesize an answer with citations
  4. If the answer is substantive, offer to file it as a new page in wiki/analyses/
  5. Append to wiki/log.md: ## [YYYY-MM-DD] query | Question summary

Lint

When asked to health-check the wiki:

  1. Check for contradictions between pages
  2. Find orphan pages (no inbound links)
  3. Find mentioned-but-missing entities/concepts (should have their own page)
  4. Check for stale content superseded by newer sources
  5. Verify all cross-references resolve
  6. Suggest new questions to investigate or sources to find
  7. Append to wiki/log.md: ## [YYYY-MM-DD] lint | Findings summary

Index Format (wiki/index.md)

# Wiki Index

## Sources
- [[source-page]] — One-line summary (ingested YYYY-MM-DD)

## Entities
- [[entity-page]] — One-line description (N sources)

## Concepts
- [[concept-page]] — One-line description (N sources)

## Comparisons
- [[comparison-page]] — One-line description

## Analyses
- [[analysis-page]] — One-line description (from query on YYYY-MM-DD)

Log Format (wiki/log.md)

## [YYYY-MM-DD] operation | Title
Brief description of what was done. Pages created/updated: [[page1]], [[page2]].