Add the HLD mock loop, the LLD drill log, and get_current_time - #5
Open
codenamesubho wants to merge 1 commit into
Open
Add the HLD mock loop, the LLD drill log, and get_current_time#5codenamesubho wants to merge 1 commit into
codenamesubho wants to merge 1 commit into
Conversation
Brings HLD up to parity with the LLD mock loop, and fixes a weakness in the practice docs it writes. Until now an HLD session saved exactly one artifact: a practice doc that blended what the candidate produced with what the correct answer was. Two things followed. The reference the interviewer graded against was never persisted -- it lived only in the model's context, where it could drift under candidate pushback, so "the reference is frozen" was advisory rather than enforceable. And because the candidate's own design was never captured separately, there was nothing to diff against; feedback was reconstructed at the end of the round, which systematically cleans up what was actually said. Seven tools, mirroring the LLD side: start_hld_mock_attempt freeze reference.md BEFORE posing the problem save_hld_attempt what the candidate actually designed save_hld_diff matched / missed invariants / diverged save_hld_evaluation seven-dimension scorecard; also logs the session list_hld_mock_attempts what's been attempted, what's incomplete read_hld_mock_file open one of the four files get_hld_feedback rubric averages, weakest dimensions The pre-commitment is enforced rather than promised: start_hld_mock_attempt refuses to overwrite an existing reference.md and has no overwrite flag, and written_at comes from the server's own clock so it can't be backdated. A genuine re-attempt opens a -r2 folder. save_hld_diff separates a missed *invariant* (a real gap) from a divergence at a *choice point* (not a gap if the trade-off reasoning held), and compares end-to-end flows rather than just which components got named -- two designs can list identical boxes and route a request completely differently. The attempt folder holds the evidence, ungroomed; the practice doc holds the correct design. Nothing under Mock Solutions/ is ever surfaced by list_practice_docs, and no tool points a tracker doc_path at it -- an attempt groomed toward the right answer reads clean six weeks later and tells you nothing about which parts you actually got right. Also here: - The four rubric helpers are parameterized on prefix rather than duplicated, so LLD and HLD share the aggregation code. HLD scores are stored under an "hld:" prefix. - get_progress_summary filtered only the "lld:" prefix when picking out behavioral competencies, so HLD rubric scores would have rendered as behavioral ones. Both rubrics now report in their own blocks. - save_practice_doc and start_hld_mock_attempt warn (never block) when a design doc has no "## End-to-end flows" section. A component diagram shows what exists; that section shows what happens, and its absence is what makes an HLD doc hard to revise from. - test_hld_tools.py: 79 hermetic checks, one named case per acceptance criterion, run against a synthetic HLD root in a temp directory. - skills/hld-interviewer/SKILL.md, updated for the new flow. The only copy on this machine lived in a per-session upload cache; this is the durable one. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three related additions to the interview-memory MCP server. They ship together because the HLD work depends on
_now(), added by the clock commit.The HLD mock loop (the bulk of this PR)
Brings HLD up to parity with the existing LLD mock loop.
Until now an HLD session saved exactly one artifact: a practice doc blending what the candidate produced with what the correct answer was. Two problems followed. The reference the interviewer graded against was never persisted — it lived only in the model's context, where it could drift under candidate pushback, so "the reference is frozen" was advisory rather than enforceable. And because the candidate's own design was never captured separately, there was nothing to diff against; feedback was reconstructed at the end of the round, which systematically cleans up what was actually said.
Seven new tools, mirroring the LLD side:
start_hld_mock_attemptreference.mdbefore the problem is posedsave_hld_attemptsave_hld_diffsave_hld_evaluationlist_hld_mock_attemptsread_hld_mock_fileget_hld_feedbackLayout, one folder per attempt under
HLD_SOLUTIONS_DIR/Mock Solutions/:The pre-commitment is enforced, not promised.
start_hld_mock_attemptrefuses to overwrite an existingreference.mdand has nooverwriteflag;written_atcomes from the server's own clock, so it can't be backdated. A genuine re-attempt opens a-r2folder.Missed vs. diverged.
save_hld_diffseparates a missing reference invariant (a real gap) from a different option taken at a choice point (not a gap if the trade-off reasoning held), and compares end-to-end flows rather than just which components got named — two designs can list identical boxes and route a request completely differently.Evidence stays separate from revision material. Nothing under
Mock Solutions/is surfaced bylist_practice_docs, and no tool points a trackerdoc_pathat it. An attempt groomed toward the right answer reads clean six weeks later and tells you nothing about which parts you actually got right.Also in this commit
hld:prefix.get_progress_summaryfiltered only thelld:prefix when picking out behavioral competencies, so HLD rubric scores would have rendered as behavioral ones. Both rubrics now report in their own blocks.save_practice_docandstart_hld_mock_attemptwarn (never block) when a design doc has no## End-to-end flowssection. A component diagram shows what exists; that section shows what happens, and its absence is what makes an HLD doc hard to revise from.skills/hld-interviewer/SKILL.md— the updated interviewer skill. The only copy on the dev machine lived in a per-session upload cache, so this is the durable one; it needs re-uploading to take effect.The LLD drill log
log_lld_drill/get_lld_drill_log— short focused reps that don't warrant a whole mock folder, appended to one runningDRILL_LOG.md. Gaps feed the same weak-area trackerlog_sessionwrites to.get_current_timeReports this machine's wall clock (local, UTC, epoch) — for timing a rep, or checking today's date rather than assuming it.
Testing
test_hld_tools.py(new) — 79 hermetic checks against a synthetic HLD root in a temp dir, with one named case per acceptance criterion: reference can't be overwritten,written_atis server-clocked, a one-sided diff errors, a free-form rubric key is rejected,Mock Solutions/never leaks intolist_practice_docs, a doc without flows warns but still writes, andget_hld_feedbackon an empty history returns cleanly.test_lld_tools.py— unchanged, still green.test_server.py— updated for the seven new tool names; 37 tools exposed.All three suites pass. Nothing outside the temp sandboxes is read or written.
🤖 Generated with Claude Code