@jcode.labs/ragmir 2.0.0 → 2.2.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.
Files changed (49) hide show
  1. package/dist/access-log.d.ts.map +1 -1
  2. package/dist/access-log.js +32 -1
  3. package/dist/access-log.js.map +1 -1
  4. package/dist/cli-options.d.ts +48 -0
  5. package/dist/cli-options.d.ts.map +1 -0
  6. package/dist/cli-options.js +92 -0
  7. package/dist/cli-options.js.map +1 -0
  8. package/dist/cli.js +1 -68
  9. package/dist/cli.js.map +1 -1
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +28 -6
  12. package/dist/config.js.map +1 -1
  13. package/dist/defaults.d.ts +0 -1
  14. package/dist/defaults.d.ts.map +1 -1
  15. package/dist/defaults.js +0 -7
  16. package/dist/defaults.js.map +1 -1
  17. package/dist/destroy.d.ts.map +1 -1
  18. package/dist/destroy.js +4 -0
  19. package/dist/destroy.js.map +1 -1
  20. package/dist/embeddings.d.ts +6 -0
  21. package/dist/embeddings.d.ts.map +1 -1
  22. package/dist/embeddings.js +31 -0
  23. package/dist/embeddings.js.map +1 -1
  24. package/dist/index.d.ts +1 -1
  25. package/dist/index.d.ts.map +1 -1
  26. package/dist/index.js +1 -1
  27. package/dist/index.js.map +1 -1
  28. package/dist/query.d.ts.map +1 -1
  29. package/dist/query.js +57 -29
  30. package/dist/query.js.map +1 -1
  31. package/dist/redaction.d.ts.map +1 -1
  32. package/dist/redaction.js +48 -2
  33. package/dist/redaction.js.map +1 -1
  34. package/dist/sources.d.ts +13 -0
  35. package/dist/sources.d.ts.map +1 -1
  36. package/dist/sources.js +70 -21
  37. package/dist/sources.js.map +1 -1
  38. package/dist/store.d.ts.map +1 -1
  39. package/dist/store.js +46 -1
  40. package/dist/store.js.map +1 -1
  41. package/dist/types.d.ts +2 -0
  42. package/dist/types.d.ts.map +1 -1
  43. package/dist/version.d.ts +1 -1
  44. package/dist/version.js +1 -1
  45. package/examples/library-api-demo/README.md +2 -1
  46. package/package.json +4 -4
  47. package/skills/ragmir-audio-summary/SKILL.md +107 -25
  48. package/skills/ragmir-audio-summary/listening-style.md +91 -0
  49. package/skills/ragmir-audio-summary/narration-templates.md +162 -0
