Open Source Solution: Automatic Documentation Through AI Agent Teams

Open Source Solution: Automatic Documentation Through AI Agent Teams

TLDR: Claude Code Documentation Crew — an open source tool with 6 AI agents that automatically creates technical documentation for local projects and GitHub repositories (with git access). Works through Claude Code CLI configuration files without writing code.

The Problem Every Developer Knows

Picture a scenario familiar to every programmer: a new developer joins the team, gets access to the project, and... despairs. Thousands of lines of uncommented code, architectural decisions whose reasoning was left with their authors, API endpoints whose purpose can only be guessed. The README file, if it exists, contains only installation commands, and the docs folder is silent — documentation simply doesn't exist.

This isn't some horror movie — it's reality for most development projects. According to the Stack Overflow Developer Survey 2025, 68% of developers regularly waste time deciphering undocumented code. The saddest part? Most of this time isn't spent understanding complex algorithms, but figuring out basics: what does this module do, how do components talk to each other, where's the system entry point.

Why Documentation Stays on the "TODO" List

When developers write code, they're deep in problem-solving mode. They're juggling abstractions, handling edge cases, optimizing algorithms. In that moment, the code logic feels obvious — every decision makes perfect sense, every function has a clear purpose. Why document something that's already clear?

But time passes. The same developer returns to the code a month later and discovers that "obvious" logic has become a mystery. And that's just the original author — imagine developers seeing the code for the first time.

Even the most talented technical writers face a fundamental limitation: they can't be inside every developer's head when architectural decisions are made. They work with finished code, trying to reverse-engineer the logic and intentions.

Introducing the New Open Source Project

Meet Claude Code Documentation Crew — an open source tool for automatic technical documentation creation, available on GitHub. The tool solves a problem familiar to every developer: missing documentation in software projects.

The tool has two main use cases: documenting your projects and quickly understanding unfamiliar code (local or GitHub repos with git access). Picture this — point the tool at a codebase and get a structured breakdown of architecture, APIs, and how everything works.

What makes this tool unique is its simplicity: no source code required, just configuration files for Claude Code CLI. Any team can set it up and use it — from startups to enterprises.

The most convincing proof that it works? The tool documented itself. All the tool's technical documentation was created by its agents.

Application in Two Scenarios

Scenario 1: Document Your Own Work

Classic situation: your team built an awesome microservice, but documentation... well, you know how it goes. Run Documentation Crew, point it at the repo, and minutes later you have:

  • README with clear setup and usage instructions
  • Architectural overview with component diagrams
  • Detailed API docs with examples
  • User guides for different audiences

The time savings are massive. Instead of spending days writing docs, just minutes setting up automation.

Scenario 2: Studying Others' Work

An even more interesting case: you need to quickly understand an unfamiliar project. Maybe it's a potential library for your stack, a legacy system you'll need to maintain.

Point the Documentation Crew tool at a repository (local or GitHub), and get structured analysis:

  • Technology stack and key dependencies
  • Architectural patterns and organizational principles
  • System components and their interactions
  • Potential points for functionality extension

This is especially valuable for technical due diligence, onboarding to new projects, and researching best practices.

Features and Limitations

Currently in version 1, the tool doesn't use indexed storage or RAG — agents scan repositories directly. Each agent analyzes the project context independently, which affects cost: with token-based billing, documenting an average project can run up to $10. We recommend starting with smaller projects to gauge scope.

Very large codebases (100,000+ lines) may need additional configuration. Poorly structured code without comments will produce documentation to match.

A Team of Six AI Specialists

What if six world-class experts joined your project, each the best in their field? Picture an architectural analyst who can tear through thousands of lines of code in minutes and spot every design pattern. A technical writer who can adapt any technical information for the right audience. A critic-editor with flawless quality instincts. An API specialist who knows every modern development standard. A visualizer creating professional-grade diagrams. And a security expert who can find vulnerabilities that even experienced developers miss.

That's exactly what Claude Code Documentation Crew represents — six specialized AI agents that take a fundamentally new approach to documentation.

First comes the code-analyst — the team's architectural detective. In minutes, they conduct research that would take a human days. Using a 4-phase methodology (initial discovery → deep analysis → relationship mapping → documentation preparation), they can identify used design patterns even if they're undocumented anywhere, find all entry points, and trace data flow through the system.

Next, the technical-writer joins — master of transformation. They take dry technical data from the analyst and turn it into living, understandable documentation. They have templates for different document types — from README for open source projects to architectural overviews for enterprise systems. They know how to explain complex concepts in simple words without losing accuracy.

The critical-reader performs quality control — the most demanding team member. They apply a 6-phase analysis methodology (initial assessment → technical accuracy check → completeness analysis → logical consistency check → clarity and accessibility assessment → standards compliance check), look for information gaps, assess audience fit, and make binary decisions: APPROVE or REQUIRES_CORRECTION. The tool uses the most powerful models for this agent to ensure maximum quality.

