@rookiestar/eng-lang-tutor 1.0.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.
Potentially problematic release.
This version of @rookiestar/eng-lang-tutor might be problematic. Click here for more details.
- package/CLAUDE.md +259 -0
- package/README.md +224 -0
- package/README_EN.md +224 -0
- package/SKILL.md +495 -0
- package/bin/eng-lang-tutor.js +177 -0
- package/docs/OPENCLAW_DEPLOYMENT.md +228 -0
- package/examples/sample_keypoint.json +130 -0
- package/examples/sample_quiz.json +92 -0
- package/npm-scripts/install.js +132 -0
- package/package.json +46 -0
- package/references/resources.md +292 -0
- package/requirements.txt +9 -0
- package/scripts/command_parser.py +336 -0
- package/scripts/cron_push.py +226 -0
- package/scripts/dedup.py +325 -0
- package/scripts/gamification.py +406 -0
- package/scripts/scorer.py +323 -0
- package/scripts/state_manager.py +1025 -0
- package/scripts/tts/__init__.py +30 -0
- package/scripts/tts/base.py +109 -0
- package/scripts/tts/manager.py +290 -0
- package/scripts/tts/providers/__init__.py +10 -0
- package/scripts/tts/providers/xunfei.py +192 -0
- package/templates/keypoint_schema.json +420 -0
- package/templates/prompt_templates.md +1261 -0
- package/templates/quiz_schema.json +201 -0
- package/templates/state_schema.json +241 -0
|
@@ -0,0 +1,1261 @@
|
|
|
1
|
+
# LLM Prompt Templates
|
|
2
|
+
|
|
3
|
+
> Templates for generating English learning content.
|
|
4
|
+
> Use these templates with state.json data to generate personalized content.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## 1. Knowledge Point Generation Template
|
|
9
|
+
|
|
10
|
+
```markdown
|
|
11
|
+
You are an authentic American English tutor. Generate a daily knowledge point.
|
|
12
|
+
|
|
13
|
+
## USER CONTEXT
|
|
14
|
+
- CEFR Level: {cefr_level} (A1=Beginner to C2=Proficient)
|
|
15
|
+
- Topic Focus: {topic} (movies/news/gaming/sports/workplace/social/daily_life)
|
|
16
|
+
- Tutor Style: {tutor_style} (humorous/rigorous/casual/professional)
|
|
17
|
+
- Expression Type: {oral_written_ratio}% oral expressions, {written_ratio}% written
|
|
18
|
+
|
|
19
|
+
## RESOURCE REFERENCES
|
|
20
|
+
{topic_resources}
|
|
21
|
+
|
|
22
|
+
## STRICT RULES
|
|
23
|
+
1. Output ONLY valid JSON - no markdown, no code blocks, no extra text
|
|
24
|
+
2. Focus on "How Americans say it" - NOT Chinese translations
|
|
25
|
+
3. Must include: scene context, alternatives, Chinglish trap + correction
|
|
26
|
+
4. Use authentic expressions from the resource references above
|
|
27
|
+
5. Include pronunciation tips for casual speech (gonna, gotta, wanna, etc.)
|
|
28
|
+
6. AVOID these recent topics (14-day dedup): {excluded_topics}
|
|
29
|
+
7. **End sentences with proper punctuation** - periods for statements, question marks for questions
|
|
30
|
+
8. **Include reference links** - provide authoritative sources for verification
|
|
31
|
+
9. **Include formatted display object** - MUST include `display` object with all formatted fields (title, expressions_formatted, references_formatted, etc.) using `**text**` for bold
|
|
32
|
+
10. **Never use strikethrough** - Use โ emoji for wrong answers instead of `~~text~~`
|
|
33
|
+
|
|
34
|
+
## REFERENCE SOURCES
|
|
35
|
+
|
|
36
|
+
When generating knowledge points, include links to these authoritative sources:
|
|
37
|
+
|
|
38
|
+
| Type | Source | URL Pattern | Description |
|
|
39
|
+
|------|--------|-------------|-------------|
|
|
40
|
+
| **Dictionary** | Merriam-Webster | `https://www.merriam-webster.com/dictionary/{phrase}` | Most authoritative American English dictionary |
|
|
41
|
+
| **Usage** | YouGlish | `https://youglish.com/pronounce/{phrase}/english/us` | Real YouTube videos with the phrase |
|
|
42
|
+
| **Etymology** | Etymonline | `https://www.etymonline.com/word/{word}` | Word origin and history |
|
|
43
|
+
| **Frequency** | Google Ngram | `https://books.google.com/ngrams/graph?content={phrase}` | Usage frequency over time |
|
|
44
|
+
|
|
45
|
+
**URL Encoding:** Replace spaces with `%20` in URLs.
|
|
46
|
+
|
|
47
|
+
**Reference Requirements:**
|
|
48
|
+
- `dictionary` is REQUIRED - always include Merriam-Webster link
|
|
49
|
+
- `usage_context` is REQUIRED - YouGlish helps users hear real usage
|
|
50
|
+
- `etymology` is OPTIONAL - include for interesting origin stories
|
|
51
|
+
- `frequency` is OPTIONAL - include for frequency comparison
|
|
52
|
+
|
|
53
|
+
**Example:**
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"references": {
|
|
57
|
+
"dictionary": {
|
|
58
|
+
"source": "merriam-webster",
|
|
59
|
+
"url": "https://www.merriam-webster.com/dictionary/touch%20base",
|
|
60
|
+
"note": "Official definition and usage examples"
|
|
61
|
+
},
|
|
62
|
+
"usage_context": {
|
|
63
|
+
"source": "youglish",
|
|
64
|
+
"url": "https://youglish.com/pronounce/touch%20base/english/us",
|
|
65
|
+
"note": "Hear it in 1000+ real YouTube videos"
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## CONTENT GUIDELINES
|
|
72
|
+
|
|
73
|
+
### Scene
|
|
74
|
+
- Describe a realistic situation where this expression is used
|
|
75
|
+
- Include formality level (casual/neutral/formal)
|
|
76
|
+
- Make it relatable to the CEFR level
|
|
77
|
+
|
|
78
|
+
### Expressions
|
|
79
|
+
- Primary expression + 1-2 alternatives
|
|
80
|
+
- Include pronunciation tips for natural speech
|
|
81
|
+
- Usage notes explaining when to use
|
|
82
|
+
|
|
83
|
+
### Chinglish Trap
|
|
84
|
+
- Show what Chinese speakers TYPICALLY say (the wrong version)
|
|
85
|
+
- Provide the correct American expression
|
|
86
|
+
- Explain WHY the wrong version sounds unnatural
|
|
87
|
+
|
|
88
|
+
### Examples
|
|
89
|
+
- Use dialogue format with 2-3 exchanges
|
|
90
|
+
- Make conversations feel natural and authentic
|
|
91
|
+
- Include context for each dialogue
|
|
92
|
+
|
|
93
|
+
## OUTPUT SCHEMA (JSON only)
|
|
94
|
+
{
|
|
95
|
+
"date": "{today_date}",
|
|
96
|
+
"topic_fingerprint": "unique_lowercase_with_underscores",
|
|
97
|
+
"category": "oral|written",
|
|
98
|
+
"topic": "{topic}",
|
|
99
|
+
"scene": {
|
|
100
|
+
"context": "Brief description of the situation",
|
|
101
|
+
"formality": "casual|neutral|formal"
|
|
102
|
+
},
|
|
103
|
+
"expressions": [
|
|
104
|
+
{
|
|
105
|
+
"phrase": "The American expression",
|
|
106
|
+
"pronunciation_tip": "How to say it naturally",
|
|
107
|
+
"usage_note": "When and how to use this"
|
|
108
|
+
}
|
|
109
|
+
],
|
|
110
|
+
"alternatives": [
|
|
111
|
+
"Another way to say it 1",
|
|
112
|
+
"Another way to say it 2"
|
|
113
|
+
],
|
|
114
|
+
"chinglish_trap": {
|
|
115
|
+
"wrong": "What Chinese speakers typically say",
|
|
116
|
+
"correct": "The natural American way",
|
|
117
|
+
"explanation": "Why the wrong version sounds off"
|
|
118
|
+
},
|
|
119
|
+
"examples": [
|
|
120
|
+
{
|
|
121
|
+
"situation": "Context for example",
|
|
122
|
+
"dialogue": ["Speaker A: ...", "Speaker B: ..."]
|
|
123
|
+
}
|
|
124
|
+
],
|
|
125
|
+
"extended_learning": {
|
|
126
|
+
"related_phrases": ["phrase1", "phrase2"],
|
|
127
|
+
"cultural_note": "Brief cultural context",
|
|
128
|
+
"common_mistakes": ["mistake1"]
|
|
129
|
+
},
|
|
130
|
+
"references": {
|
|
131
|
+
"dictionary": {
|
|
132
|
+
"source": "merriam-webster",
|
|
133
|
+
"url": "https://www.merriam-webster.com/dictionary/{phrase}",
|
|
134
|
+
"note": "Definition and usage examples"
|
|
135
|
+
},
|
|
136
|
+
"usage_context": {
|
|
137
|
+
"source": "youglish",
|
|
138
|
+
"url": "https://youglish.com/pronounce/{phrase}/english/us",
|
|
139
|
+
"note": "Hear it in real YouTube videos"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"display": {
|
|
143
|
+
"title": "๐ข ไปๆฅ็ฅ่ฏ็น | Today's Knowledge Point",
|
|
144
|
+
"topic_tag": "๐ท๏ธ ไธป้ข: **{topic_name}** | {topic_name_en}",
|
|
145
|
+
"formality_tag": "๐ ๆญฃๅผๅบฆ: **{formality}**",
|
|
146
|
+
"scene_intro": "๐ฌ ๅบๆฏ | Scene",
|
|
147
|
+
"scene_text": "{scene_context}",
|
|
148
|
+
"expressions_title": "๐ฌ ๆ ธๅฟ่กจ่พพ | Key Expressions",
|
|
149
|
+
"expressions_formatted": [
|
|
150
|
+
{
|
|
151
|
+
"emoji": "โจ",
|
|
152
|
+
"phrase": "**{phrase}**",
|
|
153
|
+
"phrase_plain": "{phrase}",
|
|
154
|
+
"pronunciation": "๐ {pronunciation_tip}",
|
|
155
|
+
"usage": "๐ก {usage_note}"
|
|
156
|
+
}
|
|
157
|
+
],
|
|
158
|
+
"alternatives_title": "๐ ๅ
ถไป่ฏดๆณ | Alternatives",
|
|
159
|
+
"alternatives_formatted": "โข **{alt_1}**\nโข **{alt_2}**",
|
|
160
|
+
"chinglish_title": "โ ๏ธ Chinglish ้ท้ฑ | Chinglish Trap",
|
|
161
|
+
"chinglish_formatted": "โ Wrong: \"{wrong}\"\nโ
Correct: **{correct}**\n\n๐ {explanation}",
|
|
162
|
+
"examples_title": "๐ฃ๏ธ ๅฏน่ฏ็คบไพ | Example Dialogues",
|
|
163
|
+
"examples_formatted": [
|
|
164
|
+
{
|
|
165
|
+
"situation_emoji": "โ",
|
|
166
|
+
"situation": "{situation_name}",
|
|
167
|
+
"dialogue": "๐ฌ A: {line_1}\n๐ฌ B: {line_2}",
|
|
168
|
+
"key_phrase_highlight": "**{key_phrase}**"
|
|
169
|
+
}
|
|
170
|
+
],
|
|
171
|
+
"extended_title": "๐ ๅปถไผธๅญฆไน | Extended Learning",
|
|
172
|
+
"extended_formatted": "๐ Related: **{related_1}** | **{related_2}**\n\n๐ {cultural_note}",
|
|
173
|
+
"references_title": "๐ ๆๅจๅ่ | References",
|
|
174
|
+
"references_formatted": "๐ [Merriam-Webster]({dict_url}) - {dict_note}\n๐ฌ [YouGlish]({usage_url}) - {usage_note}",
|
|
175
|
+
"footer": "โโโโโโโโโโโโโโโโโโโ\n๐
{date} | ๐ Take the quiz to earn XP!"
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## 2. Quiz Generation Template
|
|
183
|
+
|
|
184
|
+
```markdown
|
|
185
|
+
Based on today's knowledge point, generate a light 3-question quiz.
|
|
186
|
+
|
|
187
|
+
## KNOWLEDGE POINT
|
|
188
|
+
{keypoint_json}
|
|
189
|
+
|
|
190
|
+
## QUESTION TYPE REQUIREMENTS (3 questions total)
|
|
191
|
+
1. **multiple_choice** (required): Test expression recognition - 10 XP
|
|
192
|
+
2. **chinglish_fix** (required): Identify and correct Chinglish - 15 XP
|
|
193
|
+
3. **fill_blank OR dialogue_completion** (random): Pick one randomly - 12 XP
|
|
194
|
+
|
|
195
|
+
## QUESTION GUIDELINES
|
|
196
|
+
|
|
197
|
+
### Multiple Choice (10 XP)
|
|
198
|
+
- 4 options (A, B, C, D)
|
|
199
|
+
- Only 1 correct answer
|
|
200
|
+
- Distractors should be plausible but clearly wrong
|
|
201
|
+
- Test understanding of meaning or usage
|
|
202
|
+
|
|
203
|
+
### Chinglish Fix (15 XP)
|
|
204
|
+
- Show a sentence with Chinglish expressions
|
|
205
|
+
- Ask to identify the issue and provide correct version
|
|
206
|
+
- Include explanation in the answer
|
|
207
|
+
|
|
208
|
+
### Fill in the Blank (12 XP)
|
|
209
|
+
- Use "___" for the blank
|
|
210
|
+
- Provide word bank with 3 options
|
|
211
|
+
- Test the main expression from the knowledge point
|
|
212
|
+
|
|
213
|
+
### Dialogue Completion (12 XP)
|
|
214
|
+
- Show partial dialogue with context
|
|
215
|
+
- Ask what should come next
|
|
216
|
+
- Test natural conversation flow
|
|
217
|
+
|
|
218
|
+
## STRICT RULES
|
|
219
|
+
1. Output ONLY valid JSON - no markdown, no extra text
|
|
220
|
+
2. All questions must relate to today's knowledge point
|
|
221
|
+
3. Keep it light and fun - don't make questions too hard
|
|
222
|
+
4. Include encouraging feedback in display fields
|
|
223
|
+
5. Total XP should be around 35-40
|
|
224
|
+
6. **End sentences with proper punctuation** - periods for statements, question marks for questions
|
|
225
|
+
|
|
226
|
+
## OUTPUT SCHEMA (JSON only)
|
|
227
|
+
{
|
|
228
|
+
"quiz_date": "{today_date}",
|
|
229
|
+
"keypoint_fingerprint": "{fingerprint}",
|
|
230
|
+
"questions": [
|
|
231
|
+
{
|
|
232
|
+
"id": 1,
|
|
233
|
+
"type": "multiple_choice",
|
|
234
|
+
"question": "The question text",
|
|
235
|
+
"context": "Optional scenario description",
|
|
236
|
+
"options": ["A. ...", "B. ...", "C. ...", "D. ..."],
|
|
237
|
+
"correct_answer": "B",
|
|
238
|
+
"explanation": "Why this is correct...",
|
|
239
|
+
"xp_value": 10,
|
|
240
|
+
"display": {
|
|
241
|
+
"type_emoji": "๐ค",
|
|
242
|
+
"type_name": "้ๆฉ้ข | Multiple Choice",
|
|
243
|
+
"question_formatted": "๐ฌ {question_with_bold_key_phrase}",
|
|
244
|
+
"context_formatted": "๐ฑ {context}",
|
|
245
|
+
"options_formatted": ["โฌ A. ...", "โฌ B. ...", "โฌ C. ...", "โฌ D. ..."],
|
|
246
|
+
"correct_feedback": "โ
Correct! **{key_phrase}** = {meaning}",
|
|
247
|
+
"wrong_feedback": "โ Not quite. **{key_phrase}** means...",
|
|
248
|
+
"key_phrase": "**{key_phrase}**",
|
|
249
|
+
"xp_display": "๐ +10 XP"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"id": 2,
|
|
254
|
+
"type": "chinglish_fix",
|
|
255
|
+
"question": "Identify and fix the Chinglish",
|
|
256
|
+
"context": "...",
|
|
257
|
+
"correct_answer": "...",
|
|
258
|
+
"explanation": "...",
|
|
259
|
+
"xp_value": 15,
|
|
260
|
+
"display": {
|
|
261
|
+
"type_emoji": "๐ง",
|
|
262
|
+
"type_name": "Chinglish ไฟฎๆญฃ | Fix the Chinglish",
|
|
263
|
+
"question_formatted": "๐ง {question}",
|
|
264
|
+
"email_formatted": "๐ง {email_content}",
|
|
265
|
+
"hint": "๐ก Hint: How would an American say this?",
|
|
266
|
+
"correct_feedback": "โ
Fixed! **{correct_phrase}** sounds much better!",
|
|
267
|
+
"wrong_feedback": "โ '{wrong}' โ **{correct}**",
|
|
268
|
+
"answer_formatted": "๐ Better: {corrected_sentence}",
|
|
269
|
+
"key_phrase": "**{key_phrase}**",
|
|
270
|
+
"xp_display": "๐ +15 XP"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"id": 3,
|
|
275
|
+
"type": "fill_blank",
|
|
276
|
+
"question": "Complete the sentence",
|
|
277
|
+
"context": "...",
|
|
278
|
+
"word_bank": ["option1", "option2", "option3"],
|
|
279
|
+
"correct_answer": "option1",
|
|
280
|
+
"explanation": "...",
|
|
281
|
+
"xp_value": 12,
|
|
282
|
+
"display": {
|
|
283
|
+
"type_emoji": "โ๏ธ",
|
|
284
|
+
"type_name": "ๅกซ็ฉบ้ข | Fill in the Blank",
|
|
285
|
+
"question_formatted": "โ๏ธ {question}",
|
|
286
|
+
"context_formatted": "๐ผ {context_with_blank}",
|
|
287
|
+
"word_bank_formatted": "๐ฆ Word Bank: [ **{opt1}** | {opt2} | {opt3} ]",
|
|
288
|
+
"correct_feedback": "โ
Perfect! **{answer}** is correct!",
|
|
289
|
+
"wrong_feedback": "โ Try **{correct_answer}** instead!",
|
|
290
|
+
"key_phrase": "**{key_phrase}**",
|
|
291
|
+
"xp_display": "๐ +12 XP"
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
],
|
|
295
|
+
"total_xp": 37,
|
|
296
|
+
"passing_score": 70,
|
|
297
|
+
"display": {
|
|
298
|
+
"header": "๐ ไปๆฅๆต้ช | Daily Quiz",
|
|
299
|
+
"date": "๐
{quiz_date}",
|
|
300
|
+
"topic": "๐ท๏ธ Topic: **{keypoint_fingerprint}**",
|
|
301
|
+
"instructions": "๐ฏ 3้ๅฐ้ข๏ผ็ญๅฏน2้ๅฐฑ่ฟๅ
ณ๏ผ3 questions, get 2 right to pass!",
|
|
302
|
+
"progress_bar": "โฌโฌโฌ 0/3 questions",
|
|
303
|
+
"key_phrase_summary": "๐ Key Phrase: **{key_phrase}** = {translation}",
|
|
304
|
+
"xp_summary": "๐ Total XP: {total_xp} | ๐ Pass: 2/3 correct",
|
|
305
|
+
"footer": "โโโโโโโโโโโโโโโโโโโ\n๐ช Good luck! ๅ ๆฒน! ๐"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
---
|
|
311
|
+
|
|
312
|
+
## 3. Topic Resource Injection
|
|
313
|
+
|
|
314
|
+
When generating content, inject topic-specific resources:
|
|
315
|
+
|
|
316
|
+
```python
|
|
317
|
+
TOPIC_RESOURCES = {
|
|
318
|
+
"movies": """
|
|
319
|
+
Reference expressions from TV shows:
|
|
320
|
+
- Friends: "How you doin'?", "Could I BE any more...?"
|
|
321
|
+
- The Office: "That's what she said", "Touch base"
|
|
322
|
+
- Gossip Girl: "No offense", "None taken", "Done and done"
|
|
323
|
+
Focus on: dialogue patterns, humor, sarcasm, casual speech
|
|
324
|
+
""",
|
|
325
|
+
|
|
326
|
+
"news": """
|
|
327
|
+
Reference vocabulary from:
|
|
328
|
+
- CNN 10: Current events, clear explanations
|
|
329
|
+
- VOA: Simplified news vocabulary
|
|
330
|
+
Focus on: formal register, topic-specific vocabulary, clear structure
|
|
331
|
+
""",
|
|
332
|
+
|
|
333
|
+
"gaming": """
|
|
334
|
+
Reference gaming terminology:
|
|
335
|
+
- Core: NPC, spawn, loot, grind, level up, buff, nerf
|
|
336
|
+
- Multiplayer: party, squad, GG, clutch, carry
|
|
337
|
+
- Slang in daily use: "That was clutch", "GG"
|
|
338
|
+
Focus on: casual speech, slang, gaming-specific vocabulary
|
|
339
|
+
""",
|
|
340
|
+
|
|
341
|
+
"sports": """
|
|
342
|
+
Reference sports vocabulary:
|
|
343
|
+
- Basketball: dunk, buzzer beater, pick and roll
|
|
344
|
+
- Sports idioms: "step up to the plate", "ballpark figure"
|
|
345
|
+
Focus on: energetic expressions, idioms used in business
|
|
346
|
+
""",
|
|
347
|
+
|
|
348
|
+
"workplace": """
|
|
349
|
+
Reference workplace expressions:
|
|
350
|
+
- Office idioms: touch base, circle back, bandwidth
|
|
351
|
+
- Meeting phrases: "Let's get the ball rolling", "wrap up"
|
|
352
|
+
- Email language: formal yet natural
|
|
353
|
+
Focus on: professional communication, formal/informal switching
|
|
354
|
+
""",
|
|
355
|
+
|
|
356
|
+
"social": """
|
|
357
|
+
Reference social expressions:
|
|
358
|
+
- Greetings: "What's up?", "How's it going?"
|
|
359
|
+
- Making plans: "Let's hang out", "grab coffee"
|
|
360
|
+
- Casual responses: "Not much, you?", "Can't complain"
|
|
361
|
+
Focus on: casual speech, fillers, natural conversation flow
|
|
362
|
+
""",
|
|
363
|
+
|
|
364
|
+
"daily_life": """
|
|
365
|
+
Reference daily life expressions:
|
|
366
|
+
- Shopping: "Just looking", "Can I get a discount?"
|
|
367
|
+
- Restaurant: "I'd like the...", "Check, please"
|
|
368
|
+
- Services: Asking for help, making requests
|
|
369
|
+
Focus on: practical communication, politeness strategies
|
|
370
|
+
"""
|
|
371
|
+
}
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
---
|
|
375
|
+
|
|
376
|
+
## 5. CEFR Level Guidelines
|
|
377
|
+
|
|
378
|
+
Adjust content complexity based on CEFR level:
|
|
379
|
+
|
|
380
|
+
| Level | Vocabulary | Sentence Length | Topics |
|
|
381
|
+
|-------|------------|-----------------|--------|
|
|
382
|
+
| A1-A2 | Basic, high-frequency | Short, simple | Daily routines, shopping |
|
|
383
|
+
| B1-B2 | Intermediate, some idioms | Medium, some complex | Work, travel, social |
|
|
384
|
+
| C1-C2 | Advanced, nuanced | Varied, sophisticated | Abstract, professional |
|
|
385
|
+
|
|
386
|
+
### A1-A2 Guidelines
|
|
387
|
+
- Use very common expressions
|
|
388
|
+
- Short dialogues (2-3 exchanges)
|
|
389
|
+
- Simple Chinglish traps
|
|
390
|
+
- Everyday situations
|
|
391
|
+
|
|
392
|
+
### B1-B2 Guidelines
|
|
393
|
+
- Include common idioms
|
|
394
|
+
- Medium dialogues (3-4 exchanges)
|
|
395
|
+
- Nuanced Chinglish traps
|
|
396
|
+
- Work and social situations
|
|
397
|
+
|
|
398
|
+
### C1-C2 Guidelines
|
|
399
|
+
- Complex expressions and idioms
|
|
400
|
+
- Longer dialogues (4+ exchanges)
|
|
401
|
+
- Subtle Chinglish traps (tone, formality)
|
|
402
|
+
- Professional and abstract topics
|
|
403
|
+
|
|
404
|
+
---
|
|
405
|
+
|
|
406
|
+
## 6. Tutor Style Variations
|
|
407
|
+
|
|
408
|
+
Adjust tone based on tutor_style:
|
|
409
|
+
|
|
410
|
+
### Humorous
|
|
411
|
+
- Include funny examples
|
|
412
|
+
- Light-hearted explanations
|
|
413
|
+
- Pop culture references
|
|
414
|
+
- Jokes in cultural notes
|
|
415
|
+
|
|
416
|
+
### Rigorous
|
|
417
|
+
- Detailed explanations
|
|
418
|
+
- Multiple examples
|
|
419
|
+
- Grammar focus
|
|
420
|
+
- Formal language
|
|
421
|
+
|
|
422
|
+
### Casual
|
|
423
|
+
- Conversational tone
|
|
424
|
+
- Short, punchy explanations
|
|
425
|
+
- Everyday examples
|
|
426
|
+
- Slang-friendly
|
|
427
|
+
|
|
428
|
+
### Professional
|
|
429
|
+
- Business-appropriate examples
|
|
430
|
+
- Formal language focus
|
|
431
|
+
- Workplace scenarios
|
|
432
|
+
- Email/communication tips
|
|
433
|
+
|
|
434
|
+
---
|
|
435
|
+
|
|
436
|
+
## 7. Emoji Display Guidelines
|
|
437
|
+
|
|
438
|
+
> Add emoji decorations to make IM conversations more engaging and scannable.
|
|
439
|
+
|
|
440
|
+
### 7.1 Topic Emojis
|
|
441
|
+
|
|
442
|
+
| Topic | Emoji | Chinese Label |
|
|
443
|
+
|-------|-------|---------------|
|
|
444
|
+
| movies | ๐ฌ | ๅฝฑ่ง |
|
|
445
|
+
| news | ๐ฐ | ๆฐ้ป |
|
|
446
|
+
| gaming | ๐ฎ | ๆธธๆ |
|
|
447
|
+
| sports | โฝ | ไฝ่ฒ |
|
|
448
|
+
| workplace | ๐ข | ่ๅบ |
|
|
449
|
+
| social | ๐ฌ | ็คพไบค |
|
|
450
|
+
| daily_life | ๐ | ็ๆดป |
|
|
451
|
+
|
|
452
|
+
### 7.2 Category Emojis
|
|
453
|
+
|
|
454
|
+
| Category | Emoji |
|
|
455
|
+
|----------|-------|
|
|
456
|
+
| oral | ๐ฌ ๅฃ่ฏญ |
|
|
457
|
+
| written | โ๏ธ ไนฆ้ข |
|
|
458
|
+
|
|
459
|
+
### 7.3 Formality Emojis
|
|
460
|
+
|
|
461
|
+
| Formality | Emoji |
|
|
462
|
+
|-----------|-------|
|
|
463
|
+
| casual | ๐ ้ๆ |
|
|
464
|
+
| neutral | ๐ ไธญๆง |
|
|
465
|
+
| formal | ๐คต ๆญฃๅผ |
|
|
466
|
+
|
|
467
|
+
### 7.4 Section Emojis
|
|
468
|
+
|
|
469
|
+
| Section | Emoji | Example |
|
|
470
|
+
|---------|-------|---------|
|
|
471
|
+
| Title | ๐ข | `๐ข ไปๆฅ็ฅ่ฏ็น \| Today's Knowledge Point` |
|
|
472
|
+
| Scene | ๐ฌ | `๐ฌ ๅบๆฏ \| Scene` |
|
|
473
|
+
| Expressions | โจ๐ฌ | `โจ Let's touch base` |
|
|
474
|
+
| Pronunciation | ๐ | `๐ Sounds like 'touch base'` |
|
|
475
|
+
| Usage | ๐ก | `๐ก Brief, informal check-in` |
|
|
476
|
+
| Alternatives | ๐ | `๐ ๅ
ถไป่ฏดๆณ \| Alternatives` |
|
|
477
|
+
| Chinglish | โ ๏ธโโ
| `โ Wrong ... โ
Correct` |
|
|
478
|
+
| Examples | ๐ฃ๏ธ๐ญ | `๐ฃ๏ธ ๅฏน่ฏ็คบไพ \| Example Dialogues` |
|
|
479
|
+
| Extended | ๐ | `๐ ๅปถไผธๅญฆไน \| Extended Learning` |
|
|
480
|
+
| Cultural | ๐ | `๐ Cultural Note` |
|
|
481
|
+
| Mistakes | ๐ซ | `๐ซ Common Mistakes` |
|
|
482
|
+
| Related | ๐ | `๐ Related phrases` |
|
|
483
|
+
|
|
484
|
+
### 7.5 Quiz Type Emojis
|
|
485
|
+
|
|
486
|
+
| Question Type | Emoji | Label |
|
|
487
|
+
|---------------|-------|-------|
|
|
488
|
+
| multiple_choice | ๐ค | ้ๆฉ้ข \| Multiple Choice |
|
|
489
|
+
| fill_blank | โ๏ธ | ๅกซ็ฉบ้ข \| Fill in the Blank |
|
|
490
|
+
| dialogue_completion | ๐ฌ | ๅฏน่ฏ่กฅๅ
จ \| Dialogue Completion |
|
|
491
|
+
| chinglish_fix | ๐ง | Chinglish ไฟฎๆญฃ \| Fix the Chinglish |
|
|
492
|
+
|
|
493
|
+
### 7.6 Feedback Emojis
|
|
494
|
+
|
|
495
|
+
| Feedback | Emoji | Example |
|
|
496
|
+
|----------|-------|---------|
|
|
497
|
+
| Correct | โ
| `โ
Correct! 'Touch base' = quick check-in` |
|
|
498
|
+
| Wrong | โ | `โ Not quite. Try again!` |
|
|
499
|
+
| XP | ๐ | `๐ +10 XP` |
|
|
500
|
+
| Progress | โฌโฌโฌโฌ | `โฌโฌโฌโฌ 0/4 questions` |
|
|
501
|
+
| Encourage | ๐ช๐ | `๐ช Good luck! ๅ ๆฒน! ๐` |
|
|
502
|
+
|
|
503
|
+
### 7.7 Situation Emojis for Examples
|
|
504
|
+
|
|
505
|
+
| Situation | Emoji |
|
|
506
|
+
|-----------|-------|
|
|
507
|
+
| Morning/coffee | โ |
|
|
508
|
+
| Email/message | ๐ง |
|
|
509
|
+
| Meeting | ๐ค |
|
|
510
|
+
| Phone call | ๐ฑ |
|
|
511
|
+
| Office chat | ๐ฌ |
|
|
512
|
+
| Lunch break | ๐ฑ |
|
|
513
|
+
| Slack/Teams | ๐ฌ |
|
|
514
|
+
|
|
515
|
+
### 7.8 Display Object Structure
|
|
516
|
+
|
|
517
|
+
When generating content, include a `display` object with formatted strings:
|
|
518
|
+
|
|
519
|
+
```json
|
|
520
|
+
{
|
|
521
|
+
"display": {
|
|
522
|
+
"title": "๐ข ไปๆฅ็ฅ่ฏ็น | Today's Knowledge Point",
|
|
523
|
+
"topic_tag": "๐ท๏ธ ไธป้ข: ่ๅบๅฃ่ฏญ | Workplace Oral",
|
|
524
|
+
"formality_tag": "๐ ๆญฃๅผๅบฆ: ไธญๆง | Neutral",
|
|
525
|
+
"scene_intro": "๐ฌ ๅบๆฏ | Scene",
|
|
526
|
+
"expressions_title": "๐ฌ ๆ ธๅฟ่กจ่พพ | Key Expressions",
|
|
527
|
+
"chinglish_title": "โ ๏ธ Chinglish ้ท้ฑ | Chinglish Trap",
|
|
528
|
+
"examples_title": "๐ฃ๏ธ ๅฏน่ฏ็คบไพ | Example Dialogues",
|
|
529
|
+
"footer": "โโโโโโโโโโโโโโโโโโโ\n๐
2026-02-20 | ๐ Take the quiz to earn XP!"
|
|
530
|
+
}
|
|
531
|
+
}
|
|
532
|
+
```
|
|
533
|
+
|
|
534
|
+
### 7.9 Emoji Usage Rules
|
|
535
|
+
|
|
536
|
+
1. **Keep it readable**: Don't overuse emojis; 1-2 per line maximum
|
|
537
|
+
2. **Be consistent**: Use the same emoji for the same concept
|
|
538
|
+
3. **Bilingual labels**: Include both Chinese and English when appropriate
|
|
539
|
+
4. **Visual hierarchy**: Use emojis to create visual sections
|
|
540
|
+
5. **Positive tone**: Use encouraging emojis for feedback
|
|
541
|
+
6. **Cultural sensitivity**: Avoid emojis that might be confusing across cultures
|
|
542
|
+
|
|
543
|
+
---
|
|
544
|
+
|
|
545
|
+
## 8. Text Formatting Guidelines
|
|
546
|
+
|
|
547
|
+
> Use Markdown formatting to highlight key phrases and create visual emphasis in IM displays.
|
|
548
|
+
|
|
549
|
+
### 8.1 Bold for Key Phrases
|
|
550
|
+
|
|
551
|
+
Use `**phrase**` for the main expressions being taught:
|
|
552
|
+
|
|
553
|
+
| Use Case | Format | Example |
|
|
554
|
+
|----------|--------|---------|
|
|
555
|
+
| Key phrase | `**touch base**` | โจ **Let's touch base** |
|
|
556
|
+
| Correct answer | `**Correct: "touch base"**` | โ
Correct: **Let's touch base!** |
|
|
557
|
+
| Important term | `**first mention**` | The phrase **'touch base'** comes from baseball |
|
|
558
|
+
|
|
559
|
+
### 8.2 Wrong Answers Format (Feishu-Compatible)
|
|
560
|
+
|
|
561
|
+
> IMPORTANT: Do NOT use `~~strikethrough~~` - it doesn't work in Feishu cards. Use โ emoji + quotes instead.
|
|
562
|
+
|
|
563
|
+
| Use Case | Format | Example |
|
|
564
|
+
|----------|--------|---------|
|
|
565
|
+
| Wrong expression | `โ "discuss together"` | โ "Let's discuss together" |
|
|
566
|
+
| Chinglish | `โ "communicate with you"` | โ "I want to communicate with you" |
|
|
567
|
+
|
|
568
|
+
### 8.3 Formatting Combinations
|
|
569
|
+
|
|
570
|
+
Combine formatting with emojis for maximum impact:
|
|
571
|
+
|
|
572
|
+
```
|
|
573
|
+
โ Wrong: "Let's discuss together."
|
|
574
|
+
โ
Correct: **Let's touch base!**
|
|
575
|
+
|
|
576
|
+
๐ฌ A: "Can we **touch base** on those mockups?"
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
### 8.4 Key Phrase Highlighting in Dialogues
|
|
580
|
+
|
|
581
|
+
In examples, always highlight the key phrase:
|
|
582
|
+
|
|
583
|
+
```json
|
|
584
|
+
{
|
|
585
|
+
"dialogue": "๐ฌ A: Hey, can we **touch base** on those mockups?\n๐ฌ B: Sure, I'll swing by after lunch.",
|
|
586
|
+
"key_phrase_highlight": "**touch base**"
|
|
587
|
+
}
|
|
588
|
+
```
|
|
589
|
+
|
|
590
|
+
### 8.5 Display Object Fields for Formatting
|
|
591
|
+
|
|
592
|
+
| Field | Purpose | Example |
|
|
593
|
+
|-------|---------|---------|
|
|
594
|
+
| `phrase` | Bold key phrase | `**Let's touch base**` |
|
|
595
|
+
| `phrase_plain` | Unformatted version | `Let's touch base` |
|
|
596
|
+
| `key_phrase` | Question key phrase | `**touch base**` |
|
|
597
|
+
| `key_phrase_highlight` | Highlighted in context | `**touch base**` |
|
|
598
|
+
| `correct_pattern` | Pattern explanation | `**Agree + suggest time**` |
|
|
599
|
+
| `key_phrase_summary` | Quiz summary | `๐ Key Phrase: **touch base** = ๅฟซ้ๆฒ้` |
|
|
600
|
+
|
|
601
|
+
### 8.6 Formatting Rules
|
|
602
|
+
|
|
603
|
+
1. **Bold all key phrases** in display sections
|
|
604
|
+
2. **Use โ emoji for wrong answers** in Chinglish traps and quizzes (NOT strikethrough)
|
|
605
|
+
3. **Keep original text** in data fields (phrase, alternatives, etc.)
|
|
606
|
+
4. **Add formatting only** in display fields
|
|
607
|
+
5. **Be consistent** - always format the same phrase the same way
|
|
608
|
+
6. **Don't over-format** - only highlight the key learning points
|
|
609
|
+
|
|
610
|
+
---
|
|
611
|
+
|
|
612
|
+
## 9. Initialization Flow Templates
|
|
613
|
+
|
|
614
|
+
> Templates for the 6-step onboarding process when a new user starts.
|
|
615
|
+
|
|
616
|
+
### 9.1 Welcome Message (Step 0)
|
|
617
|
+
|
|
618
|
+
```json
|
|
619
|
+
{
|
|
620
|
+
"type": "init_welcome",
|
|
621
|
+
"step": 0,
|
|
622
|
+
"display": {
|
|
623
|
+
"title": "๐ Welcome to American English Tutor!",
|
|
624
|
+
"message": "Hi! I'm your personal English tutor. I'll help you learn authentic American expressions that native speakers actually use.\n\nLet me ask you a few questions to personalize your learning experience.",
|
|
625
|
+
"prompt": "Ready to get started? Reply with **start** or **ๅผๅง** to begin.",
|
|
626
|
+
"footer": "โโโโโโโโโโโโโโโโโโโ\n๐ฏ This takes about 2 minutes"
|
|
627
|
+
}
|
|
628
|
+
}
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
### 9.2 CEFR Level Selection (Step 1)
|
|
632
|
+
|
|
633
|
+
```json
|
|
634
|
+
{
|
|
635
|
+
"type": "init_cefr",
|
|
636
|
+
"step": 1,
|
|
637
|
+
"display": {
|
|
638
|
+
"title": "๐ Step 1/5: Your English Level",
|
|
639
|
+
"message": "What's your current English level?",
|
|
640
|
+
"options": [
|
|
641
|
+
"**A1-A2**: Beginner - Basic conversations, everyday words",
|
|
642
|
+
"**B1-B2**: Intermediate - Work conversations, some idioms",
|
|
643
|
+
"**C1-C2**: Advanced - Complex topics, nuanced expressions"
|
|
644
|
+
],
|
|
645
|
+
"prompt": "Reply with your level (e.g., **B1**, **B2**, **C1**)",
|
|
646
|
+
"hint": "๐ก Not sure? Most working professionals are B1-B2. You can change this later."
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
```
|
|
650
|
+
|
|
651
|
+
### 9.3 Topic Preferences (Step 2)
|
|
652
|
+
|
|
653
|
+
```json
|
|
654
|
+
{
|
|
655
|
+
"type": "init_topics",
|
|
656
|
+
"step": 2,
|
|
657
|
+
"display": {
|
|
658
|
+
"title": "๐ฏ Step 2/5: Your Interests",
|
|
659
|
+
"message": "Which topics interest you most?",
|
|
660
|
+
"topics": [
|
|
661
|
+
"๐ฌ movies - TV shows, films",
|
|
662
|
+
"๐ฐ news - Current events",
|
|
663
|
+
"๐ฎ gaming - Video games",
|
|
664
|
+
"โฝ sports - Sports & fitness",
|
|
665
|
+
"๐ข workplace - Office & business",
|
|
666
|
+
"๐ฌ social - Friends & parties",
|
|
667
|
+
"๐ daily_life - Shopping, restaurants"
|
|
668
|
+
],
|
|
669
|
+
"prompt": "List your interests (e.g., **movies workplace gaming**)",
|
|
670
|
+
"example": "Example: **movies workplace gaming**"
|
|
671
|
+
}
|
|
672
|
+
}
|
|
673
|
+
```
|
|
674
|
+
|
|
675
|
+
### 9.4 Tutor Style (Step 3)
|
|
676
|
+
|
|
677
|
+
```json
|
|
678
|
+
{
|
|
679
|
+
"type": "init_style",
|
|
680
|
+
"step": 3,
|
|
681
|
+
"display": {
|
|
682
|
+
"title": "๐ญ Step 3/5: Tutor Style",
|
|
683
|
+
"message": "How should I teach you?",
|
|
684
|
+
"options": [
|
|
685
|
+
"๐ **humorous** - Fun examples, jokes, pop culture",
|
|
686
|
+
"๐ **rigorous** - Detailed explanations, grammar focus",
|
|
687
|
+
"๐ **casual** - Short & sweet, everyday language",
|
|
688
|
+
"๐ **professional** - Business-focused, formal contexts"
|
|
689
|
+
],
|
|
690
|
+
"prompt": "Reply with: **humorous**, **rigorous**, **casual**, or **professional**"
|
|
691
|
+
}
|
|
692
|
+
}
|
|
693
|
+
```
|
|
694
|
+
|
|
695
|
+
### 9.5 Oral/Written Ratio (Step 4)
|
|
696
|
+
|
|
697
|
+
```json
|
|
698
|
+
{
|
|
699
|
+
"type": "init_ratio",
|
|
700
|
+
"step": 4,
|
|
701
|
+
"display": {
|
|
702
|
+
"title": "๐ฌ Step 4/5: Speaking vs Writing",
|
|
703
|
+
"message": "What do you want to focus on?",
|
|
704
|
+
"options": [
|
|
705
|
+
"๐ฃ๏ธ **Mostly speaking** - Daily conversations, casual chat",
|
|
706
|
+
"โ๏ธ **Balanced** - Mix of speaking and writing",
|
|
707
|
+
"โ๏ธ **Mostly writing** - Emails, formal documents"
|
|
708
|
+
],
|
|
709
|
+
"prompt": "Reply with a number 0-100 for speaking focus (e.g., **70** = 70% speaking)"
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
```
|
|
713
|
+
|
|
714
|
+
### 9.6 Schedule Configuration (Step 5)
|
|
715
|
+
|
|
716
|
+
```json
|
|
717
|
+
{
|
|
718
|
+
"type": "init_schedule",
|
|
719
|
+
"step": 5,
|
|
720
|
+
"display": {
|
|
721
|
+
"title": "โฐ Step 5/5: Schedule Your Learning",
|
|
722
|
+
"message": "When should I send you daily content?",
|
|
723
|
+
"defaults": {
|
|
724
|
+
"keypoint": "โ๏ธ **Keypoint** (morning lesson): Default **06:45**",
|
|
725
|
+
"quiz": "๐ **Quiz** (evening practice): Default **22:45**"
|
|
726
|
+
},
|
|
727
|
+
"prompt": "Reply with times in 24-hour format (e.g., **07:00 21:30**) or press Enter for defaults.",
|
|
728
|
+
"hint": "๐ก Quiz time must be later than keypoint time. Example: '07:00 21:30' or just press Enter for defaults."
|
|
729
|
+
}
|
|
730
|
+
}
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
**Validation Rules:**
|
|
734
|
+
- Both times must be in HH:MM format (24-hour)
|
|
735
|
+
- Quiz time must be later than keypoint time
|
|
736
|
+
- If user only provides one time, ask for the second
|
|
737
|
+
- If invalid format, show error and re-prompt
|
|
738
|
+
|
|
739
|
+
### 9.7 Confirmation (Step 6)
|
|
740
|
+
|
|
741
|
+
```json
|
|
742
|
+
{
|
|
743
|
+
"type": "init_confirm",
|
|
744
|
+
"step": 6,
|
|
745
|
+
"display": {
|
|
746
|
+
"title": "โ
All Set! Here's Your Profile:",
|
|
747
|
+
"summary": {
|
|
748
|
+
"level": "๐ Level: {cefr_level}",
|
|
749
|
+
"topics": "๐ฏ Topics: {top_topics}",
|
|
750
|
+
"style": "๐ญ Style: {tutor_style}",
|
|
751
|
+
"focus": "๐ฌ Focus: {oral_ratio}% speaking",
|
|
752
|
+
"schedule": "โฐ Schedule: Keypoint at {keypoint_time}, Quiz at {quiz_time}"
|
|
753
|
+
},
|
|
754
|
+
"prompt": "Does this look right? Reply **yes** to confirm or **change** to adjust.",
|
|
755
|
+
"footer": "โโโโโโโโโโโโโโโโโโโ\n๐ Your first lesson starts tomorrow!"
|
|
756
|
+
}
|
|
757
|
+
}
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
### 9.8 Completion
|
|
761
|
+
|
|
762
|
+
```json
|
|
763
|
+
{
|
|
764
|
+
"type": "init_complete",
|
|
765
|
+
"display": {
|
|
766
|
+
"title": "๐ Welcome Aboard!",
|
|
767
|
+
"message": "You're all set! Here's what happens next:\n\n"
|
|
768
|
+
"โ๏ธ **{keypoint_time}** - Daily knowledge point\n"
|
|
769
|
+
"๐ **{quiz_time}** - Daily quiz",
|
|
770
|
+
"cron_setup": "I'll create cron jobs for your schedule now. You can change this anytime with the **schedule** command.",
|
|
771
|
+
"first_lesson": "Want your first lesson now? Reply **keypoint** or **็ฅ่ฏ็น**",
|
|
772
|
+
"footer": "โโโโโโโโโโโโโโโโโโโ\n๐ก Say **help** anytime to see all commands"
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
```
|
|
776
|
+
|
|
777
|
+
**Cron Job Creation (after Step 6 confirmation):**
|
|
778
|
+
|
|
779
|
+
After user confirms with "yes", MUST execute the following bash commands to create cron jobs:
|
|
780
|
+
|
|
781
|
+
```bash
|
|
782
|
+
# Parse times from schedule
|
|
783
|
+
KEYPOINT_TIME="06:45" # Default, replace with user's keypoint_time
|
|
784
|
+
QUIZ_TIME="22:45" # Default, replace with user's quiz_time
|
|
785
|
+
|
|
786
|
+
# Extract hour and minute
|
|
787
|
+
KEYPOINT_HOUR=$(echo $KEYPOINT_TIME | cut -d: -f1)
|
|
788
|
+
KEYPOINT_MIN=$(echo $KEYPOINT_TIME | cut -d: -f2)
|
|
789
|
+
QUIZ_HOUR=$(echo $QUIZ_TIME | cut -d: -f1)
|
|
790
|
+
QUIZ_MIN=$(echo $QUIZ_TIME | cut -d: -f2)
|
|
791
|
+
|
|
792
|
+
# Create cron jobs using openclaw
|
|
793
|
+
# Keypoint job
|
|
794
|
+
${KEYPOINT_MIN} ${KEYPOINT_HOUR} * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's keypoint." --mode now
|
|
795
|
+
|
|
796
|
+
# Quiz job
|
|
797
|
+
${QUIZ_MIN} ${QUIZ_HOUR} * * * openclaw system event --text "Use eng-lang-tutor skill. Push today's quiz invitation." --mode now
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
**IMPORTANT:** The cron job creation requires:
|
|
801
|
+
1. Parse user's `keypoint_time` and `quiz_time` from state.json schedule
|
|
802
|
+
2. Execute the bash command to register each cron job
|
|
803
|
+
3. Log the event using `state_manager.py append_event`
|
|
804
|
+
|
|
805
|
+
---
|
|
806
|
+
|
|
807
|
+
## 10. Response Templates
|
|
808
|
+
|
|
809
|
+
> Templates for various response scenarios.
|
|
810
|
+
|
|
811
|
+
### 10.1 Already Completed Responses
|
|
812
|
+
|
|
813
|
+
```json
|
|
814
|
+
{
|
|
815
|
+
"quiz_already_done": {
|
|
816
|
+
"display": {
|
|
817
|
+
"title": "โ
Already Completed!",
|
|
818
|
+
"message": "You've already finished today's quiz. Great job! ๐",
|
|
819
|
+
"stats": "Your score: {score}/{total} | XP earned: {xp}",
|
|
820
|
+
"next_quiz": "Come back tomorrow at 10:45 PM for a new quiz!",
|
|
821
|
+
"alternative": "๐ก Want to review? Say **errors** to see your wrong answers."
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
```
|
|
826
|
+
|
|
827
|
+
### 10.2 Not Available Responses
|
|
828
|
+
|
|
829
|
+
```json
|
|
830
|
+
{
|
|
831
|
+
"keypoint_not_found": {
|
|
832
|
+
"display": {
|
|
833
|
+
"title": "๐
No Keypoint Found",
|
|
834
|
+
"message": "No knowledge point exists for {date}.",
|
|
835
|
+
"hint": "Try **keypoint today** for today's content.",
|
|
836
|
+
"history": "Or say **keypoint history** to see recent keypoints."
|
|
837
|
+
}
|
|
838
|
+
},
|
|
839
|
+
"quiz_not_ready": {
|
|
840
|
+
"display": {
|
|
841
|
+
"title": "โฐ Quiz Not Ready Yet",
|
|
842
|
+
"message": "Today's quiz will be available at 10:45 PM.",
|
|
843
|
+
"alternative": "Want to study? Say **keypoint** to review today's content!"
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
}
|
|
847
|
+
```
|
|
848
|
+
|
|
849
|
+
### 10.2.1 Keypoint History Response
|
|
850
|
+
|
|
851
|
+
**When user says:** `keypoint history`, `็ฅ่ฏ็น ๅๅฒ`, `ๆจๅคฉ`, `yesterday`
|
|
852
|
+
|
|
853
|
+
**Logic:**
|
|
854
|
+
1. Scan `data/daily/` directory for all `YYYY-MM-DD/keypoint.json` files
|
|
855
|
+
2. Sort by date descending (most recent first)
|
|
856
|
+
3. Extract `display.title` or `topic` from each keypoint
|
|
857
|
+
|
|
858
|
+
**Empty History Response:**
|
|
859
|
+
```markdown
|
|
860
|
+
๐ **็ฅ่ฏ็นๅๅฒ่ฎฐๅฝ**
|
|
861
|
+
|
|
862
|
+
ๆๆ ๅๅฒ่ฎฐๅฝใไปไปๅคฉๅผๅงๅญฆไน ๅง๏ผ
|
|
863
|
+
|
|
864
|
+
๐ก ่พๅ
ฅ **keypoint** ๆ **็ฅ่ฏ็น** ่ทๅไปๆฅๅ
ๅฎน
|
|
865
|
+
```
|
|
866
|
+
|
|
867
|
+
**With History Response:**
|
|
868
|
+
```markdown
|
|
869
|
+
๐ **็ฅ่ฏ็นๅๅฒ่ฎฐๅฝ**
|
|
870
|
+
|
|
871
|
+
| ๆฅๆ | ไธป้ข |
|
|
872
|
+
|------|------|
|
|
873
|
+
| 2026-02-21 | ๐ข Touch Base - ๅทฅไฝๆฒ้ |
|
|
874
|
+
| 2026-02-20 | ๐ฎ GG - ๆธธๆ็จ่ฏญ |
|
|
875
|
+
| 2026-02-19 | ๐ฃ๏ธ Gonna/Wanna - ๅฃ่ฏญ็ผฉๅ |
|
|
876
|
+
|
|
877
|
+
๐ก ่พๅ
ฅ **keypoint ๆฅๆ** ๆฅ็่ฏฆๆ
๏ผๅฆ `keypoint 2026-02-20`
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
**CRITICAL:** The history list is populated from persisted `data/daily/YYYY-MM-DD/keypoint.json` files. If keypoints are not saved to this location, history will be empty.
|
|
881
|
+
|
|
882
|
+
### 10.3 Keypoint Display Template
|
|
883
|
+
|
|
884
|
+
> IMPORTANT: Use `**text**` for bold. Never use `~~strikethrough~~`. Output Markdown text directly, NOT JSON.
|
|
885
|
+
|
|
886
|
+
**Assembly Flow:**
|
|
887
|
+
|
|
888
|
+
When displaying a keypoint, read the `display` object and assemble fields in this order:
|
|
889
|
+
|
|
890
|
+
```markdown
|
|
891
|
+
{title}
|
|
892
|
+
|
|
893
|
+
| ไธป้ข | **{topic_name}** |
|
|
894
|
+
|------|------------------|
|
|
895
|
+
| ๆญฃๅผๅบฆ | **{formality}** |
|
|
896
|
+
|
|
897
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
898
|
+
{scene_intro}
|
|
899
|
+
|
|
900
|
+
{scene_text}
|
|
901
|
+
|
|
902
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
903
|
+
{expressions_title}
|
|
904
|
+
|
|
905
|
+
{for each item in expressions_formatted:
|
|
906
|
+
{emoji} {phrase}
|
|
907
|
+
{pronunciation}
|
|
908
|
+
{usage}
|
|
909
|
+
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
913
|
+
{alternatives_title}
|
|
914
|
+
|
|
915
|
+
{alternatives_formatted}
|
|
916
|
+
|
|
917
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
918
|
+
{chinglish_title}
|
|
919
|
+
|
|
920
|
+
{chinglish_formatted}
|
|
921
|
+
|
|
922
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
923
|
+
{examples_title}
|
|
924
|
+
|
|
925
|
+
{for each item in examples_formatted:
|
|
926
|
+
{situation_emoji} {situation}
|
|
927
|
+
{dialogue}
|
|
928
|
+
|
|
929
|
+
}
|
|
930
|
+
|
|
931
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
932
|
+
{extended_title}
|
|
933
|
+
|
|
934
|
+
{extended_formatted}
|
|
935
|
+
|
|
936
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
937
|
+
{references_title}
|
|
938
|
+
|
|
939
|
+
{references_formatted}
|
|
940
|
+
|
|
941
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
942
|
+
{footer}
|
|
943
|
+
```
|
|
944
|
+
|
|
945
|
+
**Display Object Structure (for generation):**
|
|
946
|
+
|
|
947
|
+
```json
|
|
948
|
+
{
|
|
949
|
+
"display": {
|
|
950
|
+
"title": "๐ข ไปๆฅ็ฅ่ฏ็น | Today's Knowledge Point",
|
|
951
|
+
"topic_tag": "๐ท๏ธ ไธป้ข: **{topic_name}** | {topic_name_en}",
|
|
952
|
+
"formality_tag": "๐ ๆญฃๅผๅบฆ: **{formality}**",
|
|
953
|
+
"scene_intro": "๐ฌ ๅบๆฏ | Scene",
|
|
954
|
+
"scene_text": "{scene_context}",
|
|
955
|
+
"expressions_title": "๐ฌ ๆ ธๅฟ่กจ่พพ | Key Expressions",
|
|
956
|
+
"expressions_formatted": [
|
|
957
|
+
{
|
|
958
|
+
"emoji": "โจ",
|
|
959
|
+
"phrase": "**{phrase}**",
|
|
960
|
+
"pronunciation": "๐ {pronunciation_tip}",
|
|
961
|
+
"usage": "๐ก {usage_note}"
|
|
962
|
+
}
|
|
963
|
+
],
|
|
964
|
+
"alternatives_title": "๐ ๅ
ถไป่ฏดๆณ | Alternatives",
|
|
965
|
+
"alternatives_formatted": "โข **{alt_1}**\nโข **{alt_2}**",
|
|
966
|
+
"chinglish_title": "โ ๏ธ Chinglish ้ท้ฑ | Chinglish Trap",
|
|
967
|
+
"chinglish_formatted": "โ Wrong: \"{wrong}\"\nโ
Correct: **{correct}**\n\n๐ {explanation}",
|
|
968
|
+
"examples_title": "๐ฃ๏ธ ๅฏน่ฏ็คบไพ | Example Dialogues",
|
|
969
|
+
"examples_formatted": [
|
|
970
|
+
{
|
|
971
|
+
"situation_emoji": "โ",
|
|
972
|
+
"situation": "{situation_name}",
|
|
973
|
+
"dialogue": "๐ฌ A: {line_1}\n๐ฌ B: {line_2}",
|
|
974
|
+
"key_phrase_highlight": "**{key_phrase}**"
|
|
975
|
+
}
|
|
976
|
+
],
|
|
977
|
+
"extended_title": "๐ ๅปถไผธๅญฆไน | Extended Learning",
|
|
978
|
+
"extended_formatted": "๐ Related: **{related_1}** | **{related_2}**\n\n๐ {cultural_note}",
|
|
979
|
+
"references_title": "๐ ๆๅจๅ่ | References",
|
|
980
|
+
"references_formatted": "๐ [{dict_source}]({dict_url}) - {dict_note}\n๐ฌ [{usage_source}]({usage_url}) - {usage_note}",
|
|
981
|
+
"footer": "โโโโโโโโโโโโโโโโโโโ\n๐
{date} | ๐ Take the quiz to earn XP!"
|
|
982
|
+
}
|
|
983
|
+
}
|
|
984
|
+
```
|
|
985
|
+
|
|
986
|
+
**Variables:**
|
|
987
|
+
- `{topic_name}`: Chinese topic name (e.g., ่ๅบๅฃ่ฏญ)
|
|
988
|
+
- `{topic_name_en}`: English topic name (e.g., Workplace Oral)
|
|
989
|
+
- `{formality}`: Formality level (้ๆ/ไธญๆง/ๆญฃๅผ)
|
|
990
|
+
- `{scene_context}`: Brief scene description
|
|
991
|
+
- `{phrase}`: Key expression phrase
|
|
992
|
+
- `{pronunciation_tip}`: Pronunciation tips
|
|
993
|
+
- `{usage_note}`: Usage notes
|
|
994
|
+
- `{alt_N}`: Alternative expressions
|
|
995
|
+
- `{wrong}`: The Chinglish/wrong expression
|
|
996
|
+
- `{correct}`: The correct American expression
|
|
997
|
+
- `{explanation}`: Why the wrong version is wrong
|
|
998
|
+
- `{situation_name}`: Example situation
|
|
999
|
+
- `{dialogue}`: Dialogue with **bold** key phrases
|
|
1000
|
+
- `{related_N}`: Related phrases
|
|
1001
|
+
- `{dict_source}`: Dictionary source name (e.g., Merriam-Webster)
|
|
1002
|
+
- `{dict_url}`: Dictionary URL
|
|
1003
|
+
- `{dict_note}`: Brief note about dictionary entry
|
|
1004
|
+
- `{usage_source}`: Usage context source name (e.g., YouGlish)
|
|
1005
|
+
- `{usage_url}`: Usage context URL
|
|
1006
|
+
- `{usage_note}`: Brief note about usage examples
|
|
1007
|
+
|
|
1008
|
+
### 10.4 Stats Display Template
|
|
1009
|
+
|
|
1010
|
+
> IMPORTANT: Output Markdown text directly, NOT JSON. Read from state.json and format as shown.
|
|
1011
|
+
|
|
1012
|
+
**Data Source:** `data/state.json`
|
|
1013
|
+
|
|
1014
|
+
**Fields to Read:**
|
|
1015
|
+
- `user.xp` โ current XP
|
|
1016
|
+
- `user.streak` โ streak days
|
|
1017
|
+
- `user.level` โ activity level (1-20)
|
|
1018
|
+
- `user.gems` โ gems count
|
|
1019
|
+
- `progress.correct_rate` โ accuracy percentage
|
|
1020
|
+
- `progress.badges` โ earned badges list
|
|
1021
|
+
|
|
1022
|
+
**Markdown Output Format:**
|
|
1023
|
+
|
|
1024
|
+
```markdown
|
|
1025
|
+
๐ **Your Learning Progress**
|
|
1026
|
+
|
|
1027
|
+
โข ็ญ็บง: **{level}** ({level_name})
|
|
1028
|
+
โข XP: **{current_xp}** / {next_level_xp} (**{progress}%**)
|
|
1029
|
+
โข ่ฟ่: **{streak}** ๅคฉ (ๅๆฐ: **{multiplier}x**)
|
|
1030
|
+
โข ๆญฃ็กฎ็: **{correct_rate}%**
|
|
1031
|
+
โข ๅพฝ็ซ : **{badges_count}**/6
|
|
1032
|
+
โข ๅฎ็ณ: **{gems}**
|
|
1033
|
+
|
|
1034
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1035
|
+
Keep it up! ๐ช
|
|
1036
|
+
```
|
|
1037
|
+
|
|
1038
|
+
**Level Names:**
|
|
1039
|
+
- Level 1-5: Starter (ๅฏ็จ่
)
|
|
1040
|
+
- Level 6-10: Traveler (่ก่ทฏไบบ)
|
|
1041
|
+
- Level 11-15: Explorer (ๆข็ดข่
)
|
|
1042
|
+
- Level 16-20: Pioneer (ๅผๆ่
)
|
|
1043
|
+
|
|
1044
|
+
**Multiplier Calculation:** `1.0 + (streak * 0.05)`, max 2.0x
|
|
1045
|
+
|
|
1046
|
+
### 10.5 Config Display Template
|
|
1047
|
+
|
|
1048
|
+
> IMPORTANT: Output Markdown text directly, NOT JSON. Read from state.json and format as shown.
|
|
1049
|
+
|
|
1050
|
+
**Data Source:** `data/state.json`
|
|
1051
|
+
|
|
1052
|
+
**Fields to Read:**
|
|
1053
|
+
- `preferences.cefr_level` โ CEFR level (A1-C2)
|
|
1054
|
+
- `preferences.topic_weights` โ topic preferences with weights
|
|
1055
|
+
- `preferences.tutor_style` โ tutor style
|
|
1056
|
+
- `preferences.oral_ratio` โ speaking focus percentage
|
|
1057
|
+
- `schedule.keypoint_time` โ keypoint push time
|
|
1058
|
+
- `schedule.quiz_time` โ quiz push time
|
|
1059
|
+
|
|
1060
|
+
**Markdown Output Format:**
|
|
1061
|
+
|
|
1062
|
+
```markdown
|
|
1063
|
+
โ๏ธ **Your Settings**
|
|
1064
|
+
|
|
1065
|
+
โข CEFR ็ญ็บง: **{cefr_level}**
|
|
1066
|
+
โข ไธป้ขๅๅฅฝ: **{topics_list}**
|
|
1067
|
+
โข ๅฏผๅธ้ฃๆ ผ: **{tutor_style}**
|
|
1068
|
+
โข ๅฃ่ฏญๅ ๆฏ: **{oral_ratio}%**
|
|
1069
|
+
โข ็ฅ่ฏ็นๆจ้: **{keypoint_time}**
|
|
1070
|
+
โข Quiz ๆจ้: **{quiz_time}**
|
|
1071
|
+
|
|
1072
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1073
|
+
๐ก Say **set level B2** to change your level
|
|
1074
|
+
```
|
|
1075
|
+
|
|
1076
|
+
### 10.6 Errors Display Template (Paginated)
|
|
1077
|
+
|
|
1078
|
+
> IMPORTANT: Output Markdown text directly, NOT JSON. Read from state.json error_notebook and format as shown.
|
|
1079
|
+
|
|
1080
|
+
**Data Source:** `data/state.json` โ `error_notebook` array
|
|
1081
|
+
|
|
1082
|
+
**Fields to Read:**
|
|
1083
|
+
- `error_notebook` โ array of error records
|
|
1084
|
+
- Each error has: `date`, `question`, `user_answer`, `correct_answer`, `reviewed`
|
|
1085
|
+
|
|
1086
|
+
**Markdown Output Format:**
|
|
1087
|
+
|
|
1088
|
+
```markdown
|
|
1089
|
+
๐ **Error Notebook**
|
|
1090
|
+
|
|
1091
|
+
๐ ็ป่ฎก: **{total}** ๆก้้ข (ๆชๅคไน : **{unreviewed}**)
|
|
1092
|
+
|
|
1093
|
+
โ ๆ่ฟ **5** ๆก:
|
|
1094
|
+
|
|
1095
|
+
**{date_1}**
|
|
1096
|
+
Q: {question_1}
|
|
1097
|
+
Your answer: {user_answer_1}
|
|
1098
|
+
โ
Correct: **{correct_answer_1}**
|
|
1099
|
+
|
|
1100
|
+
**{date_2}**
|
|
1101
|
+
Q: {question_2}
|
|
1102
|
+
Your answer: {user_answer_2}
|
|
1103
|
+
โ
Correct: **{correct_answer_2}**
|
|
1104
|
+
|
|
1105
|
+
[ๆพ็คบ 5 ๆก๏ผ็ฌฌ 1/{total_pages} ้กต]
|
|
1106
|
+
|
|
1107
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1108
|
+
๐ ่พๅ
ฅ **"้้ขๆฌ ๆดๅค"** ๆฅ็ไธ5ๆก
|
|
1109
|
+
๐ ่พๅ
ฅ **"้้ขๆฌ 2026-02"** ๆฅ็็นๅฎๆไปฝ
|
|
1110
|
+
๐ ่พๅ
ฅ **"้้ขๆฌ ้ๆบ5"** ้ๆบๅคไน 5ๆก
|
|
1111
|
+
๐ ่พๅ
ฅ **"้้ขๆฌ ็ป่ฎก"** ๆฅ็ๅฎๆด็ป่ฎก
|
|
1112
|
+
๐ ่พๅ
ฅ **"้้ขๆฌ ๅคไน "** ๅผๅง้้ขๅคไน
|
|
1113
|
+
```
|
|
1114
|
+
|
|
1115
|
+
**Pagination Commands:**
|
|
1116
|
+
- `errors` / `้้ขๆฌ` โ Show recent 5 errors
|
|
1117
|
+
- `errors more` / `้้ขๆฌ ๆดๅค` โ Next 5 errors
|
|
1118
|
+
- `errors page N` โ Go to page N
|
|
1119
|
+
- `errors 2026-02` โ Filter by month
|
|
1120
|
+
- `errors random 5` โ Random 5 for review
|
|
1121
|
+
- `errors stats` โ Show statistics only
|
|
1122
|
+
- `errors review` โ Start interactive review
|
|
1123
|
+
|
|
1124
|
+
### 10.7 Error Review Session Template
|
|
1125
|
+
|
|
1126
|
+
> IMPORTANT: Output Markdown text directly, NOT JSON. Error review gives NO XP.
|
|
1127
|
+
|
|
1128
|
+
**Question Display:**
|
|
1129
|
+
```markdown
|
|
1130
|
+
๐ **้้ขๅคไน **
|
|
1131
|
+
|
|
1132
|
+
๐ ่ฟๅบฆ: **{current}/{total}**
|
|
1133
|
+
|
|
1134
|
+
**Q:** {question}
|
|
1135
|
+
A. {option_a}
|
|
1136
|
+
B. {option_b}
|
|
1137
|
+
C. {option_c}
|
|
1138
|
+
D. {option_d}
|
|
1139
|
+
|
|
1140
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1141
|
+
๐ก ่พๅ
ฅ **A/B/C/D** ไฝ็ญ
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
**Correct Answer Response:**
|
|
1145
|
+
```markdown
|
|
1146
|
+
โ
**ๆญฃ็กฎ๏ผ**
|
|
1147
|
+
|
|
1148
|
+
๐ฏ **{correct_answer}** ๆฏๅฐ้็่กจ่พพ๏ผ
|
|
1149
|
+
|
|
1150
|
+
๐ ๆฌ้ขๅทฒไป้้ขๆฌไธญ็งป้ค โ
|
|
1151
|
+
|
|
1152
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1153
|
+
๐ ็ปง็ปญไธไธ้ข๏ผ่พๅ
ฅ **็ปง็ปญ**
|
|
1154
|
+
```
|
|
1155
|
+
|
|
1156
|
+
**Wrong Answer Response:**
|
|
1157
|
+
```markdown
|
|
1158
|
+
โ **้่ฏฏ๏ผ**
|
|
1159
|
+
|
|
1160
|
+
โ
ๆญฃ็กฎ็ญๆก: **{correct_answer}**
|
|
1161
|
+
|
|
1162
|
+
๐ {explanation}
|
|
1163
|
+
|
|
1164
|
+
๐ ๆฌ้ข้่ฏฏๆฌกๆฐ๏ผ**{wrong_count}**
|
|
1165
|
+
|
|
1166
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1167
|
+
๐ ็ปง็ปญไธไธ้ข๏ผ่พๅ
ฅ **็ปง็ปญ**
|
|
1168
|
+
```
|
|
1169
|
+
|
|
1170
|
+
**Review Complete Summary:**
|
|
1171
|
+
```markdown
|
|
1172
|
+
๐ **้้ขๅคไน ๅฎๆ๏ผ**
|
|
1173
|
+
|
|
1174
|
+
โข ๆฌๆฌกๆญฃ็กฎ็: **{correct}/{total}**
|
|
1175
|
+
โข ๅทฒๆธ
้ค: **{cleared}** ้้้ข
|
|
1176
|
+
โข ไป้ๅคไน : **{remaining}** ้้้ข
|
|
1177
|
+
โข Error Slayer ่ฟๅบฆ: **{progress}/30**
|
|
1178
|
+
|
|
1179
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1180
|
+
๐ช ็ปง็ปญๅ ๆฒน๏ผ่พๅ
ฅ **้้ขๆฌ ๅคไน ** ๅๆฌกๆๆ
|
|
1181
|
+
```
|
|
1182
|
+
|
|
1183
|
+
**Variables:**
|
|
1184
|
+
- `{current}`: Current question number
|
|
1185
|
+
- `{total}`: Total questions in session (default 5)
|
|
1186
|
+
- `{wrong_count}`: Number of times this question was answered incorrectly
|
|
1187
|
+
- `{cleared}`: Number of errors cleared this session
|
|
1188
|
+
- `{remaining}`: Number of errors still needing review
|
|
1189
|
+
- `{progress}`: Current progress toward Error Slayer badge
|
|
1190
|
+
|
|
1191
|
+
### 10.8 Quiz Result Display Template
|
|
1192
|
+
|
|
1193
|
+
> IMPORTANT: Output Markdown text directly, NOT JSON. Calculate XP from quiz answers.
|
|
1194
|
+
|
|
1195
|
+
**Markdown Output Format:**
|
|
1196
|
+
|
|
1197
|
+
```markdown
|
|
1198
|
+
๐ **Quiz Results**
|
|
1199
|
+
|
|
1200
|
+
โข ๅๆฐ: **{correct}/{total}** (**{accuracy}%**)
|
|
1201
|
+
โข ็ถๆ: {status_emoji} {status_text}
|
|
1202
|
+
โข XP ่ทๅพ: **+{total_xp} XP**
|
|
1203
|
+
โข ่ฟ่: **{old_streak}** โ **{new_streak}** ๅคฉ
|
|
1204
|
+
โข ๆป XP: **{total_xp_earned}**
|
|
1205
|
+
|
|
1206
|
+
๐ XP ๆ็ป:
|
|
1207
|
+
โข Base: **{base_xp} XP**
|
|
1208
|
+
โข Streak Bonus: **{multiplier}x** ({streak} day streak)
|
|
1209
|
+
{perfect_bonus}
|
|
1210
|
+
|
|
1211
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1212
|
+
๐ Come back tomorrow for a new quiz!
|
|
1213
|
+
```
|
|
1214
|
+
|
|
1215
|
+
**Variables:**
|
|
1216
|
+
- `{status_emoji}`: โ
for passed, โ for failed
|
|
1217
|
+
- `{status_text}`: "Passed! Great job! ๐" or "Keep trying! ๐ช"
|
|
1218
|
+
- `{perfect_bonus}`: "โข Perfect Bonus: **+20 XP**" (only if 100% correct)
|
|
1219
|
+
|
|
1220
|
+
### 10.9 Output Format Rules
|
|
1221
|
+
|
|
1222
|
+
> CRITICAL: All responses must use platform-agnostic Markdown. OpenClaw handles platform-specific conversions.
|
|
1223
|
+
|
|
1224
|
+
**Universal Markdown Format:**
|
|
1225
|
+
|
|
1226
|
+
Output standard Markdown that works across all platforms (Feishu, Discord, Telegram, Slack):
|
|
1227
|
+
|
|
1228
|
+
```markdown
|
|
1229
|
+
๐ข **Title Here**
|
|
1230
|
+
|
|
1231
|
+
**Label:** Value
|
|
1232
|
+
|
|
1233
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1234
|
+
|
|
1235
|
+
๐ **Section Title**
|
|
1236
|
+
|
|
1237
|
+
Content with **bold** and [links](url).
|
|
1238
|
+
|
|
1239
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
1240
|
+
|
|
1241
|
+
๐
Footer info
|
|
1242
|
+
```
|
|
1243
|
+
|
|
1244
|
+
**Rules:**
|
|
1245
|
+
|
|
1246
|
+
1. **Use standard Markdown** - Compatible with all platforms
|
|
1247
|
+
2. **Bold syntax**: Use `**text**` for bold
|
|
1248
|
+
3. **Never use** `~~strikethrough~~` - use โ emoji instead
|
|
1249
|
+
4. **Line breaks**: Use blank lines between sections
|
|
1250
|
+
5. **Bullets**: Use `โข` for bullet points
|
|
1251
|
+
6. **Emojis**: Include at the start of each section
|
|
1252
|
+
7. **Punctuation**: End sentences properly (`.` or `?` or `!`)
|
|
1253
|
+
8. **Links**: Use `[text](url)` format
|
|
1254
|
+
|
|
1255
|
+
**Platform Compatibility:**
|
|
1256
|
+
|
|
1257
|
+
| Syntax | Feishu | Discord | Telegram | Slack |
|
|
1258
|
+
|--------|--------|---------|----------|-------|
|
|
1259
|
+
| `**bold**` | โ
| โ
| โ
| โ
|
|
|
1260
|
+
| `[link](url)` | โ
| โ
| โ
| โ
|
|
|
1261
|
+
| Emoji | โ
| โ
| โ
| โ
|
|