Skip to content

feat(LINCHPIN-5636): Add linchpin plugin scaffold - #86

Merged
aaronware merged 1 commit into
mainfrom
issue/LINCHPIN-5636
Sep 20, 2026
Merged

aaronware merged 1 commit into
mainfrom
issue/LINCHPIN-5636

Conversation

@aaronware

@aaronware aaronware commented Sep 20, 2026

Copy link
Copy Markdown
Contributor

Adds linchpin plugin scaffold <slug>, the executable form of wp-plugin-standards for 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 no plugin-scaffold identity survived the rename.

linchpin plugin scaffold acme
linchpin plugin scaffold acme --with-blocks --channel=wporg
linchpin plugin scaffold acme --path ~/GitHub/acme --dry-run
  • Channelsprivate (default), wporg, self-hosted. self-hosted also inserts the Update URI: header.
  • Refusals — a non-empty destination needs --force; an invalid slug exits on validation. --dry-run prints the planned tree and writes nothing.
  • Not in scope — repo creation and secret wiring stay with github-repo-setup.

Notes for review

  • The pin lives in src/core/plugin-scaffold-pin.json and PLUGIN_SCAFFOLD_PIN, kept in lockstep. Bumping it changes what every new plugin starts from, so it is a deliberate edit.
  • docs/skills-conventions.md records plugin scaffold as a write effect owned by wp-plugin-standards, and docs/repo-tasks.md disambiguates it from repo --scaffold, which lands workflow files on a repo that already exists.
  • Pairs with feat(LINCHPIN-5636): Point plugin skills at plugin-scaffold skills#49, which points github-repo-setup and wp-plugin-standards at the same repo.

Testing

npm run typecheck clean; npm test 159/159 passing, including fixture-backed coverage of the rename, each overlay and both refusals.

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.
@aaronware
aaronware merged commit 833da89 into main Sep 20, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant