AutoBE
    Preparing search index...

    Interface AutoBePrismaCorrectEvent

    Event fired when the Prisma agent corrects validation failures in the database design.

    This event occurs when the custom Prisma compiler detects validation errors in the constructed AST structure and the Prisma agent receives feedback to correct compilation issues. The correction process represents the sophisticated feedback loop that enables AI self-correction, ensuring that only valid and semantically correct database designs proceed to final generation.

    The correction mechanism is essential for maintaining the reliability of the vibe coding pipeline, allowing the system to iteratively refine database designs until they meet all validation requirements and business constraints.

    Samchon

    interface AutoBePrismaCorrectEvent {
        correction: IApplication;
        created_at: string & Format<"date-time">;
        failure: IAutoBePrismaValidation.IFailure;
        id: string;
        metric: AutoBeFunctionCallingMetric;
        planning: string;
        step: number;
        tokenUsage: IAutoBeTokenUsageJson.IComponent;
        type: "prismaCorrect";
    }

    Hierarchy (View Summary)

    Index

    Properties

    correction: IApplication

    The corrected AST application structure addressing the validation failures.

    Contains the revised AutoBePrisma.IApplication structure that attempts to resolve the validation issues identified in the failure. The correction incorporates the feedback from the validation process to address relationship problems, fix constraint violations, resolve naming conflicts, or correct other structural issues.

    This corrected structure will undergo validation again to ensure that the modifications successfully resolve the identified problems while maintaining the integrity of the overall database design.

    created_at: string & Format<"date-time">

    Timestamp when the event was created.

    ISO 8601 formatted date-time string indicating when this event was emitted by the system. This timestamp is crucial for event ordering, performance analysis, and debugging the agent workflow execution timeline.

    Format: "YYYY-MM-DDTHH:mm:ss.sssZ" (e.g., "2024-01-15T14:30:45.123Z")

    The validation failure details that triggered the correction process.

    Contains the specific IAutoBePrismaValidation.IFailure information that describes what validation errors were detected in the database design. This includes details about relationship issues, constraint violations, naming problems, or other semantic errors that prevented successful validation.

    The failure information provides the diagnostic context necessary for the AI to understand what went wrong and make appropriate corrections to the database design.

    id: string

    A unique identifier for the event.

    Function calling trial statistics for the operation.

    Records the complete trial history of function calling attempts, tracking total executions, successful completions, consent requests, validation failures, and invalid JSON responses. These metrics reveal the reliability and quality of AI agent autonomous operation with tool usage.

    Trial statistics are critical for identifying operations where agents struggle with tool interfaces, generate invalid outputs, or require multiple correction attempts through self-healing spiral loops. High failure rates indicate opportunities for system prompt optimization or tool interface improvements.

    planning: string

    Explanation of the correction strategy and changes being made.

    Describes the AI's analysis of the validation failure and the specific approach being taken to resolve the issues. This planning explanation provides transparency into the correction process, helping stakeholders understand what changes are being made and why they are necessary.

    The planning commentary helps track the iterative improvement process and provides insights into how the AI learns from validation feedback to improve database design quality.

    step: number

    Iteration number of the requirements analysis this correction was performed for.

    Indicates which version of the requirements analysis this database correction reflects. This step number ensures that the correction efforts are aligned with the current requirements and helps track the evolution of database design quality as validation feedback is incorporated.

    The step value enables proper synchronization between correction activities and the underlying requirements, ensuring that design improvements remain relevant to the current project scope and business objectives.

    Detailed token usage metrics for the operation.

    Contains comprehensive token consumption data including total usage, input token breakdown with cache hit rates, and output token categorization by generation type (reasoning, predictions). This component-level tracking enables precise cost analysis and identification of operations that benefit most from prompt caching or require optimization.

    Token usage directly translates to operational costs, making this metric essential for understanding the financial implications of different operation types and guiding resource allocation decisions.

    type: "prismaCorrect"

    Unique identifier for the event type.

    A literal string that discriminates between different event types in the AutoBE system. This field enables TypeScript's discriminated union feature, allowing type-safe event handling through switch statements or conditional checks.

    Examples: "analyzeWrite", "prismaSchema", "interfaceOperation", "testScenario"