me-engine-one
Version:
The magic file system that regenerates entire AI universes from me.md
447 lines (426 loc) • 11.8 kB
JavaScript
/**
* Complete JSON Schema for me.md configuration
* Defines the structure and validation rules for the magical me file
*/
export const MeSchema = {
type: "object",
properties: {
// Core Identity
name: {
type: "string",
minLength: 1,
maxLength: 100,
description: "Your AI universe name"
},
tagline: {
type: "string",
maxLength: 200,
description: "Your elevator pitch"
},
story: {
type: "string",
maxLength: 1000,
description: "Your origin story"
},
// Brand Configuration (like MySpace themes!)
brand: {
type: "object",
properties: {
theme: {
type: "string",
enum: ["professional", "classic-myspace", "cyberpunk", "minimal", "student", "creative", "corporate"],
default: "professional",
description: "Visual theme for your universe"
},
colors: {
type: "array",
items: {
type: "string",
pattern: "^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$|^(red|green|blue|white|black|yellow|cyan|magenta|purple|orange|pink)$",
description: "Hex color code or named color"
},
minItems: 1,
maxItems: 10,
default: ["#2563EB", "#64748B", "#FFFFFF"],
description: "Color palette for your brand"
},
logo: {
type: "string",
format: "uri-reference",
description: "Path to your logo image"
},
avatar: {
type: "string",
format: "uri-reference",
description: "Your profile image"
},
background: {
type: "string",
format: "uri-reference",
description: "Background image or GIF (MySpace nostalgia!)"
},
voice: {
type: "string",
maxLength: 500,
default: "Professional, helpful, engaging",
description: "Your personality and communication style"
},
font: {
type: "string",
enum: ["Inter", "Space Mono", "Comic Sans MS", "Times New Roman", "Arial", "Helvetica", "Georgia", "Roboto"],
default: "Inter",
description: "Typography choice"
},
cursor: {
type: "string",
enum: ["default", "sparkle", "neon-glow", "rainbow", "pointer"],
default: "default",
description: "Custom cursor style (MySpace vibes)"
},
music: {
type: "object",
properties: {
theme_song: {
type: "string",
format: "uri-reference",
description: "Profile song (because MySpace!)"
},
autoplay: {
type: "boolean",
default: false,
description: "Auto-play theme song"
},
volume: {
type: "number",
minimum: 0,
maximum: 1,
default: 0.3,
description: "Volume level (0.0 to 1.0)"
}
},
additionalProperties: false
}
},
additionalProperties: false
},
// Market Positioning
market: {
type: "object",
properties: {
industry: {
type: "string",
maxLength: 200,
description: "Your industry or niche"
},
audience: {
type: "array",
items: {
type: "string",
maxLength: 100
},
maxItems: 10,
description: "Your target audiences"
},
positioning: {
type: "string",
maxLength: 500,
description: "How you position yourself in the market"
}
},
additionalProperties: false
},
// Customer Information
customers: {
type: "object",
properties: {
primary: {
type: "string",
maxLength: 200,
description: "Primary customer type"
},
pains: {
type: "array",
items: {
type: "string",
maxLength: 200
},
maxItems: 10,
description: "Customer pain points you solve"
},
dreams: {
type: "array",
items: {
type: "string",
maxLength: 200
},
maxItems: 10,
description: "Customer dreams you help achieve"
}
},
additionalProperties: false
},
// Top 8 Agents (like MySpace Top 8!)
top_agents: {
type: "array",
items: {
type: "object",
properties: {
slot: {
type: "integer",
minimum: 1,
maximum: 8,
description: "Position in Top 8 (1 is #1 like Tom!)"
},
name: {
type: "string",
minLength: 1,
maxLength: 50,
description: "Agent name (ARIA must be slot 1)"
},
base: {
type: "string",
enum: [
"personal-assistant", "creative-genius", "study-coordinator",
"homework-helper", "business-strategist", "content-creator",
"data-analyst", "customer-success", "project-manager"
],
description: "Base agent template"
},
role: {
type: "string",
maxLength: 100,
description: "Agent's role/job title"
},
personality: {
type: "string",
maxLength: 500,
description: "Agent's personality and approach"
},
avatar: {
type: "string",
format: "uri-reference",
description: "Agent's profile image"
},
catchphrase: {
type: "string",
maxLength: 100,
description: "Agent's signature saying"
}
},
required: ["slot", "name", "role"],
additionalProperties: false
},
minItems: 1,
maxItems: 8,
description: "Your Top 8 AI agents (like MySpace friends!)"
},
// AI Universes/Spaces
spaces: {
type: "array",
items: {
type: "object",
properties: {
id: {
type: "string",
pattern: "^[a-z0-9-]+$",
minLength: 1,
maxLength: 50,
description: "Unique space identifier"
},
title: {
type: "string",
minLength: 1,
maxLength: 100,
description: "Space display name"
},
vibe: {
type: "string",
maxLength: 200,
description: "Space atmosphere/personality"
},
public: {
type: "boolean",
default: false,
description: "Whether space is publicly accessible"
},
features: {
type: "array",
items: {
type: "string",
enum: ["visiting", "guestbook", "template_store", "agents", "missions", "chat", "music"]
},
uniqueItems: true,
description: "Enabled features for this space"
}
},
required: ["id", "title"],
additionalProperties: false
},
minItems: 1,
description: "Your AI universes/environments"
},
// Goals (Auto-Generated Missions)
goals: {
type: "array",
items: {
type: "string",
minLength: 5,
maxLength: 200
},
minItems: 1,
maxItems: 20,
description: "Your objectives that become auto-generated missions"
},
// MySpace DNA (Maximum Personality)
style: {
type: "object",
properties: {
profile_song: {
type: "boolean",
default: false,
description: "Enable profile song (MySpace nostalgia!)"
},
visitor_counter: {
type: "boolean",
default: false,
description: "Show visitor counter like old web"
},
guestbook: {
type: "boolean",
default: false,
description: "Enable guestbook for visitors"
},
mood_ring: {
type: "string",
maxLength: 100,
description: "Current status/mood display"
},
animations: {
type: "string",
enum: ["none", "subtle", "full", "chaos"],
default: "subtle",
description: "Animation intensity level"
},
widgets: {
type: "array",
items: {
type: "string",
enum: [
"top_8_agents", "now_playing", "visitor_log", "success_metrics",
"latest_missions", "agent_status", "space_activity", "goal_progress"
]
},
uniqueItems: true,
description: "Enabled dashboard widgets"
}
},
additionalProperties: false
},
// Generated metadata (auto-populated)
generated: {
type: "object",
properties: {
timestamp: {
type: "string",
format: "date-time",
description: "When configuration was generated"
},
version: {
type: "string",
pattern: "^\\d+\\.\\d+\\.\\d+$",
description: "Configuration schema version"
},
parser_version: {
type: "string",
pattern: "^\\d+\\.\\d+\\.\\d+$",
description: "Parser version used"
}
},
additionalProperties: false
}
},
// Required fields
required: ["name"],
// Additional validation rules
additionalProperties: false
};
/**
* Validation helper functions
*/
export const ValidationHelpers = {
/**
* Validate that ARIA is in slot 1
*/
validateAriaSlot(agents) {
const slot1 = agents?.find(a => a.slot === 1);
return !slot1 || slot1.name === 'ARIA';
},
/**
* Validate unique agent slots
*/
validateUniqueSlots(agents) {
if (!agents) return true;
const slots = agents.map(a => a.slot);
return slots.length === new Set(slots).size;
},
/**
* Validate unique space IDs
*/
validateUniqueSpaceIds(spaces) {
if (!spaces) return true;
const ids = spaces.map(s => s.id);
return ids.length === new Set(ids).size;
},
/**
* Validate color format
*/
validateColor(color) {
const hexPattern = /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/;
const namedColors = ['red', 'green', 'blue', 'white', 'black', 'yellow', 'cyan', 'magenta', 'purple', 'orange', 'pink'];
return hexPattern.test(color) || namedColors.includes(color.toLowerCase());
}
};
/**
* Default configuration template
*/
export const DefaultMeConfig = {
name: "My AI Universe",
tagline: "Building the future with my AI squad",
story: "I believe AI should amplify human creativity, not replace it.",
brand: {
theme: "professional",
colors: ["#2563EB", "#64748B", "#FFFFFF"],
voice: "Professional, helpful, engaging",
font: "Inter",
cursor: "default"
},
top_agents: [
{
slot: 1,
name: "ARIA",
base: "personal-assistant",
role: "Personal Assistant & Digital Twin",
personality: "Your voice, optimized for productivity",
catchphrase: "I am you, but optimized"
}
],
spaces: [
{
id: "default",
title: "My AI Universe",
vibe: "Professional workspace with creative energy",
public: false,
features: ["agents", "missions"]
}
],
goals: [
"Get started with AI collaboration"
],
style: {
profile_song: false,
visitor_counter: false,
guestbook: false,
animations: "subtle",
widgets: ["top_8_agents"]
}
};