Audit Correctness Proof
Testing & Qualityaudit-correctness-proofAudit Correctness Proof is an Agent Skill for testing & quality published in the ben-manes/caffeine repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.
Attempt formal correctness proofs for all public cache methods
How to use this skill
Bring this guide into your coding agent with a prompt tailored to the tool you use.
- Open your project in Codex.
- Copy and paste the prompt below.
- Review files and risks before approving any action.
Inspect the Agent Skill at https://github.com/ben-manes/caffeine/blob/HEAD/.claude/skills/audit-correctness-proof/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/audit-correctness-proof, but wait for my approval before writing files or running scripts.
Copying this prompt does not install or run the skill. Review third-party files before use.
Attempt to PROVE the correctness of the cache, not to find bugs.
For each public method (get, put, remove, compute, computeIfAbsent, merge, replace, size, clear):
-
State the method's specification: preconditions, postconditions, concurrent behavior promises.
-
Identify the synchronization protocol ensuring the postcondition.
-
Write a proof sketch: a. Assume the precondition holds b. Identify the critical section(s) c. Show the postcondition is established within the critical section d. Show no concurrent operation can invalidate it before the caller observes
-
If you CANNOT complete the proof at any step, stop and report:
- Which step fails
- What additional assumption would be needed
- Whether the code guarantees that assumption
Gaps in the proof are more valuable than speculative bug reports — a gap tells us exactly where to look.
Do not provide praise or style commentary.