Skip to content

Add generated ARD catalog compatibility - #17

Merged
MattBabbage merged 3 commits into
mainfrom
matt/dual-consumer-catalog
Aug 7, 2026
Merged

Add generated ARD catalog compatibility#17
MattBabbage merged 3 commits into
mainfrom
matt/dual-consumer-catalog

Conversation

@MattBabbage

@MattBabbage MattBabbage commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

This adds a generated ARD-compatible catalog without changing the contributor-managed layout consumed by the existing Agent Finder sync.

Canonical catalog remains unchanged

Files under catalog/<publisher>/<name>.json remain the source of truth. The existing sync can continue reading those files unchanged, while the root ai-catalog.json serves consumers that discover only the ARD catalog envelope.

Generated ARD compatibility layer

The stdlib generator validates and deterministically combines all local entries with identifiers missing from GitHub's live MCP catalog. Local entries take precedence. Generated copies temporarily adapt only the leading urn:ai: prefix to urn:air: and add the ARD-required type field while preserving canonical mediaType values.

The generated aggregate contains all 1,932 local entries and all 210 current live MCP identifiers, for 2,042 entries total. It remains within the ingestion service's 10,000-entry and 10 MiB limits.

Automated freshness

Same-repository pull requests regenerate ai-catalog.json and commit changes back to the PR branch. Fork workflows validate safely without write credentials. A push-to-main fallback opens or updates an automation PR whenever regeneration changes the aggregate.

Validation

  • python3 -m unittest discover -s tests
  • python3 scripts/generate_ai_catalog.py --check
  • verified required ARD fields, urn:air: identifiers, URL/data delivery rules, and unique identifier/version identities
  • verified local entries override matching MCP identifiers
  • verified the generated artifact is 1,268,647 bytes and ends with a final newline

Copilot AI balanced review requested due to automatic review settings August 4, 2026 15:39

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Generates an ARD ingestion artifact from canonical catalog entries and verifies freshness in CI.

Changes:

  • Adds deterministic catalog generation and validation.
  • Documents regeneration steps.
  • Adds pull-request freshness checks.
Show a summary per file
File Description
scripts/generate_ai_catalog.py Generates and validates the aggregate catalog.
ai-catalog.json Contains the generated ingestion catalog.
.github/workflows/catalog.yml Checks aggregate freshness.
README.md Documents the generated artifact.
CONTRIBUTING.md Adds contributor regeneration steps.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 4/5 changed files
  • Comments generated: 2
  • Review effort level: Balanced

Comment thread scripts/generate_ai_catalog.py
Comment thread scripts/generate_ai_catalog.py Outdated

@jeffreyhunter77 jeffreyhunter77 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Overall, I actually like this. What do you think about my idea to tweak the catalog workflow?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think we should make this workflow a little more robust. I think it would be better if we didn't have to rely on contributors to run the generate script at all.

I like the idea of a pull request trigger. If it's for a PR, could we have the workflow run the script and then add the generated catalog to that PR (commit + push)?

Could we then add a trigger for push to main? I'm thinking of this as a fallback. That would cause it to run on PR merge. Ideally, this would always just result in no changes. If it ever does result in a changed catalog file, though, could we have it then open a PR?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Implemented. Same-repository PRs now regenerate and push ai-catalog.json back to the PR branch. Pushes to main regenerate as a fallback and create or update an automation/update-ai-catalog PR when needed. Fork workflows stay read-only for security; they validate the generator, and the main fallback handles any resulting drift after merge.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Very much like the idea :D

@jeffreyhunter77 jeffreyhunter77 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🚀 🚀

@MattBabbage
MattBabbage merged commit c6d48b2 into main Aug 7, 2026
2 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.

3 participants