spec-fn-naming

spec-fn-naming is a cursor rule for Cursor from briangmilnes/APAS-VERUS. It costs 431 tokens per session, scanned A, original, MIT.

A naming rule for Verus specification functions, which describe what program operations are supposed to do. It defines names for operation specifications and for module well-formedness specifications.

In plain words
What is it for?
Use it when adding or renaming Verus spec functions for operations, module validity, and related formal properties.
Why use it?
It keeps specifications easy to find and prevents inconsistent names such as redundant postcondition suffixes or vague generic names.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it when adding or renaming Verus spec functions for operations, module validity, and related formal properties.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/briangmilnes/apas-verus/spec-fn-naming
Install

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.

Clone the repo
git clone --depth 1 https://github.com/briangmilnes/APAS-VERUS

Made for: Cursor.

Wrote 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.

agentmods badge for spec-fn-naming

README.md
[![agentmods](https://agentmods.dev/badge/rules/briangmilnes/apas-verus/spec-fn-naming/github.svg)](https://agentmods.dev/rules/briangmilnes/apas-verus/spec-fn-naming)
Your own site
<a href="https://agentmods.dev/rules/briangmilnes/apas-verus/spec-fn-naming"><img src="https://agentmods.dev/badge/rules/briangmilnes/apas-verus/spec-fn-naming/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for spec-fn-naming

Your own site · 80×15
<a href="https://agentmods.dev/rules/briangmilnes/apas-verus/spec-fn-naming"><img src="https://agentmods.dev/badge/rules/briangmilnes/apas-verus/spec-fn-naming.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 431 This file is loaded in full into every session.
When invoked 431 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

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.

ModelPer sessionOnce invoked
Fable 5.1 $0.00431 $0.00431
Opus 5 $0.00216 $0.00216
Sonnet 5 $0.00086 $0.00086
Haiku 4.5 $0.00043 $0.00043

Measured 9d ago against content hash c793f1c046d0, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-09, from the pricing page.

Security

Grade A, and why

spec-fn-naming 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 9d ago.

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.

.cursor/rules/apas-verus/spec-fn-naming.mdc · 54 lines

What it actually says

Spec Function Naming

No _post suffix

Name spec functions after the operation they specify, not as postconditions:

// Bad: _post suffix
pub open spec fn spec_ninject_post<T>(...) -> bool { ... }

// Good: named after the operation
pub open spec fn spec_ninject<T>(...) -> bool { ... }

The spec_ prefix already signals this is a specification. Adding _post is redundant and inconsistent with the rest of the codebase (spec_inject, spec_iterate, spec_monoid, etc.).

Pattern

Operation Spec function
inject spec_inject
ninject spec_ninject
iterate spec_iterate
monoid spec_monoid
filter_len spec_filter_len

Well-formedness spec naming: spec_<module>_wf

Name well-formedness specs spec_<module>_wf where <module> is the module name in lowercase with no internal underscores. Do not use bare spec_wf.

// Bad: bare spec_wf
spec fn spec_wf(&self) -> bool;

// Good: module name smushed lowercase
spec fn spec_orderedtablestper_wf(&self) -> bool;
spec fn spec_augorderedtablemteph_wf(&self) -> bool;
Module spec_wf name
AVLTreeSeq spec_avltreeseq_wf
AVLTreeSeqStEph spec_avltreeseqsteph_wf
AVLTreeSeqStPer spec_avltreeseqstper_wf
OrderedTableStPer spec_orderedtablestper_wf
AugOrderedTableMtEph spec_augorderedtablemteph_wf
Changes

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.

  1. 9d ago First seen · 54 lines · 431 tokens per session scan A c793f1c046d0

Subscribe to this mod's changes

spec-fn-naming is a cursor rule published in the GitHub repository briangmilnes/APAS-VERUS (10 stars, last pushed 1mo ago), licensed MIT. It adds 431 tokens to every session, about $0.0022 per session on Opus 5. 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-08-31.