Home - Chris-Cullins/wiki_bot GitHub Wiki

Home

Project Snapshot

Wiki Bot automates end-to-end GitHub wiki creation for codebases by orchestrating repository analysis, prompt-driven drafting, and publishing workflows. The TypeScript/Node.js application leans on the Anthropic Claude Agent SDK (or CLI fallbacks) to mine architecture insights and stream polished documentation. Its modular pipeline keeps prompts, templates, and storage concerns cleanly separated for reuse across projects.

Key Features

  • Repository crawler builds an ignore-aware FileNode tree so prompts only reference meaningful source assets.
  • Prompt loader and templates compose consistent Markdown briefs for home, architecture, and area-specific pages.
  • Wiki generator coordinates Claude interactions, result normalization, and page regeneration depth controls.
  • GitHub wiki writer optionally clones, cleans, and pushes markdown updates with configurable modes.
  • CLI supports selective regeneration, documentation depth overrides, and verbose debug or transcript logging.

Architecture Highlights

  • Stateless pipeline orchestrated by WikiGenerator calls Claude via pluggable providers while RepoCrawler supplies hierarchical context.
  • GitHub integration (GitRepositoryManager, GitHubWikiWriter) encapsulates wiki checkout, sidebar generation, and commit/push lifecycles.

Important Directories

  • src/: Core runtime including the CLI entrypoint, configuration, crawler, and wiki generation orchestration.
  • src/github/: Git repository helpers and wiki writer responsible for cloning, cleaning, and publishing markdown pages.
  • src/prompts/: Markdown prompt templates for each documentation task (home, architecture, area extraction, updates).
  • src/templates/: Rendered Markdown skeletons used to wrap Claude output with consistent layout and headings.
  • .claude/: Local agent SDK configuration such as settings.local.json for authentication and runtime defaults.
  • backlog/: Project TODOs and roadmap items that guide future automation phases.

Getting Started

Prerequisites

  • Node.js 18+ and npm
  • Anthropic API key (ANTHROPIC_AUTH_TOKEN or ANTHROPIC_API_KEY) unless using CLI providers
  • Optional: Claude CLI or Codex CLI binaries if selecting those providers
  • Git credentials with access to the target repository and wiki (for publishing)

Setup

  1. Clone the repository, enter the project directory, and install dependencies with npm install.
  2. Copy .env.example to .env, then populate API credentials, repository paths, and provider overrides as needed.
  3. Compile and validate the project with npm run build followed by npm run type-check; start iterative runs with npm run dev or production mode via npm start.

Documentation Links

  • Architecture – High-level system intent, workflow phases, and long-term documentation goals.
  • Agents – Guidance on integrating Anthropic agents, workflows, and operational best practices for this bot.