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
chore: let a learning-app warm-up quote a level index page (#129)
Wesam Abousaidccca2da9a19c
diff --git a/.github/compat/learn.txt b/.github/compat/learn.txtindex 030ad42..cad51b5 100644--- a/.github/compat/learn.txt+++ b/.github/compat/learn.txt@@ -7,3 +7,11 @@ b-3 docs/beginner/03-first-change.mdb-4 docs/beginner/04-keep-a-session-on-track.mdb-5 docs/beginner/05-project-memory.mdb-capstone docs/beginner/capstone.md++# Level indexes a warm-up may quote, in the same form: the id <level>-index,+# then the page, which must be docs/<level>/README.md. A warm-up of any level+# whose from line names one quotes that page; an index has no lesson file of+# its own.+beginner-index docs/beginner/README.md+intermediate-index docs/intermediate/README.md+advanced-index docs/advanced/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-from-outside-warmup/fixture.json b/.github/scripts/fixtures/lesson-quotes-from-outside-warmup/fixture.jsonindex dc64551..dd69d92 100644--- a/.github/scripts/fixtures/lesson-quotes-from-outside-warmup/fixture.json+++ b/.github/scripts/fixtures/lesson-quotes-from-outside-warmup/fixture.json@@ -4,5 +4,8 @@"env": {"LEARN_DIR": "practice"},- "about": "A Worked example step with a from line: only a warm-up quotes an earlier lesson, so its quotes still come from its own page."+ "about": "A Worked example step with a from line: only a warm-up quotes an earlier lesson, so its quotes still come from its own page.",+ "output": [+ "b-2\\.md has a from line in W1 \\| Worked example step 1 of 1 \\| Plan mode, which isn't a warm-up: only a warm-up quotes an earlier lesson or a level index\\."+ ]}diff --git a/.github/scripts/fixtures/lesson-quotes-index-cross-level/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-cross-level/fixture.jsonnew file mode 100644index 0000000..a011f1d--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-cross-level/fixture.json@@ -0,0 +1,11 @@+{+ "rule": "lesson-quotes",+ "expect": "pass",+ "env": {+ "LEARN_DIR": "practice"+ },+ "about": "An Intermediate warm-up quotes the Beginner index: a warm-up may quote any listed level index, as it may quote a lesson from another level.",+ "output": [+ "PASS lesson-quotes: 1 lesson\\(s\\) in the app match their lesson files, and 1 warm-up\\(s\\) quote one of the 1 level index\\(es\\) listed"+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/.github/compat/learn.txtnew file mode 100644index 0000000..7b9cb74--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++beginner-index docs/beginner/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/docs/beginner/README.md b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/docs/beginner/README.mdnew file mode 100644index 0000000..b8b4462--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/docs/beginner/README.md@@ -0,0 +1,7 @@+# Beginner++<sub>**Beginner** · about 2 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## By the end of this level you can++- [ ] Rewind a change you don't want.diff --git a/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/practice/i-1.md b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/practice/i-1.mdnew file mode 100644index 0000000..d0e283c--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-cross-level/tree/practice/i-1.md@@ -0,0 +1,36 @@+---+lesson: i-1+title: "Demo lesson"+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## intro+- minutes: "about 15 minutes"++## warm-up++### R1 | Warm-up | Undo+- tier: challenge+- skill: rewind+- from: beginner-index+- beat: ask+- ask: What can you do since Beginner?+- right: "Rewind a change you don't want."++## steps++### W1 | Worked example step 1 of 1 | A skill+- tier: guided+- skill: skill+- where: claude+- beat: do+- verify: self+- do: "Write a skill."++### Y1 | Your turn step 1 of 1 | By name+- tier: hinted+- skill: skill-run+- where: claude+- beat: do+- verify: self+- goal: "Run your skill by name."diff --git a/.github/scripts/fixtures/lesson-quotes-index-gone/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-gone/fixture.jsonnew file mode 100644index 0000000..b5ed4bd--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-gone/fixture.json@@ -0,0 +1,12 @@+{+ "rule": "lesson-quotes",+ "expect": "fail",+ "env": {+ "LEARN_DIR": "practice"+ },+ "about": "The level index reworded a line and a code block that a warm-up quotes from it, though the warm-up's own lesson still has the old line.",+ "output": [+ "i-1\\.md quotes \"\\*\\*Hooks:\\*\\* something must happen every time at a set point in a session\\.\" \\(R1 \\| Warm-up \\| Which one, when, from docs/intermediate/README\\.md\\), which is no longer in that level index\\.",+ "i-1\\.md shows a code block starting \"git fetch https://github\\.com/wesammustafa/claude-code-practice main\" \\(R2 \\| Warm-up \\| Bring the checks in, from docs/intermediate/README\\.md\\), which is no longer in that level index\\."+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-gone/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/.github/compat/learn.txtnew file mode 100644index 0000000..3b76390--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++intermediate-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-gone/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..770a624--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/docs/intermediate/01-demo.md@@ -0,0 +1,22 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++**Hooks:** something must happen every time at a set point in a session.++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-gone/tree/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/docs/intermediate/README.mdnew file mode 100644index 0000000..850563d--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point, whatever Claude decides.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/fixtures/lesson-quotes-index-gone/tree/practice/i-1.md b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/practice/i-1.mdnew file mode 100644index 0000000..8c36f08--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-gone/tree/practice/i-1.md@@ -0,0 +1,50 @@+---+lesson: i-1+title: "Demo lesson"+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## intro+- minutes: "about 15 minutes"++## warm-up++### R1 | Warm-up | Which one, when+- tier: challenge+- skill: extend+- from: intermediate-index+- beat: ask+- ask: Which one fits a workflow you repeat?+- right: "**Skills:**"+- wrong: "**Hooks:**"+- because: "**Hooks:** something must happen every time at a set point in a session."+- reveal: "**Skills:** you give Claude the same instructions or workflow again and again."++### R2 | Warm-up | Bring the checks in+- tier: challenge+- skill: update-copy+- from: intermediate-index+- beat: show+```+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```+- reveal: "Bring the checks in from the template, in your copy:"++## steps++### W1 | Worked example step 1 of 1 | A skill+- tier: guided+- skill: skill+- where: claude+- beat: do+- verify: self+- do: "Write a skill."++### Y1 | Your turn step 1 of 1 | By name+- tier: hinted+- skill: skill-run+- where: claude+- beat: do+- verify: self+- goal: "Run your skill by name."diff --git a/.github/scripts/fixtures/lesson-quotes-index-match/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-match/fixture.jsonnew file mode 100644index 0000000..6b21612--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-match/fixture.json@@ -0,0 +1,11 @@+{+ "rule": "lesson-quotes",+ "expect": "pass",+ "env": {+ "LEARN_DIR": "practice"+ },+ "about": "A warm-up whose from line names a level index quotes the index page and shows one of its code blocks; the index has no lesson file of its own.",+ "output": [+ "PASS lesson-quotes: 1 lesson\\(s\\) in the app match their lesson files, and 2 warm-up\\(s\\) quote one of the 1 level index\\(es\\) listed"+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-match/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-match/tree/.github/compat/learn.txtnew file mode 100644index 0000000..3b76390--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-match/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++intermediate-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-match/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-match/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-match/tree/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-match/tree/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-match/tree/docs/intermediate/README.mdnew file mode 100644index 0000000..cf4eba7--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-match/tree/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point in a session.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/fixtures/lesson-quotes-index-match/tree/practice/i-1.md b/.github/scripts/fixtures/lesson-quotes-index-match/tree/practice/i-1.mdnew file mode 100644index 0000000..8c36f08--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-match/tree/practice/i-1.md@@ -0,0 +1,50 @@+---+lesson: i-1+title: "Demo lesson"+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## intro+- minutes: "about 15 minutes"++## warm-up++### R1 | Warm-up | Which one, when+- tier: challenge+- skill: extend+- from: intermediate-index+- beat: ask+- ask: Which one fits a workflow you repeat?+- right: "**Skills:**"+- wrong: "**Hooks:**"+- because: "**Hooks:** something must happen every time at a set point in a session."+- reveal: "**Skills:** you give Claude the same instructions or workflow again and again."++### R2 | Warm-up | Bring the checks in+- tier: challenge+- skill: update-copy+- from: intermediate-index+- beat: show+```+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```+- reveal: "Bring the checks in from the template, in your copy:"++## steps++### W1 | Worked example step 1 of 1 | A skill+- tier: guided+- skill: skill+- where: claude+- beat: do+- verify: self+- do: "Write a skill."++### Y1 | Your turn step 1 of 1 | By name+- tier: hinted+- skill: skill-run+- where: claude+- beat: do+- verify: self+- goal: "Run your skill by name."diff --git a/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/fixture.jsonnew file mode 100644index 0000000..44cb9ae--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/fixture.json@@ -0,0 +1,12 @@+{+ "rule": "lesson-quotes",+ "expect": "fail",+ "env": {+ "LEARN_DIR": "practice"+ },+ "about": "A Worked example step with a from line naming its level index: only a warm-up quotes a level index, so the step's quote still comes from its own page.",+ "output": [+ "i-1\\.md has a from line in W1 \\| Worked example step 1 of 1 \\| A skill, which isn't a warm-up: only a warm-up quotes an earlier lesson or a level index\\.",+ "i-1\\.md quotes \"\\*\\*Skills:\\*\\* you give Claude the same instructions or workflow again and again\\.\" \\(W1 \\| Worked example step 1 of 1 \\| A skill\\), which is no longer in the lesson\\."+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/.github/compat/learn.txtnew file mode 100644index 0000000..3b76390--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++intermediate-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/docs/intermediate/README.mdnew file mode 100644index 0000000..cf4eba7--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point in a session.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/practice/i-1.md b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/practice/i-1.mdnew file mode 100644index 0000000..8ea74c6--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-outside-warmup/tree/practice/i-1.md@@ -0,0 +1,52 @@+---+lesson: i-1+title: "Demo lesson"+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## intro+- minutes: "about 15 minutes"++## warm-up++### R1 | Warm-up | Which one, when+- tier: challenge+- skill: extend+- from: intermediate-index+- beat: ask+- ask: Which one fits a workflow you repeat?+- right: "**Skills:**"+- wrong: "**Hooks:**"+- because: "**Hooks:** something must happen every time at a set point in a session."+- reveal: "**Skills:** you give Claude the same instructions or workflow again and again."++### R2 | Warm-up | Bring the checks in+- tier: challenge+- skill: update-copy+- from: intermediate-index+- beat: show+```+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```+- reveal: "Bring the checks in from the template, in your copy:"++## steps++### W1 | Worked example step 1 of 1 | A skill+- tier: guided+- skill: skill+- from: intermediate-index+- where: claude+- beat: do+- verify: self+- do: "Write a skill."+- note: "**Skills:** you give Claude the same instructions or workflow again and again."++### Y1 | Your turn step 1 of 1 | By name+- tier: hinted+- skill: skill-run+- where: claude+- beat: do+- verify: self+- goal: "Run your skill by name."diff --git a/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/.github/compat/learn.txtnew file mode 100644index 0000000..3b76390--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++intermediate-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/docs/intermediate/README.mdnew file mode 100644index 0000000..cf4eba7--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/base/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point in a session.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/fixtures/lesson-quotes-index-pr-warn/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/fixture.jsonnew file mode 100644index 0000000..9b1f0c9--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/fixture.json@@ -0,0 +1,11 @@+{+ "rule": "lesson-quotes",+ "expect": "warn",+ "env": {+ "LEARN_DIR": ""+ },+ "about": "Offline, a pull request that changes a level index the app's warm-ups can quote gets a warning to run the comparison locally.",+ "output": [+ "docs/intermediate/README\\.md changed, and the practice template's learning app can quote it in a warm-up from intermediate-index\\. Before you merge, run LEARN_DIR="+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/.github/compat/learn.txtnew file mode 100644index 0000000..3b76390--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++intermediate-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/docs/intermediate/README.mdnew file mode 100644index 0000000..b3c9a0b--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-pr-warn/tree/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup, shaped to your project.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point in a session.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/fixtures/lesson-quotes-index-unknown/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-unknown/fixture.jsonnew file mode 100644index 0000000..37e77ad--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unknown/fixture.json@@ -0,0 +1,11 @@+{+ "rule": "lesson-quotes",+ "expect": "fail",+ "env": {+ "LEARN_DIR": "practice"+ },+ "about": "A warm-up's from line names a level index that learn.txt doesn't list, though the quote is on the listed index.",+ "output": [+ "i-1\\.md has a warm-up \\(R1 \\| Warm-up \\| Which one, when\\) from expert-index, which \\.github/compat/learn\\.txt doesn't list; the level indexes it lists are intermediate-index\\."+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/.github/compat/learn.txtnew file mode 100644index 0000000..3b76390--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++intermediate-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/docs/intermediate/README.mdnew file mode 100644index 0000000..cf4eba7--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point in a session.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/practice/i-1.md b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/practice/i-1.mdnew file mode 100644index 0000000..d59e0c4--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unknown/tree/practice/i-1.md@@ -0,0 +1,50 @@+---+lesson: i-1+title: "Demo lesson"+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## intro+- minutes: "about 15 minutes"++## warm-up++### R1 | Warm-up | Which one, when+- tier: challenge+- skill: extend+- from: expert-index+- beat: ask+- ask: Which one fits a workflow you repeat?+- right: "**Skills:**"+- wrong: "**Hooks:**"+- because: "**Hooks:** something must happen every time at a set point in a session."+- reveal: "**Skills:** you give Claude the same instructions or workflow again and again."++### R2 | Warm-up | Bring the checks in+- tier: challenge+- skill: update-copy+- from: intermediate-index+- beat: show+```+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```+- reveal: "Bring the checks in from the template, in your copy:"++## steps++### W1 | Worked example step 1 of 1 | A skill+- tier: guided+- skill: skill+- where: claude+- beat: do+- verify: self+- do: "Write a skill."++### Y1 | Your turn step 1 of 1 | By name+- tier: hinted+- skill: skill-run+- where: claude+- beat: do+- verify: self+- goal: "Run your skill by name."diff --git a/.github/scripts/fixtures/lesson-quotes-index-unquoted/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-unquoted/fixture.jsonnew file mode 100644index 0000000..f58f739--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unquoted/fixture.json@@ -0,0 +1,11 @@+{+ "rule": "lesson-quotes",+ "expect": "pass",+ "env": {+ "LEARN_DIR": "practice"+ },+ "about": "learn.txt lists a level index that no warm-up quotes, and the summary says so.",+ "output": [+ "PASS lesson-quotes: 1 lesson\\(s\\) in the app match their lesson files, and 0 warm-up\\(s\\) quote one of the 1 level index\\(es\\) listed"+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/.github/compat/learn.txtnew file mode 100644index 0000000..3b76390--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++intermediate-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/docs/intermediate/README.mdnew file mode 100644index 0000000..cf4eba7--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point in a session.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/practice/i-1.md b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/practice/i-1.mdnew file mode 100644index 0000000..3852c71--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-unquoted/tree/practice/i-1.md@@ -0,0 +1,35 @@+---+lesson: i-1+title: "Demo lesson"+stamp: "Verified against Claude Code v2.1.285 (stable) on 2026-10-05"+---++## intro+- minutes: "about 15 minutes"++## warm-up++### R1 | Warm-up | A skill+- tier: challenge+- skill: skill+- beat: ask+- ask: What did you do in W1?+- right: "Write a skill."++## steps++### W1 | Worked example step 1 of 1 | A skill+- tier: guided+- skill: skill+- where: claude+- beat: do+- verify: self+- do: "Write a skill."++### Y1 | Your turn step 1 of 1 | By name+- tier: hinted+- skill: skill-run+- where: claude+- beat: do+- verify: self+- goal: "Run your skill by name."diff --git a/.github/scripts/fixtures/lesson-quotes-index-wrong-page/fixture.json b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/fixture.jsonnew file mode 100644index 0000000..68f7b5f--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/fixture.json@@ -0,0 +1,11 @@+{+ "rule": "lesson-quotes",+ "expect": "fail",+ "env": {+ "LEARN_DIR": ""+ },+ "about": "learn.txt pairs a level index id with another level's page. It fails offline too, since it needs no lesson file.",+ "output": [+ "\\.github/compat/learn\\.txt lists beginner-index as docs/intermediate/README\\.md, but a level index's page is docs/beginner/README\\.md"+ ]+}diff --git a/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/.github/compat/learn.txt b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/.github/compat/learn.txtnew file mode 100644index 0000000..eaf0809--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/.github/compat/learn.txt@@ -0,0 +1,3 @@+i-1 docs/intermediate/01-demo.md++beginner-index docs/intermediate/README.mddiff --git a/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/docs/intermediate/01-demo.md b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/docs/intermediate/01-demo.mdnew file mode 100644index 0000000..4dec420--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/docs/intermediate/01-demo.md@@ -0,0 +1,15 @@+# Demo lesson++<sub>**Intermediate** · Lesson 1 of 8 · about 15 minutes · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++## Worked example++1. Write a skill.++## Your turn++1. Run your skill by name.++## Check++Run the check.diff --git a/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/docs/intermediate/README.md b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/docs/intermediate/README.mdnew file mode 100644index 0000000..cf4eba7--- /dev/null+++ b/.github/scripts/fixtures/lesson-quotes-index-wrong-page/tree/docs/intermediate/README.md@@ -0,0 +1,23 @@+# Intermediate++<sub>**Intermediate** · about 3 hours · Verified against Claude Code v2.1.285 (stable) on 2026-10-05</sub>++One developer's setup.++## Practice++Bring the checks in from the template, in your copy:++```bash+git fetch https://github.com/wesammustafa/claude-code-practice main+git checkout FETCH_HEAD -- checks capstone+```++## When to use what++- **Skills:** you give Claude the same instructions or workflow again and again.+- **Hooks:** something must happen every time at a set point in a session.++## By the end of this level you can++- [ ] Write a hook that enforces a rule, and show it firing.diff --git a/.github/scripts/rules/lesson-quotes.mjs b/.github/scripts/rules/lesson-quotes.mjsindex aec2c51..37ca022 100644--- a/.github/scripts/rules/lesson-quotes.mjs+++ b/.github/scripts/rules/lesson-quotes.mjs@@ -3,18 +3,21 @@// template); .github/compat/learn.txt lists them. In a lesson file, every// double-quoted `- key: "…"` value is the lesson's own text, except in a// warm-up block, whose `- from: <lesson>` line points its quotes at that-// earlier lesson's page. A fenced code block in a lesson file is a block of-// that page, line for line, less the indent the page's fence has, and the-// lines inside it are code, never quotes or headings. This rule fails when-// such a quote or block, the title, the Stamp or a step count no longer-// matches its lesson, or a block doesn't close. It reads each line and-// the front matter as the app does (learn/lib/content.mjs and-// checks/frontmatter.mjs in the template), so no spacing, quoting or line-// ending the app accepts can hide a quote. It needs the template's lesson-// files: with LEARN_DIR set to a template checkout's learn/lessons folder, any-// mode reads them there; the weekly scheduled run fetches them from the-// template's main branch. A pull request run without LEARN_DIR stays offline-// and only warns when the change touches a listed lesson.+// earlier lesson's page, or whose `- from: <level>-index` line points them at+// that level's index page (docs/<level>/README.md, any level), which learn.txt+// also lists. A fenced code block in a lesson file is a block of that page,+// line for line, less the indent the page's fence has, and the lines inside it+// are code, never quotes or headings. This rule fails when such a quote or+// block, the title, the Stamp or a step count no longer matches its lesson, or+// a block doesn't close. It reads each line and the front matter as the app+// does (learn/lib/content.mjs and checks/frontmatter.mjs in the template), so+// no spacing, quoting or line ending the app accepts can hide a quote. It+// needs the template's lesson files: with LEARN_DIR set to a template+// checkout's learn/lessons folder, any mode reads them there; the weekly+// scheduled run fetches them from the template's main branch. A pull request+// run without LEARN_DIR stays offline and only warns when the change touches a+// listed lesson or level index. In every mode it fails when learn.txt pairs a+// level index id with a page other than docs/<level>/README.md.import { existsSync, readFileSync } from 'node:fs';import { join, resolve } from 'node:path';import { readText } from '../lib/tree.mjs';@@ -96,10 +99,15 @@ function frontmatter(text) {return fields;}+// A `<level>-index` id names a level's index page, docs/<level>/README.md,+// which warm-ups may quote; it has no lesson file of its own. `level` is set+// only on such an entry.+const indexLevel = (id) => id.match(/^([a-z]+)-index$/)?.[1] ?? null;+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 }; });+ .map((l) => { const [lesson, page] = l.split(/\s+/); return { lesson, page, level: indexLevel(lesson) }; });}async function lessonFile(root, lesson) {@@ -121,13 +129,15 @@ function stepCount(text, name) {return count;}-// `pages` maps every listed lesson id whose page exists to its page, text and-// fenced blocks, for the lesson itself and for warm-ups; `listed` holds every-// listed lesson id.+// `pages` maps every listed lesson or level index id whose page exists to+// its page, text and fenced blocks, for the lesson itself and for warm-ups;+// `listed` maps every listed id to its learn.txt entry. It returns the+// problems and how many warm-ups quote a level index.function compare(lesson, page, rawPage, rawFile, pages, listed) {const pageText = rawPage.replace(/\r\n?/g, '\n');const file = rawFile.replace(/\r\n?/g, '\n');const problems = [];+ let indexWarmups = 0;const say = (msg) => problems.push(`${page}: the app's learn/lessons/${lesson}.md ${msg}`);const stamp = pageText.match(STAMP)?.[0];const fields = frontmatter(rawFile);@@ -144,10 +154,11 @@ function compare(lesson, page, rawPage, rawFile, pages, listed) {for (let i = 0; i < lines.length; i += 1) {const line = lines[i];// What a block or quote on this line is compared with: the lesson's own- // page, or in a warm-up the earlier lesson its `from` line names.+ // page, or in a warm-up the earlier lesson or level index its `from`+ // line names.const source = pages.get(from ?? lesson);const where = from ? `, from ${source?.page}` : '';- const that = from ? 'that lesson' : 'the lesson';+ const that = !from ? 'the lesson' : listed.get(from).level ? 'that level index' : 'that lesson';const open = line.match(LESSON_FENCE);if (open) {const end = lines.findIndex((l, k) => k > i && closes(open[1], l));@@ -177,43 +188,62 @@ function compare(lesson, page, rawPage, rawFile, pages, listed) {}const f = line.match(/^- from: (\S+)$/);if (f) {- if (!warmup) say(`has a from line in ${heading}, which isn't a warm-up: only a warm-up quotes an earlier lesson.`);- else if (!listed.has(f[1])) say(`has a warm-up (${heading}) from ${f[1]}, which ${LIST} doesn't list.`);- else from = f[1];+ if (!warmup) say(`has a from line in ${heading}, which isn't a warm-up: only a warm-up quotes an earlier lesson or a level index.`);+ else if (!listed.has(f[1])) {+ const known = [...listed.values()].filter((l) => l.level).map((l) => l.lesson);+ const hint = !indexLevel(f[1]) ? '' : known.length ? `; the level indexes it lists are ${known.join(', ')}` : '; it lists no level index';+ say(`has a warm-up (${heading}) from ${f[1]}, which ${LIST} doesn't list${hint}.`);+ } else {+ from = f[1];+ if (listed.get(from).level) indexWarmups += 1;+ }continue;}const q = line.match(/^- [a-z-]+: (.+)$/)?.[1].trim().match(/^"(.*)"$/);if (q && source && !source.body.includes(flat(q[1]))) say(`quotes "${q[1]}" (${heading}${where}), which is no longer in ${that}.`);}- return problems;+ return { problems, indexWarmups };}export async function run(ctx) {- const lessons = listed(ctx.root);+ const entries = listed(ctx.root);+ const lessons = entries.filter((l) => !l.level);+ const indexes = entries.filter((l) => l.level);+ // A level index paired with another page needs no lesson file to catch, so+ // it fails in every mode.+ const misplaced = indexes.filter((l) => l.page !== `docs/${l.level}/README.md`)+ .map((l) => `${LIST} lists ${l.lesson} as ${l.page}, but a level index's page is docs/${l.level}/README.md`);+ if (misplaced.length) return { status: 'fail', problems: misplaced };if (!lessons.length) return { status: 'pass', summary: `no lessons listed in ${LIST}` };if (!process.env.LEARN_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));+ const touched = entries.filter((l) => changed.has(l.page));if (!touched.length) return { status: 'pass', summary: `${lessons.length} lesson(s) in the app, none changed; the weekly run compares the quotes` };return {status: 'warn',- problems: touched.map((l) => `${l.page} changed, and the practice template's learning app quotes it in learn/lessons/${l.lesson}.md. Before you merge, run LEARN_DIR=<template checkout>/learn/lessons node .github/scripts/check.mjs --only lesson-quotes, and if it fails, update the lesson file in the template first.`),+ problems: touched.map((l) => `${l.page} changed, and the practice template's learning app ${l.level ? `can quote it in a warm-up from ${l.lesson}` : `quotes it in learn/lessons/${l.lesson}.md`}. Before you merge, run LEARN_DIR=<template checkout>/learn/lessons node .github/scripts/check.mjs --only lesson-quotes, and if it fails, update the lesson file in the template first.`),};}const problems = [];- const pages = new Map(lessons.filter((l) => existsSync(join(ctx.root, l.page)))+ const pages = new Map(entries.filter((l) => existsSync(join(ctx.root, l.page))).map((l) => {const text = readText(ctx.root, l.page).replace(/\r\n?/g, '\n');return [l.lesson, { page: l.page, body: flat(text), blocks: fencedBlocks(text) }];}));- for (const { lesson, page } of lessons) {+ const byId = new Map(entries.map((l) => [l.lesson, l]));+ let indexWarmups = 0;+ for (const { lesson, page, level } of entries) {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 lessonFile(ctx.root, lesson), pages, new Set(lessons.map((l) => l.lesson))));+ if (level) continue;+ const found = compare(lesson, page, readText(ctx.root, page), await lessonFile(ctx.root, lesson), pages, byId);+ problems.push(...found.problems);+ indexWarmups += found.indexWarmups;}if (problems.length) return { status: 'fail', problems };- return { status: 'pass', summary: `${lessons.length} lesson(s) in the app match their lesson files` };+ const also = indexes.length ? `, and ${indexWarmups} warm-up(s) quote one of the ${indexes.length} level index(es) listed` : '';+ return { status: 'pass', summary: `${lessons.length} lesson(s) in the app match their lesson files${also}` };}diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex c149b81..36670e9 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -218,7 +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/`) |-| `lesson-quotes` | With `LEARN_DIR` set to a practice template checkout's `learn/lessons` folder, or in the weekly run: a quoted line, a code block, the title, the Stamp or a step count in a lesson file of the template's learning app no longer matches its lesson (a warm-up's quotes and code blocks, the earlier lesson its `from` line names), or a code block has no closing fence. A code block must equal a fenced block of the lesson line for line, blank lines included, less the indent of the lesson's fence, which must be at most three spaces and outside a quote or alert. On a pull request that changes a lesson listed in `learn.txt`, it only warns |+| `lesson-quotes` | With `LEARN_DIR` set to a practice template checkout's `learn/lessons` folder, or in the weekly run: a quoted line, a code block, the title, the Stamp or a step count in a lesson file of the template's learning app no longer matches its lesson (a warm-up's quotes and code blocks, the earlier lesson or the level index its `from` line names), or a code block has no closing fence. A level index page (`docs/<level>/README.md`) can be quoted from any level: `learn.txt` lists it as `<level>-index`, and on any run, pull requests included, the check fails when that id names a different page; only a warm-up names it, as `from: <level>-index`. A code block must equal a fenced block of the lesson line for line, blank lines included, less the indent of the lesson's fence, which must be at most three spaces and outside a quote or alert. On a pull request that changes a lesson or level index listed in `learn.txt`, it only warns |Each rule has known-bad fixtures under `.github/scripts/fixtures/`, one folder per case: `fixture.json` names the rule, the expected result and, optionally, `output` patterns the check's output must match, `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: