Repository navigation
Conversation
1 of 3 tasks
# Conflicts: # skills/explain-diff-html/SKILL.md # skills/explain-diff-html/references/validation.md # skills/explain-diff-html/scripts/validate-output.sh
Part of #4. The main branch replaced validate-output.sh with src/validate-output.ts, so the shell checks this branch added move into it.
Part of #4. The skill pins the a/ and b/ diff prefixes, so diff.noprefix cannot break the coverage check. Where a sample run could not follow a rule as written, the rule now says what the run did, such as defining a name the diff creates at its first use.
Part of #4. A fresh run of this branch's SKILL.md wrote each page, and every page passes validate-samples.sh.
malav2110
marked this pull request as ready for review
November 23, 2026 17:59
Part of #4. The coverage check still ignores a file named only in the failure banner, but no test page covers that rule now.
Owner
Author
|
@andyhorn @Aaqibhafeezkhan @AndreIsraelAO @ChristianMurphy @Shachi95 Hi all, would you be up for reviewing this one? It builds on work you each did here. The PR gives every explanation page the same structure and regenerates the samples. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #4. Every page now has a one-sentence lead, a heading per core edit, an "Also changed" table, and a quiz sized to the change. Six of the nine regenerated samples came out shorter, and three came out longer.
Before merge
mainis four commits past this PR's base,issue-4-two-modes. Two of them, Check that code blocks are HTML-escaped #39 and fix: detect raw end tags and comments inside code blocks #45, change the code-block checks insrc/validate-output.ts, which this PR also edits. Bringing inmainmay conflict there.main. Node 22.18.0 and ShellCheck have not run anywhere on this branch.What a page looks like now
The skill writes the lead first: the page's purpose in one sentence. Then it sorts every changed file into one of three groups:
h3.core-step, in the Code walkthrough.For a change over 2,000 changed lines, the skill groups the core edits by theme. Each theme becomes the
h3.core-step, and each core edit inside it anh4.core-edit.The quiz has three questions when the page has at most two core steps, and five otherwise. On a themed page the same cutoff applies to its core edits. When a change has too few testable decisions for that count, the page asks fewer questions and says why.
Background covers only what the core edits need, and runs no longer than the Code walkthrough. When Background has to run longer, the skill's closing report to the user says by how much and why.
Validator checks
This PR adds its checks to
src/validate-output.ts, the TypeScript validator that replacedvalidate-output.shonmain. A page now fails when:The validator also prints the words in each section, and an advisory when Background runs past Code. When a check still fails after the skill's own fix pass, the page carries a banner that names it. No sample carries one.
Samples
A fresh run of the skill on this branch regenerated each sample, and every page passes
validate-samples.sh. Words are totals across sections, as the validator counts them, without code blocks:"Before" is the sample on
main, written by earlier versions of the skill. Each row compares two single runs.On the six shorter pages, both Intuition and the Code walkthrough shrank. The three longer pages cover the most core edits. jsdom v30.1.0 has 9, and fastapi PR 15800 and uPortal PR 2983 have 5 each. The other pages have 2 or 3.
Background grew on eight of the nine pages. It runs past Code on four: fastapi PR 16013, TanStack PR 11242, uPortal PR 2924, and uPortal PR 2945. The runs that explained it traced it to the rule that Background defines every name the walkthrough uses. On a small diff the walkthrough is short. Those definitions then outweigh it.
Some rule changes in this PR came after the sample runs. One lets the walkthrough define a name the diff creates where the name first appears. That change targets the Background overshoot, and the samples do not reflect it yet. The other later changes loosen rules or put existing behavior into words. Every page still passes them.
Testing
On Node 24.22.2,
npm run checkis clean and 108 of 108 tests pass. A fresh build leaves the bundle unchanged, andvalidate-samples.shpasses all nine pages.