Skip to content

Commit c7fc3e3

Browse files
CopilotMSDNAndi
andcommitted
Add agent documentation and integrate with project README
Co-authored-by: MSDNAndi <6744335+MSDNAndi@users.noreply.github.com>
1 parent ef3eead commit c7fc3e3

4 files changed

Lines changed: 275 additions & 0 deletions

File tree

.github/agents/QUICK_START.md

Lines changed: 239 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,239 @@
1+
# Agent System Quick Start Guide
2+
3+
This guide helps you quickly understand and use the GitHub Copilot coding agent system in the Actions Runner Controller repository.
4+
5+
## What Are These Agents?
6+
7+
These are specialized AI assistant configurations that help with different aspects of development in this project. Think of them as expert teammates who know specific domains really well.
8+
9+
## The Three Types of Agents
10+
11+
### 1. Main Coordinator
12+
- **coding-agent**: Your starting point for any development task
13+
14+
### 2. Management Agents (Meta-Agents)
15+
- **agent-manager**: Keeps the agent system healthy and up-to-date
16+
- **agent-recruiter**: Creates new agents when needed
17+
18+
### 3. Specialist Agents (The Experts)
19+
- **go-expert-agent**: Everything Go-related
20+
- **kubernetes-expert-agent**: Kubernetes, Helm, CRDs, RBAC
21+
- **documentation-agent**: All documentation
22+
- **test-specialist-agent**: All testing
23+
24+
## How To Use This System
25+
26+
### For Quick Tasks
27+
28+
```
29+
Question: "How do I add a new field to the AutoscalingRunnerSet CRD?"
30+
→ Check: kubernetes-expert-agent.md
31+
→ Section: "Adding/Modifying CRDs"
32+
```
33+
34+
```
35+
Question: "How do I write a controller test?"
36+
→ Check: test-specialist-agent.md
37+
→ Section: "Writing Controller Tests"
38+
```
39+
40+
```
41+
Question: "How do I handle errors in Go code?"
42+
→ Check: go-expert-agent.md
43+
→ Section: "Error Handling"
44+
```
45+
46+
### For Complex Tasks
47+
48+
```
49+
Task: "Add a new autoscaling metric"
50+
Steps:
51+
1. coding-agent coordinates the work
52+
2. go-expert-agent implements the logic
53+
3. kubernetes-expert-agent updates CRDs
54+
4. test-specialist-agent adds tests
55+
5. documentation-agent documents it
56+
```
57+
58+
## Quick Reference Card
59+
60+
| I Need To... | Look Here |
61+
|--------------|-----------|
62+
| Add Go code | go-expert-agent.md |
63+
| Modify a CRD | kubernetes-expert-agent.md |
64+
| Update Helm chart | kubernetes-expert-agent.md |
65+
| Write tests | test-specialist-agent.md |
66+
| Update docs | documentation-agent.md |
67+
| Create new agent | agent-recruiter.md |
68+
| Evaluate agents | agent-manager.md |
69+
| General guidance | coding-agent.md |
70+
71+
## Common Commands By Agent
72+
73+
### Go Expert
74+
```bash
75+
make test # Run tests
76+
make lint # Run linters
77+
make build # Build binary
78+
make generate # Generate code
79+
```
80+
81+
### Kubernetes Expert
82+
```bash
83+
make manifests # Generate CRDs
84+
helm lint charts/* # Lint charts
85+
make install # Install CRDs
86+
make deploy # Deploy controller
87+
```
88+
89+
### Test Specialist
90+
```bash
91+
ginkgo -r # Run all Ginkgo tests
92+
go test -cover # Coverage report
93+
ginkgo -focus # Run specific tests
94+
```
95+
96+
## File Location Patterns
97+
98+
```
99+
Need to modify... → Use agent...
100+
/controllers/*.go → go-expert-agent
101+
/apis/*.go → go-expert-agent + kubernetes-expert-agent
102+
/charts/* → kubernetes-expert-agent
103+
/config/crd/* → kubernetes-expert-agent
104+
/config/rbac/* → kubernetes-expert-agent
105+
*.md files → documentation-agent
106+
*_test.go files → test-specialist-agent
107+
/test_e2e_arc/* → test-specialist-agent
108+
```
109+
110+
## Agent Philosophy
111+
112+
### Key Principles
113+
114+
1. **Specialization**: Each agent is an expert in their domain
115+
2. **Delegation**: Main agent delegates to specialists
116+
3. **Minimal Overlap**: Clear boundaries between agents
117+
4. **Living Documents**: Agents evolve with the project
118+
5. **Self-Managing**: Agents manage their own ecosystem
119+
120+
### Why This Matters
121+
122+
- **Faster Onboarding**: New contributors find answers quickly
123+
- **Consistent Quality**: Best practices are documented
124+
- **Less Context Switching**: Focus on one domain at a time
125+
- **Better Collaboration**: Clear handoff protocols
126+
- **Reduced Errors**: Domain experts catch domain-specific issues
127+
128+
## Examples of Agent Usage
129+
130+
### Example 1: Bug Fix in Controller
131+
132+
```
133+
Problem: Runner pods not getting created
134+
135+
Steps:
136+
1. Read go-expert-agent for controller patterns
137+
2. Read test-specialist-agent for test approach
138+
3. Write failing test (test-specialist-agent guides)
139+
4. Fix bug (go-expert-agent guides)
140+
5. Update documentation (documentation-agent guides)
141+
```
142+
143+
### Example 2: New Helm Chart Value
144+
145+
```
146+
Task: Add new chart value for resource limits
147+
148+
Steps:
149+
1. Read kubernetes-expert-agent section on Helm
150+
2. Update values.yaml with new option
151+
3. Update values.schema.json
152+
4. Update templates to use new value
153+
5. Document in chart README (documentation-agent)
154+
6. Test with helm template
155+
```
156+
157+
### Example 3: Adding New Feature
158+
159+
```
160+
Feature: Add webhook for custom validation
161+
162+
Steps:
163+
1. coding-agent reviews overall approach
164+
2. go-expert-agent implements webhook logic
165+
3. kubernetes-expert-agent updates webhook config
166+
4. kubernetes-expert-agent adds RBAC rules
167+
5. test-specialist-agent adds webhook tests
168+
6. documentation-agent documents the feature
169+
```
170+
171+
## Troubleshooting Agent Usage
172+
173+
### "I don't know which agent to use"
174+
Start with coding-agent.md - it will point you to the right specialist.
175+
176+
### "Multiple agents seem relevant"
177+
That's normal for cross-cutting tasks. Use coding-agent to coordinate between them.
178+
179+
### "Agent information is outdated"
180+
Update the agent spec and note what changed. Consider informing agent-manager.
181+
182+
### "I need an agent that doesn't exist"
183+
Review agent-manager.md to understand if a new agent is warranted, then check agent-recruiter.md for how to create one.
184+
185+
### "Agent boundaries are unclear"
186+
Check the "Boundaries" section in each agent - it explicitly states what they don't do.
187+
188+
## Best Practices
189+
190+
### DO
191+
- ✓ Read the relevant agent spec before starting work
192+
- ✓ Follow the guidelines in the agent specs
193+
- ✓ Update agent specs when patterns change
194+
- ✓ Use agents as onboarding material
195+
- ✓ Suggest improvements to agent specs
196+
197+
### DON'T
198+
- ✗ Ignore agent boundaries
199+
- ✗ Let agent specs become outdated
200+
- ✗ Create overlapping agents
201+
- ✗ Skip testing because the agent didn't mention it
202+
- ✗ Follow agent advice blindly - use judgment
203+
204+
## Measuring Success
205+
206+
The agent system is working when:
207+
208+
- [ ] New contributors find answers in agent specs
209+
- [ ] PRs follow conventions documented in agents
210+
- [ ] Less time spent on code review for style/conventions
211+
- [ ] Fewer bugs in specialist areas
212+
- [ ] Faster feature development
213+
- [ ] More consistent code quality
214+
215+
## Evolution
216+
217+
This agent system will evolve as the project evolves:
218+
219+
- **New technology?** → Consider new specialist agent
220+
- **Pattern changes?** → Update relevant agent specs
221+
- **Agent unused?** → Consider retirement
222+
- **Agent confusion?** → Clarify or split
223+
- **Missing coverage?** → Add new agent
224+
225+
## Getting Help
226+
227+
- **About this project**: Read coding-agent.md
228+
- **Specific domain**: Read relevant specialist agent
229+
- **Agent system itself**: Read this guide and README.md
230+
- **Creating agents**: Read agent-recruiter.md
231+
- **Managing agents**: Read agent-manager.md
232+
233+
## Summary
234+
235+
The agent system is your AI-powered development guide. Each agent is a specialist who helps you work effectively in their domain. Start with the coding-agent, delegate to specialists, and keep the specs updated as the project grows.
236+
237+
---
238+
239+
**Remember**: These agents are tools to help you succeed. Use them as guides, but always apply your own judgment and expertise.

