feat(release): establish non-installable documentation contract - #318
Draft
davida-ps wants to merge 3 commits into
Draft
feat(release): establish non-installable documentation contract#318davida-ps wants to merge 3 commits into
davida-ps wants to merge 3 commits into
Conversation
Comment on lines
+266
to
+277
| if (/^ *$/.test(rawLine)) { | ||
| continue; | ||
| } | ||
| if (!hasOnlySupportedYamlCharacters(rawLine)) { | ||
| return null; | ||
| } | ||
|
|
||
| const entry = rawLine.match(/^( *)([A-Za-z_][A-Za-z0-9_-]*):(?: +(.*))?$/); | ||
| if (!entry) { | ||
| return null; | ||
| } | ||
|
|
Contributor
There was a problem hiding this comment.
Whitespace-only lines fail validation
The two whitespace skips in scripts/ci/validate_skill_install_docs.mjs only match spaces with /^ *$/, so tab-only blank lines get treated as content and a valid doc can fail validation before NON_INSTALLABLE_DOC_PROLOGUE — should we switch them to /^\s*$/ or equivalent normalization?
Want Baz to fix this for you? Activate Fixer
Other fix methods
Prompt for AI Agents
Before applying, verify this suggestion against the current code. In
scripts/ci/validate_skill_install_docs.mjs around lines 266-335, update the blank-line
detection in both places where whitespace is skipped/checked: the frontmatter scan that
tests rawLine with /^ *$/ and the non-installable prologue scan loop that tests
lines[lineIndex] with /^ *$/. Refactor those checks to be whitespace-aware (e.g.,
replace /^ *$/ with a whitespace-normalized test like /^\s*$/ or by trimming and
comparing to an empty string) so lines containing only tabs or other whitespace are
treated as blank consistently. After the change, ensure the prologue matching still
behaves the same for genuinely empty lines but no longer fails on documents with
tabs-only separators.
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.
Summary
skill.jsoninstallability before applying public Skills CLI documentation rules.installable: false, require the exact non-installable notice as the first nonblank document body line in bothREADME.mdandSKILL.md.Deliberate boundary
This PR establishes the metadata/documentation/offline contract only. It does not interpret later prose or detect public installer commands. That scanner is a separate prerequisite PR, and no skill should adopt
installable: falseuntil that stacked control is proven.The frontmatter recognizer is intentionally narrower than general YAML. It supports the nested mapping, quoted/plain scalar, and simple inline command-list shape needed by the planned internal
claw-releaseskill. The validator runs in workflow paths that do not install repository dependencies, so this unit does not add a YAML runtime dependency or silently widen those workflows.Remote proof
Tested only on
davida@20.14.133.241from a fresh clone of public base2b0bf7f7232de6d8915f1b389d9f74ddc3aa3f6a.Final transferred hashes:
scripts/ci/validate_skill_install_docs.mjs:879dd99b4a98c02362075b602668b868dd8967208e4392fa10795b31806c1ff1scripts/test-skill-install-docs.mjs:498d2e0b40f5efe7a52d892d12975ca1d714d7491e593199cd0706ab9988fe60Passed remotely:
scripts/test-skill-*.mjsnpx tsc --noEmitgit diff --check--alloutput and status versus the unmodified base for current repository skillsNo merge, tag, GitHub Release, skill-store publication, catalog activation, or release action was performed.