feat(LINCHPIN-5636): Add linchpin plugin scaffold - #86
Merged
Merged
Conversation
Generates a plugin tree from a pinned ref of linchpin/plugin-scaffold (v0.1.0, bfe22dd): fetch and cache the template, copy it, apply the blocks, wporg or self-hosted overlay, rename the identity in both file contents and paths, and verify no plugin-scaffold identity survives. A non-empty destination is refused unless --force, and --dry-run prints the planned tree without writing. Fixture-backed tests cover the rename, each overlay and both refusals; docs/plugin-scaffold.md documents the command, and skills-conventions.md records it as a write effect owned by wp-plugin-standards.
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.
Adds
linchpin plugin scaffold <slug>, the executable form ofwp-plugin-standardsfor a new plugin tree.What it does
Fetches and caches a pinned ref of
linchpin/plugin-scaffold(v0.1.0,bfe22dd), copies it, applies the requested overlay, renames the identity in both file contents and paths, then verifies noplugin-scaffoldidentity survived the rename.linchpin plugin scaffold acme linchpin plugin scaffold acme --with-blocks --channel=wporg linchpin plugin scaffold acme --path ~/GitHub/acme --dry-runprivate(default),wporg,self-hosted.self-hostedalso inserts theUpdate URI:header.--force; an invalid slug exits on validation.--dry-runprints the planned tree and writes nothing.github-repo-setup.Notes for review
src/core/plugin-scaffold-pin.jsonandPLUGIN_SCAFFOLD_PIN, kept in lockstep. Bumping it changes what every new plugin starts from, so it is a deliberate edit.docs/skills-conventions.mdrecordsplugin scaffoldas awriteeffect owned bywp-plugin-standards, anddocs/repo-tasks.mddisambiguates it fromrepo --scaffold, which lands workflow files on a repo that already exists.github-repo-setupandwp-plugin-standardsat the same repo.Testing
npm run typecheckclean;npm test159/159 passing, including fixture-backed coverage of the rename, each overlay and both refusals.