Skip to content

Commit 023939b

Browse files
authored
update copilot instructions with AI compliance workflow (#353)
Signed-off-by: Rishi Kumar Chawda <rishichawda@users.noreply.github.com>
1 parent b174ed0 commit 023939b

File tree

1 file changed

+60
-1
lines changed

1 file changed

+60
-1
lines changed

.github/copilot-instructions.md

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ When a Jira ID is provided, use the **atlassian-mcp-server** to:
5757

5858
### 2. Implementation Process
5959

60-
#### Step-by-Step Workflow:
60+
#### Step-by-Step Workflow
61+
6162
1. **Analysis Phase**
6263
- Fetch and analyze Jira issue details
6364
- Review existing code and tests
@@ -89,13 +90,15 @@ When a Jira ID is provided, use the **atlassian-mcp-server** to:
8990
### 3. Testing Requirements
9091

9192
**Mandatory Testing Standards:**
93+
9294
- Minimum 80% test coverage required
9395
- Unit tests for all new functionality using RSpec
9496
- Integration tests using oc-pedant when applicable
9597
- Test both success and error scenarios
9698
- Mock external dependencies appropriately
9799

98100
**Test Commands:**
101+
99102
```bash
100103
# Run unit tests
101104
rake spec
@@ -162,6 +165,7 @@ EOF
162165
### 6. Build System Integration
163166

164167
**Expeditor Build System:**
168+
165169
- Automatic version bumping on merge
166170
- Changelog generation
167171
- Gem publishing to RubyGems
@@ -172,6 +176,7 @@ EOF
172176
- `Expeditor: Skip Changelog`
173177

174178
**GitHub Workflows:**
179+
175180
- `ci-main-pull-request-checks.yml`: Main CI pipeline
176181
- `unit-test.yml`: Unit test execution
177182
- `lint.yml`: Code style checking
@@ -180,6 +185,7 @@ EOF
180185
### 7. Repository-Specific GitHub Labels
181186

182187
**Aspect Labels:**
188+
183189
- `Aspect: Documentation`: Documentation-related changes
184190
- `Aspect: Integration`: Integration with other systems
185191
- `Aspect: Packaging`: Distribution and packaging
@@ -193,26 +199,30 @@ EOF
193199
- `Aspect: UX`: User experience improvements
194200

195201
**Platform Labels:**
202+
196203
- `Platform: AWS`, `Platform: Azure`, `Platform: GCP`
197204
- `Platform: Linux`, `Platform: macOS`
198205
- `Platform: Debian-like`, `Platform: RHEL-like`, `Platform: SLES-like`
199206
- `Platform: Docker`
200207

201208
**Special Labels:**
209+
202210
- `dependencies`: Dependency updates
203211
- `oss-standards`: OSS standardization
204212
- `hacktoberfest-accepted`: Hacktoberfest contributions
205213

206214
### 8. Prompt-Based Development
207215

208216
**After each step, provide:**
217+
209218
1. Summary of completed work
210219
2. Current status
211220
3. Next step in the process
212221
4. Remaining steps overview
213222
5. **Ask for confirmation to continue**
214223

215224
Example prompt:
225+
216226
```
217227
✅ Completed: Analysis of Jira issue JIRA-123 and identified required changes
218228
📍 Current: Ready to implement feature in lib/chef_zero/endpoints/
@@ -225,6 +235,7 @@ Would you like me to proceed with the implementation phase?
225235
### 9. Prohibited Modifications
226236

227237
**DO NOT modify these files without explicit approval:**
238+
228239
- `VERSION` file (managed by Expeditor)
229240
- `.expeditor/config.yml` (build configuration)
230241
- Core gemspec metadata
@@ -234,6 +245,7 @@ Would you like me to proceed with the implementation phase?
234245
### 10. Code Style and Conventions
235246

236247
**Ruby Style Guidelines:**
248+
237249
- Follow RuboCop/Cookstyle conventions
238250
- Use 2-space indentation
239251
- Maximum 120 characters per line
@@ -242,6 +254,7 @@ Would you like me to proceed with the implementation phase?
242254
- Add appropriate error handling and logging
243255

244256
**Chef Zero Specific Patterns:**
257+
245258
- Inherit from `RestBase` for new endpoints
246259
- Use appropriate HTTP status codes
247260
- Follow existing JSON response formats
@@ -299,6 +312,52 @@ gh pr create --title "Title" --body "Description with HTML tags"
299312
- Ensure DCO compliance for all contributions
300313
- Maintain compatibility with Chef Client versions 11+
301314

315+
## AI-Assisted Development & Compliance
316+
317+
- ✅ Create PR with `ai-assisted` label (if label doesn't exist, create it with description "Work completed with AI assistance following Progress AI policies" and color "9A4DFF")
318+
- ✅ Include "This work was completed with AI assistance following Progress AI policies" in PR description
319+
320+
### Jira Ticket Updates (MANDATORY)
321+
322+
-**IMMEDIATELY after PR creation**: Update Jira ticket custom field `customfield_11170` ("Does this Work Include AI Assisted Code?") to "Yes"
323+
- ✅ Use atlassian-mcp tools to update the Jira field programmatically
324+
-**CRITICAL**: Use correct field format: `{"customfield_11170": {"value": "Yes"}}`
325+
- ✅ Verify the field update was successful
326+
327+
### Documentation Requirements
328+
329+
- ✅ Reference AI assistance in commit messages where appropriate
330+
- ✅ Document any AI-generated code patterns or approaches in PR description
331+
- ✅ Maintain transparency about which parts were AI-assisted vs manual implementation
332+
333+
### Workflow Integration
334+
335+
This AI compliance checklist should be integrated into the main development workflow Step 4 (Pull Request Creation):
336+
337+
```
338+
Step 4: Pull Request Creation & AI Compliance
339+
- Step 4.1: Create branch and commit changes WITH SIGNED-OFF COMMITS
340+
- Step 4.2: Push changes to remote
341+
- Step 4.3: Create PR with ai-assisted label
342+
- Step 4.4: IMMEDIATELY update Jira customfield_11170 to "Yes"
343+
- Step 4.5: Verify both PR labels and Jira field are properly set
344+
- Step 4.6: Provide complete summary including AI compliance confirmation
345+
```
346+
347+
- **Never skip Jira field updates** - This is required for Progress AI governance
348+
- **Always verify updates succeeded** - Check response from atlassian-mcp tools
349+
- **Treat as atomic operation** - PR creation and Jira updates should happen together
350+
- **Double-check before final summary** - Confirm all AI compliance items are completed
351+
352+
### Audit Trail
353+
354+
All AI-assisted work must be traceable through:
355+
356+
1. GitHub PR labels (`ai-assisted`)
357+
2. Jira custom field (`customfield_11170` = "Yes")
358+
3. PR descriptions mentioning AI assistance
359+
4. Commit messages where relevant
360+
302361
---
303362

304363
*This document should be updated as the project evolves and new requirements emerge.*

0 commit comments

Comments
 (0)