Metadata-Version: 2.4
Name: jobbernaut-sensei
Version: 0.3.6
Summary: A spaced-repetition CLI for LeetCode practice problems
Author-email: Snehashish Reddy Manda <srmanda.cs@gmail.com>
Project-URL: Homepage, https://github.com/jobbernaut/jobbernaut-sensei
Project-URL: Repository, https://github.com/jobbernaut/jobbernaut-sensei
Project-URL: BugTracker, https://github.com/jobbernaut/jobbernaut-sensei/issues
Project-URL: Documentation, https://github.com/jobbernaut/jobbernaut-sensei/blob/main/README.md
Keywords: leetcode,spaced-repetition,algorithms,cli
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Education
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

<div align="center">
  <img src="https://raw.githubusercontent.com/jobbernaut/jobbernaut-sensei/main/logo.jpeg" alt="Jobbernaut Sensei Logo" width="180"/>
</div>

# Jobbernaut Sensei 🥋

> Your LeetCode practice, but you actually remember what you solved.

**Sensei** is a spaced-repetition CLI that stops you from grinding LeetCode into the void. Every command outputs clean JSON — it's built for humans but **designed for AI agents**.

```bash
pip install jobbernaut-sensei
sensei init
```

---

## 🔥 Why This Exists

You solve 200 LeetCode problems. Three months later you can't solve FizzBuzz.

Sensei tracks **when** you solved a problem and **how well** you understood it. Then it tells you exactly what to review — before your brain evicts it from cache.

```
┌──────────────────────────────────────────────────────────────┐
│  Your brain has a cache. This is the invalidation policy.   │
└──────────────────────────────────────────────────────────────┘
```

**Zero config. Zero cloud. Zero bullshit.** Your solutions are just `.py` files in a folder — git-friendly, portable, no lock-in.

---

## ⚡ What It Does

| Command | Vibe |
|---------|------|
| `sensei revisit` | "Here's what you're forgetting" — color-coded review queue |
| `sensei status` | JSON snapshot for you or your AI agent |
| `sensei hint <problem>` | Get the problem URL + deets **without the answer** (for quizzing) |
| `sensei show <problem>` | Full problem + your saved solution (for review) |
| `sensei mark <problem> --rating e` | "Easy" → next review in 90 days (or 135, if you've aced it before) |
| `sensei new <num> <slug> <cat>` | Scaffold a fresh problem in 0.3 seconds |
| `sensei open <problem>` | Jump into the code + LeetCode page |
| `sensei revisit --export` | Dump everything to CSV or Markdown |

---

## 📅 Daily Loop

```bash
# 1. What's rotting in my brain today?
sensei revisit

# 2. Quiz me on this one (agent, don't spoil it)
sensei hint 217

# 3. Let me code, then compare
sensei show 217

# 4. How'd I do?
sensei mark 217 --rating g    # good → 30 days
```

That's it. Four commands. Whole loop takes 2 seconds of typing.

---

## 🧠 Spaced Repetition — The Smart Part

Rate yourself after each solve. Sensei learns from your history:

| Rating | Flag | Next Review | If you keep acing it |
|--------|------|-------------|----------------------|
| Easy 🟢 | `--rating e` | 90 days | Grows 1.5× per session (90 → 135 → 180 max) |
| Good 🔵 | `--rating g` | 30 days | Stays 30 days |
| Hard 🟡 | `--rating h` | 7 days | 14 days if you've seen it before |
| Struggled 🔴 | `--rating s` | 3 days | Stays 3 days (agent: flag as leech) |

**First time rating "easy"?** → 90 days.  
**Fourth time rating "easy"?** → 135 days (you clearly know this).  
**Keep struggling?** → 3 days forever (time to study the pattern, not the problem).

---

## 🤖 AI-Agent Native

Every command returns clean JSON. Plug it into Cline, Claude Code, ChatGPT, or your own agent:

```bash
sensei status                     # → {"total":22,"overdue":0,...}
sensei revisit --json             # → Full review data with dates
sensei hint 217                   # → Problem URL + status, no solution
sensei show 217                   # → Metadata + saved solution
sensei mark 217 --rating e        # → Update schedule, no prompts
```

See **[`AGENTS.md`](AGENTS.md)** for the complete agent integration guide.

---

## 📦 Setup

```bash
pip install jobbernaut-sensei
sensei init                      # Creates problems/ directory
sensei new 217 contains-duplicate 1-arrays-and-hashing -d easy -t arrays hash-set
code problems/                   # Start solving
```

### Dependencies

- Python ≥ 3.10
- That's it. No npm. No Docker. No cloud.

---

## 📖 Commands

### `sensei revisit` — what to review

```bash
sensei revisit                    # Overdue + due today + upcoming 7 days
sensei revisit --all              # Everything
sensei revisit --topic trees      # Filter by topic
sensei revisit --json             # Agent-friendly JSON
sensei revisit --export           # → export.csv
sensei revisit --export-md        # → export.md
```

Colored terminal output:

```
📅  Jobbernaut Sensei Revisit — Tuesday, May 26 2026

🟢  UPCOMING (7 days)
──────────────────────────────────────────────────────────────────────────
  in 3d          [hard  ]   124. Binary Tree Maximum Path Sum      (trees)
  in 4d          [medium]   853. Car Fleet                         (stack, monotonic-stack)
```

### `sensei show <problem>` — inspect + solution

```bash
sensei show 217
sensei show contains-duplicate
```

Returns JSON: label, number, title, filepath, metadata (last_solved, revisit_in_days, difficulty, topic_tags, due_date), and **your saved solution code**.

### `sensei hint <problem>` — inspect, NO solution

```bash
sensei hint 217
sensei hint contains-duplicate
```

Same as `show` but **no `solution` field**. Perfect for agents that want to quiz without spoiling.

### `sensei mark <problem>` — rate your session

```bash
sensei mark 217                    # Interactive prompt
sensei mark 217 --rating e         # Non-interactive (agent-friendly)
```

### `sensei new <num> <slug> <cat>` — scaffold

```bash
sensei new 217 contains-duplicate 1-arrays-and-hashing -d easy -t arrays hash-set
```

### `sensei open <problem>` — jump in

```bash
sensei open 217                    # Editor + browser
sensei open 217 --no-browser       # Editor only
```

### `sensei status` — quick pulse

```bash
sensei status
```

Returns `{total, overdue, due_today, upcoming, problems[]}` — one-liner for agents.

---

## 🔧 Fuzzy Matching

Every command that takes a problem accepts:

```bash
sensei show 217                    # Problem number
sensei show contains-duplicate     # URL slug
sensei show "valid anagram"        # Title words
```

It matches the first unique result. No tab-complete needed (but we have it anyway — see [completions](src/completions)).

---

## 🐚 Zsh Completions

```zsh
fpath=(/path/to/jobbernaut-sensei/src/completions $fpath)
autoload -Uz compinit && compinit
```

---

## 📄 License

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

Full license in [`LICENSE`](LICENSE).
