AI Doc Gen
AI-powered multi-agent system that automatically analyzes codebases and generates comprehensive documentation. Features GitLab integration, concurrent processing, and multiple…
Install
/plugin marketplace add divar-ir/ai-doc-genInstall command taken from the project's README or registry entry. Always review code before running it.
README excerpt
Read full README on GitHub →AI Documentation Generator
An AI-powered code documentation generator that automatically analyzes repositories and creates comprehensive documentation using large language models. The system employs a multi-agent architecture: five specialized analysis agents run concurrently to map a codebase's structure, dependencies, data flow, request flow, and APIs, and generation agents turn those analyses into a polished README.md and AI assistant configuration files (CLAUDE.md, AGENTS.md, .cursor/rules/). A GitLab cronjob mode discovers active projects and opens merge requests with fresh analysis automatically.
📝 Blog Posts
Read the full story behind this project:
- 🇺🇸 English: Docs That Don’t Rot: How Multi-Agent AI Rewrote Our Workflow
- 🇮🇷 از دستیار کدنویس تا همکار هوشمند؛ گام اول: کابوس مستندسازی
Table of Contents
Features
- Multi-Agent Analysis: Five specialized AI agents for code structure, data flow, dependency, request flow, and API analysis, writing reusable analysis documents to
.ai/docs/ - Automated Documentation: Generates comprehensive README files with configurable sections
- AI Assistant Configuration: Generates
CLAUDE.md,AGENTS.md, and.cursor/rules/*.mdcfiles for AI coding assistants - Claude Code Plugin & Skills: Ships as an installable Claude Code plugin with
analyze-codebase,generate-readme, andgenerate-ai-rulesskills (.claude-plugin/,skills/) - GitLab Integration: Cronjob mode discovers recently active GitLab projects, runs analysis, and opens merge requests
- Concurrent Processing: Parallel agent execution with a configurable worker pool (
ANALYZER_MAX_WORKERS, 0 = auto-detect CPU count) - Flexible Configuration: Layered configuration — Pydantic defaults,
.ai/config.yaml, then CLI flags - Multiple LLM Support: Works with any OpenAI-compatible API (OpenAI, Anthropic-compatible gateways, OpenRouter, local models, etc.), with per-agent model/endpoint settings
- Resilience: Agent-level retries plus an HTTP retry client with exponential backoff and
Retry-Aftersupport (handles 429s) - Observability: OpenTelemetry tracing via logfire with optional Langfuse integration
Installation
Using Skills (Claude Code)
This repository doubles as a Claude Code plugin — the easiest way to use it, no API keys or Python setup required. Install it from within Claude Code:
/plugin marketplace add divar-ir/ai-doc-gen
/plugin install ai-doc-gen@divar
This adds three skills that Claude Code invokes directly:
analyze-codebase— multi-agent analysis producing.ai/docs/documentsgenerate-readme— README generation from analysis or direct explorationgenerate-ai-rules—CLAUDE.md,AGENTS.md, and Cursor rules generation
Prerequisites
Similar plugs
CLI proxy that reduces LLM token consumption by 60-90% on common dev commands. Single Rust binary, zero dependencies
Bash is all you need - A nano claude code–like 「agent harness」, built from 0 to 1
Documented system prompts from Anthropic - Claude Fable 5.1, Opus 5.5, Claude Design, Claude Code. OpenAI - ChatGPT GPT-6-Astra, Codex. Google - Gemini 3.8 Flash, 3.1 Pro,…
Wrap Antigravity, ChatGPT Codex, Claude Code, Grok Build, Muse Code, Devin as an OpenAI/Gemini/Claude/Codex compatible API service, allowing you to enjoy the free Gemini…