Skip to content

chatbot-pf/memex

Repository files navigation

🧠 Memex

License: MIT

Prior art: This project builds on the .github/plugins/deep-wiki plugin from microsoft/skills as prior art. The license and copyright of the original are retained (see License).

AI-Powered Wiki Generator for Code Repositories β€” Claude Code Plugin

Generate comprehensive, structured, Mermaid-rich documentation wikis for any codebase β€” with dark-mode VitePress sites, onboarding guides, and deep research capabilities. Distilled from the prompt architectures of OpenDeepWiki, deepwiki-open, langchain-ai/openwiki, and vercel-labs/openwiki.

Installation

From a marketplace

# Inside Claude Code, run these slash commands:
/plugin marketplace add pleaseai/claude-code-plugins
/plugin install memex@pleaseai

From a local directory

claude --plugin-dir ./memex

Commands

Command Description
/memex:generate Generate a complete wiki β€” catalogue + all pages + onboarding guides + VitePress site
/memex:crisp Fast wiki generation β€” concise, parallelized, rate-limit-friendly. 5–8 pages, no build step
/memex:catalogue Generate only the hierarchical wiki structure as JSON
/memex:page <topic> Generate a single wiki page with dark-mode Mermaid diagrams
/memex:changelog Generate a structured changelog from git commits
/memex:research <topic> Multi-turn deep investigation with evidence-based analysis
/memex:ask <question> Ask a question about the repository
/memex:onboard Generate 4 audience-tailored onboarding guides (Contributor, Staff Engineer, Executive, PM)
/memex:agents Generate AGENTS.md files for pertinent folders (only where missing)
/memex:llms Generate llms.txt and llms-full.txt for LLM-friendly project access
/memex:ado Generate a Node.js script to convert wiki to Azure DevOps Wiki-compatible format
/memex:build Package generated wiki as a static site (VitePress, Nextra, Astro Starlight, …) via the wiki-site-core adapter contract; --tool selects the generator (default VitePress)
/memex:deploy Generate GitHub Actions workflow to deploy wiki to GitHub Pages

Agents

Agent Description
wiki-architect Analyzes repos, generates structured catalogues + onboarding architecture
wiki-writer Generates pages with dark-mode Mermaid diagrams and deep citations
wiki-researcher Deep research with zero tolerance for shallow analysis β€” evidence-first

View available agents: /agents

Skills (Auto-Invoked)

Skill Triggers When
wiki-architect User asks to create a wiki, document a repo, or map a codebase
wiki-page-writer User asks to document a component or generate a technical deep-dive
wiki-changelog User asks about recent changes or wants a changelog
wiki-researcher User wants in-depth investigation across multiple files
wiki-qa User asks a question about how something works in the repo
wiki-site-core User asks to build/package a site β€” generator-neutral core + per-tool adapter contract (manifest read by build/deploy/CI)
wiki-vitepress User asks to build a site or package wiki as VitePress (the reference adapter of wiki-site-core)
wiki-onboarding User asks for onboarding docs or getting-started guides
wiki-agents-md User asks to generate AGENTS.md files for coding agent context
wiki-llms-txt User asks to generate llms.txt or make docs LLM-friendly
wiki-ado-convert User asks to export wiki for Azure DevOps or convert Mermaid/markdown for ADO

Quick Start

# Install the plugin (slash command inside Claude Code)
/plugin marketplace add pleaseai/claude-code-plugins
/plugin install memex@pleaseai

# Generate a full wiki with onboarding guides and VitePress site
/memex:generate

# Fast wiki β€” concise, parallelized, avoids rate limits
/memex:crisp

# Just the structure
/memex:catalogue

# Single page with dark-mode diagrams
/memex:page Authentication System

# Generate onboarding guides
/memex:onboard

# Build VitePress dark-theme site
/memex:build

# Research a topic (evidence-based, 5 iterations)
/memex:research How does the caching layer work?

# Ask a question
/memex:ask What database migrations exist?

# Generate llms.txt for LLM-friendly access
/memex:llms

# Deploy wiki to GitHub Pages (optional)
/memex:deploy

How It Works

