|
| 1 | +# Layer5 Custom GitHub Copilot Agents |
| 2 | + |
| 3 | +This directory contains custom agent configurations for GitHub Copilot. These agents provide specialized expertise for specific tasks within the Layer5 repository. |
| 4 | + |
| 5 | +## Available Agents |
| 6 | + |
| 7 | +### blog-writer |
| 8 | + |
| 9 | +**Purpose:** Create high-quality blog posts for the Layer5 website |
| 10 | + |
| 11 | +**Specializes in:** |
| 12 | +- Cloud native topics (Kubernetes, service mesh, platform engineering) |
| 13 | +- Meshery and Kanvas features |
| 14 | +- Community content and announcements |
| 15 | +- Open source best practices |
| 16 | + |
| 17 | +**Key Capabilities:** |
| 18 | +- Uses the official blog template structure |
| 19 | +- Selects appropriate existing tags and categories (weighted preference) |
| 20 | +- Includes required graphics and images |
| 21 | +- Adds Call-to-Action (CTA) components |
| 22 | +- Uses BlockQuote components for emphasis |
| 23 | +- Adds extensive cross-page hyperlinks to existing content |
| 24 | +- Optimizes for SEO (URL, title, description, keywords) |
| 25 | +- Considers posts for `/resources` collection inclusion |
| 26 | +- Follows Layer5 writing style and tone |
| 27 | + |
| 28 | +**When to Use:** |
| 29 | +- Creating new blog posts about Layer5 projects |
| 30 | +- Writing technical tutorials and how-to guides |
| 31 | +- Crafting community announcements |
| 32 | +- Developing content for Meet the Maintainer series |
| 33 | +- Publishing event coverage or recaps |
| 34 | + |
| 35 | +**Example Usage with GitHub Copilot:** |
| 36 | +``` |
| 37 | +@blog-writer Create a blog post about the new Meshery catalog features, |
| 38 | +including information about design patterns and how users can contribute |
| 39 | +their own patterns to the catalog. |
| 40 | +``` |
| 41 | + |
| 42 | +## How Custom Agents Work |
| 43 | + |
| 44 | +Custom agents are specialized configurations that give GitHub Copilot deep expertise in specific areas. They include: |
| 45 | + |
| 46 | +1. **Domain Knowledge:** Understanding of Layer5's projects, style, and conventions |
| 47 | +2. **Structural Templates:** Knowledge of required file formats and structures |
| 48 | +3. **Best Practices:** Built-in guidelines for quality and consistency |
| 49 | +4. **Component Library:** Awareness of available React components and styles |
| 50 | + |
| 51 | +## Agent Configuration Format |
| 52 | + |
| 53 | +Each agent is defined in a YAML file with the following structure: |
| 54 | + |
| 55 | +```yaml |
| 56 | +name: agent-name |
| 57 | +description: | |
| 58 | + Brief description of what the agent does |
| 59 | + (must start with "Custom agent:" for proper recognition) |
| 60 | +
|
| 61 | +instructions: | |
| 62 | + Detailed instructions and guidelines for the agent |
| 63 | + Includes templates, examples, and requirements |
| 64 | +``` |
| 65 | +
|
| 66 | +## Adding New Custom Agents |
| 67 | +
|
| 68 | +To add a new custom agent: |
| 69 | +
|
| 70 | +1. Create a new YAML file in this directory (`.github/agents/`) |
| 71 | +2. Follow the naming convention: `agent-name.yml` |
| 72 | +3. Include a clear name and description (starting with "Custom agent:") |
| 73 | +4. Provide comprehensive instructions with examples |
| 74 | +5. Test the agent with GitHub Copilot |
| 75 | +6. Update this README with the new agent information |
| 76 | + |
| 77 | +## Guidelines for Agent Instructions |
| 78 | + |
| 79 | +When creating agent instructions: |
| 80 | + |
| 81 | +- **Be Specific:** Include exact file paths, naming conventions, and requirements |
| 82 | +- **Provide Examples:** Show complete examples of expected output |
| 83 | +- **List Options:** Enumerate available choices (tags, categories, components) |
| 84 | +- **Include Constraints:** Specify what must be included and what should be avoided |
| 85 | +- **Reference Existing Code:** Point to template files and examples in the repository |
| 86 | +- **Consider Edge Cases:** Address common scenarios and special situations |
| 87 | + |
| 88 | +## Benefits of Custom Agents |
| 89 | + |
| 90 | +- **Consistency:** Ensures all outputs follow established patterns |
| 91 | +- **Efficiency:** Reduces time spent on boilerplate and formatting |
| 92 | +- **Quality:** Incorporates best practices automatically |
| 93 | +- **Onboarding:** Helps new contributors understand standards quickly |
| 94 | +- **Maintenance:** Centralizes knowledge that might otherwise be scattered |
| 95 | + |
| 96 | +## Troubleshooting |
| 97 | + |
| 98 | +If a custom agent isn't working as expected: |
| 99 | + |
| 100 | +1. Verify YAML syntax: `python3 -c "import yaml; yaml.safe_load(open('agent-file.yml'))"` |
| 101 | +2. Check that description starts with "Custom agent:" |
| 102 | +3. Ensure instructions are clear and comprehensive |
| 103 | +4. Test with simple prompts first |
| 104 | +5. Gradually add complexity to your requests |
| 105 | + |
| 106 | +## Resources |
| 107 | + |
| 108 | +- [GitHub Copilot Documentation](https://docs.github.com/copilot) |
| 109 | +- [Layer5 Contributing Guidelines](../../CONTRIBUTING.md) |
| 110 | +- [Layer5 Blog Template](../../src/collections/blog/blog-template/index.mdx) |
| 111 | +- [Layer5 AGENTS.md](../../AGENTS.md) |
| 112 | + |
| 113 | +## Maintenance |
| 114 | + |
| 115 | +Custom agents should be reviewed and updated when: |
| 116 | +- Blog post structure changes |
| 117 | +- New components are added to the design system |
| 118 | +- Tag/category lists are significantly updated |
| 119 | +- Writing style guidelines evolve |
| 120 | +- Community feedback suggests improvements |
| 121 | + |
| 122 | +Last updated: 2024-11-20 |
0 commit comments