Repository navigation
feat: expose routing metadata in manifest - #62
Conversation
|
Warning Review limit reached
Next review available in: 44 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (7)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR extends the repo’s generated manifest.json so it can serve as a lightweight routing index for external tools/agents by including optional per-entry routing metadata derived from frontmatter.
Changes:
- Add optional
routingmetadata to manifest entry types and emit it during manifest generation. - Introduce a shared frontmatter parser and validate optional routing-related frontmatter array shapes.
- Document the new routing metadata in the README and regenerate
manifest.jsonaccordingly.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/manifest.ts | Extends the runtime manifest types to include optional routing metadata. |
| scripts/validate-directives.ts | Validates optional routing-related frontmatter keys/array shapes (including nested routing.*). |
| scripts/generate-manifest.ts | Extracts routing metadata from frontmatter and writes it into manifest.json. |
| scripts/frontmatter.ts | Adds a shared minimal frontmatter parser used by generation/validation scripts. |
| README.md | Documents manifest.json as a compact routing index via optional routing metadata. |
| manifest.json | Regenerated output showing populated routing fields for relevant entries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| function objectValue(value: unknown): Record<string, unknown> { | ||
| if (!value || Array.isArray(value) || typeof value !== 'object') return {}; | ||
| return value as Record<string, unknown>; | ||
| } | ||
|
|
||
| function uniqueStrings(values: Array<string[] | undefined>): string[] | undefined { | ||
| const merged = values.flatMap((value) => value ?? []); | ||
| const unique = [...new Set(merged)]; | ||
| return unique.length > 0 ? unique : undefined; | ||
| } | ||
|
|
||
| function readArray({ source, keys, path }: { source: Record<string, unknown>; keys: string[]; path: string }): string[] | undefined { | ||
| const values = keys.map((key) => optionalStringArray(source[key], { key, path })); | ||
| return uniqueStrings(values); | ||
| } | ||
|
|
||
| function buildRouting(fm: Record<string, unknown>, path: string): ManifestRouting | undefined { | ||
| const routingSource = objectValue(fm.routing); | ||
| const routing: ManifestRouting = {}; |
|
Addressed review feedback in the latest commit. Valid comment fixed:
Regression coverage:
Skipped:
Validation:
|
Summary
routingmetadata to manifest entries so agents/tools can usemanifest.jsonas a compact routing index.Verification
npm run checkParallel PR notes