]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Add copilot instructions
authorDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 6 Oct 2025 08:42:10 +0000 (10:42 +0200)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Mon, 6 Oct 2025 09:44:20 +0000 (11:44 +0200)
This was generated using copilot itself with Claude Sonnet 4.5 as
the backing model.

The idea is to test this out on some PRs to see whether copilot can
provide useful PR reviews. The idea is that it'll be able to take care
of the low hanging fruit like coding style issues and such. Once we get
some feedback on how it performs, we can make more changes to this document
to get it to behave better (assuming we decide to keep using it at all).

.github/copilot-instructions.md [new file with mode: 0644]

diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md
new file mode 100644 (file)
index 0000000..f95c725
--- /dev/null
@@ -0,0 +1,38 @@
+# systemd AI Coding Agent Instructions
+
+## Project Overview
+
+systemd is a system and service manager for Linux, written in C (GNU17 with extensions). The project is built with Meson and consists of ~140 components including PID 1, journald, udevd, networkd, and many other system daemons.
+
+## Key Files & Directories
+
+Always include the following files in the context:
+
+- [code organization details](../docs/ARCHITECTURE.md)
+- [development workflow deep dive](../docs/HACKING.md)
+- [full style guide](../docs/CODING_STYLE.md)
+
+Include any other files from the [documentation](../docs) in the context as needed based on whether you think it might be helpful to solve your current task or help to review the current PR.
+
+## Pull Request review instructions
+
+- Focus on making sure the coding style is followed as documented in `docs/CODING_STYLE.md`
+- Only leave comments for logic issues if you are very confident in your deduction
+- Frame comments as questions
+- Always consider you may be wrong
+- Do not argue with contributors, assume they are right unless you are very confident in your deduction
+
+## Testing Expectations
+
+- Unit tests for self contained functions with few dependencies
+- Integration tests for system-level functionality
+- CI must pass (build + unit + integration tests)
+- Code coverage tracked via Coveralls
+
+## Integration with Development Tools
+
+- **clangd**: Use `mkosi.clangd` script to start a C/C++ LSP server for navigating C source and header files. Run `mkosi -f box -- meson setup build && mkosi -f box -- meson compile -C build gensources` first to prepare the environment.
+
+## AI Contribution Disclosure
+
+Per project policy: If you use AI code generation tools, you **must disclose** this in commit messages and PR descriptions. All AI-generated output requires thorough human review before submission.