When the tool discovers API endpoints in code, the api-specialist activates. They create not just a list of methods, but full documentation with request examples, response descriptions, status codes, and even generate OpenAPI 3.0 specifications. They understand REST, GraphQL, gRPC, and know best practices for each approach.

The plantuml-diagrammer creates visual magic. They turn architecture into professional diagrams using standard UML notation to create component, class, and sequence diagrams. The tool integrates with the local Kroki service primarily, with a fallback to the external API for SVG diagram generation.

Finally, the security-reviewer ensures security. They analyze code for OWASP Top 10 compliance, look for vulnerability patterns based on the CWE database, conduct threat modeling, and classify found issues by criticality. Most importantly, they don't just find problems but create documentation with practical recommendations for fixing them.

The key innovation here is the source-code-first principle. The team analyzes only actual code, not existing documentation or assumptions. This dramatically increases the chances that documentation matches what the codebase actually does.

How It Works in Practice

Let's trace how this AI expert team works on a real example. Say we have a task management web service — a typical project with REST API, database, and authentication.

It all starts with a simple command: /docs:generate /path/to/your/project. The Documentation Crew asks a few questions about documentation type and target audience, then kicks off an 8-phase generation process.

First steps: analysis and understanding. The code-analyst team gets access to the project directory and begins fundamental research. Like an experienced architect studying a building, they discover the project structure, understand the used technologies, and identify key patterns. Analysis results are saved to a code-analysis.md file in the tool's working directory.

Parallel specialization. The tool spots API endpoints in controllers and fires up the api-specialist. At the same time, analyzing authentication and data handling code, it starts the security-reviewer. These agents work in parallel, each focused on their expertise area.

The API specialist creates structured descriptions of all endpoints with usage examples. Meanwhile, the security expert scans code for potential vulnerabilities and creates security improvement recommendations.

Improvement cycles. Now comes the interesting part — iterative quality improvement. The critical-reader gets all the analysis files and applies their evaluation methodology. They might find that the code-analyst didn't describe the caching implementation in enough detail, or that the security-reviewer missed analyzing important configurations.

If the critical-reader finds critical issues, they create a REQUIRES_CORRECTION report and provide feedback for fixes. The tool allows a maximum of 2 iterations to balance quality with speed.

Final documentation. The technical-writer gets the verified and corrected analysis results and creates the final documentation. They adapt technical information for the target audience, add code examples, and provide practical recommendations.

If diagram generation was requested, the plantuml-diagrammer creates visual architecture schemes. The critical-reader also analyzes the created diagrams and may require rework if they don't clearly show the architecture or contain inaccuracies.

Agent coordination happens through a central coordinator that orchestrates the entire process according to a predefined workflow. The coordinator passes input data to each agent, receives results from them, and directs outputs from some agents to the inputs of others, ensuring sequential execution of all documentation stages.

Users don't just get a README.md file, but comprehensive documentation: an architectural overview with diagrams, detailed API descriptions with examples, security analysis with recommendations, and deployment guides. Most importantly, all this documentation is guaranteed to match the actual code because it's built from it.

Quality First: Beating Hallucinations

In the AI world, hallucinations aren't a psychiatric disorder but a serious technical problem. It's when AI starts "making up" facts instead of analyzing reality. Documentation Crew solves this through several architectural decisions.

Triple Protection from critical-reader

The critical-reader works as a multi-layered quality filter:

Plan review checks documentation structure: is the section sequence logical, is topic coverage sufficient, does the plan match the project's real complexity?

Content review validates factual accuracy: every technical claim gets checked against source code, every example gets tested for correctness.

Style review assesses readability: is the language clear, are there enough examples, any contradictions in terminology?

"Code Only" Principle as Truth Foundation

The key protection against hallucinations is strict adherence to the "source code only" principle. Agents don't use assumptions, don't rely on outdated documentation, and don't "fill in the blanks" on functionality. Only what's present in project files.

This ensures that the documentation accurately describes the codebase as it actually is, rather than as it could theoretically be.

Conclusion: The Future Is Here

Claude Code Documentation Crew demonstrates a practical approach to documentation automation through coordinated specialized agents. The tool's architectural decisions — role specialization, file coordination, iterative quality control — can serve as a foundation for other automated development tools.

The tool's main value is solving a concrete problem: turning missing documentation into structured project descriptions without developer involvement.

The tool is available as an open source solution. You can use the ready-made tool or adapt it for your team's specific needs. Code and configurations are open for study and modification.

For getting started, we recommend testing the tool on smaller projects to assess result quality and documentation generation costs for your project types.

#OpenSource #Documentation #AI #Developer #GitHub #TechnicalWriting #Agentic cc: Fima Katz

To view or add a comment, sign in

Others also viewed

Explore content categories