Update Documentation Gaps

Let AI find what's missing in your docs and fill the gaps automatically


What is it?

Update Documentation Gaps is an AI-powered feature that compares your existing Space documentation against your codebase to discover missing topics. Instead of manually scanning your code for undocumented areas, the AI does it for you — then lets you choose exactly which new sections to generate.

It works on any Space, whether it was created through the Full Tree wizard or built manually from scratch.


How to access it

You'll find the Update documentation gaps button in two places:

  • Space Overview — the green "Update documentation" button on the right
  • Sidebar — the sparkles icon next to the Space name

Note: Only Space editors can see and use this feature.


Step-by-step guide

1. Link a repository (first time only)

If your Space doesn't have a linked repository yet, you'll be prompted to connect one. You have two options:

Use an existing connection

If you've already imported a repository through the Full Tree wizard or Git Connections, it will appear in the Use existing tab. Simply click on it to link it instantly — no re-import needed.

Each card shows:

  • Repository name and provider (GitHub, GitLab, Bitbucket, Azure DevOps)
  • Branch name
  • Last sync date

Create a new connection

Switch to the Create new tab to import a fresh repository:

  1. Select a repository from your connected Git providers
  2. Enter the branch you want to document (e.g., main)
  3. Choose the documentation type that matches your audience:
  4. End user docs
  5. Open source project
  6. Internal technical docs
  7. Internal API documentation
  8. External API documentation
  9. Click Import & Index Repository

The import process takes a few seconds to a few minutes depending on the repository size. You'll see a progress indicator while it works.

Tip: You can link the same repository connection to multiple Spaces. This is useful when you maintain separate docs for different audiences from the same codebase.


2. Analyze your documentation

Once a repository is linked, you'll see the analysis form:

  • What would you like to add? (optional) — Guide the AI by describing what you're looking for. For example: "Add documentation for the new payments module" or "Cover the WebSocket integration."
  • Re-index repository first — Check this if your codebase has changed significantly since the last sync. This takes several minutes but ensures the AI has the latest code.

Click Analyze to start. The AI will:

  1. Reconstruct your existing documentation structure
  2. Scan the full codebase via the indexed repository
  3. Compare the two to identify gaps and missing topics

During analysis, you'll see your current structure displayed as a skeleton with animated placeholders where new sections are being discovered.


3. Review the preview

After analysis, you'll see a Documentation Preview showing your complete structure with proposed changes:

  • Existing sections appear in their normal style with a folder/document icon
  • New sections are highlighted in green with a "New" badge and a checkbox

For each proposed section, you can:

  • Check/uncheck new items to include or exclude them
  • Update existing items — click the pencil icon on any existing section to provide update instructions (e.g., "Add a section about error handling")

Items marked for update will show an "Will update" badge.


4. Split or extend existing sections

Sometimes a single subsection covers multiple features that deserve their own separate pages. The Split / Extend feature lets you reorganize them — either by replacing the original or by adding new pages alongside it.

Starting a split or extend

  1. Click the "Split / Extend" button next to any existing subsection in the preview
  2. You'll see a form with a toggle and a guidance field

Choosing your mode

The "Keep original page (extend)" toggle controls what happens to the original page:

Mode Toggle What happens
Split Off (default) Original page is deleted and replaced by the new focused pages
Extend On Original page is kept, and new pages are created alongside it

Split is best when a bloated page needs to be broken apart into focused topics. Extend is best when a page is fine on its own but you want to add companion pages that go deeper into specific areas.

Getting AI suggestions

  1. Add guidance (optional) — describe how you'd like the pages organized, e.g., "Split by feature: ReadinessSnapshot handles scoring, ReadinessBudgets handles budget tracking"
  2. Click "Suggest" — the AI analyzes the existing content and source code, then proposes new page titles and descriptions
  3. Review and edit — each proposed title is editable. You can rename, add more with the "+ Add" button, or remove any you don't want
  4. Click "Confirm" to save your configuration

After confirming, you'll see a badge on the item:

  • Split mode: "Will split into N sections"
  • Extend mode: "Will extend with N pages"

Updating the original page while extending

When using extend mode, you can also update the original page at the same time. Click the "Update original" button that appears next to the extend badge, then provide instructions for how the original page should change — for example, "Add a summary linking to the new companion pages" or "Remove the detailed API section since it now has its own page."

Both actions happen together when you generate: the original page gets regenerated with your instructions, and the new companion pages are created alongside it.

Tip: If you're unsure whether to split or extend, start with extend. You keep your existing page intact and can always remove it later if the new pages cover everything.


5. Generate selected sections

Once you've reviewed the preview and selected the sections you want:

  1. Click Generate Selected (N) where N is the total count of new + updated + split + extended items
  2. The AI generates content for each selected section using your codebase as context
  3. New pages appear in your Space sidebar automatically
  4. Updated pages are regenerated with your instructions applied
  5. Split sections replace the original with focused individual pages
  6. Extended sections keep the original and add new companion pages alongside it

Unlinking a repository

If you need to switch to a different repository or remove the connection:

  1. Open the Update Documentation Gaps modal
  2. Click Unlink repository (next to the Analyze button)
  3. Confirm the action

After unlinking, you can link a different repository by clicking the button again.


Tips for best results

  • Be specific with requests — The optional text field helps the AI focus. Instead of leaving it empty, try: "Focus on the authentication module and the new REST endpoints."
  • Start broad, then narrow — Run the analysis without a specific request first to see what the AI discovers. Then run it again with targeted requests for specific areas.
  • Review before generating — Uncheck sections that overlap with content you already have or plan to write manually.
  • Use Split for merged topics — If the AI grouped multiple features into one section, split them apart for cleaner, more focused documentation.
  • Use Extend to grow organically — When a page is good but you want more depth on specific subtopics, extend it with companion pages instead of rewriting from scratch.
  • Combine extend with update — When extending, add update instructions on the original page so it references the new companion pages.
  • Re-index after major changes — If you've refactored or added significant new code, check "Re-index repository first" to ensure accurate gap detection.
  • Combine with Repository Sync — Use Update Gaps for major documentation expansions, and Repository Sync for ongoing maintenance of existing pages.

Need help?

Open the in-app chat or email [email protected] — we're happy to guide you.