Skip to content

docs: correct the difficulty_ladder integration contract, drop dead check - #10

Merged
carochacs merged 1 commit into
mainfrom
claude/next-issues-f1t8df
Sep 1, 2026
Merged

docs: correct the difficulty_ladder integration contract, drop dead check#10
carochacs merged 1 commit into
mainfrom
claude/next-issues-f1t8df

Conversation

@carochacs

Copy link
Copy Markdown

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.md claimed: "No bespoke API with feedback-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 consume difficulty_ladder's difficulty:sections-updated event exclusively — _smUpdateDifficultyFills/_smGetSectionDifficulty just render whatever fillPercentage/glassSize the event's payload carries per section. There's no code path left in this file that reads highway.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 the difficulty_ladder < section_map load-order note (alphabetical script loading means the capability marker is set before this plugin's one-time availability check runs) and a pointer to difficulty_ladder's INTEGRATION.md for the full contract/formula.
  • screen.js — removed a dead second check in _smIsDynamicDifficultyAvailable() for window.feedBackViz_dynamic_difficulty, a viz-factory-naming-convention global difficulty_ladder never actually set (this plugin isn't type: "visualization"), left over from before that plugin's dynamic_difficultydifficulty_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. Version bumped only because this repo's CI mechanically requires it on any .js diff.

Related: #63 (tracked in feedback-plugin-difficulty-ladder)

Checklist

  • node tests/screen.test.js — 21/21 passing
  • Bumped plugin.json version (1.2.4 → 1.2.5)

Generated by Claude Code

…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.
@coderabbitai

coderabbitai Bot commented Sep 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: d7feb18b-265a-4753-89c7-eda4ed70fd28

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@pullfrog pullfrog Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ No new issues found.

Reviewed changes

  • CLAUDE.md — rewrites the section-difficulty integration bullet to describe the current event-based contract (difficulty_ladder's difficulty:sections-updated event feeding _smSectionDifficulty), with the alphabetical load-order note and the pointer to difficulty_ladder's INTEGRATION.md.
  • screen.js — removes the dead window.feedBackViz_dynamic_difficulty probe in _smIsDynamicDifficultyAvailable() (a viz-factory-naming-convention global difficulty_ladder never set), keeping the effective window._ddCapabilities marker 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 .js diff).

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.

Pullfrog  | View workflow run | Using Big Pickle (free) | 𝕏

@carochacs
carochacs merged commit 9e61865 into main Sep 1, 2026
9 checks passed
@carochacs
carochacs deleted the claude/next-issues-f1t8df branch September 1, 2026 03:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants