Triggers & routing
- Trigger: tutorial self-loop, tutorial quality gate, tutorial pass/fail, tutorial self-loop, tutorial quality gate.
- Use when:
source-tutorialC3, already hasoutput/TUTORIAL.md, wants to confirm before delivery that it satisfies the tutorial contract rather than being an ordinary long-form article. - Skip if: there is no tutorial body text yet.
- Network: none.
- Guardrail: when reporting gaps, do not invent content; route the failure clearly back to the tutorial writing stage.
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.mdoutline/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>