Getting it into your agent
One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.
npx agentmods add rules/briangmilnes/apas-verus/wrap-vs-specifygit clone --depth 1 https://github.com/briangmilnes/APAS-VERUSWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/rules/briangmilnes/apas-verus/wrap-vs-specify)<a href="https://agentmods.dev/rules/briangmilnes/apas-verus/wrap-vs-specify"><img src="https://agentmods.dev/badge/rules/briangmilnes/apas-verus/wrap-vs-specify.svg" alt="Measured on agentmods" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00000 | $0.00630 |
| Opus 5 | $0.00000 | $0.00315 |
| Sonnet 5 | $0.00000 | $0.00126 |
| Haiku 4.5 | $0.00000 | $0.00063 |
Grade A, and why
wrap-vs-specify scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 78 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Wrap vs Specify
Two approaches for adding Verus specifications to Rust types:
SPECIFY (external_type_specification / assume_specification)
Adds specs directly to an existing Rust type WITHOUT creating a new struct.
// The std type IS the type you use
#[verifier::external_type_specification]
pub struct ExHashSet<K, S>(HashSet<K, S>);
// Users write:
let s: HashSet<u64> = HashSet::new();
assert(s@ == Set::empty()); // Specs available on std type
Characteristics:
- No new struct created
- User uses the original std type directly
- View type matches the std type's generic params (e.g.,
Set<K>notSet<K::V>) - Cannot add new methods, only specs to existing methods
WRAP (new struct containing the std type)
Creates a NEW struct that contains the std type as a field.
// New struct wrapping the std type
pub struct HashSetWithView<K: View + Eq + Hash> {
m: HashSet<K>, // the wrapped std type
}
// Users write:
let s: HashSetWithView<MyKey> = HashSetWithView::new();
assert(s@ == Set::empty()); // View can differ from inner type's view
Characteristics:
- New struct created
- User uses the wrapper type, not std type directly
- View type can be transformed (e.g.,
Set<K::V>mapped from keys) - Can add new methods beyond what std provides
- Can enforce additional invariants in preconditions
When to Use Which
| Situation | Use |
|---|---|
| Simple types, no View mapping needed | SPECIFY |
Need K::V instead of K in view |
WRAP |
| Need to add methods std doesn't have | WRAP |
Need to enforce coherence properties (e.g., obeys_feq_full) |
WRAP |
| Want users to use familiar std types | SPECIFY |
Examples in vstd
| std Type | SPECIFY | WRAP |
|---|---|---|
Vec<T> |
ExVec |
— |
HashSet<K> |
ExHashSet |
HashSetWithView |
HashMap<K,V> |
ExHashMap |
HashMapWithView |
hash_set::Iter<K> |
ExSetIter |
— |
Examples in vstdplus/APAS
| std Type | SPECIFY | WRAP |
|---|---|---|
HashSet<K> |
— | HashSetWithViewPlus (adds iter()) |
hash_set::Iter<K> |
— | SetStEphIter (closed spec view) |
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- yesterday First seen · 78 lines · 0 tokens per session scan A 40ba5eeea828
wrap-vs-specify is a cursor rule published in the GitHub repository briangmilnes/APAS-VERUS (10 stars, last pushed 1mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 630 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.
Other cursor rules, from other repositories
core
Core STT/TTS abstraction layer documentation.
sounio
Sounio language rules — epistemic types, effects, algebra, GPU programming.
rust-architect
PoolAI — Rust Architect workflow: runtime stack, MSYS2, target/ disk, pre-push checks, docs sync.
rust-development-standards
Rust development standards: idioms, style, anti-patterns (Rust 2021 edition, 2024 where applicable).
ivolgaql-project
Общие принципы ИволгаQL (MVP, Rust, русский UX, TCP).
rust-hexagonal
Règles Rust Architecture Hexagonale avec gRPC (tonic).