Skip to content

fix: enforce plugins/<site> registration in root webcmd-plugin.json - #232

Open
ayushsingh82 wants to merge 1 commit into
agentrhq:mainfrom
ayushsingh82:fix/222-plugin-root-registration
Open

fix: enforce plugins/<site> registration in root webcmd-plugin.json#232
ayushsingh82 wants to merge 1 commit into
agentrhq:mainfrom
ayushsingh82:fix/222-plugin-root-registration

Conversation

@ayushsingh82

Copy link
Copy Markdown

Summary

  • Promoting a CLI to a repo plugin has an easy-to-skip step: after webcmd plugin create scaffolds plugins/<site>/, the author must also register <site> in the root webcmd-plugin.json plugins map. Nothing in webcmd plugin create, webcmd plugin install file://..., or webcmd validate <site> errors or warns when that registration is skipped — the plugin works locally either way. Per the issue, three separate adapter builds (manchester, warwick, mdxdubai) all missed it silently.
  • Adds scripts/check-plugin-root-registration.mjs: fails when a plugins/<site> directory has no matching root-manifest entry, and also catches the reverse (a root-manifest entry with no matching directory). Mirrors the style/location of the existing scripts/check-plugin-command-parity.mjs.
  • Adds check:plugin-root-registration to package.json.
  • Adds a verification step to the adapter-template.md promotion sequence so an agent following the skill catches the gap immediately, not just at CI time.

Fixes #222

Not included: CI wiring

I'd normally add this as a step in .github/workflows/ci.yml right next to the existing "Check plugin command parity" step, but my fork's token doesn't have the workflow scope GitHub requires to push workflow-file changes. A maintainer can add:

      - name: Check plugin root registration
        if: runner.os == 'Linux'
        run: npm run check:plugin-root-registration

right after the check:plugin-parity step in the build job (.github/workflows/ci.yml) — happy to open a follow-up once I sort out the token scope, whichever is easier for you.

Test plan

  • Verified the check fails when a plugins/<site> dir exists without a root-manifest entry (simulated with a throwaway fixture dir, removed after)
  • Verified the check fails the other direction too (a root-manifest entry with no matching dir)
  • Verified it passes clean against the current repo (123 plugins, all registered)
  • npm run typecheck clean
  • npm test — 385 test files / 4623 passed, 1 skipped (unchanged baseline)

Promoting a CLI to a repo plugin has an easy-to-skip step: after
webcmd plugin create scaffolds plugins/<site>/, the author must also
register <site> in the root webcmd-plugin.json plugins map. Nothing in
webcmd plugin create, webcmd plugin install file://..., or
webcmd validate <site> errors or warns when that registration is
skipped — the plugin works locally either way, so three separate
adapter builds (manchester, warwick, mdxdubai) all missed it silently.

Add scripts/check-plugin-root-registration.mjs, which fails when a
plugins/<site> directory has no matching root-manifest entry (or vice
versa). Also add a verification step to the adapter-template.md
promotion sequence so an agent following the skill catches the gap
immediately instead of relying on CI.

Not wired into .github/workflows/ci.yml in this commit (my fork's
token lacks the `workflow` scope needed to push workflow-file changes)
— see PR description for the one-line CI step a maintainer can add.

Fixes agentrhq#222
@ayushsingh82

Copy link
Copy Markdown
Author

@ngaurav Fixed — this PR adds scripts/check-plugin-root-registration.mjs (catches a plugins/ directory with no matching root webcmd-plugin.json entry, or vice versa) plus a verification step in the adapter-template.md promotion sequence, closing #222. CI wiring is noted in the PR description since my fork's token currently lacks the workflow scope to push that part myself.

@github-actions

github-actions Bot commented Aug 8, 2026

Copy link
Copy Markdown
Contributor

🟢 No documentation gap found — medium confidence

The automated review found no documentation gap in the supplied changes.

This review is advisory and does not block merging.

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.

webcmd-adapter-author skill: root webcmd-plugin.json step is documented but skippable — should be enforced, not optional

1 participant