Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 20 additions & 19 deletions scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ node scripts/lint-mdx.js all

### Checks

| Check | Severity | Description |
|-------|----------|-------------|
| Frontmatter | Error | `title` and `description` required |
| Headings | Error | Max one H1, no skipped levels |
| Headings | Warning | At least one heading per page (SEO) |
| Code blocks | Error | Language specifier required |
| Code blocks | Warning | Labels required in `<CodeGroup>` |
| Components | Warning | Required attributes on Mintlify components |
| Comments | Error | MDX `{/* */}` not HTML `<!-- -->` |
| Links | Warning | Internal links must point to existing files |
| Check | Severity | Description |
| ----------- | -------- | ------------------------------------------- |
| Frontmatter | Error | `title` and `description` required |
| Headings | Error | Max one H1, no skipped levels |
| Headings | Warning | At least one heading per page (SEO) |
| Code blocks | Error | Language specifier required |
| Code blocks | Warning | Labels required in `<CodeGroup>` |
| Components | Warning | Required attributes on Mintlify components |
| Comments | Error | MDX `{/* */}` not HTML `<!-- -->` |
| Links | Warning | Internal links must point to existing files |

### Exit codes

| Code | Meaning |
|------|---------|
| `0` | No errors (warnings may exist) |
| `1` | Errors found |
| Code | Meaning |
| ---- | ------------------------------ |
| `0` | No errors (warnings may exist) |
| `1` | Errors found |

### CI Integration

Expand Down Expand Up @@ -69,10 +69,11 @@ Spec-conformant [llms.txt](https://llmstxt.org) index plus a full-context varian
node scripts/llms.js
```

- `llms.txt` is fully regenerated each run: H1, blockquote summary, one H2 per top-level section with `- [title](url): description` bullets, and a single `## Optional` H2 for MCP/skills pointers.
- `llms-full.txt` has two regions delimited by HTML comment markers:
- `LLMS_EXTRAS_*` wraps hand-written cross-cutting concept guides — preserved verbatim across runs.
- `LLMS_AUTOGEN_*` wraps the per-page index — regenerated from the current docs tree.
- First-run migration: if the file has no markers yet, everything after the first blockquote is captured as extras automatically.
* `llms.txt` is fully regenerated each run: H1, blockquote summary, one H2 per top-level section with `- [title](url): description` bullets, and a single `## Optional` H2 for MCP/skills pointers.
* `llms-full.txt` has two regions delimited by HTML comment markers:

* `LLMS_EXTRAS_*` wraps hand-written cross-cutting concept guides — preserved verbatim across runs.
* `LLMS_AUTOGEN_*` wraps the per-page index — regenerated from the current docs tree.
* First-run migration: if the file has no markers yet, everything after the first blockquote is captured as extras automatically.

The repo's `githooks/post-commit` hook re-runs this automatically after any commit whose message contains the substring `llms.txt` (case-insensitive). If the regenerated files differ from what was committed, the hook creates a follow-up `chore: regenerate docs/llms.txt` commit. See `githooks/README.md` to enable.