An open-source template repo that generates 10 adaptive coding exercises daily and reviews your solution the next morning, driven by two OS-scheduled local Claude Code headless jobs.
- Every evening (default 21:00) a scheduled job invokes
claude -pwithprompts/generate.md, which writesweeks/week-NN/day-NN/README.mdcontaining 10 exercises tailored to your current difficulty and weak spots. - Every morning (default 07:00) a second job invokes
claude -pwithprompts/review.md, which reads your solution branch, writesweeks/week-NN/day-NN/FEEDBACK.md, and updatesstate/progress.json(difficulty, weak spots, history). - The adaptive core (
lib/adapt.mjs) adjusts difficulty and exercise mix based on your review scores and accumulated weak spots.
- Node ≥18 (ESM, built-in
node --test) - git installed and on PATH
- Claude Code CLI installed and authenticated (
claudemust be on PATH; runclaudeonce to complete auth) - Your machine must be on and awake at the scheduled times
git clone <this-repo> coding-drills
cd coding-drills
node install.mjsThe installer:
- Verifies Node, git, and the Claude CLI are present.
- Asks for your preferred schedule times, difficulty level, exercises per day, and git remote.
- Writes
config/settings.jsonandstate/progress.json. - Registers two OS scheduled jobs (Windows Task Scheduler, macOS launchd, or Linux cron).
21:00 run-generate.mjs → git pull → claude -p prompts/generate.md → git add/commit/push
writes: weeks/week-NN/day-NN/README.md
state/progress.json (currentWeek, currentDay updated)
-- you solve exercises on branch solve/week-NN/day-NN --
07:00 run-review.mjs → git pull → claude -p prompts/review.md → git add/commit/push
writes: weeks/week-NN/day-NN/FEEDBACK.md
state/progress.json (difficulty, weakSpots, history updated)
Create your solution branch before solving:
git checkout -b solve/week-01/day-01Branch name format: solve/week-NN/day-NN (zero-padded, 2 digits).
The review prompt reads this branch; if it is absent, the session is recorded as skipped.
# Generate today's exercises
node scripts/run-generate.mjs
# Review yesterday's solutions
node scripts/run-review.mjsLogs are written to state/logs/generate.log and state/logs/review.log.
state/progress.json tracks:
| Field | Purpose |
|---|---|
difficulty |
Float 0-1; raised when score > 70%, lowered when score < 70% |
weakSpots |
Topics missed in review; top items get ~35% of exercise slots biased toward them |
languageFriction |
Languages the reviewer flags as struggling; avoided in free-mode generation |
history |
Per-day score record |
currentWeek, currentDay |
Pointer to the latest generated day |
Edit config/settings.json to change schedule, pillars, languages, or exercises per day.
| Weekday | Logic | Algorithms | Data Structures | Architecture |
|---|---|---|---|---|
| Mon-Thu, Sat-Sun | 4 | 3 | 3 | 0 |
| Friday | 3 | 3 | 3 | 1 |
Disabled pillars are redistributed proportionally among the remaining enabled ones.
Windows (Task Scheduler):
schtasks /Delete /F /TN CodingDrillsGenerate
schtasks /Delete /F /TN CodingDrillsReviewmacOS (launchd):
launchctl unload ~/Library/LaunchAgents/com.codingdrills.generate.plist
launchctl unload ~/Library/LaunchAgents/com.codingdrills.review.plist
rm ~/Library/LaunchAgents/com.codingdrills.*.plistLinux (cron):
crontab -e
# Remove the two lines marked "# coding-drills"coding-drills/
config/
settings.example.json # copy to settings.json and edit
lib/
adapt.mjs # adaptive core: planDay, seedProgress, updateProgress
store.mjs # readJson, writeJson, defaultSettings, dayDir, branchName
schedule.mjs # pure builders: windowsTasks, cronLines, launchdPlist
runner.mjs # runJob: pull → claude → add → commit → push
preflight.mjs # checkPreflight: node/git/claude version checks
install-os.mjs # registerSchedule: dispatches to Windows/macOS/Linux
prompts/
generate.md # instructions for the generation job
review.md # instructions for the review job
scripts/
run-generate.mjs # entrypoint for the generation scheduled job
run-review.mjs # entrypoint for the review scheduled job
schedule-windows.ps1 # PowerShell helper (called by install-os.mjs)
schedule-macos.sh # bash helper for launchd
schedule-linux.sh # bash helper for crontab
state/
progress.json # created by installer (gitignored logs/)
weeks/ # generated exercises and feedback land here
install.mjs # interactive setup wizard
npm test
# or
node --testTests use Node's built-in test runner (node:test), zero dependencies.
MIT. Contributions welcome — open an issue or pull request.