Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 16, 2025

Configures repository-level guidance for both GitHub Copilot and Claude Code as per best practices documentation.

Changes

  • Created .github/copilot-instructions.md (299 lines) - Single source of truth with comprehensive context

    • Architecture: Python 3 GIMP plugin using GObject Introspection (gi) bindings, zero external dependencies
    • Core files: gimp-ai-plugin.py (main plugin), coordinate_utils.py (pure coordinate math, unit-testable)
    • OpenAI API integration: Shape selection algorithm for 1024×1024, 1536×1024, 1024×1536 constraints
    • Conventions: PEP 8, GIMP 3.0+ API patterns, configuration in ~/.config/gimp-ai-plugin/config.json
    • Testing: Manual testing in GIMP required, unit tests for pure functions
    • Platform paths: macOS (~/Library/Application Support/GIMP/3.0/plug-ins/), Linux (~/.config/GIMP/3.0/plug-ins/), Windows (%APPDATA%\GIMP\3.0\plug-ins\)
    • Security: Never commit API keys, sanitize user input, cleanup temp files
  • Created CLAUDE.md (10 lines) - Claude Code entry point using proper file reference syntax

    • Uses file:.github/copilot-instructions.md syntax per mcpcat.io best practices
    • Claude Code reads the actual file content directly from the referenced file
    • Zero content duplication - true single source of truth

Enables both Copilot and Claude Code to generate context-aware suggestions respecting the project's design principles (stateless operations, pure functions in coordinate_utils.py, non-destructive layer creation). All content is maintained in .github/copilot-instructions.md with Claude Code accessing it via proper file reference syntax.

Original prompt

This section details on the original issue you should resolve

<issue_title>✨ Set up Copilot instructions</issue_title>
<issue_description>Configure instructions for this repository as documented in Best practices for Copilot coding agent in your repository.

</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: lukaso <5034+lukaso@users.noreply.github.com>
Copilot AI changed the title [WIP] Configure instructions for Copilot in repository Add GitHub Copilot instructions for repository Nov 16, 2025
Copilot AI requested a review from lukaso November 16, 2025 00:36
@lukaso
Copy link
Owner

lukaso commented Nov 16, 2025

@copilot I also use Claude Code. Please make these instructions accessible to claude code as well.

Co-authored-by: lukaso <5034+lukaso@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot I also use Claude Code. Please make these instructions accessible to claude code as well.

Added .claude/instructions.md with the same comprehensive content as the GitHub Copilot instructions. Both files now provide identical guidance for working with this GIMP AI Plugin repository, ensuring consistent context whether you're using GitHub Copilot or Claude Code.

Commit: 52f0382

@lukaso
Copy link
Owner

lukaso commented Nov 16, 2025

@copilot claude uses the CLAUDE.md file to do the same thing. And you can add references in it. I only want one file with all the content if at all possible.

Copilot AI changed the title Add GitHub Copilot instructions for repository Add GitHub Copilot and Claude Code instructions for repository Nov 16, 2025
…nstructions

Co-authored-by: lukaso <5034+lukaso@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot claude uses the CLAUDE.md file to do the same thing. And you can add references in it. I only want one file with all the content if at all possible.

Refactored to use CLAUDE.md in the root that references .github/copilot-instructions.md. Now we have a single source of truth - all content is maintained in .github/copilot-instructions.md (299 lines), and CLAUDE.md provides a lightweight entry point with references to the main file plus a quick reference section for common information.

This approach avoids duplication while maintaining compatibility with both GitHub Copilot and Claude Code.

Commit: 4f6388d

@lukaso
Copy link
Owner

lukaso commented Nov 16, 2025

@copilot here's how you are supposed to do it: https://mcpcat.io/guides/reference-other-files/

…ructions.md

Co-authored-by: lukaso <5034+lukaso@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Nov 16, 2025

@copilot here's how you are supposed to do it: https://mcpcat.io/guides/reference-other-files/

Updated to use the proper file reference syntax from mcpcat.io. Now CLAUDE.md is minimal (8 lines) and uses file:.github/copilot-instructions.md syntax to directly reference the main instructions file, ensuring a true single source of truth with no content duplication.

Commit: a8377b0

@lukaso lukaso marked this pull request as ready for review November 16, 2025 12:09
@lukaso lukaso merged commit d15ca16 into main Nov 16, 2025
@lukaso lukaso deleted the copilot/set-up-copilot-instructions branch November 16, 2025 12:09
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.

✨ Set up Copilot instructions

2 participants