Skip to content

docs: rewrite AGENTS.md for consumers, reverse symlink direction (SD-2320)#2532

Merged
caio-pizzol merged 3 commits intomainfrom
caio/sd-2320-rewrite-agentsmd-for-consumers-agentsmd-spec
Mar 23, 2026
Merged

docs: rewrite AGENTS.md for consumers, reverse symlink direction (SD-2320)#2532
caio-pizzol merged 3 commits intomainfrom
caio/sd-2320-rewrite-agentsmd-for-consumers-agentsmd-spec

Conversation

@caio-pizzol
Copy link
Copy Markdown
Contributor

AGENTS.md is now the canonical file at the repo root (was CLAUDE.md). CLAUDE.md symlinks to AGENTS.md so both Claude Code and other agent tools (Cursor, Copilot, Codex, Gemini CLI) read the same instructions.

packages/superdoc/AGENTS.md is rewritten as a consumer-facing guide that ships with the npm package. Covers: install, embed (vanilla + React), configuration, theming, Document Engine (MCP, SDK, CLI), common tasks, and knowledge corrections for LLMs with stale training data.

SD-2320: AGENTS.md is now the canonical file at the repo root
(was CLAUDE.md). CLAUDE.md symlinks to AGENTS.md so both Claude
Code and other agent tools (Cursor, Copilot, Codex, Gemini CLI)
read the same instructions.

packages/superdoc/AGENTS.md is rewritten as a consumer-facing
guide that ships with the npm package. Covers: install, embed
(vanilla + React), configuration, theming, Document Engine
(MCP, SDK, CLI), common tasks, and knowledge corrections for
LLMs with stale training data.
@linear
Copy link
Copy Markdown

linear Bot commented Mar 23, 2026

@chatgpt-codex-connector
Copy link
Copy Markdown

💡 Codex Review

| Listen to events | `superdoc.on('content-changed', callback)` |

P2 Badge Replace the nonexistent content-changed event

This shipped AGENTS guide now tells consumers to subscribe with superdoc.on('content-changed', callback), but the public event docs only show events like ready/editorBeforeCreate/editorCreate (apps/docs/core/superdoc/events.mdx:12-70), and packages/superdoc/src/core/SuperDoc.js:1024-1063 emits those names rather than content-changed. Any agent-generated integration that follows this example will attach a listener that never fires.


| Custom toolbar | Use `modules.toolbar.customItems` array |

P2 Badge Rename the custom toolbar option to customButtons

The common-tasks table points consumers at modules.toolbar.customItems, but the documented/public toolbar config is modules.toolbar.customButtons (apps/docs/modules/toolbar.mdx:66-68), and the implementation only reads this.config.customButtons in packages/super-editor/src/components/toolbar/super-toolbar.js:742-744. Generated configs copied from this file will silently omit custom toolbar buttons.


| Add comments | `editor.commands.addComment({ content: 'text' })` |

P2 Badge Access comment commands through superdoc.activeEditor

This example uses editor.commands.addComment(...), but the consumer API exposed by new SuperDoc() is superdoc.activeEditor.commands.addComment(...); that is how the docs demonstrate it in apps/docs/modules/comments.mdx:286-315. If an agent copies this line verbatim from the published AGENTS.md, it will reference an undefined editor object and fail when trying to add a comment.

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Reverse all AGENTS.md → CLAUDE.md symlinks across the monorepo.
AGENTS.md is now the canonical file in every package/directory.
CLAUDE.md symlinks to AGENTS.md so both Claude Code and other
agent tools (Cursor, Copilot, Codex, Gemini CLI) read the same
instructions.

Locations updated:
- apps/docs/, apps/cli/
- packages/layout-engine/, packages/react/, packages/super-editor/
- packages/super-editor/src/core/presentation-editor/
- tests/behavior/, tests/visual/

Only exception: packages/superdoc/ keeps both as standalone files
(consumer-facing AGENTS.md vs internal contributor CLAUDE.md).
@caio-pizzol caio-pizzol enabled auto-merge (squash) March 23, 2026 21:18
@caio-pizzol caio-pizzol merged commit 67011d9 into main Mar 23, 2026
40 checks passed
@caio-pizzol caio-pizzol deleted the caio/sd-2320-rewrite-agentsmd-for-consumers-agentsmd-spec branch March 23, 2026 21:21
@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 23, 2026

🎉 This PR is included in superdoc v1.22.0-next.12

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 23, 2026

🎉 This PR is included in superdoc-cli v0.4.0-next.11

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 23, 2026

🎉 This PR is included in superdoc-sdk v1.1.0-next.11

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 24, 2026

🎉 This PR is included in superdoc v1.22.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 24, 2026

🎉 This PR is included in superdoc-sdk v1.1.0

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 24, 2026

🎉 This PR is included in @superdoc-dev/react v1.0.0-next.8

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 24, 2026

🎉 This PR is included in superdoc-cli v0.4.0

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in esign v2.2.0-next.3

The release is available on GitHub release

@superdoc-bot
Copy link
Copy Markdown
Contributor

superdoc-bot Bot commented Mar 30, 2026

🎉 This PR is included in template-builder v1.3.0-next.2

The release is available on GitHub release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant