Skip to content

feat(release): establish non-installable documentation contract - #318

Draft
davida-ps wants to merge 3 commits into
davida-ps/controlled-tag-creation-v1from
davida-ps/noninstallable-doc-contract-v1
Draft

feat(release): establish non-installable documentation contract#318
davida-ps wants to merge 3 commits into
davida-ps/controlled-tag-creation-v1from
davida-ps/noninstallable-doc-contract-v1

Conversation

@davida-ps

@davida-ps davida-ps commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Resolve skill.json installability before applying public Skills CLI documentation rules.
  • For installable: false, require the exact non-installable notice as the first nonblank document body line in both README.md and SKILL.md.
  • Accept only an unambiguous, dependency-free YAML mapping subset before that prologue; malformed or ambiguous frontmatter fails closed.
  • Skip AgentType loading entirely for non-installable-only validation and cache it once when an installable skill requires it.
  • Require both documentation paths to be regular files, rejecting symlinks and special entries.

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: false until 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-release skill. 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.241 from a fresh clone of public base 2b0bf7f7232de6d8915f1b389d9f74ddc3aa3f6a.

Final transferred hashes:

  • scripts/ci/validate_skill_install_docs.mjs: 879dd99b4a98c02362075b602668b868dd8967208e4392fa10795b31806c1ff1
  • scripts/test-skill-install-docs.mjs: 498d2e0b40f5efe7a52d892d12975ca1d714d7491e593199cd0706ab9988fe60

Passed remotely:

  • syntax checks and focused install-doc tests
  • installability, release-script, and release-workflow regressions
  • all scripts/test-skill-*.mjs
  • repository-wide ESLint
  • npx tsc --noEmit
  • production build
  • git diff --check
  • independent 36/36 adversarial frontmatter matrix
  • regressions for trimmed VT/FF controls, control-only lines, malformed delimiter suffixes, and trailing-colon scalars
  • byte-for-byte unchanged --all output and status versus the unmodified base for current repository skills

No merge, tag, GitHub Release, skill-store publication, catalog activation, or release action was performed.

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;
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Severity

Want Baz to fix this for you? Activate Fixer

Other fix methods

Fix in Cursor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant