Skip to content

Reverse the build: registry.json as the source of truth#213

Merged
riverma merged 2 commits into
mainfrom
reverse-build-system
May 28, 2026
Merged

Reverse the build: registry.json as the source of truth#213
riverma merged 2 commits into
mainfrom
reverse-build-system

Conversation

@riverma
Copy link
Copy Markdown
Collaborator

@riverma riverma commented May 21, 2026

Makes static/data/registry.json the hand-authored source of truth; .claude-plugin/marketplace.json is now generated from it (previously the reverse).

  • New src/conf/generate-marketplace.js replaces generate-registry.js
  • registry.json gains a top-level marketplace block; the build hydrates derived fields (type, skill_file_url, zip_file_path)
  • CI check fails if marketplace.json drifts out of sync
  • Lossless: the 17 generated plugins match the previous manifest (the external MCP correctly gains external_only)

Verified: npm run build passes; the generator is idempotent.

registry.json is now the single hand-authored source of truth, and
.claude-plugin/marketplace.json is generated from it — the opposite of
the previous flow.

- Add src/conf/generate-marketplace.js; remove generate-registry.js
- registry.json gains a top-level "marketplace" identity block; derived
  fields (type, skill_file_url, zip_file_path) are hydrated by the build
- package.json: prebuild runs the new generator; clear no longer deletes
  the hand-authored registry.json
- docusaurus.config.js: drop the now-obsolete localRegistrySources
- Add a CI check that fails when marketplace.json drifts out of sync
- Update README and contributor docs for the new flow
Comment on lines +15 to +29
name: Verify marketplace.json is in sync with registry.json
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20

- name: Regenerate marketplace.json from registry.json
run: node src/conf/generate-marketplace.js

- name: Fail if marketplace.json / registry.json are out of sync
run: |
git diff --exit-code .claude-plugin/marketplace.json static/data/registry.json \
|| (echo "::error::marketplace.json / registry.json out of sync — run 'npm run prebuild' and commit the result." && exit 1)
Bring this PR in line with the current state of slim-framework:

- SkillBrowser: parse the date badge as local time so YYYY-MM-DD doesn't render a day early in non-UTC timezones
- docusaurus.yml: grant 'contents: write' so the deploy can publish to gh-pages on repos with default-read-only workflow tokens

The standalone registry-check.yml workflow this PR already adds is unchanged; no follow-up needed there.
@riverma
Copy link
Copy Markdown
Collaborator Author

riverma commented May 28, 2026

Pushed two follow-ups in 6e2145c to bring this PR in line with the current slim-framework: parse the date badge as local time (was rendering YYYY-MM-DD a day early in non-UTC timezones), and grant the deploy workflow contents: write so it can publish to gh-pages on repos with read-only default workflow tokens. The standalone registry-check workflow this PR already adds matches slim-framework's, so no change there. Build passes locally.

@sonarqubecloud
Copy link
Copy Markdown

@riverma riverma merged commit 7f65239 into main May 28, 2026
5 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.

2 participants