UNPKG

@emmahyde/thinking-patterns

Version:

MCP server combining systematic thinking, mental models, debugging approaches, and stochastic algorithms for comprehensive cognitive pattern support

337 lines (336 loc) 13.6 kB
import { z } from 'zod'; /** * Critical Thinking Schema * * Defines the structure for systematic critical analysis of code, designs, * requirements, or concepts. Includes identification of potential issues, * edge cases, invalid assumptions, and alternative approaches. */ export declare const IssueSchema: z.ZodObject<{ id: z.ZodOptional<z.ZodString>; description: z.ZodString; severity: z.ZodEnum<["low", "medium", "high", "critical"]>; category: z.ZodEnum<["logic", "implementation", "design", "security", "performance", "usability", "maintainability"]>; evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; likelihood: z.ZodNumber; impact: z.ZodOptional<z.ZodString>; mitigation: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { description: string; category: "performance" | "security" | "usability" | "maintainability" | "design" | "logic" | "implementation"; severity: "low" | "medium" | "high" | "critical"; likelihood: number; id?: string | undefined; evidence?: string[] | undefined; impact?: string | undefined; mitigation?: string | undefined; }, { description: string; category: "performance" | "security" | "usability" | "maintainability" | "design" | "logic" | "implementation"; severity: "low" | "medium" | "high" | "critical"; likelihood: number; id?: string | undefined; evidence?: string[] | undefined; impact?: string | undefined; mitigation?: string | undefined; }>; export declare const EdgeCaseSchema: z.ZodObject<{ id: z.ZodOptional<z.ZodString>; scenario: z.ZodString; conditions: z.ZodArray<z.ZodString, "many">; expectedBehavior: z.ZodOptional<z.ZodString>; currentBehavior: z.ZodOptional<z.ZodString>; testability: z.ZodEnum<["easy", "moderate", "difficult", "untestable"]>; businessImpact: z.ZodEnum<["none", "low", "medium", "high"]>; }, "strip", z.ZodTypeAny, { scenario: string; conditions: string[]; testability: "moderate" | "easy" | "difficult" | "untestable"; businessImpact: "low" | "medium" | "high" | "none"; id?: string | undefined; expectedBehavior?: string | undefined; currentBehavior?: string | undefined; }, { scenario: string; conditions: string[]; testability: "moderate" | "easy" | "difficult" | "untestable"; businessImpact: "low" | "medium" | "high" | "none"; id?: string | undefined; expectedBehavior?: string | undefined; currentBehavior?: string | undefined; }>; export declare const AssumptionSchema: z.ZodObject<{ id: z.ZodOptional<z.ZodString>; statement: z.ZodString; validity: z.ZodEnum<["valid", "questionable", "invalid", "unknown"]>; dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; consequences: z.ZodOptional<z.ZodString>; verification: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { statement: string; validity: "valid" | "unknown" | "questionable" | "invalid"; id?: string | undefined; dependencies?: string[] | undefined; consequences?: string | undefined; verification?: string | undefined; }, { statement: string; validity: "valid" | "unknown" | "questionable" | "invalid"; id?: string | undefined; dependencies?: string[] | undefined; consequences?: string | undefined; verification?: string | undefined; }>; export declare const AlternativeApproachSchema: z.ZodObject<{ id: z.ZodOptional<z.ZodString>; name: z.ZodString; description: z.ZodString; advantages: z.ZodArray<z.ZodString, "many">; disadvantages: z.ZodArray<z.ZodString, "many">; complexity: z.ZodEnum<["low", "medium", "high"]>; feasibility: z.ZodNumber; timeToImplement: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { description: string; name: string; complexity: "low" | "medium" | "high"; advantages: string[]; disadvantages: string[]; feasibility: number; id?: string | undefined; timeToImplement?: string | undefined; }, { description: string; name: string; complexity: "low" | "medium" | "high"; advantages: string[]; disadvantages: string[]; feasibility: number; id?: string | undefined; timeToImplement?: string | undefined; }>; export declare const CriticalThinkingSchema: z.ZodObject<{ subject: z.ZodString; analysisId: z.ZodOptional<z.ZodString>; context: z.ZodOptional<z.ZodString>; objectives: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; methodology: z.ZodOptional<z.ZodString>; potentialIssues: z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; description: z.ZodString; severity: z.ZodEnum<["low", "medium", "high", "critical"]>; category: z.ZodEnum<["logic", "implementation", "design", "security", "performance", "usability", "maintainability"]>; evidence: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; likelihood: z.ZodNumber; impact: z.ZodOptional<z.ZodString>; mitigation: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { description: string; category: "performance" | "security" | "usability" | "maintainability" | "design" | "logic" | "implementation"; severity: "low" | "medium" | "high" | "critical"; likelihood: number; id?: string | undefined; evidence?: string[] | undefined; impact?: string | undefined; mitigation?: string | undefined; }, { description: string; category: "performance" | "security" | "usability" | "maintainability" | "design" | "logic" | "implementation"; severity: "low" | "medium" | "high" | "critical"; likelihood: number; id?: string | undefined; evidence?: string[] | undefined; impact?: string | undefined; mitigation?: string | undefined; }>, "many">; edgeCases: z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; scenario: z.ZodString; conditions: z.ZodArray<z.ZodString, "many">; expectedBehavior: z.ZodOptional<z.ZodString>; currentBehavior: z.ZodOptional<z.ZodString>; testability: z.ZodEnum<["easy", "moderate", "difficult", "untestable"]>; businessImpact: z.ZodEnum<["none", "low", "medium", "high"]>; }, "strip", z.ZodTypeAny, { scenario: string; conditions: string[]; testability: "moderate" | "easy" | "difficult" | "untestable"; businessImpact: "low" | "medium" | "high" | "none"; id?: string | undefined; expectedBehavior?: string | undefined; currentBehavior?: string | undefined; }, { scenario: string; conditions: string[]; testability: "moderate" | "easy" | "difficult" | "untestable"; businessImpact: "low" | "medium" | "high" | "none"; id?: string | undefined; expectedBehavior?: string | undefined; currentBehavior?: string | undefined; }>, "many">; invalidAssumptions: z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; statement: z.ZodString; validity: z.ZodEnum<["valid", "questionable", "invalid", "unknown"]>; dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; consequences: z.ZodOptional<z.ZodString>; verification: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { statement: string; validity: "valid" | "unknown" | "questionable" | "invalid"; id?: string | undefined; dependencies?: string[] | undefined; consequences?: string | undefined; verification?: string | undefined; }, { statement: string; validity: "valid" | "unknown" | "questionable" | "invalid"; id?: string | undefined; dependencies?: string[] | undefined; consequences?: string | undefined; verification?: string | undefined; }>, "many">; alternativeApproaches: z.ZodArray<z.ZodObject<{ id: z.ZodOptional<z.ZodString>; name: z.ZodString; description: z.ZodString; advantages: z.ZodArray<z.ZodString, "many">; disadvantages: z.ZodArray<z.ZodString, "many">; complexity: z.ZodEnum<["low", "medium", "high"]>; feasibility: z.ZodNumber; timeToImplement: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { description: string; name: string; complexity: "low" | "medium" | "high"; advantages: string[]; disadvantages: string[]; feasibility: number; id?: string | undefined; timeToImplement?: string | undefined; }, { description: string; name: string; complexity: "low" | "medium" | "high"; advantages: string[]; disadvantages: string[]; feasibility: number; id?: string | undefined; timeToImplement?: string | undefined; }>, "many">; confidenceLevel: z.ZodOptional<z.ZodNumber>; analysisDepth: z.ZodOptional<z.ZodEnum<["surface", "moderate", "deep", "comprehensive"]>>; timeSpent: z.ZodOptional<z.ZodString>; reviewers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; overallAssessment: z.ZodOptional<z.ZodString>; prioritizedRecommendations: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; nextSteps: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; followUpQuestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { alternativeApproaches: { description: string; name: string; complexity: "low" | "medium" | "high"; advantages: string[]; disadvantages: string[]; feasibility: number; id?: string | undefined; timeToImplement?: string | undefined; }[]; subject: string; potentialIssues: { description: string; category: "performance" | "security" | "usability" | "maintainability" | "design" | "logic" | "implementation"; severity: "low" | "medium" | "high" | "critical"; likelihood: number; id?: string | undefined; evidence?: string[] | undefined; impact?: string | undefined; mitigation?: string | undefined; }[]; edgeCases: { scenario: string; conditions: string[]; testability: "moderate" | "easy" | "difficult" | "untestable"; businessImpact: "low" | "medium" | "high" | "none"; id?: string | undefined; expectedBehavior?: string | undefined; currentBehavior?: string | undefined; }[]; invalidAssumptions: { statement: string; validity: "valid" | "unknown" | "questionable" | "invalid"; id?: string | undefined; dependencies?: string[] | undefined; consequences?: string | undefined; verification?: string | undefined; }[]; nextSteps?: string[] | undefined; methodology?: string | undefined; context?: string | undefined; objectives?: string[] | undefined; analysisId?: string | undefined; confidenceLevel?: number | undefined; analysisDepth?: "moderate" | "surface" | "deep" | "comprehensive" | undefined; timeSpent?: string | undefined; reviewers?: string[] | undefined; overallAssessment?: string | undefined; prioritizedRecommendations?: string[] | undefined; followUpQuestions?: string[] | undefined; }, { alternativeApproaches: { description: string; name: string; complexity: "low" | "medium" | "high"; advantages: string[]; disadvantages: string[]; feasibility: number; id?: string | undefined; timeToImplement?: string | undefined; }[]; subject: string; potentialIssues: { description: string; category: "performance" | "security" | "usability" | "maintainability" | "design" | "logic" | "implementation"; severity: "low" | "medium" | "high" | "critical"; likelihood: number; id?: string | undefined; evidence?: string[] | undefined; impact?: string | undefined; mitigation?: string | undefined; }[]; edgeCases: { scenario: string; conditions: string[]; testability: "moderate" | "easy" | "difficult" | "untestable"; businessImpact: "low" | "medium" | "high" | "none"; id?: string | undefined; expectedBehavior?: string | undefined; currentBehavior?: string | undefined; }[]; invalidAssumptions: { statement: string; validity: "valid" | "unknown" | "questionable" | "invalid"; id?: string | undefined; dependencies?: string[] | undefined; consequences?: string | undefined; verification?: string | undefined; }[]; nextSteps?: string[] | undefined; methodology?: string | undefined; context?: string | undefined; objectives?: string[] | undefined; analysisId?: string | undefined; confidenceLevel?: number | undefined; analysisDepth?: "moderate" | "surface" | "deep" | "comprehensive" | undefined; timeSpent?: string | undefined; reviewers?: string[] | undefined; overallAssessment?: string | undefined; prioritizedRecommendations?: string[] | undefined; followUpQuestions?: string[] | undefined; }>; export type CriticalThinkingData = z.infer<typeof CriticalThinkingSchema>; export type IssueData = z.infer<typeof IssueSchema>; export type EdgeCaseData = z.infer<typeof EdgeCaseSchema>; export type AssumptionData = z.infer<typeof AssumptionSchema>; export type AlternativeApproachData = z.infer<typeof AlternativeApproachSchema>;