UNPKG

ai-expert-workflow-mcp

Version:

Enhanced AI Expert Workflow MCP Server with structured conversation flow, topic tracking, and optional Task Master integration

77 lines (76 loc) 4.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.experts = exports.STAGE_INTRODUCTIONS = exports.STAGE_COMPLETION_CRITERIA = exports.EXPERT_STAGE_MAPPING = exports.EXPERT_WORKFLOW_STAGES = void 0; exports.getStageIntroduction = getStageIntroduction; exports.getTopicPhrases = getTopicPhrases; const productManager_1 = require("./productManager"); const uxDesigner_1 = require("./uxDesigner"); const softwareArchitect_1 = require("./softwareArchitect"); // Define workflow stages exports.EXPERT_WORKFLOW_STAGES = { PRODUCT_DEFINITION: 'product_definition', UX_DESIGN: 'ux_design', TECHNICAL_PLANNING: 'technical_planning' }; // Map stages to experts exports.EXPERT_STAGE_MAPPING = { [exports.EXPERT_WORKFLOW_STAGES.PRODUCT_DEFINITION]: 'productManager', [exports.EXPERT_WORKFLOW_STAGES.UX_DESIGN]: 'uxDesigner', [exports.EXPERT_WORKFLOW_STAGES.TECHNICAL_PLANNING]: 'softwareArchitect' }; // Define completion criteria for each stage exports.STAGE_COMPLETION_CRITERIA = { [exports.EXPERT_WORKFLOW_STAGES.PRODUCT_DEFINITION]: [ 'product_vision', 'user_personas', 'business_requirements', 'feature_map', 'success_criteria' ], [exports.EXPERT_WORKFLOW_STAGES.UX_DESIGN]: [ 'ui_documentation', 'feature_specifications', 'user_journeys', 'interaction_patterns', 'data_requirements' ], [exports.EXPERT_WORKFLOW_STAGES.TECHNICAL_PLANNING]: [ 'technical_architecture', 'api_specifications', 'implementation_tasks', 'database_schema', 'testing_strategy' ] }; // Stage introduction messages exports.STAGE_INTRODUCTIONS = { [exports.EXPERT_WORKFLOW_STAGES.PRODUCT_DEFINITION]: "Let's start by defining your product with the AI Product Manager. We'll cover product vision, user personas, business requirements, feature mapping, and success criteria.", [exports.EXPERT_WORKFLOW_STAGES.UX_DESIGN]: "Now let's design the user experience with the AI UX Designer. We'll work on UI documentation, feature specifications, user journeys, interaction patterns, and data requirements.", [exports.EXPERT_WORKFLOW_STAGES.TECHNICAL_PLANNING]: "Finally, let's plan the technical implementation with the AI Software Architect. We'll define the technical architecture, API specifications, implementation tasks, database schema, and testing strategy." }; // Export experts object exports.experts = { productManager: productManager_1.productManager, uxDesigner: uxDesigner_1.uxDesigner, softwareArchitect: softwareArchitect_1.softwareArchitect }; // Helper function to get stage introduction function getStageIntroduction(stage) { return exports.STAGE_INTRODUCTIONS[stage] || "Let's continue with the next phase of the expert workflow."; } // Helper function to get topic phrases for detection function getTopicPhrases(topic) { const topicPhraseMap = { // Product Manager topics 'product_vision': ['product vision', 'product concept', 'overall vision', 'product overview'], 'user_personas': ['user personas', 'target audience', 'user profiles', 'customer segments'], 'business_requirements': ['business requirements', 'business goals', 'requirements', 'constraints'], 'feature_map': ['feature map', 'feature list', 'core features', 'functionality'], 'success_criteria': ['success criteria', 'KPIs', 'metrics', 'success measures'], // UX Designer topics 'ui_documentation': ['UI documentation', 'design system', 'visual design', 'UI components'], 'feature_specifications': ['feature specifications', 'detailed features', 'feature details'], 'user_journeys': ['user journeys', 'user flows', 'customer journey', 'user path'], 'interaction_patterns': ['interaction patterns', 'interactions', 'user interactions'], 'data_requirements': ['data requirements', 'data needs', 'information architecture'], // Software Architect topics 'technical_architecture': ['technical architecture', 'system architecture', 'architecture'], 'api_specifications': ['API specifications', 'API design', 'endpoints', 'services'], 'implementation_tasks': ['implementation tasks', 'development tasks', 'coding tasks'], 'database_schema': ['database schema', 'data model', 'database design'], 'testing_strategy': ['testing strategy', 'test plan', 'quality assurance'] }; return topicPhraseMap[topic] || [topic.replace('_', ' ')]; }