bavitutor 0.0.0-stage → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +167 -2
- package/assets/icon.svg +4 -0
- package/dist/bavitutor.mjs +62021 -0
- package/dist/web/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/dist/web/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/dist/web/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/dist/web/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/dist/web/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/dist/web/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/dist/web/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/dist/web/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/dist/web/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/dist/web/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/dist/web/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/dist/web/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/dist/web/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/dist/web/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/dist/web/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/dist/web/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/dist/web/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/dist/web/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/dist/web/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/dist/web/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/dist/web/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/dist/web/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/dist/web/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/dist/web/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/dist/web/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/dist/web/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/dist/web/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/dist/web/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/dist/web/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/dist/web/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/dist/web/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/dist/web/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/dist/web/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/dist/web/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/dist/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/web/assets/index-CjAGd-AA.js +2039 -0
- package/dist/web/assets/index-CnoQcz2a.css +2 -0
- package/dist/web/icon.svg +4 -0
- package/dist/web/index.html +23 -0
- package/package.json +49 -4
package/README.md
CHANGED
|
@@ -1,3 +1,168 @@
|
|
|
1
|
-
|
|
1
|
+
<img src="assets/icon.svg" width="64" height="64" alt="">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# BaviTutor
|
|
4
|
+
|
|
5
|
+
Describe what you want to learn. Research agents read curricula, roadmaps and
|
|
6
|
+
textbooks, grade them, and merge them into a **knowledge graph** of small
|
|
7
|
+
concepts with prerequisite links, from ground zero up to your goal. A short
|
|
8
|
+
adaptive quiz finds what you already know, BaviTutor computes the shortest
|
|
9
|
+
path to your goal, teaches each concept with retrieval practice, and keeps it
|
|
10
|
+
in your memory with spaced review.
|
|
11
|
+
|
|
12
|
+
## Run it
|
|
13
|
+
|
|
14
|
+
```sh
|
|
15
|
+
npx bavitutor
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
That's all: it downloads BaviTutor, serves it on <http://localhost:4100> and
|
|
19
|
+
opens your browser. Data stays on your machine in `~/.bavitutor`.
|
|
20
|
+
|
|
21
|
+
Requirements: Node 24+, [Vite+](https://viteplus.dev) (`vp`), and a logged-in
|
|
22
|
+
[Claude Code](https://claude.com/claude-code) install (the Claude Agent SDK
|
|
23
|
+
reuses its credentials; set `ANTHROPIC_API_KEY` instead if you prefer).
|
|
24
|
+
Generated visuals are rendered and checked in Google Chrome.
|
|
25
|
+
|
|
26
|
+
### Develop
|
|
27
|
+
|
|
28
|
+
```sh
|
|
29
|
+
vp install
|
|
30
|
+
vp run dev
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Open <http://localhost:5180>. The API runs on port 4100 and the web dev server
|
|
34
|
+
proxies `/api` to it. Data lives in `apps/server/data/bavitutor.db` (SQLite).
|
|
35
|
+
|
|
36
|
+
### Use it
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
vp run start # build if needed, serve, open the browser
|
|
40
|
+
vp run start --port 4200 --no-open # flags go to the bavitutor CLI
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
One server on <http://localhost:4100> serves the web app and the API. Data
|
|
44
|
+
lives in `~/.bavitutor`. `vp run build` builds the web app and bundles the CLI,
|
|
45
|
+
API server and workspace packages into `dist/bavitutor.mjs`, with the web app
|
|
46
|
+
in `dist/web`. Unchanged parts come from the Vite+ task cache.
|
|
47
|
+
|
|
48
|
+
The repository is also an npm package with a `bavitutor` bin, so you can
|
|
49
|
+
start it from anywhere with `npx` or `vpx`:
|
|
50
|
+
|
|
51
|
+
```sh
|
|
52
|
+
npx /path/to/bavitutor # a checkout; run `vp run build` there first
|
|
53
|
+
npx github:Bavlio/BaviTutor # npm clones and builds it (a minute the first time)
|
|
54
|
+
npx file:/path/to/bavitutor-0.1.0.tgz # a tarball from `npm pack --force` (builds first)
|
|
55
|
+
vpx /path/to/bavitutor --no-open # vpx takes the same specs and flags
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
- Give a tarball as `file:<path>` or `./<relative path>`: npx runs an existing
|
|
59
|
+
absolute file path as a command instead of installing it.
|
|
60
|
+
- `npm pack` needs `--force` because the repository asks for pnpm
|
|
61
|
+
(`devEngines`).
|
|
62
|
+
- Git URLs need npm. When `vpx` uses pnpm (outside an npm project), pnpm
|
|
63
|
+
refuses to build a git-hosted package (`ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED`);
|
|
64
|
+
use `npx` for those.
|
|
65
|
+
|
|
66
|
+
| Flag | Default | Meaning |
|
|
67
|
+
| ------------------ | ------------------ | ------------------------------------------ |
|
|
68
|
+
| `--port <port>` | `$PORT`, then 4100 | port to listen on |
|
|
69
|
+
| `--host <host>` | `127.0.0.1` | interface to listen on (this machine only) |
|
|
70
|
+
| `--data-dir <dir>` | `~/.bavitutor` | database, plus settings in `<dir>/.env` |
|
|
71
|
+
| `--no-open` | | don't open the browser |
|
|
72
|
+
|
|
73
|
+
On start the CLI checks for a Claude login or `ANTHROPIC_API_KEY`, looks for
|
|
74
|
+
Chrome (`BAVI_CHROME`, then the standard Windows, macOS and Linux locations)
|
|
75
|
+
and warns if either is missing, and stops with a clear message if the port is
|
|
76
|
+
taken.
|
|
77
|
+
|
|
78
|
+
### Configuration (environment, `apps/server/.env` in dev, `<data-dir>/.env` for the CLI)
|
|
79
|
+
|
|
80
|
+
| Variable | Default | Meaning |
|
|
81
|
+
| ---------------------- | ------------------- | ---------------------------------------------------------- |
|
|
82
|
+
| `PORT` | `4100` | port (the API's in dev) |
|
|
83
|
+
| `BAVI_DB` | `data/bavitutor.db` | SQLite file in dev (relative to `apps/server`) |
|
|
84
|
+
| `BAVI_MODEL_FAST` | `haiku` | grading free text, placement prior, novice |
|
|
85
|
+
| `BAVI_MODEL_SMART` | `sonnet` | planning, web research, lessons, items, tutor |
|
|
86
|
+
| `BAVI_MODEL_DEEP` | `opus` | merging sources into the knowledge graph |
|
|
87
|
+
| `BAVI_RESEARCH_AGENTS` | `4` | parallel source researchers per learning goal |
|
|
88
|
+
| `BAVI_VISUALS` | `true` | generate visuals for lesson visual briefs |
|
|
89
|
+
| `BAVI_CHROME` | Windows Chrome path | browser that renders visuals (the CLI finds it if not set) |
|
|
90
|
+
|
|
91
|
+
The three `BAVI_MODEL_*` variables are only starting points: **Settings → AI models** picks the model, reasoning level and fast mode for each tier, from the models your Claude login offers (listed live through the Agent SDK). Reasoning on _Auto_ keeps BaviTutor's per-step tuning, such as low effort for research planning. Each agent call logs the model and reasoning it ran with.
|
|
92
|
+
|
|
93
|
+
## What happens when you ask to learn something
|
|
94
|
+
|
|
95
|
+
1. **Research.** A planner breaks the goal into research angles; parallel
|
|
96
|
+
Claude agents search and read sources (curricula, standards, roadmaps,
|
|
97
|
+
textbook tables of contents, courses), extract their topic order and grade
|
|
98
|
+
each source on a rubric weighted by how fast the field moves. Deterministic
|
|
99
|
+
readers pull machine-readable sources directly: roadmap.sh roadmaps for
|
|
100
|
+
software and tech goals (personal use only, as its licence allows), the
|
|
101
|
+
Common Core coherence map, OpenStax, Exercism, OSSU and MIT OCW. A deep model
|
|
102
|
+
merges everything into a prerequisite DAG, which is validated (cycles
|
|
103
|
+
broken, redundant edges removed). Progress streams live to the UI.
|
|
104
|
+
2. **Map.** A layered graph from foundations to goal. Click any concept for its
|
|
105
|
+
objectives, prerequisites, what it unlocks and which sources teach it. Mark
|
|
106
|
+
things you know, or **make any concept your goal**: the path recomputes.
|
|
107
|
+
3. **Placement.** An adaptive quiz (Knowledge Space Theory, particle filter,
|
|
108
|
+
expected-information-gain selection) — usually 6–10 questions — decides
|
|
109
|
+
what to skip. Unsure results become 1-minute quick checks.
|
|
110
|
+
4. **Lessons.** Motivating problem → no-penalty prequestions → short chunks
|
|
111
|
+
with a retrieval check after each → worked examples → where it sits in the
|
|
112
|
+
map → teach-it-back (graded, with a curious-novice follow-up) → delayed
|
|
113
|
+
recall with re-asks. An in-lesson tutor explains on request and only hints
|
|
114
|
+
on questions you have not answered yet. Each concept has a **notes** page to
|
|
115
|
+
re-read before an exam, built from its lesson: key ideas, each chunk's
|
|
116
|
+
principle, worked examples, common traps, where it sits on the map, your
|
|
117
|
+
status, and links to go deeper picked from the research sources.
|
|
118
|
+
"Explain it differently" re-teaches a chunk from another angle, and a
|
|
119
|
+
failed lesson is rewritten from a different angle aimed at what was missed.
|
|
120
|
+
5. **Review.** FSRS-6 schedules every concept at the retention you choose.
|
|
121
|
+
Reviews interleave subjects, pick the question level from memory strength
|
|
122
|
+
(one lower after a lapse, discrimination items against confusable
|
|
123
|
+
concepts), compress overlapping concepts into fewer items, and give
|
|
124
|
+
implicit credit to prerequisites. A hint ladder caps how much a helped
|
|
125
|
+
answer counts. Concepts that keep slipping get flagged with remediation;
|
|
126
|
+
a backlog switches to triaged catch-up spread over a week; after a long
|
|
127
|
+
absence a 5-minute check-in replaces the pile. "Just 5" keeps it short.
|
|
128
|
+
6. **Your day.** Home plans reviews first, then as many new lessons as fit
|
|
129
|
+
your daily time and a two-week review-load forecast. Settings cover daily
|
|
130
|
+
time, retention, new-concept cap, visuals, a daily reminder, and the
|
|
131
|
+
Claude model, reasoning level and fast mode for each kind of work. A goal
|
|
132
|
+
can have an exam date that tightens scheduling. Progress shows durable
|
|
133
|
+
knowledge, predicted and measured retention, calibration, activity and a
|
|
134
|
+
review forecast. Lessons resume after a reload, and a break is suggested
|
|
135
|
+
after about 25 minutes.
|
|
136
|
+
|
|
137
|
+
The design rests on the research in [`docs/research`](docs/research):
|
|
138
|
+
learning science (≈235 references, with engine rules), adaptive placement,
|
|
139
|
+
source curation and graph building, 3Blue1Brown-style visualization, and an
|
|
140
|
+
analysis of Eero Alvar's AI learning workflow.
|
|
141
|
+
|
|
142
|
+
## Layout
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
apps/
|
|
146
|
+
server/ Effect 4 HTTP API, SQLite, Claude Agent SDK agents
|
|
147
|
+
app.ts services, handlers and the HTTP server (makeServer)
|
|
148
|
+
main.ts dev entry; cli.ts is the `bavitutor` bin
|
|
149
|
+
research/ source research pipeline
|
|
150
|
+
tutor/ question bank, lessons, grader, placement, reviews
|
|
151
|
+
web/ Foldkit (Elm architecture on Effect) + Tailwind v4 + shadcn tokens
|
|
152
|
+
packages/
|
|
153
|
+
domain/ Effect Schemas and the HttpApi contract shared by server and web
|
|
154
|
+
engine/ pure algorithms: graph, path, layout, placement, memory (FSRS)
|
|
155
|
+
viz/ the `bv` runtime for generated 3Blue1Brown-style visuals (/dev/visuals)
|
|
156
|
+
docs/research/ the research this product is built on
|
|
157
|
+
prototypes/ research prototypes (placement simulator)
|
|
158
|
+
scripts/ prepare: git hooks; builds dist/ when npm installs from git
|
|
159
|
+
dist/ built `bavitutor` bin and web app (vp run build)
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
## Checks
|
|
163
|
+
|
|
164
|
+
```sh
|
|
165
|
+
vp check # format, lint, type-aware lint (TypeScript 7)
|
|
166
|
+
vp run -r test # unit and story tests
|
|
167
|
+
vp run e2e # end-to-end smoke tests in Chrome (seeded data, no Claude calls, ~25 s)
|
|
168
|
+
```
|
package/assets/icon.svg
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
2
|
+
<rect width="64" height="64" rx="14" fill="#ea580c"/>
|
|
3
|
+
<text x="32" y="32" dy="0.35em" text-anchor="middle" font-family="ui-sans-serif, system-ui, -apple-system, sans-serif" font-size="32" font-weight="600" fill="#ffffff">B</text>
|
|
4
|
+
</svg>
|