Repository β†’ Scan β†’ Catalogue (JSON TOC) β†’ Per-Section Pages β†’ Assembled Wiki
                                                    ↓
                                         Mermaid Diagrams + Citations
                                                    ↓
                                         Onboarding Guides (Contributor, Staff Engineer, Executive, PM)
                                                    ↓
                                         Static Site β€” VitePress / Nextra / Astro Starlight (Dark Theme, per-tool adapter)
                                                    ↓
                                         AGENTS.md Files (Only If Missing)
                                                    ↓
                                         llms.txt + llms-full.txt (LLM-friendly)
                                                    ↓
                                         GitHub Pages Deployment (Optional)
Step Component What It Does
1 wiki-architect Analyzes repo β†’ hierarchical JSON table of contents
2 wiki-page-writer For each TOC entry β†’ rich Markdown with dark-mode Mermaid + citations
3 wiki-onboarding Generates 4 audience-tailored onboarding guides in onboarding/ folder
4 wiki-site-core Packages all pages into a static site via a generator-neutral core + per-tool adapter manifest (VitePress reference + Nextra v4 + Astro Starlight); wiki-vitepress is the VitePress adapter
5 wiki-changelog Git commits β†’ categorized changelog
6 wiki-researcher Multi-turn investigation with evidence standard
7 wiki-qa Q&A grounded in actual source code
8 wiki-agents-md Generates AGENTS.md files for pertinent folders (only if missing)
9 wiki-llms-txt Generates llms.txt + llms-full.txt for LLM-friendly access
10 wiki-ado-convert Converts VitePress wiki to Azure DevOps Wiki-compatible format

