Introduction¶
DeepSeek Harness (DSH) is a model inference framework centered on local storage. General-purpose agents often lack specific context and standardized workflows when handling domain-specific tasks. The dsh-teacher-preset plugin transforms DSH from a general-purpose assistant into a dedicated teacher-focused workstation by introducing standardized teaching templates, structured teaching context, and an evaluation-and-diagnosis closed loop. It supports both school and tutoring scenarios, and provides local-first data storage and versioning capabilities.
Feature Overview¶
This plugin primarily addresses material generation, context reuse, evaluation and diagnosis, and version rollback in teaching scenarios.
-
Scenario-based Mode Switching
Supports three modes:school: For public/privately school teachers, provides 7 templates such as lesson plans, evaluation rubrics, and exam papers.tutoring: For tutoring institution teachers, provides 7 templates such as trial lesson plans, learning-status analysis, and renewal pitch scripts.all: Full mode, default mode, provides all 14 templates; the LLM automatically determines the scenario based on instructions.
-
Teaching Context and Material Management
- Structured Context: Supports saving and reusing teacher, class, course, and student information, and supports historical version restoration.
- Template Isolation: In
schoolmode, the LLM can only see school templates; intutoringmode, it can only see tutoring templates. - Auto-archiving: Generated materials are saved using type/date-based names; files with the same name on the same day automatically receive a suffix to avoid overwriting.
- Full-text Search: Supports searching keywords across all saved materials and returns line numbers and context.
- HTML Export: Supports exporting Markdown materials to printable HTML with A4 layout.
-
Instructional Closed Loop and Quality Control
- Unit Teaching Package: Supports creating and linking multiple materials at once, such as lesson plans, exercises, and assessments, and generates a checksum.
- Quality Gates: Intercepts error patterns, unreplaced placeholders, missing answers, and other issues before saving.
- Evaluation Diagnosis: Supports recording per-student and per-objective evaluation evidence, automatically calculates mastery levels, and generates recommendations for adjusting the next lesson.
-
Versioning and Migration
- Version Lifecycle: Provides secure updates, automatic backups, historical version lists, and restoration. The current version is automatically backed up before restoration.
- Non-destructive Migration: v1 metadata is stored in a separate directory; existing Markdown files remain unchanged, and only an index is created.
Installation and Prerequisites¶
Before use, ensure the environment meets the following requirements:
- Node.js:
^22.19.0 || >=24.0.0 - npm:
11.12.1 - DSH:
0.1.1-rc.2 - Cordis:
4.0.1
Install from GitHub¶
Run the following commands to install the plugin and start the Web interface:
dsh plugin --profile web add github:AIMarshallLee/dsh-teacher-preset#v1.0.0
dsh web
Install from Local¶
If you need to debug or inspect the source code:
git clone https://github.com/AIMarshallLee/dsh-teacher-preset.git
cd dsh-teacher-preset && git checkout v1.0.0 && npm ci && npm run build
dsh plugin --profile web add file:./dsh-teacher-preset
dsh web
Configuration¶
Create or edit the cordis.patch.yml file in the DSH configuration directory to define plugin behavior:
- id: dsh-teacher-preset
config:
mode: "all" # school | tutoring | all
gradeLevel: "小学六年级" # 年级
subject: "数学" # 学科
textbookVersion: "人教版" # 教材版本
outputDir: "./teacher-materials" # 输出目录
language: "zh-CN" # 输出语言
Configuration Options¶
mode: Determines the set of templates visible to the LLM.gradeLevelandsubject: Used to load curriculum-standard references for the corresponding subject.outputDir: The save path for all generated files; relative paths are recommended.
Typical Usage¶
The plugin workflow can be triggered with natural-language instructions.
School Teacher Scenarios:
* Generate a lesson plan: 帮我写一节"分数的初步认识"的教案
* Generate an exam paper: 生成一份第一单元的数学试卷,10道选择题
* Generate a reflection: 生成一份教学反思,记录今天课堂中关于分数概念的难点
Tutoring Teacher Scenarios:
* Generate a trial lesson plan: 帮我生成一份小数乘法试听课教案
* Generate a renewal pitch script: 写一份春季班续报话术,这个学生计算薄弱
Instructional Closed-Loop Process:
1. Use teacher_save_context to save or update the current teaching context.
2. Use teacher_create_unit_package to generate materials within a unit, such as lesson plans, exercises, and assessments.
3. After class, use teacher_record_assessment to record student evaluation evidence.
4. The plugin calculates mastery levels based on the evidence and generates recommendations for adjusting the next lesson.
Data Structure and Storage¶
The plugin uses a hybrid storage structure to ensure compatibility and performance:
outputDir/
├── lesson-plan/ # 原有 Markdown 文件
├── quiz/
├── .backups/ # 自动备份文件
└── .teacher-workspace/ # v1 元数据目录
├── workspace.json
├── legacy-materials.json
├── contexts/ # 教学上下文
├── packages/ # 单元教学包
├── assessments/ # 评价数据
├── transactions/ # 事务日志
└── staging/ # 待落盘的临时文件
Privacy Note:
All data is stored only in the local outputDir directory. Configured absolute paths are not added to model prompts. outputDir should not contain sensitive identifiers, such as student names, and passwords, API keys, or cookies must never be written into context or materials.
Applicable Scenarios¶
This plugin is suitable for teachers who need DeepSeek Harness for localized, controllable instructional assistance. Through templating and structuring, it reduces repetitive work and provides a traceable instructional evaluation closed loop. Before use, ensure the DSH version and dependencies meet the requirements.