From 1084410832140d8a8579af454b622d837117df6d Mon Sep 17 00:00:00 2001 From: Prad Nukala Date: Mon, 21 Sep 2026 15:53:28 -0400 Subject: [PATCH] docs(readme): add videos command and update schedule dates and badges --- AGENTS.md | 5 ++++- README.md | 47 +++++++++++++++++++++++------------------------ 2 files changed, 27 insertions(+), 25 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index c182d39..273c42f 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -67,6 +67,9 @@ bun run test # run ONE solution against LeetCode's judge (not a test bun run submit # submit ONE solution to LeetCode (newest scaffold first, nothing # hidden; last_submitted stamped in the db on exit 0) bun run sync # work/1 → apps/docs/content/ pages (re-solves are never published) +bun run videos # docs pages with no embed → NeetCode video per page + # (channel search scraped, no API key; --write appends the + # `## Explanation` embed; "no NeetCode match" pages stay untouched) bun run dev|build # Blume docs site (runs in apps/docs/) bun run close-solved -- --dry-run # issue reconcilers (also DRY_RUN=1) bun run close-topics -- --dry-run @@ -102,7 +105,7 @@ curl -X POST -H "Authorization: Bearer $LINK_KEY" \ - `apps/api/src/index.ts` — router + cron dispatch; `apps/api/wrangler.jsonc` — bindings (`DB`, `EMAIL`), crons, vars; secrets `GH_PAT`/`WEBHOOK_SECRET`/`LINK_KEY` via `wrangler secret put`. - `apps/api/src/digest.ts` / `apps/api/src/email.tsx` — the daily digest, split data/presentation. `digest.ts` reads D1 into a `DigestData`; `email.tsx` owns every colour and every sentence, and renders both the HTML and (via its own `plainDigest`, not React Email's `plainText` mode, which flattens the tables) the text alternative. The retrieval rules hold by construction: `DigestRow` has no title and no issue field, so a review or drill line *cannot* leak the topic or a solution link. Subject is `(Day N/56) LeetCode Daily Digest`. - `apps/api/src/png.ts` — hand-rolled PNG encoder (RGB8, one IDAT, zlib via `CompressionStream("deflate")`, CRC32, 5×7 bitmap font). It exists because every major email client refuses remote SVG, so `/chart/heatmap.png` rasters the heatmap for the digest while `/chart/heatmap.svg` keeps serving the README byte-for-byte. Both come from one `heatmapCells()` so the two pictures cannot drift. -- `apps/cli/sync.ts` — work→docs contract: on existing pages only the `## Solution` section itself is script-owned, bounded by `solutionEnd()` at the next unfenced top-level heading; human prose before it and any sections after it (`## Approach`, `## Explanation`) are never touched. Never hand-write solution pages or edit inside `## Solution`. +- `apps/cli/sync.ts` — work→docs contract: on existing pages only the `## Solution` section itself is script-owned, bounded by `solutionEnd()` at the next unfenced top-level heading; human prose before it and any sections after it are never touched. Never hand-write solution pages or edit inside `## Solution`. The two hand-owned sections around it have their own owners: `## Approach` (a Mermaid flowchart tracing the page's code, placed *before* `## Solution` so a re-sync keeps it) is written per the `problem-approach` skill (`/problem-approach` fills every page missing one); `## Explanation` (the NeetCode `` embed, after `## Solution`) is appended by `bun run videos --write` (`apps/cli/videos.ts`). - `apps/cli/work.ts` — the `work/` layout: bucket paths, `isSolution()`/`solvedInBucket()` (the stub test, shared with `close-solved.ts`), `firstSolved()` (one `git log`, ET dates, keyed by LC number so past layout moves don't matter), and `reviewQueues()` (what each window still owes). Everything that needs to know where a solution file lives, or when it was solved, goes through here. - `apps/api/src/stats.ts` / `apps/cli/stats.ts` / `apps/cli/tui.ts` / `apps/cli/api.ts` — the read side. `buildStats()` is the ONE aggregation: phases, ladder, difficulty, per-topic temperature, gates, the 14-day due queue, and `heat` (every campaign day, zeros and future days included — the docs page windows the tail off it rather than asking a second question). Two readers consume it, the docs island and `bun run stats`, so its shape is both their contract: change all three together. `tui.ts` is hand-rolled ANSI (bars, sparklines, heat cells, alternate screen) on charts.ts's palette, and every chart differs by GLYPH as well as by colour so a piped or `NO_COLOR` dashboard still reads. The TUI recomputes nothing: the only local fact it shows is the `work/` solution count, which is inventory, not schedule. - `README.md` live charts are Worker endpoints (`/chart/*.svg`, `/badge/gate.svg`, 5-min Camo cache); the docs `/progress` page fetches `/api/stats` client-side (`apps/docs/islands/ProgressDashboard.tsx`). diff --git a/README.md b/README.md index 5d76821..b9e5b48 100644 --- a/README.md +++ b/README.md @@ -4,26 +4,26 @@

