Integrator checklist
This sheet is a companion to the MATx Companion page
and the longer PR plan in
packages/bkt-core/integration-patches/pr1-bookkeeping.md.
Here — a compact “what to click” list, no rationale.
Before you start
Section titled “Before you start”- ☐ Node ≥ 20 (NodeNext ESM resolver).
- ☐ Write access to project DB (migrations / Drizzle push).
- ☐ Read Pipeline overview so all parameters share a vocabulary. (Russian + Estonian only — falls back to RU under EN URL.)
1. Wire in the package
Section titled “1. Wire in the package”Pick one:
# A) git submodulegit submodule add https://github.com/sapsan14/matx-hack.git vendor/matx-hackcd vendor/matx-hack/packages/bkt-core && npm install && npm run build# in package.json:# "@matx-hack/bkt-core": "file:./vendor/matx-hack/packages/bkt-core"
# B) tarballcd packages/bkt-core && npm install && npm run build && npm pack# in consumer:npm install /path/to/matx-hack-bkt-core-0.1.1.tgz- ☐
import { recommend, applyAttempt, DEFAULT_BKT } from "@matx-hack/bkt-core"compiles.
2. Run the DB migration
Section titled “2. Run the DB migration”Create the state table (see SQL in pr1-bookkeeping.md, step 1).
- ☐ Table
student_skill_stateexists. - ☐ Drizzle schema updated (
shared/schema.ts).
3. Hook the update into the answer-submission endpoint
Section titled “3. Hook the update into the answer-submission endpoint”In your result-saving handler (createResult or equivalent):
- ☐ After
db.insert(results), loadpKnownfromstudent_skill_state. - ☐ Call
bktUpdate(prior, isCorrect, DEFAULT_BKT)to compute the posterior. - ☐ Upsert into
student_skill_statewith the new value andattempts + 1.
4. (Optional) ZPD selector
Section titled “4. (Optional) ZPD selector”Only if you swap task selection — not part of PR-1.
- ☐ Next-task endpoint uses
recommend(state, pool, 1). - ☐ Returns task with
pSolveclosest to 0.7.
5. Eyeball verification
Section titled “5. Eyeball verification”After a few attempts from a single user:
SELECT user_id, competency_id, p_known, attemptsFROM student_skill_stateORDER BY last_updated DESC LIMIT 10;- ☐ Fresh user starts at
p_known = 0.2. - ☐ One correct answer:
0.2 → ~0.40. - ☐ Two corrects in a row:
~0.40 → ~0.70. - ☐ One wrong after that:
~0.70 → ~0.45.
Rollback
Section titled “Rollback”PR-1 is purely additive: drop student_skill_state, remove the BKT
update block in createResult. UI and the existing
getNextRecommendedQuestion are untouched.
Quick links
Section titled “Quick links”- MATx Companion page — overall motivation and PR-1/PR-2 plan.
- Full PR-1 plan on GitHub.
- Package README — quickstart and edge cases.
- EU AI Act — why deterministic BKT is compliance-friendly.