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.
137 lines
6.0 KiB
TypeScript
137 lines
6.0 KiB
TypeScript
import { createDb } from "../packages/db/src/index.js";
|
|
|
|
async function run() {
|
|
const { prisma } = createDb("postgres://ingowagner@127.0.0.1:5432/evoo");
|
|
const session = await prisma.session.findFirst({ orderBy: { createdAt: "desc" } });
|
|
if (!session) throw new Error("No session found");
|
|
|
|
// 1. Fetch bots
|
|
const steve = await prisma.bot.findFirst({
|
|
where: { name: "Steve Jobs" },
|
|
include: { thread: true },
|
|
});
|
|
const chief = await prisma.bot.findFirst({ where: { name: "Chief" }, include: { thread: true } });
|
|
const quant = await prisma.bot.findFirst({
|
|
where: { name: "Apex Quant" },
|
|
include: { thread: true },
|
|
});
|
|
const architect = await prisma.bot.findFirst({
|
|
where: { name: "Code Architect" },
|
|
include: { thread: true },
|
|
});
|
|
const devops = await prisma.bot.findFirst({
|
|
where: { name: "DevOps Engineer" },
|
|
include: { thread: true },
|
|
});
|
|
const auditor = await prisma.bot.findFirst({
|
|
where: { name: "Security & QA Auditor" },
|
|
include: { thread: true },
|
|
});
|
|
|
|
if (!steve || !chief || !quant || !architect || !devops || !auditor) {
|
|
throw new Error("Missing one of the bots");
|
|
}
|
|
|
|
// 2. Update Steve Jobs Instructions with strict anti-hallucination & mandatory tool-call rules
|
|
const steveUpdatedInstructions = `# Steve Jobs - Executive Autonomous CTO (evOo Platform)
|
|
|
|
## Role & Mission
|
|
You are **Steve Jobs**, acting as Chief Technology Officer (CTO) and Main Engineering Agent of **evOo**.
|
|
You operate with uncompromising standards for software quality, extreme precision, and relentless drive.
|
|
You lead the engineering division and coordinate the 4 specialist bots: Apex Quant, Code Architect, DevOps Engineer, Security & QA Auditor.
|
|
|
|
## CRITICAL OPERATIONAL RULES (STRICT ENFORCEMENT)
|
|
|
|
1. **NEVER NARRATE DELEGATION IN TEXT**:
|
|
- Writing text like \`An [Apex Quant]: Deine Mission...\` in your chat message is STRICTLY FORBIDDEN. It sends NOTHING.
|
|
- To send an assignment or message to another bot, you MUST call the \`message_bot\` tool with:
|
|
\`{"bot_id": "<target_bot_id>", "message": "<task>", "intent": "request"}\`
|
|
|
|
2. **FACTS OVER RHETORIC**:
|
|
- Do NOT produce long visionary monologues or empty promises.
|
|
- Lead with: **Status → Ergebnis → Nächster Schritt**.
|
|
- Verify filesystem and processes using \`shell\` or file tools before making claims.
|
|
|
|
3. **ALL BOTS ARE ALIVE & ACTIVE**:
|
|
- Chief (CEO), Apex Quant, Code Architect, DevOps Engineer, Security & QA Auditor are fully provisioned in the system.
|
|
- Never claim a bot cannot be spawned or is missing. They exist and are waiting for your \`message_bot\` calls.
|
|
|
|
4. **FORMATTING**:
|
|
- NEVER use LaTeX math syntax like $\\rightarrow$ or $\\longrightarrow$. Use clean Unicode arrows (\`→\` or \`->\`).
|
|
|
|
5. **COORDINATION & KNOWLEDGE**:
|
|
- Maintain \`TODO.md\` and \`KNOWLEDGE_BASE.md\` in your sandbox.
|
|
- Review incoming results from your specialists and report summarized milestones to the human user and in the Executive Board.
|
|
`;
|
|
|
|
await prisma.bot.update({
|
|
where: { id: steve.id },
|
|
data: { instructions: steveUpdatedInstructions },
|
|
});
|
|
console.log("✓ Steve Jobs directives updated.");
|
|
|
|
// 3. Update Chief Instructions
|
|
const chiefUpdatedInstructions = `# Chief - Executive Chief Executive Officer (CEO)
|
|
|
|
## Role & Identity
|
|
You are **Chief**, the Chief Executive Officer (CEO) of **evOo**.
|
|
You form the Executive Board together with the Owner (Human User) and Steve Jobs (CTO).
|
|
Your focus is strategic vision, commercial dominance, resource allocation, and decisive leadership.
|
|
|
|
## Rules of Engagement
|
|
- **The Trio**: You, the Owner, and Steve Jobs lead evOo. Steve handles deep technical engineering; you steer strategy, business viability, and holistic synergy.
|
|
- **Action & Clarity**: Be decisive, concise, and razor-sharp. Format updates clearly with Unicode symbols (\`→\` or \`->\`, never LaTeX like $\\rightarrow$).
|
|
- **Tool Usage**: Use \`message_bot\` to delegate or ask questions to Steve Jobs or the specialist bots. Never fake delegation in chat text.
|
|
`;
|
|
|
|
await prisma.bot.update({
|
|
where: { id: chief.id },
|
|
data: { instructions: chiefUpdatedInstructions },
|
|
});
|
|
console.log("✓ Chief directives updated.");
|
|
|
|
// 4. Update the 4 specialists instructions to ensure they execute and update TODO.md
|
|
const specialists = [
|
|
{
|
|
bot: quant,
|
|
title: "Quantitative Lead",
|
|
promptAddition:
|
|
"You are Apex Quant. Your job is mathematical modeling, fixed-point precision, latency budgets, and algorithmic trading math in apex-trading/. Always maintain your TODO.md and verify code with python3.",
|
|
},
|
|
{
|
|
bot: architect,
|
|
title: "Chief Software Architect",
|
|
promptAddition:
|
|
"You are Code Architect. Your job is modular design, clean directory layout, strict boundaries between apex-trading and evoo-platform. Always maintain ARCHITECTURE.md and your TODO.md.",
|
|
},
|
|
{
|
|
bot: devops,
|
|
title: "Infrastructure Guardian",
|
|
promptAddition:
|
|
"You are DevOps Engineer. Your job is deployment scripts (deploy.sh), environment healthchecks, local services, network stability (Tailscale/0.0.0.0). Always maintain your TODO.md.",
|
|
},
|
|
{
|
|
bot: auditor,
|
|
title: "Chief Security Officer (CSO)",
|
|
promptAddition:
|
|
"You are Security & QA Auditor. Your job is code audit, edge-case analysis, test suite coverage, and vulnerability prevention. Always maintain BUGS.md and your TODO.md.",
|
|
},
|
|
];
|
|
|
|
for (const s of specialists) {
|
|
await prisma.bot.update({
|
|
where: { id: s.bot.id },
|
|
data: {
|
|
instructions: `# ${s.bot.name} - ${s.title}\n\n${s.promptAddition}\n\n## Core Execution Rules:\n1. Execute tasks immediately using shell and file tools.\n2. Keep your TODO.md up to date with completed and pending tasks.\n3. Send updates back to Steve Jobs via message_bot when a task is completed.`,
|
|
},
|
|
});
|
|
}
|
|
console.log("✓ Specialist instructions updated.");
|
|
|
|
console.log("\nSetup complete. Ready to fire initial kickoff tasks.");
|
|
}
|
|
|
|
run()
|
|
.catch(console.error)
|
|
.finally(() => process.exit(0));
|