Skip to content

Commit c4b4be4

Browse files
authored
Add copilot management files (#12207)
* Add copilot management files * Add AI statements to README and CONTRIBUTING * Add statement to pull request template
1 parent 2c3a1a0 commit c4b4be4

File tree

5 files changed

+79
-2
lines changed

5 files changed

+79
-2
lines changed

.github/CONTRIBUTING.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ These are just guidelines, not rules. Use your best judgment, and feel free to p
1515
* [Bug reports](#bug-reports)
1616
* [Discuss with the team](#discuss-with-the-team)
1717
* [Your first code contribution](#your-first-code-contribution)
18+
* [Using AI](#using-ai)
1819
* [Pull requests](#pull-requests)
1920
* [Translations](#translations)
2021

@@ -74,6 +75,10 @@ Unsure where to begin contributing to KeePassXC? You can start by looking throug
7475

7576
Both issue lists are sorted by total number of comments. While not perfect, looking at the number of comments on an issue can give a general idea of how much an impact a given change will have.
7677

78+
### Using AI
79+
80+
Generative AI is fast becoming a first-party feature in most development environments, including GitHub itself. If you use Generative AI to write the vast majority of your submission (e.g., agent-based or vibe coding) then you **must document your use of AI** in your pull request. Please include the service you used and/or model that generated the code. All code submissions go through a rigourous review process regardless of the development workflow used.
81+
7782
### Pull requests
7883

7984
Along with our desire to hear your feedback and suggestions, we're also interested in accepting direct assistance in the form of code.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
[NOTE]: # ( Describe your changes in detail, why is this change required? )
2-
[NOTE]: # ( Explain large or complex code modifications. )
1+
[NOTE]: # ( Describe your changes in detail. Explain large or complex code modifications. )
32
[NOTE]: # ( If it fixes an open issue, please add "Fixes #XXX". )
3+
[NOTE]: # ( If you used Generative AI to write the majority of your code, you must state this. )
44

55

66
## Screenshots
77
[NOTE]: # ( Do not include screenshots of your actual database! )
88
[TIP]: # ( Use View -> Allow Screen Capture )
99

10+
1011
## Testing strategy
1112
[NOTE]: # ( Please describe in detail how you tested your changes. )
1213
[TIP]: # ( We expect new code to be covered by unit tests and include helpful comments. )

.github/copilot-instructions.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
This is a C++ based repository that uses Qt5 as a primary support and GUI library. This repository is for a password manager application that stores passwords
2+
and other highly sensitive information. The data format that passwords are stored is called KDBX which is a mixed binary and XML format that is fully encrypted
3+
at rest. This format is unpacked into a series of data structures: Database, Groups, and Entries. Please follow these guidelines when contributing:
4+
5+
## Code Standards
6+
7+
### Required Before Each Commit
8+
- Run `cmake --build . --target format` before committing any changes to ensure proper code formatting
9+
- This will run clang-format to ensure all code conforms to the style guide
10+
- From the checkout directory, also run `./release-tool i18n lupdate` to update translation files
11+
12+
### Development Flow
13+
- Setup Build Folder: `mkdir build; cd build`
14+
- Configure: `cmake -G Ninja -DWITH_XC_ALL=ON -DWITH_GUI_TESTS=ON ..`
15+
- Build: `cmake --build . -- -j $(nproc)`
16+
- Test: `ctest`
17+
18+
## Repository Structure
19+
- `docs/topics`: Documentation written in asciidoctor syntax
20+
- `src/`: Main source code files are under this subdirectory
21+
- `src/autotype`: Code that emulates a virtual keyboard to type into interfaces
22+
- `src/browser`: Interface with the KeePassXC Browser Extension using a JSON-based protocol
23+
- `src/cli`: Command Line Interface code
24+
- `src/core`: Contains files that define the data model and other shared code structures
25+
- `src/format`: Code for import/export and reading/writing of KDBX databases
26+
- `src/fdosecrets`: freedesktop.org Secret Service interface code
27+
- `src/quickunlock`: Quick unlock interfaces for various platforms
28+
- `src/sshagent`: SSH Agent interface code to load private keys from the database into ssh-agent
29+
- `tests/`: Test source code files
30+
- `tests/gui`: GUI test source code files
31+
32+
## Key Guidelines
33+
1. Follow C++20 and Qt5 best practices and idiomatic patterns
34+
2. Maintain existing code structure and organization
35+
3. Prefer not to edit cryptographic handling code or other sensitive parts of the code base
36+
4. Write unit tests for new functionality using QTest scaffolding
37+
5. Suggest changes to the `docs/topics` folder when appropriate
38+
6. Unless the change is simple, don't actually make edits to .ui files, just suggest the changes needed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Setup the environment for Copilot agents to run in
4+
on:
5+
workflow_dispatch:
6+
push:
7+
paths:
8+
- .github/workflows/copilot-setup-steps.yml
9+
pull_request:
10+
paths:
11+
- .github/workflows/copilot-setup-steps.yml
12+
13+
jobs:
14+
copilot-setup-steps:
15+
runs-on: ubuntu-latest
16+
17+
# Needed to clone the repository
18+
permissions:
19+
contents: read
20+
21+
# Install dependencies
22+
steps:
23+
- name: Checkout code
24+
uses: actions/checkout@v4
25+
26+
- name: Install dependencies
27+
run: |
28+
sudo apt update
29+
sudo apt install --no-install-recommends build-essential cmake g++ ninja-build qtbase5-dev qtbase5-private-dev qttools5-dev qttools5-dev-tools libqt5svg5-dev libargon2-dev libkeyutils-dev libminizip-dev libbotan-2-dev libqrencode-dev zlib1g-dev asciidoctor libreadline-dev libpcsclite-dev libusb-1.0-0-dev libxi-dev libxtst-dev libqt5x11extras5-dev

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ You may directly contribute your own code by submitting a pull request. Please r
5656

5757
Contributors are required to adhere to the project's [Code of Conduct](CODE-OF-CONDUCT.md).
5858

59+
## Generative AI
60+
61+
Generative AI is fast becoming a first-party feature in most development environments, including GitHub itself. If the majority of a code submission is made using Generative AI (e.g., agent-based or vibe coding) then **we will document that in the pull request.** All code submissions go through a rigourous review process regardless of the development workflow or submitter.
62+
5963
## License
6064

6165
KeePassXC code is licensed under GPL-2 or GPL-3. Additional licensing for third-party files is detailed in [COPYING](./COPYING).

0 commit comments

Comments
 (0)