Claude Code guide in three levels, Beginner to Advanced: hands-on lessons with checked exercises, every volatile fact cited to its source. Independent community guide.
JavaScript agent-skillsagentic-codingai-agentsanthropicanthropic-claudebest-practicesclaudeclaude-aiclaude-codeclaude-code-guideclaude-code-hooksclaude-code-pluginsclaude-code-skillsclaude-code-tutorialclaude-code-workflowsguidelearn-claude-codemcpsubagentstutorial
checks: compare the practice tutor's quotes with the lessons it quotes (#104)
Wesam Abousaida5ee3c5e3c0f
diff --git a/.github/compat/tutor.txt b/.github/compat/tutor.txtnew file mode 100644index 0000000..b309eee--- /dev/null+++ b/.github/compat/tutor.txt@@ -0,0 +1,4 @@+# Lessons the practice template's /tutor quotes, one per line: the lesson id,+# then the page. The step script is .claude/skills/tutor/steps/<id>.md in the+# template. The tutor-quotes rule compares the two.+b-1 docs/beginner/01-install-and-look-around.mddiff --git a/.github/scripts/fixtures/tutor-quotes-anchor-gone/fixture.json b/.github/scripts/fixtures/tutor-quotes-anchor-gone/fixture.jsonnew file mode 100644index 0000000..b478beb--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-anchor-gone/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "fail",+ "env": {+ "TUTOR_DIR": "practice"+ },+ "about": "The lesson renamed a heading the step script links to."+}diff --git a/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..41bc092--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check your work++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/practice/steps/b-1.md b/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/practice/steps/b-1.mdnew file mode 100644index 0000000..4ec4613--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-anchor-gone/tree/practice/steps/b-1.md@@ -0,0 +1,15 @@+---+lesson: b-1+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## start++### W1 | Worked example step 1 of 2 | in the session+- do: "Type `/status`."+- anchor: check++## your-turn++### Y1 | Your turn step 1 of 1 | in the session+- do: "Ask a question of your own."diff --git a/.github/scripts/fixtures/tutor-quotes-crlf/fixture.json b/.github/scripts/fixtures/tutor-quotes-crlf/fixture.jsonnew file mode 100644index 0000000..917d943--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-crlf/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "fail",+ "env": {+ "TUTOR_DIR": "practice"+ },+ "about": "The lesson reworded a sentence that a step script with Windows line endings quotes."+}diff --git a/.github/scripts/fixtures/tutor-quotes-crlf/generate.mjs b/.github/scripts/fixtures/tutor-quotes-crlf/generate.mjsnew file mode 100644index 0000000..7dc57f8--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-crlf/generate.mjs@@ -0,0 +1,9 @@+import { readFileSync, writeFileSync } from 'node:fs';+import { join } from 'node:path';++// Rewrites the step script with Windows line endings, as a checkout with+// core.autocrlf would, so the rule must still find the reworded quote.+export default function generate(root) {+ const path = join(root, 'practice', 'steps', 'b-1.md');+ writeFileSync(path, readFileSync(path, 'utf8').replace(/\r?\n/g, '\r\n'));+}diff --git a/.github/scripts/fixtures/tutor-quotes-crlf/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-crlf/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-crlf/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-crlf/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-crlf/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..c2a86b8--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-crlf/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Open `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-crlf/tree/practice/steps/b-1.md b/.github/scripts/fixtures/tutor-quotes-crlf/tree/practice/steps/b-1.mdnew file mode 100644index 0000000..4ec4613--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-crlf/tree/practice/steps/b-1.md@@ -0,0 +1,15 @@+---+lesson: b-1+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## start++### W1 | Worked example step 1 of 2 | in the session+- do: "Type `/status`."+- anchor: check++## your-turn++### Y1 | Your turn step 1 of 1 | in the session+- do: "Ask a question of your own."diff --git a/.github/scripts/fixtures/tutor-quotes-match/fixture.json b/.github/scripts/fixtures/tutor-quotes-match/fixture.jsonnew file mode 100644index 0000000..952c4a1--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-match/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "pass",+ "env": {+ "TUTOR_DIR": "practice"+ },+ "about": "The step script's quotes, Stamp, anchor and step counts all match the lesson."+}diff --git a/.github/scripts/fixtures/tutor-quotes-match/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-match/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-match/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-match/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-match/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..e229fc3--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-match/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-match/tree/practice/steps/b-1.md b/.github/scripts/fixtures/tutor-quotes-match/tree/practice/steps/b-1.mdnew file mode 100644index 0000000..4ec4613--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-match/tree/practice/steps/b-1.md@@ -0,0 +1,15 @@+---+lesson: b-1+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## start++### W1 | Worked example step 1 of 2 | in the session+- do: "Type `/status`."+- anchor: check++## your-turn++### Y1 | Your turn step 1 of 1 | in the session+- do: "Ask a question of your own."diff --git a/.github/scripts/fixtures/tutor-quotes-pr-unchanged/base/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/base/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/base/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-pr-unchanged/base/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/base/docs/beginner/01-demo.mdnew file mode 100644index 0000000..e229fc3--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/base/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-pr-unchanged/fixture.json b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/fixture.jsonnew file mode 100644index 0000000..e415953--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "pass",+ "env": {+ "TUTOR_DIR": ""+ },+ "about": "Offline, a pull request that leaves the tutored lessons alone passes without reading the template."+}diff --git a/.github/scripts/fixtures/tutor-quotes-pr-unchanged/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-pr-unchanged/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..e229fc3--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-unchanged/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-pr-warn/base/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-pr-warn/base/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-warn/base/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-pr-warn/base/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-pr-warn/base/docs/beginner/01-demo.mdnew file mode 100644index 0000000..e229fc3--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-warn/base/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-pr-warn/fixture.json b/.github/scripts/fixtures/tutor-quotes-pr-warn/fixture.jsonnew file mode 100644index 0000000..16a9147--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-warn/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "warn",+ "env": {+ "TUTOR_DIR": ""+ },+ "about": "Offline, a pull request that changes a tutored lesson gets a warning to run the comparison locally."+}diff --git a/.github/scripts/fixtures/tutor-quotes-pr-warn/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-pr-warn/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-warn/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-pr-warn/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-pr-warn/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..1355587--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-pr-warn/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check in your practice copy.diff --git a/.github/scripts/fixtures/tutor-quotes-quote-gone/fixture.json b/.github/scripts/fixtures/tutor-quotes-quote-gone/fixture.jsonnew file mode 100644index 0000000..f79d0ff--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-quote-gone/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "fail",+ "env": {+ "TUTOR_DIR": "practice"+ },+ "about": "The lesson reworded a sentence the step script quotes."+}diff --git a/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..c2a86b8--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Open `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/practice/steps/b-1.md b/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/practice/steps/b-1.mdnew file mode 100644index 0000000..4ec4613--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-quote-gone/tree/practice/steps/b-1.md@@ -0,0 +1,15 @@+---+lesson: b-1+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## start++### W1 | Worked example step 1 of 2 | in the session+- do: "Type `/status`."+- anchor: check++## your-turn++### Y1 | Your turn step 1 of 1 | in the session+- do: "Ask a question of your own."diff --git a/.github/scripts/fixtures/tutor-quotes-stamp-changed/fixture.json b/.github/scripts/fixtures/tutor-quotes-stamp-changed/fixture.jsonnew file mode 100644index 0000000..e3b7009--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-stamp-changed/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "fail",+ "env": {+ "TUTOR_DIR": "practice"+ },+ "about": "The lesson was restamped, so the step script must be re-verified and restamped too."+}diff --git a/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..6fe561a--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-11-02</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/practice/steps/b-1.md b/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/practice/steps/b-1.mdnew file mode 100644index 0000000..4ec4613--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-stamp-changed/tree/practice/steps/b-1.md@@ -0,0 +1,15 @@+---+lesson: b-1+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## start++### W1 | Worked example step 1 of 2 | in the session+- do: "Type `/status`."+- anchor: check++## your-turn++### Y1 | Your turn step 1 of 1 | in the session+- do: "Ask a question of your own."diff --git a/.github/scripts/fixtures/tutor-quotes-step-added/fixture.json b/.github/scripts/fixtures/tutor-quotes-step-added/fixture.jsonnew file mode 100644index 0000000..6740a49--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-step-added/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "fail",+ "env": {+ "TUTOR_DIR": "practice"+ },+ "about": "The lesson gained a Worked example step, so the step script's step counts are wrong."+}diff --git a/.github/scripts/fixtures/tutor-quotes-step-added/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-step-added/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-step-added/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-step-added/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-step-added/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..f1304da--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-step-added/tree/docs/beginner/01-demo.md@@ -0,0 +1,17 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. Ask a question.+3. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-step-added/tree/practice/steps/b-1.md b/.github/scripts/fixtures/tutor-quotes-step-added/tree/practice/steps/b-1.mdnew file mode 100644index 0000000..4ec4613--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-step-added/tree/practice/steps/b-1.md@@ -0,0 +1,15 @@+---+lesson: b-1+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## start++### W1 | Worked example step 1 of 2 | in the session+- do: "Type `/status`."+- anchor: check++## your-turn++### Y1 | Your turn step 1 of 1 | in the session+- do: "Ask a question of your own."diff --git a/.github/scripts/fixtures/tutor-quotes-title-changed/fixture.json b/.github/scripts/fixtures/tutor-quotes-title-changed/fixture.jsonnew file mode 100644index 0000000..304f391--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-title-changed/fixture.json@@ -0,0 +1,8 @@+{+ "rule": "tutor-quotes",+ "expect": "fail",+ "env": {+ "TUTOR_DIR": "practice"+ },+ "about": "The step script's title no longer matches the lesson's heading."+}diff --git a/.github/scripts/fixtures/tutor-quotes-title-changed/tree/.github/compat/tutor.txt b/.github/scripts/fixtures/tutor-quotes-title-changed/tree/.github/compat/tutor.txtnew file mode 100644index 0000000..1d980f9--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-title-changed/tree/.github/compat/tutor.txt@@ -0,0 +1 @@+b-1 docs/beginner/01-demo.mddiff --git a/.github/scripts/fixtures/tutor-quotes-title-changed/tree/docs/beginner/01-demo.md b/.github/scripts/fixtures/tutor-quotes-title-changed/tree/docs/beginner/01-demo.mdnew file mode 100644index 0000000..e229fc3--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-title-changed/tree/docs/beginner/01-demo.md@@ -0,0 +1,16 @@+# Demo lesson++<sub>**Beginner** · Lesson 1 of 5 · about 20 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Type `/status`.+2. End the session with `/exit`.++## Your turn++1. Ask a question of your own.++## Check++Run the check.diff --git a/.github/scripts/fixtures/tutor-quotes-title-changed/tree/practice/steps/b-1.md b/.github/scripts/fixtures/tutor-quotes-title-changed/tree/practice/steps/b-1.mdnew file mode 100644index 0000000..fb0e265--- /dev/null+++ b/.github/scripts/fixtures/tutor-quotes-title-changed/tree/practice/steps/b-1.md@@ -0,0 +1,16 @@+---+lesson: b-1+title: "An older demo title"+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## start++### W1 | Worked example step 1 of 2 | in the session+- do: "Type `/status`."+- anchor: check++## your-turn++### Y1 | Your turn step 1 of 1 | in the session+- do: "Ask a question of your own."diff --git a/.github/scripts/rules/index.mjs b/.github/scripts/rules/index.mjsindex 5d5c464..fbd6ab9 100644--- a/.github/scripts/rules/index.mjs+++ b/.github/scripts/rules/index.mjs@@ -11,7 +11,8 @@ import * as lessonLint from './lesson-lint.mjs';import * as staticValidation from './static-validation.mjs';import * as inertness from './inertness.mjs';import * as smokeTests from './smoke-tests.mjs';+import * as tutorQuotes from './tutor-quotes.mjs';import * as externalLinks from './external-links.mjs';import * as drift from './drift.mjs';-export const rules = [internalLinks, anchorDiff, stubPaths, stamps, editionGate, expiry, emDash, images, lessonLint, staticValidation, inertness, smokeTests, externalLinks, drift];+export const rules = [internalLinks, anchorDiff, stubPaths, stamps, editionGate, expiry, emDash, images, lessonLint, staticValidation, inertness, smokeTests, tutorQuotes, externalLinks, drift];diff --git a/.github/scripts/rules/tutor-quotes.mjs b/.github/scripts/rules/tutor-quotes.mjsnew file mode 100644index 0000000..9c7d16e--- /dev/null+++ b/.github/scripts/rules/tutor-quotes.mjs@@ -0,0 +1,107 @@+// The practice template's /tutor skill quotes lessons word for word, from one+// step script per lesson; .github/compat/tutor.txt lists them. This rule fails+// when a quote, the title, the Stamp, a linked anchor or a step count in a step+// script no longer matches its lesson, whatever the step script's line endings. It needs the template's step scripts: with+// TUTOR_DIR set to a template checkout's .claude/skills/tutor folder, any mode+// reads them there; the weekly scheduled run fetches them from the template's+// main branch. A pull request run without TUTOR_DIR stays offline and only+// warns when the change touches a listed lesson.+import { existsSync, readFileSync } from 'node:fs';+import { join, resolve } from 'node:path';+import { readText } from '../lib/tree.mjs';+import { changedFiles } from '../lib/git.mjs';+import { outsideFences, pageIds } from '../lib/markdown.mjs';+import { STAMP } from '../lib/stamps.mjs';++export const id = 'tutor-quotes';+export const modes = ['pr', 'scheduled'];++const LIST = '.github/compat/tutor.txt';+const RAW = 'https://raw.githubusercontent.com/wesammustafa/claude-code-practice/main/.claude/skills/tutor';+// Step script keys whose value is lesson text in double quotes.+const QUOTES = new Set(['do', 'rule', 'expect', 'note', 'after', 'own-repo', 'self', 'goal', 'quote', 'bottom', 'on-hint']);+const flat = (text) => text.replace(/\s+/g, ' ').trim();++function listed(root) {+ if (!existsSync(join(root, LIST))) return [];+ return readText(root, LIST).split('\n').map((l) => l.trim()).filter((l) => l && !l.startsWith('#'))+ .map((l) => { const [lesson, page] = l.split(/\s+/); return { lesson, page }; });+}++async function stepScript(root, lesson) {+ const dir = process.env.TUTOR_DIR;+ if (dir) return readFileSync(join(resolve(root, dir), 'steps', `${lesson}.md`), 'utf8');+ const res = await fetch(`${RAW}/steps/${lesson}.md`, { signal: AbortSignal.timeout(20_000) });+ if (!res.ok) throw new Error(`the template's steps/${lesson}.md returned ${res.status}`);+ return res.text();+}++// The number of top-level numbered steps under a `## <name>` heading.+function stepCount(text, name) {+ let inside = false;+ let count = 0;+ for (const { line } of outsideFences(text)) {+ if (/^## /.test(line)) inside = line.trim() === `## ${name}`;+ else if (inside && /^\d+\. /.test(line)) count += 1;+ }+ return count;+}++function compare(lesson, page, rawPage, rawScript) {+ const pageText = rawPage.replace(/\r\n?/g, '\n');+ const script = rawScript.replace(/\r\n?/g, '\n');+ const problems = [];+ const say = (msg) => problems.push(`${page}: the tutor's steps/${lesson}.md ${msg}`);+ const body = flat(pageText);+ const stamp = pageText.match(STAMP)?.[0];+ const theirs = script.match(/^stamp: "(.*)"$/m)?.[1];+ if (theirs !== stamp) say(`is stamped "${theirs}", but the lesson is stamped "${stamp}". Re-verify the step script and copy the new Stamp.`);+ const title = script.match(/^title: "(.*)"$/m)?.[1];+ const h1 = pageText.match(/^# (.+)$/m)?.[1]?.trim();+ if (title !== undefined && title !== h1) say(`is titled "${title}", but the lesson's heading is "${h1}".`);+ const ids = pageIds(pageText);+ const recounted = new Set();+ let heading = '(front matter)';+ for (const line of script.split('\n')) {+ const h = line.match(/^### (.+)$/);+ if (h) {+ heading = h[1];+ const counted = h[1].match(/(Worked example|Your turn) step \d+ of (\d+)/);+ if (counted && !recounted.has(counted[1]) && stepCount(pageText, counted[1]) !== Number(counted[2])) {+ recounted.add(counted[1]);+ say(`counts ${counted[2]} steps in ${counted[1]}, but the lesson has ${stepCount(pageText, counted[1])}.`);+ }+ continue;+ }+ const q = line.match(/^- ([a-z-]+): "(.*)"$/);+ if (q && QUOTES.has(q[1]) && !body.includes(flat(q[2]))) say(`quotes "${q[2]}" (${heading}), which is no longer in the lesson.`);+ const a = line.match(/^- anchor: (\S+)$/);+ if (a && !ids.includes(a[1])) say(`links #${a[1]} (${heading}), which the lesson no longer has.`);+ }+ return problems;+}++export async function run(ctx) {+ const lessons = listed(ctx.root);+ if (!lessons.length) return { status: 'pass', summary: `no lessons listed in ${LIST}` };+ if (!process.env.TUTOR_DIR && ctx.mode === 'pr') {+ if (!ctx.base.sha) return { status: 'skip', summary: `diff-scoped: ${ctx.base.note}` };+ const changed = new Set(changedFiles(ctx.root, ctx.base.sha));+ const touched = lessons.filter((l) => changed.has(l.page));+ if (!touched.length) return { status: 'pass', summary: `${lessons.length} tutored lesson(s), none changed; the weekly run compares the quotes` };+ return {+ status: 'warn',+ problems: touched.map((l) => `${l.page} changed, and the practice template's /tutor quotes it in .claude/skills/tutor/steps/${l.lesson}.md. Before you merge, run TUTOR_DIR=<template checkout>/.claude/skills/tutor node .github/scripts/check.mjs --only tutor-quotes, and if it fails, update the step script in the template first.`),+ };+ }+ const problems = [];+ for (const { lesson, page } of lessons) {+ if (!existsSync(join(ctx.root, page))) {+ problems.push(`${LIST} lists ${page}, which doesn't exist`);+ continue;+ }+ problems.push(...compare(lesson, page, readText(ctx.root, page), await stepScript(ctx.root, lesson)));+ }+ if (problems.length) return { status: 'fail', problems };+ return { status: 'pass', summary: `${lessons.length} tutored lesson(s) match their step scripts` };+}diff --git a/.github/workflows/tutor-weekly.yml b/.github/workflows/tutor-weekly.ymlnew file mode 100644index 0000000..930f606--- /dev/null+++ b/.github/workflows/tutor-weekly.yml@@ -0,0 +1,36 @@+name: Weekly tutor quotes++# Runs the tutor-quotes check in scheduled mode: it fetches the practice+# template's /tutor step scripts from its main branch and compares them with+# the lessons they quote. On a problem it opens, or updates, one tracking issue+# titled "Tutor quotes drifted from a lesson". It never opens a pull request.+on:+ schedule:+ - cron: "0 8 * * 1"+ workflow_dispatch:++permissions:+ contents: read+ issues: write++jobs:+ tutor:+ runs-on: ubuntu-latest+ steps:+ - uses: actions/checkout@v7+ - uses: actions/setup-node@v7+ with:+ node-version: lts/*+ - name: Run the check+ id: check+ run: |+ set +e+ node .github/scripts/check.mjs --mode scheduled --only tutor-quotes > "$RUNNER_TEMP/check.txt" 2>&1+ echo "code=$?" >> "$GITHUB_OUTPUT"+ cat "$RUNNER_TEMP/check.txt"+ - name: Open or update the tracking issue+ if: steps.check.outputs.code != '0'+ env:+ GH_TOKEN: ${{ github.token }}+ RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}+ run: .github/scripts/tracking-issue.sh "Tutor quotes drifted from a lesson" "$RUNNER_TEMP/check.txt"diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 2873530..16043ab 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -218,6 +218,7 @@ It needs Node.js LTS, git, Ruby (for YAML), jq (for the examples' smoke tests),| `static-validation` | JSON, YAML, skill or agent frontmatter, a workflow script or a shell script does not parse or lint || `inertness` | `examples/` holds a path Claude Code can load on its own, or a marketplace manifest not renamed to `dot-claude-plugin/`, or the repository root holds a `.claude-plugin/` folder || `smoke-tests` | An example's `test.sh` fails (only when the change touches `examples/`) |+| `tutor-quotes` | With `TUTOR_DIR` set to a practice template checkout's `.claude/skills/tutor` folder, or in the weekly run: a quote, the title, the Stamp, a linked anchor or a step count in a `/tutor` step script no longer matches its lesson. On a pull request that changes a lesson listed in `tutor.txt`, it only warns |Each rule has known-bad fixtures under `.github/scripts/fixtures/`, one folder per case: `fixture.json` names the rule and the expected result, `tree/` holds the files, `base/` the state before a change, and `generate.mjs` writes anything that would be live Claude Code config if committed. If you change a rule, run the self-test too:@@ -234,6 +235,7 @@ Scheduled checks keep watch between editions. Each opens or updates one tracking| Weekly external links | Mondays | Broken external links || Daily expiry markers | Daily | Expired facts in the guide || Weekly version drift | Mondays | New Claude Code stable release |+| Weekly tutor quotes | Mondays | Tutor quotes drifted from a lesson |Every month, the maintainer: