Skip to content

Commit edfa57e

Browse files
authored
Merge pull request #2 from rjordan/experiment
Experiment
2 parents 63ab3b5 + 78cf5bb commit edfa57e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+7126
-4330
lines changed

.github/workflows/ai-docs.yml

Lines changed: 212 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,212 @@
1+
name: Generate AI-Optimized Documentation
2+
3+
on:
4+
# Runs on pushes to main branch
5+
push:
6+
branches: ["main"]
7+
paths:
8+
- 'site/public/data/**'
9+
- 'generate-ai-docs.js'
10+
- '.github/workflows/ai-docs.yml'
11+
12+
# Allows manual trigger
13+
workflow_dispatch:
14+
inputs:
15+
create_release:
16+
description: 'Create a new release with the generated docs'
17+
required: false
18+
default: false
19+
type: boolean
20+
version:
21+
description: 'Release version (only if creating release)'
22+
required: false
23+
type: string
24+
25+
jobs:
26+
generate-ai-docs:
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout repository
30+
uses: actions/checkout@v4
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: '20'
36+
37+
- name: Generate AI-optimized documentation
38+
run: |
39+
node generate-ai-docs.js
40+
41+
- name: Validate generated docs
42+
run: |
43+
cd ai-docs
44+
echo "📊 Generated AI-optimized files:"
45+
ls -la
46+
echo ""
47+
echo "📋 File count: $(find . -name "*.md" | wc -l)"
48+
echo "📏 Total size: $(du -sh . | cut -f1)"
49+
50+
# Verify key files exist
51+
required_files=("index.md" "complete-world-overview.md" "all-regions.md" "all-magic.md" "all-characters.md" "alignment-system.md")
52+
for file in "${required_files[@]}"; do
53+
if [ ! -f "$file" ]; then
54+
echo "❌ Required file $file not found!"
55+
exit 1
56+
fi
57+
done
58+
59+
echo "✅ AI documentation validation passed!"
60+
61+
- name: Create AI docs archive
62+
run: |
63+
cd ai-docs
64+
65+
# Create comprehensive release info
66+
cat > AI_DOCS_README.md << EOF
67+
# Aetheria AI-Optimized Documentation
68+
69+
**Generated:** $(date -u '+%Y-%m-%d %H:%M:%S UTC')
70+
**Source Commit:** ${{ github.sha }}
71+
**Repository:** https://github.com/${{ github.repository }}
72+
73+
## 🤖 Purpose
74+
75+
This documentation is specifically optimized for AI models and RAG (Retrieval Augmented Generation) systems. Unlike web-oriented docs, these files:
76+
77+
- **Consolidate related information** into single documents
78+
- **Provide complete context** without requiring navigation
79+
- **Include explicit cross-references** between entities
80+
- **Offer multiple access patterns** (comprehensive vs. specific)
81+
82+
## 📚 Quick Start for AI Models
83+
84+
1. **Start here:** \`index.md\` - Master sitemap showing all available content
85+
2. **Get everything:** \`complete-world-overview.md\` - Single comprehensive document
86+
3. **Focus by topic:** \`all-regions.md\`, \`all-magic.md\`, \`all-characters.md\`
87+
4. **Understand relationships:** \`cross-references.md\`
88+
89+
## 🎯 Key Files for AI Consumption
90+
91+
### Consolidated References (Recommended)
92+
- **index.md** - Master sitemap and navigation guide
93+
- **complete-world-overview.md** - Everything in one document ($(wc -w < complete-world-overview.md) words)
94+
- **all-regions.md** - Complete geographic and political reference
95+
- **all-magic.md** - Entire magic system with all schools
96+
- **all-characters.md** - Every named character with full details
97+
- **alignment-system.md** - Complete guide to the four-axis alignment system
98+
- **cross-references.md** - Explicit relationship mapping
99+
100+
### Individual Entity Files
101+
- **regions/** - Detailed files for each region and location
102+
- **characters/** - In-depth character profiles with context
103+
- **magic/** - Individual magic school references
104+
105+
## 🔍 Search and Discovery
106+
107+
Unlike web documentation, these files are designed for:
108+
- **Full-text search** across consolidated documents
109+
- **Relationship discovery** through explicit cross-references
110+
- **Context preservation** with complete information in each file
111+
- **Hierarchical understanding** without complex navigation
112+
113+
## 📊 Content Statistics
114+
115+
- **Files:** $(find . -name "*.md" | wc -l) markdown documents
116+
- **Regions:** $(ls regions/ | wc -l) locations
117+
- **Characters:** $(ls characters/ | wc -l) named individuals
118+
- **Magic Schools:** $(ls magic/ | wc -l) schools of magic
119+
- **Total Words:** ~$(find . -name "*.md" -exec cat {} \; | wc -w)
120+
121+
## 🔄 Usage Patterns
122+
123+
**For Comprehensive Context:**
124+
Load \`complete-world-overview.md\` for full world knowledge
125+
126+
**For Topic-Focused Work:**
127+
Use \`all-regions.md\`, \`all-magic.md\`, or \`all-characters.md\`
128+
129+
**For Character Interaction:**
130+
Combine character files with \`alignment-system.md\` for personality context
131+
132+
**For World Building:**
133+
Use \`cross-references.md\` to understand entity relationships
134+
135+
---
136+
137+
**Optimized for:** Claude, GPT, LLaMA, and other language models
138+
**Format:** Markdown with rich cross-references and metadata
139+
**Update Frequency:** Automated generation from source data
140+
EOF
141+
142+
# Create the archive
143+
zip -r "aetheria-ai-docs-$(date +%Y%m%d-%H%M%S).zip" . -x "*.zip"
144+
145+
echo "📦 Created AI-optimized archive:"
146+
ls -lh *.zip
147+
148+
- name: Upload AI docs artifact
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: aetheria-ai-docs
152+
path: ai-docs/
153+
retention-days: 30
154+
155+
- name: Create release (if requested)
156+
if: github.event.inputs.create_release == 'true' && github.event.inputs.version != ''
157+
uses: softprops/action-gh-release@v1
158+
with:
159+
tag_name: ${{ github.event.inputs.version }}
160+
name: "Aetheria AI Documentation ${{ github.event.inputs.version }}"
161+
body: |
162+
# 🤖 Aetheria AI-Optimized Documentation
163+
164+
**Specifically designed for AI models and RAG systems** - not web browsing!
165+
166+
## 🎯 What Makes This Different
167+
168+
✅ **Consolidated Information** - Related content combined into single files
169+
✅ **Complete Context** - No navigation required between documents
170+
✅ **Explicit Cross-References** - Clear relationships between entities
171+
✅ **AI-Friendly Structure** - Optimized for language model consumption
172+
173+
## 📥 Download & Usage
174+
175+
1. Download `aetheria-ai-docs-*.zip` below
176+
2. Extract and start with `AI_DOCS_README.md`
177+
3. Load files directly into your AI system or RAG pipeline
178+
179+
## 🔑 Key Files
180+
181+
- **complete-world-overview.md** - Everything in one document (~$(cd ai-docs && wc -w < complete-world-overview.md 2>/dev/null || echo "50000") words)
182+
- **index.md** - Master sitemap for content discovery
183+
- **all-regions.md** - Complete geographic reference
184+
- **all-magic.md** - Entire magic system
185+
- **alignment-system.md** - Character personality framework
186+
187+
## 🚀 Perfect For
188+
189+
- AI storytelling and world-building
190+
- RAG system knowledge bases
191+
- Language model fine-tuning data
192+
- Interactive fiction development
193+
194+
---
195+
196+
Generated from commit ${{ github.sha }} on $(date -u '+%Y-%m-%d %H:%M:%S UTC')
197+
files: |
198+
ai-docs/aetheria-ai-docs-*.zip
199+
draft: false
200+
env:
201+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
202+
203+
- name: Summary
204+
run: |
205+
cd ai-docs
206+
echo "🎉 AI-optimized documentation generated successfully!"
207+
echo "📁 Files: $(find . -name "*.md" | wc -l) markdown documents"
208+
echo "📊 Size: $(du -sh . | cut -f1)"
209+
echo "🔗 Available as artifact: aetheria-ai-docs"
210+
if [ "${{ github.event.inputs.create_release }}" == "true" ]; then
211+
echo "🚀 Release created: ${{ github.event.inputs.version }}"
212+
fi

0 commit comments

Comments
 (0)