diff options
| author | Craig Jennings <c@cjennings.net> | 2026-05-30 16:07:39 -0500 |
|---|---|---|
| committer | Craig Jennings <c@cjennings.net> | 2026-05-30 16:07:39 -0500 |
| commit | 86326c1f2677484b2906d8142891e8d023ba803e (patch) | |
| tree | 57264c662e223097a686ae0037b185156ad0e7f1 | |
| parent | b80a9ceb3fc9cdca9798b48fbc4f9ab9c1592b57 (diff) | |
| download | rulesets-86326c1f2677484b2906d8142891e8d023ba803e.tar.gz rulesets-86326c1f2677484b2906d8142891e8d023ba803e.zip | |
chore(ai): archive session record + lint follow-ups
| -rw-r--r-- | .ai/sessions/2026-05-30-16-06-drill-deck-anki-buildout-and-script-tests.org (renamed from .ai/session-context.org) | 48 | ||||
| -rw-r--r-- | inbox/lint-followups.org | 4 |
2 files changed, 52 insertions, 0 deletions
diff --git a/.ai/session-context.org b/.ai/sessions/2026-05-30-16-06-drill-deck-anki-buildout-and-script-tests.org index 7d32f3b..668948f 100644 --- a/.ai/session-context.org +++ b/.ai/sessions/2026-05-30-16-06-drill-deck-anki-buildout-and-script-tests.org @@ -4,11 +4,43 @@ * Summary ** Active Goal + +Began as startup + an inbox lint-followups pass, then became a sustained build-out of the org-drill → Anki (drill-deck) workflow, driven by a rapid series of cross-project handoffs from work and health. Also backfilled broad script test coverage and fixed a template-sync hygiene bug. Eight commits, all pushed. + ** Decisions + +- *drill-to-anki defaults* (health handoff): output → =~/sync/phone/anki/= (phone artifact), deck name → raw input basename, dropping the =#+TITLE= preference that leaked "org-drill" jargon into Anki. +- *Incorporated work's drill-deck bundle* (stats / diff-ids / sync scripts + drill-deck-review.org) rather than filing as a TODO, once a follow-up handoff showed work had green-lit it. Reconciled the workflow's stale output-path prose against the new drill-to-anki default. +- */add-tests option 3 (everything)*: backfilled tests for drill-to-anki internals, the two new drill-deck scripts' thin spots, cross-project-broadcast, and daily-prep-agenda (the last needed a =dp--cli-invocation-p= guard to be loadable under ERT). +- *Anki best-practice research* (Workflow tool, 6 agents) → applied all 7 proposed updates + a new Card Authoring Principles section. Not adopted (with reasons): cloze cards, per-card tractability targeting, FSRS-retention encoding, on-face source-stamping. +- *Card conventions* (Craig): Source citation at the end of a card after two blank lines; no created/added date on cards. +- *Leakage false-positive fixes* (health, 43-card deck): strip Source: + created lines before overlap; numeric carve-out (option 1) for range/category cards. +- *Sync-hygiene fix* (health): rsync excludes Python cache; exec bits were missing at the source (100644), not dropped by rsync. + ** Data Collected / Findings + +- Flashcard/SRS research synthesized from Wozniak (20 rules), Matuschak (prompts), Nielsen, the Anki manual, and the FSRS docs. Full result in the workflow output for run wf_d0c5e16f-ff1. +- Exec-bit root cause: four shebang =.py= scripts committed mode 100644, so =rsync -a= copied the wrong mode (not rsync dropping it). +- Cache propagation: root =.gitignore= stops commits, but =rsync -a= copies by disk presence, and pytest cache physically sat in canonical =claude-templates/.ai/scripts/tests/=. + ** Files Modified + +- =drill-to-anki.py= (+ mirror) — default output/deck-name change; strip Created: lines; tests. +- =drill-deck-stats.py= (+ mirror) — authoring-quality checks (leakage, dup fronts, overloaded/list/binary), then leakage FP fixes (Source-strip, numeric carve-out); tests. +- =drill-deck-diff-ids.py= / =drill-deck-sync= (+ mirror) — incorporated from work's bundle, with tests. +- =drill-deck-review.org= (+ mirror) — bundle update + Card Authoring section, conventions, scheduling note, Phase B dispositions. +- =startup.org= (+ mirror) — Phase A scripts rsync excludes Python cache. +- New tests: =test_drill_to_anki.py=, =test_drill_deck_stats.py=, =test_drill_deck_diff_ids.py=, =test_cross_project_broadcast.py=, =test-daily-prep-agenda.el=. +- Exec bits restored on =inbox-send.py=, =cj-scan.py=, =cj-remove-block.py=, =eml-view-and-extract-attachments.py=. +- =todo.org= — lint fixes (drawers + custom-id link). =.ai/notes.org= — =:LAST_INBOX_PROCESS:= stamp. + ** Next Steps +- *health* must, on its next template sync: remove its existing =.ai/scripts/tests/{__pycache__,.pytest_cache}= once (rsync =--delete= leaves excluded paths in place); it gets the leakage FP fixes + new conventions automatically. Both confirmed via inbox-send. +- *Signal MCP install at desktop* still pending (GPG pinentry blocks it remotely) — carried from prior sessions. +- Parked [#B] tasks unchanged: codex Phase 1 race-fix, startup-rsync-dirty propagation, cross-project pattern catalog. +- The drill-deck leakage thresholds (=LEAKAGE_RATIO=0.8=, =BACK_WORD_LIMIT=60=) are tunable constants if real decks surface more false positives. + * Session Log ** 2026-05-30 07:30 CDT — startup + inbox @@ -79,3 +111,19 @@ Workflow completed (6 agents, ~237s). Proposal: 8 already-strong, 7 updates (2 h Implemented + shipped. drill-deck-stats.py rewritten: new pure helpers (content_words, leakage_ratio, normalize_heading, is_binary_prompt, back_word_count, is_list_back, parse_cards, find_duplicate_fronts) + two-tier WARN/NOTE reporter; fuzzy thresholds in tunable constants (LEAKAGE_RATIO=0.8, BACK_WORD_LIMIT=60). +17 tests (27 total in the file). drill-deck-review.org got all 8 doc edits (Overview scheduling note, Card Authoring Principles section with sourced org links, person-card split path, Phase A signal mention, Phase B removal category + leech/one-directional disposition, Helper-Scripts stats description, two Common Mistakes, Living Document entry). Sanity-ran stats.py on a mixed sample — correctly flagged a leaky card (blocking) + list/binary NOTEs (non-blocking). sync-check clean, full suite 396/1skip + hooks + ERT + bats green. Committed 5bd7591 (feat(drill-deck): ...), pushed =82e99ff..5bd7591=. Still uncommitted for wrap-up: session-context.org (this file). notes.org marker already committed in 82e99ff. + +Committed session log 9c9af90. + +** 2026-05-30 ~14:00 CDT — third inbox pass (template-sync hygiene) + +health handoff: the startup =.ai/scripts/= rsync drags pytest cache (=__pycache__/=, =.pytest_cache/=) into every project, plus inbox-send.py loses its exec bit. Verified: root =.gitignore= stops committing the cache, but =rsync -a= copies by disk presence, and the cache physically sits in canonical =claude-templates/.ai/scripts/tests/=. Exec-bit root cause differed from the handoff's guess — four shebang =.py= scripts (inbox-send, cj-scan, cj-remove-block, eml-view-and-extract-attachments) were committed 100644, so rsync copied the wrong mode (not rsync dropping it). Craig chose: implement both. + +Fix: added =--exclude='__pycache__' --exclude='.pytest_cache' --exclude='*.pyc'= to startup.org Phase A step 5 (+ a Notes bullet), set +x on the four scripts (canonical + mirror), scrubbed canonical cache. Verified the exclude with a temp-dir rsync (no cache lands, inbox-send.py arrives executable). sync-check clean, full suite 396/1skip green. Committed 968a39b (fix(startup): ...), pushed =9c9af90..968a39b=. Sent health a confirmation via inbox-send (they must rm their existing cache once, since --delete leaves excluded paths in place). Inbox empty. + +** 2026-05-30 ~15:45 CDT — fourth inbox pass (leakage false positives) + +health ran the leakage check on a 43-card deck: 11 flags, 3 real, 8 false positives in two classes. FP1: Source: citation lines (the URL slug repeats question words) inflate overlap. FP2: range/category cards echo their categories but recall numbers. Craig directed: Source citation at end of card after two blank lines; no created date on cards (strip if present); implement FP2 option 1 (numeric carve-out). + +Fix: drill-deck-stats.py routes leakage through is_leaky() — prose_body() strips Source:/created lines, has_distinct_numeric_recall() exempts cards with numeric ranges/thresholds the question lacks. leakage_ratio unchanged (genuine restatement still flags). drill-to-anki.py strip_org_metadata now drops Created:/:CREATED: lines from the back. drill-deck-review.org: Body conventions (Source at end / no created date), Card Authoring + Helper Scripts + Anki-Behavior + Phase C updates, Living Document entry. +9 tests (stats 34, drill-to-anki 27). sync-check clean, full suite 405/1skip green. Committed b80a9ce (fix(drill-deck): ...), pushed =968a39b..b80a9ce=. Confirmed to health via inbox-send. Inbox empty. + +Uncommitted for wrap-up: session-context.org (this file). diff --git a/inbox/lint-followups.org b/inbox/lint-followups.org new file mode 100644 index 0000000..88c33d7 --- /dev/null +++ b/inbox/lint-followups.org @@ -0,0 +1,4 @@ + +* 2026-05-30 lint-org follow-ups — todo.org +** TODO line 2370 — misplaced-heading — Possibly misplaced heading line +** TODO line 1717 — misplaced-heading — Possibly misplaced heading line |
