Source: Exercise Distribution Plan
File: raw/pdf/plan-public-exercises-and-paid-solutions.md
Date documented: 2026-04-10
Status: All phases complete — product live on Gumroad
Decision
Three-distribution model:
- Public repo (
c-systems-lab-exercises, VHCosta org) — exercise stubs only, free - Paid code bundle — full solutions + extended projects, sold on Gumroad
- Private authoring repo (
VHCosta/llc-companion-pdf) — PDF source, scripts, canonical content
Canonical Content Tree
All 43 exercises live in content/ (not tests/), structured per exercise as:
content/chNN/exN_M/
prompt.md standalone exercise statement
meta.json chapter, difficulty, tags, cflags, extra_libs
starter/ stub files with TODO comments (public tier)
solution/ full reference implementation (paid tier)
shared/ harness files in both tiers (ex6_3, ex11_1 only)
Schema documented in content/SCHEMA.md.
Scripts
scripts/validate.sh— compiles everysolution/+shared/against per-exercise flags frommeta.json. Result: 43/43 PASS. Uses-I solution/ -I shared/; strips sanitizer flags when ASan/TSan unavailable.scripts/export.sh public→exports/public/— flattensshared/+starter/(43 exercises). Zip:csl-exercises-<date>.zipscripts/export.sh paid→exports/paid/— flattensshared/+starter/+solution/→solutions/subdir, keepsextended/subdir. Zip:csl-solutions-<date>.zipscripts/dist.sh— full build + assemble. Builds PDFs viapdf/build.sh, runs both exports, zips viazipor PowerShellCompress-Archivefallback, assemblesdist/with 3 Gumroad tier subfolders:dist/tier-1-pdf/ companion.pdf + csl-exercises zip dist/tier-2-solutions/ companion-solutions.pdf + csl-solutions zip dist/tier-3-complete/ companion-complete.pdf + csl-solutions zip--skip-buildflag skips PDF + exercise rebuild (use existing artifacts).
exports/ is gitignored; bundle writes README.md and MANIFEST.txt at root.
Export Contract
| File/dir | Public | Paid |
|---|---|---|
prompt.md | ✅ | ✅ |
meta.json | ✅ | ✅ |
shared/* (flat) | ✅ | ✅ |
starter/* (flat) | ✅ | ✅ |
solution/* (flat) | ❌ | ✅ |
extended/ (subdir) | ❌ | ✅ |
Phase Status
| Phase | Description | Status |
|---|---|---|
| 1 | Canonical exercise schema | ✅ complete |
| 2 | Exercise-content migration | ✅ complete |
| 3 | Validation rewiring | ✅ complete |
| 4 | Export tooling | ✅ complete |
| 5 | Publish public repo | ✅ complete |
| 6 | Ship paid bundle | ✅ complete — live at vhcosta.gumroad.com/l/c-systems-lab |