CI/CD Pipeline Skill
This skill governs the design of resilient and efficient automation pipelines. It prioritizes local reproducibility and fast feedback loops.
Workflow: Pipeline Construction
- Interface with Task Runner:
- Check if a
Makefilealready exists in the project root. - If a
Makefileexists, ensure every CI step corresponds to amaketarget. - If no
Makefileexists (greenfield), initialize aJustfileand ensure every CI step corresponds to ajustrecipe.
- Check if a
- Implement Fail-Fast: Order the jobs so that the fastest, most critical checks (linting) run first.
- Configure Matrix: Use matrix strategies for High-Performance Architecture (HPA) builds.
- Reference Best Practices: Adhere to the standards in references/best-practices.md.
Workflow: The "Verify-then-Publish" Gate
- Mandate: Before any remote repository push, the agent MUST run the local
just test(ormake test) suite. - Reporting: If a local check fails, stop and fix the issue before attempting to push.
Workflow: Infrastructure Simulation
- For complex deployments, use a two-tier simulation (e.g., Local Container -> Staging -> Prod) to verify environment-specific variables before final delivery.
Workflow: Error Recovery
- If local checks fail: Read the failure output, fix the issue, and re-run (
just testormake test). Never skip or silence a failing test. - If
citarget is not defined: Create it as ajustrecipe (ormaketarget) that runs lint, test, and build in sequence. - If matrix build fails for a single platform: Investigate platform-specific issues. Do not disable the failing platform without documenting the rationale.
Verification
Verify this skill produces correct pipeline configuration:
- Verify every CI step has a corresponding
justormaketarget. - Confirm fail-fast ordering: linting runs before tests, tests before builds.
- Confirm the pipeline includes a local verification gate (
just testormake test) before any remote push step. - For matrix builds, confirm at least two platform variants are configured.