.github/agents/agent-manager.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,16 @@ A specialized sub-agent that monitors the effectiveness of the agent ecosystem,
1111
- Monitoring agent effectiveness and utilization
1212
- Strategic planning for agent ecosystem evolution
1313

14+
## Context
15+
This agent operates in the Actions Runner Controller repository, which is an active Kubernetes operator project with:
16+
- Multiple contributors with varying expertise levels
17+
- Evolving technology stack (Go, Kubernetes, Helm)
18+
- Both legacy and modern architecture patterns
19+
- Active issue tracking and PR review process
20+
- Regular releases and updates
21+
22+
The agent ecosystem must remain aligned with the project's evolution while maintaining clarity and avoiding duplication.
23+
1424
## Core Responsibilities
1525

1626
### 1. Identify Need for New Agents

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,22 @@ Feel free to browse the [open issues](https://github.com/actions/actions-runner-
3030
By reading this guide, we hope to give you all of the information you need to be able to pick up issues, contribute new features, and get your work
3131
reviewed and merged.
3232

33+
### GitHub Copilot Coding Agents
34+
35+
To help you get started and work effectively in this codebase, we've configured specialized GitHub Copilot coding agents. These agents provide:
36+
37+
- **Quick reference documentation** for different aspects of the project
38+
- **Best practices and conventions** specific to this repository
39+
- **AI-powered assistance** for common development tasks
40+
- **Domain expertise** in Go, Kubernetes, testing, and documentation
41+
42+
**Start here:**
43+
- 📖 [Agent System Overview](/.github/agents/README.md) - Understand the agent architecture
44+
- 🚀 [Quick Start Guide](/.github/agents/QUICK_START.md) - Find what you need fast
45+
- 🎯 [Specialist Agents](/.github/agents/) - Deep dive into specific domains
46+
47+
Even if you're not using GitHub Copilot, these agent specifications serve as excellent reference documentation for the project's conventions and best practices.
48+
3349
## Before contributing code
3450

3551
We welcome code patches, but to make sure things are well coordinated you should discuss any significant change before starting the work. The maintainers ask that you signal your intention to contribute to the project using the issue tracker. If there is an existing issue that you want to work on, please let us know so we can get it assigned to you. If you noticed a bug or want to add a new feature, there are issue templates you can fill out.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,16 @@ The following documentation is for the legacy autoscaling modes that continue to
6060

6161
We welcome contributions from the community. For more details on contributing to the project (including requirements), please refer to "[Getting Started with Contributing](https://github.com/actions/actions-runner-controller/blob/master/CONTRIBUTING.md)."
6262

63+
### GitHub Copilot Coding Agents
64+
65+
This repository is configured with GitHub Copilot coding agent specifications to help with development tasks. These AI-powered agents provide specialized guidance for different aspects of the project:
66+
67+
- **[Agent System Overview](/.github/agents/README.md)** - Complete guide to the agent system
68+
- **[Quick Start Guide](/.github/agents/QUICK_START.md)** - Get started with agents quickly
69+
- Specialized agents for Go, Kubernetes/Helm, Documentation, and Testing
70+
71+
The agents help both human developers (as reference documentation) and AI assistants (as specifications for automated assistance) work effectively in the codebase.
72+
6373
## Troubleshooting
6474

6575
We are very happy to help you with any issues you have. Please refer to the "[Troubleshooting](https://github.com/actions/actions-runner-controller/blob/master/TROUBLESHOOTING.md)" section for common issues.

0 commit comments

Comments
 (0)