Skip to main content

Integration Starter Prompt

Target fill time: under 5 minutes. Optionally describe what you want SuperDocs to do in your product (1-3 sentences) and paste your existing agent context (CLAUDE.md, AGENTS.md, .cursorrules) or a package.json. Anything you leave blank, the agent figures out — it auto-discovers your project root context, runs an investigation framework against your codebase, and (if Part 0 was empty) proposes a plain-English integration plan for you to approve before writing any code.

What you’ll build

A complete integration of SuperDocs into your product, regardless of architecture. Your coding agent reads this prompt, reads any context you provide (or auto-discovers from your project root), runs an investigation framework against your product, confirms its understanding with you, and then writes the integration in your stack’s idioms. This template is built around principles + investigation + cross-references rather than enumerating per-stack scaffolds. It works for any integration shape:
  • Greenfield with no app yet — the agent scaffolds one in your chosen stack.
  • Existing app with no editor — the agent adds SuperDocs surfaced however your UI already works.
  • Existing app with an editor (ProseMirror, TipTap, Slate, Lexical, Quill, CKEditor, contenteditable) — the agent wires SuperDocs into your existing editor without disrupting it.
  • Existing AI agent (OpenAI function-calling, Anthropic tool_use, LangChain, LlamaIndex) — the agent registers SuperDocs as a tool the AI can call.
  • Server-side worker / batch job / queue processor — the agent skips all UI work and builds a backend service module.
  • MCP client (Claude Desktop, Cursor, VS Code, Windsurf) — configuration only, no code to write.
  • Custom architecture you didn’t see listed — the principles + investigation framework are designed to handle this case too.

Model selection — pick the right tier per request

SuperDocs offers four model tiers (core, turbo, pro, max) and three thinking depths (fast, balanced, deep). The default is core + balanced — fast and accurate for everyday edits. For document-editing tasks where precision matters (legal contracts, regulatory filings, compliance docs, medical records), pass model_tier: "pro" or model_tier: "max" in your request body. For batch processing many short edits where speed dominates, use turbo. See the full matrix and recommendations at Model Selection. Important: Plumb model_tier and thinking_depth through your integrator’s UI — either expose them as request parameters from your end users (e.g. a precision/speed slider, or a “high-stakes mode” toggle), or accept them as configuration. Do not hard-code them — different users want different precision/speed tradeoffs, and the right default for a contract-editing app is not the right default for a quick-summarisation app. If you skip this step, every request from your product will use the silent core + balanced default. That’s fine for casual editing but will frustrate users on high-stakes documents who need maximum targeting precision.

Copy this prompt

Hit the copy button at the top-right of the code block, then paste into your coding agent (Claude Code, Cursor, Windsurf, Codex, Cline, or any other). The agent will fetch the latest SuperDocs API reference itself — no need to download llms-full.txt manually.

Reference implementation

Watch the build (16 min)

Live build of this exact integration end-to-end with an on-screen timer — raw ProseMirror on Next.js wired to the SuperDocs REST API, ending with the full SOP-editing demo. Less than 15 minutes of actual coding.

prosemirror-superdocs-demo

The filled-in repo from the video — raw ProseMirror on Next.js with the full SOP-editing demo. MIT-licensed. Clone it, point your coding agent at it, and adapt. This is one specific shape of integration; the prompt above adapts to your product’s actual shape.
  • Editor Integration — drop-in chunk-id preservation snippets for ProseMirror, TipTap, Slate, Lexical, Quill, and CKEditor 5 (plus a “for other editors” generic guide).
  • Agent Tool Integration — register SuperDocs as a tool in your existing AI agent’s tool registry (OpenAI function-calling, Anthropic tool_use, LangChain, LlamaIndex, generic JSON-schema).
  • Server Integration — backend service / batch worker / queue processor patterns in Node, Python, Go, Ruby, and .NET.
  • Human-in-the-Loop — inline diff overlay patterns (Cursor-style) and side-by-side review cards.
  • SSE Streaming — nine event types, the proposed_change_batch.content double-parse, and the EventSource + api_key query-param pattern.
  • Async Jobs — long-running operations with polling instead of SSE.
  • JavaScript Examples — working HITL flow plus a framework-agnostic two-pane frontend skeleton.
  • MCP Setup — for Claude Desktop, Cursor, VS Code, Windsurf, and other MCP clients.

Stuck?

Email hello@superdocs.app or book a 15-minute integration call at cal.com/superdocs. If your integration shape isn’t covered by the existing guides, we’ll add a snippet for the next person.