import { IFileSystem, ILogger } from '../../domain/interfaces'; export type PatternKind = 'pattern' | 'anti-pattern'; export type PatternCategory = 'data-ownership' | 'contracts' | 'resilience' | 'integration' | 'governance' | 'structure' | 'observability' | 'security' | 'ai-safety' | 'delivery'; export type PatternStatus = 'draft' | 'proposed' | 'accepted' | 'deprecated' | 'superseded'; export type PatternApplicability = 'required' | 'recommended' | 'optional' | 'not-applicable'; export interface PatternApplication { topology: string; applicability: PatternApplicability; guidance: string; } export interface PatternEnforcement { ruleId: string; engine: 'topology-ruleset' | 'adr-ruleset' | 'acl-ruleset' | 'cross-cutting-ruleset' | 'opa' | 'ci-guard'; ruleset?: string; statement?: string; threshold?: string; } export interface PatternGovernance { adr: string; track?: 'core' | 'nodejs' | 'dotnet' | 'android' | 'ai-augmented'; title?: string; href?: string; verification: 'verified' | 'asserted' | 'refuted'; verifiedOn?: string; note?: string; } export interface PatternRelationship { type: 'complements' | 'requires' | 'conflictsWith' | 'variantOf' | 'supersedes'; target: string; note?: string; } export interface PatternVariant { name: string; scope: 'module' | 'bounded-context' | 'service' | 'domain' | 'product' | 'cluster'; invariant: string; patternRef?: string; notes?: string; } export interface PatternImplementation { id: string; runtime: 'dotnet' | 'nodejs' | 'android' | 'python' | 'java' | 'go'; href: string; } export interface PatternRecord { id: string; name: string; aka?: string[]; kind: PatternKind; category: PatternCategory; status: PatternStatus; problem: string; forces: string[]; solution: string; whyProhibited?: string; requiredCorrection?: string; implementationGuide?: { href: string; summary?: string; normative?: boolean; caveats?: string[]; }; appliesTo: PatternApplication[]; variants?: PatternVariant[]; relationships?: PatternRelationship[]; governedBy?: PatternGovernance[]; enforcedBy: PatternEnforcement[]; implementations?: PatternImplementation[]; sources?: { href: string; note?: string; }[]; } export interface PatternCatalogFilters { category?: PatternCategory; kind?: PatternKind; topology?: string; enforced?: boolean; } export interface TopologyPatternApplication { pattern: PatternRecord; applicability: PatternApplicability; guidance: string; enforcedBy: PatternEnforcement[]; } export declare class PatternCatalogService { private readonly fs; private readonly logger; constructor(fs: IFileSystem, logger: ILogger); list(corePath: string, filters?: PatternCatalogFilters): Promise; get(corePath: string, patternId: string): Promise; listByTopology(corePath: string, topologyId: string): Promise; private candidateRoots; private matches; private findPatternFiles; private readPattern; }