Skip to content

Contributing

Thanks for helping. This is a course, so the bar is "does it make a lab clearer or more correct", not "does it add a feature".

What we welcome

Kind How
Bug in a lab or shared module, or a lab over 45 minutes Open a Bug in a lab issue: command, output, setup. A PR with a fix and a test is even better.
Typo or broken link Send a PR straight away.
A doc that's wrong, unclear or out of date Open a Doc update issue, or send a PR.
New lab in an existing topic Open a New lab proposal issue first, so we agree on scope before you write code.
New topic or track, or a new provider Open a New course or topic proposal issue first.

The issue forms are under New issue.

Rules for a PR

  • One lab teaches one thing and fits in 45 minutes on a 16 GB laptop with qwen3:8b. Give it a Track in its topic README's files table: new labs are Go further (Before you ship if it teaches a safety lesson); the Core path stays about 28 labs, so a new Core lab means agreeing in the issue which one it replaces.
  • Model-free tests pass: pytest -q in each topic you touched. CI runs the same. New shared code comes with a model-free test (fake the model; see fake_chat in whatsapp-agent/test_bot.py).
  • Only synthetic data. No real customer, company, price or personal data, no real phone numbers or emails.
  • No keys or .env in commits. Hosted providers are optional; every lab must run on Ollama.
  • Keep the house style: code first, short comments only where the logic isn't obvious, simple English. A numbered lab ends with an Expected output and a What can go wrong block. If your change alters a lab's output, update that block from a real run and say which model you used.
  • Don't commit run output: eval runs, databases, vector stores and sessions are rebuilt by the labs (see .gitignore).

Run the checks locally

uv pip install -r requirements.lock           # from the repo root, in the root .venv (Python 3.14)
cd whatsapp-agent && pytest -q && cd ..        # repeat for each topic you touched
python smoke_labs.py whatsapp-agent            # every lab in the topic, end to end on the fake model (CI runs all)

Changed a model, a prompt or shared code? Run the labs on your real model too: python smoke_labs.py --real <topic>. It updates LABS-VERIFIED.md (which labs ran to the end, on which model, when). Maintainers run it for every topic about once a month, because models drift: then they update the Expected output of any lab whose results changed.

Adding or upgrading a package

Add it (with a >= range) to the topic's requirements.txt, then refresh the lock from the repo root and commit both:

uv pip compile requirements.txt --universal --python-version 3.10 -o requirements.lock

The lock keeps every other pin as it is. To move one package to its newest version, add -P <package>. CI fails when requirements.lock doesn't match the requirements.txt files.

The website

The course website (GitHub Pages) is built from the same .md files: there is nothing to write twice, and you never edit the site directly. mkdocs.yml holds the menu, and website/hooks.py adapts GitHub-style links: a link to a lab .py or a data file opens it on GitHub, and each topic README gets a "Run it" box at the top. Added a page? Add it to nav in mkdocs.yml. Preview it, in a separate venv (the site isn't part of requirements.lock):

uv pip install -r website/requirements.txt
mkdocs serve        # http://127.0.0.1:8000/ai-learning/

CI builds the site on every pull request with --strict, so a broken link or anchor fails the build. A push to main publishes it.

Security

Found a security problem (for example a lab pattern that would be unsafe if copied into production)? Please don't open a public issue; see SECURITY.md for what to report and how.

Code of conduct

Be kind, especially to beginners. Everyone taking part agrees to the code of conduct.

By contributing you agree that your work is released under the MIT License.