{"id":48419391,"url":"https://github.com/haruhiko-joe/autodoc","last_synced_at":"2026-04-13T06:12:25.770Z","repository":{"id":349157085,"uuid":"1200235335","full_name":"Haruhiko-Joe/autoDoc","owner":"Haruhiko-Joe","description":"Point autoDoc at any code repository and get an interactive documentation site — automatically.","archived":false,"fork":false,"pushed_at":"2026-04-07T07:23:22.000Z","size":6265,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-07T09:00:29.987Z","etag":null,"topics":["agent","agentic-workflow","documentation"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Haruhiko-Joe.png","metadata":{"files":{"readme":"README.en.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-03T07:17:31.000Z","updated_at":"2026-04-07T07:18:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"196f385c-d4ea-4fb2-a273-52300ab7847f","html_url":"https://github.com/Haruhiko-Joe/autoDoc","commit_stats":null,"previous_names":["haruhiko-joe/autodoc"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Haruhiko-Joe/autoDoc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haruhiko-Joe%2FautoDoc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haruhiko-Joe%2FautoDoc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haruhiko-Joe%2FautoDoc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haruhiko-Joe%2FautoDoc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Haruhiko-Joe","download_url":"https://codeload.github.com/Haruhiko-Joe/autoDoc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Haruhiko-Joe%2FautoDoc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31506574,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["agent","agentic-workflow","documentation"],"created_at":"2026-04-06T08:02:21.841Z","updated_at":"2026-04-13T06:12:25.756Z","avatar_url":"https://github.com/Haruhiko-Joe.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003eautoDoc\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cstrong\u003eTurn any code repository into an interactive documentation site — automatically.\u003c/strong\u003e\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    5 AI Agents · Iterative Validation · Interactive Architecture Graphs · Crash Recovery · Progressive Disclosure\n  \u003c/p\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"README.md\"\u003e中文\u003c/a\u003e | \u003cstrong\u003eEnglish\u003c/strong\u003e | \u003ca href=\"README.ja.md\"\u003e日本語\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/TypeScript-5.x-3178C6?logo=typescript\u0026logoColor=white\" alt=\"TypeScript\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Vue-3.x-4FC08D?logo=vuedotjs\u0026logoColor=white\" alt=\"Vue 3\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/Node.js-%3E%3D18-339933?logo=nodedotjs\u0026logoColor=white\" alt=\"Node.js\"\u003e\n  \u003cimg src=\"https://img.shields.io/badge/pnpm-%3E%3D10-F69220?logo=pnpm\u0026logoColor=white\" alt=\"pnpm\"\u003e\n  \u003ca href=\"https://github.com/Haruhiko-Joe/autoDoc/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/Haruhiko-Joe/autoDoc?style=social\" alt=\"Stars\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/Haruhiko-Joe/skills/tree/main/doc-drill\"\u003e📘 Companion Skill: doc-drill\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n## Why autoDoc?\n\nUnlike DeepWiki, Google Code Wiki, and similar tools that generate docs in a single pass, autoDoc is a **multi-agent documentation factory with a quality feedback loop**. It is both **the most human-friendly documentation site to read** and **a knowledge base natively tailored for Code Agents**, achieving SOTA across readability, interactivity, and Agent-consumability.\n\n| | autoDoc | DeepWiki | Google Code Wiki |\n|---|:---:|:---:|:---:|\n| Multi-agent iterative validation | **5 Agents + Checker loop** | Single pass | Single pass |\n| Interactive architecture graphs | **6 semantic edge types + hover details** | Static Mermaid | Static diagrams |\n| Recursive adaptive decomposition | **Agent decides depth autonomously** | Fixed levels | Flat structure |\n| Crash recovery | **Session ID + pending staging** | No | No |\n| Code Agent integration | **doc-drill Skill** | No | No |\n| Hybrid AI backends | **Per-role Claude/Codex selection** | No | No |\n\n## Demo\n\n| Architecture Overview | Sub-module Graph |\n|:---:|:---:|\n| ![overview](fig/overview.png) | ![module](fig/module.png) |\n\n| Markdown Doc Page | Chat with AI |\n|:---:|:---:|\n| ![finalpage](fig/finalpage.png) | ![continuechat](fig/continuechat.png) |\n\n| Interaction Flows |\n|:---:|\n| ![interactiveflow](fig/interactiveflow.png) |\n\n## How It Works\n\n```\nScaffold ──► Checker\n                │\n    ┌───────────┴───────────┐\n    ▼                       ▼\nDecomposer ──► Checker   Decomposer ──► Checker   ...\n    │                       │\n    ▼                       ▼\n Writer                  Writer\n    │                       │\n    ▼                       ▼\n Assemble Skill ─────► Flow Analyzer ──► Done\n```\n\n| Agent | Role | Validation |\n|-------|------|------------|\n| **Scaffold** | Analyzes the entire repo, produces a top-level module graph | Validated by Checker |\n| **Decomposer** | Recursively splits modules into sub-graphs or leaf pages | Validated by Checker (up to 5 retries) |\n| **Writer** | Generates detailed Markdown docs for each leaf node | — |\n| **Checker** | Validates graph structure integrity and content quality | — |\n| **Flow Analyzer** | Extracts 3–7 typical cross-module interaction flows | — |\n\nAll agents are orchestrated by the **Arranger** state machine with a **sliding-window concurrency model** — the number of concurrent sessions is configurable from the frontend (default 8). State is managed per node with full crash recovery support.\n\n### Hybrid AI Backends\n\nEach agent role can independently use **Claude** (Claude Agent SDK) or **Codex** (OpenAI Codex SDK) as its backend, configurable from the frontend panel:\n\n| Role | Default Backend |\n|------|----------------|\n| Scaffold | Claude |\n| Decomposer | Claude |\n| Writer | Claude |\n| Checker | Codex |\n| Flow Analyzer | Claude |\n\n## Key Features\n\n- **Interactive Directed Graphs** — Powered by [AntV G6](https://g6.antv.antgroup.com/) with 6 semantic edge types (calls, depends, data-flow, event, extends, composes) and hover popovers showing relationship details\n- **Progressive Disclosure** — Start from the top-level architecture overview, click nodes to drill down layer by layer to leaf Markdown docs\n- **Interaction Flow Diagrams** — Automatically extracted cross-module business flows, rendered as sequence diagrams with participants, steps, and code references\n- **Module Search** — Quick search across all modules in the sidebar\n- **AI Chat Panel** — Floating chat window for follow-up questions on doc content (requires `OPENAI_API_KEY`)\n- **Dark Mode** — Tokyo Night theme, one-click toggle\n- **Real-time Progress** — Watch documentation generation progress live from the home page\n- **Multi-language** — Generate docs in Chinese (default) or English\n\n## Pluggable Documentation\n\nEach module's documentation is a self-contained unit. Freely add, remove, or replace any module without regenerating the entire site.\n\n- **Remove** — Delete a module directory and its reference in the parent Graph JSON\n- **Add** — Create a new module directory, or set a node's status to `pending` and re-run\n- **Replace** — Directly edit any Markdown file; nodes with `done` status won't be overwritten\n- **Incremental** — On re-run, only incomplete nodes are processed\n\n## doc-drill: Native Code Agent Integration\n\nAfter generation, autoDoc automatically installs the [doc-drill](https://github.com/Haruhiko-Joe/skills/tree/main/doc-drill) Skill into the target repo's `.claude/skills/` directory. Any Code Agent can then:\n\n- **Browse progressively** — Drill from top-level modules down to implementation details (lazy-load, context-efficient)\n- **Trace relationships** — Follow 6 semantic edge types to trace call chains and data flows\n- **Search by keyword** — Search across all documentation layers\n- **Navigate business flows** — Understand end-to-end interaction scenarios via `flows.json`\n\n\u003e This Agent-native integration is something DeepWiki (web chat only) and Google Code Wiki (web browsing only) cannot offer.\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js \u003e= 18\n- pnpm \u003e= 10\n- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed and working (official subscription, Claude Code API, or third-party API — any will do)\n- (Optional) `OPENAI_API_KEY` — enables the AI chat panel and Codex backend\n\n### Install \u0026 Run\n\n```bash\ngit clone https://github.com/Haruhiko-Joe/autoDoc.git\ncd autoDoc\npnpm install\ncd web \u0026\u0026 pnpm install \u0026\u0026 cd ..\n\n# Start both backend (port 3100) and frontend dev server\npnpm start\n```\n\nOpen the frontend, enter a repository path, select language and agent backend configuration, and generation begins.\n\n### Environment Variables\n\n| Variable | Description | Required |\n|----------|-------------|----------|\n| `OPENAI_API_KEY` | OpenAI API key for chat panel and Codex backend | For chat/Codex |\n| `OPENAI_BASE_URL` | Custom OpenAI API endpoint | No |\n| `OPENAI_MODEL` | Model for chat panel (default `gpt-4o`) | No |\n\n### Claude Code Internal Proxy\n\nIf your gateway requires an internal endpoint model (e.g. `ep-...`), launch a local forwarding proxy:\n\n```bash\npnpm proxy:claude:setup -- \\\n  --model ep-xxxxx \\\n  --base-url https://your-gateway.example.com/api/v1 \\\n  --api-key \u003cyour_token\u003e\n```\n\nThen in another terminal:\n\n```bash\nunset ANTHROPIC_AUTH_TOKEN\nexport ANTHROPIC_BASE_URL=http://127.0.0.1:8787/v1\nexport ANTHROPIC_API_KEY=\u003cyour_token\u003e\nclaude --model \"claude-opus-4-6\"\n```\n\n## Tech Stack\n\n| Layer | Stack |\n|-------|-------|\n| Backend | TypeScript, [Claude Agent SDK](https://docs.anthropic.com/en/docs/claude-code), [OpenAI Codex SDK](https://github.com/openai/codex-sdk), Zod |\n| Frontend | Vue 3, TypeScript, AntV G6, Vite |\n| AI Chat | OpenAI API (gpt-4o or custom model) |\n| Monorepo | pnpm workspaces |\n\n## Project Structure\n\n```\nautoDoc/\n├── src/\n│   ├── agents/              # 5 Agents (Claude + Codex dual implementations)\n│   │   ├── scaffold.ts      # Top-level repo analysis (Claude)\n│   │   ├── decomposer.ts    # Recursive module splitting (Claude)\n│   │   ├── writer.ts        # Markdown doc generation (Claude)\n│   │   ├── checker.ts       # Graph structure validation (Claude)\n│   │   ├── claudeflowanalyzer.ts  # Interaction flow analysis (Claude)\n│   │   ├── codex*.ts        # Codex implementations for each Agent\n│   │   ├── instructions/    # Agent prompts (Chinese + English)\n│   │   └── schemas/         # Zod structured output schemas\n│   ├── workflow/\n│   │   └── arranger.ts      # Pipeline orchestration state machine\n│   ├── skill-template/      # Generated Claude Code skill template\n│   ├── claude-proxy.ts      # Claude API internal proxy\n│   └── server.ts            # API server\n├── scripts/\n│   ├── setup-claude-proxy.sh    # Proxy daemon startup script\n│   └── unwrap-md-json.mjs       # Markdown JSON fix utility\n├── web/                     # Vue 3 frontend\n│   ├── src/\n│   │   ├── views/           # GraphPage, DocPage, HomePage, FlowsPage\n│   │   ├── components/      # ChatPanel, etc.\n│   │   ├── composables/     # useTheme, etc.\n│   │   └── services/        # API client\n│   └── doc/                 # Generated documentation output\n├── package.json\n└── pnpm-workspace.yaml\n```\n\n## Utility Scripts\n\n```bash\n# Scan generated Markdown for nested JSON issues (check only)\npnpm docs:scan-md-json\n\n# Auto-fix nested JSON issues\npnpm docs:fix-md-json\n```\n\n## Contributing\n\nIssues and Pull Requests are welcome! If autoDoc helps you, please consider giving it a Star.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharuhiko-joe%2Fautodoc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharuhiko-joe%2Fautodoc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharuhiko-joe%2Fautodoc/lists"}