From ad-migration
Use when generated dbt unit test specs may have branch-coverage gaps, fixture-quality problems, or unresolved warnings across table, view, or materialized-view cases
npx claudepluginhub accelerate-data/migration-utilityThis skill uses the workspace's default tool permissions.
Quality gate for generated test specs.
Guides Payload CMS config (payload.config.ts), collections, fields, hooks, access control, APIs. Debugs validation errors, security, relationships, queries, transactions, hook behavior.
Builds scalable data pipelines, modern data warehouses, and real-time streaming architectures using Spark, dbt, Airflow, Kafka, and cloud platforms like Snowflake, BigQuery.
Builds production Apache Airflow DAGs with best practices for operators, sensors, testing, and deployment. For data pipelines, workflow orchestration, and batch job scheduling.
Quality gate for generated test specs.
approved_with_warnings vs revision_requested decision.$ARGUMENTS is the fully-qualified object name (item_id), optionally followed by --iteration <N> (1-based). Defaults to 1.
migrate-util ready test-gen --object <item_id> --project-root <project_root>.
Stop on readiness failure and report the surfaced code and reason. Do not inspect or write review artifacts after a failed readiness check.test-specs/<item_id>.json.Return one valid TestReviewOutput JSON object and validate it with test-harness validate-review.
See references/review-output-contract.md for the field inventory and a full example.
Run:
uv run --project "${CLAUDE_PLUGIN_ROOT}/packages/ad-migration-internal" migrate-util ready test-gen \
--object <item_id> \
--project-root <project_root>
If ready is false, return a valid TestReviewOutput with status: "error" and the surfaced code and reason from ../../lib/shared/generate_tests_error_codes.md. Do not infer readiness from filenames or directory listings.
Use the table or view workflow from references/table-vs-view-context.md.
Rules:
--writer <proc_fqn> when the caller already provided the intended writer or when more than one writer could target the table.discover show plus the view catalog file.test-specs/<item_id>.json and use unit_tests[].Enumerate branches from the source logic, not from the generated test spec.
id and a human-readable description.reviewer_branch_manifest.For each entry in unit_tests[], determine which reviewer-owned branches it actually exercises.
Rules:
given[] and expected behavior, not by scenario names or generator descriptions.Compute:
total_branchescovered_branchesuntestable_branchesscoreuncovereduntestableMark a branch as untestable only when static fixtures cannot represent it. Every untestable branch needs a concrete rationale.
See references/coverage-rules.md for examples and boundary cases.
Check:
Required-source-column rule:
NOT NULL source column.NOT NULL columns that the source logic never reads.Use references/fixture-quality-rules.md for the detailed heuristics and examples.
Record each issue with:
scenarioissueseverityUse error only when the fixture is invalid for the reviewed branch. Use warning for weaker realism or coverage concerns.
| Condition | Status | Required feedback |
|---|---|---|
| All testable branches covered and fixture quality acceptable | approved | none required |
| Coverage gaps only | revision_requested | feedback_for_generator.uncovered_branches |
| Quality issues only | revision_requested | feedback_for_generator.quality_fixes |
| Coverage gaps and quality issues | revision_requested | both feedback fields |
| Iteration 2 and issues remain | approved_with_warnings | warning entry for human review |
Maximum review iterations: 2.
Before schema validation, apply ../test-invariants/SKILL.md: coverage counts and uncovered, untestable, and feedback IDs must derive from reviewer_branch_manifest.
Write the TestReviewResult JSON to .staging/review.json, then validate:
mkdir -p .staging
uv run --project "${CLAUDE_PLUGIN_ROOT}/packages/ad-migration-internal" test-harness validate-review \
--review-file .staging/review.json
If validation fails, fix the reported fields and retry. After validation passes, return the JSON and remove .staging.
branch_manifest instead of building your own.migrate-util ready.NOT NULL in the catalog.--writer when the intended table writer is already known.This skill is read-only except for .staging/review.json. Do not write to test-specs/, modify fixtures, execute routines, or override source-of-truth artifacts.
On command failure, still return valid TestReviewOutput JSON using surfaced codes from ../../lib/shared/generate_tests_error_codes.md.
See references/error-handling.md for command-specific mappings.
../../lib/shared/generate_tests_error_codes.md — canonical surfaced error and warning codes