cortexweaver
Version:
CortexWeaver is a command-line interface (CLI) tool that orchestrates a swarm of specialized AI agents, powered by Claude Code and Gemini CLI, to assist in software development. It transforms a high-level project plan (plan.md) into a series of coordinate
110 lines • 3.75 kB
TypeScript
import { TaskData } from '../cognitive-canvas';
import { Feature } from '../plan-parser';
export type WorkflowStep = 'DEFINE_REQUIREMENTS' | 'FORMALIZE_CONTRACTS' | 'PROTOTYPE_LOGIC' | 'DESIGN_ARCHITECTURE' | 'IMPLEMENT_CODE' | 'EXECUTE_TESTS';
export type AgentType = 'SpecWriter' | 'Formalizer' | 'Prototyper' | 'Architect' | 'Coder' | 'Tester' | 'Reflector' | 'Monitor' | 'Guide' | 'Navigator' | 'ChicagoTester' | 'LondonTester' | 'PropertyTester' | 'MutationTester' | 'Debugger' | 'Governor' | 'Critique' | 'KnowledgeUpdater' | 'PerformanceOptimizer' | 'QualityGatekeeper' | 'TestResultDocumenter';
export interface WorkflowStepConfig {
step: WorkflowStep;
agentType: AgentType;
requiredPreviousSteps: WorkflowStep[];
critiqueRequired: boolean;
errorRecoveryEnabled: boolean;
}
export interface TaskWorkflowState {
currentStep: WorkflowStep;
completedSteps: WorkflowStep[];
}
export declare class WorkflowManager {
private workflowStepMap;
private taskWorkflowState;
private taskFeatureMap;
constructor();
/**
* Initialize workflow step configurations
*/
private initializeWorkflowSteps;
/**
* Initialize workflow states for all tasks
*/
initializeTaskWorkflowStates(tasks: TaskData[]): Promise<void>;
/**
* Set task-feature mapping
*/
setTaskFeatureMapping(taskId: string, feature: Feature): void;
/**
* Get workflow step configuration
*/
getWorkflowStepConfig(step: WorkflowStep): WorkflowStepConfig | undefined;
/**
* Get task workflow state
*/
getTaskWorkflowState(taskId: string): TaskWorkflowState | undefined;
/**
* Update task workflow state
*/
updateTaskWorkflowState(taskId: string, state: TaskWorkflowState): void;
/**
* Check if task is ready for current workflow step
*/
checkWorkflowStepReadiness(taskId: string): boolean;
/**
* Advance task to next workflow step
*/
advanceToNextStep(taskId: string): boolean;
/**
* Get next workflow step in sequence
*/
private getNextWorkflowStep;
/**
* Determine initial workflow step for agent type
*/
private determineInitialWorkflowStep;
/**
* Check if critique is required for current step
*/
isCritiqueRequired(taskId: string): boolean;
/**
* Check if error recovery is enabled for current step
*/
isErrorRecoveryEnabled(taskId: string): boolean;
/**
* Get agent type for current workflow step
*/
getAgentTypeForCurrentStep(taskId: string): AgentType | null;
/**
* Get workflow step guidance
*/
getStepSpecificGuidance(step: WorkflowStep): string;
/**
* Get required inputs for workflow step
*/
getRequiredInputsForStep(step: WorkflowStep): string[];
/**
* Get expected outputs for workflow step
*/
getExpectedOutputsForStep(step: WorkflowStep): string[];
/**
* Enhance query for workflow step context
*/
enhanceQueryForWorkflowStep(baseQuery: string, step: WorkflowStep): string;
/**
* Get targeted node types for workflow step
*/
getTargetedNodeTypes(step: WorkflowStep): string;
/**
* Get relevant properties for workflow step
*/
getRelevantProperties(step: WorkflowStep): string[];
/**
* Mark task for retry after error
*/
markTaskForRetry(taskId: string, step?: string): Promise<void>;
/**
* Skip current step in workflow
*/
skipCurrentStep(taskId: string, reason: string): Promise<void>;
/**
* Pause downstream tasks
*/
pauseDownstreamTasks(taskId: string, duration: number): Promise<void>;
}
//# sourceMappingURL=workflow-manager.d.ts.map