Course Creator
Convert raw course material into runnable, optimized MarkdownFlow lesson scripts and deploy them as live AI-Shifu courses.
Execution Modes
- - Standard mode (default): Input quality is sufficient; run requested phases in full.
- Fallback mode: Input is incomplete or low quality; produce coarse outputs, mark uncertainty, and provide focused rerun hints.
Language Resolution Policy
See references/language-resolution.md for the full policy.
Resolve target language with this strict priority:
- 1. INLINECODE1
- INLINECODE2
- INLINECODE3
- INLINECODE4
- INLINECODE5
- INLINECODE6 (
en-US)
Authoring Control Inputs
Use these optional controls across all phases:
- -
course_profile (json): audience level, prerequisite level, lesson duration target, lesson count target, and assessment mode. - INLINECODE9 (json): interaction density, platform limits, must-cover topics, avoid topics, and non-negotiable source fragments.
See references/input-contract.md for recommended object shapes.
Output Boundary
- - Final outputs are MarkdownFlow teaching scripts.
- The script must be directive/instructional (i.e., it tells the model how to teach), not a polished, directly learner-addressed “final lecture/manuscript”.
- Avoid author-side meta labels such as “Knowledge Block 1/2/3”, “Lesson Objective”, or “Deliverable”. Keep those as implicit structure, not visible narration.
- Authoring rules, pipeline notes, and process instructions stay in skill docs and references, not in lesson outputs.
- Internal design notes may appear only in HTML comments when needed.
MarkdownFlow Authoring Hard Rules (Must Follow)
1) Script style: directive, not manuscript
Write in imperative, model-guiding language. Preferred patterns:
- - “Explain to the learner …”
- “Ask the learner to …”
- “Have the learner choose …”
- “After collecting {{var}}, restate the choice and branch …”
Disallowed patterns:
- - Long, polished prose written as if it is the final learner-facing lecture.
- Author/lesson-plan meta narration (e.g., “Knowledge Block …”, “In this lesson you will …”, “Deliverable: …”).
2) Interaction syntax: prompt outside, options inside
For MarkdownFlow interactions, keep the question/prompt outside the syntax line.
The interaction line must contain only options (and minimal inline hints when strictly necessary).
Bad:
INLINECODE11
Good:
Ask the learner to pick a topic.
INLINECODE13
3) Mandatory anchoring + downstream effect
After every interaction, the script must:
- 1. Restate the selection explicitly as an instruction (not as polished narration), e.g.: INLINECODE14
- Use {{var}} to create a visible downstream effect (branching explanation, examples, practice difficulty, feedback).
4) Visuals: describe, do not inline source markup
- - Do not embed raw SVG/HTML source code inside lesson MarkdownFlow files.
- Unless the user explicitly asks for SVG, HTML, Mermaid, PlantUML, Graphviz, or other diagram source/markup, do not proactively generate visual source code or diagram markup.
- Default behavior: when a visual is needed, write a natural-language instruction such as “Show an image that …” and pair it with a brief explanation of what the visual is meant to convey.
- If the user asks for a visual but does not specify the format, prefer natural-language image/diagram placeholders over executable or embeddable diagram code.
Pipeline Overview
CODEBLOCK0
Usage Paths
Path A: End-to-End
Run all five phases from raw material to a live deployed course.
- 1. Phase 1: Segment raw material into semantic units.
- Phase 2: Orchestrate lesson boundaries and generate scripts.
- Phase 3: Generate per-lesson MarkdownFlow scripts (called internally by Phase 2).
- Phase 4: Audit and optimize final scripts.
- Phase 5: Build, import, and publish to the AI-Shifu platform.
Path B: Author Only
Run Phase 1–4 to produce optimized MarkdownFlow scripts without deploying. Sub-paths:
- - Segment only: Phase 1 alone for structured segments and manual review.
- Generate only: Phase 3 alone on pre-existing segments to produce lesson scripts.
- Optimize only: Phase 4 alone to audit and improve existing MarkdownFlow scripts.
Path C: Deploy Only
Run Phase 5 alone to deploy pre-existing MarkdownFlow files to the AI-Shifu platform.
Path D: Manage Existing
Use Phase 5 management commands (list, show, update, rename, reorder, delete, publish, archive) on courses already on the platform.
Phase 1: Segmentation
Turn messy course source material into a reliable intermediate structure for downstream lesson generation.
Workflow
- 1. Remove filler language and duplicated phrasing without changing meaning.
- Mark immutable blocks: code, images, and tables.
- Segment by semantic continuity instead of headings alone.
- Propose lesson boundaries with one core question per lesson.
- Return source-linked structured segments.
Segment Schema
Each segment includes:
- - INLINECODE15
- INLINECODE16 (
concept, example, code, image, exercise, transition) - INLINECODE23
- INLINECODE24 (
yes or no) - INLINECODE27
Transfer Signals
Capture these fields for downstream teaching quality:
- -
learner_hook: statements that can trigger learner reflection. - INLINECODE29 : one of history, phenomenon, data, mechanism, or conclusion.
- INLINECODE30 : fragments suited for SVG/HTML visual support.
- INLINECODE31 : candidate idea conflicts for cognitive contrast.
- INLINECODE32 : clues for validity boundaries.
- INLINECODE33 : clues that can become immediate or staged actions.
- INLINECODE34 : high-information chunks that should not be diluted.
- INLINECODE35 : original wording worth preserving.
- INLINECODE36 : clues for "visual first, explanation second" blocks.
- INLINECODE37 : intent labels such as diagnose, branch, calibrate, compare.
- INLINECODE38 : candidate prompts for before/after comparison.
Phase 1 Outputs
- - Ordered segment list.
- Lesson boundary candidates.
- One core question per lesson.
- Preservation block index.
- Full transfer-signal package.
See references/segmentation-rules.md.
Phase 1 Validation
- - Segment output covers all valid source spans in traceable order.
- Code/image/table blocks keep original placement and format.
- Every lesson candidate resolves to one core question.
- Transfer-signal fields are complete and usable downstream.
- Cleanup does not alter key facts or terminology.
Phase 2: Orchestration
Convert raw course material into runnable lesson-level MarkdownFlow scripts by coordinating segmentation and generation.
Workflow
- 1. Normalize source ordering and merge input material.
- Run Phase 1 for cleanup and semantic segmentation.
- Generate lesson-cut candidates with one core question each.
- Run Phase 3 for lesson-level MarkdownFlow scripts.
- Build course index and global variable table.
- Recompute only failed lessons through strict gating.
Mandatory Gates
All gates must pass:
- - Code blocks are preserved character-by-character.
- Image links and relative placement are preserved.
- Each lesson resolves one core question.
- Each lesson contains at least one valid MarkdownFlow interaction, max five interactions total.
- Each lesson includes a minimum teaching loop: setup, explanation, interaction, close.
- Lesson language must be instructional/directive (model-guiding), not pipeline narration.
- Each lesson includes at least one deepening interaction (calibration, boundary check, or counterintuitive prompt).
- Action tasks are either immediately executable or explicitly linked to later modules.
- Variable naming is consistent and traceable.
- No unresolved placeholder variables in learner-facing text.
- Do not wrap full lessons in deterministic blocks (
=== === or !=== !===). - Deterministic blocks are reserved for legally or operationally fixed statements only.
- If an image must remain unchanged, use single-line deterministic syntax per image.
- - Every variable collection step must produce immediate feedback and downstream effect.
- Core knowledge points require visual + textual explanation together.
- Consecutive variable collection cannot exceed three variables.
- Do not recollect the same variable unless explicitly marked as staged comparison.
- Never reference uncollected variables.
- Interaction prompts must be concrete and directly answerable.
- Avoid repetitive interaction semantics across lessons unless comparison intent is explicit.
- INLINECODE42 interactions must branch by option and drive different next steps.
- Every interaction variable must create visible downstream impact.
Rerun Rules
- - Recompute only impacted lessons.
- Recompute dependency-linked lessons when shared variables change.
- Recompute full course only when global source order changes.
Failure Handling
When source quality is weak:
- - Deliver coarse lesson drafts first.
- Mark uncertain spans explicitly.
- Continue with best-effort generation instead of stopping.
Phase 2 Outputs
- - Lesson MarkdownFlow scripts (one file per lesson).
- Course index (lesson id, title, core question, source mapping).
- Global variable table (definition, use, cross-lesson references).
See references/output-contract.md and references/preservation-rules.md.
Phase 2 Validation
- - Lesson scripts, course index, and variable table are all present.
- Code/image preservation is exact and position-safe.
- One-core-question and interaction cap rules are satisfied per lesson.
- No unresolved variables or no-op interactions remain.
- Fallback outputs include explicit uncertainty markers and rerun hints.
Phase 3: Generation
Generate runnable MarkdownFlow scripts for each lesson.
Teaching Pattern Baseline
Use these defaults unless lesson content requires a justified variation:
- 1. Instructional/directive language only (a teaching script, not a final manuscript).
- Variable collection is distributed, not front-loaded.
- Build evidence chain from observation to mechanism to conclusion.
- Use visual-first explanation for abstract concepts, then textual interpretation.
- Every collected variable must immediately affect downstream content.
- Include at least one deepening interaction (calibration, boundary check, or misconception correction).
- Include at least one reusable deliverable.
- Action steps must be immediately executable or explicitly staged for downstream lessons.
- Use carryover statements only if cross-lesson dependency is allowed.
- Avoid exposing internal authoring terms in learner-facing text.
- Keep interaction prompts concrete and answerable.
- INLINECODE45 prompts must branch with distinct feedback paths.
- Repeated interaction patterns are allowed only when framed as staged comparison.
See references/teaching-patterns.md and references/cognitive-techniques.md.
Single-Lesson Generation Strategy
Required anchors:
- 1. Opening objective plus visual cover.
- Evidence-chain explanation.
- At least one effective interaction with visible downstream effect.
- At least one reusable deliverable.
- Lesson close with summary or decision checkpoint.
Optional modules:
- - Viewpoint calibration.
- Misconception correction.
- Dual deliverables (understanding + action).
- Cross-lesson bridge sentence.
- Additional visual-text reinforcement blocks.
Variable Strategy
- - Prefer at most one variable collection per module.
- Max five interactions per lesson (recommended three to four).
- No more than three consecutive variable collections before feedback.
- Reuse global variables when possible; add lesson-local variables only when required.
- Every variable must have downstream utility (branching, depth control, or deliverable variation).
- No unresolved placeholders in learner-facing text.
- Do not recollect the same variable unless explicitly marked as staged comparison.
- Prevent semantic duplicates even when variable names differ.
Visual-Text Coordination
- - If a visual is needed, describe it in natural language (e.g., "Show an image that …").
- Pair every visual instruction with a brief explanation of what the visual is meant to convey.
- Do not inline raw SVG/HTML markup in MarkdownFlow lesson files.
Interaction Design
- - Use no more than one
viewpoint_check in a lesson unless justified. - Each
viewpoint_check must trigger a concrete next action. - If using a "restate-boundary-counterintuitive" pattern, branch by option with distinct content.
Phase 3 Outputs
Return per lesson:
- - INLINECODE50
- INLINECODE51
- INLINECODE52
- INLINECODE53
- INLINECODE54
See references/lesson-template.md.
Phase 3 Validation
- - Minimum teaching loop exists (setup, explanation, interaction, close).
- Interaction outcomes visibly alter downstream content.
- Variable safety rules pass (collect before reference, no duplicate recollection).
- Core concepts satisfy visual-plus-text coordination.
- Script remains valid and runnable MarkdownFlow.
Phase 4: Optimization
Audit and improve existing MarkdownFlow teaching prompts. This phase is not for writing from scratch.
When to Use
- - Gap analysis against source material.
- Script quality upgrades without full rewrites.
- Consistent chapter style with lower runtime failure risk.
Core Method
- 1. Start with a low-friction entry point (cover visual + one light interaction).
- Ensure interactions change downstream logic.
- Keep structure content-driven, not template-driven.
- Build evidence chain: observation/history -> mechanism/data -> conclusion.
- Use visuals for abstract structure and text for mechanism + boundaries.
- Add viewpoint calibration with branching feedback.
- Include concrete correction actions for major misconceptions.
- Keep deliverables executable and reusable.
- Stabilize syntax and variable usage.
See references/optimization-methodology.md.
High-Standard Constraints
- - Include a lesson cover visual by default.
- Keep max interactions per lesson at five (recommended three to four).
- Place interactions at decision points, not only at lesson start.
- Every interaction must trigger immediate feedback plus downstream effect.
- Limit consecutive variable collection to three.
- No uncollected variables in learner-facing text.
- Spread global variable collection across lessons.
- Do not recollect the same variable unless marked as staged comparison.
- Treat semantic duplicates as duplicates even if variable names differ.
- Keep ending structure lesson-appropriate; interactive endings are optional.
- Every core concept needs visual-plus-text explanation.
- Avoid internal authoring terms in learner-facing copy.
- Keep prompts concrete and answerable.
- INLINECODE57 interactions must branch by option.
- Preserve source information density; do not trade substance for fluency.
Optimization Workflow
- 1. Define scope (single lesson vs full course).
- Build coverage matrix: source points -> script coverage.
- Label issue classes:
-
coverage_gap
-
meaning_shift
-
explanation_clarity
-
interaction_no_branching
-
visual_constraints_missing
-
variable_or_syntax_risk
- 4. Apply smallest safe edits first.
- Run checklist validation before final output.
- Re-check visual-text pairing for every core concept.
- Re-check variable lifecycle (collection, reference timing, reuse).
- Re-check semantic duplication in interaction prompts.
- Re-check viewpoint branching and downstream action coupling.
See references/review-checklist.md.
Required Output Style
- - Present conclusion and risk level first.
- Then provide grouped change list by issue class.
- Use file-level references for traceability.
- If duplicate script versions exist, declare the authoritative one.
- If cross-lesson dependency is disallowed, remove dependency text and unbound carryover variables.
Common Failure Patterns
- - Structural edits without content-depth recovery.
- Over-abstraction that drifts from source meaning.
- Hidden cross-lesson variables causing runtime failures.
- Vague prompts that models cannot execute reliably.
- Viewpoint options that still return identical feedback.
- Repeated semantic questions with different variable names.
- Visual tasks without explanatory text.
- Rigid template consistency at the cost of lesson specificity.
Phase 4 Validation
- - Conclusion and risk level are presented first.
- All issue classes are fully audited.
- INLINECODE65 interactions branch and trigger distinct next actions.
- Uncollected variable references and semantic duplicate interactions are removed.
- Output remains runnable with no loss of source information density.
Phase 5: Deployment
Deploy optimized MarkdownFlow lesson scripts to the AI-Shifu platform as live courses.
Prerequisites
- - Python 3 with
requests and python-dotenv packages installed. - CLI script: INLINECODE68
Authentication
See references/cli-reference.md for the full login flow.
When no valid token is available, guide the user through the login process:
- 1. Ask the user to choose their region (China mainland / non-China-mainland).
- For China mainland: use the SMS login flow via
shifu-cli.py login. - For non-China-mainland: instruct the user to log in manually and set
SHIFU_TOKEN in {skillDir}/.env.
Always use CLI commands. Never make raw HTTP/API calls directly.
Course Directory
MarkdownFlow lesson scripts must be organized in a course directory before deployment. See references/course-directory-spec.md for the full specification.
When continuing from Phase 4 (Path A), write optimized scripts into the course directory structure automatically.
CLI Quick Reference
Core deployment commands:
CODEBLOCK1
See references/cli-reference.md for the complete command reference and references/import-json-format.md for the JSON schema.
Deployment Workflow
From pipeline (Path A continuation):
- 1. Write Phase 4 outputs into the course directory (
lessons/, README.md, system-prompt.md, optional structure.json). - Run
build --course-dir <dir> to generate shifu-import.json. - Run
import --new --json-file <dir>/shifu-import.json to create the course. - Run
publish <shifu_bid> to make it live. - Verify via platform URL.
Standalone deployment (Path C):
- 1. Ensure course directory is ready with MarkdownFlow files.
- Run
build, import, publish as above.
Common Management
Use these commands for ongoing course operations (Path D):
CODEBLOCK2
Verification
After any deployment or management operation, verify the result:
- 1. Admin console:
https://app.ai-shifu.cn/shifu/<shifu_bid> (cn) or https://app.ai-shifu.com/shifu/<shifu_bid> (global) - Course preview:
https://app.ai-shifu.cn/c/<shifu_bid>?preview=true (cn) or https://app.ai-shifu.com/c/<shifu_bid>?preview=true (global) - Lesson preview:
https://app.ai-shifu.cn/c/<shifu_bid>?preview=true&lessonid=<outline_bid> (cn) or https://app.ai-shifu.com/c/<shifu_bid>?preview=true&lessonid=<outline_bid> (global) - Use
show <shifu_bid> to get the lesson outline_bid, then check each lesson's MarkdownFlow content, variable collection, and interaction logic.
Phase 5 Validation
- - Import completes without errors.
- Course is accessible via platform URL.
- Lesson count and structure match the source directory.
- Published course is reachable in preview mode.
MarkdownFlow Syntax (Required)
See references/markdownflow-spec.md for the quick reference.
Authoring principle:
- Script text should guide generation behavior.
- Do not output full polished learner prose as fixed text.
- Never lock full lesson bodies inside deterministic blocks.
- For fixed images, use one deterministic line per image.
- After each interaction, restate learner selection and reflect it in downstream content.
- For input prompts, include example phrasing to reduce blank responses.
- Treat ... as a structural input marker, not as decorative punctuation.
- For pure input, place ... directly before the prompt text: ?[%{{var}} ...Prompt text].
- For select + input, place ... at the start of the option that opens free text: ...Other, please specify.
- Never place ... at the end of prompt text or option labels.
Common syntax mistakes to avoid:
- Incorrect: ?[%{{var}} Prompt text...]
- Incorrect: ?[%{{var}} Option A | Option B | Other, please specify...]
- Correct: ?[%{{var}} ...Prompt text]
- Correct: INLINECODE105
Shared Constraints
Preservation Rules
See references/preservation-rules.md.
Must preserve:
- - Code content and fence language.
- Image URLs, alt text, and relative placement.
- Domain terms and factual statements.
Can normalize:
- - Speech filler.
- Sentence breaks and punctuation.
- Redundant transitions.
Variable Rules
- - Collect before reference; never use uncollected variables.
- No more than three consecutive variable collections before feedback.
- Max five interactions per lesson (recommended three to four).
- Every variable must produce downstream utility.
- No unresolved placeholders in learner-facing text.
- Do not recollect the same variable unless explicitly marked as staged comparison.
- Prevent semantic duplicates even when variable names differ.
- Reuse global variables when possible.
Interaction Rules
- - Each lesson includes at least one deepening interaction (calibration, boundary check, or misconception correction).
- Interaction prompts must be concrete and directly answerable.
- INLINECODE107 interactions must branch by option and drive different next steps.
- Avoid repetitive interaction semantics across lessons unless comparison intent is explicit.
- Every interaction variable must create visible downstream impact.
Validation Checkpoints
Phase 1 (Segmentation)
- - Source span traceability and immutable block preservation.
- One core question per lesson candidate.
Phase 2 (Orchestration)
- - All mandatory gates pass.
- Course index, variable table, and lesson scripts are complete.
Phase 3 (Generation)
- - Teaching loop, variable safety, visual-text coordination.
- Script is valid runnable MarkdownFlow.
Phase 4 (Optimization)
- - All issue classes audited.
- Interaction branching and variable lifecycle validated.
- No loss of source information density.
Phase 5 (Deployment)
- - Import completes without errors.
- Course is accessible and lesson structure matches source.
- Published course is reachable in preview mode.
Report Template
See references/report-template.md.
Examples
- - INLINECODE109
- INLINECODE110
- INLINECODE111
- INLINECODE112
- INLINECODE113
- INLINECODE114
- INLINECODE115
课程创建器
将原始课程材料转换为可运行、优化的MarkdownFlow教学脚本,并将其部署为实时的AI-Shifu课程。
执行模式
- - 标准模式(默认):输入质量足够;完整运行所请求的阶段。
- 降级模式:输入不完整或质量低;生成粗略输出,标记不确定性,并提供有针对性的重新运行提示。
语言解析策略
完整策略请参见 references/language-resolution.md。
按以下严格优先级确定目标语言:
- 1. explicitoutputlanguagerequest
- targetlanguageparameter
- sessionlanguagepreference
- promptlanguagedetection
- sourcematerialdominantlanguage
- defaultfallbacklanguage (en-US)
创作控制输入
在所有阶段使用这些可选控制:
- - courseprofile (json):受众水平、预备知识水平、课时时长目标、课时数量目标和评估模式。
- deliveryconstraints (json):交互密度、平台限制、必须涵盖的主题、避免的主题以及不可协商的源材料片段。
推荐的对象结构请参见 references/input-contract.md。
输出边界
- - 最终输出是 MarkdownFlow 教学脚本。
- 脚本必须是 指令/教学性 的(即,它告诉模型如何教学),而不是面向学习者的精修“最终讲稿/手稿”。
- 避免使用作者侧的元标签,如“知识块 1/2/3”、“课程目标”或“交付物”。将这些作为隐含结构,而非可见叙述。
- 创作规则、流程说明和过程指令保留在技能文档和参考资料中,不出现在课程输出中。
- 内部设计说明仅在必要时以 HTML 注释形式出现。
MarkdownFlow 创作硬性规则(必须遵守)
1) 脚本风格:指令性,非手稿
使用命令式、引导模型的语言。推荐模式:
- - “向学习者解释……”
- “请学习者……”
- “让学习者选择……”
- “收集 {{var}} 后,重述选择并分支……”
禁止模式:
- - 作为面向学习者的最终讲稿的长篇精修散文。
- 作者/教案元叙述(例如,“知识块……”、“在本课中你将……”、“交付物:……”)。
2) 交互语法:提示在外,选项在内
对于 MarkdownFlow 交互,将问题/提示放在语法行之外。
交互行必须仅包含选项(以及在严格必要时包含最简内联提示)。
错误:
?[%{{topic}} 请选择一个主题:A | B | C]
正确:
请学习者选择一个主题。
?[%{{topic}} A | B | C]
3) 强制性锚定 + 下游影响
每次交互后,脚本必须:
- 1. 以指令形式(而非精修叙述)明确重述选择,例如:将学习者的当前选择重述为 {{var}}。
- 使用 {{var}} 创建可见的下游影响(分支解释、示例、练习难度、反馈)。
4) 视觉元素:描述,不内联源码标记
- - 不要在课程 MarkdownFlow 文件中嵌入原始 SVG/HTML 源代码。
- 除非用户明确要求 SVG、HTML、Mermaid、PlantUML、Graphviz 或其他图表源码/标记,否则不要主动生成视觉源代码或图表标记。
- 默认行为:当需要视觉元素时,编写自然语言指令,如“显示一张图片,展示……”,并附上对该视觉元素意图的简要说明。
- 如果用户要求视觉元素但未指定格式,优先使用自然语言图片/图表占位符,而非可执行或可嵌入的图表代码。
流程概览
阶段 1:分段 → 阶段 2:编排 → 阶段 3:生成 → 阶段 4:优化 → 阶段 5:部署
使用路径
路径 A:端到端
从原始材料到实时部署课程,运行所有五个阶段。
- 1. 阶段 1:将原始材料分割成语义单元。
- 阶段 2:编排课程边界并生成脚本。
- 阶段 3:生成每课的 MarkdownFlow 脚本(由阶段 2 内部调用)。
- 阶段 4:审计并优化最终脚本。
- 阶段 5:构建、导入并发布到 AI-Shifu 平台。
路径 B:仅创作
运行阶段 1-4 以生成优化的 MarkdownFlow 脚本,但不进行部署。子路径:
- - 仅分段:仅阶段 1,用于结构化分段和人工审查。
- 仅生成:仅阶段 3,基于现有分段生成课程脚本。
- 仅优化:仅阶段 4,审计和改进现有 MarkdownFlow 脚本。
路径 C:仅部署
仅运行阶段 5,将现有的 MarkdownFlow 文件部署到 AI-Shifu 平台。
路径 D:管理现有课程
使用阶段 5 的管理命令(list, show, update, rename, reorder, delete, publish, archive)对平台上已有的课程进行操作。
阶段 1:分段
将杂乱的课程源材料转换为可靠的中级结构,用于下游课程生成。
工作流程
- 1. 在不改变含义的情况下,移除填充语言和重复措辞。
- 标记不可变块:代码、图片和表格。
- 根据语义连续性而非仅标题进行分段。
- 提出课程边界,每课一个核心问题。
- 返回与源关联的结构化分段。
分段模式
每个分段包括:
- - segmentid
- segmenttype (concept, example, code, image, exercise, transition)
- corepoint
- preserveblock (yes 或 no)
- source_span
传递信号
捕获这些字段以提升下游教学质量:
- - learnerhook:能触发学习者反思的陈述。
- evidencetype:历史、现象、数据、机制或结论之一。
- visualcue:适合 SVG/HTML 视觉支持的材料片段。
- conceptconflict:用于认知对比的候选概念冲突。
- boundarycue:有效性边界的线索。
- actioncue:可转化为即时或阶段性行动的线索。
- densitycue:不应被稀释的高信息量块。
- quotecue:值得保留的原始措辞。
- visualtextpaircue:用于“先视觉,后解释”块的线索。
- interactionintentcue:意图标签,如诊断、分支、校准、比较。
- comparecue:用于前后对比的候选提示。
阶段 1 输出
- - 有序的分段列表。
- 课程边界候选。
- 每课一个核心问题。
- 保留块索引。
- 完整的传递信号包。
参见 references/segmentation-rules.md。
阶段 1 验证
- - 分段输出以可追溯的顺序覆盖所有有效的源范围。
- 代码/图片/表格块保持原始位置和格式。
- 每个课程候选对应一个核心问题。
- 传递信号字段完整且下游可用。
- 清理不会改变关键事实或术语。
阶段 2:编排
通过协调分段和生成,将原始课程材料转换为可运行的课程级 MarkdownFlow 脚本。
工作流程
- 1. 标准化源顺序并合并输入材料。
- 运行阶段 1 进行清理和语义分段。
- 生成课程切分候选,每个对应一个核心问题。
- 运行阶段 3 生成课程级 MarkdownFlow 脚本。
- 构建课程索引和全局变量表。
- 通过严格门控仅重新计算失败的课程。
强制性门控
所有门控必须通过:
- - 代码块逐字符保留。
- 图片链接和相对位置保留。
- 每课解决一个核心问题。
- 每课至少包含一个有效的 MarkdownFlow 交互,最多五个交互。
- 每课包含一个最小教学循环:设置、解释、交互、收尾。
- 课程语言必须是教学/指令性(引导模型),而非流程叙述。
- 每课至少包含一个深化交互(校准、边界检查或反直觉提示)。
- 行动任务要么立即可执行,要么明确链接到后续模块。
- 变量命名一致且可追溯。
- 面向学习者的文本中没有未解决的占位符变量。
- 不要将完整课程包裹在确定性块中(=== === 或 !=== !===)。
- 确定性块仅保留给法律或操作上固定的陈述。
- 如果图片必须保持不变,每张图片使用单行确定性语法。
- - 每个变量收集步骤必须产生即时反馈和下游影响。
- 核心知识点需要视觉和文本解释相结合。
- 连续变量收集不得超过三个变量。
- 除非明确标记为阶段性比较,否则不要重新收集同一变量。
- 切勿引用未收集的变量。
- 交互提示必须具体且可直接回答。
- 除非比较意图明确,否则避免跨课程重复交互语义。