Title: Lab 4 — Scaffold a Reproducible Capstone Repository
Course: AIINFRA 303: Capstone Project > Section: Week 04 — Project Planning: Milestones, Risk, and a Reproducible Repository

🛠️ Lab 4 — Scaffold a Reproducible Capstone Repository (50 pts)

Goal: Stand up a reproducible, standardized repository for your capstone project — with pinned dependencies, a fixed seed, versioned data, a re-runnable pipeline, automated hygiene checks, and a plan (milestones + risk register) for the work ahead. Everything in this lab is free and runs locally — no cloud cost. Steps:

1. Install the tooling. In a fresh virtual environment, install cookiecutter (or the ccds CLI), dvc, pre-commit, ruff, and nbstripout.
2. Scaffold your repo. Run the Cookiecutter Data Science template (via cookiecutter or the ccds CLI) to generate your capstone repository. Follow the "Using the Template" guide to understand what each generated folder (data/, src/, models/, notebooks/, reports/) is for.
3. Initialize Git and configure .gitignore before your first commit. Confirm large data files and any secrets/config files are excluded from the very start — not added after the fact.
4. Pin your dependencies and fix your seed. Freeze exact versions in requirements.txt (or pyproject.toml), and set a single seed constant used everywhere randomness appears in your project (data splitting, initialization, sampling).
5. Version your dataset with DVC. Follow DVC's official "Get Started" tutorial: dvc init, then dvc add on your raw capstone dataset. Confirm DVC creates a small .dvc pointer file that Git tracks, while the actual data moves to DVC's cache/storage.
6. Build a multi-stage pipeline. Follow the DVC "Data Pipelines" tutorial to define three stages in dvc.yaml: prepare → train → evaluate, each with explicit deps and outs. Run dvc repro and confirm it regenerates your results end-to-end from raw data with a single command. Re-run it a second time and confirm DVC skips unchanged stages.
7. Add a .pre-commit-config.yaml. Wire up ruff (linting) and nbstripout (notebook output stripping). Run pre-commit install, then make a trivial commit to confirm the hooks actually fire.
8. Tag your baseline. Once the pipeline runs cleanly end to end, create an annotated Git tag (e.g., git tag -a v0.1-baseline -m "reproducible baseline") marking this reproducible starting point.
9. Write your README. It must contain enough detail — setup steps, how to pull data, how to run dvc repro — that a stranger could clone the repo and reproduce your results without asking you a single question.
10. Build a risk register. In a RISK_REGISTER.md (or a table in your README), list your top 4–6 capstone risks. For each: likelihood, impact, a concrete trigger condition, and the specific mitigation that trigger launches.
11. Build a milestone roadmap. Create a GitHub Projects board for your capstone. Use the Roadmap (timeline) view and a Status field (On track / At risk / Off track) to lay out your remaining weekly milestones through the end of the course.

Deliverables: A link to (or exported archive of) your capstone Git repository showing the Cookiecutter Data Science layout, .dvc pointer file(s), dvc.yaml pipeline, .pre-commit-config.yaml, the v0.1-baseline tag, and your README; plus your RISK_REGISTER.md and a screenshot or link to your GitHub Projects Roadmap view with milestones and Status field populated.