Reverse the build: registry.json as the source of truth#213
Open
riverma wants to merge 1 commit into
Open
Conversation
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) |
|
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.



Makes
static/data/registry.jsonthe hand-authored source of truth;.claude-plugin/marketplace.jsonis now generated from it (previously the reverse).src/conf/generate-marketplace.jsreplacesgenerate-registry.jsregistry.jsongains a top-levelmarketplaceblock; the build hydrates derived fields (type,skill_file_url,zip_file_path)marketplace.jsondrifts out of syncexternal_only)Verified:
npm run buildpasses; the generator is idempotent.