e-volv

Review playbook

SchemaMigrationCompanion

Reviews schema.surql changes for reverse migrations, SurrealDB rule violations, existing-row safety, and affected foreign-key tables.

When a pull request touches db/schema.surql, reviews the SurrealDB schema change by producing a reverse migration, validating SurrealDB-specific syntax and data rules, checking for unsafe required-field additions to populated tables, and listing every table that holds a foreign-key reference to a changed table. Reports inline review threads for specific violations and a summary comment on the pull request.

Identifier
schema-migration-companion
Version
1.0.0
Steps
4
Triggers
2
  • schema
  • migration
  • surrealdb
  • database
  • review
  • rollback

When it runs

Pull requestpull_request.opened
Settle delay
15s after the event

Only when all hold

  • pullRequest.isDraft not equals true
  • actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
  • actor.username not contains [bot]
Pull requestpull_request.synchronize
Settle delay
15s after the event

Only when all hold

  • pullRequest.isDraft not equals true
  • actor.username not in dependabot, dependabot[bot], renovate, renovate[bot], github-actions, github-actions[bot]
  • actor.username not contains [bot]

The pipeline

The graph below is the one the workflow opens with in the builder — same steps, same layout, drawn on the same canvas. The run playing through it is a simulation; the branches and conditions are real.

  1. 01
    PR Opened / Updatedtrigger

    The event that starts the run.

  2. 02
    Clone Repositorygit.clone

    Shallow-clones the repository at the right ref.

  3. 03
    Review Schema Migrationagent.run

    One agent works the task with its toolkit.

  4. 04
    Publish Migration Reviewreport.publish

    Posts or updates a deduplicated report comment.

The agent

Schema Migration Companion

Base type
Code Reviewer
Temperature
0.2
Max iterations
25
Tools
5

Git provider · 2

  • get_pull_request_diffGet Pull Request Diff · read
  • add_pull_request_review_threadAdd PR Review Thread · write

Filesystem · 1

  • read_fileRead File · read

Code search · 1

  • code_searchCode Search · read

Status · 1

  • update_statusUpdate Status · write