Repository navigation
refactor: ls-wp-release - Fix release skill validators, paths and hook gates - #1
Open
brandonmarshal wants to merge 2 commits into
Open
brandonmarshal wants to merge 2 commits into
brandonmarshal wants to merge 2 commits into
Conversation
Routing and structure - Point structure validator and lint globs at sub-skills/ instead of skills/ - Accept ### Release Workflow heading in the agent file - Check every sub-skill has a frontmatter name matching its directory - Fix release-approval-workflow and multi-package-release frontmatter Validators - JSON: fail on a missing file; report "no files validated" instead of "valid" - Links: report external links and anchors as not checked; stay network-free Setup and hooks - Remove nonexistent yamllint npm dependency; declare semver - lint:yaml fails if yamllint is missing; keeps diagnostics and exit codes - Lefthook hooks fail when a required tool is missing - Fix lefthook YAML glob; run npm test and npm run lint on pre-push - Fix repository URL in package.json Tests - Add node --test fixture tests for JSON, links, structure and lint:yaml - Wire npm test to node --test tests/*.test.cjs - Use the built-in runner only; no Jest (on hold) Docs - Update README, DEVELOPMENT and tests/README for sub-skills/ paths - State what npm test actually covers and that yamllint is a Python tool Known follow-up - npm run lint still fails on existing markdown violations (not part of this change) Refs LS-4750
6 of 20 tasks
This was referenced Nov 5, 2026
brandonmarshal
commented
Nov 12, 2026
brandonmarshal
commented
Nov 12, 2026
Author
|
Changes needed — static review only Reviewed all 14 changed files at head
The layout repairs, missing-JSON failure, network-free link implementation and 31 fixture definitions are statically supported. Tests exercise the npm YAML command, not the actual hook; only three validator suites assert unchanged fixture contents. No commands were executed. Reported passing results remain author evidence. No subsequent stack layer was reviewed. |
…8, review fixes)
YAML hook (P1)
- Replace bash-only &> in the yaml-lint hook with >/dev/null 2>&1
- Under dash, the old form always entered the missing-tool branch and blocked valid YAML commits
Hook tests
- Run the real yaml-lint command from .lefthook.yml with a mock yamllint
- Cover installed, missing and failing yamllint, plus a check that no &> remains
- The tests fail against the old hook
Node 18 support (P2)
- Replace node:test after() with process.on('exit') in the four suites
- after() needs Node 18.8, but the package still declares >=18.0.0
- No change to the runtime range or the R5 migration
Refs LS-4768
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
|
Review fixes pushed (e15b719)
Checked in a throwaway copy: 🤖 Generated with Claude Code |
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.
Refactor Pull Request
Stack
sub-skills/layoutLinked issues
Relates to LS-4750 (Linear). This is batch 1 of several branches for that issue, so it does not close it. Parent epic: LS-4744 (coordination only, never a closing target).
There is no GitHub issue for this work, so there is nothing to auto-close.
Summary
The repository's own validators and hooks looked for a
skills/folder that does not exist (the bundled children live insub-skills/), reported success when nothing was checked, andnpm testwas a no-op. This PR makes the existing checks look at the real layout and fail when they should, and adds focused tests for them. No release behaviour, routing or publishing capability changes.Structure validator (
scripts/validate-skill-structure.js)sub-skills/instead ofskills/.## Release Workflowand### Release Workflow.sub-skills/*/SKILL.mdmust have a frontmatternamethat matches its directory name.release-approval-workflowgains frontmatter andmulti-package-releaseusesname:instead ofskill_name:, so both pass the new check.JSON and link validators
scripts/validate-json.js: a missing required.jsonfile now fails (it previously exited 0). A run that validated nothing says so instead of reporting "valid".scripts/validate-links.js: stays network-free and now reports external links and anchors as "not checked" instead of counting them as valid.package.json and Lefthook
sub-skills/**.yamllintnpm dependency (it is a Python tool), declared thesemverdependency, and fixed the repository URL.lint:yamlfails with a clear message whenyamllintis missing and no longer swallows real YAML errors. Zero YAML files is reported as "nothing was linted".npm testandnpm run lint.commit-msgconventional-commit rule is intentionally unchanged.Tests (new, Node built-in runner only)
tests/validate-json.test.cjs,validate-links.test.cjs,validate-skill-structure.test.cjs,lint-yaml.test.cjs: fixture tests that copy each validator into a temp project, run it from an unrelated working directory with an isolated PATH, and assert nothing is written.npm testnow runsnode --test tests/*.test.cjs. No Jest, no new dependencies, no coverage tooling (Jest work is on hold pending a testing-tool decision).Docs
README.md,docs/DEVELOPMENT.md,tests/README.md:skills/paths corrected tosub-skills/, thenpm installside effect (preparerunslefthook install) documented, andtests/README.mdstates whatnpm testcovers versus the downstream-project reference material.Scope and exclusions
SKILL.mdandagents/, the changelog handoff, TypeScript conversion and thelightspeed-release-opsplugin skills. These are planned as later branches of the same issue.validate-links.jsstill exits 1 on 50 broken links in files outside this PR. Placeholder links in release-notes templates are also counted as real links by that validator.Safety Nets
npm testwas anechoplaceholder.lintglobs,lint:yaml, and the Lefthook markdown and YAML hooks.Approach
yamllintnpm dependency and the no-opnpm test.Metrics / Benchmarks (if applicable)
npm testran 0 tests. Structure validator exit 1. JSON validator exit 0 on a missing file. Link validator 53 broken links.npm testruns 31 tests, all pass. Structure validator exit 0. JSON validator exit 1 on a missing file. Link validator 50 broken links (remaining ones are outside this PR).Verification
node --test tests/*.test.cjs: 31 pass, 0 fail)node scripts/validate-skill-structure.jsexits 0,node scripts/validate-json.jsexits 0 on the default files and 1 for a missing file,node scripts/validate-links.jsruns network-free (258 links, 169 external and 17 anchors reported as not checked)lint:yamlnow fail whenyamllintormarkdownlintis not installed.lint:yamlagainst a realyamllintinstall was not re-run for this PR (covered with a mock in tests)Risk & Rollback
npm run lintalready failed onmainagainst existing markdown violations. Pointing the globs at the realsub-skills/folder means it now covers those files too, so once Lefthook is installed the pre-push lint step fails until that markdown debt is cleaned up or the rules relaxed. No file edited here gained a violation.Changelog
This repository has no
CHANGELOG.md, and none of themeta:needs-changelog/meta:no-changeloglabels exist here, so no changelog file entry is added. Notes for release automation if one is added later:Added
lint:yaml, run bynpm test. (Relates to LS-4750)Changed
sub-skills/instead ofskills/. (Relates to LS-4750)Fixed
lint:yamland the Lefthook hooks no longer pass when a required tool is missing.Removed
yamllintnpm dependency.Checklist (Global DoD / PR)