UNPKG

@samiyev/guardian

Version:

Research-backed code quality guardian for AI-assisted development. Detects hardcodes, secrets, circular deps, framework leaks, entity exposure, and 9 architecture violations. Enforces Clean Architecture/DDD principles. Works with GitHub Copilot, Cursor, W

50 lines 1.8 kB
import { ValueObject } from "./ValueObject"; interface AggregateBoundaryViolationProps { readonly fromAggregate: string; readonly toAggregate: string; readonly entityName: string; readonly importPath: string; readonly filePath: string; readonly line?: number; } /** * Represents an aggregate boundary violation in the codebase * * Aggregate boundary violations occur when an entity from one aggregate * directly references an entity from another aggregate, violating DDD principles: * - Aggregates should reference each other only by ID or Value Objects * - Direct entity references create tight coupling between aggregates * - Changes to one aggregate should not require changes to another * * @example * ```typescript * // Bad: Direct entity reference across aggregates * const violation = AggregateBoundaryViolation.create( * 'order', * 'user', * 'User', * '../user/User', * 'src/domain/aggregates/order/Order.ts', * 5 * ) * * console.log(violation.getMessage()) * // "Order aggregate should not directly reference User entity from User aggregate" * ``` */ export declare class AggregateBoundaryViolation extends ValueObject<AggregateBoundaryViolationProps> { private constructor(); static create(fromAggregate: string, toAggregate: string, entityName: string, importPath: string, filePath: string, line?: number): AggregateBoundaryViolation; get fromAggregate(): string; get toAggregate(): string; get entityName(): string; get importPath(): string; get filePath(): string; get line(): number | undefined; getMessage(): string; getSuggestion(): string; getExampleFix(): string; private capitalizeFirst; } export {}; //# sourceMappingURL=AggregateBoundaryViolation.d.ts.map