Skip to main content
Microsoft Foundry

Codebase Documentation Generator

Description

What this agent manifest does

Autonomous repo documentation — READMEs, module docs, and architecture summaries from real code analysis.

Build an agent that analyzes a GitHub repository and generates review-ready documentation: a project-level README, module-level docs for each major directory, and an architecture summary mapping component relationships. The agent reads repo structure and source via GitHub, uses code interpreter to parse imports, function signatures, and class hierarchies, builds a dependency map, and generates documentation from what it actually finds in the code — not from assumptions about what the code should do.

This is an autonomous analysis → generation → self-review pattern using markdown-header prompt structure. What makes it distinctive is the self-review step: before delivering, the agent validates its own output — every documented function exists in the repo, module names match real directories, no placeholder text remains. The prompt draws a hard line between describing what code does (acceptable) and assuming why it does it (not). Because it runs autonomously and produces code-adjacent artifacts, the output is a draft to review before committing. Edge cases cover empty repos, multi-language codebases, and conflicts between existing docs and actual code.

This pattern applies anywhere an agent analyzes a complex system, generates structured documentation, and validates its own output before delivery. Common scenarios for this pattern:

  • API reference generation from source
  • Infrastructure documentation from configuration files
  • Data-pipeline documentation from DAG definitions
  • Onboarding guides generated from repo structure
  • Architecture notes from code patterns

The tools it uses

This manifest uses: GitHub, code interpreter

Use this agent manifest to understand

How to build autonomous agents using markdown headers prompt structure for documentation files output.

License

This agent manifest is sample code subject to Azure's licensing terms for Distributable Code under the Universal License Terms for Online Services .

Disclaimer

IMPORTANT! This manifest is for educational and experimentation purposes. Resulting agents are not production ready. Review all provided resources and carefully test agent behavior in the context of your use case. Agents you create may be subject to legal and regulatory requirements, may require licenses, or may not be suitable for all industries, scenarios, or use cases. By using any manifest, you are acknowledging that resulting agents and other output are solely your responsibility, and that you will comply with all applicable laws, regulations, and relevant safety standards, terms of service, and codes of conduct. Learn more .