Skip to content

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.

  • ☐ 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.)

Pick one:

Окно терминала
# A) git submodule
git submodule add https://github.com/sapsan14/matx-hack.git vendor/matx-hack
cd 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) tarball
cd 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.

Create the state table (see SQL in pr1-bookkeeping.md, step 1).

  • ☐ Table student_skill_state exists.
  • ☐ 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), load pKnown from student_skill_state.
  • ☐ Call bktUpdate(prior, isCorrect, DEFAULT_BKT) to compute the posterior.
  • ☐ Upsert into student_skill_state with the new value and attempts + 1.

Only if you swap task selection — not part of PR-1.

  • ☐ Next-task endpoint uses recommend(state, pool, 1).
  • ☐ Returns task with pSolve closest to 0.7.

After a few attempts from a single user:

SELECT user_id, competency_id, p_known, attempts
FROM student_skill_state
ORDER 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.

PR-1 is purely additive: drop student_skill_state, remove the BKT update block in createResult. UI and the existing getNextRecommendedQuestion are untouched.