@emmahyde/thinking-patterns
Version:
MCP server combining systematic thinking, mental models, debugging approaches, and stochastic algorithms for comprehensive cognitive pattern support
390 lines (389 loc) • 15.2 kB
TypeScript
import { z } from 'zod';
/**
* Domain Modeling Schema
*
* Defines the structure for domain-driven design and modeling processes.
* Includes entities, relationships, domain rules, bounded contexts,
* and validation frameworks for comprehensive domain analysis.
*/
export declare const EntitySchema: z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodString;
description: z.ZodString;
attributes: z.ZodArray<z.ZodString, "many">;
behaviors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
invariants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
name: string;
attributes: string[];
id?: string | undefined;
constraints?: string[] | undefined;
behaviors?: string[] | undefined;
invariants?: string[] | undefined;
}, {
description: string;
name: string;
attributes: string[];
id?: string | undefined;
constraints?: string[] | undefined;
behaviors?: string[] | undefined;
invariants?: string[] | undefined;
}>;
export declare const RelationshipSchema: z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodString;
type: z.ZodEnum<["one-to-one", "one-to-many", "many-to-many", "inheritance", "composition", "aggregation", "dependency"]>;
sourceEntity: z.ZodString;
targetEntity: z.ZodString;
description: z.ZodString;
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
cardinality: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "one-to-one" | "one-to-many" | "many-to-many" | "inheritance" | "composition" | "aggregation" | "dependency";
description: string;
name: string;
sourceEntity: string;
targetEntity: string;
id?: string | undefined;
constraints?: string[] | undefined;
cardinality?: string | undefined;
}, {
type: "one-to-one" | "one-to-many" | "many-to-many" | "inheritance" | "composition" | "aggregation" | "dependency";
description: string;
name: string;
sourceEntity: string;
targetEntity: string;
id?: string | undefined;
constraints?: string[] | undefined;
cardinality?: string | undefined;
}>;
export declare const DomainRuleSchema: z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodString;
description: z.ZodString;
type: z.ZodEnum<["business-rule", "validation-rule", "constraint", "invariant", "axiom"]>;
entities: z.ZodArray<z.ZodString, "many">;
condition: z.ZodString;
consequence: z.ZodOptional<z.ZodString>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
}, "strip", z.ZodTypeAny, {
type: "business-rule" | "validation-rule" | "constraint" | "invariant" | "axiom";
description: string;
name: string;
entities: string[];
condition: string;
priority?: "low" | "medium" | "high" | "critical" | undefined;
id?: string | undefined;
consequence?: string | undefined;
}, {
type: "business-rule" | "validation-rule" | "constraint" | "invariant" | "axiom";
description: string;
name: string;
entities: string[];
condition: string;
priority?: "low" | "medium" | "high" | "critical" | undefined;
id?: string | undefined;
consequence?: string | undefined;
}>;
export declare const BoundarySchema: z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
includedEntities: z.ZodArray<z.ZodString, "many">;
excludedConcepts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
interfaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
responsibilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
name: string;
includedEntities: string[];
excludedConcepts?: string[] | undefined;
interfaces?: string[] | undefined;
responsibilities?: string[] | undefined;
}, {
description: string;
name: string;
includedEntities: string[];
excludedConcepts?: string[] | undefined;
interfaces?: string[] | undefined;
responsibilities?: string[] | undefined;
}>;
export declare const ModelValidationSchema: z.ZodObject<{
completeness: z.ZodNumber;
consistency: z.ZodNumber;
correctness: z.ZodNumber;
issues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
completeness: number;
consistency: number;
correctness: number;
issues?: string[] | undefined;
suggestions?: string[] | undefined;
}, {
completeness: number;
consistency: number;
correctness: number;
issues?: string[] | undefined;
suggestions?: string[] | undefined;
}>;
export declare const DomainModelingSchema: z.ZodObject<{
domainName: z.ZodString;
description: z.ZodString;
modelingId: z.ZodString;
iteration: z.ZodNumber;
stage: z.ZodEnum<["analysis", "conceptual", "logical", "physical", "validation", "refinement"]>;
entities: z.ZodArray<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodString;
description: z.ZodString;
attributes: z.ZodArray<z.ZodString, "many">;
behaviors: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
invariants: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
name: string;
attributes: string[];
id?: string | undefined;
constraints?: string[] | undefined;
behaviors?: string[] | undefined;
invariants?: string[] | undefined;
}, {
description: string;
name: string;
attributes: string[];
id?: string | undefined;
constraints?: string[] | undefined;
behaviors?: string[] | undefined;
invariants?: string[] | undefined;
}>, "many">;
relationships: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodString;
type: z.ZodEnum<["one-to-one", "one-to-many", "many-to-many", "inheritance", "composition", "aggregation", "dependency"]>;
sourceEntity: z.ZodString;
targetEntity: z.ZodString;
description: z.ZodString;
constraints: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
cardinality: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type: "one-to-one" | "one-to-many" | "many-to-many" | "inheritance" | "composition" | "aggregation" | "dependency";
description: string;
name: string;
sourceEntity: string;
targetEntity: string;
id?: string | undefined;
constraints?: string[] | undefined;
cardinality?: string | undefined;
}, {
type: "one-to-one" | "one-to-many" | "many-to-many" | "inheritance" | "composition" | "aggregation" | "dependency";
description: string;
name: string;
sourceEntity: string;
targetEntity: string;
id?: string | undefined;
constraints?: string[] | undefined;
cardinality?: string | undefined;
}>, "many">>;
domainRules: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
name: z.ZodString;
description: z.ZodString;
type: z.ZodEnum<["business-rule", "validation-rule", "constraint", "invariant", "axiom"]>;
entities: z.ZodArray<z.ZodString, "many">;
condition: z.ZodString;
consequence: z.ZodOptional<z.ZodString>;
priority: z.ZodOptional<z.ZodEnum<["low", "medium", "high", "critical"]>>;
}, "strip", z.ZodTypeAny, {
type: "business-rule" | "validation-rule" | "constraint" | "invariant" | "axiom";
description: string;
name: string;
entities: string[];
condition: string;
priority?: "low" | "medium" | "high" | "critical" | undefined;
id?: string | undefined;
consequence?: string | undefined;
}, {
type: "business-rule" | "validation-rule" | "constraint" | "invariant" | "axiom";
description: string;
name: string;
entities: string[];
condition: string;
priority?: "low" | "medium" | "high" | "critical" | undefined;
id?: string | undefined;
consequence?: string | undefined;
}>, "many">>;
boundaries: z.ZodOptional<z.ZodObject<{
name: z.ZodString;
description: z.ZodString;
includedEntities: z.ZodArray<z.ZodString, "many">;
excludedConcepts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
interfaces: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
responsibilities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
name: string;
includedEntities: string[];
excludedConcepts?: string[] | undefined;
interfaces?: string[] | undefined;
responsibilities?: string[] | undefined;
}, {
description: string;
name: string;
includedEntities: string[];
excludedConcepts?: string[] | undefined;
interfaces?: string[] | undefined;
responsibilities?: string[] | undefined;
}>>;
assumptions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
stakeholders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
useCases: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
modelValidation: z.ZodOptional<z.ZodObject<{
completeness: z.ZodNumber;
consistency: z.ZodNumber;
correctness: z.ZodNumber;
issues: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
suggestions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
completeness: number;
consistency: number;
correctness: number;
issues?: string[] | undefined;
suggestions?: string[] | undefined;
}, {
completeness: number;
consistency: number;
correctness: number;
issues?: string[] | undefined;
suggestions?: string[] | undefined;
}>>;
abstractionLevel: z.ZodEnum<["high", "medium", "low"]>;
paradigm: z.ZodEnum<["object-oriented", "relational", "functional", "event-driven", "service-oriented", "domain-driven"]>;
nextStageNeeded: z.ZodBoolean;
suggestedNextStage: z.ZodOptional<z.ZodString>;
modelingNotes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
description: string;
stage: "validation" | "refinement" | "analysis" | "conceptual" | "logical" | "physical";
iteration: number;
nextStageNeeded: boolean;
entities: {
description: string;
name: string;
attributes: string[];
id?: string | undefined;
constraints?: string[] | undefined;
behaviors?: string[] | undefined;
invariants?: string[] | undefined;
}[];
domainName: string;
modelingId: string;
abstractionLevel: "low" | "medium" | "high";
paradigm: "functional" | "object-oriented" | "relational" | "event-driven" | "service-oriented" | "domain-driven";
stakeholders?: string[] | undefined;
suggestedNextStage?: string | undefined;
assumptions?: string[] | undefined;
relationships?: {
type: "one-to-one" | "one-to-many" | "many-to-many" | "inheritance" | "composition" | "aggregation" | "dependency";
description: string;
name: string;
sourceEntity: string;
targetEntity: string;
id?: string | undefined;
constraints?: string[] | undefined;
cardinality?: string | undefined;
}[] | undefined;
domainRules?: {
type: "business-rule" | "validation-rule" | "constraint" | "invariant" | "axiom";
description: string;
name: string;
entities: string[];
condition: string;
priority?: "low" | "medium" | "high" | "critical" | undefined;
id?: string | undefined;
consequence?: string | undefined;
}[] | undefined;
boundaries?: {
description: string;
name: string;
includedEntities: string[];
excludedConcepts?: string[] | undefined;
interfaces?: string[] | undefined;
responsibilities?: string[] | undefined;
} | undefined;
useCases?: string[] | undefined;
modelValidation?: {
completeness: number;
consistency: number;
correctness: number;
issues?: string[] | undefined;
suggestions?: string[] | undefined;
} | undefined;
modelingNotes?: string[] | undefined;
}, {
description: string;
stage: "validation" | "refinement" | "analysis" | "conceptual" | "logical" | "physical";
iteration: number;
nextStageNeeded: boolean;
entities: {
description: string;
name: string;
attributes: string[];
id?: string | undefined;
constraints?: string[] | undefined;
behaviors?: string[] | undefined;
invariants?: string[] | undefined;
}[];
domainName: string;
modelingId: string;
abstractionLevel: "low" | "medium" | "high";
paradigm: "functional" | "object-oriented" | "relational" | "event-driven" | "service-oriented" | "domain-driven";
stakeholders?: string[] | undefined;
suggestedNextStage?: string | undefined;
assumptions?: string[] | undefined;
relationships?: {
type: "one-to-one" | "one-to-many" | "many-to-many" | "inheritance" | "composition" | "aggregation" | "dependency";
description: string;
name: string;
sourceEntity: string;
targetEntity: string;
id?: string | undefined;
constraints?: string[] | undefined;
cardinality?: string | undefined;
}[] | undefined;
domainRules?: {
type: "business-rule" | "validation-rule" | "constraint" | "invariant" | "axiom";
description: string;
name: string;
entities: string[];
condition: string;
priority?: "low" | "medium" | "high" | "critical" | undefined;
id?: string | undefined;
consequence?: string | undefined;
}[] | undefined;
boundaries?: {
description: string;
name: string;
includedEntities: string[];
excludedConcepts?: string[] | undefined;
interfaces?: string[] | undefined;
responsibilities?: string[] | undefined;
} | undefined;
useCases?: string[] | undefined;
modelValidation?: {
completeness: number;
consistency: number;
correctness: number;
issues?: string[] | undefined;
suggestions?: string[] | undefined;
} | undefined;
modelingNotes?: string[] | undefined;
}>;
export type DomainModelingData = z.infer<typeof DomainModelingSchema>;
export type EntityData = z.infer<typeof EntitySchema>;
export type RelationshipData = z.infer<typeof RelationshipSchema>;
export type DomainRuleData = z.infer<typeof DomainRuleSchema>;
export type BoundaryData = z.infer<typeof BoundarySchema>;
export type ModelValidationData = z.infer<typeof ModelValidationSchema>;