Skip to content

Release: v2.18.0 — Rich Exam LaTeX Format#104

Merged
Data-Wise merged 11 commits into
mainfrom
dev
May 13, 2026
Merged

Release: v2.18.0 — Rich Exam LaTeX Format#104
Data-Wise merged 11 commits into
mainfrom
dev

Conversation

@Data-Wise
Copy link
Copy Markdown
Owner

Summary

Releases v2.18.0 — Rich Exam LaTeX Format. Introduces /teaching:exam --format exam-rich-latex for evidence-based statistics exams using the LaTeX exam document class, with auto-generated F-critical bracket tables (jstat-backed), $s$-value calibration tables (Greenland/Rafi), Dean (2017) citation conventions, and interaction-aware language that reframes "main effects" to "marginal mean differences" in factorial designs with interaction terms.

Headline feature merged in #103. This PR bundles that feature plus 8 doc-only follow-ups covering tutorials, API reference, architecture diagrams, help docs, ADHD-friendliness, hub-command drift fixes, and site-wide v2.18.0 propagation.

What's new

Feature (commit 686bc93, originally #103)

  • New --format exam-rich-latex on /teaching:exam — Quarto .qmd with the LaTeX exam class
  • F-critical bracket tablejstat-backed (^1.9.6), auto-generated from exam_metadata.df_pairs at 2-decimal precision; dedupe + sort + validation (df ≥ 1, finite integers)
  • $s$-value calibration table — static Greenland/Rafi table embedded in the front matter
  • Interaction-aware language pass — preserves $…$ / \(…\) math regions byte-for-byte; idempotent; reframes question.text, parts[].prompt, and question.rubric when designModel.hasInteractionTerm === true
  • New template optionspolicy, aids_level, textbook_citation_prefix, interaction_aware_language in teaching_style.exam block
  • New helperPromptLoader.checkMinScholarVersion() distinguishes prompt-version (stale) from min-scholar-version (runtime requirement). Fixes pre-existing stat-545-prompt-discovery integration test.
  • Runtime depjstat ^1.9.6

Doc commits since the feature merge

Commit Scope
87d8363 Rich-LaTeX tutorial + API-REFERENCE PromptLoader section + ARCHITECTURE-DIAGRAMS §10
a6aa795 .STATUS updated to post-merge state (Session 90)
0f97f54 ADHD-friendliness Phase 1: 75 → 83 (Grade C → B). CSS for mobile mermaid overflow; emoji Level markers on 24 tutorials; TL;DR boxes on 5 top-level docs
a5a18dc Help-doc audit: fixed 3 /teaching:fix references (non-existent command), removed 3 literal-macro leaks, refreshed dates, added 5 Q&A entries on rich-LaTeX
fb6ba4f Tutorials index page (orientation) + BibTeX management tutorial
d91ca8e 4 research-command tutorials in parallel (doi-lookup, statistical-method-discovery, finding-research-gaps, hypothesis-generation) + hub.md drift fix (15→18 teaching commands)
b654f0f 4 more tutorials (results-section, proof-review, simulation-analysis, canvas-lms-export). Research tutorial coverage 7/14 → 14/14; teaching 17/18 → 18/18
2e8fb2a Full site sync: README count drift (31→33 commands, 15→18 teaching), OUTPUT-FORMATS-GUIDE, USER-GUIDE, TEACHING-WORKFLOWS, CONFIGURATION teaching_style.exam block, API-REFERENCE ExamRichLatexFormatter section

Stats

  • Tests: 3,400 (3,263 Jest + 137 node:test) — all passing
  • Tutorials: 30 → 38 (8 new across this release window)
  • Commands: 33 (unchanged: 14 research + 18 teaching + 1 hub)
  • Skills: 17 (unchanged)
  • ADHD score: 75 → 83 (Grade C → B)

Test plan

  • CI is green on this PR (all substantive checks pass)
  • npm test — verify the 3,400-test count and zero failures
  • Spot-check the Rich Exam LaTeX tutorial renders correctly on the docs site
  • Verify the Tutorials index loads and all 38 tutorial links resolve
  • After merge: docs deploy workflow runs and the new content appears on https://Data-Wise.github.io/scholar/
  • After merge: Homebrew tap update workflow runs successfully
  • Tag and create GitHub release v2.18.0

Known issues / out of scope

  • Pre-existing ESLint debt — 20 unused-var/unused-arg errors in pre-existing files (not introduced in v2.18.0). ESLint is not gated in CI. Suggest cleanup in v2.18.1.
  • npm audit — 4 vulnerabilities in transitive deps (1 moderate, 3 high: ajv, fast-uri, fast-xml-parser, minimatch). Pre-existing — not introduced in v2.18.0. npm audit fix would patch all four; suggest doing this in a v2.18.1 maintenance commit.
  • \printanswers short-answer toggle — for short-answer-only exams in rich-LaTeX, the student PDF and answer-key PDF are byte-identical because LaTeXFormatter.formatShortAnswer() doesn't wrap answers in \begin{solution}. Documented as a known limitation; per-question solution visibility is on the v2.19.0 roadmap.

🤖 Generated with Claude Code

Test User and others added 11 commits March 4, 2026 23:20
- Add Part 2.5: Pre-flight Validation section (115 lines) covering:
  - Why pre-flight matters (silent failure prevention)
  - How it runs automatically with --format canvas
  - Error vs warning severity table
  - canvasSafe mode explanation
  - Pre-flight on existing QMD files via /teaching:canvas
  - Fix guides for all 3 error types (MC, MA, FMB)
- Update Workflow Architecture diagram to show pre-flight step
- Update Prerequisites: Scholar v2.5.0 → v2.17.0
- Update Learning Objectives and Summary to include pre-flight

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Session 88: v2.17.0 release pipeline, MEMORY.md learnings, tutorial update.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…103)

