3.9 KiB
LangCode Agent Wiki — Schema
Purpose
Persistent knowledge base for the LangCode Agent project. Maintained entirely by an LLM agent running on Ollama (Gemma 2 9B). This wiki sits between raw source documents and your questions — knowledge is compiled once here, then kept current.
Directory Structure
``` llmwiki/ ├── AGENTS.md ← this file (schema) ├── raw/ ← immutable source documents │ ├── articles/ ← web articles, blog posts │ ├── papers/ ← research papers, technical docs │ ├── repos/ ← code repository notes │ └── assets/ ← images, downloads, attachments └── wiki/ ← LLM-generated, interlinked pages ├── index.md ← master catalog (updated every ingest) ├── log.md ← append-only changelog ├── overview.md ← wiki purpose & architecture ├── concepts/ ← one file per key concept ├── entities/ ← one file per person, org, tool ├── sources/ ← one file per source document └── comparisons/ ← comparative analysis pages ```
Conventions
Filenames
- lowercase, hyphens instead of spaces (e.g. `self-attention.md`)
- no special characters, no camelCase
- prefix with date for time-sensitive entries: `2026-05-10-some-event.md`
Page Structure
Every wiki page must follow this template: ```markdown
Title
One-sentence summary of this page.
Tags
`concept` `entity` `source-name` `date`
Body
[Content here — use ## and ### for sections]
Related
- page-name — brief description of connection
- another-page — brief description
Sources
- Source Title — relevant passage or page range ```
Ingest Procedure
When a new source is added to `raw/`:
- Read the source end-to-end
- Identify key concepts, entities, claims, and data points
- For each: create or update the relevant wiki page in `wiki/`
- Add/update cross-references using `wikilinks`
- Update `wiki/index.md` with new/modified pages
- Append entry to `wiki/log.md` with format:
```
YYYY-MM-DD HH:MM — [source filename]
- Created: [new pages]
- Updated: [modified pages]
- Key takeaways: [bullet summary] ```
- Run the lint checklist (below)
Query Procedure
When asked a question:
- Read `wiki/index.md` first to identify relevant pages
- Load only those pages (not the entire wiki at scale)
- Synthesize answer from compiled wiki knowledge
- Cite specific wiki pages: `page-name`
- If the answer is valuable and reusable, file it as a new wiki page
Lint Checklist
Run weekly or after every 5-10 ingests:
- Every page in `wiki/` appears in `index.md`
- Every `wikilink` resolves to an existing file
- No two pages cover the same concept (merge duplicates)
- Conflicting claims between pages are flagged, not silently overwritten
- No orphan pages (pages with zero inbound links)
- All pages follow the template structure above
- Tags are consistent across related pages
- Log entries are present and properly formatted
- Sources in `raw/` that have been updated are reflected in wiki
Conflict Resolution
When sources disagree:
- Note both claims explicitly on the relevant page
- Cite both sources
- Add a "Status" field: `verified` / `disputed` / `unverified`
- Do NOT silently overwrite — preserve the history of claims
Naming Conventions
- Page titles: Title Case (e.g. "Self-Attention Mechanism")
- Filenames: lowercase-hyphens (e.g. `self-attention-mechanism.md`)
- Tags: lowercase, hyphens (e.g. `#attention-mechanism`)
Growth Targets
- After 10-20 sources: start querying the wiki for answers
- After 50+ sources: consider adding qmd for enhanced search
- After 100+ sources: review and potentially restructure wiki subdirectories