Skip to content

feat(plugin): distribute bundle from dist/claude-plugin via git-subdir#477

Merged
Luis85 merged 4 commits into
developfrom
feat/issue-474-plugin-install-flow
May 10, 2026
Merged

feat(plugin): distribute bundle from dist/claude-plugin via git-subdir#477
Luis85 merged 4 commits into
developfrom
feat/issue-474-plugin-install-flow

Conversation

@Luis85
Copy link
Copy Markdown
Owner

@Luis85 Luis85 commented May 10, 2026

Summary

  • Move the Claude Code plugin bundle from a tracked-on-main artifact to an orphan branch dist/claude-plugin, rebuilt by CI on every push to main. Marketplace consumers resolve via git-subdir pinned to that ref (ADR-0043).
  • Untracks 225 generated-bundle files and gitignores claude-plugin/specorator/{agents,skills,commands,.claude-plugin}/ + .mcp.json so develop/main PR diffs stop carrying generated-artifact churn (closes chore(plugin): gitignore claude-plugin bundle and build in CI instead #461).
  • Drops the build:claude-plugin --check drift check from the verify gate — no committed bundle on develop/main to drift against. The release workflow rebuilds the bundle before the readiness gate so the npm tarball still ships it.

Triage

Compliance with ADR-0043

  • .github/workflows/publish-claude-plugin.yml — orphan-branch publish on push to main
  • .claude-plugin/marketplace.jsongit-subdir source pinned to dist/claude-plugin
  • .gitignore — exclude generated bundle subdirs + .mcp.json
  • scripts/check-claude-plugin.ts — structural-only on a clean checkout; validates new git-subdir shape
  • package.json#scripts.check:claude-plugin — drop build:claude-plugin --check
  • .github/workflows/release.yml — rebuild bundle before readiness gate
  • tools/automation-registry.yml — register workflow:publish-claude-plugin
  • docs/how-to/install-claude-plugin.md — refreshed for the orphan-branch flow + contributor smoke-test prereq
  • docs/specorator-product/tech.md#plugin-bundle — rewritten for the new model

Test plan

  • npm run verify green locally (run with --no-file-parallelism to sidestep a Windows-only parallel-pool flake on tests/scripts/cli.test.ts and tests/scripts/project-init.test.ts — both pass in isolation; tests pre-date this change).
  • npm run check:claude-plugin passes both with and without a locally-built bundle.
  • New claude-plugin.test.ts cases — clean checkout (no bundle) and rejection of legacy relative-path source.
  • After merge to develop and develop→main: confirm .github/workflows/publish-claude-plugin.yml runs on the first push to main and creates the orphan branch dist/claude-plugin.
  • Marketplace install end-to-end on a fresh user: /plugin marketplace add Luis85/agentic-workflow + /plugin install specorator@specorator-marketplace resolves the bundle from dist/claude-plugin and produces a functional plugin.
  • Release workflow dry run: gh workflow run release.yml -f version=<X.Y.Z> -f dry_run=true — readiness gates pass with the freshly-built bundle.

Transition note

Until the merge to develop → main → first publish-claude-plugin run completes, marketplace consumers will see a 404 on dist/claude-plugin. This is the unavoidable bootstrap window. Existing installs that already cached the bundle stay functional until they run /plugin marketplace update.

Closes #474
Closes #461

🤖 Resolved via /issue:tackle 474

Move the Claude Code plugin bundle from a tracked-on-main artifact to an
orphan branch `dist/claude-plugin` rebuilt by CI on every push to main, so
develop and main PR diffs stop carrying generated-bundle churn (closes #461)
without breaking marketplace consumers.

- Add ADR-0043 — choose orphan-branch + git-subdir over per-release tag, npm
  channel, linguist-generated, or auto-commit-on-merge.
- Add `.github/workflows/publish-claude-plugin.yml` — builds the bundle from
  canonical `.claude/{agents,skills,commands}/` + `.mcp.json` sources on
  every push to main, force-pushes the staged tree to `dist/claude-plugin`.
- Switch `.claude-plugin/marketplace.json` source from relative path to
  git-subdir pinned to `ref: dist/claude-plugin`.
- Untrack `claude-plugin/specorator/{agents,skills,commands,.claude-plugin}/`
  and `claude-plugin/specorator/.mcp.json`; gitignore them.
- Make `check-claude-plugin` generated-output checks (manifest, .mcp.json,
  agents/skills/commands dirs) conditional on the file being present, so a
  clean develop/main checkout passes without a prior local
  `build:claude-plugin`. Validate the new git-subdir marketplace shape.
- Drop `build:claude-plugin --check` drift check from the verify gate — no
  committed bundle on develop/main to drift against.
- Run `npm run build:claude-plugin` in `.github/workflows/release.yml`
  before the readiness gate so the npm tarball still ships the bundle.
- Register `workflow:publish-claude-plugin` in the automation registry.
- Refresh `docs/how-to/install-claude-plugin.md` and the plugin-bundle
  section of `docs/specorator-product/tech.md` for the orphan-branch model;
  document the contributor smoke-test prerequisite.

Closes #474
Closes #461

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/publish-claude-plugin.yml Fixed
Comment thread .github/workflows/publish-claude-plugin.yml Fixed
@Luis85 Luis85 marked this pull request as ready for review May 10, 2026 19:20
zizmor on PR #477 flagged top-level `contents: write` as excessive +
undocumented (security/code-scanning/76, /77). Top-level block is now
read-only; the single `publish` job opts in to `contents: write` for the
force-push to `dist/claude-plugin`. Both blocks carry explanatory comments
matching the in-repo `release.yml` pattern.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread .github/workflows/publish-claude-plugin.yml Fixed
zizmor `undocumented-permissions` (security/code-scanning/78) flags the
job-level `contents: write` line itself even with the block-level comment.
Add an inline comment matching zizmor's expected shape.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1a9a95157d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread .github/workflows/publish-claude-plugin.yml
Codex P1 on PR #477: `workflow_dispatch` accepts any ref from the UI, so a
manual run from `develop` or a feature branch would force-push that ref's
content to `dist/claude-plugin` and break marketplace installs. Add a
job-level `if: github.ref == 'refs/heads/main'` guard so non-main dispatches
are skipped silently.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Luis85
Copy link
Copy Markdown
Owner Author

Luis85 commented May 10, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Luis85 Luis85 merged commit 47b1cf8 into develop May 10, 2026
11 checks passed
@Luis85 Luis85 deleted the feat/issue-474-plugin-install-flow branch May 10, 2026 19:43
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.

Redesign Claude Code plugin install flow to support gitignored bundle chore(plugin): gitignore claude-plugin bundle and build in CI instead

3 participants