Run the grader
# grade this stage (from your course directory)
npx theinference test --stage run-the-grader --watchThis is your first green check. It proves the loop works — edit, save, watch it grade — before you write any retrieval code. Every later step plugs into this exact loop, so it's worth landing the green here and watching how it feels.
The run / learn loop
You work in your own editor and terminal. The flow is:
- Log in (once):
npx theinference login— approves in your browser, and passing stages then tick off here automatically - Scaffold the course:
npx theinference course start semantic-search ./semantic-search - Install dependencies:
cd semantic-search && npm install - Run the grader in watch mode:
npx theinference test --stage run-the-grader --watch
The grader runs your code, feeds it inputs, and compares the output to a frozen reference. --stage runs everything up to the stage you're on — each lesson shows its exact command — so a green run means your stage is done.
What to do
Run the grader
Nothing to write — the setup command is already wired in cli.ts. Run ./your_program.sh setup (or let the watcher run it). It should print semantic-search: toolchain OK. This proves your Node + tsx toolchain works before you write any code.
./your_program.sh setup
process archetype — the harness execs your program with arg setup and asserts stdout is exactly semantic-search: toolchain OK. Green check = you're ready.
npx theinference test --stage <stage> --watchre-runs on every save — keep it open next to your editor, and bump--stageas you advance (each lesson shows its command).- Debug to stderr (
console.error); the grader only reads stdout, so a strayconsole.logwill fail an exact-match check. - Steps unlock in order — with
--stageset, a fully green run means your current stage is complete.