/** * Compose Command — Natural language design intent → structured execution. * * This is the autonomous agent entry point. Give it a design intent * and it will: * 1. Classify the intent (token-update, component-create, page-layout, etc.) * 2. Build a plan of sub-agent tasks with dependencies * 3. Execute tasks topologically (parallel where possible) * 4. Report results with mutations and timing * * Usage: * memi compose "create a login page with email and password fields" * memi compose "update the color palette to use warmer tones" --dry-run * memi compose "audit the design system for accessibility" --verbose */ import type { Command } from "commander"; import type { MemoireEngine } from "../engine/core.js"; import type { SubTask } from "../agents/index.js"; export interface ComposePayload { intent: string; category: string; ai: { apiKey: boolean; calls: number; usage: string | null; mode: string; }; options: { dryRun: boolean; autoSync: boolean; verbose: boolean; }; plan: ComposePlanPayload; execution: ComposeExecutionPayload; } export interface ComposePlanPayload { id: string; intent: string; category: string; createdAt: string; totalTasks: number; tasks: ComposeTaskPayload[]; } export interface ComposeTaskPayload { id: string; name: string; agentType: string; dependencies: string[]; targetSpecs: string[]; status: SubTask["status"]; error: string | null; startedAt: string | null; completedAt: string | null; result: unknown; } export interface ComposeExecutionPayload { planId: string; status: "completed" | "partial" | "failed"; completedTasks: number; totalTasks: number; mutationCount: number; mutations: { type: string; target: string; detail: string; before?: unknown; after?: unknown; }[]; figmaSynced: boolean; elapsedMs: number; } export declare function registerComposeCommand(program: Command, engine: MemoireEngine): void;