utils/leetcode_coach/leetcode_coach/DOCS-how-to.md
Krzysztof kuhy Rudnicki e06df74caf Coach tab: no sessions yet is a known state with how to start
The exporter used to publish coach: null before the first session, so the
tab printed "unknown" everywhere with no way forward. Now a missing or empty
sessions dir exports empty problems/re-tests, every cluster at zero with its
problems (slug, number, title, URL) and next, and a how_to block (commands,
the 4-step method, first command). null stays for a real failure.

how_to lives once in leetcode_coach/how_to.py; DOCS-how-to.md quotes it and a
test fails on drift. The app's Coach tab shows a How to start card (monospace
command box with copy), one card per cluster with tappable problems, re-tests
with their command, and "unknown" + why only for a null section. Also fixes
the done/solved key mismatch (the app read a key no exporter wrote).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PjvF5DZG9JduSBYKxqyysi
2026-10-23 19:24:20 +02:00

998 B

The commands and the method, as the status app's Coach tab shows them

Quoted verbatim from how_to.py; tests/test_how_to.py fails if they differ. SKILL.md section 3 is the full method; this is its one-line-per-step form.

Commands:

  • leetcode --cluster <name> - Serve the next problem of a concept cluster (a due re-test comes first).
  • leetcode <url> - Coach one problem, from its LeetCode URL or slug.
  • leetcode due - List the cold re-tests that are due.
  • leetcode report - One row per session: requirements before code, hint rung, reveal.

The command skips problems LeetCode already shows as Accepted, so it may serve a later one than listed here.

The method:

  1. Constraint - Turn the hard constraint into a rule for the design.
  2. Requirements - List what the operation must do, as properties, never by name.
  3. Toolbox - Search the toolbox for an operation with those properties.
  4. Post-mortem - Say which hint gave which requirement, then make the cards.