Autodocs

Keep your project documentation up-to-date automatically. Autodocs prompts the AI to maintain documentation alongside your code, ensuring your project stays well-documented as it evolves.

Written By Nick Gatzoulis

Last updated 4 months ago

What is Autodocs?

Autodocs is an automation feature that guides the AI to maintain project documentation as it writes code. When enabled, every code generation task includes instructions to update relevant documentation.

Why use Autodocs:

  • Stay current: Documentation updates automatically as your code changes

  • Save effort: No need to manually sync docs after each feature

  • Onboard faster: New team members find up-to-date project documentation

  • Maintain context: The AI references your docs to make better code decisions

  • Track decisions: Document architectural choices as you make them

What Autodocs manages: All Markdown files in your project's /docs/ directory, including:

  • Architecture overviews

  • API documentation

  • Setup guides

  • Feature specifications

  • Design decisions

  • Troubleshooting guides

How Autodocs works

When Autodocs is enabled, App2 modifies how it sends prompts to the AI.

The workflow:

  1. You send a prompt in Build mode

  2. App2 prepends special instructions to your prompt

  3. These instructions tell the AI to:

    • Update existing docs in /docs/ if the task warrants it

    • Create at most one new doc if absolutely necessary

    • Skip documentation work if the task is unrelated

  4. The AI writes code and updates docs in a single operation

  5. Changes commit to your GitHub repository

Smart behavior:

  • The AI only touches docs when relevant to your prompt

  • Updates focus on existing docs rather than creating new ones

  • New docs are created sparingly and only when needed

  • Documentation follows your existing structure and style

Credit usage: Enabling Autodocs may consume additional credits or LLM tokens because the AI performs documentation work alongside code generation.

Managing the Autodocs toggle

Control whether the AI automatically maintains documentation.

Enabling Autodocs

Steps:

  1. Open your project in App2

  2. Click Settings in the top navigation

  3. Select Docs Manager from the settings menu

  4. Find the Autodocs automation section at the top

  5. Toggle the switch to enabled

What happens:

  • Future prompts include autodocs instructions

  • The AI updates relevant docs during code generation

  • May consume more credits per prompt

Disabling Autodocs

Steps:

  1. Go to Settings β†’ Docs

  2. Toggle the Autodocs enabled switch to off

What happens:

  • Prompts no longer include autodocs instructions

  • The AI focuses solely on code generation

  • Your existing docs remain accessible and editable

  • Manual doc management still works through the Docs panel

When to disable:

  • You're doing rapid prototyping and want to skip docs temporarily

  • You prefer to update documentation manually

  • You want to minimize credit consumption

  • You're working on experimental features

Tip: Leave Autodocs enabled for production work. Disable it temporarily for experiments.

Managing documentation

Use the Docs settings panel to view and edit your project's documentation files.

Accessing the Docs panel

How to open:

  1. Open your project in App2

  2. Click Settings in the top navigation

  3. Select Docs from the settings menu

  4. View all documentation in the tree view

What you'll see:

  • Left panel: Tree view of all files in /docs/

  • Right panel: Markdown editor with Edit/Preview tabs

  • Actions: New Doc, Save, Delete buttons

Note: Docs are only editable when your project status is READY or FAILED.

Viewing a document

Steps:

  1. Open Settings β†’ Docs

  2. Expand folders in the tree to browse docs

  3. Click a document file to view its content

  4. Switch between Edit and Preview tabs

The Preview tab renders your Markdown so you can see formatting.

Creating a new document

Steps:

  1. Click New Doc button (top right)

  2. Enter an optional folder path:

    • Leave empty to save in root: /docs/

    • Use subfolders: api, guides, architecture, etc.

  3. Enter filename (automatically adds .md extension)

  4. Review the resulting path

  5. Click Continue

  6. Write your document content in Markdown

  7. Click Save

Example paths:

  • docs/README.md - Project overview in root

  • docs/api/endpoints.md - API documentation

  • docs/guides/setup.md - Setup instructions

  • docs/architecture/database-schema.md - Technical specs

Naming tips:

  • Use descriptive names: authentication-flow.md, not doc1.md

  • Use kebab-case: user-management.md

  • Group related docs in folders: api/, guides/, features/

  • Match your team's existing structure

Editing a document

Steps:

  1. Select the document from the tree view

  2. Modify content in the Edit tab

  3. Preview changes in the Preview tab

  4. Click Save when finished

  5. Changes commit automatically to GitHub

Editing tips:

  • Use GitHub Flavored Markdown (GFM)

  • Include code blocks with language hints: ```typescript

  • Add tables for structured data

  • Use headings to organize sections

  • Link to other docs with relative paths

Deleting a document

Steps:

  1. Select the document in the tree

  2. Click Delete button

  3. Confirm deletion

  4. File is removed from your repository

Warning: Deletion cannot be undone. The file is permanently removed from your GitHub repository.

Referencing docs in prompts

Link the AI to your documentation for better context and decisions.

How to reference: Use @docs/filename syntax in your prompts.

Examples:

  • "Follow the patterns described in @docs/architecture/coding-standards.md"

  • "Update @docs/api/user-endpoints.md with the new endpoint"

  • "Reference @docs/guides/supabase-setup.md for database conventions"

Why reference docs:

  • Provides context the AI might not have

  • Ensures consistency with documented patterns

  • Helps the AI make informed architectural decisions

  • Keeps documentation as the source of truth

Best practices

Create documentation that stays useful as your project grows.

Structure your docs folder

Organize by concern:

docs/
  README.md                  # Project overview
  CONTRIBUTING.md            # Contribution guidelines
  api/
    authentication.md        # Auth endpoints
    users.md                 # User management API
    posts.md                 # Posts API
  guides/
    setup.md                 # Initial setup
    deployment.md            # Deployment guide
    troubleshooting.md       # Common issues
  architecture/
    database-schema.md       # Database design
    folder-structure.md      # Code organization
    state-management.md      # State patterns
  features/
    user-profiles.md         # User profile feature
    notifications.md         # Notifications system

Benefits:

  • Easy to find relevant docs

  • Clear separation of concerns

  • Scales as project grows

  • New team members navigate easily

Write clear, scannable docs

Use consistent structure:

# Feature Name

Brief overview of what this feature does and why it exists.

## Overview

Detailed description of the feature.

## Architecture

How it's built, key components, data flow.

## API

Endpoints, request/response formats, authentication.

## Examples

Code examples showing common use cases.

## Testing

How to test this feature.

## Troubleshooting

Common issues and solutions.

Keep it actionable:

  • Start with what the reader will learn

  • Use headings to break up content

  • Include code examples

  • Add troubleshooting sections

  • Link to related docs

Document as you build

Create docs during feature development:

  1. Start feature: Create initial doc outlining approach

  2. During implementation: Update doc with architectural decisions

  3. After testing: Add examples and edge cases

  4. Before review: Document any gotchas or limitations

What to document:

  • Why decisions were made (not just what was done)

  • How components interact with each other

  • When to use different patterns

  • Where to find related code

  • What edge cases to watch for

Keep docs focused

One doc, one topic:

  • authentication.md - Auth flows, tokens, sessions

  • database-schema.md - Tables, relationships, migrations

  • api-conventions.md - REST patterns, error handling

  • deployment.md - Build process, environment setup

Avoid:

  • Giant README files covering everything

  • Mixing unrelated topics in one doc

  • Duplicating information across multiple docs

  • Writing docs that immediately become outdated

Related