agentleFS
ConsensysConsensys/doc.linea/.cursor/rules/markdown-formatting.mdc

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
  1. Very specific:

    Use .mdx for all pages under docs/ (not .md), so React components and Docusaurus elements (like <Tabs>) render correctly.

    line 11
  2. Very specific:

    Prefer HTML-like formatting over plain Markdown syntax for elements like tables (use <table> rather than pipe/dash Markdown tables).

    line 14
  3. Distinctive:

    Default to US English usage.

    line 20
  4. Distinctive:

    Never break words or URLs when wrapping a line.

    line 24
  5. Distinctive:

    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 …

    line 25
  6. Very specific:

    Don't add a top-level # Heading unless you want the rendered page heading to read differently from the frontmatter title (Docusaurus pulls …

    line 31
  7. Very specific:

    Every page needs YAML frontmatter with at least title and description:

    line 37
  8. Very specific:

    Don't add an image field manually: the social card is generated automatically on build.

    line 46
  9. Distinctive:

    Use descriptive link text embedded in the sentence.

    line 54
  10. Very specific:

    If you move or rename a page, see .cursor/rules/contributor-workflow.mdc for the redirects.json requirement.

    line 56
  11. Very specific:

    Add new images to /static/img/, mirroring the docs/ folder structure.

    line 61
  12. Distinctive:

    Use bold, not *italics*, to reference a UI element the reader interacts with (a button, tab, menu item, or field label), for example …

    line 67

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
markdown-formatting.mdc
---
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>
```

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.