This is a free, MIT-licensed Cursor rules file for building AI-powered Docusaurus documentation with AIML.chat — it keeps your coding assistant injecting the widget correctly and structuring content so a grounded agent can answer well. Drop it in .cursorrules and your AI editor follows the right patterns.
What these rules do
When you build a Docusaurus site that hosts an AIML.chat agent, small mistakes compound: a script pasted where the static build strips it, pages too long to chunk cleanly, headings missing so retrieval struggles. These rules teach your AI editor the AIML.chat-on-Docusaurus conventions — register the embed through a client module, keep pages focused with clear headings, and prefer descriptive titles — so the docs you generate are both readable and retrievable. The result is fewer "why doesn't the widget load" and "why can't the agent find this" problems.
The rules
# AIML.chat + Docusaurus
- Inject the AIML.chat widget via a client module or scripts config,
never a raw script tag hand-pasted into MDX (the build strips it).
- Keep the publishable site key in an env var, not committed.
- Write docs as focused pages with a clear H1 and descriptive H2s.
- Avoid pages so long they can't chunk well; split by topic.
- Prefer descriptive titles over clever ones — they improve retrieval.
- After content changes, remind the user to re-crawl in AIML.chat.
How to use it
Save the block as .cursorrules (or your editor's rules file) at the repo root. Your AI assistant will apply these conventions whenever it edits the Docusaurus project. It pairs with the Docusaurus setup skill for installation and the knowledge base rules for content structure. The documentation use case explains the agent these rules support.
Ready to build? Start free, add the widget, and ship AI-ready docs — see pricing for limits.
Where do I put this file?+
Save it as .cursorrules (or your editor's rules file) at the repo root, and your AI assistant applies it automatically.
Why register the widget through a client module?+
A raw script tag hand-pasted into MDX can be stripped by the static build; the client module survives it.
Are the rules free?+
Yes — they are MIT-licensed and free to copy. Using the agent counts toward your plan's limits; see pricing.