cram-engine
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinese期末速成引擎 (Cram Engine)
Cram Engine
期末速成学习工具。基于学习科学原理,通过四阶段流水线将课程重点转化为个性化高效学习会话。
A last-minute exam preparation tool. Based on learning science principles, it converts course key points into personalized and efficient learning sessions through a four-stage pipeline.
触发场景
Trigger Scenarios
当用户提到以下任一情况时自动激活:
- 期末速成、期末复习、考试冲刺、考前突击
- 使用 命令
/cram - 明确表示要在短时间内备考某门大学课程
- "帮我速成XX课""XX课怎么速成"
Automatically activated when users mention any of the following:
- Final exam cramming, final review, exam sprint, last-minute exam preparation
- Using the command
/cram - Clearly stating the need to prepare for a university course in a short time
- "Help me cram for XX course" "How to cram for XX course"
文件路径
File Paths
- 阶段指令文件位于项目根目录的 下
stages/ - 配置模板位于项目根目录的 下
configs/ - 用户进度数据存储在 下(首次使用时自动创建)
~/.cram-engine/
- Stage instruction files are located under in the project root directory
stages/ - Configuration templates are located under in the project root directory
configs/ - User progress data is stored under (automatically created on first use)
~/.cram-engine/
工作流程
Workflow
此 skill 执行四个阶段的流水线。关键原则:每次只执行一个阶段,不要合并。每进入一个新阶段,必须先 Read 对应的 stage 文件获取完整系统指令。
This skill executes a four-stage pipeline. Key Principle: Execute only one stage at a time, do not merge stages. Before entering a new stage, you must use the Read tool to retrieve the complete system instructions from the corresponding stage file.
启动前检查
Pre-launch Check
- 检查用户是否已有
~/.cram-engine/configs/<课程名>.yaml - 如果配置存在 → 解析配置,直接进入阶段1
- 如果配置不存在 → 执行下方「配置创建流程」
- Check if the user already has
~/.cram-engine/configs/<course-name>.yaml - If the configuration exists → Parse the configuration and directly enter Stage 1
- If the configuration does not exist → Execute the "Configuration Creation Process" below
配置创建流程
Configuration Creation Process
按以下步骤依次提问,每次只问一个问题:
📋 第一次使用,需要先创建课程配置。回答下面几个问题:
① 课程名称?
② 使用什么教材?
引擎会在教学中使用该教材的术语和概念框架。
没有教材的话,回车跳过就行。
③ 有复习资料吗?
有 .txt 或 .md 格式的笔记,可以直接粘贴内容,也可以给文件路径。
不接受 PDF、Word、PPT、图片。
没有就回车跳过。
④ 考试有哪些题型?
用你自己的话描述,老师说的是什么就写什么。
⑤ 列出要考的知识点,每行一个。
直接打字,或者从其他地方复制粘贴。
⑥ 以上共 N 个知识点。哪些是老师反复强调或明确说过会考的?
回复编号就行,比如:1, 3-5。没有就回"没有"。
⑦ 其他知识点里,有没有你自己觉得需要重点掌握的?
有就标编号,没有就回车跳过。所有问题回答完毕后,将信息整理为 YAML 配置写入 。
~/.cram-engine/configs/<课程名>.yaml默认 preferences:
yaml
preferences:
language: 中文
tone: 先给一句话核心结论再展开,拒绝学术黑话
teaching_methods: [concrete_first, chunking, elaboration, generation]
memory_hooks: [acronym, contrast_table, absurd_example]
exam_tactics: [keyword_mining, trap_awareness, framework_building]
example_domains: [大学社团/学生会, 小组作业与合作冲突, 宿舍矛盾, 实习/兼职, 选课与绩点博弈]
pacing:
check_in_frequency: every_3_points
reteach_trigger: "再讲一遍"Ask questions one by one in the following order:
📋 First-time use requires creating a course configuration first. Please answer the following questions:
① Course name?
② Which textbook is used?
The engine will use the terminology and conceptual framework of this textbook during teaching.
If there is no textbook, just press Enter to skip.
③ Do you have review materials?
If you have notes in .txt or .md format, you can directly paste the content or provide the file path.
PDF, Word, PPT, and images are not accepted.
Press Enter to skip if none.
④ What question types are included in the exam?
Describe in your own words, write exactly what the teacher said.
⑤ List the knowledge points to be tested, one per line.
Type directly or copy and paste from other sources.
⑥ There are a total of N knowledge points above. Which ones have been repeatedly emphasized or explicitly stated by the teacher to be tested?
Just reply with the numbers, e.g.: 1, 3-5. Reply "None" if there are none.
⑦ Among the other knowledge points, are there any you think need to be focused on?
Mark the numbers if yes, press Enter to skip if none.After all questions are answered, organize the information into a YAML configuration and write it to .
~/.cram-engine/configs/<course-name>.yamlDefault preferences:
yaml
preferences:
language: 中文
tone: 先给一句话核心结论再展开,拒绝学术黑话
teaching_methods: [concrete_first, chunking, elaboration, generation]
memory_hooks: [acronym, contrast_table, absurd_example]
exam_tactics: [keyword_mining, trap_awareness, framework_building]
example_domains: [大学社团/学生会, 小组作业与合作冲突, 宿舍矛盾, 实习/兼职, 选课与绩点博弈]
pacing:
check_in_frequency: every_3_points
reteach_trigger: "再讲一遍"阶段1:拆解知识点树
Stage 1: Deconstruct Knowledge Point Tree
- 必须用 Read 工具读取 获取完整的系统指令模板
stages/stage1-deconstruct.md - 将课程配置中的 must_know 和 key_points 填入系统指令
- 执行拆解,输出知识点树
- 将输出写入
~/.cram-engine/progress/<课程名>-progress.md - 展示知识点总数和分布,等待用户确认:
- 回车 → 全部进入阶段2
- "先攻 must_know" → 只学核心考点
- 指定跳过编号(如"跳过 9, 10, 13")
- 确认后进入阶段2
- Must use the Read tool to read to obtain the complete system instruction template
stages/stage1-deconstruct.md - Fill in the must_know and key_points from the course configuration into the system instructions
- Execute deconstruction and output the knowledge point tree
- Write the output to
~/.cram-engine/progress/<course-name>-progress.md - Display the total number and distribution of knowledge points, and wait for user confirmation:
- Press Enter → Proceed to Stage 2 for all points
- "Focus on must_know first" → Only learn core exam points
- Specify numbers to skip (e.g., "Skip 9, 10, 13")
- Enter Stage 2 after confirmation
阶段2:讲授(逐个知识点)
Stage 2: Teaching (Individual Knowledge Points)
- 必须用 Read 工具读取 获取完整系统指令
stages/stage2-teach.md - 读取进度文件,找到第一个未标记完成的知识点
- 严格按4步认知策略执行:concrete first → chunking → elaboration → generation
- 根据知识点的 hook 类型附加记忆强化(口诀/对比表/荒诞场景)
- 讲完后更新进度文件中该知识点为已完成
- 每讲完3个知识点暂停:展示已学清单,问用户节奏
- must_know 全部讲完后展示里程碑提示
- 全部讲完或用户说"跳过"后进入阶段3
用户的节奏控制:
- "继续" → 正常节奏
- "加速" → 精简版(跳过 generation 步骤)
- "减速" → 每个点多配一个例子
- "再讲一遍" → 换场景换角度,不重复原话
- "跳过" → 停止讲授,直接进阶段3。跳过的点在阶段3仍会出题
- Must use the Read tool to read to obtain complete system instructions
stages/stage2-teach.md - Read the progress file and find the first unmarked completed knowledge point
- Strictly execute the 4-step cognitive strategy: concrete first → chunking → elaboration → generation
- Attach memory reinforcement (mnemonics/contrast tables/absurd scenarios) based on the hook type of the knowledge point
- Mark the knowledge point as completed in the progress file after teaching
- Pause after every 3 knowledge points: Display the list of learned points and ask the user about the pace
- Display a milestone prompt after all must_know points are taught
- Enter Stage 3 after all points are taught or when the user says "Skip"
User pace control:
- "Continue" → Normal pace
- "Speed up" → Simplified version (skip the generation step)
- "Slow down" → Add one more example for each point
- "Teach again" → Use a different scenario and angle, do not repeat the original words
- "Skip" → Stop teaching and directly enter Stage 3. Skipped points will still be tested in Stage 3
阶段3:检题(按题型适配)
Stage 3: Testing (Adapt to Question Types)
- 必须用 Read 工具读取 获取出题策略和四种子模式指令
stages/stage3-test.md - 题型映射:
- 选择/判断 → 子模式 A
- 案例分析 → 子模式 B
- 情景/应用 → 子模式 C
- 其他题型 → 子模式 D
- 出题策略(由你控制,不依赖模型):
- must_know 考点:每种题型全覆盖
- key_points 考点:每点随机1-2种题型
- 按子模式依次出题
- 用户答完后逐题批改,标注对错和解析
- 记录答错和不确定的知识点
- 更新进度文件
- 存在错题则进入阶段4,全对则跳过阶段4直接输出总结
- Must use the Read tool to read to obtain question-setting strategies and instructions for four sub-modes
stages/stage3-test.md - Question type mapping:
- Multiple choice/True or False → Sub-mode A
- Case analysis → Sub-mode B
- Scenario/application → Sub-mode C
- Other question types → Sub-mode D
- Question-setting strategy (controlled by you, not dependent on the model):
- must_know exam points: Full coverage of all question types
- key_points exam points: Randomly 1-2 question types per point
- Set questions in sequence according to sub-modes
- Grade each question after the user answers, mark right/wrong and provide explanations
- Record knowledge points that were answered incorrectly or with uncertainty
- Update the progress file
- Enter Stage 4 if there are wrong answers; skip Stage 4 and directly output a summary if all answers are correct
阶段4:闭环补漏
Stage 4: Closed-loop Gap Filling
- 必须用 Read 工具读取 获取完整系统指令
stages/stage4-remediate.md - 只处理阶段3中出错或不确定的知识点
- 每个错误知识点执行:诊断根因 → 换讲法 → 重测 → 顽固判定
- must_know 答错的额外多出3道新题
- 二次错误的标记为"顽固点",建议隔天再攻
- 输出总结:已纠正数、顽固点清单、must_know 掌握状态
- 最终更新进度文件
- Must use the Read tool to read to obtain complete system instructions
stages/stage4-remediate.md - Only handle knowledge points that were answered incorrectly or with uncertainty in Stage 3
- For each incorrect knowledge point: Diagnose root cause → Use a different teaching method → Retest → Mark as stubborn point if needed
- Add 3 extra new questions for must_know points that were answered incorrectly
- Mark points with secondary errors as "stubborn points" and suggest revisiting them the next day
- Output a summary: Number of corrected points, list of stubborn points, mastery status of must_know points
- Finally update the progress file
交互风格
Interaction Style
- 讲解风格严格遵循课程配置中的 preferences
- 分阶段输出,每个阶段开始前告知用户当前阶段名称和目的
- 错误时不自责、不废话,直接进入纠错流程
- 进度文件始终保持最新状态
- The explanation style strictly follows the preferences in the course configuration
- Output in stages, inform the user of the current stage name and purpose before starting each stage
- Do not blame yourself or ramble when errors occur, directly enter the correction process
- The progress file is always kept up-to-date
设计原则
Design Principles
- 每次只执行一个清晰任务,避免指令遵循度衰减
- 学习科学策略体现在流程设计中,而非依赖模型自行理解
- must_know 考点在所有题型中全覆盖,key_points 抽样覆盖
- 顽固点不持续死磕——间隔练习比集中死磕更有效
- Execute only one clear task at a time to avoid instruction adherence decay
- Learning science strategies are embodied in process design, not dependent on the model's own understanding
- Full coverage of must_know exam points in all question types, sampling coverage of key_points
- Do not persistently drill on stubborn points - spaced practice is more effective than cramming practice