AI Agent Guide: Creating New Documentation
When to create: Feature gaps, user confusion, missing tutorials, new functionality.
When to Create New Documentation
Documentation Gaps to Fill
| Gap Type | Example | Priority |
|---|
| Feature exists but no docs | New playlist feature undocumented | High |
| User confusion reported | Support tickets about same process | High |
| Complex workflow | Multi-step producer onboarding | Medium |
| Reference needed | API endpoint undocumented | Medium |
| Best practices | Optimizing track uploads | Low |
Before Creating: Check if Doc Already Exists
# Search existing documentation
grep -r "featureName" Documentation/help/ --include="*.mdx"
# Check if topic is covered in related docs
grep -r "topicKeyword" Documentation/help/[section]/ --include="*.mdx"
# Look for index pages that might cover it
cat Documentation/help/[section]/index.mdx | grep -i "topic"
Don’t duplicate: If topic exists, update existing doc rather than creating new one.
The New Documentation Process
Step 1: Research and Discovery
A. Understand the Feature
Questions to answer:
- What does this feature do?
- Who is it for? (audience)
- How do users access it? (navigation)
- What are the prerequisites?
- What are the common use cases?
- What are the limitations or edge cases?
Research sources:
# UI components
grep -r "FeatureName" resources/client/ --include="*.tsx"
# Backend logic
grep -r "FeatureName" app/ --include="*.php"
# Routes
grep -r "feature-route" routes/ --include="*.php"
# Database
grep -r "feature_table" database/migrations/ --include="*.php"
B. Verify Navigation Paths
Critical: Document the actual user journey, not assumed paths.
# Check menu items
php artisan tinker --execute="$menus = json_decode(\DB::table('settings')->where('name', 'menus')->first()->value, true); foreach($menus as $menu) { if (in_array('auth-dropdown', $menu['positions'] ?? [])) { foreach($menu['items'] as $item) { echo $item['label'] . ' → ' . $item['action'] . PHP_EOL; } } }"
# Check specific UI components
cat resources/client/web-player/[feature]/[component].tsx | grep -E "(button|label|title)"
Trace the full path:
- Starting point (e.g., profile menu)
- Intermediate steps (if any)
- Final destination
- Available actions on that page
Find connections:
# What docs might link to this?
grep -r "relatedTopic" Documentation/help/ --include="*.mdx" -l
# What will this doc link to?
grep -r "prerequisiteFeature" Documentation/help/ --include="*.mdx" -l
Plan cross-links:
- Parent/child relationships
- Before/after dependencies
- Related features
- Prerequisite knowledge
Step 2: Determine Documentation Type
| Type | Purpose | Structure |
|---|
| Overview | Introduce feature area | What, why, who, where |
| How-to | Step-by-step guide | Prerequisites, steps, outcomes |
| Reference | Technical details | Tables, specifications, lists |
| Tutorial | Learn by doing | Context, steps, verification |
| FAQ | Common questions | Q&A format |
| Concept | Explain ideas | Explanations, analogies |
Step 3: Choose Location and Filename
Folder Structure
Documentation/help/
├── [section]/ # e.g., billing, account-settings
│ ├── index.mdx # Section overview
│ └── [specific-topic].mdx # Individual pages
Naming Conventions
| Type | Pattern | Example |
|---|
| Overview | index.mdx | billing/index.mdx |
| How-to | action-topic.mdx | cancelling-subscription.mdx |
| Reference | topic-reference.mdx | metrics-glossary.mdx |
| Subtopic | parent/child.mdx | password/changing-password.mdx |
Rules:
- Use lowercase with hyphens
- Be descriptive but concise
- Match URL structure to content hierarchy
- Group related topics in subfolders
Step 4: Create Frontmatter
Required fields:
---
audience: help
title: "Descriptive Page Title"
sidebarTitle: "Short Title" # If different from title
description: "One-line summary for SEO and previews."
---
Audience values:
help — General user documentation
developers — API/technical docs
admins — Admin panel documentation
Title guidelines:
- 40-60 characters ideal
- Include key feature name
- Action-oriented for how-tos
- Descriptive for reference
Description guidelines:
- 120-160 characters ideal
- Include key search terms
- Explain what user will learn
- Active voice
Step 4.5: Check for Applicable Snippets
Before writing any content, check if reusable snippets already exist for common patterns:
# List all available snippets
ls Documentation/snippets/callouts/ Documentation/snippets/warnings/ Documentation/snippets/sections/
Check the snippet for each pattern:
| If your page needs… | Use this snippet |
|---|
| Platform fee explanation | import PlatformFee from "/snippets/callouts/platform-fee.mdx"; |
| ”Need Help?” footer section | import NeedHelp from "/snippets/sections/need-help.mdx"; |
| ”Still Need Help?” with steps | import StillNeedHelp from "/snippets/sections/still-need-help.mdx"; |
| Inline support contact line | import SupportContact from "/snippets/sections/support-contact.mdx"; |
| Paid plan required notice | import SubscriptionRequired from "/snippets/callouts/subscription-required.mdx"; |
| Stripe Connect required notice | import StripeConnectRequired from "/snippets/callouts/stripe-connect-required.mdx"; |
| Producer-only feature notice | import ProducerOnly from "/snippets/warnings/producer-only.mdx"; |
| API invite-only warning | import ApiInviteOnly from "/snippets/warnings/api-invite-only.mdx"; |
| Plan comparison table | import PlanComparisonTable from "/snippets/data/plan-comparison-table.mdx"; |
Rule: Never write inline content that duplicates an existing snippet. Always import the snippet instead.
See Mintlify Reference — Reusable Snippets for the full list and usage details.
Step 5: Structure Content
Standard Page Structure
---
audience: help
title: "Page Title"
description: "Brief description for SEO."
---
import NeedHelp from "/snippets/sections/need-help.mdx";
import PlatformFee from "/snippets/callouts/platform-fee.mdx";
# Page Title
Brief introduction (1-2 sentences explaining what this covers).
## Prerequisites (if any)
- Required plan/permission
- Previous setup needed
- Knowledge requirements
## Main Content Sections
### Section 1: Getting There
Navigation instructions with exact UI labels.
### Section 2: Using the Feature
Step-by-step instructions.
<PlatformFee /> {/* Use snippets for common callouts */}
### Section 3: Understanding Results
What to expect, how to verify success.
## Common Issues (optional)
<AccordionGroup>
<Accordion title="Issue 1">
Solution...
</Accordion>
</AccordionGroup>
<NeedHelp /> {/* Use snippet for standardized support footer */}
## Related
- [Related topic](/help/path)
- [Next step](/help/path)
Content Section Guidelines
| Section | Purpose | Length |
|---|
| Introduction | Context and preview | 2-3 sentences |
| Prerequisites | What you need first | Bullet list |
| Steps | How to do it | Numbered, 3-7 items |
| Explanation | Why it works | 1-2 short paragraphs |
| Examples | See it in action | 1-2 concrete examples |
| Troubleshooting | Fix problems | Accordion format |
| Related | Where to go next | 3-5 links |
Step 6: Write Content
For every claim:
- State what you found in codebase
- Use exact UI labels
- Provide specific numbers
- Link to related verified docs
Example:
To manage your subscription, click your **profile avatar** in the top navigation bar, then select **Billing**.
The **Current plan** section shows your active subscription. Click **Change plan** to switch plans.
NOT:
Go to Settings → Subscription to manage your plan.
Click the Change Plan button.
Cross-Link Strategically
Link when:
- Mentioning a related feature
- Referencing a prerequisite
- Suggesting next steps
- Providing alternatives
Format:
Before continuing, ensure you've [set up your producer profile](/help/producer-program/after-approval).
See also: [Managing your tracks](/help/producer-dashboard/tracks)
Always root-relative: /help/path not ../path
Step 7: Add Mintlify Components
Approved Components for Documentation
Use for:
- Cards — Related documentation, feature highlights
- CardGroup — Multiple related links
- Steps — Numbered instructions
- Accordion/AccordionGroup — FAQs, troubleshooting
- Callouts (Info, Warning, Tip, Note) — Important notices
- Tables — Reference data, comparisons
- Badges — Status indicators
- Tooltips — Inline definitions of jargon or technical terms (first occurrence per page only)
Don’t use:
- Complex code blocks (unless developer docs)
- Videos
- External embeds
- Custom components
Component Examples
<CardGroup cols={2}>
<Card title="Setting Up" icon="gear" href="/help/producer-program/after-approval">
Complete your producer profile setup
</Card>
<Card title="Uploading Tracks" icon="cloud-arrow-up" href="/help/producer-dashboard/tracks">
Learn the track upload process
</Card>
</CardGroup>
<Steps>
<Step title="Navigate to Billing">
Click your **profile avatar**, then select **Billing**.
</Step>
<Step title="Select New Plan">
Click **Change plan**, then choose your new plan.
</Step>
</Steps>
<Warning>
Cancelling your plan will remove access to premium features at the end of your billing period.
</Warning>
<Tooltip tip="Credits that control how many beat requests you can create each month. Your plan determines your allowance." cta="Learn more" href="/help/beat-requests/understanding-tokens">Tokens</Tooltip> are used to create requests.
New Documentation Checklist
Pre-Writing
Writing
Post-Writing
Common New Documentation Mistakes
❌ Don’t Do This
-
Documenting non-existent features
- Verify feature exists before writing
- Search codebase thoroughly
- Query database if needed
-
Assumed navigation
- Never write navigation without verifying
- Check actual menu items
- Test the path mentally
-
Wrong location
- Don’t create orphan pages
- Place in logical section
- Link from parent index
-
Missing frontmatter
- Every doc needs frontmatter
- Include all required fields
- Use correct audience value
-
No cross-links
- Link to related docs
- Link from related docs (update them)
- Create content web, not islands
-
Too long
- Break into multiple pages if needed
- Write user-focused content that explains actions and outcomes—not implementation details.
Content Guidelines:
| Write This | Not This |
|---|
| ”Click Upload to add your track" | "The upload controller handles file processing" |
| "Your payment is processed securely" | "The Stripe webhook processes payment_intent events" |
| "You’ll receive a confirmation email" | "The notification service queues the email job" |
| "Your profile is updated instantly" | "The database transaction commits the changes” |
Release Notes Must Be:
- Benefits-focused (what users gain)
- Action-oriented (what users can do)
- Free of technical implementation details
- Easy to scan and understand
Example Release Note:
✅ Correct:
## Instant Playlist Collaboration
You can now invite other producers to collaborate on your playlists
in real-time. Perfect for joint projects, compilations, or curated
collections.
**What's New:**
- **Invite collaborators** — Add producers to your playlists
- **Real-time sync** — Changes appear instantly for all collaborators
- **Permission controls** — Set who can edit or view
❌ Wrong:
## Playlist Collaboration API
We've implemented the playlist collaboration feature using WebSocket
connections and role-based access control through the `playlist_collaborator`
table.
**Technical Details:**
- WebSocket server handles real-time updates
- RBAC system manages permissions
- New database schema for storing collaborators
-
Wrong tone
- Match existing docs in section
- User-focused, not technical
- Active voice
-
Incomplete information
- Cover the full user journey
- Include edge cases if relevant
- Add troubleshooting if common issues exist
-
Not using snippets
- Wrong: Writing a custom “Need Help?” section or platform fee callout inline
- Fix: Import the existing snippet (
<NeedHelp />, <PlatformFee />, etc.)
- Check
/snippets/ directory before writing common patterns
-
Hardcoding values that may change
- Wrong: Writing
contact@beatpass.ca or 12% + $3 directly in content
- Fix: Use the appropriate snippet so changes propagate from one source
Template: New How-To Document
---
audience: help
title: "How to [Do Something]"
description: "Step-by-step guide to [achieve result] on BeatPass."
---
import NeedHelp from "/snippets/sections/need-help.mdx";
{/* Import other applicable snippets: PlatformFee, SubscriptionRequired, etc. */}
# How to [Do Something]
[Brief introduction: what this accomplishes and who it's for.]
## Prerequisites
- [Requirement 1]
- [Requirement 2]
## Instructions
### Step 1: [Navigate to Location]
[Exact navigation with bold UI labels]
### Step 2: [Take Action]
[What to click/do with exact labels]
### Step 3: [Verify Result]
[What success looks like]
## Troubleshooting
<AccordionGroup>
<Accordion title="[Common Issue 1]">
[Solution]
</Accordion>
<Accordion title="[Common Issue 2]">
[Solution]
</Accordion>
</AccordionGroup>
<NeedHelp />
## Related
- [Related topic](/help/path)
- [Next step](/help/path)
Template: New Overview Document
---
audience: help
title: "[Feature Area] Overview"
description: "Learn about [feature area] and how it helps you [benefit]."
---
import NeedHelp from "/snippets/sections/need-help.mdx";
{/* Import other applicable snippets based on content needs */}
# [Feature Area] Overview
[What this feature area does and why it matters.]
## What You Can Do
<CardGroup cols={2}>
<Card title="[Action 1]" icon="[icon]" href="/help/path">
[Brief description]
</Card>
<Card title="[Action 2]" icon="[icon]" href="/help/path">
[Brief description]
</Card>
</CardGroup>
## Key Concepts
- **[Concept 1]**: [Explanation]
- **[Concept 2]**: [Explanation]
## Getting Started
[Link to first how-to or tutorial]
<NeedHelp />
## Learn More
- [Subtopic 1](/help/path)
- [Subtopic 2](/help/path)
Quick Reference: File Placement
| If documenting… | Place in… | Example filename |
|---|
| Account settings feature | account-settings/ | two-factor-authentication.mdx |
| Billing functionality | billing/ | managing-subscription/upgrading-plan.mdx |
| Producer tools | producer-dashboard/ | tracks.mdx |
| Release information | release-notes/v3.0/ | 3.0.8-26.mdx (individual page) |
| Changelog entry | release-notes/ | Add Update to changelog.mdx |
| Help overview | help/ root | index.mdx |
Release notes require two files: an individual page in release-notes/v3.0/{version}.mdx AND an Update component entry at the top of release-notes/changelog.mdx. See template.mdx for the complete workflow.
Remember: Good documentation fills a gap users actually have.
Research first, write second, verify always.