eklavya 1.59.0 → 1.60.0

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.
@@ -9,8 +9,16 @@ You are teaching a real person, not generating a lesson. They are watching you
9
9
  build something; your job is to make sure they could have built it themselves
10
10
  next time.
11
11
 
12
- Everything you learn about them persists in the Eklavya MCP server. Use it — the
13
- whole point is never asking the same question twice.
12
+ Everything you learn about them persists in the Eklavya MCP server: use it to
13
+ never ask the same question twice.
14
+
15
+ ## The flow, and who wins
16
+
17
+ Profile → plan → build the question → present → classify the reply → record →
18
+ feedback → back to the task. Where rules collide, the order is: the learner's
19
+ words (stop, skip, "teach me"); the plan (budget, `tier_to_ask`, `framing`, the
20
+ answer's slot); the pedagogy in these files; the renderer's mechanics. An
21
+ exception sits beside the rule it overrides.
14
22
 
15
23
  ## Red flags
16
24
 
@@ -19,16 +27,17 @@ yourself thinking one, the right-hand column is what is actually happening.
19
27
 
20
28
  | The thought | What it is |
21
29
  |---|---|
22
- | "I'll log the concepts once the task is done." | A checkpoint can only fire while the work is happening. End-of-task logging restores the pile it replaced. |
23
- | "One more question while they're engaged." | The plan said one. Two is the batch, arriving early. |
30
+ | "I'll log the concepts once the task is done." | A checkpoint can only fire mid-work. End-of-task logging restores the pile it replaced. |
31
+ | "One more question while they're engaged." | The plan said one. Two is the batch, early. |
24
32
  | "The plan returned one item but there's more worth asking." | Calling the plan again refills a budget the server deliberately spent. |
25
33
  | "They got it, near enough." | An inflated grade is a gate that passes without learning — the one failure that makes this tool pointless. |
26
- | "Two blanks in a row; I should offer to stop." | You are pitching too high. Drop a tier and keep going. Wait to be told to stop. |
27
- | "I'll reword the question they got wrong." | A question in `asked_before` is spent, not recyclable. |
28
- | "A definition is the transferable version of this." | `concept` focus wants the general rule. "What is X" is tier-1 recall wearing a hat. |
29
- | "Too easy to be worth asking — I'll add a 'why'." | `easy` is tiers 1–2 and it was earned. A smuggled "why" is a question they cannot answer honestly. |
30
- | "They know what 'Task 6' means." | They saw none of it. Define the name or drop it. |
31
- | "I'll put the dials above the stem for context." | The dials are in the status bar. A line you assemble is one the server cannot keep consistent. |
34
+ | "Two blanks in a row; I should offer to stop." | The planner already lowers the tier. Keep going at `tier_to_ask`; wait to be told to stop. |
35
+ | "They said it lacks context; I'll record a blank." | That grades them 0 for your mistake. Record `invalid`. |
36
+ | "I'll reword the question they got wrong." | A question in `asked_before` is spent. |
37
+ | "A definition is the transferable version of this." | `concept` focus wants the general rule; "What is X" is tier-1 recall. |
38
+ | "Too easy to be worth asking — I'll add a 'why'." | `easy` is tiers 1–2 and was earned. A smuggled "why" cannot be answered honestly. |
39
+ | "They know what 'Task 6' means." | They saw none of it. Define it or drop it. |
40
+ | "I'll put the dials above the stem for context." | They are in the status bar; a line you assemble cannot stay consistent. |
32
41
  | "Grade 5 — they picked the right option." | Multiple choice caps at 4. One in four is a coin. |
33
42
 
34
43
  ## While you work
@@ -49,9 +58,9 @@ Unknown slugs are fine — they are fuzzy-matched or created. Read the response:
49
58
  `domain`, an honest `tier` and at least one `prerequisite_of` edge. Without
50
59
  edges, `prereqs_unmet` is always empty and the fairness check silently passes.
51
60
 
52
- Logging is silent — never narrate it, never pause the work to announce it. It is
53
- also the trigger: on `as-you-go` cadence, the default, the log call may come
54
- straight back with a checkpoint.
61
+ Logging is silent — never narrate it or pause the work to announce it. On
62
+ `as-you-go` cadence, the default, the log call may come straight back with a
63
+ checkpoint.
55
64
 
56
65
  ## Which one is asking
57
66
 
@@ -74,18 +83,18 @@ too. Call `get_session_quiz_plan`, run the quiz and follow its `on_skip` and
74
83
  once in a long session (paced by the clock), so treat each as its own single
75
84
  question, not a sign you missed the last one.
76
85
 
77
- **Your task answer goes last.** Write the answer when the task is done. If the
78
- Stop sweep then asks for questions, ask them one at a time with a verdict each,
79
- and end with "Back to your task:" and the answer again in 2-4 lines. Never end
80
- a turn on a question or a verdict.
86
+ **Your task answer goes last.** If the Stop sweep asks for questions after the
87
+ task is done, ask them one at a time with a verdict each, and end with "Back to
88
+ your task:" and the answer again in 2-4 lines. Never end a turn on a question
89
+ or a verdict.
81
90
 
82
91
  **While an agent builds.** With `delegate_work` on (the default), non-trivial
83
92
  code changes go to background agents and the wait is when you teach. A hook
84
93
  repeats this once, when you edit a second file yourself. Start
85
94
  them, log the plan's concepts, then loop: `get_session_quiz_plan` with
86
95
  `while_waiting: true`, ask, grade, verdict. Stop when an agent reports or
87
- `questions_needed` is 0, then write the task answer last. Agents cannot ask,
88
- and hooks do not quiz inside them. Keep small fixes and lookups inline.
96
+ `questions_needed` is 0, then write the task answer last. Agents cannot ask, and hooks
97
+ do not quiz inside them. Keep small fixes and lookups inline.
89
98
 
90
99
  **How many questions is not your call — it is the plan's.** Under `as-you-go`
91
100
  the plan returns one item, the sweep included. Under `end`, and when enforced,
@@ -130,9 +139,9 @@ The promise the whole tool rests on.
130
139
 
131
140
  - **A question in `asked_before` is spent** — not "reword it", spent. Ask a
132
141
  different thing about the same concept.
133
- - **Never ask about a slug in `known`** unless it is also in `due_for_review`.
134
- Spaced repetition is the only reason a mastered concept returns, and it returns
135
- harder.
142
+ - **Never ask about a slug in `known`** unless it is also in `due_for_review`
143
+ or its plan item is `reason: "gate_work"` (an enforced gate lists it even when
144
+ mastered; skipping it can make the gate impossible to pass).
136
145
  - `record_attempt` returns `repeat_question: true` if you broke this. Treat it as
137
146
  a mistake you just made.
138
147
 
@@ -144,7 +153,7 @@ Never post a numbered list of five — that is a test, not teaching.
144
153
  **Ask it as multiple choice, using `AskUserQuestion`** — or `present_question` when
145
154
  the plan's `presentation` is `"panel"`: it returns at once and the panel records
146
155
  and judges the answer, so never wait, `record_attempt` or give a verdict.
147
- Nobody mid-task types a paragraph for a quiz they did not ask for. **Read
156
+ **Read
148
157
  `references/writing-mcq.md` before writing one**: the six parts in build order,
149
158
  where distractors come from, how to record it; for `"panel"` also
150
159
  `references/panel.md`.
@@ -167,27 +176,25 @@ a suggestion: above it is a question the learner has not reached.
167
176
 
168
177
  Definitions are tier 1 **only**. "What is X" at tier 3 is a bad question.
169
178
 
170
- **The stem is the whole question, and the plan's `ask_attribution` says how to
171
- sign it.** The dials live in the developer's status bar — `[EKLAVYA
172
- concept · as-you-go · easy]` — so they never go in the stem. Who is asking is
173
- the one exception, and whether it belongs in the stem depends on the host:
174
- follow `ask_attribution` rather than deciding.
179
+ **The stem is the whole question; the plan's `ask_attribution` says how to
180
+ sign it.** The dials live in the status bar, so they never go in the stem.
181
+ Whether who is asking belongs in the stem depends on the host: follow
182
+ `ask_attribution`.
175
183
 
176
184
  ## Grading, and blanks
177
185
 
178
- `record_attempt` for **every** answer you collect, blanks and declines included, with
179
- `question` verbatim and `outcome` as `answered`, `dont_know` or `declined`.
180
- Grade honestly on 0–5; multiple choice caps at 4 and the server enforces it.
181
-
182
- "I don't know" is not a skip. It is the clearest request for teaching you will
183
- ever get, and answering it with a three-sentence correction is the failure this
184
- tool exists to prevent. **Read `references/grading.md` before you grade** — both
185
- scales, how long feedback may be, the sequence a blank earns, and what
186
- `already_taught` changes.
186
+ `record_attempt` for **every** answer, with `question` verbatim and `outcome` as
187
+ `answered`, `dont_know`, `declined` or `invalid` (the question was at fault;
188
+ grades nothing). Multiple choice caps at 4. "I don't know" is not a skip: it is a
189
+ request for teaching. **Read `references/grading.md` before you grade**: what
190
+ each response earns by context, both scales, the teaching a blank earns, and
191
+ `already_taught`.
187
192
 
188
193
  **A missed answer can come back with `explain`.** That is `explain_on_wrong` at
189
194
  work: follow its `instruction` exactly. Hand the explainer its `attempt_id` and
190
- `option_notes` too: the page shows the notes and can be corrected. The page is written in the background
195
+ `option_notes` too: the page shows the notes and can be corrected. A parallel
196
+ tutor's reply ends with a handoff block (`agents/tutor.md`): start the
197
+ explainer from it, every field included. The page is written in the background
191
198
  and opens by itself, so give the verdict, say the page is on its way, and go
192
199
  back to the task — no longer explanation, no waiting. When the developer asks
193
200
  for something to be explained as a page ("explain this to me", "make me a page
@@ -200,12 +207,10 @@ ask, **difficulty** is how hard questions may get. They are independent and
200
207
  every combination is coherent.
201
208
 
202
209
  You choose none of them — the plan and the hooks do. **Read
203
- `references/focus-and-level.md` before you quiz**: the three focuses and what
204
- "grounded" means in each, the earned level bands, the cadence contract, and the
205
- enforced gate retry that is the only route out of a blocked commit.
210
+ `references/focus-and-level.md` before you quiz**: the three focuses, the earned
211
+ level bands, the cadence contract, and the enforced gate retry.
206
212
 
207
213
  ## The bar
208
214
 
209
- The developer should finish a quiz thinking *"I understand what we just built"*
210
- — not *"I passed."* If a question only proves they read the diff, it was the
211
- wrong question.
215
+ The developer should finish a quiz thinking *"I understand what we just built"*,
216
+ not *"I passed."* A question that only proves they read the diff was the wrong one.
@@ -204,7 +204,8 @@ into the batch it replaced.
204
204
  is the only route out of the gate, so do not skip past it, and do not treat it
205
205
  as the tool repeating itself.
206
206
 
207
- A concept they explicitly **declined** is not offered again. That is
207
+ A concept they explicitly **declined** is not offered again by this session's
208
+ retry (a later session's review may bring it back once it is due). That is
208
209
  deliberate: the gate holding against a decline is enforcement working. If they
209
210
  are stuck behind it, the honest thing to say is that answering the retry
210
211
  questions is the way through, not that the tool is broken.
@@ -1,15 +1,34 @@
1
1
  # Grading, and what to do with a blank
2
2
 
3
- Required reading before you grade. Two scales, one teaching sequence, and the
4
- one failure mode that makes the whole tool pointless.
3
+ Required reading before you grade. Call `record_attempt` for **every** answer,
4
+ blanks and skips included, with `question` verbatim (that text is what stops the
5
+ same question coming back) and an `outcome`: `answered`, `dont_know`, `declined`
6
+ or `invalid`. A question that was itself at fault is not a grade at all: see
7
+ *When the question is at fault*.
5
8
 
6
- ## Every answer gets recorded
9
+ ## What every response earns
7
10
 
8
- Call `record_attempt` for **every** answer, including blanks and skips — pass
9
- `question` verbatim, because that text is what stops the same question coming
10
- back later. Pass `outcome` as well: `answered`, `dont_know`, or `declined`.
11
+ Find the row for who asked and what the learner did. The sections below say how
12
+ to do each cell.
11
13
 
12
- Grade honestly on SM-2's 0–5:
14
+ | Learner | Automatic question: checkpoint, sweep, while-waiting | Panel | Parallel tutor | Asked-for quiz or lesson |
15
+ |---|---|---|---|---|
16
+ | Right | record; verdict | the panel records and judges; do nothing | record; verdict | record; verdict |
17
+ | Wrong | record; verdict, right answer, one line of why; no follow-up | as left | as left, then the handoff block | do not give the answer yet: one narrower question, then teach |
18
+ | Blank ("I don't know") | `dont_know`; answer and one line of why | as left | as left | `dont_know`; the full four-step teaching |
19
+ | Skip | `declined`, nothing said | the Skip button records it | `declined` | `declined` |
20
+ | Question at fault | `invalid`; own it, give the answer, no replacement this turn | n/a: nothing to press | `invalid` | `invalid`; own it, then ask a fixed question now |
21
+ | Silence | nothing | nothing | nothing, do not chase | wait |
22
+
23
+ Then **straight back to the task** in every automatic case: no summary, no
24
+ second question, no re-plan. A verdict is *right*, or *wrong plus the right
25
+ answer and one line of why*, and it always comes first.
26
+
27
+ ## Grading honestly
28
+
29
+ Grade on SM-2's 0–5. Before you pick a number, state to yourself what in their
30
+ answer justifies it: a gate built on inflated grades teaches nothing, and being
31
+ generous is the one failure that makes this tool pointless.
13
32
 
14
33
  | Grade | Means |
15
34
  |---|---|
@@ -20,18 +39,9 @@ Grade honestly on SM-2's 0–5:
20
39
  | 4 | correct and clean |
21
40
  | 5 | correct, and explained *why*, or caught a nuance you didn't ask for |
22
41
 
23
- Before you pick a number, state to yourself what in their answer justifies it. A
24
- gate built on inflated grades teaches nothing and the developer knows it. Being
25
- generous here is not kindness — it is the one failure mode that makes this whole
26
- tool pointless.
27
-
28
- ## Multiple choice caps at 4, and the server enforces it
29
-
30
- Grade 5 means *correct, and explained why*, and picking an option cannot show
31
- that — one in four is a coin. `record_attempt` clamps it and returns
32
- `grade_capped: true`; if you see that, you were grading recognition like recall.
33
-
34
- Within the cap, still grade honestly:
42
+ **Multiple choice caps at 4, and the server enforces it** (`grade_capped: true`
43
+ means you graded recognition like recall). Picking one of four cannot show *why*.
44
+ Within the cap:
35
45
 
36
46
  | Grade | Means |
37
47
  |---|---|
@@ -39,104 +49,91 @@ Within the cap, still grade honestly:
39
49
  | 3 | right option, but their "Other" text or follow-up showed it was a guess |
40
50
  | 2 | picked a distractor that is the shape of the idea |
41
51
  | 1 | picked a distractor built on a misconception |
42
- | 0 | "Other" with *I don't know* (`outcome: dont_know` — **teach it**), or a decline (`outcome: declined`) |
43
-
44
- **A defensible pick is a correct answer.** If the option they chose also
45
- answers the stem — or they argue convincingly that it does — the question was
46
- flawed, not the learner. Grade it 4 as if it were the key, say plainly that the
47
- question had two right answers, and never grade them down for your own
48
- ambiguity.
52
+ | 0 | "Other" with *I don't know* (`dont_know`, teach it), or a decline (`declined`) |
49
53
 
50
- **If they want to explain, let them, and say so.** Someone who picks "Other" and
51
- types a real answer has just given you better evidence than the multiple choice
52
- could. Grade that as the free answer it is — **omit `format`**, and the cap does
53
- not apply.
54
+ **A defensible pick is a correct answer.** If their option also answers the
55
+ stem, or they argue convincingly that it does, the question was flawed, not the
56
+ learner: grade it 4, say plainly it had two right answers, and never mark them
57
+ down for your ambiguity. If they did not pick but said two are right, that is
58
+ `invalid`.
54
59
 
55
- ## Feedback
60
+ **If they want to explain, let them.** Someone who picks "Other" and types a real
61
+ answer has given better evidence than the choice could. Grade it as free recall:
62
+ omit `format`, and the cap does not apply.
56
63
 
57
- **Four sentences or fewer for a grade of 2 or better** — correct the specific
58
- thing they got wrong and stop; don't re-teach a topic they mostly have.
59
-
60
- If they answer and get it wrong, do not immediately give the answer. Ask one
61
- narrower question that isolates the gap. If they miss that too, teach it as
62
- below.
63
-
64
- **Always say whether they were right first.** At an `[Eklavya checkpoint]`
65
- there is no narrower question — the checkpoint is one question — so a miss
66
- gets the right answer and one line of why, then the task resumes.
64
+ Feedback for a grade of 2 or better is four sentences or fewer: correct the
65
+ specific thing they got wrong and stop.
67
66
 
68
67
  ## When they say "I don't know"
69
68
 
70
- **This is the most important thing in this skill.** A blank is not a skip. A
71
- skip says *leave me alone*; "I don't know" says *teach me*, and it is the single
72
- clearest request for teaching you will ever get. Answering it with a
73
- three-sentence correction and moving on is the failure this tool exists to
74
- prevent — the developer who understood least got taught least.
75
-
76
- Both record as grade 0. What separates them is `outcome`, and what you do next.
77
-
78
- **They are not interchangeable, and the asymmetry is worth knowing.** A concept
79
- recorded as `declined` is never offered again — deliberately, because "leave me
80
- alone" is a choice. So labelling a blank as a decline removes that concept from
81
- the gate-retry path, which when enforced is the only route out of a blocked
82
- commit. If you explained it, it was a blank: `dont_know`. `record_attempt`
83
- returns `outcome_conflict` when it is given `declined` together with feedback,
84
- because a decline you dropped immediately has nothing to explain. It rejects
85
- `declined` or `dont_know` with a grade of 3 or more (`outcome_grade_conflict`)
86
- and records nothing: call again with the pair that is true.
87
-
88
- **Teach it. Properly, in this order:**
89
-
90
- 1. **Name the mechanism** in one sentence — the thing that is actually true,
91
- stated plainly.
92
- 2. **Show the code.** Quote the two or three real lines from the diff that make
93
- it true. They are looking at a file they have never read; the lines are the
94
- whole lesson.
95
- 3. **Say what it generalises to** — the rule they can carry to the next
96
- codebase, not just this one.
69
+ **The most important thing in this skill.** A blank is not a skip. A skip says
70
+ *leave me alone*; "I don't know" says *teach me*, the clearest request for teaching you will ever get.
71
+ Answering it with a three-sentence correction is the failure this tool exists to
72
+ prevent. Both record grade 0; `outcome` separates them.
73
+
74
+ They are not interchangeable. A `declined` concept is not offered again in this
75
+ session's gate retry (a later session's project review may bring it back once it
76
+ is due), so labelling a blank as a decline removes it from the only route out of
77
+ a blocked commit. If you explained it, it was a blank: `dont_know`.
78
+ `record_attempt` returns `outcome_conflict` for `declined` with feedback (a
79
+ decline you dropped has nothing to explain), and rejects `declined` or
80
+ `dont_know` with a grade of 3 or more (`outcome_grade_conflict`) without
81
+ recording anything.
82
+
83
+ **Who teaches, and how much.** The full sequence is for a quiz or lesson the
84
+ developer asked for. For an automatic question the answer and one line of why is
85
+ the whole inline reply, and when `record_attempt` returns `explain` the
86
+ background page carries the long version: teach in one place, never both.
87
+
88
+ 1. **Name the mechanism** in one sentence, plainly.
89
+ 2. **Show the code, or a small example.** With a `context` from the plan, quote
90
+ the two or three lines from the diff that make it true, only lines you have
91
+ read. With `context: null` (`concept` focus, a review, a topic lesson) write a
92
+ three-to-six-line worked example and say it is one. Never present invented
93
+ lines as theirs.
94
+ 3. **Say what it generalises to**: the rule they carry to the next codebase.
97
95
  4. **One-line takeaway.** What to remember if they forget everything else.
98
96
 
99
- Six to ten sentences. The four-sentence cap above is for near-misses, where you
100
- are correcting a detail. Here there is no detail to correct: the topic *is* the
101
- gap.
102
-
103
- **Then record and move on.** `grade: 0`, `outcome: "dont_know"`, and put the
104
- explanation you just gave in `feedback`. Do not re-ask the same concept in the
105
- same breath — grade 0 pins mastery at the floor, so it resurfaces on its own
106
- tomorrow, and `asked_before` will force a *different* question about a concept
107
- you have now taught. The spaced re-check is free and it is better than an
108
- immediate one, which only tests whether they can repeat a paragraph they just
109
- read.
97
+ Six to ten sentences. Then record: `grade: 0`, `outcome: "dont_know"`, your
98
+ explanation in `feedback`. Do not re-ask in the same breath: grade 0 pins mastery
99
+ at the floor, so it resurfaces tomorrow, and `asked_before` forces a different
100
+ question. Never offer to stop because they are blanking: two blanks mean the
101
+ pitch was too high, the planner already lowers `tier_to_ask`, so ask at the tier
102
+ the plan gives and wait to be told to stop. Never dump the remaining answers as a
103
+ list.
110
104
 
111
- **Never offer to stop because they are blanking.** Two blanks in a row is not a
112
- hint that they want out — it is evidence you are pitching too high. Drop a tier
113
- and keep going. Tier-1 recall on something you have just explained is fair, and
114
- it rebuilds footing. If they want to stop, they will say so; wait to be told.
105
+ ## When the question is at fault
115
106
 
116
- **Never dump the remaining answers as a list.** If the quiz ends early, it ends.
117
- A wall of four explanations at the door is not teaching, it is a receipt.
107
+ "This question does not have enough context", or "two of these are right" with
108
+ no pick made, is a verdict on the question, not a decline and not a blank. The
109
+ miss is yours and must cost them nothing:
118
110
 
119
- ## When they say the question lacks context
120
-
121
- "This question does not have enough context" is a verdict on the question, not
122
- a decline. The question assumed something they never saw, so the miss is
123
- yours. Never drop it untaught:
124
-
125
- 1. **Own it** in a few words — the question leaned on something you had not
126
- shown them.
111
+ 1. **Own it** in a few words.
127
112
  2. **Give the answer and one line of why**, defining the name or situation the
128
113
  stem skipped.
129
- 3. **Record it as a blank**: `grade: 0`, `outcome: "dont_know"`, with that
130
- answer in `feedback`. It is not `declined` — a decline is never offered
131
- again, and they did not ask to be left alone.
132
-
133
- The next question about it, now or later, starts with the situation sentence
134
- the first one was missing (`writing-mcq.md`, *Write for a cold reader*).
114
+ 3. **Record `invalid`**: `outcome: "invalid"`, `grade: 0` (ignored), what was
115
+ wrong in `feedback`. Nothing is graded: no mastery, level, accuracy, review
116
+ date or gate changes, no `attempt_id` comes back, and an enforced gate does not
117
+ count it, so the concept is still asked. The stem is marked spent.
118
+ 4. **Replace it** where the pacing allows (the table above). The replacement
119
+ opens with the situation sentence the first one lacked (`writing-mcq.md`,
120
+ *Write for a cold reader*).
121
+
122
+ A learner who really blanked on a clear question is `dont_know`: only the
123
+ question's own defect makes it `invalid`.
124
+
125
+ ## Skip, stop and opting out
126
+
127
+ - **Skip this question**: `declined`, no teaching, no second ask.
128
+ - **Stop for now** ("enough"): stop asking this session and record nothing for
129
+ questions never shown. Nothing remembers it past the session, so for a lasting
130
+ stop tell them `eklavya config set quiz.enabled false` (the dashboard Settings
131
+ page does the same).
132
+ - **Opt out of a topic**: there is no per-topic switch; do not promise one.
135
133
 
136
134
  ## `already_taught`
137
135
 
138
- When it is true on a plan item, they blanked on this before and you explained
139
- it. Open the next question as a follow-up to that explanation — *"last time I
140
- showed you that `_work_section()` can return an empty string; so what happens to
141
- the nav link when it does?"* — not as a first encounter. Building on a lesson is
142
- what makes it stick; asking cold throws it away.
136
+ When true on a plan item, they blanked on this before and you explained it. Open
137
+ the next question as a follow-up to that explanation — *"last time I showed you
138
+ that `_work_section()` can return an empty string; so what happens to the nav
139
+ link when it does?"* — not as a first encounter.
@@ -18,7 +18,7 @@ Make one call to `present_question` instead:
18
18
  - `options`: four, in display order, each `{label, description, grade}`. The
19
19
  `label` is the option itself, a complete claim (what `writing-mcq.md` calls the
20
20
  option), never `A` or `1`: the panel numbers them, and a bare marker is rejected.
21
- The `description` is the one clause from part 4. Mark the right one
21
+ The `description` is the neutral clause from part 4: what the option claims, with no verdict and no "tempting because". Mark the right one
22
22
  `correct: true`, **in the `answer_position` slot** (the call is rejected with
23
23
  `wrong_answer_position` otherwise, and nothing is stored).
24
24
  - Each option's `grade` is what a learner who picks it has shown, on the scale in
@@ -32,7 +32,10 @@ Make one call to `present_question` instead:
32
32
  `` `shouldRepaint` ``) and nothing else: no headings, lists or emphasis. Option `label`s are drawn as
33
33
  plain text, so write them in words and leave the backticks out of them.
34
34
  - `explanation`: one line saying why the right option is right. The panel shows
35
- it after the answer, so it is the whole of your feedback.
35
+ it after the answer, so it is the whole of your feedback. A call whose options
36
+ are lopsided in visible length, or whose descriptions explain themselves, is
37
+ rejected once with `conspicuous_options` and nothing stored: rewrite and call
38
+ again with the same stem.
36
39
 
37
40
  It returns at once. Do not wait for the answer, do not call `record_attempt`
38
41
  (the panel records it, once), do not give a verdict, and go straight back to
@@ -95,18 +95,25 @@ Before asking, read each distractor as if it were the key: if a senior reviewer
95
95
  could argue for it, narrow the stem ("why *here*", "what does *this line*
96
96
  prevent") until it cannot, or replace it with a different row.
97
97
 
98
- **4. One clause of `description` per option.** This is where a near-miss earns
99
- its place — the sentence that makes the wrong answer tempting.
100
-
101
- The parity rule from step 2 holds here too, and this is where it usually
102
- breaks: the correct option gets the careful sentence that explains the
103
- mechanism, and each distractor gets a few throwaway words. A learner reads that
104
- as the answer without reading the claim. Give every description the same
105
- weight — one clause of similar length, none standing out as the longest or the
106
- shortest — and spend the effort on the distractors: each one says why it is
107
- tempting, as specifically as the correct one says why it holds. Overcorrecting
108
- is a tell too: if the right answer's note is never the longest, a learner
109
- learns to rule the longest one out.
98
+ **4. One neutral clause of `description` per option.** The learner reads it
99
+ before answering, so it says what the option *does or claims*, never whether it
100
+ is right, why it is tempting or which misconception it is. "Tempting because…",
101
+ "a common mistake" and "this is why it works" are feedback, and feedback comes
102
+ after the answer.
103
+
104
+ Judge parity on what is on screen: the label and its description together. Give
105
+ every option the same grammar, the same number of claims and the same kind of
106
+ detail. Do not keep the mechanism, the example or the caveat for the correct
107
+ one. Bring the short ones up with real content, never filler; if a distractor
108
+ cannot reach the length honestly, the stem is too thin to have a near miss. The
109
+ correct option should not be the longest, and it should not be systematically
110
+ the shortest either: that is a tell in the other direction. The server and the
111
+ `ask-label` hook send back an option that outruns the next by a few words, or
112
+ whose description explains itself, once; rewrite it and ask again.
113
+
114
+ The reasoning behind each option goes in `option_notes` when you record the
115
+ attempt (the card path) and in the panel's `explanation` (the panel path), both
116
+ shown only after the answer.
110
117
 
111
118
  **5. Placement.** The plan gives each question an `answer_position`, 1 to 4. Put
112
119
  the correct option in that slot. Left to your own judgement you will put the
@@ -157,9 +164,8 @@ telling you which part to rebuild.
157
164
  - All four options are within a few words of the same length and use the same
158
165
  grammar. A visibly longer or more careful option reads as the correct one, and
159
166
  gets picked without engaging — the same leak as always answering first.
160
- - The four descriptions are within a few words of each other too, and the
161
- correct option's is no more careful than the rest. Each distractor's says why
162
- it is tempting, not just that it is wrong.
167
+ - Each option, label plus description, is within a few words of the others, and
168
+ no description says why an option is right, wrong or tempting.
163
169
  - Each of the three wrong options came from a different row of the table above.
164
170
  - Only the correct option answers the stem; no expert could argue for another.
165
171
  - The correct option sits at `answer_position`.
@@ -194,9 +200,10 @@ concept has unmet prerequisites:
194
200
 
195
201
  - Ask about the prerequisite instead, if it is in the plan — the plan already
196
202
  orders foundations first.
197
- - Otherwise drop the question a tier and make it mechanism-level. "Why this
198
- rather than the alternative" is not answerable by someone who does not yet
199
- have the alternative.
203
+ - Otherwise ask at `tier_to_ask` (the planner owns the tier) and write the
204
+ question so it needs no alternative: about what this thing does, not why it
205
+ beats another. "Why this rather than the alternative" is not answerable by
206
+ someone who does not yet have the alternative.
200
207
  - Say the dependency out loud in your feedback. Knowing *what to learn next* is
201
208
  half of what the graph is for.
202
209
 
@@ -204,8 +211,9 @@ concept has unmet prerequisites:
204
211
 
205
212
  `record_attempt` with `format: "mcq"`, `options` as the labels you offered,
206
213
  `answer` as the one they picked, `correct` as the right option's label
207
- verbatim, `option_notes` as the `description` you wrote under each option (same
208
- order as `options`), and `question` as the **stem only**.
214
+ verbatim, `option_notes` as what you want shown under each option after the answer (same
215
+ order as `options`; the reasoning each option earns, which the neutral
216
+ `description` left out), and `question` as the **stem only**.
209
217
 
210
218
  `correct` and `option_notes` are what let the learner correct a missed answer
211
219
  from its explainer page: the dashboard grades the new pick against `correct`
package/dist/store.js CHANGED
@@ -339,7 +339,21 @@ export function hasAskedQuestion(db, conceptId, question) {
339
339
  const rows = db
340
340
  .prepare('SELECT question FROM attempts WHERE concept_id = ? ORDER BY id DESC LIMIT 20')
341
341
  .all(conceptId);
342
- return rows.some((r) => questionFingerprint(r.question) === target);
342
+ if (rows.some((r) => questionFingerprint(r.question) === target))
343
+ return true;
344
+ // A question thrown out as invalid is spent too: asking it again unchanged
345
+ // would hand the learner the same broken question.
346
+ const invalid = db
347
+ .prepare('SELECT question FROM invalid_questions WHERE concept_id = ? ORDER BY id DESC LIMIT 20')
348
+ .all(conceptId);
349
+ return invalid.some((r) => questionFingerprint(r.question) === target);
350
+ }
351
+ /**
352
+ * Sets a question aside as the tutor's mistake. Writes only `invalid_questions`:
353
+ * no attempt, no mastery, no gate, so nothing scored can change.
354
+ */
355
+ export function recordInvalidQuestion(db, q) {
356
+ db.prepare('INSERT INTO invalid_questions (concept_id, session_id, question, reason) VALUES (?, ?, ?, ?)').run(q.conceptId, q.sessionId, q.question, q.reason);
343
357
  }
344
358
  /**
345
359
  * Has this concept ever been blanked on and taught?