Always-on rules for any agent working in this repo. Specialized workflows live in ai-skills/ — load the matching skill for those. This file covers guardrails only.
WaveMaker public documentation. Docusaurus 3.9.2, MDX-first, Node ≥ 20. Deploys to docs.wavemaker.ai.
- Never edit
build/,.docusaurus/, ornode_modules/. - Never edit
scripts/metrics.json— it is regenerated bynpm run gen-metrics. - Never bypass hooks with
--no-verify. Fix the lint/build error instead. - Never invent entries in
data/author/authors.ymlor anytags.yml. If a referenced key is missing, stop and ask the user. - Never add an
<h1>to a doc, blog, or announcement body. Titles come from frontmatter. - Never place doc-, announcement-, or post-specific assets under
static/img/. Co-locate them next to their content (see Asset co-location in File conventions).
Before declaring any content change done, run from the repo root:
npm run lint # eslint + mdxlint --frail
npm run build # enforces onBrokenLinks/Images: throw
Both must pass. The build is the source of truth for link and image correctness — lint alone is not sufficient.
- Prefer
.mdxover.mdfor new pages. - Filenames are kebab-case. Blog and feature-announcement files are prefixed
YYYY-MM-DD-. - Docs require frontmatter:
last_update: { author: "Name" }. - Blogs and announcements use
authors: [key](array). Keys come fromdata/author/authors.yml, not display names. - Body headings start at
##. - Cross-plugin links use URL paths, not filesystem-relative MDX paths. Docs-style relative links (
../../section/page) only resolve between files underdocs/. From a blog or feature announcement, link to a doc as/docs/<section>/<page>. - Any file prefixed
YYYY-MM-DD-(all blog posts and feature announcements) publishes at/<route>/YYYY/MM/DD/<slug>. Link to it with the date segments — never/<route>/<slug>. - In
.mdxfiles, HTML comments (<!-- ... -->) are not valid syntax and fail the build. Use the JSX-expression form{/* ... */}for comments and for the blog truncate marker ({/* truncate */}). - MDX components registered in
src/theme/MDXComponents/index.js(e.g.,AcademyCard,VideoCard,Pill,PillGroup,Accordian,TabsWrapper) are globally available in any.mdxfile. Do not import them — it causes redeclaration errors. - Angle-bracket placeholders (
<Your text here>) are unsafe in MDX bodies — MDX parses them as JSX elements and fails on the next punctuation. In templates and examples, use plain-text placeholders or wrap JSX examples inside{/* ... */}comments.
Never put content-specific assets under static/img/ — that directory is for globally shared assets only (e.g., favicons, site-wide logos). Everything else is co-located next to its content.
Place images and GIFs in an assets/img/ subdirectory next to the .md / .mdx file. This applies across all content types — docs pages, blog posts, and feature announcements alike.
Reference them with a relative path using standard Markdown image syntax:

Place videos in assets/vids/ next to the post:
<video controls width="100%" muted playsInline poster={require('./assets/vids/poster.jpg').default}>
<source src={require('./assets/vids/demo.mp4').default} type="video/mp4" />
</video>If the same asset is used in more than one file, place it in the assets/img/ directory of their nearest common ancestor. For example, if section/page-a.mdx and section/page-b.mdx both use the same image, it goes in section/assets/img/, and both files reference it with ./assets/img/filename.png.
Required on every image. Describe what the image shows — not the surrounding heading or section title.
docs/<section>/ → documentation pages (sidebar-registered)
docs/release-notes/ → versioned release notes
blogs/blog/ → engineering blog posts (/blog)
blogs/feature-announcements/ → product feature announcements (/feature-announcements)
<content-dir>/assets/img/ → co-located images and GIFs (docs and blogs)
<content-dir>/assets/vids/ → co-located videos (feature announcements)
static/img/ → globally shared assets (/img/... in links)
data/author/authors.yml → shared author registry
sidebar/sidebars.js → aggregator; do not add logic here
sidebar/sidebars/*.js → per-section sidebar configs
scripts/doc-manager.mjs → interactive CLI (npm run manage-docs)
ai-skills/ → agent skills for common workflows
Do not hand-edit sidebar/sidebars/*.js with regex or free-form writes. Prefer, in order:
npm run manage-docs— interactive CLI that handles sidebar insertion, naming variants, and rollback.- Importing helpers from
scripts/doc-manager.mjs(insertItemIntoSidebar,getDocTemplate,getNameVariants,parseSidebarContent).
Direct edits are acceptable only for small, obvious changes (reordering a known entry, fixing a label typo).
Full style guide is in CONTRIBUTING.md. Short version:
- Active voice, present tense, sentence case headings.
- Be direct. "Configure the settings," not "You might want to configure the settings."
- Use admonitions (
:::tip,:::note,:::warning,:::danger) sparingly. - Every image has
alttext. - Internal links use relative MDX paths; prefer them over external links when the content is on-site.
npm start # dev server
npm run build # production build (full link/image check)
npm run lint # eslint + mdxlint --frail
npm run manage-docs # interactive: new sidebar / category / doc
npm run gen-metrics # regenerate scripts/metrics.json
For specific workflows, load the matching skill under ai-skills/ rather than improvising:
wm-ai-release-notes— add or edit entries in a versioned release notes file underdocs/release-notes/.wm-feature-announcements— new post underblogs/feature-announcements/.wm-ai-create-guide— create a how-to or tutorial page underdocs/guide/.wm-ai-documentation— write, update, move, or delete a core reference or conceptual doc underdocs/<section>/...(interactive: outlines first, drafts section by section, handles assets, links, and sidebar wiring).
- Branches:
feature/<short-desc>ordocs/<short-desc>. - Do not commit
build/,.docusaurus/, or regeneratedscripts/metrics.json. - Husky runs
lint-stagedon commit. If it fails, fix the underlying issue — do not skip the hook. - PR titles are descriptive ("Add authentication guide for REST APIs"), not generic ("Update docs").