* plan(v2.18.0): rich exam format spec + ORCHESTRATE

Adds the design spec and orchestration plan for the v2.18.0 rich exam
format feature: LaTeX exam-class generation with evidence-based reporting,
F-quantile bracket tables, s-value calibration, and computational aids.

Scope locked at Scholar formatter only; Examark integration deferred to v2.
Reference exam: stat-545 Spring 2026 final. 4 milestones, ~3 days.

See SPEC-2026-05-12-rich-exam-format.md for full design decisions and
ORCHESTRATE-exam-rich-latex.md for milestone breakdown.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* docs(orchestrate): correct file paths after Wave 0 codebase survey

Spec drift discovered during Wave 0 Explore pass:
- schemas/exam.json → templates/exam.json (Scholar uses JSON templates,
  not Ajv schemas, for the exam shape)
- prompts/exam-rich.md → ai/prompts/default/exam-rich.md (existing
  prompts live under ai/prompts/default/ with YAML frontmatter)
- formatters/helpers/__tests__/ → tests/teaching/formatters/helpers/
  (codebase convention: top-level tests/ tree)

Also added jstat dependency and generators/exam.js prompt-loader wiring
to the M1/M2 file lists.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(exam-rich-latex): M1 scaffold + bracket-table helpers

Introduces the exam-rich-latex format that emits a Quarto .qmd using the
LaTeX exam document class. The scaffold is intentionally minimal:
inheritance from LaTeXFormatter for question/escape safety, with the new
formatter contributing the YAML front-matter, reporting-policy block,
F-critical bracket table, and s-value calibration table.

- src/teaching/formatters/exam-rich-latex.js: ExamRichLatexFormatter
  extends LaTeXFormatter; format() composes front-matter + preamble +
  reporting policy + bracket table + s-calibration + parent questions
  block. getFileExtension() returns .qmd.
- src/teaching/formatters/helpers/bracket-table-generator.js: returns a
  LaTeX tabular for F critical values via jstat.centralF.inv. Dedupes
  and sorts df pairs; supports custom alpha and precision.
- src/teaching/formatters/helpers/s-calibration-table.js: static
  Greenland/Rafi s-value calibration tabular (0..13.3 bits, with p-value
  anchors at moderate/strong/very-strong).
- tests/teaching/formatters/helpers/bracket-table-generator.test.js: 7
  Jest tests pinning critical values to 2 decimals against jstat.
- src/teaching/formatters/index.js: registry switch case for
  'exam-rich-latex' and 'rich-latex' aliases.
- src/plugin-api/commands/teaching/exam.md: --format documentation.
- package.json: jstat ^1.9.6 runtime dependency.

54/54 formatter tests pass (47 existing + 7 new).

Wave 1 of 5 per ORCHESTRATE-exam-rich-latex.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(exam-rich-latex): M2 prompts, template extension, generator wiring

