File: AGENTS.md

package info (click to toggle)
systemd-udeb 260-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 114,360 kB
  • sloc: ansic: 741,727; xml: 122,306; python: 35,714; sh: 35,154; cpp: 947; awk: 126; makefile: 89; lisp: 13; sed: 1
file content (42 lines) | stat: -rw-r--r-- 1,950 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# AGENTS.md

This file provides guidance to AI coding agents when working with code in this repository. Only add
instructions to this file if you've seen an AI agent mess up that particular bit of logic in practice.

## Key Documentation

Always consult these files as needed:

- `docs/ARCHITECTURE.md` — code organization and component relationships
- `docs/HACKING.md` — development workflow with mkosi
- `docs/CODING_STYLE.md` — full style guide (must-read before writing code)
- `docs/CONTRIBUTING.md` — contribution guidelines and PR workflow

## Running arbitrary commands

- Always run arbitrary commands with the `mkosi box -- ` wrapper command. This runs in an environment where more tools are available.

## Build and Test Commands

- Never compile individual files or targets. Always run `mkosi -f box -- meson compile -C build` to build
the entire project. Meson handles incremental compilation automatically.
- Never run `meson compile` followed by `meson test` as separate steps. Always run
`mkosi -f box -- meson test -C build -v <TEST-NAME>` directly. Meson will automatically rebuild any required
targets before running tests.
- Never invent your own build commands or try to optimize the build process.
- Never use `head`, `tail`, or pipe (`|`) the output of build or test commands. Always let the full output
display. This is critical for diagnosing build and test failures.

## Integration Tests

- Never use `grep -q` in pipelines; use `grep >/dev/null` instead (avoids `SIGPIPE`)

## Pull Request Review Instructions

- Always check out the PR in a git worktree in `worktrees/`, review it locally and remove the worktree when finished.

## AI Contribution Disclosure

Per project policy: if you use AI code generation tools, you **must disclose** this in commit messages
by adding e.g. `Co-developed-by: Claude Opus 4.6 <noreply@anthropic.com>`.
All AI-generated output requires thorough human review before submission.