Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Jul 11, 2025

This PR provides detailed analysis and recommendations for improving the .github/copilot-instructions.md file based on:

  1. Repository context analysis - Understanding AC Training Lab as an autonomous laboratory equipment control system
  2. Latest GitHub/VS Code best practices (2024-2025) for Copilot custom instructions
  3. Hardware integration and IoT development requirements for AI coding assistants
  4. Current codebase patterns and practices examination

Key Findings

Critical Safety Issue ⚠️

The current instruction to "avoid defensive error handling for hypothetical failures" is dangerous for hardware control systems. Hardware operations controlling robotic arms, 3D printers, and laboratory equipment require robust error handling to prevent equipment damage and ensure safety.

Missing Elements (70% of GitHub Best Practices)

  • No project context - Users don't understand this controls autonomous lab equipment
  • No development workflow - Missing build/test/lint commands (tox, pre-commit)
  • No repository structure guide - 20+ device modules in src/ac_training_lab/ unexplained
  • No domain-specific patterns - Missing MQTT, hardware integration, scientific Python guidance

Recommendations

What Should Be KEPT

  • Minimal implementation approach for rapid prototyping
  • MCP tool integration guidelines
  • Communication clarity principles
  • Prioritizing official documentation

What Should Be MODIFIED 🔧

  • Error handling philosophy: Distinguish hardware operations (require error handling) from pure computational functions (minimal OK)
  • Add project overview: Explain autonomous laboratory equipment domain
  • Add development workflow: Include tox, pre-commit, device testing patterns

What Should Be ADDED 📈

  • Hardware integration patterns: MQTT command/response, safety protocols, connection retry logic
  • Repository structure: PyScaffold layout, device module organization
  • Scientific data handling: NumPy patterns, metadata requirements, reproducibility

Research Sources

  • GitHub's official best practices
  • Latest VS Code Copilot agent mode documentation
  • Hardware integration and IoT development best practices
  • Scientific Python and laboratory automation patterns

Impact

Current instructions miss critical safety considerations and modern best practices. The recommendations align with GitHub's 2024-2025 standards while addressing the unique requirements of autonomous laboratory equipment control.

Detailed analysis and improved instructions provided in the PR discussion for implementation reference.

Fixes #413.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

@Copilot Copilot AI changed the title [WIP] Provide feedback on the copilot custom instructions Provide comprehensive feedback on copilot custom instructions Jul 11, 2025
@Copilot Copilot AI requested a review from sgbaird July 11, 2025 02:38
Copilot finished work on behalf of sgbaird July 11, 2025 02:38
@sgbaird
Copy link
Member

sgbaird commented Jul 11, 2025

This was pretty good. Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide feedback on the copilot custom instructions
2 participants