@@ -0,0 +1,162 @@
1
+ # Narration Templates
2
+
3
+ Reference for the drafting step of `ragmir-audio-summary`. These are **thinking skeletons**, not
4
+ output formatting. The final narration is plain flowing prose with no markdown, headings, bullets,
5
+ tables, SSML, or XML tags. The skeletons below only shape how you order and connect ideas before you
6
+ write the spoken text.
7
+
8
+ Pick the format chosen in the skill, then fill the skeleton with the evidence that serves the user's
9
+ intent. Drop anything that does not serve the intent — that is how you avoid superfluous data.
10
+
11
+ ## Format Selection Recap
12
+
13
+ | Format | When to use | Word budget |
14
+ | --- | --- | --- |
15
+ | Micro-brief | Little relevant material, or one clear question | 150-220 words |
16
+ | Brief standard | Moderate material, a few angles worth keeping | 450-750 words |
17
+ | Dossier long | Dense, multi-faceted material needing chapters | 1500-3000 words |
18
+
19
+ Length follows relevant material. Never pad.
20
+
21
+ ---
22
+
23
+ ## Micro-Brief Skeleton
24
+
25
+ Spoken-prose shape (write it as one flowing passage, not as headings):
26
+
27
+ 1. **Hook + intent** — one sentence naming the subject and why the listener asked.
28
+ 2. **Key idea** — the single thing to remember, stated up front (primacy).
29
+ 3. **Evidence** — one short, plain-language reason or fact that supports it.
30
+ 4. **Uncertainty / caveat** — one sentence if the evidence is partial or stale; omit only if solid.
31
+ 5. **Recap + recall** — restate the key idea in other words, then ask one active-recall question,
32
+ pause with `…`, and give the answer.
33
+
34
+ Abstract example (do not copy the words, follow the shape):
35
+
36
+ > "Vous vouliez savoir si la clause de rupture est applicable. Oui, elle l'est, mais seulement après
37
+ > un préavis de trente jours. Le contrat le prévoit explicitement à la section terminaison. En
38
+ > revanche, la date de départ du préavis reste ambiguë, aucun courrier ne la fixe clairement.
39
+ > Retenez donc une chose: rupture possible, préavis de trente jours, point de départ à confirmer.
40
+ > Question: quelle est la durée du préavis prévu? … Trente jours."
41
+
42
+ ---
43
+
44
+ ## Brief Standard Skeleton (Pyramid + SCQA)
45
+
46
+ The standard brief follows Barbara Minto's pyramid: answer first, then supporting points, then
47
+ recap. Wrap it in a short Situation-Complication-Question-Answer opening.
48
+
49
+ 1. **Situation** — one or two sentences framing the context the listener already shares.
50
+ 2. **Complication** — the tension, change, or question that prompted the summary.
51
+ 3. **Question** — the explicit question the summary answers.
52
+ 4. **Answer (the key message)** — the one-to-three points to retain, stated first (primacy).
53
+ 5. **Developed points** — each of the two-to-four points expanded in plain speech, grouped with
54
+ signposting ("D'abord…, Ensuite…, Enfin…"). Proven facts only; separate from inference.
55
+ 6. **Uncertainty, risks, decisions, missing documents** — a short passage on what is not yet
56
+ settled or needs action.
57
+ 7. **Recap** — restate the two-to-four key points in compressed form (recency).
58
+ 8. **Active recall** — two or three recall questions, each followed by a `…` pause and the answer.
59
+
60
+ Abstract example (shape only):
61
+
62
+ > "Le projet a atteint sa phase de test. Le souci, c'est que deux blocages apparaissent en
63
+ > parallèle. Faut-il continuer ou mettre en pause? La réponse tient en deux points: continuez sur
64
+ > le module A, mais mettez en pause le module B. D'abord, le module A passe ses tests sans
65
+ > régression. Ensuite, le module B dépend d'un composant externe encore instable. Ce qu'on ne sait
66
+ > pas encore, c'est la date de livraison du composant externe. Donc retenez: module A en avant,
67
+ > module B en attente, dépendance externe à confirmer. Première question: quel module peut
68
+ > continuer sans risque? … Le module A. Deuxième question: pourquoi mettre en pause le module B? … À cause d'un
69
+ > composant externe instable."
70
+
71
+ ---
72
+
73
+ ## Dossier Long Skeleton (Chaptered)
74
+
75
+ Use only when the material genuinely has several distinct facets. Each chapter is a self-contained
76
+ mini-brief with its own mini-recap, so a listener can step away and come back.
77
+
78
+ 1. **Promise** — what the whole audio covers and the three-to-five landmarks to listen for. State
79
+ the key message of the whole dossier up front.
80
+ 2. **Chapter 1** — signpost the chapter ("Premier point: …"). Give its mini pyramid
81
+ (answer → evidence → caveat), then a one-sentence mini-recap.
82
+ 3. **Chapter 2** — same shape, explicit transition ("Deuxième point: …").
83
+ 4. **Continue** for each facet. Keep chapters balanced in length; merge thin ones.
84
+ 5. **Global recap** — compress the key message of every chapter into one flowing passage (recency).
85
+ 6. **Active recall** — three to five recall questions across the chapters, each with a `…` pause
86
+ and the answer. Spread the questions across chapters, not only the last one.
87
+
88
+ Transitions between chapters are essential in long audio — see the signposting catalogue below.
89
+
90
+ Abstract shape:
91
+
92
+ > "Ce dossier couvre les trois enjeux du contrat: la durée, la rupture, et les pénalités. En une
93
+ > ligne: la durée est ferme, la rupture est conditionnée, les pénalités sont plafonnées. Premier
94
+ > point: la durée. Le contrat court sur trois ans, fermes. … [chapitre] … Donc, durée ferme de
95
+ > trois ans. Deuxième point: la rupture. … [chapitre] … Donc, rupture possible sous préavis.
96
+ > Troisième point: les pénalités. … [chapitre] … Donc, pénalités plafonnées à dix pour cent. Pour
97
+ > récapituler l'ensemble: trois ans fermes, rupture sous préavis, pénalités plafonnées. Première
98
+ > question: quelle est la durée ferme du contrat? … Trois ans. …"
99
+
100
+ ---
101
+
102
+ ## Signposting Catalogue
103
+
104
+ Signposting is the connective tissue that makes audio followable without visuals. Use these spoken
105
+ transitions instead of lists or headings.
106
+
107
+ | Move | Spoken cue (FR examples) |
108
+ | --- | --- |
109
+ | Open | "Voici l'essentiel sur…" / "Vous vouliez savoir si… La réponse courte est…" |
110
+ | Enumerate | "D'abord…, Ensuite…, Enfin…" / "Il y a trois points…" (then speak each) |
111
+ | Contrast | "En revanche…" / "Mais attention…" / "À l'inverse…" |
112
+ | Cause / effect | "Parce que…" / "C'est pourquoi…" / "La conséquence est…" |
113
+ | Emphasize | "Retenez ceci…" / "Le point clé, c'est…" |
114
+ | Transition chapter | "Deuxième point…" / "Passons à…" / "Cela nous amène à…" |
115
+ | Mini-recap | "En un mot…" / "Donc, pour ce point…" |
116
+ | Close | "Pour récapituler…" / "En résumé…" |
117
+ | Recall question | "Question: …? … [answer]" |
118
+
119
+ When enumerating, say the count first ("trois points") then speak each one with "D'abord / Ensuite /
120
+ Enfin" — never read a literal list.
121
+
122
+ ---
123
+
124
+ ## Active-Recall Question Catalogue
125
+
126
+ Active recall forces the listener to retrieve from memory, which anchors retention far better than
127
+ passive re-exposure. Phrase questions so they require **recall**, not recognition (no multiple
128
+ choice, no "est-ce que c'est X?" with the answer embedded).
129
+
130
+ ### By intent
131
+
132
+ | Intent | What to drill | Question shape (FR examples) |
133
+ | --- | --- | --- |
134
+ | Decide | The decision and its one main driver | "Quelle option recommande-t-on, et pourquoi?" |
135
+ | Learn | The definitions and the one mechanism to remember | "Comment définit-on X, et qu'est-ce qui le déclenche?" |
136
+ | Monitor | The thresholds and the alert condition | "À partir de quel seuil déclenche-t-on l'alerte?" |
137
+ | Compare | The decisive differentiator | "Quelle est la principale différence entre A et B?" |
138
+ | Plan | The next concrete action and its owner | "Quelle est la première action à mener, et par qui?" |
139
+
140
+ ### Rules
141
+
142
+ - Two to three questions for a brief, three to five for a dossier. One is enough for a micro-brief.
143
+ - Each question targets a key point from the recap, not a peripheral detail.
144
+ - After the question mark, insert `…` so the TTS pause gives the listener a beat to answer silently,
145
+ then state the answer in the fewest words possible.
146
+ - Do not reveal the answer inside the question. "Le préavis est-il de trente jours?" leaks the
147
+ answer — prefer "Quelle est la durée du préavis?".
148
+
149
+ ---
150
+
151
+ ## Evidence Separation In Spoken Form
152
+
153
+ Spoken audio can still respect the Ragmir separation of evidence and inference. Use language cues,
154
+ not formatting:
155
+
156
+ - Proven fact: state plainly. "Le contrat fixe le préavis à trente jours."
157
+ - Inference: mark it. "Cela suggère que…" / "On peut en déduire que…"
158
+ - Uncertainty: mark it. "Ce qu'on ne sait pas encore, c'est…" / "Reste à confirmer…"
159
+ - Missing document: name it. "Il manque le courrier de notification, donc…"
160
+ - Decision / action: mark it. "La décision à prendre est…"
161
+
162
+ This keeps the narration honest without leaning on tables or footnotes that audio cannot carry.