You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: AGENTS.md
+96-5Lines changed: 96 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,13 +75,104 @@ The correct link is:
75
75
- **Same-page anchors**: `#section-name` — these don't need a full path.
76
76
- **Anchors on internal links**: `/learn/docs/config/navigation#section-availability` — append `#anchor` to the URL path.
77
77
78
-
## New pages
78
+
## Changelog entries
79
79
80
-
Every new `.mdx` page created under `fern/pages/` or `fern/products/` must include the agent directive snippet. Add the following line:
80
+
Changelog entries live in `fern/products/docs/pages/changelog/` and `fern/products/dashboard/pages/changelog/`. Filename format: `YYYY-MM-DD.mdx`.
81
81
82
-
- After the closing `---` of the front matter (if the page has front matter), or
83
-
- At the very top of the file (if there is no front matter).
82
+
### Rules
84
83
84
+
- Always include `tags` in YAML frontmatter. Pick 1–4 from the existing set (e.g., `api-reference`, `components`, `navigation`, `customization`, `search`, `ai`, `security`, `bug-fix`). Tags are categorical — describe the area, not the feature name.
85
+
- Use `##` (h2) for each feature heading. No h1.
86
+
- Lead with what the user can now do: "You can now..."or a direct capability statement.
87
+
- Keep it short: 2–6 sentences per feature. Bullet points for lists of details.
88
+
- End each feature section with a Button linking to the relevant docs page:
85
89
```mdx
86
-
<Markdown src="/snippets/agent-directive.mdx"/>
90
+
<Button intent="none" outlined rightIcon="arrow-right" href="/learn/docs/section/page">Read the docs</Button>
87
91
```
92
+
- For dashboard entries, include a path to the feature in the UI before the Button.
93
+
- Follow the link rules above — Button `href` values use `/learn/...` URL paths from the YAML config.
94
+
95
+
### Example
96
+
97
+
```mdx
98
+
---
99
+
tags: ["security"]
100
+
---
101
+
102
+
## Password-protected pages
103
+
104
+
You can now restrict access to individual documentation pages with a password. Visitors see a prompt before the page content loads.
105
+
106
+
To configure this, go to **Settings** > **Page access** in the [Dashboard](https://dashboard.buildwithfern.com/).
107
+
108
+
<Button intent="none" outlined rightIcon="arrow-right" href="/learn/dashboard/settings/page-access">Read the docs</Button>
109
+
```
110
+
111
+
### What not to do
112
+
113
+
- Don't use h1 (`#`) — the date serves as the title.
114
+
- Don't describe implementation details — focus on user benefit.
115
+
- Don't skip the Button CTA.
116
+
- Don't invent new tags when an existing one fits.
117
+
118
+
Prefer existing tags when possible. Common tags include: `api-reference`, `components`, `navigation`, `customization`, `configuration`, `search`, `ai`, `security`, `bug-fix`, `performance`, `writing-content`.
119
+
120
+
## New component pages
121
+
122
+
When documenting a new component, follow the structure used by existing component pages
123
+
in `fern/products/docs/pages/writing-content/components/`.
124
+
125
+
### Page structure
126
+
127
+
1. **Frontmatter**: `title`(component name) and `description` (one sentence starting with a verb).
128
+
2. **Intro paragraph**: One or two sentences explaining what the component does and when to use it. Reference the component name in backtick-wrapped JSX format (e.g., `<Button>`).
129
+
3. **Usage section** (`## Usage`): A live rendered example in a `<div>`, followed by the equivalent MDX in a code block with `jsx Markdown` syntax.
130
+
4. **Variants section** (`## Variants`): One `###` subsection per variant, each with a rendered example and code block. Cover the most common use cases.
131
+
5. **Properties section** (`## Properties`): One `<ParamField>` per prop. Include `path`, `type`, `required`, and `default` where applicable.
132
+
133
+
### Adding to the overview page
134
+
135
+
Add a `<Card>` to the `<CardGroup>` in the components overview page at
- Decorative content, hero images, or UI-only navigation hints
168
+
- Internal comments or TODOs in source files
169
+
170
+
### Rules
171
+
172
+
- Don't overuse — most content should be visible to both audiences. Only tag content where the human and agent needs clearly diverge.
173
+
- Keep `<llms-only>` blocks concise and actionable. If it's longer than a few sentences, it's probably regular content that should be visible to everyone.
174
+
- Tutorials are a common use case: the human version might walk through a UI with screenshots, while an `<llms-only>` block can add the equivalent curl command or config snippet that an agent can execute directly.
175
+
176
+
### Example to follow
177
+
178
+
See `fern/products/docs/pages/getting-started/quickstart.mdx` for a working example of using `<llms-only>` blocks to make a tutorial executable for agents alongside the human-readable version.
0 commit comments