learn-loops 0.4.4 → 0.4.5

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.
@@ -184,9 +184,11 @@ async function teach(ctx) {
184
184
  }
185
185
  // 7. Think deeper: trade-offs, failure modes, second-order effects.
186
186
  if (ctx.deep) {
187
- const rounds = await thinkDeeper(profile, topic.state, ctx.title, lesson.deeper);
188
- if (rounds.length)
189
- extras.deeper = rounds;
187
+ if (lesson.deeper) {
188
+ const rounds = await thinkDeeper(profile, topic.state, ctx.title, lesson.deeper);
189
+ if (rounds.length)
190
+ extras.deeper = rounds;
191
+ }
190
192
  // 8. Personal connection.
191
193
  const conn = must(await p.text({ message: `${t.pink("Where could you use this?")}`, placeholder: "a project, a decision, something you've seen (blank to skip)" })).trim();
192
194
  if (conn) {
@@ -12,7 +12,7 @@ function showCritique(c) {
12
12
  * Trade-offs, failure modes, scale and second-order effects. Round one uses the lesson's own question;
13
13
  * further rounds rotate through different lenses so the learner practises seeing a topic from many sides.
14
14
  */
15
- export async function thinkDeeper(profile, s, title, seed, maxRounds = 3) {
15
+ export async function thinkDeeper(profile, s, title, seed, maxRounds = 2) {
16
16
  const rounds = [];
17
17
  let lensIdx = Math.floor(Math.random() * LENSES.length);
18
18
  let current = seed ? { lens: "Think deeper", ...seed } : undefined;
package/dist/prompts.js CHANGED
@@ -54,7 +54,7 @@ Rules: max ~250 words in markdown. ${p.order === "examples-first" ? "Open with a
54
54
  Use the learner's preferred styles (${p.styles.join(", ") || "any"}). ${diagramRule(p)} ${MERMAID_RULES}
55
55
  ${STEM_RULES}
56
56
  ${QUESTION_RULES}
57
- Exactly 2 multiple-choice checks (4 options each, "answer" is the 0-based index, plausible distractors based on real misconceptions; vary the position of the right answer). 2-3 flashcards.
57
+ Exactly 3 multiple-choice checks (4 options each, "answer" is the 0-based index, plausible distractors based on real misconceptions; vary the position of the right answer) in rising difficulty: 1 easy (recall the core idea), 1 medium (apply it to a simple case), 1 hard (a subtle case or a common misconception). Order them easy to hard. 2-3 flashcards.
58
58
  Return ONLY JSON of this shape:
59
59
  ${lessonShape}`;
60
60
  }
@@ -72,9 +72,9 @@ Rules: 400-650 words of markdown with ## subheadings. ${p.order === "examples-fi
72
72
  Include a worked example, one common misconception to avoid, and ${p.diagrams === "minimal" ? "at least one" : "1-2"} figure(s) (mermaid, svg or plot as fits the subject) showing the real mechanism/structure (not decoration). ${MERMAID_RULES}
73
73
  ${STEM_RULES}
74
74
  ${QUESTION_RULES}
75
- Challenge level: ${p.challenge}. Exactly ${p.challenge === "tough" ? 4 : 3} multiple-choice checks that test understanding/application, not trivia (4 options, "answer" is 0-based). 3-4 flashcards phrased as recall questions.
75
+ Challenge level: ${p.challenge}. Exactly ${p.challenge === "tough" ? 5 : p.challenge === "gentle" ? 3 : 4} multiple-choice checks that test understanding/application, not trivia (4 options, "answer" is 0-based), ordered easy to hard: at least one easy recall check, mostly medium application checks, and at least one hard check (subtle case or misconception). 3-4 flashcards phrased as recall questions.
76
76
  ${p.socratic ? "The learner prefers a SOCRATIC style: the markdown is the consolidation shown AFTER they work through your leading questions, so it should name and tie together the ideas those questions lead to." : ""}
77
- Also include the "prediction" (a situation where a wrong intuition is likely, so they learn from guessing wrong), the "deeper" trade-off question${p.socratic ? ", and exactly 3 \"socratic\" questions" : ""}.
77
+ Also include the "prediction" (a situation where a wrong intuition is likely, so they learn from guessing wrong). Include the "deeper" trade-off question ONLY if this lesson has a genuine judgement call, trade-off or failure mode worth debating; for foundational or purely procedural lessons set "deeper" to null (roughly half of lessons should have none)${p.socratic ? ", and exactly 3 \"socratic\" questions" : ""}.
78
78
  Return ONLY JSON of this shape (omit the /* */ comment):
79
79
  ${lessonShapeBase}${deepExtras(!!p.socratic)}`;
80
80
  }
@@ -150,6 +150,7 @@ export function critiquePrompt(p, title, question, considerations, answer) {
150
150
  A thoughtful answer would raise: ${considerations.map((c) => `- ${c}`).join("\n")}
151
151
  Learner's answer: """${answer}"""
152
152
  Judge reasoning quality, not length: did they weigh both sides, name concrete risks, and notice second-order effects? Credit valid points that are NOT in the list. Be ${tone}.
153
+ Be proportionate, not pedantic: list at most 2 blind spots and only ones that would change their conclusion; skip nitpicks, wording quibbles and edge cases that don't matter. If the answer is solid, say so and leave "blindSpots" empty and "pushback" an empty string.
153
154
  Return ONLY JSON: {"strong":["good points they made"],"blindSpots":["important angles they did not consider, each with one sentence of why it matters"],"pushback":"one hard follow-up that challenges their weakest assumption","feedback":"2 sentences"}`;
154
155
  }
155
156
  export function challengePrompt(p, s, area, covered) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "learn-loops",
3
- "version": "0.4.4",
3
+ "version": "0.4.5",
4
4
  "description": "A learning CLI that uses Claude Code / Codex as your tutor",
5
5
  "type": "module",
6
6
  "bin": {