Skip to content

chore: add Copilot instructions#3074

Merged
marcnause merged 9 commits intofossasia:flutterfrom
marcnause:add-copilot-instructions-file
Mar 9, 2026
Merged

chore: add Copilot instructions#3074
marcnause merged 9 commits intofossasia:flutterfrom
marcnause:add-copilot-instructions-file

Conversation

@marcnause
Copy link
Contributor

@marcnause marcnause commented Feb 15, 2026

Fixes: #3073

I hope this PR will have a positive effect on Copilot code reviews.

Summary by Sourcery

Add GitHub Copilot guidance for this repository to improve AI-assisted code reviews and contributions.

Documentation:

  • Document the project overview, tech stack, and repository structure for Copilot usage.
  • Specify coding standards, architectural guidelines, commit style, and UI best practices to guide AI-generated changes.

Summary by Sourcery

Add repository-level GitHub Copilot guidance to align AI-assisted contributions with the project’s architecture and standards.

Documentation:

  • Document project overview, tech stack, and repository structure for Copilot usage.
  • Define coding standards, architectural principles, and commit style expectations for AI-generated changes.
  • Outline UI consistency and adaptive design guidelines for Copilot-assisted UI modifications.

Copilot AI review requested due to automatic review settings February 15, 2026 16:43
@sourcery-ai
Copy link
Contributor

sourcery-ai bot commented Feb 15, 2026

Reviewer's Guide

Adds a GitHub Copilot configuration document describing the project, tech stack, repo structure, coding standards, commit style, and UI guidelines to guide AI-assisted contributions and reviews.

Flow diagram for repository structure documented for Copilot

graph TD
  A[pslab-app root] --> B[android]
  A --> C[ios]
  A --> D[linux]
  A --> E[macos]
  A --> F[windows]
  A --> G[web]
  A --> H[lib]
  A --> I[test]
  A --> J[test_integration]
  A --> K[assets]
  A --> L[.github]
  A --> M[scripts]
  A --> N[pubspec.yaml]

  subgraph LibDirectory
    H --> H1[communication]
    H --> H2[providers]
    H --> H3[view]
    H --> H4[models]
    H --> H5[theme]
    H --> H6[l10n]
    H --> H7[others]
    H --> H8[constants.dart]
    H --> H9[main.dart]
  end

  subgraph GithubDirectory
    L --> L1[workflows]
    L --> L2[actions]
  end
Loading

File-Level Changes

Change Details Files
Introduce repository-wide GitHub Copilot guidance documentation for AI-assisted development and reviews.
  • Create .github/copilot-instructions.md as a new documentation file.
  • Document project overview, tech stack, and supported platforms for Copilot context.
  • Describe repository structure at a high level, including key lib subdirectories and tests.
  • Specify coding standards and architectural principles (Effective Dart, SOLID, OOD, Flutter architecture guide) to constrain AI-generated code.
  • Reference existing commit style documentation and add UI consistency and adaptive design guidelines.
.github/copilot-instructions.md

Assessment against linked issues

Issue Objective Addressed Explanation
#3073 Add a repository-level file that provides customized instructions and rules for GitHub Copilot, particularly for code reviews in this project.

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Fix the typos in the commit style section (e.g., change Adfhere to Adhere and dewscribe to describe) to keep the instructions clear and professional.
  • Double-check the reference to commitstyle.md in docs to ensure the path and filename are correct and stable, since Copilot and contributors will rely on this pointer for commit conventions.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Fix the typos in the commit style section (e.g., change `Adfhere` to `Adhere` and `dewscribe` to `describe`) to keep the instructions clear and professional.
- Double-check the reference to `commitstyle.md` in `docs` to ensure the path and filename are correct and stable, since Copilot and contributors will rely on this pointer for commit conventions.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a Copilot instructions file to guide GitHub Copilot in understanding the PSLab Flutter app's architecture, conventions, and best practices. The file provides comprehensive context about the project's tech stack, repository structure, and coding standards to improve Copilot-assisted code reviews and generation.

Changes:

  • Added .github/copilot-instructions.md documenting project overview, tech stack (Flutter/Dart with Provider pattern and GetIt), repository structure, coding standards (Effective Dart, SOLID principles), commit style conventions, and UI guidelines.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marcnause marcnause added the Chore Changes to things that do not go into production label Feb 15, 2026
Copilot AI review requested due to automatic review settings February 15, 2026 16:54
@marcnause marcnause marked this pull request as draft February 15, 2026 16:55
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 15, 2026

Build Status

Build successful. APKs to test: https://github.com/fossasia/pslab-app/actions/runs/22850221412/artifacts/5827784915.

Screenshots

Android Screenshots
iPhone Screenshots
iPad Screenshots

@marcnause
Copy link
Contributor Author

I have no idea what Codacy does not like about the document. The structure is correct, as far as I can tell.

@marcnause marcnause marked this pull request as ready for review February 15, 2026 18:26
Copilot AI review requested due to automatic review settings February 15, 2026 18:26
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've left some high level feedback:

  • Consider clarifying how Copilot (or other AI tools) should interpret these guidelines in case of conflicts (e.g., which takes precedence between existing code style, Dart guidelines, and SOLID/OOD principles) so automated suggestions can prioritize correctly.
  • The repository structure section hardcodes specific directories and comments (e.g., providers count, others/), which may drift over time; you might want to either generalize these descriptions or explicitly note that this tree is illustrative rather than authoritative.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- Consider clarifying how Copilot (or other AI tools) should interpret these guidelines in case of conflicts (e.g., which takes precedence between existing code style, Dart guidelines, and SOLID/OOD principles) so automated suggestions can prioritize correctly.
- The repository structure section hardcodes specific directories and comments (e.g., `providers` count, `others/`), which may drift over time; you might want to either generalize these descriptions or explicitly note that this tree is illustrative rather than authoritative.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@marcnause marcnause force-pushed the add-copilot-instructions-file branch from fbf9b17 to 4102f00 Compare February 17, 2026 20:52
Removed a blank line at the beginning of the file.
Copilot AI review requested due to automatic review settings March 9, 2026 10:52
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

```text
pslab-app/
├── android/ # Android-specific platform code
├── ios/ # iOS-specific platform code
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are trailing spaces at the end of this line (after "code"). In Markdown this can create an unintended hard line break and also adds noise to diffs; please remove the trailing whitespace.

Suggested change
├── ios/ # iOS-specific platform code
├── ios/ # iOS-specific platform code

Copilot uses AI. Check for mistakes.
│ ├── constants.dart # App-wide constants
│ └── main.dart # App entry point
├── test/ # Unit tests
├── test_integration/# Integration tests
Copy link

Copilot AI Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The repository tree entry for test_integration/ is missing spacing before the inline comment (test_integration/# ...), which is inconsistent with the other entries and renders oddly. Consider aligning it as test_integration/ # Integration tests.

Suggested change
├── test_integration/# Integration tests
├── test_integration/ # Integration tests

Copilot uses AI. Check for mistakes.
@marcnause marcnause merged commit e16ffea into fossasia:flutter Mar 9, 2026
12 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chore Changes to things that do not go into production

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add file to customize GitHub Copilot responses

3 participants