# Teachany Hepbl

> Runs TeachAny Higher-Education PBL (HE-PBL) course-design decomposition for university professional courses: course knowledge-system graph, PNG report, an interactive project webpage (可编辑项目书 + 小组信息栏 + 提交教师邮箱), and an editable teachany.cn link. Use whenever the user wants project-based learning design, course-level curriculum mapping, 课程设计, 大作业, or a project deliverable for a higher-education course — 高等数学/线性代数/概率论与数理统计, 数据结构/操作系统/ 机器学习, 信号与系统/通信原理/数字信号处理, 电路分析/电力电子/自动控制原理, and similar professional courses — even if they only give a one-line course project goal. Output must include 知识目标/能力目标/素质目标, Bloom's taxonomy alignment, prerequisite chains, and a 文献调研→方案设计→实施验证→成果汇报 workflow. Exclusively for higher education (本科/研究生). Do not use for K-12 中小学课程, generic lesson plans without an academic project deliverable, or interactive courseware HTML (use TeachAny courseware skill instead).

- Skill: `xiucuiguan/teachany-hepbl` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add xiucuiguan/teachany-hepbl`
- Raw SKILL.md: https://api.skillmd.com/api/skills/xiucuiguan/teachany-hepbl/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Web & Frontend
- Author: XiucuiGuan (https://skillmd.com/u/xiucuiguan)
- Updated: 2026-09-22
- Page: https://skillmd.com/skills/xiucuiguan/teachany-hepbl

---


# TeachAnyHEPBL

Turn a **university course project goal** (+ optional discipline / course / deliverable) into:

1. **PNG long image** — structured HE-PBL breakdown + course knowledge-system graph
2. **Interactive webpage** — 与长图内容一致的交互式项目拆解网页，含可在线填写的项目书、小组信息栏，支持一键提交到教师邮箱（规范见 [references/interactive-webpage.md](references/interactive-webpage.md)）
3. **Edit URL** — `https://www.teachany.cn/pbl?...` for chat refinement, node tweaks, courseware

The decomposition uses TeachAny's six-stage pipeline on teachany.cn (LLM + curriculum index). Do not invent knowledge nodes yourself — align against the target course syllabus (课程大纲 / 培养方案) rather than fabricating chapter-level structure.

## Workflow

1. Parse the course project goal and optional fields (see [references/parameters.md](references/parameters.md)). Default `--grade university`.
2. Run the bundled CLI from **this skill directory** (where `SKILL.md` lives):

```bash
python3 scripts/hepbl-decompose.py \
  --goal "用户的项目任务原文" \
  --grade university \
  --subject computer-science \
  -o ./pbl-output
```

3. On first run, install deps if missing: `pip install playwright && playwright install chromium`
4. Draft the HE-PBL design following [references/course-blueprint.md](references/course-blueprint.md) — three-dimension objectives, Bloom's levels, prerequisite chain, academic workflow. Use [references/examples.md](references/examples.md) as style reference.
5. **设计方案权威校准（存在设计方案文档时强制，不得跳过）**：从设计方案逐字提炼 overlay JSON → 运行 `scripts/calibrate_hepbl.py` 重建网页与长图（详见下文「设计方案权威校准门禁」与「技术路线可视化规范」）。
6. Reply with the PNG path, interactive webpage path, node counts from JSON, the three-dimension objectives, and **edit_url** (never include `auto=1` in links you give users).
7. If Playwright fails, follow [references/fallback.md](references/fallback.md) — still return an edit link.

## 受限机器替换脚本（保留原方案，跑不通时改用）

`scripts/hepbl-decompose-local.py` 是原脚本的替换版（原 `hepbl-decompose.py` 保留不动），针对以下已验证的本机问题：

1. **Playwright 自带 Chromium 下载停滞**（CDN 不可达）→ 自动回退 `channel="msedge"` 系统 Edge
2. **360s 超时不够** → `TIMEOUT_MS = 900_000`（pbl 页统一索引 localStorage 超配额，每次全量重建约 100–180s，全流程实测 8–11 分钟，务必后台运行）
3. **goto 偶发 `net::ERR_NETWORK_CHANGED`** → 自动重试 3 次（间隔 5s）

```bash
# 用法与原脚本完全一致（模板仍按 ../assets/hepbl-report.html 相对定位，勿移动）
python scripts/hepbl-decompose-local.py --goal "..." --grade university --subject mathematics -o ./pbl-output
```

排障速查：长图有了但缺交互网页 = 脚本被复制到别处运行导致 `../assets/` 模板找不到（静默跳过，把模板放回同级即可）；本机 SciPy 被 Windows 应用控制策略拦截（`_trlib` DLL），LP 类项目代码一律 PuLP(CBC) 为主、SciPy 用 try/except 设为可选交叉验证（NumPy/PuLP 正常）。

## HE-PBL design standards (required in output)

Every design MUST include:

- **知识目标 / 能力目标 / 素质目标**（three-dimension objectives）
- **Bloom's taxonomy level**（记忆 / 理解 / 应用 / 分析 / 评价 / 创造）per objective
- **前置知识要求**（prerequisite chain to prior courses / chapters）
- **核心概念与难点** mapped to the course knowledge system
- **项目流程**：文献调研 → 方案设计 → 实施验证 → 成果汇报
- **可评估产出** with academic standards（实验报告 / 设计文档 / 答辩）

See [references/course-blueprint.md](references/course-blueprint.md) for the full standard.

## 设计方案权威校准门禁（强制）

存在设计方案文档（如「PBL 项目设计方案」md）时，**引擎拆解只是初稿**，最终交付必须过校准门禁：

1. **逐字提炼 overlay**：节点名、三维目标、约束数字、基准结果（x*/Z*/影子价格）、阶段学时全部从设计方案文档逐字摘取，不得编造或改写。
2. **null 删除污染**：引擎编造字段（`techRoute/pathPlan/projectBlueprint/stats`）在 overlay 中置 `null`，`deep_merge` 时删除；`_` 前缀元数据键剥离。
3. **长图 = 网页**：用 `scripts/calibrate_hepbl.py` 重建网页与长图（Playwright 整页截图，device_scale_factor=2），交付前完成自查（节点名与设计方案一致、payload 零残留、summary 与节点数一致）。
4. **统一标题**：overlay 必须含 `title` 字段（与设计方案标题逐字一致）——网页 Hero、标签页、导出报告、长图标题全部取自 `DATA.title`（缺失回退 goal）。
5. **继续编辑入口**：网页端「在 TeachAnyHE 打开」按钮一键复制 `@skill:TeachAnyHE` 技能调用指令（粘贴到 WorkBuddy 对话框即以高等教育场景继续编辑）；引擎 teachany.cn 链接降级为「TeachAny 引擎初稿」小字链接保留（`DATA.edit_url`）。

## 技术路线可视化规范

- 网页端优先渲染 `techStages[]`（stage/hours/tasks[]/output）+ `toolChain[]`（name/use）分层流程图：工具链 chips → 箭头衔接 → 阶段卡（序号圆点 + 连接线 + 学时徽章 + 任务清单 + 阶段产出）；缺失时回退 `projectPhases` 四段式列表。
- 数据契约与区块结构见 [references/interactive-webpage.md](references/interactive-webpage.md)；完整 overlay 示例见 [references/calibration-example-lp.json](references/calibration-example-lp.json)。

## Output template

```markdown
## HE-PBL 课程设计拆解

**项目**：{title}

![课程知识路径拆解]({png_path})

- **图谱节点**：{nodeCount}（大纲对齐 {matched} · 拓展 {external}）
- **知识目标**：{...}
- **能力目标**：{...}
- **素质目标**：{...}
- **布鲁姆层级**：{...}
- **交互式网页**：[打开项目拆解网页]({html_path})（可在线填写项目书、小组信息并提交教师邮箱）
- **继续编辑**：网页端「在 TeachAnyHE 打开」按钮一键复制技能调用指令（粘贴到 WorkBuddy 对话框即以 HE 场景继续编辑）· 引擎初稿链接：{edit_url}

「在 TeachAnyHE 打开」按钮复制的指令粘贴到 WorkBuddy 对话框，可继续对话修改拆解、调整知识点、一键制作课件。
```

Show the PNG in chat when the environment supports images.

## Why not hand-write the graph?

TeachAny matches nodes against curriculum indexes, runs relevance review, and builds dependency edges. A plain LLM list misses 大纲对齐 and produces fake node IDs.

## Examples

See [references/examples.md](references/examples.md) for a full HE-PBL example library across 数学 / 计算机 / 通信 / 电气 courses. Quick examples:

**Example 1** — 数据结构：`python3 scripts/hepbl-decompose.py --goal "设计校园导航最短路径系统…" --grade university --subject computer-science --deliverable engineering-prototype -o ./pbl-output`

**Example 2** — 信号与系统：`python3 scripts/hepbl-decompose.py --goal "FIR 滤波器设计与频谱分析…" --grade university --subject communications --deliverable simulation-report -o ./pbl-output`

## Additional resources

- Parameter reference: [references/parameters.md](references/parameters.md)
- HE-PBL design standard: [references/course-blueprint.md](references/course-blueprint.md)
- Interactive webpage spec: [references/interactive-webpage.md](references/interactive-webpage.md)
- Example library: [references/examples.md](references/examples.md)
- Playwright unavailable: [references/fallback.md](references/fallback.md)

