@autobe/agent
Version:
AI backend server code generator
31 lines (30 loc) • 1.13 kB
TypeScript
import { AutoBeAnalyze, AutoBeAnalyzeWriteSectionEvent } from "@autobe/interface";
export interface IProseConstraintConflict {
entityAttr: string;
canonicalValues: number[];
proseValues: number[];
file: string;
sectionTitle: string;
context: string;
}
type FileSectionInput = Array<{
file: AutoBeAnalyze.IFileScenario;
sectionEvents: AutoBeAnalyzeWriteSectionEvent[][];
}>;
/**
* Detect prose-level constraint value conflicts between non-canonical files and
* the canonical 02-domain-model.
*
* Uses a value-driven approach: builds a reverse index of canonical attribute
* names, then scans prose text for those names near numeric constraint
* patterns. Catches all patterns regardless of backtick usage.
*/
export declare const detectProseConstraintConflicts: (props: {
files: FileSectionInput;
}) => IProseConstraintConflict[];
/**
* Build a map from filename → list of prose conflict feedback strings. Only
* non-canonical files appear in the map.
*/
export declare const buildFileProseConflictMap: (conflicts: IProseConstraintConflict[]) => Map<string, string[]>;
export {};