Skip to main content

Mintlify Autopilot Setup

Mintlify Autopilot keeps documentation accurate by monitoring your codebase, detecting user-facing changes, and proposing updates the moment you ship.

What Autopilot Does

  1. Detects code changes that require documentation updates
  2. Surfaces updates in the Mintlify dashboard with PR context
  3. Generates documentation drafts with full codebase awareness

Setup Steps

1. Connect Repository to Mintlify

  1. Go to Mintlify Dashboard
  2. Click SettingsIntegrationsGitHub
  3. Install the Mintlify GitHub App on Sanctiv/sanctiv-app
  4. Grant access to the repository

2. Enable Autopilot

  1. In Mintlify Dashboard, go to SettingsAutopilot
  2. Toggle Enable Autopilot to ON
  3. Select repositories to monitor: sanctiv-app

3. Configure Monitoring Directories

Tell Autopilot which directories contain code that impacts documentation:
DirectoryWhat to Monitor
apps/mobile/src/Mobile app components, screens, hooks
packages/Shared packages (ai, supabase, shared)
supabase/functions/Edge functions and migrations
supabase/migrations/Database schema changes

4. Verify GitHub Action

The .github/workflows/mintlify.yml workflow:
  • Validates documentation on every PR
  • Detects code changes that may need doc updates
  • Triggers Mintlify Autopilot analysis on merge to main

Using Autopilot

When You Ship Code

  1. Create a PR with code changes
  2. Autopilot analyzes if docs need updates
  3. Check Mintlify DashboardAgent Panel for suggestions
  4. Review and approve/edit suggested changes
  5. Generate a PR with documentation updates

Example Workflow

Developer ships voice-journaling feature

Autopilot detects changes in apps/mobile/src/hooks/useAudioRecorder.ts

Autopilot suggests updating docs/features/VOICE_JOURNALING_DESIGN.md

Developer reviews draft, makes edits, creates PR

Documentation stays in sync with code

Local Development

Preview Docs Locally

# From project root
pnpm docs:dev

# Opens at http://localhost:3333
pnpm docs:check

Best Practices

  1. Write clear commit messages - Autopilot uses them for context
  2. Keep docs close to code - Feature docs in docs/features/
  3. Use descriptive file names - Helps Autopilot match code to docs
  4. Review Autopilot suggestions - AI drafts need human polish

Troubleshooting

Autopilot Not Detecting Changes

  1. Verify GitHub App is installed and has repo access
  2. Check that Autopilot is enabled in dashboard settings
  3. Ensure the changed directory is in the monitoring list

Docs Not Deploying

  1. Check GitHub Actions for mintlify.yml workflow status
  2. Verify docs/mint.json is valid JSON
  3. Check Mintlify dashboard for deployment errors

Resources