Skip to content

Commit 1105fef

Browse files
committed
release: v0.5.0 — load smoothing, progression gate, and rebalance
## What's New ### sensei mark — Load Smoothing - Automatically spreads reviews across nearby days to prevent spikes - Spread windows: s=fixed, h=2-4d, g=5-14d, e=15-45d, t=45-90d - Low-review-count problems prefer earliest slot; high-count prefer latest - --no-spread flag for exact base intervals ### sensei mark — Progression Gate - New problems gated through 1→3→7→30→full SRS ladder - Prevents first-solve from jumping to 30 days - Capping note shown in output when gate fires ### times_reviewed Field - All problem files now track times_reviewed (incremented on each mark) - Legacy files default to 0 — no migration required - New sensei new scaffolds revisit_in_days=1, times_reviewed=0 ### sensei rebalance (new command) - Dry-run and --apply modes for reactive cluster busting - Displaces most-reviewed problems first within ±50% interval window - --cap N sets the overloaded-day threshold (default: 3) ### Docs - README: new sections for progression gate, load smoothing, rebalance - AGENTS.md: CLI reference updated with all new commands and flags; rating integrity rule and socratic-question hint distinction added
1 parent 6eab5a7 commit 1105fef

2 files changed

Lines changed: 50 additions & 5 deletions

File tree

README.md

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ Sensei tracks **when** you solved a problem and **how well** you understood it.
3939
| `sensei status` | JSON snapshot for you or your AI agent |
4040
| `sensei hint <problem>` | Get the problem URL + deets **without the answer** (for quizzing) |
4141
| `sensei show <problem>` | Full problem + your saved solution (for review) |
42-
| `sensei mark <problem> --rating g` | "Good" → next review in 7 days |
42+
| `sensei mark <problem> --rating g` | "Good" → next review in 7 days (with load smoothing) |
4343
| `sensei new <num> <slug> <cat>` | Scaffold a fresh problem in 0.3 seconds |
4444
| `sensei open <problem>` | Jump into the code + LeetCode page |
45+
| `sensei rebalance` | Spread review clusters across empty days |
4546
| `sensei revisit --export` | Dump everything to CSV or Markdown |
4647

4748
---
@@ -80,6 +81,36 @@ Rate yourself after each solve. Intervals are hardcoded — no adaptive math, no
8081

8182
**The schedule is the curriculum.** Every rating directly sets the next review — no surprises.
8283

84+
### 📈 New-Problem Progression Gate
85+
86+
New problems are gated through a 1 → 3 → 7 → 30 day ladder before entering full SRS. No matter how well you solve a brand-new problem, it can't skip ahead:
87+
88+
| Review # | Max interval |
89+
|----------|-------------|
90+
| 1st solve | 1 day |
91+
| 2nd solve | 3 days |
92+
| 3rd solve | 7 days |
93+
| 4th solve | 30 days |
94+
| 5th+ | Full SRS (no cap) |
95+
96+
Rating `e` on your first solve → capped at 1 day. Rating `s` on your 4th solve → 1 day (under cap). The gate only fires when the rating would exceed the cap.
97+
98+
### ⚖️ Load Smoothing
99+
100+
`sensei mark` automatically spreads reviews across nearby days to avoid spikes. Instead of 6 problems all landing on the same day, the scheduler finds the least-loaded day within a window:
101+
102+
| Rating | Base | Spread range |
103+
|--------|------|-------------|
104+
| `s` | 1d | fixed |
105+
| `h` | 3d | 2–4 days |
106+
| `g` | 7d | 5–14 days |
107+
| `e` | 30d | 15–45 days |
108+
| `t` | 90d | 45–90 days |
109+
110+
Problems reviewed 5+ times are biased toward the **later** end of their window (stable memory, safe to defer). Newer problems stay at the **earlier** end (fragile memory, keep close).
111+
112+
Disable with `--no-spread` to get exact base intervals.
113+
83114
---
84115

85116
## 🤖 AI-Agent Native
@@ -159,10 +190,23 @@ Same as `show` but **no `solution` field**. Perfect for agents that want to quiz
159190
### `sensei mark <problem>` — rate your session
160191

161192
```bash
162-
sensei mark 217 # Interactive prompt
163-
sensei mark 217 --rating e # Non-interactive (agent-friendly)
193+
sensei mark 217 # Interactive prompt
194+
sensei mark 217 --rating e # Non-interactive (agent-friendly)
195+
sensei mark 217 --rating g --no-spread # Exact base interval, no smoothing
196+
```
197+
198+
Automatically increments `times_reviewed` and applies the progression gate and load smoothing.
199+
200+
### `sensei rebalance` — flatten review spikes
201+
202+
```bash
203+
sensei rebalance # Dry run — preview moves, no writes
204+
sensei rebalance --apply # Write changes to disk
205+
sensei rebalance --cap 2 # Flag days with more than 2 reviews
164206
```
165207

208+
Finds days exceeding the review cap and displaces the most-reviewed problems (most stable memory) to nearby low-load dates within ±50% of their current interval. Always preview before applying.
209+
166210
### `sensei new <num> <slug> <cat>` — scaffold
167211

168212
```bash
@@ -213,4 +257,4 @@ autoload -Uz compinit && compinit
213257

214258
PolyForm Noncommercial License 1.0.0 — free for personal and non-commercial use.
215259

216-
Full license in [`LICENSE`](LICENSE).
260+
Full license in [`LICENSE`](LICENSE).

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "jobbernaut-sensei"
7-
version = "0.4.10"
7+
version = "0.5.0"
88
description = "A spaced-repetition CLI for LeetCode practice problems"
99
readme = "README.md"
1010
requires-python = ">=3.10"
@@ -78,3 +78,4 @@ exclude_lines = [
7878
"if __name__ == .__main__.:",
7979
"if TYPE_CHECKING:",
8080
]
81+

0 commit comments

Comments
 (0)