Which CI Workflows Validate the AI Engineering Curriculum Integrity
The rohitg00/ai-engineering-from-scratch repository utilizes a single GitHub Actions workflow (.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. 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.pyto 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, this job:
- Re-checks out the branch with write permissions
- Executes
scripts/check_readme_counts.py --fixto 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. 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:
# 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.ymlcontains the sole CI workflow that validates the entire curriculum.- The
auditjob enforces lesson-level invariants by runningscripts/audit_lessons.pyon every push and pull request. - The
readme-counts-syncjob auto-heals documentation metadata usingscripts/check_readme_counts.py --fixwhile preventing infinite loops. - The
site-rebuildjob keeps the public website current by executingsite/build.jsto regeneratesite/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) 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 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. 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.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →