Share an implementation plan from Cursor or Claude Code as a link
Your assistant just wrote a long plan: alternatives, a sequence diagram, code snippets, a decision for the reviewer. Here is how to hand it to a teammate as a rendered page, update it after review, and let it expire on its own.
Updated
What is the problem with sharing a plan from an AI coding assistant?
The plan lives in your working tree or in the chat scroll-back. The reviewer is in Slack, Linear, or a pull request thread. Pasting 200 lines of markdown into chat breaks the tables and the mermaid diagram; committing a PLAN.md for a document that is obsolete the moment the code lands is noise in the repo. A share link is the middle path: the document renders at a URL with a table of contents, the diagram becomes a real diagram, and the link can expire when the review is over.
What does a good implementation plan look like?
This is a complete, fictional plan for adding webhook retries to a small payments API. It has the parts a reviewer needs: the decision being asked for, the problem, the proposed behavior, the alternatives that were rejected, a sequence diagram, the steps, verification, risks, and rollout. Download it, open it in the editor, or use it as a template for your own.
implementation-plan.md
3,933 characters · fictional example, same file as the download
Implementation plan: webhook delivery retries
Repository: acme/ledger-api · Branch: feat/webhook-retries · Author: Claude Code, prompted by Priya · Status: waiting for review
Decision needed
Approve Option B (durable queue with exponential backoff) or send back with changes by Thursday. The change touches the payments webhook path, so I want a second pair of eyes before implementation starts.
Problem
POST /internal/webhooks/dispatch fires each event at the customer's endpoint exactly once. If the customer's server is down for even a few seconds, the event is lost and support opens a ticket to replay it by hand. Last month: 41 tickets, median 3 hours to resolution.
Proposed behavior
- Every delivery attempt is recorded with a status and the next retry time.
- Failed deliveries retry with exponential backoff: 1 min, 5 min, 30 min, 2 h, 12 h (5 attempts, ~15 h total).
- After the final failure the event is marked
deadand an email goes to the account owner. - Customers can replay a
deadevent from the dashboard; support no longer touches the database.
Alternatives considered
| Option | What it is | Why not |
|---|---|---|
| A. Retry inline | Loop with sleep inside the request handler | Blocks a worker for up to 15 h; retries die with a deploy |
| B. Durable queue | Persist attempts, a scheduler polls due retries | Chosen — survives deploys, observable, cheap to build on Postgres |
| C. Third-party (Svix, Hookdeck) | Outsource delivery | Adds a vendor to the payments path; revisit at 10× volume |
Sequence
Implementation steps
- Migration — new table
delivery_attempts (id, event_id, attempt, status, due_at, response_code, created_at), index on(status, due_at). - Enqueue —
dispatchinserts a pending attempt instead of calling the endpoint directly. - Scheduler — a cron every 30 s:
SELECT ... WHERE status='pending' AND due_at <= now() FOR UPDATE SKIP LOCKED LIMIT 100. - Backoff —
backoff(n) = [60, 300, 1800, 7200, 43200][n]seconds; jitter ±10 %. - Dead letter — on the 5th failure set
dead, send the owner email through the existingnotificationsservice. - Dashboard — "Replay" button calls
POST /events/:id/replay, which inserts a fresh attempt.
// scheduler/deliver.ts (sketch)
export async function deliver(attempt: Attempt) {
const res = await fetch(attempt.url, { method: 'POST', body: attempt.payload, signal: AbortSignal.timeout(10_000) });
if (res.ok) return markDelivered(attempt.id, res.status);
const n = attempt.attempt + 1;
return n >= 5 ? markDead(attempt.id, res.status) : reschedule(attempt.id, n, backoff(n));
}
Verification
- Unit: backoff schedule, dead-letter threshold, replay creates attempt #1.
- Integration: a mock endpoint that fails twice then succeeds → three rows, final status
delivered. - Staging: point the sandbox account at a deliberately down URL, confirm the owner email arrives after ~15 h (use a shortened schedule behind a flag).
Risks and open questions
- Retrying non-idempotent customer endpoints could double-process. Mitigation: send an
Idempotency-Keyheader equal to the event id; document it. - Should
deadevents auto-replay when the customer's endpoint comes back? Proposal: no, keep it explicit.
Rollout
Feature flag webhook_retries per account. Enable for internal accounts first, then 10 % of customers, then everyone over two weeks.
How do I publish the plan from Cursor or Claude Code?
Connect the Docs MD MCP server once (per-editor configs are in the AI IDE guide). For Claude Code that is one command:
claude mcp add --transport http md-share https://docs-md.com/api/mcpThen, with the plan open, ask:
Publish implementation-plan.md with a 7-day expiry. Give me the reading link,
and keep the edit token out of the document itself.The assistant calls share_markdown and reports back something like this (the id and token are made up):
✓ Markdown shared successfully!
https://docs-md.com/quiet-harbor-7k2pd
Raw: https://docs-md.com/raw/quiet-harbor-7k2pd
Expires: 9/13/2026
Edit token (keep it to update or delete this share later): 4b1e…Post the first URL in the review thread. Ask the assistant to note the edit token in the conversation or a local file that is not committed — it is the only way to change the share later.
How do I update the plan after review without changing the link?
Edit the source, then ask: "Update the share quiet-harbor-7k2pd with the new implementation-plan.md." The assistant calls update_share with the edit token. The URL you already posted now renders version two, and the expiry clock does not reset. From a script the same operation is:
curl -X PATCH https://docs-md.com/api/share/quiet-harbor-7k2pd \
-H "Content-Type: application/json" \
-H "x-edit-token: $EDIT_TOKEN" \
--data-binary @<(jq -Rs '{content: .}' implementation-plan.md)Where does the review discussion go?
Not on the shared page — Docs MD renders documents, it does not host comments. Keep the discussion where your team already works: the PR that will implement the plan, the Linear or Jira issue, or the Slack thread the link was posted in. The share is the readable artifact those conversations point at, and updating it keeps every pointer current.
What are the limits?
- Up to 120,000 characters of markdown per share, which is roughly 60 pages of plan.
- Expiry options are 1 day, 7 days, 30 days (the default), or never.
- Shares are public to anyone with the link; there is no reader authentication.
- Mermaid diagrams, GitHub-flavored tables, task lists, and highlighted code all render.
Related walkthroughs: hand a task to another coding agent and share an architecture diagram with notes. The full REST surface is on the API page.
FAQ
How do I share a Cursor implementation plan with a teammate?
Add the Docs MD MCP server to Cursor, then ask the assistant to "share implementation-plan.md with a 7-day expiry and give me the link". It calls share_markdown and returns a public URL that renders the plan with its diagram and code blocks. No account is needed on either side.
Can I update the plan after reviewers comment without changing the link?
Yes. Every share returns an edit token. Ask the assistant to update the share with the new content (or call PATCH /api/share/:id with the token) and the same URL shows the new version. Nothing you posted in Slack or a pull request goes stale.
Is the shared plan private?
No. A share is a public URL: anyone who has the link can read it. The edit token only controls who can change or delete it. Do not put credentials or unreleased customer data in a plan you share; keep the discussion itself in your existing PR, issue, or chat thread.
What happens when the 7 days are up?
The document and its stored file are deleted and the URL returns 404. Expiration removes access at the original address; it cannot recall copies that reviewers downloaded or printed. Expiring shares also carry a noindex directive, which asks search engines not to list them.
Does loading the example publish anything?
No. "Open in editor" only fills the homepage editor with the example text. A share is created only when you click Share Markdown, and the same is true for the MCP and API paths — nothing is published until you or your assistant explicitly calls share_markdown.