← Back to issue list

docs: add GitHub Copilot instructions and setup validation workflow

View original Github issue

Metadata

Project
craft-parts
Number
#1389
Type
pull request
State
open
Author
Copilot
Labels
Created
2025-11-03 10:58:18+00:00
Updated
2025-12-08 21:13:21+00:00
Closed

Current evaluation

No evaluation has been recorded for this issue yet.

Issue body

Configures Copilot instructions as documented in GitHub's best practices for coding agents, along with a CI workflow to validate the setup steps. ## Changes - **Created `.github/copilot-instructions.md`** with repository-specific guidance: - Development setup (`make setup` for full environment) - Pre-commit hooks setup (`make setup-precommit`) - Code standards (Ruff formatting, mypy/pyright type checking, 88-char lines) - Simplified linting workflow (`make format` then `make lint`) - Testing conventions (pytest structure, markers for `slow`/`java`/`python`/`plugin` integration tests) - Running relevant tests before linting with examples using `uv run pytest` - Development workflow (test → fix → lint → broader tests) - Conventional Commits format for both commit messages and PR titles with scope guidance - Project structure (`craft_parts/` modules, plugin system, state management) - Pydantic v2 patterns and security considerations (emphasizing v2 API to prevent confusion with v1) - LGPL-3.0 license requirements - Documentation style guidelines (app-agnostic content, Diátaxis framework) - **Created `.github/workflows/copilot-setup-steps.yaml`** to validate setup steps: - Runs on `ubuntu-latest` - Uses `lengau/pristine-ubuntu-action` for clean Ubuntu environment - Uses `canonical/starflow/setup-python-runner` for Python setup - Validates `make setup` command - Runs linters and fast tests to verify complete setup - Triggers on changes to Copilot instructions, Makefile, or the workflow itself The Copilot instructions file provides streamlined, context-aware guidance for AI assistants working in this codebase, focusing on essential development workflows. The instructions explicitly clarify that Conventional Commits applies to both commit messages and PR titles, and encourages using scopes (e.g., `feat(plugins):`, `fix(executor):`, `docs(contributing):`) when possible. The Pydantic v2.0+ notation emphasizes the use of v2 API (not v1) to help developers avoid confusion with outdated v1 syntax found in many online resources. The workflow ensures the documented setup steps remain valid and functional. <!-- START COPILOT CODING AGENT SUFFIX --> <details> <summary>Original prompt</summary> > > ---- > > *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](https://gh.io/copilot-coding-agent-tips). > > <Onboard this repo></issue_description> > > ## Comments on the Issue (you are @copilot in this section) > > <comments> > </comments> > </details> - Fixes canonical/craft-parts#1388 <!-- START COPILOT CODING AGENT TIPS --> --- 💬 We'd love your input! Share your thoughts on Copilot coding agent in our [2 minute survey](https://gh.io/copilot-coding-agent-survey).

Evaluation history

No evaluation history available.