bc-code-intelligence-mcp
Version:
BC Code Intelligence MCP Server - Complete Specialist Bundle with AI-driven expert consultation, seamless handoffs, and context-preserving workflows
146 lines • 5.23 kB
TypeScript
/**
* Workflow Service - Persona-Driven Development Pipelines
* Orchestrates complete BC development workflows with specialist coordination
*/
import { KnowledgeService } from './knowledge-service.js';
import { MethodologyService } from './methodology-service.js';
import { SpecialistDiscoveryService } from './specialist-discovery.js';
export type WorkflowType = 'new-bc-app' | 'enhance-bc-app' | 'upgrade-bc-version' | 'add-ecosystem-features' | 'debug-bc-issues' | 'document-bc-solution' | 'modernize-bc-code' | 'onboard-developer' | 'review-bc-code' | 'app_takeover';
export interface WorkflowStartRequest {
workflow_type: WorkflowType;
project_context: string;
bc_version?: string;
additional_context?: Record<string, any>;
}
export interface BCWorkflowSession {
id: string;
type: WorkflowType;
current_phase: number;
specialist_pipeline: string[];
project_context: string;
bc_version?: string;
phase_results: PhaseResult[];
methodology_state: MethodologyState;
created_at: Date;
last_updated: Date;
status: 'active' | 'paused' | 'completed' | 'cancelled';
constitutional_gates: BCConstitutionalGates;
}
export interface PhaseResult {
phase_number: number;
specialist_id: string;
specialist_name: string;
guidance_provided: string;
decisions_made: string[];
next_steps: string[];
artifacts_created: string[];
methodology_validation: MethodologyValidation;
time_spent: number;
confidence_level: 'high' | 'medium' | 'low';
collaboration_needed: boolean;
}
export interface MethodologyState {
pipeline_methodology: string;
current_phase_methodology: string;
completed_methodologies: string[];
validation_results: MethodologyValidation[];
constitutional_gates: BCConstitutionalGates;
}
export interface MethodologyValidation {
methodology_id: string;
checklist_items: ChecklistValidation[];
completion_percentage: number;
quality_score: number;
recommendations: string[];
blocking_issues: string[];
}
export interface ChecklistValidation {
item: string;
status: 'completed' | 'partial' | 'not-started' | 'not-applicable';
evidence: string;
quality_notes: string;
}
export interface BCConstitutionalGates {
extensibility_compliance: boolean;
performance_consideration: boolean;
test_coverage_planned: boolean;
permission_model_defined: boolean;
documentation_planned: boolean;
bc_version_compliance: boolean;
integration_patterns: boolean;
}
export interface WorkflowAdvanceRequest {
workflow_id: string;
phase_results?: string;
specialist_notes?: string;
check_status_only?: boolean;
}
export interface WorkflowStatusResponse {
session: BCWorkflowSession;
current_specialist: any;
next_specialist?: any;
progress_percentage: number;
phase_summary: string;
next_actions: string[];
}
/**
* Core workflow orchestration service
* Manages complete BC development pipelines with specialist coordination
*/
export declare class WorkflowService {
private knowledgeService;
private methodologyService;
private specialistDiscoveryService;
private activeSessions;
private pipelineDefinitions;
constructor(knowledgeService: KnowledgeService, methodologyService: MethodologyService, specialistDiscoveryService: SpecialistDiscoveryService);
/**
* Start a new BC development workflow
* Overloaded method to support both single object and two-parameter calling patterns
*/
startWorkflow(request: WorkflowStartRequest): Promise<BCWorkflowSession>;
startWorkflow(workflowType: WorkflowType, context: {
context: string;
bc_version?: string;
additional_context?: Record<string, any>;
}): Promise<BCWorkflowSession>;
private startWorkflowInternal;
/**
* Advance workflow to the next phase or check status
*/
advancePhase(request: WorkflowAdvanceRequest): Promise<WorkflowStatusResponse>;
/**
* Get current workflow status and guidance
*/
getWorkflowStatus(workflowId: string): Promise<WorkflowStatusResponse>;
/**
* Get workflow guidance for current phase
*/
getPhaseGuidance(workflowId: string, detailed_context?: string): Promise<string>;
/**
* Get all active workflows
*/
getActiveWorkflows(): Promise<any[]>;
/**
* Get workflow methodology for a specific workflow
*/
getWorkflowMethodology(workflowId: string): Promise<any>;
/**
* Dynamically discover specialists relevant to a workflow type
* Uses the specialist discovery service to suggest appropriate specialists
*/
private discoverWorkflowSpecialists;
/**
* Initialize pipeline definitions for all workflow types
* Now uses dynamic specialist discovery instead of hard-coded lists
*/
private initializePipelineDefinitions;
private validatePhaseMethodology;
private getSpecialistPhaseGuidance;
private getPhaseMethodologyGuidance;
private generatePhaseSummary;
private generateNextActions;
private initializeConstitutionalGates;
private generateSessionId;
}
//# sourceMappingURL=workflow-service.d.ts.map