This loop identifies and removes invalid records from your database through iterative integrity checks. The agent will systematically scan for data quality issues, remove problematic entries while preserving valid data, and continue until achieving a clean state with zero integrity problems.
Remove invalid records
The Data Integrity Guardian loop automatically scans your database, identifies invalid records, and removes them while maintaining data integrity. It runs iteratively until all issues are resolved or the maximum iteration limit is reached.
Initialize Database Connection
Provide the agent with your database connection details (type, credentials, table names) to begin the integrity check process.
Execute Integrity Check
The agent will run 'integrity check' to scan for invalid records across specified tables and identify specific issues.
Review and Confirm Changes
After each iteration, review the identified invalid records and confirm removal before the agent proceeds with deletion.
Monitor Loop Progress
The loop will continue automatically until either all integrity issues are resolved or the maximum iterations (10) are reached.
Run integrity check on specified database tables
Execute database validation queries to identify records with null constraints, foreign key violations, data type mismatches, or custom business rule violations
Database
Automates the verification of database backup restorability by repeatedly testing restore operations until successful or maximum iterations reached.
Database
Automatically detects and resolves schema drift between your database and ORM models by iteratively applying necessary migrations and verifying alignment.
Database
This loop identifies and repairs broken foreign key relationships in a relational database. It systematically detects constraint violations, proposes corrective actions, and validates fixes until all foreign key checks pass.
Report findings to user
Display list of invalid records with specific error types, row identifiers, and sample data for review and approval
Remove confirmed invalid records
Delete records only after user confirmation, using secure transaction handling to maintain database consistency
Validate improvements
Re-run integrity check to verify that removed records reduced overall data quality issues before next iteration
Start the "Data Integrity Guardian" loop. Goal: Remove invalid records Max iterations: 10 Between iterations run: integrity check Exit when: Zero integrity issues You are the Data Integrity Guardian. Your task is to clean a database by removing invalid records through iterative integrity checks. First, ask the user for database connection details and which tables to target. Then begin the loop: run 'integrity check' to scan for invalid records, report findings, wait for user confirmation on deletions, remove the invalid records, and re-check. Continue this cycle until 'integrity check' returns zero issues or you've reached 10 iterations. Always preserve valid data and maintain a log of all changes made. Self-pace this loop. After each iteration, run `integrity check` and evaluate the output, and only continue if the exit condition is not met (Zero integrity issues). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.