2 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
d456a5a962 refactor(vol1): rename optimizations/ folder to model_compression/ for consistency
Every other vol1 chapter folder name matches its qmd slug; this aligns the
last outlier so folder == qmd stem across the volume. Also matches the slides
folder name (slides/vol1/10_model_compression).

- git mv contents/vol1/optimizations → contents/vol1/model_compression
- Update path refs in 4 quarto configs (html, pdf, pdf-copyedit, epub)
- Update path refs in index_prune_candidates.yml, build_locator_bins.py,
  format_tables.py, learning_objectives_bolding_parallel.sh
- Update chapter-id refs (vol1/optimizations → vol1/model_compression) in
  vol2 quiz integration strings (ops_scale, robust_ai, sustainable_ai)
- Update CHAPTER_DIRS, READING_ORDER, and stale "outlier" docstrings in
  fix_abbreviations.py, build_prior_vocab.py, build_audit_context.py,
  generate_quizzes.py (fallback logic kept as defensive code)
- Rename _audit/optimizations_audit.json → model_compression_audit.json
  and fix its stale source_file/chapter fields
- Update vol1/README.md chapter table
2026-05-19 19:53:30 -07:00
Vijay Janapa Reddi
3c95e3e67c refactor(quizzes): rename book/tools/scripts/genai/quiz_refresh to quizzes
The genai/ folder advertised an implementation detail (AI-driven) and
held only one tool. The siblings under book/tools/scripts/ are all
named by purpose (audit/, glossary/, mit_press/, publish/, ...) — this
brings the quiz pipeline into line with that convention.

Changes:
- git mv book/tools/scripts/genai/quiz_refresh -> book/tools/scripts/quizzes
- empty genai/ parent directory removed
- 4 path-string references rewritten (filters.yml comment, three
  internal docstrings/CLI examples in README/generate_quizzes/
  build_audit_context)
- 2 BUILD.md + DEVELOPMENT.md tree-listing entries updated to point at
  the new path
- README.md title and tagline updated (no longer "Quiz Refresh — runner";
  the "quiz-refresh pattern" label is replaced with "spec-plus-runner
  pattern" since the directory name now self-documents)
- generate_quizzes.py: meta["generated_by"] now writes
  "quizzes/generate_quizzes.py" (was "quiz-refresh/generate_quizzes.py");
  --skip-existing matcher loosened from "quiz-refresh" substring to
  "generate_quizzes" so it accepts both old and new descriptors
- 33 chapter quiz JSONs and 30 _audit/*_audit.json files: the
  generated_by metadata string updated to match new descriptor
- extract_anchors.py docstring: "quiz-refresh pipeline" -> "quizzes pipeline"

Verified post-rename:
- All scripts parse (ast.parse on all three .py files passes)
- validate_quiz_json.py works on sample chapters from each volume
- --skip-existing dry-run matches the new descriptor correctly
- git grep finds no remaining "genai/" or "quiz_refresh" references;
  the one remaining "quiz-refresh" reference is an intentional
  backwards-compat note in the --skip-existing comment block

The chapter quiz corpus and the spec at .claude/rules/quiz-generation.md
are unchanged in content — this is purely a directory + descriptor rename.
2026-04-25 08:09:47 -04:00