Skip to content

Utilities & Scripts

The small tools that keep both repos honest. Split by when they run: authoring-time (tools repo, on a laptop) vs build-time (website repo, in CI) vs one-off operational scripts.

Tools repo (authoring-time)

ScriptJob
tools/site_config.pythe single resolver for "where is the real website checkout" (sibling default, EDIKY_WEBSITE_ROOT override). Run directly to sanity-check. Everything imports from it — the fix for the 34-duplicate incident
tools/content_utils.pyshared frontmatter/marker parsing for the Python pipelines — the Python mirror of the website's contentParse.js contract
tools/cs_eval/ai_service.pythe Python AIService provider abstraction (swap point: _PROVIDERS map) shared by CS and aptitude evaluation
tools/qgen/*the DSA machine — see qgen: build_tests.sh, fuzz.py, verify_solution.py, inject.py/extract.py (move solutions/tests in and out of markdown), langs.py (per-language compile/run), run_cases.py, fix_case_spread.py, trim_oversized_cases.py, audit_sizes.py, presets.json
commands.txtthe crib sheet of real invocations — fastest way to see how anything is actually run
docs/original deep-dive notes: the two pipeline architecture docs (distilled into this site), the qgen framing guides, and judge0_pypy_runtime_setup.md (how the PyPy3 image was built)

Website repo (build-time — run inside npm run build)

ScriptJob
tools/build-content.mjsthe sharder: per-section index JSON, verbatim body copy, >16KB hidden-test sidecar split, manifest.json (incl. the source:"cdn" flag for CP). The most load-bearing script in the ecosystem — Question Bank
tools/lint-content.mjsthe gate: kebab-case slugs, required frontmatter, size budgets, banned <bits/stdc++.h>. Runs in every build and as the final step of every authoring pipeline — one rule set, two enforcement points
tools/copy-sql-wasm.mjsships the sql.js WASM binary into public/ with the browser-condition filename — the fix for build failure #3
tools/convert-sheet.mjsExcel → cpTests.js ingestion for the CP set, with duplicate detection added after the 11-duplicate audit
tools/gen-cp-content.mjsgenerated the 600 CP editorial scaffolds, 1:1 with cpTests.js

Website repo (operational one-offs)

ScriptJob
scripts/send-reminders.mjsthe original Actions-cron reminder sender — retired from production (Worker replaced it) but kept for manual sends/local testing; shares field conventions with the Worker
scripts/backfill-emails.mjsthe one-time patch that filled missing email fields on old profiles after the sync-gap bug

This repo (docs portal)

ScriptJob
scripts/build-ai-index.mjsregenerates the docs-assistant retrieval index (/ai/docs-map.json + per-page text) before every dev/build — AI Pipeline

The pattern across all of them

Every script here exists because of a specific incident or a specific constraint, and each page in this documentation names which. When adding a new utility, follow the house style: it should enforce a rule (so the bug class dies), live in the repo matching when it runs, and get a one-line entry here.

Ediky Workflow — internal engineering documentation.