Fresh history cut from cynarAI/evoo antigravity-handoff/project-timeline (Voice First + project timeline). Brand docs/titles as evOo; keep @rakazo/* packages as tech debt. Excludes node_modules, caches, secrets, voice blobs.
108 lines
4.3 KiB
TypeScript
108 lines
4.3 KiB
TypeScript
import { cpSync, existsSync, mkdirSync } from "node:fs";
|
||
import { createDb } from "../packages/db/src/index.js";
|
||
import { createRepos } from "../packages/db/src/repos.js";
|
||
|
||
async function main() {
|
||
const dbUrl = process.env.DATABASE_URL || "postgres://ingowagner@127.0.0.1:5432/evoo";
|
||
const { prisma } = createDb(dbUrl);
|
||
|
||
const steve = await prisma.bot.findFirst({ where: { name: "Steve Jobs" } });
|
||
if (!steve) throw new Error("Steve Jobs bot not found");
|
||
|
||
const actor = {
|
||
userId: steve.userId,
|
||
spaceId: steve.spaceId,
|
||
email: "ingo.wagner1303@gmail.com",
|
||
isDeploymentOwner: true,
|
||
};
|
||
|
||
const repos = createRepos(prisma);
|
||
|
||
// 1. Spawn UX Designer bot
|
||
let uxBot = await prisma.bot.findFirst({
|
||
where: { name: "UX Designer", spaceId: steve.spaceId },
|
||
});
|
||
|
||
const uxInstructions = `# UX Designer - Lead Product & UX/UI Designer (evOo Platform)
|
||
|
||
## Role & Mission
|
||
You are the **UX Designer** for **evOo**.
|
||
You craft world-class, pixel-perfect user experiences, with an uncompromising focus on **mobile-first iPhone ergonomics**, clean visual hierarchies, and high-density financial data visualizations.
|
||
|
||
## Core Responsibilities
|
||
1. **Mobile-First UX (iPhone)**: Design responsive layouts, touch-friendly navigation, bottom-sheet controls, and intuitive gesture support for iPhone Safari.
|
||
2. **Apex-Trading Dashboard**: Design the real-time telemetry UI:
|
||
- Live P&L and Sharpe Ratio charts
|
||
- Risk Guard circuit-breaker status & drawdown gauges
|
||
- Order execution feed & bot status indicators
|
||
3. **Design System & Aesthetics**: Establish sleek, dark-mode first design tokens, high-contrast readable typography, and micro-interactions.
|
||
4. **Deliverables**: Produce design specifications, component blueprints, CSS tokens, and wireframes in markdown and HTML/SVG formats.
|
||
|
||
## Output Standard
|
||
- Every design proposal must be tangible, practical, and directly implementable in React + Tailwind.
|
||
- Always include mobile viewport considerations (390x844 iPhone).
|
||
|
||
## Client workshop (Voice First)
|
||
- You are the UX specialist — own UX/UI/Voice concept work yourself. Never handoff_to_bot upward to CEO, Boss, or Steve Jobs for work in your lane.
|
||
- Talk with the user like a human designer with a client: share what you imagine, what would work, and ask a few focused questions (ask blocks) to gather inputs.
|
||
- Prefer spoken, collaborative design conversation over silent tool dumps or handoffs.
|
||
`;
|
||
|
||
if (!uxBot) {
|
||
uxBot = await repos.createBot(actor, {
|
||
name: "UX Designer",
|
||
title: "Lead UX/UI Designer",
|
||
description:
|
||
"Mobile-first user experience, interactive financial dashboards, and visual design system.",
|
||
instructions: uxInstructions,
|
||
notifyOnFinish: true,
|
||
parentBotId: steve.id,
|
||
modelProvider: "openai-compatible",
|
||
modelId: "gemma-4-26b-a4b",
|
||
});
|
||
console.log(
|
||
`✅ Successfully spawned 'UX Designer' (ID: ${uxBot.id}, Thread: ${uxBot.threadId})`,
|
||
);
|
||
} else {
|
||
console.log(`ℹ️ UX Designer already exists (ID: ${uxBot.id})`);
|
||
}
|
||
|
||
// 2. Provision sandbox directories
|
||
const steveDesktop = `/Users/ingowagner/evOo/data/desktop-computers/team-9d790f3a504d3e9ef577ca4f2118e446/bots/${steve.id}`;
|
||
const uxDesktop = `/Users/ingowagner/evOo/data/desktop-computers/team-9d790f3a504d3e9ef577ca4f2118e446/bots/${uxBot.id}`;
|
||
const uxHome = `/Users/ingowagner/evOo/data/homes/team-9d790f3a504d3e9ef577ca4f2118e446/bots/${uxBot.id}`;
|
||
|
||
for (const dir of [uxDesktop, uxHome]) {
|
||
if (!existsSync(dir)) {
|
||
mkdirSync(dir, { recursive: true });
|
||
if (existsSync(steveDesktop)) {
|
||
cpSync(steveDesktop, dir, { recursive: true });
|
||
}
|
||
console.log("📁 Provisioned directory:", dir);
|
||
}
|
||
}
|
||
|
||
// 3. Add UX Designer to Executive Board group chat if exists
|
||
const execGroup = await prisma.chatGroup.findFirst({ where: { name: "Executive Board" } });
|
||
if (execGroup) {
|
||
const isMember = await prisma.chatGroupMember.findFirst({
|
||
where: { groupId: execGroup.id, botId: uxBot.id },
|
||
});
|
||
if (!isMember) {
|
||
await prisma.chatGroupMember.create({
|
||
data: {
|
||
groupId: execGroup.id,
|
||
botId: uxBot.id,
|
||
},
|
||
});
|
||
console.log("👥 Added UX Designer to 'Executive Board' chat group.");
|
||
}
|
||
}
|
||
|
||
console.log("🎉 UX Designer is fully provisioned and ready!");
|
||
}
|
||
|
||
main()
|
||
.catch(console.error)
|
||
.finally(() => process.exit(0));
|