.agents/skills/plate-plugin-creator/rules/creation-flow.md
Use this decision tree before writing a plugin:
Need a new plugin?
|
+- Does the behavior matter without React?
| |
| +- yes -> author `packages/*/src/lib`
| | |
| | +- Need explicit public contract control?
| | | +- yes -> `createTSlatePlugin`
| | | +- no -> `createSlatePlugin`
| | |
| | +- Need a React/Plate layer later?
| | +- yes -> `toPlatePlugin` / `toTPlatePlugin`
| | +- no -> keep it Slate-only
| |
| +- no -> stay in `packages/*/src/react`
| |
| +- Is it a bundle of existing Plate plugins?
| | +- yes -> `createPlatePlugin`
| |
| +- Does it need explicit typed options/api/transforms?
| +- yes -> `createTPlatePlugin`
| +- no -> `createPlatePlugin`
|
+- Need docs?
+- hand off to `docs-plugin`
Use this for document semantics, transforms, parsers, injected rules, and shared behavior contracts.
Good fits:
BaseCommentPluginBaseCodeBlockPluginHtmlPluginUse this when the semantic base already exists and you only need component binding, hooks, or Plate-only wrapper config.
Good fits:
CommentPluginCodeBlockPluginMentionPluginUse direct Plate authoring only when the plugin has no meaningful Slate-only base.
Good fits:
EventEditorPluginPlaywrightPluginCopilotPluginUse createPlatePlugin({ plugins: [...] }) when the job is composition, not
new semantics.
Good fits:
BasicBlocksPluginBreaking the Slate-first law is fine only when one of these is true:
useHooks-driven.