# Which CI Workflows Validate the AI Engineering Curriculum Integrity

> Discover how the ai engineering curriculum integrity is validated using GitHub Actions workflows like audit, readme-counts-sync, and site-rebuild in the rohitg00/ai-engineering-from-scratch repository.

- Repository: [Rohit Ghumare/ai-engineering-from-scratch](https://github.com/rohitg00/ai-engineering-from-scratch)
- Tags: best-practices
- Published: 2026-06-18

---

**The rohitg00/ai-engineering-from-scratch repository utilizes a single GitHub Actions workflow ([`.github/workflows/curriculum.yml`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/.github/workflows/curriculum.yml)) containing three automated jobs—`audit`, `readme-counts-sync`, and `site-rebuild`—to validate curriculum integrity, synchronize documentation metadata, and regenerate the static site.**

The `ai-engineering-from-scratch` open-source curriculum maintains rigorous quality standards through automated continuous integration. According to the repository source code, a single workflow file orchestrates three distinct validation jobs that enforce structural rules, repair documentation counts, and publish curriculum updates.

## The Curriculum Validation Workflow

The entire CI pipeline is defined in **[`.github/workflows/curriculum.yml`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/.github/workflows/curriculum.yml)**. This workflow triggers on every push and pull request to safeguard the curriculum before changes reach the main branch. It coordinates three specialized jobs that handle invariant checking, documentation repair, and site generation.

## Job 1: Structural Invariant Auditing

The **`audit`** job performs strict invariant checks to catch structural or content violations early in the development cycle.

According to the source code in lines 32-45 of the workflow file, this job:
- Checks out the repository code
- Configures Python 3.12
- Executes **[`scripts/audit_lessons.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/audit_lessons.py)** to enforce lesson-level rules

This ensures that malformed lesson definitions or structural violations never merge into the main branch.

## Job 2: Automated README Metadata Repair

The **`readme-counts-sync`** job operates exclusively on the `main` branch to automatically fix README statistics, including lesson counts and links.

As implemented in lines 46-81 of [`.github/workflows/curriculum.yml`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/.github/workflows/curriculum.yml), this job:
- Re-checks out the branch with write permissions
- Executes **`scripts/check_readme_counts.py --fix`** to update counters
- Commits and pushes any changes (lines 65-81)
- Includes logic to avoid infinite loops by preventing recursive triggering

This self-healing mechanism ensures documentation stays synchronized with the actual curriculum structure without manual intervention.

## Job 3: Static Site Regeneration

The **`site-rebuild`** job ensures the public curriculum website reflects the latest content changes.

Defined at line 100 of the workflow file, this job runs **`node site/build.js`** to regenerate **[`site/data.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/data.js)**. This rebuilds the static site data file that powers the curriculum's web interface, ensuring learners always access the most current content.

## Running Curriculum Checks Locally

You can replicate the CI behavior locally using the same scripts executed by the GitHub Actions runners:

```bash

# Run invariant audit (identical to the CI audit job)

python3 scripts/audit_lessons.py

# Fix README counts (identical to the readme-counts-sync job)

python3 scripts/build_catalog.py
python3 scripts/check_readme_counts.py --fix

# Rebuild site data (identical to the site-rebuild job)

node site/build.js

```

These commands mirror the production validation pipeline, allowing contributors to verify curriculum integrity before submitting pull requests.

## Summary

- **[`.github/workflows/curriculum.yml`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/.github/workflows/curriculum.yml)** contains the sole CI workflow that validates the entire curriculum.
- The **`audit`** job enforces lesson-level invariants by running **[`scripts/audit_lessons.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/audit_lessons.py)** on every push and pull request.
- The **`readme-counts-sync`** job auto-heals documentation metadata using **`scripts/check_readme_counts.py --fix`** while preventing infinite loops.
- The **`site-rebuild`** job keeps the public website current by executing **[`site/build.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/build.js)** to regenerate [`site/data.js`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/site/data.js).

## Frequently Asked Questions

### Which CI workflows are utilized to validate the integrity of the AI engineering curriculum?

The repository relies on one GitHub Actions workflow file ([`.github/workflows/curriculum.yml`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/.github/workflows/curriculum.yml)) containing three jobs: `audit` for structural validation, `readme-counts-sync` for documentation repair, and `site-rebuild` for static site generation.

### How does the audit job prevent invalid curriculum changes from reaching the main branch?

The `audit` job executes [`scripts/audit_lessons.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/scripts/audit_lessons.py) using Python 3.12 on every push and pull request. This script enforces lesson-level rules and invariant checks defined in lines 32-45 of the workflow file, blocking merges that violate structural requirements.

### Can I run the curriculum validation checks locally before submitting a pull request?

Yes. Run `python3 scripts/audit_lessons.py` to perform invariant checks, `python3 scripts/check_readme_counts.py --fix` to update README statistics, and `node site/build.js` to validate site generation. These commands replicate the exact behavior of the CI jobs.

### How does the readme-counts-sync job avoid infinite loops when auto-committing fixes?

The workflow implements protection logic in lines 65-81 of [`.github/workflows/curriculum.yml`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/.github/workflows/curriculum.yml). It checks for actual changes before committing and includes conditional logic to prevent recursive triggering, ensuring the job does not spawn infinite update cycles on the `main` branch.