1. Create a new `.mdx` file or edit an existing one in `packages/docs/docs`.
2. Add the document to `packages/docs/sidebars.ts` if it's a new page.
3. Write the content following the language and formatting guidelines.
4. Include code snippets using `twoslash` for type-safe examples.
5. Add special components like `<Step>`, `<ExperimentalBadge>`, or `<Demo>` as needed.
6. Generate social media preview cards using `bun render-cards.ts` in `packages/docs`.
7. Verify the documentation compiles using `bun run build-docs`.