/** * Stable Workflow Handler * * Handles cortex.* tools for the stable workflow system * (spec, plan, tasks, implement, context, learn) * * Note: This file serves as a minimal router that delegates to specialized handlers. * The handlers below are organized by domain for better maintainability. */ import type { MCPToolResult, WorkflowToolArgs, MemoryToolArgs } from "../types/mcp-types.js"; import type { CheckpointFile } from "../types/checkpoint.js"; import type { PerformanceCategory } from "../types/performance.js"; export declare class StableWorkflowHandler { private projectRoot; private checkpointHandler; private memoryHandler; private specHandler; private planningHandler; private executionHandler; private statusHandler; private taskValidator; private implementationValidatorHandler; private releaseHandler; private onboardHandler; private constitutionHandler; private dangerZoneHandler; private environmentHandler; private dependencyHandler; private impactAnalysisHandler; private performanceAnalysisHandler; private teamKnowledgeHandler; constructor(projectRoot: string); /** * Unified workflow handler - routes to phase-specific handlers */ handleWorkflow(args: WorkflowToolArgs): Promise; /** * Unified memory handler - routes to action-specific handlers */ handleMemory(args: MemoryToolArgs): Promise; /** * Handle cortex.spec - Create feature specification * @deprecated Delegated to SpecHandler */ handleSpec(args: { description: string; }): Promise; /** * Handle clarify - Resolve specification ambiguities * @deprecated Delegated to SpecHandler */ handleClarify(args: { workflowId?: string; }): Promise; /** * Handle plan - Create implementation plan * @deprecated Delegated to PlanningHandler */ handlePlan(args: { workflowId?: string; }): Promise; /** * Handle review - Technical review of implementation plan * @deprecated Delegated to PlanningHandler */ handleReview(args: { workflowId?: string; }): Promise; /** * Handle tasks - Generate task breakdown * @deprecated Delegated to ExecutionHandler */ handleTasks(args: { workflowId?: string; }): Promise; /** * Handle implement - Execute implementation * @deprecated Delegated to ExecutionHandler */ handleImplement(args: { workflowId?: string; }): Promise; /** * Handle task decomposition - Break down a large task into smaller subtasks * @deprecated Delegated to TaskValidator */ handleTaskDecomposition(args: { workflowId: string; taskId: string; taskDescription: string; }): Promise; /** * Handle implementation validation - Check for mocks, TODOs, unused code * @deprecated Delegated to ImplementationValidatorHandler */ handleImplementationValidation(args: { changedFiles: string[]; }): Promise; /** * Handle cortex.context - Enhance context from memory * @deprecated Delegated to MemoryHandler */ handleContext(args: { query: string; }): Promise; /** * Handle cortex.correct - Record correction to prevent future mistakes * @deprecated Delegated to MemoryHandler */ handleCorrect(args: { wrongBehavior: string; correctBehavior: string; severity?: string; filePatterns?: string[]; triggerKeywords?: string[]; }): Promise; /** * Handle cortex.learn - Record experience to memory * @deprecated Delegated to MemoryHandler */ handleLearn(args: { title: string; content: string; type: string; tags?: string[]; }): Promise; /** * Handle status - Get workflow status * @deprecated Delegated to StatusHandler */ handleStatus(args: { workflowId?: string; }): Promise; /** * Handle list - List workflows * @deprecated Delegated to StatusHandler */ handleList(args: { limit?: number; }): Promise; /** * Handle release - Analyze changes and generate release documentation * @deprecated Delegated to ReleaseHandler */ handleRelease(args: { version?: string; tag?: boolean; push?: boolean; }): Promise; /** * Handle onboard - Interactive onboarding for first-time users * @deprecated Delegated to OnboardHandler */ handleOnboard(): Promise; /** * Handle constitution - Create or update project constitution * @deprecated Delegated to ConstitutionHandler */ handleConstitution(args: { updates?: string; }): Promise; /** * Handle mark-danger - Mark a code region as protected * @deprecated Delegated to DangerZoneHandler */ handleMarkDanger(args: { file: string; startLine?: number; endLine?: number; reason: string; }): Promise; /** * Handle unmark-danger - Remove protection from a code region * @deprecated Delegated to DangerZoneHandler */ handleUnmarkDanger(args: { file: string; line?: number; }): Promise; /** * Handle list-dangers - List all protected danger zones * @deprecated Delegated to DangerZoneHandler */ handleListDangers(): Promise; /** * Handle environment-detect - Auto-detect environments from project files * @deprecated Delegated to EnvironmentHandler */ handleEnvironmentDetect(): Promise; /** * Handle environment-add - Add or update environment profile * @deprecated Delegated to EnvironmentHandler */ handleEnvironmentAdd(args: { name: string; description?: string; nodeVersion?: string; envVarsMissing?: string[]; constraints?: string[]; }): Promise; /** * Handle environment-remove - Remove environment profile * @deprecated Delegated to EnvironmentHandler */ handleEnvironmentRemove(args: { name: string; }): Promise; /** * Handle environment-list - List all environment profiles * @deprecated Delegated to EnvironmentHandler */ handleEnvironmentList(): Promise; /** * Handle environment-check - Check code compatibility with environments * @deprecated Delegated to EnvironmentHandler */ handleEnvironmentCheck(args: { files: string[]; }): Promise; /** * Handle dependency-analyze - Analyze all project dependencies * @deprecated Delegated to DependencyHandler */ handleDependencyAnalyze(): Promise; /** * Handle dependency-check - Check dependency compatibility * @deprecated Delegated to DependencyHandler */ handleDependencyCheck(args: { files: string[]; }): Promise; /** * Handle dependency-version - Get version of a specific dependency * @deprecated Delegated to DependencyHandler */ handleDependencyVersion(args: { package: string; }): Promise; /** * Handle dependency-suggest - Suggest compatibility for adding new dependency * @deprecated Delegated to DependencyHandler */ handleDependencySuggest(args: { package: string; version?: string; }): Promise; /** * Handle checkpoint-save - Save task progress * @deprecated Delegated to CheckpointHandler */ handleCheckpointSave(args: { taskDescription: string; completed?: CheckpointFile[]; pending?: CheckpointFile[]; context?: string; nextStep?: string; workflowId?: string; }): Promise; /** * Handle checkpoint-resume - Resume from checkpoint * @deprecated Delegated to CheckpointHandler */ handleCheckpointResume(args: { checkpointId?: string; }): Promise; /** * Handle checkpoint-list - List saved checkpoints * @deprecated Delegated to CheckpointHandler */ handleCheckpointList(args: { limit?: number; }): Promise; /** * Handle checkpoint-clear - Clear checkpoint(s) * @deprecated Delegated to CheckpointHandler */ handleCheckpointClear(args: { checkpointId?: string; }): Promise; /** * Handle impact-build-graph - Build dependency graph * @deprecated Delegated to ImpactAnalysisHandler */ handleImpactBuildGraph(args: { forceRebuild?: boolean; }): Promise; /** * Handle impact-analyze - Analyze change impact * @deprecated Delegated to ImpactAnalysisHandler */ handleImpactAnalyze(args: { files: string[]; includeTests?: boolean; maxDepth?: number; excludePatterns?: string[]; }): Promise; /** * Handle impact-preview - Preview change impact * @deprecated Delegated to ImpactAnalysisHandler */ handleImpactPreview(args: { files: string[]; }): Promise; /** * Handle impact-validate - Validate changes * @deprecated Delegated to ImpactAnalysisHandler */ handleImpactValidate(args: { files: string[]; }): Promise; /** * Handle impact-stats - Get graph statistics * @deprecated Delegated to ImpactAnalysisHandler */ handleImpactStats(): Promise; /** * Handle performance-analyze - Analyze files for performance issues * @deprecated Delegated to PerformanceAnalysisHandler */ handlePerformanceAnalyze(args: { files: string[]; }): Promise; /** * Handle performance-list-patterns - List all performance patterns * @deprecated Delegated to PerformanceAnalysisHandler */ handlePerformanceListPatterns(): Promise; /** * Handle performance-add-pattern - Add custom pattern * @deprecated Delegated to PerformanceAnalysisHandler */ handlePerformanceAddPattern(args: { name: string; category: PerformanceCategory; description: string; regex: string; contextRegex?: string; severity: "info" | "warning" | "error"; suggestion: string; filePatterns?: string[]; }): Promise; /** * Handle performance-disable-pattern - Disable a pattern * @deprecated Delegated to PerformanceAnalysisHandler */ handlePerformanceDisablePattern(args: { patternName: string; }): Promise; /** * Handle performance-enable-pattern - Enable a pattern * @deprecated Delegated to PerformanceAnalysisHandler */ handlePerformanceEnablePattern(args: { patternName: string; }): Promise; /** * Handle team-share-insight - Share an insight with the team * @deprecated Delegated to TeamKnowledgeHandler */ handleTeamShareInsight(args: { title: string; content: string; type: "learning" | "pattern" | "decision" | "pr-review"; author: string; tags?: string[]; scope?: string; }): Promise; /** * Handle team-view-insights - View team insights * @deprecated Delegated to TeamKnowledgeHandler */ handleTeamViewInsights(args: { author?: string; type?: string; tags?: string[]; }): Promise; /** * Handle team-learn-pr - Learn from PR reviews * @deprecated Delegated to TeamKnowledgeHandler */ handleTeamLearnPR(args: { prNumber: number; }): Promise; /** * Handle team-view-conflicts - View team conflicts * @deprecated Delegated to TeamKnowledgeHandler */ handleTeamViewConflicts(): Promise; /** * Handle team-resolve-conflict - Resolve a conflict * @deprecated Delegated to TeamKnowledgeHandler */ handleTeamResolveConflict(args: { conflictId: string; resolution: string; }): Promise; /** * Handle team-sync - Sync team knowledge * @deprecated Delegated to TeamKnowledgeHandler */ handleTeamSync(args: { direction: "push" | "pull"; }): Promise; /** * Handle team-stats - Get team knowledge statistics * @deprecated Delegated to TeamKnowledgeHandler */ handleTeamStats(): Promise; } //# sourceMappingURL=stable-workflow-handler.d.ts.map