AI-prompt-powered docs-as-code documentation system for SaaS API teams.
RepoDocs AI gives engineering teams a reusable template library, structured AI prompts, diagram starters, and review guardrails for Markdown-based documentation in GitHub repositories.
If the Pages link is not live yet, finish the last repository setting in docs/public-launch-checklist.md.
Most SaaS teams still document APIs with inconsistent structure, slow manual writing, and low-trust AI drafts that drift away from the source contract.
RepoDocs AI gives engineering teams one repo-native documentation system that combines:
- reusable templates for API, feature, governance, operations, product, and architecture docs
- structured AI prompts for drafting and review
- examples that show the final output shape
- validation scripts for documentation quality and structure
- an optional hosted control plane for automation
If you want to understand RepoDocs AI in under 2 minutes, start with the payments example.
examples/payments-api/ shows a complete Stripe-style API documentation set for a payments platform built from the shipped templates and API-generation prompt.
It includes:
api-overview.mdauthentication.mdcreate-payment.mderror-handling.mdidempotency.mdretrieve-payment.mdrefund-payment.mdwebhooks.mdpayments-openapi.yaml
This is the fastest trust check for the product: it shows what a real documentation system built with RepoDocs AI looks like.
If you want to verify the full adopter flow, run npm run proof:path after install. It bootstraps a docs repo, generates API docs, validates the result, and exports artifacts end to end.
Here is what a single endpoint document looks like when built from the template:
# Endpoint: Create Payment
## Summary
Create a payment for a customer checkout session.
## Endpoint
- Method: `POST`
- URL: `/payments`
## Authentication Requirements
Bearer authentication is required. See `authentication.md` for token handling and scope guidance.
## Request Body
| Field | Type | Required | Description |
| ---------------- | ------ | -------- | ---------------------------------- |
| amount | number | yes | Payment amount in major currency units |
| currency | string | yes | ISO 4217 currency code |
| customer_id | string | yes | Unique customer identifier |
| payment_method_id| string | no | Saved payment method identifier |
## Request Example
curl -X POST "https://api.example.com/v1/payments" \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{"amount":125.5,"currency":"USD","customer_id":"cus_123"}'
## Response Example
{ "payment_id": "pay_123", "status": "pending", "amount": 125.5, "currency": "USD" }
## Error Codes
| Code | Description |
| ---- | ------------------------- |
| 400 | Invalid payment request |
| 401 | Unauthorized |
| 409 | Duplicate payment submission |The full output is in examples/payments-api/create-payment.md.
flowchart LR
A([OpenAPI spec\nor blank template]) --> B[AI prompt\ngenerates draft]
B --> C[SME review\nand edit]
C --> D{npm run validate}
D -->|frontmatter ✓\nstructure ✓\nquality ✓\nOpenAPI ✓| E[Merge to main]
D -->|gap found| C
E --> F([Published docs\non GitHub Pages])
Running npm run validate on this repository:
$ npm run validate
✓ validate:frontmatter Validated frontmatter for 39 Markdown files.
✓ validate:structure Validated 108 required project files.
✓ validate:quality Validated documentation quality for 38 Markdown files. MERGE-SAFE and PUBLICATION-READY.
✓ validate:openapi Validated 17 Markdown files against OpenAPI examples.
✓ validate:versions Validated version compatibility for 24 Markdown files.
✓ lint:markdown 0 linting errors.
Running npm test:
$ npm test
✓ tests/validate-frontmatter.test.mjs (18 tests)
✓ tests/agent-workflow.test.mjs (30 tests)
✓ tests/validate-structure.test.mjs (81 tests)
✓ tests/prompt-library.test.mjs (31 tests)
✓ tests/example-docs.test.mjs (25 tests)
✓ tests/generate-openapi-docs.test.mjs (7 tests)
Test Files 6 passed (6)
Tests 192 passed (192)
Duration 3.03s
This is the fastest way to use RepoDocs AI as a developer adopting it into a real documentation repository.
- Clone RepoDocs AI.
- Copy the starter assets into your new docs repository.
- Start documenting APIs.
On bash:
git clone https://github.com/SulagnaSasmal/repodocs-ai.git
mkdir company-docs
cp -R repodocs-ai/templates company-docs/
cp -R repodocs-ai/prompts company-docs/
cp -R repodocs-ai/diagrams company-docs/On Windows PowerShell:
git clone https://github.com/SulagnaSasmal/repodocs-ai.git
New-Item -ItemType Directory -Name company-docs
Copy-Item repodocs-ai\templates -Destination company-docs\ -Recurse
Copy-Item repodocs-ai\prompts -Destination company-docs\ -Recurse
Copy-Item repodocs-ai\diagrams -Destination company-docs\ -RecurseOr use the one-command bootstrap from inside the cloned repo:
Requires Node.js 20 or later. Check with
node --versionbefore running.
git clone https://github.com/SulagnaSasmal/repodocs-ai.git
cd repodocs-ai
npm install
npm run bootstrap:docs-repo -- ../company-docsTo include the payments example set as a starting reference, add --with-examples:
npm run bootstrap:docs-repo -- ../company-docs --with-examplesOnce you have a bootstrapped repo and an OpenAPI spec, generate endpoint documentation in one command (run from inside the repodocs-ai clone):
node scripts/generate-openapi-docs.mjs ../company-docs/openapi/my-api.yaml ../company-docs/generated/my-apiThis produces a generated/my-api/ directory in your docs repo containing:
api-overview.md— service overview with authentication, base URL, and versioningendpoints/— one Markdown file per endpoint, fully structured and ready for SME review
Then open prompts/review/documentation-review.md with an AI tool to review each generated doc against the source spec before merging.
For hand-authored endpoint docs, start with:
templates/api/for API documentationtemplates/features/for feature documentationtemplates/governance/for review and quality guardrailsprompts/for AI-assisted drafting and review
RepoDocs AI is a developer product for teams that want to stand up a serious documentation repository quickly.
It is not just a folder of Markdown templates. It includes:
- reusable templates for API, feature, governance, operations, product, and architecture docs
- prompt packs for AI drafting and review
- examples that show the system in practice
- validation scripts for documentation quality and structure
- an optional hosted control plane for automation
Use RepoDocs AI as the starting kit for your own documentation repository.
The shortest path is:
- Create a docs repository for your company or product.
- Copy the RepoDocs AI template packs into that repository.
- Use the prompts to draft and review content.
- Start documenting your APIs and features.
- Run validation before publishing.
RepoDocs AI is designed to be cloned and used directly — not installed from npm. The "private": true flag in package.json reflects this: it prevents accidental publishing and keeps the focus on the repository as the install surface.
If you want to evaluate RepoDocs AI itself, clone this repository, install dependencies, and run the validation suite.
If you want to adopt RepoDocs AI into your own docs repository, use the Quick Start below.
Start here if you are evaluating the product:
docs/installation.mdfor the 5-minute install pathdocs/product-guide.mdfor product positioning and fitdocs/testing-strategy.mdfor a practical app-testing stack to pair with RepoDocs AIdocs/public-launch-checklist.mdfor the final Pages and launch checksdocs/community-feedback-discussion.mdfor the pinned feedback discussion copydocs/design-partner-intake.mdfor the design-partner intake questionsdocs/index.mdfor the source docs hubsite/installation.htmlfor the published quickstart page
The repository currently implements the Phase 1 and Phase 2 foundation of the product, plus a baseline of Phase 3 automation:
- product specification and scope definition
- metadata and validation system
- product documentation templates
- API documentation templates
- AI prompt packs for generation and review
- example documentation sets
- Phase 3 validation and publishing automation
- OpenAPI-assisted document generation scaffold
- static landing and docs site for product presentation
Version 1 focuses on:
- API documentation
- feature documentation
- documentation governance
- Markdown-first repository workflows
The repository should be installable in under 5 minutes for a developer evaluating the system.
- Clone the repository.
- Run
npm install. - Run
npm run validateto verify the template packs, prompts, examples, and docs structure. - Run
npm run proof:pathto verify the end-to-end bootstrap, generation, validation, and export path. - Open
docs/index.mdfor the source documentation hub orsite/index.htmlfor the published product walkthrough. - Use the Quick Start section above if your goal is to create your own documentation repository from these assets.
If you want to exercise the optional live AI review path rather than prompt-only generation, install dependencies, set an Anthropic API key, and run the documentation agent:
npm install
export ANTHROPIC_API_KEY=<your-key>
npm run agent:runOn Windows PowerShell:
npm install
$env:ANTHROPIC_API_KEY = '<your-key>'
npm run agent:runWithout ANTHROPIC_API_KEY, the agent still runs generation and validation, but records that live AI review was skipped.
For the optional hosted automation runtime:
- Set
REPODOCS_CONTROL_PLANE_BOOTSTRAP_KEY. - Run
npm run control-plane:stack:smoke. - Confirm the Redis-backed control plane and admin flow pass the smoke test.
- Treat the hosted control plane as an evaluation and internal automation surface, not an enterprise platform. Enterprise features such as external identity, tenancy isolation, audit logging, and broader operational controls are still roadmap items.
repodocs-ai/
├── README.md
├── LICENSE
├── CHANGELOG.md
├── CONTRIBUTING.md
├── CODE_OF_CONDUCT.md
├── .github/
├── docs/
│ ├── index.md
│ ├── installation.md
│ └── product-guide.md
├── diagrams/
├── examples/
├── prompts/
├── templates/
│ ├── api/
│ ├── features/
│ └── governance/
├── site/
└── scripts/
Product-facing entry points inside docs/:
docs/index.mddocs/product-guide.mddocs/installation.mddocs/market-validation.mddocs/developer-experience-scorecard.mddocs/ready-to-install-system.mddocs/product-specification.md
Trust and contribution files at the repository root:
CHANGELOG.mdCONTRIBUTING.mdCODE_OF_CONDUCT.md
- Templates are modular and reusable.
- Every template includes AI-ready generation or review guidance.
- Documentation is designed for repository workflows, not isolated files.
- Review quality is enforced through structured validation.
- API overview
- endpoint template
- product overview
- feature documentation
- user guide
- administrator guide
- feature overview
- user workflow documentation
- review checklist
- quality validation guidance
- runbook
- deployment guide
- system architecture
- integration architecture
- frontmatter validation for templates and examples
- repository structure validation
- documentation quality validation for examples and generated output
- schema-aware OpenAPI validation for endpoint examples
- request-body validation against OpenAPI request schemas
- version-compatibility validation for API docs and examples
- deprecation and migration validation for versioned endpoint docs
- Markdown linting
- OpenAPI-to-Markdown generation script
- automatic regeneration workflow for changed OpenAPI specs
- runnable documentation-agent orchestration for OpenAPI sources
- runnable analytics report generation for repository coverage and freshness
- runnable knowledge-graph generation from frontmatter, dependencies, and endpoints
- export pipelines for Confluence, Google Docs, Notion, and PDF-ready artifacts
- small hosted control plane for running automation over HTTP
- per-user API-key and bearer-token authentication for control-plane endpoints
- Redis-backed durable queued execution so multiple automation requests can be accepted safely across restarts and workers
- container packaging for hosted control-plane deployment
- hosted deployment manifest for Render with persistent disk configuration
- hosted deployment manifests for Fly.io and Azure Container Apps
- pull request validation workflow
- GitHub Pages deployment workflow
- MkDocs starter integration
- Docusaurus starter integration
- GitBook starter integration
- Next.js docs starter integration
- Start from a template in
templates/. - Add required frontmatter from
schema/metadata-frontmatter.md. - Use a matching prompt from
prompts/to draft content with an AI assistant. - Validate the result against the checklists in
validation/. - Commit the documentation into the product repository and review it through pull requests.
If you want the repository to feel like a clean developer product, use these entry points first:
README.mdfor the top-level promise and install pathdocs/index.mdfor the source docs hubtemplates/README.mdfor the template packsprompts/README.mdfor AI prompt packsexamples/README.mdfor working reference systemsdiagrams/README.mdfor visual starters
- product specification stored in
docs/ - repository structure established
- metadata schema defined
- validation and review guardrails added
- product documentation template pack added
- API documentation template pack added
- prompt packs added for authoring and review
- example documentation added
- validation scripts added for frontmatter and repository structure
- OpenAPI generation script and manual workflow added
- schema-aware OpenAPI example validation added
- request-body schema validation added
- automatic regeneration workflow added for changed OpenAPI specs
- GitHub Actions added for pull request checks
- static landing and docs pages added under
site/ - GitHub Pages deployment workflow added
- add more template packs for operations and architecture
- add OpenAPI-to-template generation workflows
- expand quality checks to cover example payload validation
The repository now includes starter packs for both MkDocs and Docusaurus, plus an end-to-end sample under examples/complete-system/.
The repository also includes GitBook and Next.js starter packs, GitLab and Bitbucket support assets, pricing and bundle manifests, and runnable repository automation for documentation agents, knowledge graph indexing, and analytics.
Yes. RepoDocs AI already includes a lightweight static UI in site/ for GitHub Pages deployment. It covers the landing page, roadmap, automation summary, and complete-system walkthrough.
npm run validatenpm run agent:runnpm run analytics:reportnpm run graph:buildnpm run automation:runnpm run exportnpm run export:notion
See docs/roadmap-spec-summary.md for a direct map between the specification, roadmap, current phase coverage, and remaining gaps.
For the published Pages version, open sulagnasasmal.github.io/repodocs-ai/spec-summary.html (live once GitHub Pages is enabled in repository settings).
See docs/spec-scorecard.md for a strict 17-section scorecard against the attached specification.
If you are evaluating RepoDocs AI on a real spec or want to help shape the product:
- open a GitHub Discussion using
docs/community-feedback-discussion.md - file the
Docs Generated From My Specissue form in GitHub Issues - use
docs/design-partner-intake.mdto start design-partner outreach
RepoDocs AI is designed for:
- startup CTOs
- heads of engineering
- developer relations leads
- technical writers in API-first SaaS teams
The optional hosted control plane enables running automation over HTTP with Redis-backed durable queued execution. It is not required for using the template and prompt system.
npm run control-plane:startnpm run control-plane:smokenpm run control-plane:stack:upnpm run control-plane:stack:smokenpm run control-plane:stack:downnpm run docker:control-plane:buildnpm run docker:control-plane:run
REPODOCS_CONTROL_PLANE_HOSTREPODOCS_CONTROL_PLANE_PORTREDIS_URLREPODOCS_CONTROL_PLANE_DATA_DIRREPODOCS_CONTROL_PLANE_BOOTSTRAP_USERREPODOCS_CONTROL_PLANE_BOOTSTRAP_DISPLAY_NAMEREPODOCS_CONTROL_PLANE_BOOTSTRAP_KEY
The control plane stores queue state, run metadata, and user/key records in Redis so multiple app instances can safely accept and process jobs against shared state. The legacy .control-plane/*.json files are only used as a one-time migration source when Redis starts empty.
For local development, the repository includes a compose.yaml stack that runs Redis and the control plane together. Both services publish Docker health checks, so docker compose ps shows when Redis is ready and when the control plane is answering /health. Set REPODOCS_CONTROL_PLANE_BOOTSTRAP_KEY in your shell or environment, then run npm run control-plane:stack:up.
To run a repeatable end-to-end verification against a live stack, use npm run control-plane:smoke. To boot the compose stack and run the smoke test in one step, use npm run control-plane:stack:smoke.
GET /usersfor admin user inventoryPOST /usersto create a user and initial keyPATCH /users/:idto update role, display name, or statusPOST /users/:id/keysto rotate or add a user keyDELETE /users/:id/keys/:keyIdto revoke a key
render.yamlfly.tomlazure-container-apps.yaml