Design Principles

  1. Source-linked citations: Before any task, resolve the source repo URL (or confirm local). All citations use [file:line](REPO_URL/blob/BRANCH/file#Lline) for remote repos, (file:line) for local
  2. Structure-first: Always generate a TOC/catalogue before page content
  3. Evidence-based: Every claim cites file_path:line_number with clickable links β€” no hand-waving
  4. Diagram-rich: Minimum 3–5 dark-mode Mermaid diagrams per page using multiple diagram types, with click-to-zoom and <!-- Sources: ... --> comment blocks. More diagrams = better β€” use them liberally for architecture, flows, state, data models, and decisions.
  5. Table-driven: Prefer tables over prose for any structured information. Use summary tables, comparison tables, and always include a "Source" column with citations.
  6. Progressive disclosure: Big picture first, then drill into details. Every section starts with a TL;DR.
  7. Hierarchical depth: Max 4 levels for component-level granularity
  8. Systems thinking: Architecture β†’ Subsystems β†’ Components β†’ Methods
  9. Never invent: All content derived from actual code β€” trace real implementations
  10. Dark-mode native: All output designed for dark-theme rendering (VitePress)
  11. Depth before breadth: Trace actual code paths, never guess from file names
  12. Agent-discoverable: Output placed at standard paths (llms.txt at repo root, AGENTS.md in key folders) so coding agents and MCP tools find documentation automatically

Agent & MCP Integration

The generated output is designed to be discoverable by coding agents using the GitHub MCP Server or any MCP-compatible tool:

File Path Discovery Method
llms.txt Repo root (./llms.txt) Standard llms.txt spec location β€” agents check here first via get_file_contents
llms-full.txt wiki/llms-full.txt Full inlined docs β€” agents load this for comprehensive context
AGENTS.md Root + key folders Standard agent instructions file β€” references wiki docs in Documentation section
Wiki pages wiki/**/*.md Searchable via search_code β€” all pages contain source-linked citations
llms.txt wiki/.vitepress/public/ Served at /llms.txt on deployed VitePress site

How it works with GitHub MCP:

  1. Agent calls get_file_contents on llms.txt β†’ gets project summary + links to all wiki pages
  2. Agent calls get_file_contents on specific wiki pages β†’ gets full documentation with source citations
  3. Agent calls search_code with patterns β†’ finds relevant wiki sections across the repository
  4. Agent reads AGENTS.md β†’ Documentation section points to wiki and onboarding guides

Plugin Structure

memex/
β”œβ”€β”€ .claude-plugin/
β”‚   └── plugin.json          # Plugin manifest (name, version, description)
β”œβ”€β”€ commands/                 # Slash commands (/memex:*)
β”‚   β”œβ”€β”€ generate.md          # Full wiki generation pipeline
β”‚   β”œβ”€β”€ crisp.md             # Fast, concise wiki (rate-limit-friendly)
β”‚   β”œβ”€β”€ catalogue.md         # Wiki structure as JSON
β”‚   β”œβ”€β”€ page.md              # Single page with dark-mode diagrams
β”‚   β”œβ”€β”€ changelog.md         # Git-based changelog
β”‚   β”œβ”€β”€ research.md          # 5-iteration deep research
β”‚   β”œβ”€β”€ ask.md               # Q&A about the repo
β”‚   β”œβ”€β”€ onboard.md           # Onboarding guide generation
β”‚   β”œβ”€β”€ agents.md            # AGENTS.md generation (only if missing)
β”‚   β”œβ”€β”€ llms.md              # llms.txt generation for LLM-friendly access
β”‚   β”œβ”€β”€ deploy.md            # GitHub Pages deployment workflow generation
β”‚   β”œβ”€β”€ ado.md               # Azure DevOps Wiki export script generation
β”‚   └── build.md             # static-site packaging (multi-tool, --tool selector)
β”œβ”€β”€ skills/                   # Auto-invoked based on context
β”‚   β”œβ”€β”€ wiki-architect/
β”‚   β”‚   └── SKILL.md
β”‚   β”œβ”€β”€ wiki-page-writer/
β”‚   β”‚   └── SKILL.md
β”‚   β”œβ”€β”€ wiki-changelog/
β”‚   β”‚   └── SKILL.md
β”‚   β”œβ”€β”€ wiki-researcher/
β”‚   β”‚   └── SKILL.md
β”‚   β”œβ”€β”€ wiki-qa/
β”‚   β”‚   └── SKILL.md
β”‚   β”œβ”€β”€ wiki-site-core/      # Generator-neutral packaging core + adapter contract
β”‚   β”‚   β”œβ”€β”€ SKILL.md         # Core + per-tool adapter overview
β”‚   β”‚   └── references/
β”‚   β”‚       β”œβ”€β”€ adapter-contract.md   # Capability manifest schema (build/deploy/CI)
β”‚   β”‚       β”œβ”€β”€ core-packaging.md     # Tool-independent logic (post-proc, citations, tokens, sidebar, llms.txt)
β”‚   β”‚       └── adapters/
β”‚   β”‚           β”œβ”€β”€ vitepress.md      # VitePress reference adapter (manifest + delta)
β”‚   β”‚           β”œβ”€β”€ nextra.md         # Nextra v4 adapter (baseline parity)
β”‚   β”‚           └── starlight.md      # Astro Starlight adapter (baseline parity)
β”‚   β”œβ”€β”€ wiki-vitepress/      # VitePress adapter entry (thin pointer to wiki-site-core)
β”‚   β”‚   β”œβ”€β”€ SKILL.md         # VitePress adapter overview + gotchas
β”‚   β”‚   └── references/
β”‚   β”‚       └── vitepress-build.md  # Full VitePress config, theme, CSS, zoom impl (authoritative)
β”‚   β”œβ”€β”€ wiki-onboarding/
β”‚   β”‚   └── SKILL.md         # Onboarding guide generation
β”‚   β”œβ”€β”€ wiki-agents-md/
β”‚   β”‚   └── SKILL.md         # AGENTS.md generation for coding agents
β”‚   β”œβ”€β”€ wiki-llms-txt/
β”‚   β”‚   └── SKILL.md         # llms.txt generation for LLM-friendly access
β”‚   └── wiki-ado-convert/
β”‚       └── SKILL.md         # Azure DevOps Wiki conversion
β”œβ”€β”€ agents/                   # Custom agents (visible in /agents)
β”‚   β”œβ”€β”€ wiki-architect.md
β”‚   β”œβ”€β”€ wiki-writer.md
β”‚   └── wiki-researcher.md
└── README.md

License

Licensed under the MIT License.

This project references the deep-wiki plugin from microsoft/skills (MIT) as prior art. The original copyright is retained; modifications are Β© Minsu Lee.

About

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors