Asset generation and lesson creation tools for Flow Education
Get the tools from GitHub or use the files below
Fireworks AI for images, ElevenLabs for audio (or Amazon Polly for budget)
cd tools/
cp config.json.template config.json
# Add your API keys
node image-gen/batch-generate.js --lesson quest-001-letter-a
node audio-gen/batch-audio.js --lesson quest-001-letter-a
Check assets/images/ and assets/audio/ — iterate prompts if needed
Batch image generation for lesson assets. Reads asset manifests and generates all images with consistent cartoon style.
View Source on GitHubassets-manifest.json for each lessonFrom manifest:
{
"id": "apple",
"prompt": "Cartoon red apple, friendly face, simple 2D style",
"size": "512x512"
}
Full prompt sent to API:
Cartoon red apple, friendly face, simple 2D style,
2D cartoon illustration for children, friendly and warm,
simple shapes, bold outlines, flat colors, no gradients,
educational style, suitable for kindergarten, high contrast,
cheerful, isolated on transparent background
# Generate all images for a lesson
node batch-generate.js --lesson quest-001-letter-a
# Force regeneration (overwrite existing)
node batch-generate.js --lesson quest-001-letter-a --force
# Use custom manifest path
node batch-generate.js --lesson quest-001-letter-a \
--manifest ../../lessons/quest-001-letter-a/assets-manifest.json
{
"image_api": {
"provider": "fireworks",
"api_key": "YOUR_FIREWORKS_KEY",
"model": "stable-diffusion-xl-1024-v1-0",
"default_params": {
"width": 1024,
"height": 1024,
"steps": 30,
"cfg_scale": 7.5,
"style_preset": "digital-art"
}
}
}
assets/images/quest-001-letter-a/
├── characters/
│ ├── tutor-neutral.png
│ ├── tutor-happy.png
│ └── ...
├── objects/
│ ├── apple.png
│ ├── ant.png
│ └── ...
├── letters/
│ ├── letter-a.png
│ └── ...
├── backgrounds/
│ └── classroom.png
└── ui/
├── button-play.png
└── ...
# Plus generation-report.json with stats
Batch audio generation for lesson narration and feedback. Supports ElevenLabs (high quality) or Amazon Polly (budget).
View Source on GitHub# Generate with ElevenLabs (recommended for MVP)
node batch-audio.js --lesson quest-001-letter-a --provider elevenlabs
# Generate with Polly (cheaper for scale)
node batch-audio.js --lesson quest-001-letter-a --provider polly
# Force regeneration
node batch-audio.js --lesson quest-001-letter-a --force
{
"audio_api": {
"provider": "elevenlabs",
"api_key": "sk_...",
"voice_id": "XB0fDUnXU5powFXDhCwa",
"model": "eleven_multilingual_v2"
}
}
assets/audio/quest-001-letter-a/
├── narration/
│ ├── intro-welcome.mp3
│ ├── challenge-1-instruction.mp3
│ └── ...
└── feedback/
├── correct-01.mp3
├── correct-02.mp3
├── encourage-01.mp3
└── ...
# Plus audio-report.json with stats
{
"audio": {
"narration": [
{
"id": "intro-welcome",
"text": "Hello! I'm excited to learn with you today!",
"emotion": "cheerful",
"pace": "normal"
}
],
"feedback": [
{
"id": "correct-01",
"text": "That's right! Great job!",
"emotion": "celebrating"
}
]
}
}
Compiles generated assets into deployable lesson packages for the Flow Education Android app.
View Source on GitHub# Package a complete lesson
node lesson-assembler/package.js --lesson quest-001-letter-a
# Package with detailed manifest
node lesson-assembler/package.js --lesson quest-001-letter-a --include-manifest
# Package all lessons
node lesson-assembler/package.js --all
output/quest-001-letter-a/
├── images/
│ ├── characters/
│ ├── objects/
│ ├── letters/
│ ├── backgrounds/
│ └── ui/
├── audio/
│ ├── narration/
│ └── feedback/
└── manifest.json (if --include-manifest)
# Plus quest-001-letter-a-package-report.json
Simple rule-based adaptive algorithm for Phase 0 MVP. Adjusts difficulty based on student performance in real-time. NOT machine learning — explicit rules for transparency and debugging.
View Source on GitHub1. EASIEST - Extra scaffolding, more hints, longer time
2. EASY - Standard scaffolding, extra time allowed
3. NORMAL - Default challenge (starting level)
4. HARD - Faster pace, less scaffolding, fewer hints
5. HARDEST - Timed, no hints, minimal scaffolding
3 consecutive errors → Reduce difficulty (make easier)
5 consecutive correct → Increase difficulty (make harder)
<30% success rate → Trigger review lesson
>80% success rate → Mark skill mastered
>30 seconds stuck → Offer hint/help
const { AdaptiveEngine } = require('./tools/adaptive-logic');
const engine = new AdaptiveEngine('student-001');
// Record an attempt
engine.recordAttempt('letter-b-recognition', true, 3000);
// Check if adaptation needed
const adaptations = engine.shouldAdapt('letter-b-recognition');
// Returns: [{ type: 'INCREASE_DIFFICULTY', reason: '5 consecutive correct' }]
// Get session summary
const summary = engine.getSessionSummary();
// { durationMinutes: 6, challengesCompleted: 4, successRate: "85%" }
Student session tracking and recommendations. Stores progress locally (AsyncStorage for React Native) with skill mastery, streak tracking, and next quest recommendations.
View Source on GitHub- Total sessions per student
- Total learning time (minutes)
- Quests completed
- Skills mastered (80%+ over 5+ attempts)
- Success rate per skill
- Daily streak
- Skills needing review (<50% success)
const { ProgressTracker } = require('./tools/progress-tracker');
const tracker = new ProgressTracker(AsyncStorage);
await tracker.init('student-001');
// Start a quest
await tracker.startQuest('quest-001-letter-a');
// Record challenge completion
await tracker.completeChallenge('challenge-1', true, 'letter-a', 5000);
// Complete quest
await tracker.completeQuest('quest-001-letter-a', 85);
// Get recommendations
const next = await tracker.getNextRecommendation();
// { nextQuest: 'quest-002-letter-b', reason: 'next_in_sequence' }
// Check stats
const stats = await tracker.getStats();
// { totalSessions: 12, completedQuests: 5, streakDays: 3, ... }
{
"image_api": {
"provider": "fireworks",
"api_key": "fw_...",
"model": "accounts/fireworks/models/stable-diffusion-xl-1024-v1-0",
"default_params": {
"width": 1024,
"height": 1024,
"steps": 30,
"cfg_scale": 7.5,
"style_preset": "digital-art"
}
},
"audio_api": {
"provider": "elevenlabs",
"api_key": "sk_...",
"voice_id": "21m00Tcm4TlvDq8ikWAM",
"model": "eleven_multilingual_v2"
},
"polly": {
"accessKeyId": "AKIA...",
"secretAccessKey": "...",
"region": "us-east-1",
"voiceId": "Joanna"
},
"output": {
"imageDir": "../assets/images",
"audioDir": "../assets/audio",
"reportDir": "../output"
}
}
Security: Never commit config.json with real keys. Add to .gitignore.
All tools read from lessons/{lesson-id}/assets-manifest.json:
{
"lessonId": "quest-001-letter-a",
"title": "Letter A Adventure",
"duration": "6 minutes",
"images": {
"characters": [
{
"id": "tutor-happy",
"prompt": "Friendly cartoon tutor character, happy expression...",
"size": "512x512"
}
],
"objects": [
{
"id": "apple",
"prompt": "Cartoon red apple, friendly face, simple 2D style",
"size": "512x512"
}
],
"letters": [...],
"backgrounds": [...],
"ui": [...]
},
"audio": {
"narration": [
{
"id": "intro-welcome",
"text": "Welcome to the Letter A Adventure!",
"emotion": "cheerful",
"pace": "normal"
}
],
"feedback": [...]
},
"challenges": [...]
}
2D cartoon, friendly and warm, simple shapes, bold outlines, flat colors, transparent backgrounds for characters/objects
Clear, warm, encouraging, age-appropriate pacing, specific praise over generic "good job"
Images: PNG (transparency for characters), JPG (backgrounds). Audio: MP3, 64-128kbps. Max 200MB per lesson.
kebab-case, descriptive, category-prefixed: tutor-happy.png, apple.png, intro-welcome.mp3
projects/promptengines/experiments/prototypes/flow-education/
├── README.md # System overview
├── QUICKSTART.md # 10-minute setup guide
├── MANIFESTO.html # Philosophy & standards
├── index.html # This site
├── tools.html # This page
├── MVP-QUEST-SPEC.md # 6-quest specification
├── tools/
│ ├── config.json.template # API key template
│ ├── image-gen/
│ │ └── batch-generate.js # ✅ Image generation
│ ├── audio-gen/
│ │ └── batch-audio.js # ✅ Audio generation
│ ├── lesson-assembler/
│ │ └── package.js # ✅ Asset packaging
│ ├── adaptive-logic.js # ✅ Difficulty adjustment
│ └── progress-tracker.js # ✅ Student tracking
├── lessons/
│ ├── quest-001-letter-a/
│ │ └── assets-manifest.json
│ ├── quest-002-letter-b/
│ │ └── assets-manifest.json
│ └── ... (5 complete)
├── assets/ # Generated outputs
│ ├── images/
│ └── audio/
└── output/ # Assembled lessons
These tools are open source. To contribute:
Questions? Issues? principal@promptengines.com
Follow development: lab.promptengines.com