Add the LLD drill log: log_lld_drill / get_lld_drill_log - #3
Open
codenamesubho wants to merge 1 commit into
Open
Add the LLD drill log: log_lld_drill / get_lld_drill_log#3codenamesubho wants to merge 1 commit into
codenamesubho wants to merge 1 commit into
Conversation
A drill is a short focused rep -- one pattern, one class hierarchy, one
"how would you extend this" -- not a full mock interview. Giving each one
a Mock Solutions/ folder, a problem.md and a rubric score would be noise,
so they all append to a single running LLD_SOLUTIONS_DIR/DRILL_LOG.md,
shaped like revision.md: newest at the bottom, entries split by a --- rule.
This is the persistence step for the LLD-drill skill, which owns the entry
body; the tool only stamps the dated header and appends.
Drills feed the same trackers everything else does:
- gaps go into index["weak_areas"] via a new _bump_weak_areas helper,
now shared with log_session rather than duplicated;
- problem_id counts the drill as an attempt via _record_practice, whose
doc_path is now Optional -- None means "produced no per-problem file",
so logging a drill can't unlink a doc save_practice_doc wrote.
Deliberately NOT written: an index["sessions"] record. That would show up
in get_progress_summary's session table and in get_session_detail as an id
with no revision.md entry behind it.
_lld_kind classifies DRILL_LOG.md as drill-log, so scans report it as
server-generated (like feedback.md) rather than as a corpus-wide index.
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.
Adds the persistence step for the new LLD-drill skill: two tools that maintain one running, append-only
LLD_SOLUTIONS_DIR/DRILL_LOG.md.A drill is a short focused rep — one pattern, one class hierarchy, one "how would you extend this" — not a full mock interview. Giving each one a
Mock Solutions/folder, aproblem.mdand a rubric score would be noise, so they all append to a single file shaped likerevision.md: newest at the bottom, entries split by a---rule.The contract the skill wires to
content_markdownis the entire entry body, authored by the skill; the tool only stamps the dated header (## <date> · <topic> · <n> min) and appends. Bodies start their headings at###and contain no bare---rule, since##and---are the entry separators.Feeding the existing trackers
gaps(semicolon-separated, same vocabulary aslog_session) go intoindex["weak_areas"]through a new_bump_weak_areashelper, now shared withlog_sessionrather than duplicated.problem_idcounts the drill as an attempt via_record_practice, whosedoc_pathis nowPath | None.Nonemeans "this practice produced no per-problem file", so logging a drill preserves any docsave_practice_doclinked — covered by a test that callsget_practice_docafter a drill.index["sessions"]record. That would appear inget_progress_summary's session table and inget_session_detailas an id with norevision.mdentry behind it.One consequence worth flagging: a drill also refreshes
last_practiced, so it pushes that problem'sSTALE_DAYSrevision clock out. Documented in the README; easy to change if drills shouldn't count for staleness.Also
_lld_kindreturnsdrill-logforDRILL_LOG.md, so scans report it as server-generated (likefeedback.md) instead of as a corpus-wide index. Import tools are unaffected — they still requirekind=solution.Testing
test_lld_tools.py— 19 new hermetic checks covering create-then-append, the header/duration stamp, gap aggregation,doc_pathpreservation,limitclipping, the empty-drill guard, anddrill-logclassification. 114 checks pass, zero failures.test_server.py— new names added toEXPECTED_TOOLS; handshake and tool listing pass, 29 tools exposed.🤖 Generated with Claude Code