Brings in the dev-side prose / bib / math fixes that landed since the
yaml-audit branch was cut, and resolves three small conflicts:
* interviews/vault-cli/scripts/archive/split_corpus.py
origin/dev deleted it (archive cleanup); we honor the deletion.
* interviews/vault-cli/scripts/validate_drafts.py
origin/dev removed a leftover no-op statement; took theirs.
* interviews/vault-cli/scripts/summarize_proposed_chains.py
origin/dev renamed loop var lvl→level; took theirs.
The two protected qmds (data_selection.qmd, model_compression.qmd)
are temp-stashed before the merge to honor the 'do not touch' rule;
restored after the merge commit lands.
After this commit, yaml-audit contains every commit on origin/dev as
an ancestor, so dev can fast-forward to yaml-audit's tip when the
maintainer is ready to merge.
Before this change, the StaffML Next.js dev server fetched scenario and
details (including napkin_math) from the production Cloudflare Worker
even when contributors had local YAML edits — so changes weren't visible
without shipping. The opt-in static-fallback path existed but was wired
incorrectly: getStaticFullDetail used a Function-constructor dynamic
import of ../data/corpus.json, which Turbopack rewrote to a non-existent
/_next/static/data/corpus.json URL and 404'd at runtime.
Fix in three parts:
1. Loader (interviews/staffml/src/lib/corpus.ts): replace the broken
dynamic import with fetch('/data/corpus.json'). On failure, throw a
clear error pointing at `vault build --local`.
2. Build (interviews/vault-cli/src/vault_cli/commands/build.py): mirror
the generated corpus.json into interviews/staffml/public/data/ so
Next serves it as a static asset. Add --local as a clearer alias for
--local-json and update the help text to spell out the dev workflow.
3. Wiring (interviews/staffml/package.json + scripts/build-local-corpus.mjs):
predev now runs `vault build --local` automatically, with a soft-fail
path if the vault CLI isn't installed (so first-time contributors
still get a working dev server, just with the worker fallback). The
committed .env.development sets NEXT_PUBLIC_VAULT_FALLBACK=static so
the static path is the default in dev. Both copies of corpus.json are
gitignored as build artifacts (the YAMLs are the source of truth).
lucide-react v1.0 removed all brand icons (Github, Twitter, Facebook,
etc.) for trademark reasons, so the bundled Github symbol is no longer
exported. Add a local GithubIcon component using the standard GitHub
mark, bump lucide-react to ^1.14.0, and update the four consumers.
Closes#1667.
Direct postcss already ^8.5.12, but next@16.2.4 was bringing in a
nested postcss@8.4.31 that tripped GHSA-...-postcss CSS-stringify XSS.
Top-level override forces all postcss instances to ^8.5.12 (resolves
8.5.13); nested next/postcss copy is no longer present in lockfile.
Closes Dependabot #45.
StaffML pins tailwindcss ^4.2.4 but its postcss.config.js still
referenced 'tailwindcss' as a plugin, the v3 entrypoint that v4
removed. CI build was failing with: 'It looks like you're trying
to use tailwindcss directly as a PostCSS plugin. The PostCSS
plugin has moved to a separate package, install @tailwindcss/postcss.'
Changes:
- Add @tailwindcss/postcss ^4.2.4 to devDependencies (lock updated).
- postcss.config.js now references '@tailwindcss/postcss' instead
of 'tailwindcss'.
- globals.css switches from the legacy '@tailwind base/components/
utilities' triple-directive to the v4 single-line '@import
"tailwindcss";' which the new plugin expects.
Closes the cleanup arc (A.1–A.10 in RESUME_PLAN_RELEASE.md). Every
gate is now green: vault check --strict, vault lint, vault doctor,
vault codegen --check, staffml validate-vault, Playwright (9/9), tsc.
A.1 mobile-1962.svg: renamed `Edge` → `RegEdge` in graphviz source
(`Edge` is a reserved keyword); SVG renders cleanly. Also fixed
tinyml-1570.py (missing `import numpy as np`) which the new failure
log surfaced.
A.2 render_visuals.py: structured per-ID failure log written to
`_validation_results/render_failures.json` on every run; non-zero
exit on any per-item crash; new `--fail-fast` and `--failure-log`
CLI options. Replaces the prior silent-failure mode.
A.3 LinkML visual schema: typed as a structured sub-schema. New
`VisualKind` enum (svg only — `mermaid` was reserved but never
shipped, dropped to keep the enum honest). Path regex tightened
to `^[a-z0-9-]+\.svg$`. Alt minimum length 10, caption required
minimum length 5. TypeScript Visual interface + Question.visual
field added to staffml-vault-types/index.ts.
A.4 Pydantic Visual + Question validators:
- Visual.kind hard-rejects anything but `svg`
- Visual.path enforces the new regex
- Visual.alt min 10 chars, caption required min 5 chars
- Question.model_validator: visual.path MUST resolve to a real
file under interviews/vault/visuals/<track>/. Skipped in
production deploys where the working tree is absent.
A.5 Registry repair + doctor split:
- tools: repair_registry.py appended 5,269 missing IDs
(the rename refactor at 8a5c3ff3c left the append-only registry
unsynced; this brings disk-coverage to 100%). Header block in
id-registry.yaml documents the rebuild rationale.
- doctor.py: split symmetric `registry-integrity` check into
`disk-coverage` (HARD FAIL if any disk YAML id is unregistered)
and `registry-history` (INFO ONLY for retired ids — the registry
is by design an audit log, retired ids are normal). Pre-existing
`_check_schema_version` bug (`versions == {1}` vs string `"1.0"`)
fixed.
A.6 Lint calibration via 4-expert consensus + bloom-canonical
reclassification:
- Spawned 4 experts (Vijay Reddi, Chip Huyen, Jeff Dean,
education-reviewer) on 42 disputed (zone, level) pairs;
consensus-builder aggregated to 15 valid / 19 invalid / 8
borderline.
- User arbitrated 8 borderlines: 7 widen / 1 reclassify.
- Built ZONE_BLOOM_AFFINITY matrix (Education-Reviewer's idea):
every zone admits its dominant Bloom verb + adjacent verbs,
rejects clear hierarchy violations.
- reclassify_zone_bloom_mismatch.py applied 576 deterministic
zone fixes via BLOOM_CANONICAL_ZONE mapping (e.g. fluency+analyze
→ analyze, recall+analyze → analyze, evaluation+apply → implement).
- Question.model_validator(_zone_bloom_compatible): hard-rejects
future zone-bloom mismatches at write time. Generated drafts
can no longer ship a self-contradicting classification.
- ZONE_LEVEL_AFFINITY widened per consensus + arbitration +
post-reclassification adjustments. Lint warnings: 1,308 → 0.
A.7 Chain integrity:
- repair_chains.py: drops chain refs when a chain has <2 published
members (chain ceases to exist), renumbers all members of any
chain whose positions are non-sequential / duplicated /
non-monotonic-by-level. Sort key: level ascending, then old
position, then qid (deterministic).
- validate-vault.py: relaxed sequential check to unique-positions
check. Position gaps from mid-chain deletions are normal; what
matters is uniqueness + bloom-monotonicity (vault check --strict
enforces both from YAML source-of-truth).
A.8 Practice page visual + zoom modal:
- QuestionVisual.tsx: wraps the `<img>` in `<Zoom>` from
react-medium-image-zoom (4 KB). Click image → fullscreen
`<dialog data-rmiz-modal>`; ESC closes. Added test-id
`question-visual-img` for stable selector.
- New Playwright test: 9th in the suite, deep-links cloud-4492,
asserts the dialog opens on click and closes on ESC.
- TypeScript: removed `mermaid` from local Visual types in
corpus.ts and corpus-vault.ts; tsc clean.
A.9 All gates green:
- vault check --strict: 0 errors / 0 invariant failures
- vault lint: 0 errors / 0 warnings (was 1,308 warnings)
- vault codegen --check: artifacts in sync (hash baseline updated)
- vault doctor: 0 fails (registry-history info, git-state warn
on uncommitted state-pre-this-commit)
- staffml validate-vault: 0 errors / 0 warnings, deployment-ready
- Playwright: 9/9 pass (was 8; +zoom modal test)
- render_visuals: 0 errors (was 2 silent failures pre-A.2)
- tsc: clean
Distribution after reclassification: 9,544 published unchanged;
576 items moved zone via bloom-canonical mapping (full per-item
report at /tmp/reclassify_changes.csv). Chain count 879 → 850
after orphan-singleton drops. release_hash updated.
Carry-forward to next session (Phase B):
- Priority gap closure for parallelism cells + global L4-L6+
(the run that produced this corpus did not close the targeted
cells; B.3 needs specialized prompts per cell-class)
- 120 NEEDS_FIX items from coverage_loop/20260425_150712/ still
carry judge fix_suggestions; spawn fix-agent in Phase C
Wire the periodic-table YAML into staffml so the website has a
canonical view of the design space, with a shared sync script that
keeps the React data file derived from periodic-table/table.yml.
* scripts/sync-periodic-table.mjs — generator that reads
../../periodic-table/table.yml and writes
src/data/periodicTable.ts
* src/data/periodicTable.ts — generated TypeScript module with the
full element list (do not edit by hand; re-run the sync script)
* src/app/framework/page.tsx + PeriodicTable.module.css — new
/framework route that renders the table with role colors and
layer rows
* src/components/Nav.tsx — add "Framework" link with the Atom icon
* src/app/layout.tsx, globals.css, ThemeProvider.tsx — supporting
layout adjustments for the new route
* package.json + lockfile — minor dependency bumps
Fix the feedback data round-trip end-to-end:
- QuestionFeedback: dedup guard, aria-pressed, hydrate previous
feedback on mount, wire Report/Suggest to analytics events
- analytics.ts: computeSummary() aggregates thumbs and difficulty
with last-write-wins dedup per question+session
- dashboard: new thumbs ratio and difficulty distribution panels
- gauntlet: add QuestionFeedback to per-question review
- progress.ts: include analytics in export/import
- worker.js: server-side summary aggregates feedback with dedup
Add Vitest test infrastructure (34 journey tests across 2 files)
and embed type-check + test steps in both CI deploy workflows
so tests gate every build before deployment.
Parts 5-9 were lecture-only (0 code blocks). Now every section has
live demo code using real mlsysim API: EconomicsModel, SustainabilityModel,
DSE search, Engine.sweep, ESP32/nRF52840/H100 comparison, Pipeline
composition, SensitivitySolver, capstone starter code.
Figure placeholders added for carbon-geography and hardware-spectrum SVGs.
- Built a Next.js 14 App Router application in `interviews/staffml` with a premium Vercel/Linear dark-mode aesthetic.
- Developed a robust Python parser (`build_corpus.py`) to convert 1,067 Markdown flashcards into a structured `corpus.json` for the platform.
- Integrated Pyodide WebAssembly to execute the `mlsysim` Python physics engine directly in the browser without a backend.
- Created a Schema Validator (`validate_playbook.py`) to ensure all community contributions maintain structural integrity.
- Upgraded 30+ Visual Debugging scenarios with high-fidelity, theme-aware Mermaid and React Flow diagrams.
- Designed an interactive 'Data Flow' component utilizing React Flow for the Amdahl's Law communication wall.
- Added 'Proof of Work' gamification loops to drive repository stars and user engagement.