spec

Cursor rule "spec" from zenbase-ai/llml, covering llml technical specification, core transformation rules, 1. empty value handling, 2. primitive value formatting and 3. key preservation.

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/zenbase-ai/llml/spec
Clone the repo
git clone --depth 1 https://github.com/zenbase-ai/llml

Made for: Cursor.

Per session 3,540 This file is loaded in full into every session.
When invoked 3,540 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin unknown 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.03540 $0.03540
Opus 5 $0.01770 $0.01770
Sonnet 5 $0.00708 $0.00708
Haiku 4.5 $0.00354 $0.00354

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

Security

Grade A, and why

spec 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 today.

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/spec.mdc · 559 lines

How it starts

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

LLML Technical Specification

Version: 0.3.0, July 1st 2025

Overview

LLML (Lightweight Language Markup Language) is a data serialization format that transforms nested data structures into human-readable, XML-like markup. This specification defines the exact transformation rules that must be implemented consistently across all language implementations.

Core Transformation Rules

1. Empty Value Handling

Empty values are transformed to empty strings:

llml() → ""
llml([]) → ""
llml({}) → ""

Special case for empty named arrays:

llml({items: []}) → ""  # Empty arrays within objects are omitted entirely
llml([[], [[]]]) → ""  # Empty arrays within arrays are omitted entirely

2. Primitive Value Formatting

All primitive values are wrapped in XML-like tags using the key name:

Strings:

llml({message: "Hello"}) → "<message>Hello</message>"
llml({empty: ""}) → "<empty></empty>"

Numbers:

llml({count: 42}) → "<count>42</count>"
llml({temperature: 98.6}) → "<temperature>98.6</temperature>"
llml({zero: 0}) → "<zero>0</zero>"

Booleans:

llml({enabled: true}) → "<enabled>true</enabled>"  # TypeScript
llml({enabled: True}) → "<enabled>True</enabled>"  # Python
llml({disabled: false}) → "<disabled>false</disabled>"  # TypeScript
llml({disabled: False}) → "<disabled>False</disabled>"  # Python

Null/None/Undefined:

llml({value: null}) → "<value>null</value>"  # TypeScript
llml({value: None}) → "<value>None</value>"  # Python
llml({value: undefined}) → "<value>undefined</value>"  # TypeScript

3. Key Preservation

Keys are preserved as-is without transformation:

llml({user_name: "Alice"}) → "<user_name>Alice</user_name>"
llml({userName: "Bob"}) → "<userName>Bob</userName>"
llml({"key with spaces": "value"}) → "<key with spaces>value</key with spaces>"

4. Multiple Key-Value Pairs

Multiple key-value pairs are separated by newlines:

llml({name: "Alice", age: 30, active: true})
→
<name>Alice</name>
<age>30</age>
<active>true</active>

Read the full file on GitHub · 559 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. today First seen · 559 lines · 3,540 tokens per session scan A ce8e3e642356

Subscribe to this mod's changes

spec is a cursor rule published in the GitHub repository zenbase-ai/llml (72 stars, last pushed 1y ago), licensed MIT. It adds 3,540 tokens to every session, about $0.0177 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-09-01.