docs(registry): update README to reflect JSON entry schema#102
Merged
docs(registry): update README to reflect JSON entry schema#102
Conversation
The registry section described the old Markdown+YAML-frontmatter format, which was replaced by a Nuxt Content v3 type:data collection backed by .json files. This commit rewrites the section to match the current implementation: - File format: .md with YAML frontmatter → .json (type:data collection) - Schema restructured from flat aliases/strategies into the Entry → Package → Source hierarchy introduced in ADR-0001 - Added source-type reference table (npm, github, web, llms-txt) with required and optional fields per type - Added monorepo example (@mastra/core, @mastra/memory) showing multiple packages within one entry - Renamed fields: strategies[].source → sources[].type, docsPath → path, top-level aliases → per-package aliases - Contributing section now points at registryEntrySchema in packages/schema/src/registry.ts and calls out validation invariants
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Deploying ask-registry with
|
| Latest commit: |
f1c7345
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://33d8e733.ask-registry.pages.dev |
| Branch Preview URL: | https://amondnet-readme-registry.ask-registry.pages.dev |
Contributor
There was a problem hiding this comment.
No issues found across 1 file
Auto-approved: Documentation-only update to the README to reflect existing architectural changes (ADR-0001) and registry schema migration.
Architecture diagram
sequenceDiagram
participant Contributor
participant FS as Registry Storage (JSON)
participant Schema as Schema Validator
participant Nuxt as Nuxt Content v3 (Data)
participant Client as ASK CLI / App
participant Providers as External (npm/GitHub/Web)
Note over Contributor, FS: NEW: Entry definition process
Contributor->>FS: Create/Update <owner>/<repo>.json
Note over FS, Schema: Validation at Build/Runtime
FS->>Schema: NEW: Validate Entry -> Package -> Source hierarchy
Schema->>Schema: Check invariants (duplicate aliases, slugs, or package names)
Note over Client, Nuxt: Data Retrieval
Client->>Nuxt: Query documentation config for package alias
Nuxt->>FS: NEW: Read type: 'data' collection
FS-->>Nuxt: JSON Object
Nuxt-->>Client: Resolved Package Entry (ordered sources)
Note over Client, Providers: CHANGED: Source Resolution Flow
loop For each source in sources[]
Client->>Client: Identify source type (npm, github, web, llms-txt)
Client->>Providers: Attempt fetch using type-specific fields
alt Success
Providers-->>Client: Documentation content
Note over Client: Resolution Complete
else Failure / Fallback
Providers-->>Client: Error
Note over Client: Try next source in priority list
end
end
The README single-package example claimed to mirror vercel/next.js.json but dropped the "vercel" tag. Sync the tag array so contributors copying the example produce a file identical to the real registry entry. Found by /review:code-review-loop documentation analyzer.
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.
Summary
The README's Registry section described the old Markdown+YAML-frontmatter format. The implementation has since migrated to a Nuxt Content v3
type: 'data'collection backed by.jsonfiles and restructured the schema around the Entry → Package → Source hierarchy (ADR-0001). The docs were stale and misleading for contributors.Changes
.mdwith YAML frontmatter →.json(Nuxt Content v3type: 'data'collection)aliases/strategies→ Entry → Package → Source hierarchy per ADR-0001npm,github,web,llms-txtwith required/optional fields@mastra/coreand@mastra/memoryshowing multiple packages in one entrystrategies[].source→sources[].type,docsPath→path, top-levelaliases→ per-packagealiasesregistryEntrySchemainpackages/schema/src/registry.tsand call out validation invariants (duplicate aliases, duplicate package names, slug collisions)Test plan
ADR-0001,packages/schema/src/registry.ts) resolvepackages/schema/src/registry.tsSummary by cubic
Update the Registry docs in README to the JSON-based schema and Entry → Package → Source structure, replacing the old Markdown + YAML frontmatter format. Adds a source-type reference, a monorepo example (
@mastra/core,@mastra/memory), field rename notes, updated contributing guidance pointing to validation inpackages/schema/src/registry.ts, and syncs the Next.js example tags (addsvercel) to match the real entry.Written for commit f1c7345. Summary will update on new commits.