-
Notifications
You must be signed in to change notification settings - Fork 905
Implement Collections feature for grouping related prompts, instructions, and chat modes #232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ation Co-authored-by: aaronpowell <[email protected]>
… and documentation Co-authored-by: aaronpowell <[email protected]>
…indentation check Co-authored-by: aaronpowell <[email protected]>
…ience Co-authored-by: aaronpowell <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a comprehensive Collections feature for organizing related prompts, instructions, and chat modes into curated themes and workflows. The implementation includes YAML parsing, validation tooling, developer experience enhancements, and comprehensive documentation generation.
- Adds shared YAML parser module with proper error handling and code deduplication
- Implements collection validation with comprehensive schema checking and file existence verification
- Creates developer-friendly tools including interactive collection creation and VS Code tasks
- Generates complete documentation with collection overview tables and individual README files
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
yaml-parser.js | New shared YAML parser module extracted from validation scripts to eliminate duplication |
validate-collections.js | Comprehensive collection validation script with schema checking and file verification |
update-readme.js | Enhanced README generator with collections support and individual collection documentation |
instructions/collections.instructions.md | Development guidelines for creating and managing collections |
create-collection.js | Interactive collection creation script with user-friendly prompts and validation |
collections/*.md | Generated collection documentation with install badges and item listings |
collections/*.collection.yml | Collection manifest files defining grouped items and metadata |
README.md | Updated main README with collections navigation link |
README.collections.md | Generated collections overview with all available collections |
.vscode/tasks.json | VS Code tasks for collection creation and validation |
.schemas/collection.schema.json | JSON schema for collection manifest validation |
.github/workflows/validate-readme.yml | CI workflow updated to validate collections |
Recent Improvements
Code Refactoring & Developer Experience:
yaml-parser.js
module to eliminate code duplication betweenupdate-readme.js
andvalidate-collections.js
create-collection.js
to use interactive prompts instead of error exits, with friendly messaging and user guidanceMAX_COLLECTION_ITEMS
constantPrevious Bug Fix
Fixed a critical bug in the YAML parsing logic where the condition
leadingSpaces > leadingSpaces
was always false. This was preventing proper parsing of nested properties in array items (likepath:
andkind:
properties in collection items).Root Cause: Copy-paste error resulting in a variable being compared to itself
Fix: Changed condition to
leadingSpaces > 2
to properly handle array item properties that are indented at 4+ spacesImpact: Collections now parse correctly with all nested properties preserved
Files Fixed:
update-readme.js:170
- Fixed impossible condition in YAML parservalidate-collections.js:102
- Fixed identical issue in validation scriptValidation: Tested with existing collection files to confirm proper parsing of all YAML structures including array items and display objects.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.