Files
llm-wiki-agent/GEMINI.md
Anil Matcha ebdbbc09e5 Add AGENTS.md + GEMINI.md for Codex, OpenCode, Gemini CLI support
The wiki now works with any coding agent that reads a repo config file.
CLAUDE.md → Claude Code, AGENTS.md → Codex/OpenCode, GEMINI.md → Gemini CLI.
README updated with agent compatibility table.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-07 07:09:13 +05:30

3.0 KiB
Raw Blame History

LLM Wiki Agent — Schema & Workflow Instructions

This wiki is maintained entirely by Gemini CLI. No API key or Python scripts needed — just open this repo with gemini and talk to it.

How to Use

Describe what you want in plain English:

  • "Ingest this file: raw/papers/my-paper.md"
  • "What does the wiki say about transformer models?"
  • "Check the wiki for orphan pages and contradictions"
  • "Build the knowledge graph"

Or use shorthand triggers:

  • ingest <file> → runs the Ingest Workflow
  • query: <question> → runs the Query Workflow
  • lint → runs the Lint Workflow
  • build graph → runs the Graph Workflow

Directory Layout

raw/          # Immutable source documents — never modify these
wiki/         # Agent owns this layer entirely
  index.md    # Catalog of all pages — update on every ingest
  log.md      # Append-only chronological record
  overview.md # Living synthesis across all sources
  sources/    # One summary page per source document
  entities/   # People, companies, projects, products
  concepts/   # Ideas, frameworks, methods, theories
  syntheses/  # Saved query answers
graph/        # Auto-generated graph data
tools/        # Optional standalone Python scripts

Page Format

Every wiki page uses this frontmatter:

---
title: "Page Title"
type: source | entity | concept | synthesis
tags: []
sources: []
last_updated: YYYY-MM-DD
---

Use [[PageName]] wikilinks to link to other wiki pages.


Ingest Workflow

Triggered by: "ingest "

  1. Read the source document fully
  2. Read wiki/index.md and wiki/overview.md for current wiki context
  3. Write wiki/sources/<slug>.md (source page format below)
  4. Update wiki/index.md — add entry under Sources
  5. Update wiki/overview.md — revise synthesis if warranted
  6. Update/create entity and concept pages
  7. Flag contradictions with existing wiki content
  8. Append to wiki/log.md: ## [YYYY-MM-DD] ingest | <Title>

Source Page Format

---
title: "Source Title"
type: source
tags: []
date: YYYY-MM-DD
source_file: raw/...
---

## Summary
24 sentence summary.

## Key Claims
- Claim 1

## Key Quotes
> "Quote here"

## Connections
- [[EntityName]] — how they relate

## Contradictions
- Contradicts [[OtherPage]] on: ...

Query Workflow

Triggered by: "query: "

  1. Read wiki/index.md — identify relevant pages
  2. Read those pages
  3. Synthesize answer with [[PageName]] citations
  4. Offer to save as wiki/syntheses/<slug>.md

Lint Workflow

Triggered by: "lint"

Check for: orphan pages, broken links, contradictions, stale content, missing entity pages, data gaps.


Graph Workflow

Triggered by: "build graph"

Try python tools/build_graph.py --open first. If unavailable, build graph.json and graph.html manually from wikilinks.


Naming Conventions

  • Source slugs: kebab-case
  • Entity/Concept pages: TitleCase.md

Log Format

## [YYYY-MM-DD] <operation> | <title>