doc.linea / rules
Cursor rule478 starsChanged 3 months agoApache-2.0View on GitHub
Page structure, audience, and tone conventions for docs.linea.build content.
We split this content-structure.mdc into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 11
Before writing or editing a page, identify which tab it belongs to (see the tab-to-directory table in README.mdx) and match the tone …
≈ “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: Page structure, audience, and tone conventions for docs.linea.build content.
globs: docs/**/*.{mdx,md}
alwaysApply: false
---
# Content structure
## Identify the tab and audience first
Before writing or editing a page, identify which tab it belongs to (see the tab-to-directory
table in [README.mdx](../../README.mdx)) and match the tone expected for that tab's primary
audience:
| Tab | Primary audience | Tone |
| --- | --- | --- |
| Linea Mainnet (`docs/network`) | End users and app builders | Clear and accessible. Developer-focused sections can go deeper. |
| Lineth Stack (`docs/stack`) | Appchain builders, enterprise operators | Technical but applied. Operational and integration focus. |
| Protocol (`docs/protocol`) | Software architects, institutional evaluators | Deep technical. Internals and architecture are expected. |
| Reference (`docs/api`) | Developers | Code-first and reference-style. Practical. |
| Changelog (`docs/changelog`) | All of the above | Factual, dated, scoped to what shipped. |
A page can serve more than one audience. If two audiences need substantially different
content, consider proposing a split into two pages instead of one page trying to serve
both. If you keep one page, lead with the simpler content and put advanced material later
or in a separate section. Don't assume deep protocol knowledge on a Linea Mainnet page.
## Page structure
A typical concept or feature page follows this shape:
```mdx
---
title: [Short, descriptive: matches the URL slug]
description: [One sentence: what is this, why does it matter, who cares]
---
[One to two sentence opening: the big picture. No heading.]
## What it is
## Why it matters
## What changes (if relevant)
## Code samples (verified, near the bottom)
## Resources
```
Adapt the specific headings to the page's content type (a how-to guide uses numbered
steps and prerequisites instead; a reference page mirrors the API or CLI it documents).
Match the structure of existing neighboring pages in the same section before inventing a
new shape.
Writing order: identify the tab and audience, draft the H2 headings first (check that
they tell the full story on their own), then write the opening sentence, then fill in
prose, then add code samples last.
## Tutorial and how-to page structure
Tutorial and how-to pages use this shape instead of the concept-page shape above:
```mdx
---
title: [Short, descriptive, action-oriented: matches the URL slug]
description: [One sentence: what you'll build or do]
---
[One to two sentence opening: what the reader will build or do. No heading. Prefer "This
tutorial walks you through..." over "In this tutorial, we will...".]
## Prerequisites
- Bullet list of what to install, configure, or fund before starting.
## Steps
### 1. [Imperative step title]
[Step content. Only add a `####` sub-heading when a step has genuinely distinct
sub-parts, for example separate public/wallet client setup within one step.]
### 2. [Imperative step title]
...
## Next steps
- Suggested extensions to the project, and/or a link to a full example repo, written as
a full sentence with the link embedded in it (not a bare "Repo: <url>" line).
```
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/contributor-workflow.mdcCursor rule
- .cursor/rules/css-styling.mdcCursor rule
- .cursor/rules/editorial-voice.mdcCursor rule
- .cursor/rules/markdown-formatting.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.

