OpenParable
Skip to content
← Back to skills

CI Schema Invariant Gate

DevOps & Security
ci-schema-invariant-gate

CI Schema Invariant Gate is an Agent Skill for devops & security published in the Bottelet/DaybydayCRM repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Ensures correct execution order of migrations, seeders, and tests in CI

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/Bottelet/DaybydayCRM/blob/HEAD/.claude/skills/ci-schema-invariant-gate/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/ci-schema-invariant-gate, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

CI Schema Gate

Purpose

Enforces correct execution order of database setup and test execution in CI.


1. Execution Order (Strict)

CI MUST run in this order:

php artisan migrate:fresh --seed
php artisan test

No deviations allowed.


2. Responsibility

This skill ONLY controls:

  • execution sequencing
  • CI pipeline ordering
  • ensuring seed runs before tests

It does NOT validate:

  • schema correctness
  • factory correctness
  • business logic correctness

These are handled by other skills.


3. Failure Behavior

If CI fails:

  • migrations failing → schema issue (handled by data-layer-contracts)
  • seed failing → factory/data issue (handled by data-layer-contracts)
  • tests failing → behavior issue (handled by test layer)

CI does NOT interpret or classify failures.


4. Determinism Requirement

Test execution MUST always run on a fresh database state created by:

migrate:fresh --seed

No cached or partial state is allowed.


5. Core Principle

CI defines execution order only.

It does not define correctness of the system.