doc.linea / rules
Cursor rule478 starsChanged 3 months agoApache-2.0View on GitHub
Markdown/MDX formatting conventions for docs.linea.build content files.
We split this markdown-formatting.mdc into the rules it gives an agent
12 rules. About 0 are common, 5 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈5
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 11
Use .mdx for all pages under docs/ (not .md), so React components and Docusaurus elements (like <Tabs>) render correctly.
- Very specific: line 14
Prefer HTML-like formatting over plain Markdown syntax for elements like tables (use <table> rather than pipe/dash Markdown tables).
- Distinctive: line 20
Default to US English usage.
- Distinctive: line 24
Never break words or URLs when wrapping a line.
- Distinctive: line 25
Use semantic line breaks: start each new sentence on a new line, even when it would still fit within the 100-character limit on the …
- Very specific: line 31
Don't add a top-level # Heading unless you want the rendered page heading to read differently from the frontmatter title (Docusaurus pulls …
- Very specific: line 37
Every page needs YAML frontmatter with at least title and description:
- Very specific: line 46
Don't add an image field manually: the social card is generated automatically on build.
- Distinctive: line 54
Use descriptive link text embedded in the sentence.
- Very specific: line 56
If you move or rename a page, see .cursor/rules/contributor-workflow.mdc for the redirects.json requirement.
- Very specific: line 61
Add new images to /static/img/, mirroring the docs/ folder structure.
- Distinctive: line 67
Use bold, not *italics*, to reference a UI element the reader interacts with (a button, tab, menu item, or field label), for example …
≈ “Common” is an estimate: at least 1 in 5 of the 6,350 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Markdown/MDX formatting conventions for docs.linea.build content files.
globs: docs/**/*.{mdx,md}
alwaysApply: false
---
# Markdown formatting
## File format
- Use `.mdx` for all pages under `docs/` (not `.md`), so React components and Docusaurus
elements (like `<Tabs>`) render correctly. This rule doesn't apply to root-level files
such as this repo's own `README.mdx`/`CONTRIBUTING.md`.
- Prefer HTML-like formatting over plain Markdown syntax for elements like tables (use
`<table>` rather than pipe/dash Markdown tables). Several elements already require HTML
syntax (`<Tabs>`, images), so using it everywhere avoids mixing both styles on one page.
## Line wrapping
- Default to US English usage.
- Respect the 100-character line limit from `.editorconfig`. Use the full 100 characters
before wrapping. Don't break lines early at convenient points, and only wrap when a
line would actually exceed the limit.
- Never break words or URLs when wrapping a line.
- Use semantic line breaks: start each new sentence on a new line, even when it would
still fit within the 100-character limit on the previous line. This is independent of
the wrap rule above and keeps future diffs scoped to the sentence that changed.
## Headings
- Don't add a top-level `# Heading` unless you want the rendered page heading to read
differently from the frontmatter `title` (Docusaurus pulls `title` for the sidebar
label, not the H1).
## Frontmatter
Every page needs YAML frontmatter with at least `title` and `description`:
```mdx
---
title: Title of the article
description: Description of the article
---
```
Don't add an `image` field manually: the social card is generated automatically on build.
## Links
- Link to other docs pages with site-relative paths and no `.mdx` extension (for example,
`./transaction-finality`, not `./transaction-finality.mdx`).
- The `](/` pattern is an absolute link; `](./` and `](../` are relative links. Prefer
relative links within the same tab.
- Use descriptive link text embedded in the sentence. Don't use "click here" or a bare
URL.
- If you move or rename a page, see `.cursor/rules/contributor-workflow.mdc` for the
`redirects.json` requirement.
## Images
Add new images to `/static/img/`, mirroring the `docs/` folder structure. See
[README.mdx](../../README.mdx#adding-images) for the exact JSX pattern and size classes
(`img-xsmall`, `img-small`, `img-medium`, `img-large`).
## UI element references
Use **bold**, not *italics*, to reference a UI element the reader interacts with (a
button, tab, menu item, or field label), for example "Select **Compile**" or "Go to the
**Solidity Compiler** tab." Reserve italics for true emphasis.
## Collapsible content
Wrap optional or supplementary content that would interrupt the main flow of a page (a
file-tree dump, an edge-case troubleshooting note) in a collapsible block instead of
inline text or a deeply nested sub-heading:
```mdx
<details>
<summary>Project structure</summary>
<div>
Content goes here.
</div>
</details>
```
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository10 other files it gives its agents.
- AGENTS.mdAGENTS.md
- .cursor/rules/content-structure.mdcCursor rule
- .cursor/rules/contributor-workflow.mdcCursor rule
- .cursor/rules/css-styling.mdcCursor rule
- .cursor/rules/editorial-voice.mdcCursor rule
- .cursor/rules/terminology.mdcCursor rule
- static/llms.txtllms.txt
- author-doc-pageSkill
- linea-dependency-maintenanceSkill
- pr-content-reviewSkill
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

