Skip to content

Conversation

Copy link

Copilot AI commented Nov 3, 2025

Configures Copilot instructions as documented in GitHub's best practices for coding agents.

Changes

  • Created .github/copilot-instructions.md with repository-specific guidance:
    • Development setup (make targets, Python 3.10+ requirements)
    • Pre-commit hooks setup (make setup-precommit)
    • Code standards (Ruff formatting, mypy/pyright type checking, 88-char lines)
    • Testing conventions (pytest structure, markers for slow/java/python tests)
    • Running relevant tests before linting workflow
    • Development workflow (test → fix → lint → broader tests)
    • Conventional Commits format
    • Project structure (craft_parts/ modules, plugin system, state management)
    • Pydantic v2 patterns and security considerations
    • LGPL-3.0 license requirements

The file provides context-aware guidance for AI assistants working in this codebase.

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.

Add comprehensive Copilot instructions file that includes:
- Project overview and development setup
- Code style and formatting guidelines
- Testing conventions and commands
- Documentation standards
- Commit message format
- Project structure overview
- Common patterns and best practices
- Security considerations

Co-authored-by: lengau <[email protected]>
Copilot AI changed the title [WIP] ✨ Set up Copilot instructions Add GitHub Copilot instructions for repository Nov 3, 2025
Copilot AI requested a review from lengau November 3, 2025 11:08
Copilot finished work on behalf of lengau November 3, 2025 11:08
@lengau
Copy link
Contributor

lengau commented Nov 3, 2025

@copilot Have use the Makefile to generate test commands that only run the relevant tests, and have it use those tests locally before linting

Update Copilot instructions to emphasize:
- Running relevant tests using uv run pytest with specific paths/patterns
- Testing workflow: run relevant tests → fix failures → lint → broader tests
- Examples of test selection (specific modules, directories, patterns)
- Importance of running tests before linting to catch issues early

Co-authored-by: lengau <[email protected]>
Copy link
Author

Copilot AI commented Nov 3, 2025

@copilot Have use the Makefile to generate test commands that only run the relevant tests, and have it use those tests locally before linting

Updated the instructions to include:

  1. Running Relevant Tests section with examples using uv run pytest for:

    • Specific modules/files
    • Directories
    • Test patterns
    • Fast tests for specific areas
  2. Development Workflow section emphasizing the order:

    • Run relevant tests first
    • Fix failures
    • Run linters
    • Run broader tests before committing

Commit: 2292a20

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • canonical-bos01.cdn.snapcraftcontent.com
    • Triggering command: /usr/lib/snapd/snapd (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot finished work on behalf of lengau November 3, 2025 11:17
@lengau
Copy link
Contributor

lengau commented Nov 3, 2025

@copilot Add the setup of precommit

Add section about setting up pre-commit hooks including:
- make setup-precommit command
- List of automatic checks performed by hooks
- Integration with existing linting and formatting tools

Co-authored-by: lengau <[email protected]>
Copy link
Author

Copilot AI commented Nov 3, 2025

@copilot Add the setup of precommit

Added pre-commit setup section with:

  • make setup-precommit command
  • List of automatic checks (trailing whitespace, YAML/TOML syntax, ruff, prettier)
  • Placed in Development Environment section after initial setup

Commit: 777ade9

Copilot finished work on behalf of lengau November 3, 2025 13:43
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