Adds the on-disk exam-rich.md prompt embedding evidence-based reporting,
Dean (2017) citation conventions, and interaction-aware language rules.
Extends the exam template with optional fields that drive prompt behavior
and bracket-table inclusion. Wires PromptLoader into the exam generator
under a gated branch so legacy formats are unaffected.

- src/teaching/ai/prompts/default/exam-rich.md (new, ~165 lines):
  YAML frontmatter (prompt_version 1.0, min_scholar_version 2.18.0),
  reporting policy (s-values, compatibility intervals, banned language),
  Dean unrestricted EMS approach, citation-prefix injection, interaction-
  aware "marginal mean differences" rule, aids-level scaffolding.
- src/teaching/templates/exam.json (+68 lines): policy block,
  include_bracket_table, aids_level (minimal/moderate/full),
  textbook_citation_prefix, interaction_aware_language, and an optional
  exam_metadata.df_pairs array driving the bracket table.
- src/teaching/generators/exam.js (+75 lines): gated branch — when
  options.format is 'exam-rich-latex' or 'rich-latex', loads the on-disk
  prompt via PromptLoader and runs a simple {{var}} substitution.
  Legacy buildExamPrompt path unchanged.
- src/teaching/ai/prompt-loader.js (+1 line): 'exam-rich' added to
  VALID_PROMPT_TYPES whitelist so PromptLoader.load('exam-rich') resolves.
- tests/teaching/generators/exam-rich-prompt.test.js (new): 3 tests
  pinning the gated branch — rich prompt used for exam-rich-latex,
  legacy prompt used for markdown, legacy prompt used when no format.
- tests/teaching/e2e/instruction-merger-e2e.test.js: relaxed brittle
  source-text assertion to two independent regex checks now that the
  ternary became an if/else chain.
- docs/tutorials/teaching/configuration.md (+30 lines): new "Rich Exam
  Format Overrides" section showing the teach-config.yml block.

Tests: 3204/3205 pass (the 1 remaining failure in
stat-545-prompt-discovery.test.js is pre-existing on origin/dev — the
prompt-config-bridge SCHOLAR_VERSION constant is 2.17.0 but the stat-545
fixture prompt's min_scholar_version is 2.16.0, and the bridge mis-reads
min_scholar_version as the prompt's own version. Out of scope for v2.18.0
rich-format work.)

Wave 2 of 5 per ORCHESTRATE-exam-rich-latex.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* feat(exam-rich-latex): M3 interaction-aware language pass

