Architecture
Adaptive planning
Control exposure density, support, unit size, and novelty without breaking flow.
INPUT SIGNALSFRICTIONSPEEDBACKTRACKS
PLANNING GRID
OUTPUTDENSITY · 0.55UNIT TIER · 3GAP · 18
Flow budget
The flow budget summarizes how much challenge the next view can carry. Density controls how much eligible content is exposed; minimum gap prevents adjacent replacements from turning a paragraph into a test.
Unit tier
Candidates form a macro ladder:
- word
- phrase
- sentence pattern
The planner promotes larger units only when proficiency and prior encounters support them.
Reader memory
ReadingMemoryRow stores per-concept mastery and friction. ReadingMetricsSample captures
signals such as pace and backtracking. These structures remain with the reader application;
the core package does not require a particular database or sync service.
const rules = planReplacements(expressions, sessionState, {
budget: { density: 0.55 }
});