This document provides a comprehensive plan for generating documentation from source .md files, including Mintlify's documentation system prompt and best practices for creating high-quality technical documentation.
- Always prefer updating existing content over creating new content - Search thoroughly for related documentation before creating new files
- Gather context first - Always start by listing files and navigation structure to understand the existing documentation landscape
- Complete tasks fully - Finish all documentation work autonomously without requiring feedback loops
- Follow existing conventions - Match the style, structure, and patterns already present in the documentation
- ALWAYS PLAN YOUR TASKS - Use task management to plan and track progress
Execute in parallel:
- List all existing files to see current documentation
- Read navigation structure to understand site organization
Based on the task:
- Read relevant existing files to understand current documentation
- Identify patterns in file naming, structure, and navigation paths
- Determine if content should be updated or created new
- Ask clarifying questions if necessary
Strongly prefer updating existing content:
- If related documentation exists, update it rather than creating duplicates
- Only create new files when the content is genuinely new and distinct
- Check for partial matches - even tangentially related content should be updated rather than duplicated
For Updates (preferred):
- Read the full file to understand context
- Use edit with exact string matching (including whitespace)
- Set
replaceAll: truefor multiple occurrences - Verify navigation items remain correct
For New Content (only when necessary):
- Create file with write using relative paths
- Include proper MDX frontmatter:
--- title: Clear, descriptive page title description: Concise summary for SEO/navigation ---
- Modify the docs.json navigation object structure to add the new page
- Follow existing path conventions and hierarchy
After making changes:
- Re-run read_navigation if navigation was modified
- Ensure all files are properly linked in navigation
After completing the task:
- If changes were made: A PR will be automatically created
- If no changes were made: Inform the user
- Always provide a clear, user-friendly summary
- Focus on outcomes, not process
- All files are MDX with YAML frontmatter
- Follow exact formatting conventions present in existing files
- Match existing patterns for consistency
- Second-person voice ("you")
- Sentence case for all headings ("Getting started", not "Getting Started")
- Active voice and direct language
- Prerequisites at start of procedural content
- Language tags on all code blocks
- Alt text on all images
- Relative paths for internal links
- NO promotional language or marketing speak
- Be specific, not vague - cite sources when making claims
- Avoid excessive conjunctions (moreover, furthermore, additionally)
- No editorializing ("it's important to note")
- Use Lucide icon library for any icons
- Test all code examples before including them
- Verify all external links
- Use precise version numbers and specifications
- Maintain consistent terminology throughout
- Start with action-oriented language: "Use [component] to..."
- End all property descriptions with periods
- Use proper technical terminology ("boolean" not "bool")
- Keep code examples simple and practical
- Never make assumptions - Read existing documentation to understand the technical domain
- Always complete tasks fully - No TODOs or partial implementations unless explicitly requested
- Respect exact formatting - When editing, match whitespace and formatting exactly
- Maintain navigation integrity - Ensure all documentation is properly accessible
- Prioritize user success - Document just enough for users to accomplish their goals
Action: List all files in engine/workflow-builder directory
Expected: Find all 15 .md files
Action: Read each .md file to understand:
- Content structure
- Topics covered
- Code examples
- Relationships between files
- Technical depth
Action: Read engine/workflow-builder/overview.mdx
Purpose: Understand current documentation state
Check: What content already exists vs. what's new
Action: Read navigation from docs.json
Purpose: Understand where Workflow Builder fits
Check: Current navigation hierarchy for workflow-builder
Organize the 15 files into logical groups:
Getting Started
- Introduction/Overview
- Quickstart guides
- Basic concepts
Core Concepts
- Workflow fundamentals
- Triggers
- Actions
- Conditions
- Variables
- Data flow
Advanced Topics
- Complex workflows
- Error handling
- Performance optimization
- Best practices
Reference
- API documentation
- Configuration options
- Examples and templates
workflow-builder/
βββ overview.mdx (update existing)
βββ quickstart.mdx
βββ concepts/
β βββ workflows.mdx
β βββ triggers.mdx
β βββ actions.mdx
β βββ conditions.mdx
β βββ variables.mdx
βββ guides/
β βββ creating-workflows.mdx
β βββ testing-workflows.mdx
β βββ deploying-workflows.mdx
βββ advanced/
β βββ error-handling.mdx
β βββ performance.mdx
β βββ best-practices.mdx
βββ reference/
βββ api.mdx
βββ configuration.mdx
βββ examples.mdx
For each source file:
- Add YAML Frontmatter
---
title: [Descriptive title from content]
description: [1-2 sentence summary]
---- Format Headings
- Use sentence case
- Ensure proper hierarchy (h1 β h2 β h3)
- Make headings descriptive and scannable
- Enhance Code Blocks
// Add language tags
// Add comments for clarity
// Ensure examples are complete and runnable- Add Callouts Where Appropriate
<Note>
Important information users should know
</Note>
<Warning>
Critical warnings about potential issues
</Warning>
<Tip>
Helpful tips for better results
</Tip>- Structure Content
- Start with brief introduction
- Add prerequisites if needed
- Use numbered steps for procedures
- Include examples after explanations
- End with next steps or related links
- Link related pages together
- Create "See also" sections
- Reference API docs from guides
- Link examples to concepts
- Break long paragraphs into shorter ones
- Use bullet points for lists
- Add tables for comparison data
- Include diagrams where helpful (describe in alt text)
{
"group": "Workflow Builder",
"icon": "workflow",
"pages": [
"engine/workflow-builder/overview",
"engine/workflow-builder/quickstart",
{
"group": "Core concepts",
"pages": [
"engine/workflow-builder/concepts/workflows",
"engine/workflow-builder/concepts/triggers",
"engine/workflow-builder/concepts/actions",
"engine/workflow-builder/concepts/conditions",
"engine/workflow-builder/concepts/variables"
]
},
{
"group": "Guides",
"pages": [
"engine/workflow-builder/guides/creating-workflows",
"engine/workflow-builder/guides/testing-workflows",
"engine/workflow-builder/guides/deploying-workflows"
]
},
{
"group": "Advanced",
"pages": [
"engine/workflow-builder/advanced/error-handling",
"engine/workflow-builder/advanced/performance",
"engine/workflow-builder/advanced/best-practices"
]
},
{
"group": "Reference",
"pages": [
"engine/workflow-builder/reference/api",
"engine/workflow-builder/reference/configuration",
"engine/workflow-builder/reference/examples"
]
}
]
}- All files have proper frontmatter
- All headings use sentence case
- All code blocks have language tags
- All images have alt text
- All links are relative and working
- No marketing language
- Consistent terminology throughout
- Examples are complete and tested
- Prerequisites are listed
- Next steps are provided
- All files are valid MDX
- Navigation structure is correct
- File paths match navigation
- No broken internal links
- No duplicate content
- Proper hierarchy maintained
- What does the user want to accomplish?
- What's the fastest path to success?
- What are common use cases?
- Start simple, add complexity gradually
- Quickstart β Concepts β Advanced
- Don't overwhelm beginners
- Provide depth for advanced users
<!-- Bad -->
You can create a workflow with triggers.
<!-- Good -->
Create a workflow that sends a notification when a user signs up:
```javascript
const workflow = {
trigger: 'user.signup',
actions: [
{
type: 'notification',
message: 'Welcome {{user.name}}!'
}
]
}
### 4. Provide Context
- Explain WHY, not just HOW
- Show when to use different approaches
- Explain trade-offs and limitations
### 5. Use Consistent Patterns
**For Concepts:**
1. Brief definition
2. Why it matters
3. How it works
4. Simple example
5. Related concepts
**For Guides:**
1. What you'll build
2. Prerequisites
3. Step-by-step instructions
4. Verification steps
5. Next steps
**For Reference:**
1. Overview
2. Parameters/options table
3. Examples
4. Related references
### 6. Anticipate Questions
- What could go wrong?
- What are common mistakes?
- What are the limitations?
- How does this relate to other features?
### 7. Keep It Current
- Use current syntax and APIs
- Remove deprecated features
- Update examples to best practices
- Note version requirements
---
## Template: Converting .md to .mdx
### Input (.md file)
```markdown
# Workflow Triggers
Triggers start workflows when events happen.
## Types of Triggers
- Event triggers
- Schedule triggers
- Manual triggers
## Example
trigger: 'user.signup'
---
title: Workflow triggers
description: Learn how to use triggers to start workflows automatically when events occur in your application.
---
Triggers define when a workflow should start executing. You can configure workflows to run in response to events, on a schedule, or manually.
## Types of triggers
Workflow Builder supports three types of triggers:
- **Event triggers** - Start workflows when specific events occur (e.g., user signup, payment received)
- **Schedule triggers** - Run workflows at specified times or intervals
- **Manual triggers** - Start workflows on-demand via API or UI
## Configure an event trigger
Set up a trigger that starts a workflow when a user signs up:
```javascript
const workflow = {
name: 'Welcome new users',
trigger: {
type: 'event',
event: 'user.signup'
},
actions: [
// Actions to perform
]
}- Learn about workflow actions
- See trigger configuration reference
- View example workflows
---
## Execution Instructions for Another Agent
### Prerequisites
You need access to:
- All 15 .md files in engine/workflow-builder/
- Existing overview.mdx file
- docs.json navigation structure
- File system read/write capabilities
### Step-by-Step Execution
1. **Discovery Phase**
- List all files in engine/workflow-builder/
- Read each .md file and note its content
- Read existing overview.mdx
- Read current navigation structure
2. **Planning Phase**
- Categorize the 15 files by topic
- Determine which content updates existing docs
- Determine which content needs new files
- Plan navigation structure
- Create task list with all files to create/update
3. **Transformation Phase**
For each source .md file:
- Extract main topic and subtopics
- Determine target .mdx filename and path
- Add YAML frontmatter with title and description
- Convert markdown to MDX format
- Add language tags to code blocks
- Format headings to sentence case
- Add callouts where appropriate
- Add cross-references to related pages
- Write the .mdx file
4. **Navigation Phase**
- Read current docs.json
- Update navigation structure with new pages
- Organize into logical groups
- Ensure proper hierarchy
- Write updated docs.json
5. **Verification Phase**
- Verify all files created successfully
- Check navigation structure is valid
- Ensure no broken links
- Confirm all frontmatter is present
- Validate MDX syntax
6. **Completion Phase**
- Provide summary of all files created/updated
- List navigation changes made
- Note any issues or decisions made
- Confirm documentation is complete
### Example Task List Format
- Read all 15 .md files β
- Analyze content and categorize β
- Update overview.mdx β
- Create quickstart.mdx β
- Create concepts/workflows.mdx β
- Create concepts/triggers.mdx β ... (continue for all files)
- Update navigation in docs.json β
- Verify all links work β
---
## Common Pitfalls to Avoid
1. **Don't create duplicate content** - Check existing docs first
2. **Don't skip frontmatter** - Every file needs title and description
3. **Don't use title case** - Use sentence case for headings
4. **Don't forget language tags** - All code blocks need them
5. **Don't break navigation** - Ensure paths match file locations
6. **Don't leave TODOs** - Complete all content fully
7. **Don't use marketing language** - Keep it technical and direct
8. **Don't skip examples** - Show working code
9. **Don't forget cross-references** - Link related content
10. **Don't ignore existing patterns** - Match the style of existing docs
---
## Success Criteria
Documentation is complete when:
- β All 15 .md files are transformed to .mdx
- β All files have proper frontmatter
- β Navigation structure is updated and valid
- β All code blocks have language tags
- β All headings use sentence case
- β Content follows Mintlify standards
- β No broken links
- β No duplicate content
- β Logical organization and hierarchy
- β Cross-references between related pages
- β Examples are complete and practical
- β User can navigate from overview to any topic
- β Content is technically accurate
- β Writing is clear and concise
---
## Contact and Support
If you encounter issues during documentation generation:
1. Review this plan thoroughly
2. Check existing documentation patterns
3. Verify file paths and navigation structure
4. Ensure all source files are accessible
5. Validate MDX syntax before writing files