Skip to content

eBPF-based security platform

agents: add a skill for the pages a change has to update

Daniel Borkmann4b56891743f0
diff --git a/.agents/skills/docs/SKILL.md b/.agents/skills/docs/SKILL.md
new file mode 100644
index 00000000..1e7227c8
--- /dev/null
+++ b/.agents/skills/docs/SKILL.md
@@ -0,0 +1,65 @@
+---
+name: docs
+description: Keep Documentation/ in step with a change to shirudo. Covers which pages describe a command, option, message, failure category, tamper counter, LSM hook, file, unit, environment variable, setting, format, Beefile key, test, kernel patch or threat, how to write the change in the voice of its page, and how to check the result. Use whenever code changes behavior a page describes, when a test is added or removed, and when writing or reviewing a page.
+---
+
+# Documentation
+
+A change to behavior updates the pages that describe it in the same
+commit, and a page that no longer matches the code is a bug, whichever
+of the two is wrong. `Documentation/contribute/documentation/writing-docs.rst`
+is the style guide.
+
+## Find the pages
+
+Search for every name the change adds, renames or removes, in the pages
+and the skills alike:
+
+```sh
+git grep -n '<name>' Documentation completion .agents/skills
+```
+
+Then go through the pages each kind of change has:
+
+| Change | Pages |
+|---|---|
+| Command, option, usage | `reference/cli/<command>.rst`, the command's help text, `completion/shirudo.bash`, `reference/cheat-sheet.rst`, the guides that run it |
+| Error message, exit status, failure category | `reference/failure-categories.rst` |
+| Tamper counter | `security/tamper-counters.rst` |
+| LSM hook | `internals/enforcement.rst`, the fact boxes of `security/threat-model.rst` |
+| File or directory | `reference/files.rst` |
+| systemd unit | `reference/systemd-units.rst` |
+| Environment variable | `reference/environment.rst` |
+| Setting | `reference/formats/configuration.rst` |
+| `.upatch`, bpm, eventlog, OTLP or status JSON format | `reference/formats/<format>.rst` |
+| Beefile key | `upatches/publish/beefile.rst` |
+| Threat closed or opened, residual risk | `security/threat-model.rst` |
+| Test or fuzz target | `contribute/testing/test-coverage.rst` |
+| Carried kernel patch | `internals/kernel-patches.rst` |
+| How a mechanism works | its page under `internals/` |
+
+## Write
+
+- Each page has one type, set by its `:page-type:` line, and the voice
+ of that type ("Page types" in the style guide): a reference page
+ states facts in tables and exact syntax, a how-to gives numbered
+ steps, an explanation goes from the problem to the mechanism and its
+ limits.
+- American English. Commands, options, paths and values go in double
+ backticks; a source file is linked with `` :src:`<path>` ``.
+- Name only hooks, counters, tests and options that exist.
+- A new page carries `:page-type:` and `:audience:` and goes into its
+ section's toctree. Nothing that is not about the project as a whole
+ goes in the top-level directory, and no README or notes file goes
+ beside the code.
+
+## Check
+
+```sh
+.github/scripts/check-docs.sh
+make -C Documentation check # DOCS_CONTAINER=0 without podman or docker
+```
+
+`check-docs.sh` checks the options of console examples, the failure
+categories, tamper counters, hooks, tests and units the pages name. It
+cannot check the prose: read each changed paragraph against the code.
diff --git a/AGENTS.md b/AGENTS.md
index caf0edf4..a9113f51 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -57,7 +57,7 @@ remote-management or transport layers.
| `Documentation/upatches/` | Authoring and shipping upatches: attach kinds, maps and serializers, decoders, the Beefile, publishing, debugging a failed load. |
| `Documentation/reference/` | Every command (`reference/cli/`), the formats and settings (`reference/formats/`, including the `.upatch` container), failure categories and exit status, files, units, environment variables, the cheat sheet. |
| `Documentation/contribute/` | Developer guide, test tiers and the test VM (read `testing.rst` before adding or moving a test), test coverage, the kernel coding style, commits and sign-off (read `contributing.rst` before crafting a commit), and the documentation style guide `writing-docs.rst`. |
-| `.agents/skills/` | Skills for coding agents in the `SKILL.md` format of agentskills.io, which Codex reads there and Claude Code through the `.claude/skills` link: `testing` runs the test tiers and the test VM, `pre-submit` the checks CI runs on a series, `upatch` builds, packages and publishes an upatch, `bpf-concurrency` checks upatch code whose runs share state, `bpf-coccinelle` runs and extends the Coccinelle rules for it. |
+| `.agents/skills/` | Skills for coding agents in the `SKILL.md` format of agentskills.io, which Codex reads there and Claude Code through the `.claude/skills` link: `testing` runs the test tiers and the test VM, `pre-submit` the checks CI runs on a series, `upatch` builds, packages and publishes an upatch, `bpf-concurrency` checks upatch code whose runs share state, `bpf-coccinelle` runs and extends the Coccinelle rules for it, `docs` finds and checks the pages a change touches. |
The kernel side of the signing design is the kernel's own
`Documentation/bpf/signing.rst`; `bpf_prog_verify_signature()` runs