AI Context & Collaboration Guide
Quick Context Refresh for AI Assistants
When starting a new session with an AI assistant, provide this context:
I'm using MkDocs as a private GM workspace for D&D campaign development.
This is NOT player-facing - it's my sandbox for iterating on content with AI
before deploying to Foundry VTT journals.
Project location: /home/dockyard/docs/dnd/
MkDocs URL: http://[host]:8925
Purpose: Document-driven campaign development with AI assistance
Essential Context Files
For Complete Understanding
- Start with:
/home/dockyard/docs/dnd/PROJECT_CONTEXT.md - Then read:
/home/dockyard/docs/dnd/AI_CONTEXT.md(this file) - Check current work: Look for most recently modified .md files
Quick Command for AI
Ask the AI to run:
# Get project context
find /home/dockyard/docs/dnd -name "*.md" -type f -exec ls -lt {} + | head -20
# Read the core context
cat /home/dockyard/docs/dnd/PROJECT_CONTEXT.md
cat /home/dockyard/docs/dnd/AI_CONTEXT.md
Working with AI Assistants
Initial Setup Prompts
For Campaign Planning
I need help planning a D&D campaign. We'll work in markdown files at
/home/dockyard/docs/dnd/campaigns/[campaign-name]/.
Create structured documents that I can later import into Foundry VTT journals.
Focus on clear headings, bullet points, and sections that will translate well
to Foundry's journal system.
for Content Creation
Help me create [NPCs/locations/handouts] for my D&D campaign.
Write in markdown format that's Foundry journal-ready.
Include:
- Clear section headers
- Bullet-pointed information
- GM notes in blockquotes
- Player-visible vs GM-only sections clearly marked
For Session Prep
I'm preparing session [X] of my campaign.
Working directory: /home/dockyard/docs/dnd/campaigns/[name]/sessions/
Help me create:
1. Scene descriptions (theater of mind)
2. NPC dialogue options
3. Encounter contingencies
4. Clue/revelation progression
AI Collaboration Best Practices
File Organization
When creating content, use this structure:
- campaigns/[campaign-name]/sessions/session-XX.md
- campaigns/[campaign-name]/npcs/[npc-name].md
- campaigns/[campaign-name]/locations/[location-name].md
- campaigns/[campaign-name]/handouts/[handout-name].md
Content Format Guidelines
For NPCs
# [NPC Name]
## Quick Reference (GM Only)
- **Role**: [Their purpose in the story]
- **Attitude**: [How they treat the party]
- **Secret**: [What they're hiding]
## Description (Player Visible)
[Physical description and initial impression]
## Personality & Mannerisms
[How they act, speak, notable quirks]
## Information They Have
- [Bullet points of what they know]
- [What they'll share freely]
- [What requires persuasion]
## Stats (If Combat Likely)
[Combat statistics or reference]
For Locations
# [Location Name]
## First Impression (Read Aloud)
[Sensory description for players]
## Key Features
- [Notable aspects]
- [Interactive elements]
- [Hidden details]
## NPCs Present
- [Who's typically here]
- [Their activities]
## Secrets & Discoveries
> GM Note: [Hidden information]
## Connections
- Links to: [Other locations]
- Rumors about: [Related plots]
For Handouts
# [Document Title]
---
*[Document flavor text - aged parchment, hastily scrawled note, etc.]*
[Actual content of the handout in appropriate voice/style]
---
> **GM Note**: [Context and additional information for GM only]
> - When to give: [Trigger condition]
> - Hidden meaning: [What it really reveals]
> - Connections: [How it ties to other clues]
Iterative Workflow with AI
Phase 1: Brainstorming
Let's brainstorm ideas for [topic].
Don't worry about perfect formatting yet.
Just generate creative options.
Phase 2: Development
Let's develop option [X] into a full document.
Use the template from /home/dockyard/docs/dnd/templates/
Make it Foundry journal-ready.
Phase 3: Refinement
Review this content and suggest:
1. Consistency improvements
2. Plot hole fixes
3. Additional details needed
4. Player engagement opportunities
Phase 4: Polish
Final pass - make this ready for Foundry:
- Clear section breaks
- GM notes clearly marked
- Player-facing text polished
- All stats/rules accurate
Useful AI Commands
Content Generation
# Create a new NPC
echo "Create an NPC who [description] for my campaign" |
tee /home/dockyard/docs/dnd/campaigns/[name]/npcs/[npc-name].md
# Generate session outline
echo "Create session outline with 3-4 scenes" |
tee /home/dockyard/docs/dnd/campaigns/[name]/sessions/session-XX.md
Content Review
# Check all NPCs in campaign
ls -la /home/dockyard/docs/dnd/campaigns/[name]/npcs/
# Review recent changes
find /home/dockyard/docs/dnd -name "*.md" -mtime -1 -type f
# Search for specific content
grep -r "[search term]" /home/dockyard/docs/dnd/campaigns/
Organization
# See campaign structure
tree /home/dockyard/docs/dnd/campaigns/[name]/
# Count content pieces
find /home/dockyard/docs/dnd/campaigns/[name]/ -name "*.md" | wc -l
# Check file sizes (find bloated documents)
find /home/dockyard/docs/dnd -name "*.md" -exec du -h {} + | sort -rh
AI Capabilities in This Environment
What AI CAN Do
- ✅ Create/read/edit markdown files
- ✅ Organize content into directories
- ✅ Generate D&D 5e or Pathfinder content
- ✅ Create templates and reusable structures
- ✅ Search and cross-reference existing content
- ✅ Format for Foundry journal compatibility
What AI CANNOT Do
- ❌ Directly modify Foundry (different system)
- ❌ Access player-visible content (that's in Foundry)
- ❌ Schedule sessions (use Rallly for that)
- ❌ Generate images (text-only environment)
- ❌ Roll dice or run combat (Foundry handles that)
Common Tasks & Prompts
Campaign Initialization
Create a new campaign structure at /home/dockyard/docs/dnd/campaigns/[name]/
Include folders for sessions, npcs, locations, handouts, and gm-notes.
Create a campaign overview document with tone, themes, and major arcs.
Session Preparation
I'm running session [X] in [Y] days.
Previous session: [what happened]
Create a flexible session plan with:
- 3-4 scenes that can be reordered
- NPC dialogue for likely conversations
- Contingencies for player choices
- Clues that advance the plot
Mass Content Generation
Generate 5 taverns with unique characteristics.
Each should have:
- Name and theme
- 2-3 interesting NPCs
- 1 plot hook
- 1 secret
Format for easy import to Foundry journals.
Content Connectivity Check
Review all content in /home/dockyard/docs/dnd/campaigns/[name]/
Identify:
- Unresolved plot threads
- Unused NPCs/locations
- Missing connections between elements
- Opportunities for callbacks
Maintaining Context Across Sessions
Session Start Checklist
- Load project context:
cat PROJECT_CONTEXT.md - Check recent work:
ls -lt campaigns/*/sessions/ | head -5 - Review active campaign:
ls campaigns/[active-campaign]/ - Read last session notes:
cat campaigns/[name]/sessions/session-XX.md
Session End Checklist
- Save all work to appropriate directories
- Update session notes with outcomes
- Note any new threads/NPCs created
- Flag content ready for Foundry import
Tips for Effective AI Collaboration
Be Specific About Output Format
- "Create a handout that looks like a torn journal page"
- "Write NPC dialogue in [specific dialect/style]"
- "Format as a formal legal document from [fantasy kingdom]"
Provide Context Liberally
- Current campaign tone and themes
- Party composition and capabilities
- Recent events and player interests
- Power level and challenge preferences
Iterate Fearlessly
- First draft doesn't need to be perfect
- Ask for variations and alternatives
- Combine the best parts of multiple versions
- Save everything - you might use it later
Maintain Separation
- Keep planning notes separate from player content
- Mark GM-only information clearly
- Use blockquotes for meta information
- Remember: this is YOUR workspace, not theirs
Troubleshooting
If AI Loses Context
# Quick refresh
cat /home/dockyard/docs/dnd/PROJECT_CONTEXT.md
cat /home/dockyard/docs/dnd/AI_CONTEXT.md
ls -la /home/dockyard/docs/dnd/campaigns/
If Content Gets Disorganized
# Reorganize into proper structure
mkdir -p campaigns/[name]/{sessions,npcs,locations,handouts,gm-notes}
# Move files to appropriate directories
mv *.md campaigns/[name]/[appropriate-folder]/
If MkDocs Isn't Updating
# Check if container is running
docker ps | grep dnd-docs
# Restart if needed
cd /home/dockyard/stacks/docs-dnd && docker-compose restart
Remember: The AI is your collaborator, not your DM. You make the creative decisions; AI helps you document and develop them.