Skip to content

eBPF-based security platform

agents: adapt the proofs with the code they cover

Daniel Borkmann9a2f2162132f
diff --git a/.agents/skills/coding/SKILL.md b/.agents/skills/coding/SKILL.md
index 97945d9b..537250d7 100644
--- a/.agents/skills/coding/SKILL.md
+++ b/.agents/skills/coding/SKILL.md
@@ -176,6 +176,8 @@ code, signing and the package builder, stays out of the core binary.
A warning fails the build, so fix it rather than silence it. Build with
GCC and with clang 23 (`make -B` when switching), run the unit suite of
-every `util/` file the change touches, and run the `pre-submit` skill's
-checks before handing the change over: checkpatch in strict mode,
-Coccinelle, sparse and both sanitizers find what review misses.
+every `util/` file the change touches, adapt and run the proofs under
+`testing/proofs/` that reach the code (the `proofs` skill), and run the
+`pre-submit` skill's checks before handing the change over: checkpatch
+in strict mode, Coccinelle, sparse and both sanitizers find what review
+misses.
diff --git a/.agents/skills/proofs/SKILL.md b/.agents/skills/proofs/SKILL.md
index 15bc8541..57fdd9cc 100644
--- a/.agents/skills/proofs/SKILL.md
+++ b/.agents/skills/proofs/SKILL.md
@@ -7,9 +7,11 @@ description: Run, write and debug shirudo's proofs, CBMC under testing/proofs/cb
`Documentation/contribute/testing/proofs.rst` is the how-to, and
`Documentation/contribute/testing/proof-coverage.rst` lists every proof
-and what no proof covers yet. A change to code a proof covers runs that
-proof, and a change to a proof or to what it covers updates the coverage
-page in the same commit.
+and what no proof covers yet. A change to code a proof covers adapts the
+harness or the Lean 4 model in the same commit, where the change moved
+what it states, and runs that proof (`git grep -n '<file>.c\|<function>'
+testing/proofs/cbmc` finds the harnesses that reach the code); a change to
+a proof or to what it covers updates the coverage page too.
## Run
diff --git a/AGENTS.md b/AGENTS.md
index e566baf1..cb66b15e 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -68,6 +68,15 @@ one of those checks the skills that mention it (`git grep -n '<name>'
.agents/skills`) and updates them in the same commit, and a skill that
no longer matches the tree is a bug like a page.
+The proofs under `testing/proofs/` follow the code the same way. A
+change to a file or function a CBMC harness includes or reaches (`git
+grep -n '<file>.c\|<function>' testing/proofs/cbmc`), or to an algorithm
+a Lean 4 model of `testing/proofs/lean4/` follows, adapts the harness or
+the model in the same commit, with its line in `proofs.list` and its row
+in `Documentation/contribute/testing/proof-coverage.rst`, and runs the
+proofs it touches. A proof that no longer matches the code, or no
+longer holds, is a bug like a page.
+
New documentation extends an existing page or adds one to its section's
toctree, and follows `Documentation/contribute/documentation/writing-docs.rst`. Only
what concerns the project as a whole goes in the top-level directory