Skip to content

MG4Code/mg-ai-wiki

Repository files navigation

AI Wiki

A self-filing encyclopedia of AI/ML terminology. Push terms to queue.txt, and Claude automatically researches, organizes, and connects them. Explore the knowledge graph via interactive visualization, search, and navigation.

Architecture

┌──────────────────────────────────────────────────┐
│                 GitHub Repository                │
├──────────────────────────────────────────────────┤
│                                                  │
│  queue.txt ─────────────────┐                    │
│  (user edits & pushes)      │                    │
│                             ↓                    │
│                    ┌─────────────────┐           │
│                    │ GitHub Action   │           │
│                    │ (research.yml)  │           │
│                    └─────────────────┘           │
│                             │                    │
│                             ↓                    │
│                    ┌─────────────────┐           │
│                    │  Claude API     │           │
│                    │  (researches)   │           │
│                    └─────────────────┘           │
│                             │                    │
│                             ↓                    │
│                    entries.json ◄─────────────┐  │
│                  (auto-committed)             │  │
│                             │                 │  │
│                             ↓                 │  │
│  docs/index.html ◄──────────────────────────┐ │  │
│  (GitHub Pages served)                      │ │  │
│  ├─ app.jsx                                 │ │  │
│  ├─ graph.jsx                               │ │  │
│  ├─ research.jsx                            │ │  │
│  ├─ tweaks-panel.jsx                        │ │  │
│  └─ reads entries.json ─────────────────────┘ │  │
│                                               │  │
└──────────────────────────────────────────────────┘
        ↓
   GitHub Pages (https://yourusername.github.io/repo)

How It Works

For Users

  1. Edit queue.txt — Add AI/ML terms you want researched:

    Transformer
    Attention Mechanism
    Retrieval Augmented Generation
    
  2. Push to GitHub — Commit and push your changes

  3. GitHub Action Triggers — Automatically detects new terms in queue.txt

  4. Claude Researches — Each term is researched and structured:

    • Term: canonical name
    • Category: auto-classified (Model Architectures, Training Methods, etc.)
    • TL;DR: one-sentence definition
    • Significance: why it matters
    • Related: 3-5 connected concepts
  5. Results Committedentries.json is auto-updated and pushed back

  6. Explore on the Web — Visit GitHub Pages to browse:

    • Overview: force-directed graph of all terms and categories
    • Categories: card grid view
    • Terms: full entry with connections
    • Search: find terms or concepts
    • Customize: theme, density, font size via tweaks panel

Architecture Overview

  • Web App — Static React app (no backend)

    • Reads entries from entries.json in repo
    • Renders search, graph, navigation, tweaks
    • No input fields (read-only)
    • Hosted: GitHub Pages (docs/ folder)
  • Research Engine — GitHub Action

    • Runs on push to queue.txt
    • Calls Claude API with your subscription key
    • Parses research results into structured JSON
    • Auto-commits entries.json back to repo
  • Storage — GitHub repository

    • queue.txt — user maintains
    • entries.json — auto-generated by action
    • All version-controlled and auditable

Setup

1. Create GitHub Repository

git clone <your-repo>
cd ai-wiki

Copy the files into your repo:

  • docs/index.html, docs/*.jsx
  • .github/workflows/research.yml
  • queue.txt (start empty or with sample terms)

2. Add Claude API Key

Get your Claude API key from console.anthropic.com.

In your GitHub repo:

  1. Settings → Secrets and variables → Actions
  2. New repository secret
  3. Name: CLAUDE_API_KEY
  4. Paste your API key

3. Enable GitHub Pages

  1. Settings → Pages
  2. Source: Deploy from a branch
  3. Branch: main, Folder: /docs
  4. Save

Your site will be live at: https://yourusername.github.io/repo-name

4. Test It

  1. Add a term to queue.txt:

    Neural Network
    
  2. Commit and push

  3. Go to Actions tab — watch the workflow run

  4. Check entries.json to see the result

  5. Visit your GitHub Pages site and search for the term

File Structure

├── .github/
│   └── workflows/
│       └── research.yml              # GitHub Action workflow
├── docs/                             # GitHub Pages (static site)
│   ├── index.html                    # Main app
│   ├── app.jsx                       # Sidebar, views, shell
│   ├── graph.jsx                     # Force-directed graph
│   ├── research.jsx                  # Queue parsing (read-only now)
│   ├── tweaks-panel.jsx              # Settings UI
│   └── entries.json                  # Generated by workflow
├── queue.txt                         # User edits this
├── README.md                         # This file
└── .gitignore

Usage

Adding Terms

Edit queue.txt:

# Comments start with #
Transformer
Attention Mechanism
RLHF

# Duplicates are ignored
Transformer  # This won't be researched again

Push to GitHub. The Action will:

  1. Parse new terms
  2. Research each via Claude
  3. Skip already-researched ones
  4. Commit results to entries.json

Exploring

  • Search: Use the search box in the sidebar
  • Navigate: Click categories in the sidebar
  • Graph: Drag nodes, hover for context, click to explore
  • Customize: Open tweaks panel (bottom-right corner)
    • Theme: Aurora, Signal, Ember
    • Accent: Violet, Cyan, Amber, Emerald
    • Density: Compact, Regular, Comfy
    • Font size: 85–120%

Viewing Entries

Each entry has:

  • Category tag — click to see all in category
  • TL;DR — crisp definition
  • Why it matters — significance and use cases
  • Related — linked concepts (click to navigate, or add to queue)
  • Metadata — filed date, source

Customization

Tweak the Research Prompt

Edit .github/workflows/research.yml — the RESEARCH_PROMPT section controls how Claude researches. Common tweaks:

  • Change category list or description
  • Adjust the JSON structure
  • Set word limits

Tweak the UI

Edit docs/index.html — CSS tokens at the top:

:root {
  --bg: oklch(0.165 0.012 265);    /* Background color */
  --accent: #a78bff;                /* Highlight color */
  --radius: 14px;                   /* Border radius */
  --pad: 56px;                      /* Padding */
}

Troubleshooting

Action fails to run

  • Check API key is set in Secrets
  • Check workflow syntax in .github/workflows/research.yml
  • View Actions tab for error logs

Terms not appearing

  • Check entries.json was created
  • Verify GitHub Pages is enabled
  • Check browser cache (hard refresh: Ctrl+Shift+R)

Queue.txt not being detected

  • Make sure you're editing the root-level queue.txt, not a copy
  • The Action watches for changes to queue.txt — commit and push

Research results look wrong

  • Claude may misclassify categories — edit entries.json manually to fix
  • Results are just JSON — you can edit entries directly

Costs

  • GitHub: Free (repo + Actions + Pages)
  • Claude API: Charged per token (your subscription API key)
    • Research is usually cheap (~2-5 tokens per entry typically)
    • Estimate: ~$0.01 per term

Development

Running Locally

python3 -m http.server 8080 -d docs
# or use VS Code Live Server

Open http://localhost:8080

Modifying the App

  1. Edit files in docs/
  2. Refresh browser
  3. Commit changes

Changes to HTML/CSS are instant. Changes to entries.json require a GitHub Action run (push to queue.txt) or manual edit.

License

MIT

Questions?

  • Check GitHub Issues
  • See workflow logs in Actions tab for debugging
  • Edit queue.txt to retry research on a term

About

mg-ai-wiki

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors