# Tutorial Selfloop

Run a tutorial-specific quality gate and write a PASS/FAIL report for the final...

- Repository: https://github.com/WILLOSCAR/research-units-pipeline-skills (517 stars)
- Category: Writing
- License: see repository
- Last updated: 2026-10-05
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill tutorial-selfloop -g -a claude-code -y`
Codex: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill tutorial-selfloop -g -a codex -y`
Cursor: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill tutorial-selfloop -g -a cursor -y`
Gemini CLI: `npx skills add WILLOSCAR/research-units-pipeline-skills --skill tutorial-selfloop -g -a gemini-cli -y`

## Description

Run a tutorial-specific quality gate and write a PASS/FAIL report for the final tutorial deliverable.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# Tutorial Self-Loop

## Triggers & routing

- **Trigger**: tutorial self-loop, tutorial quality gate, tutorial pass/fail, 教程自循环, 教程质量门.
- **Use when**: `source-tutorial` 的 C3，已经有 `output/TUTORIAL.md`，想在交付前确认它满足教程合同而不是普通长文。
- **Skip if**: 还没有 tutorial 正文。
- **Network**: none.
- **Guardrail**: 报告缺口时不要发明内容；把失败清楚地路由回 tutorial 写作阶段。


Goal: converge the tutorial deliverable to a stable teaching-quality bar.

The gate should compare `output/TUTORIAL.md` against the intended module shape from `outline/module_plan.yml`, rather than acting like a generic prose checker.

## Inputs

- `output/TUTORIAL.md`
- `outline/module_plan.yml`

## Outputs

- `output/TUTORIAL_SELFLOOP_TODO.md`

## Checks

- reader orientation section exists
- at least one real module exists
- each module has teaching components, not just a block of prose
- source notes are visible but lightweight

## Script

### Quick Start

- `uv run python .codex/skills/tutorial-selfloop/scripts/run.py --workspace <workspace>`

### All Options

- `--workspace <dir>` (required)
- `--unit-id <U###>`
- `--inputs <semicolon-separated>`
- `--outputs <semicolon-separated>`
- `--checkpoint <C#>`

### Examples

- Run the tutorial gate:
  - `uv run python .codex/skills/tutorial-selfloop/scripts/run.py --workspace <workspace>`

