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:

  1. Public repo (c-systems-lab-exercises, VHCosta org) — exercise stubs only, free
  2. Paid code bundle — full solutions + extended projects, sold on Gumroad
  3. 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 every solution/ + shared/ against per-exercise flags from meta.json. Result: 43/43 PASS. Uses -I solution/ -I shared/; strips sanitizer flags when ASan/TSan unavailable.
  • scripts/export.sh publicexports/public/ — flattens shared/ + starter/ (43 exercises). Zip: csl-exercises-<date>.zip
  • scripts/export.sh paidexports/paid/ — flattens shared/ + starter/ + solution/solutions/ subdir, keeps extended/ subdir. Zip: csl-solutions-<date>.zip
  • scripts/dist.sh — full build + assemble. Builds PDFs via pdf/build.sh, runs both exports, zips via zip or PowerShell Compress-Archive fallback, assembles dist/ 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-build flag skips PDF + exercise rebuild (use existing artifacts).

exports/ is gitignored; bundle writes README.md and MANIFEST.txt at root.

Export Contract

File/dirPublicPaid
prompt.md
meta.json
shared/* (flat)
starter/* (flat)
solution/* (flat)
extended/ (subdir)

Phase Status

PhaseDescriptionStatus
1Canonical exercise schema✅ complete
2Exercise-content migration✅ complete
3Validation rewiring✅ complete
4Export tooling✅ complete
5Publish public repo✅ complete
6Ship paid bundle✅ complete — live at vhcosta.gumroad.com/l/c-systems-lab