follow + Custom badge badge - gate pass rate

8-week interview-prep fight camp. Each phase is a milestone; each topic an issue; each problem a sub-issue.
- New topic Mon–Fri, gate on Saturday, Sunday off — every solve comes back at +3 and +7 days, - the two windows that keep the rest day clear (a Thursday solve's +3 slides to Monday).
- Charts are live from the SRS Worker, never committed: pushing a solution or tapping the daily digest moves them within ~5 min.
+ Charts are live from the SRS Worker — the daily digest email drives the schedule.

- - - - - - - - -
phase progress
SRS ladder — new / +3 / +7 / retiredattempt heatmap
+

+ phase progress +

+ +

+ SRS ladder +

+ +

+ attempt heatmap +

## Phase I — Linear Structures · Weeks 1–2 @@ -212,7 +212,7 @@ B ⭐295Find Median from Data Stream B ⭐502IPO - 15. Trie
Wk 6 · Mon Sep 21
builds on 11 + 15. Trie
Wk 4 · Wed Sep 9
builds on 11 A208Implement Trie A211Add & Search Words @@ -234,7 +234,7 @@ - 16. Graph DFS
Wk 6 · Mon Sep 21
builds on 11 + visited set + 16. Graph DFS
Wk 4 · Thu Sep 10
builds on 11 + visited set A200Number of Islands A695Max Area of Island @@ -244,7 +244,7 @@ B399Evaluate Division B261Graph Valid Tree - 17. Graph BFS
Wk 6 · Tue Sep 22
builds on 12 + visited set — shortest path unweighted + 17. Graph BFS
Wk 4 · Fri Sep 11
builds on 12 + visited set — shortest path unweighted A994Rotting Oranges A127Word Ladder @@ -252,14 +252,14 @@ B433Minimum Genetic Mutation B286Walls and Gates - 18. Topological Sort
Wk 6 · Tue Sep 22
builds on 16 + 18. Topological Sort
Wk 5 · Mon Sep 14
builds on 16 A207Course Schedule A210Course Schedule II B ⭐269Alien Dictionary B1462Course Schedule IV - 19. Union-Find
Wk 6 · Wed Sep 23
builds on 16's problem class + 19. Union-Find
Wk 5 · Tue Sep 15
builds on 16's problem class A684Redundant Connection A323Number of Connected Components @@ -282,7 +282,7 @@ - 20. Backtracking
Wk 6 · Thu Sep 24
builds on 16 — then unlock LC 212 from topic 15 + 20. Backtracking
Wk 5 · Wed Sep 16
builds on 16 — then unlock LC 212 from topic 15 A78Subsets A39Combination Sum @@ -293,7 +293,7 @@ B22Generate Parentheses B ⭐52N-Queens II - 21. 1-D Dynamic Programming
Wk 6 · Fri Sep 25
builds on 20 + 21. 1-D Dynamic Programming
Wk 5 · Thu Sep 17
builds on 20 A70Climbing Stairs A746Min Cost Climbing Stairs @@ -305,7 +305,7 @@ B91Decode Ways B647Palindromic Substrings - 22. Multi-D / Grid DP
Wk 7 · Mon Sep 28
builds on 21 + 22. Multi-D / Grid DP
Wk 5 · Fri Sep 18
builds on 21 A62Unique Paths A64Minimum Path Sum @@ -316,7 +316,7 @@ B221Maximal Square B ⭐97Interleaving String - 23. Greedy
Wk 7 · Tue Sep 29
builds on 21 — includes Kadane's + 23. Greedy
Wk 6 · Mon Sep 21
builds on 21 — includes Kadane's A53Maximum Subarray A55Jump Game @@ -326,7 +326,7 @@ B918Maximum Sum Circular Subarray B763Partition Labels - 24. Intervals
Wk 7 · Wed Sep 30
builds on 23 + 24. Intervals
Wk 6 · Tue Sep 22
builds on 23 A57Insert Interval A56Merge Intervals @@ -337,4 +337,3 @@ B252Meeting Rooms I -