Reframes "main effects" language to "marginal mean differences" at
format-time for questions whose designModel.hasInteractionTerm is true.
Preserves LaTeX math regions, is idempotent, and exposes a clean
options.aiProvider hook for a future AI re-prompt enhancement (stubbed
in v2.18.0 — present so the interface doesn't have to break later).

- src/teaching/formatters/helpers/interaction-aware-pass.js (new):
  applyInteractionAwarePass(text, questionMeta, options) — deterministic
  word-bounded regex substitutions, math-region preservation via
  mask/restore, defensive early-return when designModel is absent or
  hasInteractionTerm is false.
- src/teaching/formatters/exam-rich-latex.js: constructor accepts
  options.aiProvider; new formatQuestion() override runs questions
  through reframeQuestionLanguage() before delegating to
  super.formatQuestion(); parts[].prompt also gets the pass.
- tests/teaching/formatters/helpers/interaction-aware-pass.test.js:
  8 tests covering early-return paths, factorial reframing, singular
  vs plural verb forms, math preservation, idempotency, AI stub.
- tests/teaching/formatters/exam-rich-latex.test.js (new): end-to-end
  wiring proof — minimal content with hasInteractionTerm: true produces
  output containing "marginal mean differences" and not "main effects".

Tests: 3214/3223 pass (+10 new). Same 1 pre-existing failure in
stat-545-prompt-discovery.test.js (unrelated to this branch).

Wave 3 of 5 per ORCHESTRATE-exam-rich-latex.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(exam-rich-latex): M4 — move preamble to include-in-header; PDFs compile

Wave 4 surfaced a real Wave 1 bug: ExamRichLatexFormatter was emitting
\usepackage{...}, \pointsinrightmargin, \bracketedpoints, \marksnotpoints,
and a commented \printanswers AFTER the YAML close (---), which Pandoc/
Quarto interpret as document body. LaTeX rejects \usepackage in the body:
"! LaTeX Error: Can be used only in preamble."

Fix: restructure the YAML emission to use Quarto's
format.pdf.include-in-header.text: | block (matching the reference
STAT 445/545 Spring 2026 final's pattern). Body now begins immediately
with the reporting-policy block.

- src/teaching/formatters/exam-rich-latex.js: nested format.pdf YAML
  with classoption [12pt, addpoints], keep-tex true, and a multi-line
  include-in-header.text block for packages + exam-class config. Body
  no longer emits preamble-only commands.
- scripts/m4-validate-rich-format.js (new): Node driver implementing
  the 12-item section-presence checklist and bracket-table df-pair
  sanity check. Exits non-zero on any failure.
- tests/teaching/formatters/fixtures/stat-545-final-spring-2026.fixture.json
  (new): hand-crafted 8-question fixture mirroring the STAT 545 final's
  structure (1 factorial with interaction, 7 others; 4 df pairs).
- .gitignore: out/m4-validation/ for PDF/aux/log artifacts.

Validation:
- All 5 formatter test suites still pass (64/64).
- Section-presence checklist: 12/12 PASS.
- Bracket-table df-pair coverage: 4/4 PASS.
- Student PDF compiles cleanly via lualatex: 28,761 bytes, 3 pages.
- Answer-key PDF compiles cleanly: 28,761 bytes, 3 pages.
- \printanswers toggle plumbing verified end-to-end (commented in
  student .tex, uncommented in answer-key .tex).

Known caveat (out of scope for this branch): the fixture is 100%
short-answer questions and parent LaTeXFormatter.formatShortAnswer()
does not wrap answers in \begin{solution}...\end{solution} blocks, so
\printanswers produces no visible difference for short-answer-only
exams. Multiple-choice fixtures would surface the toggle visually.
This is a pre-existing limitation of LaTeXFormatter, not a regression.

Wave 4 of 5 per ORCHESTRATE-exam-rich-latex.md.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore(release): bump to v2.18.0 (rich exam LaTeX format)

Pre-PR release prep for v2.18.0. No source changes — only version
metadata, docs, and the WHATS-NEW page. Source changes for v2.18.0 are
in commits 441807b, 2bffd4a, 219e6d2, 38b7fcd on this branch.

- package.json + .claude-plugin/plugin.json: 2.17.0 → 2.18.0
- mkdocs.yml extra.scholar: version 2.18.0, prev_version 2.17.0,
  release_date 2026-05-12, test_count 3,360 (jest 3,223 + node:test
  137), suite_count 141. command_count unchanged at 33.
- mkdocs.yml nav: "What's New in v2.18.0" added at top of Release Notes
- CHANGELOG.md: new [2.18.0] section + link reference at bottom
- .STATUS: Session 89 summary, v2.18.0 milestone row in release history,
  jstat added to dependencies line
- docs/WHATS-NEW-v2.18.0.md (new, 50 lines): rich exam format hook,
  highlights, how-to, limitations, links to spec + ORCHESTRATE
- Files updated by scripts/version-sync.js (16 changes, 6 skips,
  0 errors): README.md, CLAUDE.md, src/teaching/ai/prompt-config-bridge.js,
  docs/API-REFERENCE.md, docs/TEACHING-WORKFLOWS.md, docs/help/*,
  docs/workflows/research/*

Final test counts:
- Jest: 3,223 total (3,214 pass, 8 skip, 1 pre-existing fail)
- node:test: 137 pass, 0 fail, 36 suites
- Combined: 3,360 tests across 141 suites

Wave 5 of 5 — feature/exam-rich-latex is ready for PR to dev.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* test(exam-rich-latex): add e2e + dogfood test suites

Two new Jest suites under tests/teaching/e2e/ that complement the M4
validation script with always-on regression coverage:

- exam-rich-latex-e2e.test.js (16 tests): walks fixture → formatter →
  output and asserts structural invariants (YAML nesting, packages,
  reporting policy, bracket-table row count vs fixture df_pairs,
  interaction reframing, \\question macro count). Includes a gated PDF
  compilation step that uses execFileSync to call quarto+lualatex when
  both tools are on PATH, and skips with a console marker otherwise so
  CI without TeX still passes.

- exam-rich-dogfood.test.js (15 tests): asserts the *real* shipped
  prompt file (src/teaching/ai/prompts/default/exam-rich.md) still
  satisfies the v2.18.0 spec contracts — bans "statistically
  significant", cites Dean (2017), names "marginal mean differences",
  invokes $s$-values and compatibility intervals. Cross-checks the
  exam template's option surface (policy, aids_level, textbook_
  citation_prefix, interaction_aware_language, include_bracket_table,
  exam_metadata.df_pairs) against the prompt's optional_variables
  declaration so the two artifacts can't silently drift.

The PDF compile test exercises the same path as
scripts/m4-validate-rich-format.js but as an automatic Jest test:
fixture → formatter → quarto render → assert non-zero PDF.

Local run: 31/31 pass (7s for the PDF compile, instant otherwise).
Full sweep: 3,245/3,254 (+31; the 1 remaining failure is the same
pre-existing stat-545-prompt-discovery test unrelated to this branch).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: remove ORCHESTRATE-exam-rich-latex.md (merge cleanup)

ORCHESTRATE-*.md is a working artifact for the feature branch and
should not land on dev per project convention.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(exam-rich-latex): address code-review feedback

Six issues from review of PR #103:

1. Math-region detection: replace stateful /g-regex .test() with
   startsWith() in interaction-aware-pass.js. Stateless, faster, and
   removes the fragile lastIndex-reset dance.

2. Bracket-table validation: throw on invalid df pairs (non-finite,
   zero, negative, or missing fields) instead of producing NaN/Infinity
   rows in the LaTeX output. New test covers four invalid inputs.

3. Reframe scope: extend interaction-aware pass to question.rubric
   (essay/short-answer) — previously only text + parts[].prompt were
   visited even though rubrics commonly contain "main effects" prose.
   Docstring rewritten to enumerate exactly what is and is not reframed.

4. YAML title escaping: use JSON.stringify() for the title scalar, which
   is a valid YAML double-quoted scalar that handles quotes, backslashes,
   control chars, and leading reserved indicators. Replaces the shallow
   quote-only escape.

5. PromptLoader.checkMinScholarVersion(): new helper with correct
   semver semantics for min_scholar_version (errors when Scholar < min,
   otherwise compatible). Replaces the bridge's incorrect reuse of
   checkVersion(), which has prompt_version semantics and emitted a
   bogus "older than Scholar" warning whenever the runtime was newer
   than the declared minimum. Fixes the pre-existing
   stat-545-prompt-discovery integration test failure.

6. Housekeeping: REFCARD ASCII art version bumped to v2.18.0;
   mkdocs.yml test/suite counts refreshed (3,400 / 143) via
   version-sync.js (propagated to README + tests/README).

Tests: 3,263 jest + 137 node:test = 3,400 total, all passing.
+11 new tests (6 checkMinScholarVersion + 2 rubric/YAML + 1 bracket
validation + 2 misc unchanged paths).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Test User <test@example.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- worktree: none (feature/exam-rich-latex removed)
- next: release PR (dev → main) for v2.18.0
- test count: 3,360 → 3,400 (post-review fix commits added 11 tests)
- milestone reflects merge state, not pre-PR prep
- adds Session 90 entry covering PR #103 review + 6 fixes + merge

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…gram

Fills three doc gaps for the v2.18.0 exam-rich-latex feature merged in PR #103:

1. New tutorial: docs/tutorials/teaching/rich-exam-format.md (~240 lines, 7 steps)
   - End-to-end walkthrough of /teaching:exam --format exam-rich-latex
   - df_pairs metadata, validation rules, common compile errors
   - \printanswers toggle + known short-answer limitation
   - Interaction-aware reframing rules + how to disable per course
   - Cross-linked from mkdocs.yml nav (slot after first-exam)

2. API-REFERENCE.md: new "PromptLoader Version Helpers" section
   - Documents the semantic distinction between prompt_version and
     min_scholar_version that caused the pre-existing stat-545
     integration test failure
   - Full param/return tables for checkVersion() and the new
     checkMinScholarVersion() (v2.18.0)
   - Decision table: which helper to pick for which field

3. ARCHITECTURE-DIAGRAMS.md: new Section 10 "Rich Exam LaTeX Pipeline"
   - Component-view flowchart (generator → formatter → helpers → Quarto)
   - Sequence diagram for prompt assembly (Phase A)
   - Sequence diagram for formatter composition (Phase B)
   - Module map + 5 design notes (format gate, inheritance,
     non-mutating reframe, math-region preservation, idempotency)

Lint + link-check clean for all three files.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Targeted improvements based on /craft:docs:website Phase 1 spec.
Score: 75/100 (C) → 83/100 (B).

Visual Hierarchy 46→51:
- Hand-authored TL;DR boxes on 5 top-level docs (index, QUICK-START,
  REFCARD, API-REFERENCE, ARCHITECTURE-DIAGRAMS). Each TL;DR is
  curated to the page's actual content — not heuristic-generated —
  and uses the existing USER-GUIDE.md pattern (📌 emoji + emoji-bullet
  Install/Try/Configure pattern with ⏱️ time estimates).
- Fixed MD028 by merging adjacent blockquotes (single > continuation).

Time Estimates 74→75:
- Added Level emoji marker (🟢/🔵/🔴) to 24 tutorials missing one,
  classified by topic heuristic:
  • 🟢 Beginner: first-exam, quiz, demo-course, semester-setup,
    learning-path, first-literature-search
  • 🔵 Intermediate: config-management, email-integration, feedback,
    lesson-plans-manifest, migration, preflight-checks, r-code-validation,
    sync-and-diff, validate-and-fix, validate-pipeline, weekly-content,
    simulation-design
  • 🔴 Advanced: manuscript-writing, methods-section, reviewer-response,
    analysis-planning, simulation-study
- assignments-solutions-rubrics.md: normalized "Time Estimate"/
  "Difficulty: Beginner" → standard "Time" + "Level: 🟢 Beginner".
- syllabus.md: added tutorial-difficulty Level marker (the existing
  Level field referred to course audience, not tutorial difficulty).

Mobile Responsive 60→100 (biggest single win):
- New docs/stylesheets/extra.css with:
  • .mermaid svg { max-width: 100%; overflow-x: auto; } — prevents
    horizontal page overflow on mobile for the 83 Mermaid diagrams.
  • 44px min touch targets on .md-nav__link in @media <= 768px.
  • Pre-block overflow rule to prevent code-induced horizontal scroll.
- Registered via extra_css: in mkdocs.yml.

Files: 32 changed (1 new: extra.css, 31 modified).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… v2.18.0 coverage

Four issues found by an audit of help commands + docs/help/:

1. /teaching:fix references (3 instances) — non-existent command. Replaced
   with /teaching:validate --fix (which is the real auto-fix command).
   Files: FAQ-teaching.md:1199, TROUBLESHOOTING-teaching.md:1114, :2696

2. Literal macro leaks — pages with render_macros:false were emitting
   raw `{{ scholar.command_count }}` and `{{ scholar.teaching_commands }}`
   in the rendered HTML. Hard-coded the values (33 / 18) so they render
   correctly. The `commandCount` regex in version-sync.js (`/(\ball )
   (\d+)( commands\b)/`) will auto-update the "33" instances on future
   releases. Files: FAQ-research.md:76, FAQ-teaching.md:30+65

3. Stale "Last Updated: 2026-02-09" dates contradicted the v2.18.0
   version markers. Bumped to 2026-05-12 in FAQ-teaching +
   TROUBLESHOOTING-teaching, and added proper version/date headers to
   FAQ-research + COMMON-ISSUES (previously had no version header at all).

4. v2.18.0 exam-rich-latex feature had zero coverage in help docs.
   Added 5 new Q&A entries to FAQ-teaching's "Exams & Quizzes" section:
   - What is exam-rich-latex / when to use it
   - F-critical bracket table + df_pairs metadata
   - Interaction-aware language pass
   - \printanswers toggle for answer-key PDF
   - Override defaults via teaching_style.exam
   Added 2 troubleshooting subsections to TROUBLESHOOTING-teaching:
   - Rich-LaTeX exam fails to compile (Quarto/LuaLaTeX/exam-class fixes)
   - Answer-key PDF identical to student PDF (known limitation)

Also: package-lock.json refresh (jstat dependency from PR #103 was
in package.json but not in lock — `npm install` reconciled it during
the /craft:check sweep).

Files: 4 help docs + package-lock.json.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…torial

Generated by /craft:docs:tutorial after analysis identified two gaps:

1. NEW: docs/tutorials/index.md — "Choose Your Path" orientation page
   - Three audience-based paths: new user, teaching instructor, researcher
   - Lists all 30 existing tutorials grouped by audience + difficulty
   - 🟢/🔵/🔴 difficulty markers + ⏱️ time estimates throughout
   - Cross-links to learning-path.md, help docs, and command reference
   - Registered as "📚 All Tutorials (Index)" in Getting Started nav
   - Closes a UX gap: the Tutorials nav section previously had no
     landing/orientation page, so users clicked into a flat list

2. NEW: docs/tutorials/research/bibtex-management.md (~245 lines)
   - Closes one of 6 missing research-tutorial coverage gaps
   - Covers /research:bib:add AND /research:bib:search together
   - 7 steps: setup, manual add, DOI-chain, single-file search,
     multi-location search, clean subset export, quoted paths
   - Includes cite-key conventions table + common-issues table
   - Registered after First Literature Search in Research → Tutorials nav

Remaining research-tutorial gaps (for future sessions):
  /research:doi, /research:method-scout, /research:lit-gap,
  /research:hypothesis

Lint clean (markdownlint), link-check clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…ub.md drift

Closes the remaining research-tutorial coverage gaps (research namespace
8/14 → 12/14). Generated via 4 parallel general-purpose agents using
docs/tutorials/research/bibtex-management.md as the style template.

NEW TUTORIALS (4)
  - docs/tutorials/research/doi-lookup.md (263 lines, 🟢 Beginner, 15 min)
    7-step tutorial: single-DOI lookup, returned-field semantics, BibTeX
    generation, /research:doi → /research:bib:add chain, input formats,
    error recovery, batch lookups.

  - docs/tutorials/research/statistical-method-discovery.md (264 lines, 🔵 Intermediate, 20 min)
    8-step tutorial: framing a methodological problem, invoking
    /research:method-scout, comparing candidates on assumptions / sample
    size / robustness, chaining to /research:analysis-plan and
    /simulation:design, reviewer-response use case.

  - docs/tutorials/research/finding-research-gaps.md (252 lines, 🔵 Intermediate, 25 min)
    8-step tutorial: topic framing, corpus-grounded gap analysis,
    reading the four gap dimensions, validating against domain knowledge,
    iterative refinement, handoff to /research:hypothesis and
    /research:analysis-plan.

  - docs/tutorials/research/hypothesis-generation.md (292 lines, 🔵 Intermediate, 20 min)
    8-step tutorial: framing the question, invoking /research:hypothesis,
    reading H0/H1 pairs, choosing framing (one/two-tailed, equivalence,
    non-inferiority), competing hypotheses, validation checklist,
    aligning with v2.18.0 evidence-based reporting policy.

HUB.MD DRIFT FIX
  - TEACHING count: 15 → 18 (preflight, canvas, validate-r added since
    v2.15.0 but never reflected in the Layer 1 ASCII art)
  - Subcategory listings now match src/discovery/index.js
    TEACHING_SUBCATEGORY_MAP (single source of truth):
      Content (9): exam, quiz, slides, assignment, solution, syllabus,
                   lecture, validate-r, canvas
      Assessment (2): rubric, feedback
      Config (7): validate, diff, sync, migrate, demo, config, preflight

NAV + INDEX UPDATES
  - mkdocs.yml: 4 new entries under Research → Tutorials
  - docs/tutorials/index.md: 4 new tutorials in audience-grouped and
    difficulty-grouped tables

Total: +1,071 lines across 4 new tutorials, +3 changes to hub.md ASCII,
+6 nav lines, +5 index entries.

Lint: all 6 modified/new files clean. Link-check: all clean.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
… simulation-analysis, canvas-lms-export)

Final batch closes the remaining dedicated-tutorial gaps. Research namespace
12/14 → 14/14 (effective 100%; /research:literature:arxiv intentionally
covered via first-literature-search.md rather than a duplicate dedicated
tutorial). Teaching namespace also gains canvas-lms-export, which previously
had only indirect coverage across 5 other tutorials.

NEW TUTORIALS (4)
  - docs/tutorials/research/results-section.md (393 lines, 🔴 Advanced, 60 min)
    8-step tutorial: inventory analysis output, invoke /research:manuscript:
    results, structure (descriptive → primary → secondary → robustness),
    notation pairing with methods section, v2.18.0 evidence-based
    reporting (compatibility intervals, $s$-values), table/figure
    discipline, sensitivity analyses, pre-submission validation.

  - docs/tutorials/research/proof-review.md (295 lines, 🔴 Advanced, 45 min)
    8-step tutorial: prepare proof, first review with /research:manuscript:
    proof, triage by severity, pattern checks (induction/contradiction/
    direct/probabilistic), notation sync with methods, second pass after
    revision, use cases (pre-submission/reviewer-response/defense-prep),
    archive workflow.

  - docs/tutorials/research/simulation-analysis.md (275 lines, 🔵 Intermediate, 35 min)
    8-step tutorial: inspect long-format results, invoke /research:
    simulation:analysis, compute standard metrics (bias/MSE/coverage/
    Type I/power/width with MC SE), build tables and figures, diagnose
    convergence/outliers, apply v2.18.0 evidence-based reporting policy,
    hand artifacts to manuscript commands.

  - docs/tutorials/teaching/canvas-lms-export.md (307 lines, 🔵 Intermediate, 30 min)
    8-step tutorial: dry-run, pre-flight validation (v2.17.0 runCanvas
    PreflightValidation), conversion, type mapping (all 10 Canvas types
    with hyphen-separator emphasis), intermediate file inspection, verify/
    emulate (with essay/short-answer false-positive caveat), Canvas import
    workflow, iteration on errors. Cross-links TROUBLESHOOTING-teaching.md
    Canvas section.

NAV + INDEX UPDATES
  - mkdocs.yml: 4 entries (3 research + 1 teaching) added in alphabetical
    workflow order within their nav blocks
  - docs/tutorials/index.md: new "Sim. analysis" row in researcher table,
    proof-review + results-section added to Writing section

Total: +1,270 lines across 4 new tutorials.
Lint: 5 files clean. Link-check: all clean.

Cumulative tutorial coverage since v2.18.0 merge:
  research-tutorial dedicated coverage: 7/14 → 14/14 (100%)
  teaching-tutorial dedicated coverage: 17/18 → 18/18 (100%)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
/craft:site:update full-sync — propagates the v2.18.0 rich-LaTeX format
across 9 reader-facing and reference surfaces that had previously missed
the feature. No code changes; site-only.

PRIMARY SURFACES (reader-facing)
  - docs/OUTPUT-FORMATS-GUIDE.md: new "Rich-LaTeX" row in the Format
    Comparison Table + full "Rich-LaTeX (.qmd)" section with best-for,
    characteristics, command, configuration, rendering, common issues
  - docs/USER-GUIDE.md: exam-rich-latex listed in Output formats with
    v2.18.0 callout
  - docs/TEACHING-WORKFLOWS.md: v2.18.0 callout in Midterm Exam Workflow
    Step 2 (generate exam)
  - README.md: three fixes —
      (a) "31 Slash Commands" → "33 Slash Commands"
      (b) "Teaching (15 commands)" → "Teaching (18 commands)" with the
          3 missing commands added (validate-r, preflight, canvas)
      (c) /teaching:exam example + format flag now lists exam-rich-latex

REFERENCE / DEEP-DIVE SURFACES
  - docs/TEACHING-COMMANDS-API.md: --format + --metadata rows added to
    /teaching:exam Parameters table
  - docs/TEACHING-COMMANDS-REFERENCE.md: new "Supported --format values"
    table after the existing format block
  - docs/commands.md: --format FMT row updated with exam-rich-latex
  - docs/CONFIGURATION.md: new "teaching_style.exam Section (v2.18.0)"
    documenting the policy/aids_level/textbook_citation_prefix/
    interaction_aware_language block, with field-reference table
  - docs/API-REFERENCE.md: new "Exam Rich-LaTeX Formatter (v2.18.0)"
    section documenting ExamRichLatexFormatter.format(),
    formatQuestion() override, reframeQuestionLanguage(), and the three
    helpers (bracket-table-generator, s-calibration-table,
    interaction-aware-pass)

Lint: 9 files clean. Link-check: all clean. Badges: already in sync
(v2.18.0 / 3400 tests).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Data-Wise Data-Wise merged commit 3ffe29f into main May 13, 2026
14 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant