jsdoc

jsdoc is a cursor rule for Cursor from Ocean-Industries-Concept-Lab/openbridge-webcomponents. It costs 0 tokens per session (5,217 once invoked), scanned A, original, Apache-2.0.

Rules for writing JSDoc, the structured comments that document JavaScript and web-component APIs.

In plain words
What is it for?
Use them when documenting a component's summary, variants, properties, slots, events, lifecycle, or availability conditions.
Why use it?
They keep component documentation consistent and make properties, content slots, and events visible to both developers and automated checks. They also help catch documentation that describes members the component does not actually have.

Cursor rule for Cursor

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.

agentmods
npx agentmods add rules/ocean-industries-concept-lab/openbridge-webcomponents/jsdoc
Clone the repo
git clone --depth 1 https://github.com/Ocean-Industries-Concept-Lab/openbridge-webcomponents

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 jsdoc

README.md
[![agentmods](https://agentmods.dev/badge/rules/ocean-industries-concept-lab/openbridge-webcomponents/jsdoc.svg)](https://agentmods.dev/rules/ocean-industries-concept-lab/openbridge-webcomponents/jsdoc)
Your own site
<a href="https://agentmods.dev/rules/ocean-industries-concept-lab/openbridge-webcomponents/jsdoc"><img src="https://agentmods.dev/badge/rules/ocean-industries-concept-lab/openbridge-webcomponents/jsdoc.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 5,217 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00000 $0.05217
Opus 5 $0.00000 $0.02609
Sonnet 5 $0.00000 $0.01043
Haiku 4.5 $0.00000 $0.00522

Measured 4d ago against content hash d1bf65ac1c91, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

jsdoc 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 4d 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/jsdoc.mdc · 349 lines

How it starts

The opening of the file, as written. The whole thing — 349 lines — stays where its author put it; the contents beside it link to each section on GitHub.

JSDoc Documentation Rules

The full JSDoc template, the @slot/@fires contract, @availableWhen, component lifecycle tags, and the three documentation patterns. AGENTS.md § 3 carries the summary; docs/agents/jsdoc.md is the source of truth.

Key points:

  1. One-line summary with the tag name and a brief description.
  2. Features / Variants — bullet list of capabilities and configuration options.
  3. Usage Guidelines — when and how to use the component; contrast with similar components.
  4. Slots — table of slot names, conditions, and purposes.
  5. Events — a @fires tag for every event the component exposes, custom and native (a passthrough <button>'s click included). See below.
  6. Properties are documented in the class JSDoc, one tag per public property, without a type — @property name - description — placed after the Markdown sections and before @slot/@fires. Conditional properties add a line @availableWhen name condition directly under their tag. No inline JSDoc above @property() fields (npm run lint:comments warns; --fix hoists them). A tag naming a property that does not exist is a ghost manifest member — npm run lint:slots fails on it. Mixin-provided properties (svghelpers/setpoint-mixin.ts, svghelpers/setpoint-bundle.ts) keep their inline docs.
  7. Tone: Do NOT mention "maritime", "industrial", "bridge", or domain qualifiers; keep text domain-agnostic.
  8. If purpose is unclear, insert **TODO(designer)** instead of guessing.
  9. @availableWhen for conditional properties — see below.
  10. Exactly one lifecycle tag on every @customElement class — see below.

Component lifecycle tags (@stable / @beta / @experimental / @deprecated)

Every class registered with @customElement carries exactly one lifecycle tag in its class JSDoc. This tag is the single source of truth for the component's API maturity — Storybook mirrors it, never the other way around.

Read the full file on GitHub · 349 lines

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. 4d ago First seen · 349 lines · 0 tokens per session scan A d1bf65ac1c91

Subscribe to this mod's changes

jsdoc is a cursor rule published in the GitHub repository Ocean-Industries-Concept-Lab/openbridge-webcomponents (91 stars, last pushed today), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 5,217 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-08-30.