-
Notifications
You must be signed in to change notification settings - Fork 911
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
Merged
+1,434
−3
Merged
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
c58ae50
Initial plan
Copilot 406b613
Implement core Collections feature with YAML parsing and README gener…
Copilot 4476bf3
Complete Collections feature implementation with validation, tooling,…
Copilot 188d344
Update generated README files to include collections instructions
Copilot 22e4bb2
Fix YAML parsing logic bug: replace impossible condition with proper …
Copilot 0202b01
Refactor: Extract YAML parser to shared module and improve user exper…
Copilot b6b5f78
fixing task and file permissions
aaronpowell 90d3177
Better args handling
aaronpowell c8470ce
Adding some more collections
aaronpowell 86be0d8
Merge branch 'main' into copilot/introduce-collections-feature
aaronpowell File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,84 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"title": "Collection Manifest", | ||
"description": "Schema for awesome-copilot collection manifest files", | ||
"type": "object", | ||
"required": ["id", "name", "description", "items"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "Unique identifier for the collection", | ||
"pattern": "^[a-z0-9-]+$", | ||
"minLength": 1, | ||
"maxLength": 50 | ||
}, | ||
"name": { | ||
"type": "string", | ||
"description": "Display name for the collection", | ||
"minLength": 1, | ||
"maxLength": 100 | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "Description of what this collection contains", | ||
"minLength": 1, | ||
"maxLength": 500 | ||
}, | ||
"tags": { | ||
"type": "array", | ||
"description": "Optional tags for discovery", | ||
"items": { | ||
"type": "string", | ||
"pattern": "^[a-z0-9-]+$", | ||
"minLength": 1, | ||
"maxLength": 30 | ||
}, | ||
"uniqueItems": true, | ||
"maxItems": 10 | ||
}, | ||
"items": { | ||
"type": "array", | ||
"description": "List of items in this collection", | ||
"minItems": 1, | ||
"maxItems": 50, | ||
"items": { | ||
"type": "object", | ||
"required": ["path", "kind"], | ||
"additionalProperties": false, | ||
"properties": { | ||
"path": { | ||
"type": "string", | ||
"description": "Relative path from repository root to the item file", | ||
"pattern": "^(prompts|instructions|chatmodes)\/[^\/]+\\.(prompt|instructions|chatmode)\\.md$", | ||
"minLength": 1 | ||
}, | ||
"kind": { | ||
"type": "string", | ||
"description": "Type of the item", | ||
"enum": ["prompt", "instruction", "chat-mode"] | ||
} | ||
} | ||
}, | ||
"uniqueItems": true | ||
}, | ||
"display": { | ||
"type": "object", | ||
"description": "Optional display settings for the collection", | ||
"additionalProperties": false, | ||
"properties": { | ||
"ordering": { | ||
"type": "string", | ||
"description": "How to order items in the collection", | ||
"enum": ["manual", "alpha"], | ||
"default": "alpha" | ||
}, | ||
"show_badge": { | ||
"type": "boolean", | ||
"description": "Whether to show collection badge on items", | ||
"default": false | ||
} | ||
} | ||
} | ||
} | ||
} |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# 📦 Collections | ||
|
||
Curated collections of related prompts, instructions, and chat modes organized around specific themes, workflows, or use cases. | ||
### How to Use Collections | ||
|
||
**Browse Collections:** | ||
- Explore themed collections that group related customizations | ||
- Each collection includes prompts, instructions, and chat modes for specific workflows | ||
- Collections make it easy to adopt comprehensive toolkits for particular scenarios | ||
|
||
**Install Items:** | ||
- Click install buttons for individual items within collections | ||
- Or browse to the individual files to copy content manually | ||
- Collections help you discover related customizations you might have missed | ||
|
||
| Name | Description | Items | Tags | | ||
| ---- | ----------- | ----- | ---- | | ||
| [C# .NET Development](collections/csharp-dotnet-development.md) | Essential prompts, instructions, and chat modes for C# and .NET development including testing, documentation, and best practices. | 7 items | csharp, dotnet, aspnet, testing | | ||
| [DevOps On-Call](collections/devops-oncall.md) | A focused set of prompts, instructions, and a chat mode to help triage incidents and respond quickly with DevOps tools and Azure resources. | 5 items | devops, incident-response, oncall, azure | |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Collections Template | ||
|
||
Use this template to create a new collection of related prompts, instructions, and chat modes. | ||
|
||
## Basic Template | ||
|
||
```yaml | ||
id: my-collection-id | ||
name: My Collection Name | ||
description: A brief description of what this collection provides and who should use it. | ||
tags: [tag1, tag2, tag3] # Optional discovery tags | ||
items: | ||
- path: prompts/my-prompt.prompt.md | ||
kind: prompt | ||
- path: instructions/my-instructions.instructions.md | ||
kind: instruction | ||
- path: chatmodes/my-chatmode.chatmode.md | ||
kind: chat-mode | ||
display: | ||
ordering: alpha # or "manual" to preserve order above | ||
show_badge: false # set to true to show collection badge | ||
``` | ||
|
||
## Field Descriptions | ||
|
||
- **id**: Unique identifier using lowercase letters, numbers, and hyphens only | ||
- **name**: Display name for the collection | ||
- **description**: Brief explanation of the collection's purpose (1-500 characters) | ||
- **tags**: Optional array of discovery tags (max 10, each 1-30 characters) | ||
- **items**: Array of items in the collection (1-50 items) | ||
- **path**: Relative path from repository root to the file | ||
- **kind**: Must be `prompt`, `instruction`, or `chat-mode` | ||
- **display**: Optional display settings | ||
- **ordering**: `alpha` (alphabetical) or `manual` (preserve order) | ||
- **show_badge**: Show collection badge on items (true/false) | ||
|
||
## Creating a New Collection | ||
|
||
### Using VS Code Tasks | ||
1. Press `Ctrl+Shift+P` (or `Cmd+Shift+P` on Mac) | ||
2. Type "Tasks: Run Task" | ||
3. Select "create-collection" | ||
4. Enter your collection ID when prompted | ||
|
||
### Using Command Line | ||
```bash | ||
node create-collection.js my-collection-id | ||
``` | ||
|
||
### Manual Creation | ||
1. Create `collections/my-collection-id.collection.yml` | ||
2. Use the template above as starting point | ||
3. Add your items and customize settings | ||
4. Run `node validate-collections.js` to validate | ||
5. Run `node update-readme.js` to generate documentation | ||
|
||
## Validation | ||
|
||
Collections are automatically validated to ensure: | ||
- Required fields are present and valid | ||
- File paths exist and match the item kind | ||
- IDs are unique across collections | ||
- Tags and display settings follow the schema | ||
|
||
Run validation manually: | ||
```bash | ||
node validate-collections.js | ||
``` | ||
|
||
## File Organization | ||
|
||
Collections don't require reorganizing existing files. Items can be located anywhere in the repository as long as the paths are correct in the manifest. | ||
|
||
## Best Practices | ||
|
||
1. **Meaningful Collections**: Group items that work well together for a specific workflow or use case | ||
2. **Clear Naming**: Use descriptive names and IDs that reflect the collection's purpose | ||
3. **Good Descriptions**: Explain who should use the collection and what benefit it provides | ||
4. **Relevant Tags**: Add discovery tags that help users find related collections | ||
5. **Reasonable Size**: Keep collections focused - typically 3-10 items work well | ||
6. **Test Items**: Ensure all referenced files exist and are functional before adding to a collection |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
id: csharp-dotnet-development | ||
name: C# .NET Development | ||
description: Essential prompts, instructions, and chat modes for C# and .NET development including testing, documentation, and best practices. | ||
tags: [csharp, dotnet, aspnet, testing] | ||
items: | ||
- path: prompts/csharp-async.prompt.md | ||
kind: prompt | ||
- path: prompts/aspnet-minimal-api-openapi.prompt.md | ||
kind: prompt | ||
- path: instructions/csharp.instructions.md | ||
kind: instruction | ||
- path: instructions/dotnet-architecture-good-practices.instructions.md | ||
kind: instruction | ||
- path: chatmodes/expert-dotnet-software-engineer.chatmode.md | ||
kind: chat-mode | ||
- path: prompts/csharp-xunit.prompt.md | ||
kind: prompt | ||
- path: prompts/dotnet-best-practices.prompt.md | ||
kind: prompt | ||
display: | ||
ordering: alpha | ||
show_badge: false |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.