docs: correct the difficulty_ladder integration contract, drop dead check - #10
Conversation
…heck (issue #63 on feedback-plugin-difficulty-ladder)
CLAUDE.md claimed this plugin independently reads highway.getPhrases()/
hasPhraseData()/getMastery() for section-difficulty data ("no bespoke
API"). That stopped being true when the glass-fill rendering was
rewritten to consume difficulty_ladder's difficulty:sections-updated
event exclusively -- _smUpdateDifficultyFills just renders whatever
fillPercentage/glassSize the event carries. Corrected the doc to
describe the real, current contract (event-based, with the
difficulty_ladder < section_map load-order note and a pointer to
difficulty_ladder's INTEGRATION.md for the full contract/formula).
Also removed a dead second check in _smIsDynamicDifficultyAvailable()
for window.feedBackViz_dynamic_difficulty -- a viz-factory-naming-
convention global this plugin's ladder counterpart never actually set,
left over from before its dynamic_difficulty -> difficulty_ladder
rename. The window._ddCapabilities check right next to it is the one
that has always actually worked.
No behavior change -- both fixes are dead-code/doc corrections.
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- CLAUDE.md — rewrites the section-difficulty integration bullet to describe the current event-based contract (
difficulty_ladder'sdifficulty:sections-updatedevent feeding_smSectionDifficulty), with the alphabetical load-order note and the pointer todifficulty_ladder'sINTEGRATION.md. - screen.js — removes the dead
window.feedBackViz_dynamic_difficultyprobe in_smIsDynamicDifficultyAvailable()(a viz-factory-naming-convention global difficulty_ladder never set), keeping the effectivewindow._ddCapabilitiesmarker check, and expands the function comment explaining the marker-name legacy. - plugin.json — version 1.2.4 → 1.2.5 (CI mechanically requires a bump on any
.jsdiff).
The revised doc matches the code: difficulty data flows in solely via the difficulty:sections-updated event (screen.js:103-106) into _smSectionDifficulty, and _smGetSectionDifficulty/_smRenderGlassFilling/_smUpdateDifficultyFills render only the fillPercentage/glassSize the payload carries — no independent highway.getPhrases()/getMastery() reads remain. The removed check has no surviving references anywhere (node tests/screen.test.js → 21/21 pass). Clean, low-risk dead-code/doc cleanup.
Big Pickle (free) | 𝕏

What
Companion fix to
get-flashbacks/feedback-plugin-difficulty-ladder#79(issue #63 there — "Reconcile Section Map integration contract and fill formula").This repo's own
CLAUDE.mdclaimed: "No bespoke API withfeedback-plugin-dynamic-difficulty. Both plugins independently read the same Host surface (highway.getPhrases()/hasPhraseData()/getMastery())." That stopped being true when the glass-fill rendering here was rewritten to consumedifficulty_ladder'sdifficulty:sections-updatedevent exclusively —_smUpdateDifficultyFills/_smGetSectionDifficultyjust render whateverfillPercentage/glassSizethe event's payload carries per section. There's no code path left in this file that readshighway.getPhrases()/getMastery()for difficulty data at all. The doc kept describing the old architecture as current fact, which is exactly backwards for a doc whose job is telling future agents what not to build (it says "don't reach into dynamic_difficulty's globals" right next to code that, functionally, already depends on it via the event).Fix
CLAUDE.md— corrected to describe the real, current contract (event-based), with thedifficulty_ladder<section_mapload-order note (alphabetical script loading means the capability marker is set before this plugin's one-time availability check runs) and a pointer todifficulty_ladder'sINTEGRATION.mdfor the full contract/formula.screen.js— removed a dead second check in_smIsDynamicDifficultyAvailable()forwindow.feedBackViz_dynamic_difficulty, a viz-factory-naming-convention globaldifficulty_laddernever actually set (this plugin isn'ttype: "visualization"), left over from before that plugin'sdynamic_difficulty→difficulty_ladderrename. Thewindow._ddCapabilitiescheck right next to it is the one that has always actually worked.No behavior change — both fixes are dead-code/doc corrections. Version bumped only because this repo's CI mechanically requires it on any
.jsdiff.Related: #63 (tracked in
feedback-plugin-difficulty-ladder)Checklist
node tests/screen.test.js— 21/21 passingplugin.jsonversion (1.2.4 → 1.2.5)Generated by Claude Code