From e64285f201393a5aed94730433e3d70b2843aef1 Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Tue, 25 Aug 2026 11:19:43 -0400 Subject: [PATCH] =?UTF-8?q?docs(scripts):=20remove=20sync=E2=80=91solution?= =?UTF-8?q?s=20command=20documentation?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .omp/commands/sync-solutions.md | 35 --------------------------------- 1 file changed, 35 deletions(-) delete mode 100644 .omp/commands/sync-solutions.md diff --git a/.omp/commands/sync-solutions.md b/.omp/commands/sync-solutions.md deleted file mode 100644 index d29dc25..0000000 --- a/.omp/commands/sync-solutions.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -description: Sync work/ leetcode solutions into docs/solutions/ pages (gold standard format) ---- - -Sync every leetcode solution under `work/` into a docs page under `docs/solutions/`, formatted like the gold standard `docs/solutions/(two-pointers)/344-reverse-string.mdx`. Extra focus (optional): $@ - -## Run the script - -The port is fully scripted — do not hand-write pages: - -``` -bun run sync -``` - -`scripts/sync.ts` does the whole pipeline: - -- Globs `work/**/*.{js,py}` (`..{js,py}` under `work///`) and groups the two language variants of a problem by leetcode number. -- Parses each file's header comment (js block comment / py docstring) into title, difficulty, statement, examples, constraints, and follow-up. -- New problems get a full page at `docs/solutions/()/-.mdx`: frontmatter, `` topic (README curriculum table, falling back to the `work/` subdirectory), `::::warning` for follow-ups/special requirements, examples, constraints, and the solution code verbatim. -- `()` is the kebab-cased `work/` subdirectory (`(array)`, `(hash-table)`, `(two-pointers)`, …) and becomes the sidebar group; the leetcode-number filename prefix orders pages numerically. Both are stripped from the URL (`(two-pointers)/344-reverse-string.mdx` → `/solutions/reverse-string`). The script moves any page whose path drifts from this scheme. -- Frontmatter `title` keeps the number (`'344. Reverse String'`); `sidebar.label` is the number-free problem name. The script backfills a missing `sidebar.label` on existing pages but never overwrites one. -- Already-ported pages (frontmatter title starts with the leetcode number) only get their `## Solution` section regenerated — curated prose is never touched. -- Problems solved in both languages render as a `` (Python first, then JavaScript); single-language solutions render as a plain fence. - -The script prints the report table: work file → docs page → created / moved / updated / skipped (already in sync). - -## Review - -Skim any **created** pages — the prose transforms (backticking literals in example explanations, warning detection) are heuristic. Fix wording by editing the page prose directly; it won't be overwritten on the next sync. Never edit inside `## Solution` — that section is owned by the script and synced from `work/`. - -## Verify - -1. `bunx blume build --isolated` must succeed with no new warnings; confirm each new route generated (`/solutions/`). -2. Spot-check one new page's built HTML for the badge, callout (when present), and solution code. -3. `rm -rf .blume-verify` when done.