Loading...
Loading...
Create, share, view, comment on, edit, and run human-in-the-loop review loops over markdown documents via Proof, the collaborative markdown editor at proofeditor.ai ("Proof editor"). Use when the user wants to render or view a local markdown file in Proof, share markdown to get a URL, iterate collaboratively on a Proof doc, comment on or suggest edits in Proof, HITL a spec/plan/draft for human review, sync a Proof doc back to local, or work from a proofeditor.ai URL. Trigger on phrases like "view this in proof", "share to proof", "iterate with proof", or "HITL this doc", and on ce-brainstorm / ce-ideate / ce-plan handoffs for human review. Also match clear requests for a rendered/shared markdown review surface even if the user does not name Proof. Do not trigger on "proof" meaning evidence, math/logic proof, burden of proof, proof-of-concept, or bare "proofread this" requests where inline text review is expected.
npx skill4agent add everyinc/compound-engineering-plugin ce-proofbyX-Agent-Idai:compound-engineeringnamePOST /presenceCompound EngineeringX-Agent-Idreferences/hitl-review.mdidentityai:compoundreferences/hitl-review.mdce-brainstormce-ideatece-plancurl -X POST https://www.proofeditor.ai/share/markdown \
-H "Content-Type: application/json" \
-d '{"title":"My Doc","markdown":"# Hello\n\nContent here."}'{
"slug": "abc123",
"tokenUrl": "https://www.proofeditor.ai/d/abc123?token=xxx",
"accessToken": "xxx",
"ownerSecret": "yyy",
"_links": {
"state": "https://www.proofeditor.ai/api/agent/abc123/state",
"ops": "https://www.proofeditor.ai/api/agent/abc123/ops"
}
}tokenUrl_linkscurl -s "https://www.proofeditor.ai/api/agent/{slug}/state" \
-H "x-share-token: <token>"POST https://www.proofeditor.ai/api/agent/{slug}/ops/api/agent/{slug}/ops_links/api/documents/{slug}/opsx-share-token: <token>Authorization: Bearer <token>?token=xxxaccessTokenX-Agent-Id: ai:compound-engineering/api/agent/{slug}/opstype/api/agent/{slug}/edit/v2operationsopop/opsbaseTokenmutationBase.token/state/snapshotSTALE_BASEBASE_TOKEN_REQUIREDSTALE_BASEreferences/hitl-review.md/edit/v2/snapshotSTALE_BASEBASE_TOKEN_REQUIREDMISSING_BASEINVALID_BASE_TOKEN/statebaseTokenANCHOR_NOT_FOUNDANCHOR_AMBIGUOUSquoteINVALID_OPERATIONSINVALID_REQUESTINVALID_REFINVALID_BLOCK_MARKDOWNINVALID_RANGEINVALID_MARKDOWNCOLLAB_SYNC_FAILEDREWRITE_BARRIER_FAILEDPROJECTION_STALEINTERNAL_ERRORcollab.status: "pending"/stateIdempotency-Keycomment.addsuggestion.addIdempotency-Key/state.contract.idempotencyRequired{"type": "comment.add", "quote": "text to comment on", "by": "ai:compound-engineering", "text": "Your comment here", "baseToken": "<token>"}{"type": "comment.reply", "markId": "<id>", "by": "ai:compound-engineering", "text": "Reply text", "baseToken": "<token>"}{"type": "comment.resolve", "markId": "<id>", "by": "ai:compound-engineering", "baseToken": "<token>"}
{"type": "comment.unresolve", "markId": "<id>", "by": "ai:compound-engineering", "baseToken": "<token>"}{"type": "suggestion.add", "kind": "replace", "quote": "original text", "by": "ai:compound-engineering", "content": "replacement text", "baseToken": "<token>"}{"type": "suggestion.add", "kind": "replace", "quote": "original text", "by": "ai:compound-engineering", "content": "replacement text", "status": "accepted", "baseToken": "<token>"}status: "accepted"kind: "insert" | "delete" | "replace"{"type": "suggestion.accept", "markId": "<id>", "by": "ai:compound-engineering", "baseToken": "<token>"}
{"type": "suggestion.reject", "markId": "<id>", "by": "ai:compound-engineering", "baseToken": "<token>"}suggestion.resolve{"type": "rewrite.apply", "content": "full new markdown", "by": "ai:compound-engineering", "baseToken": "<token>"}/edit/v2curl -X POST "https://www.proofeditor.ai/api/agent/{slug}/edit/v2" \
-H "Content-Type: application/json" \
-H "x-share-token: <token>" \
-H "X-Agent-Id: ai:compound-engineering" \
-H "Idempotency-Key: <uuid>" \
-d '{
"by": "ai:compound-engineering",
"baseToken": "mt1:<token>",
"operations": [
{"op": "replace_block", "ref": "b3", "block": {"markdown": "Updated paragraph."}},
{"op": "insert_after", "ref": "b3", "blocks": [{"markdown": "## New section"}]}
]
}'blockblocks| op | body fields |
|---|---|
| |
| |
| |
| |
| |
| |
/snapshotrefoperations/edit/v2references/hitl-review.md/edit/v2suggestion.addstatus: "accepted"rewrite.applyLIVE_CLIENTS_PRESENTPOST https://www.proofeditor.ai/api/bridge/report_bug/d/{slug}/bridge/*x-proof-client-versionx-proof-client-buildx-proof-client-protocol/api/agent/{slug}/opshttp://localhost:9847X-Agent-Id: claudeContent-Type: application/jsonX-Window-Id: <uuid>| Method | Endpoint | Purpose |
|---|---|---|
| GET | | List open documents |
| GET | | Read markdown, cursor, word count |
| GET | | List all suggestions and comments |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| POST | | |
| GET | | Poll for user actions |
thinkingreadingidleactingwaitingcompletedhttps://www.proofeditor.ai/d/abc123?token=xxxabc123# Read once — the same response yields both the doc content and the baseToken for every mutation below.
STATE=$(curl -s "https://www.proofeditor.ai/api/agent/abc123/state" \
-H "x-share-token: xxx")
BASE=$(printf '%s' "$STATE" | jq -r '.mutationBase.token')
# Inspect doc fields as needed: printf '%s' "$STATE" | jq '.markdown, .revision'
# Comment
curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops" \
-H "Content-Type: application/json" \
-H "x-share-token: xxx" \
-H "X-Agent-Id: ai:compound-engineering" \
-d "$(jq -n --arg base "$BASE" '{type:"comment.add",quote:"text",by:"ai:compound-engineering",text:"comment",baseToken:$base}')"
# Suggest edit (tracked, pending)
curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops" \
-H "Content-Type: application/json" \
-H "x-share-token: xxx" \
-H "X-Agent-Id: ai:compound-engineering" \
-d "$(jq -n --arg base "$BASE" '{type:"suggestion.add",kind:"replace",quote:"old",by:"ai:compound-engineering",content:"new",baseToken:$base}')"
# Suggest and immediately apply (tracked, committed)
curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops" \
-H "Content-Type: application/json" \
-H "x-share-token: xxx" \
-H "X-Agent-Id: ai:compound-engineering" \
-d "$(jq -n --arg base "$BASE" '{type:"suggestion.add",kind:"replace",quote:"old",by:"ai:compound-engineering",content:"new",status:"accepted",baseToken:$base}')"# 1. Create
RESPONSE=$(curl -s -X POST https://www.proofeditor.ai/share/markdown \
-H "Content-Type: application/json" \
-d '{"title":"My Doc","markdown":"# Title\n\nContent here."}')
# 2. Extract URL and token
URL=$(echo "$RESPONSE" | jq -r '.tokenUrl')
SLUG=$(echo "$RESPONSE" | jq -r '.slug')
TOKEN=$(echo "$RESPONSE" | jq -r '.accessToken')
# 3. Bind display name via presence
curl -s -X POST "https://www.proofeditor.ai/api/agent/$SLUG/presence" \
-H "Content-Type: application/json" \
-H "x-share-token: $TOKEN" \
-H "X-Agent-Id: ai:compound-engineering" \
-d '{"name":"Compound Engineering","status":"reading","summary":"Uploaded doc"}'
# 4. Share the URL
echo "$URL"
# 5. Make edits using the ops endpoint (baseToken required)
BASE=$(curl -s "https://www.proofeditor.ai/api/agent/$SLUG/state" \
-H "x-share-token: $TOKEN" | jq -r '.mutationBase.token')
curl -X POST "https://www.proofeditor.ai/api/agent/$SLUG/ops" \
-H "Content-Type: application/json" \
-H "x-share-token: $TOKEN" \
-H "X-Agent-Id: ai:compound-engineering" \
-d "$(jq -n --arg base "$BASE" '{type:"comment.add",quote:"Content here",by:"ai:compound-engineering",text:"Added a note",baseToken:$base}')"references/hitl-review.mdSLUG=<slug>
TOKEN=<accessToken>
LOCAL=<absolute-path>
# One read to a temp file — avoids passing markdown through $(...), which would strip trailing newlines.
STATE_TMP=$(mktemp)
curl -s "https://www.proofeditor.ai/api/agent/$SLUG/state" \
-H "x-share-token: $TOKEN" > "$STATE_TMP"
REVISION=$(jq -r '.revision' "$STATE_TMP")
# Atomic write: stream .markdown bytes directly to a temp sibling, then rename.
TMP="${LOCAL}.proof-sync.$$"
jq -jr '.markdown' "$STATE_TMP" > "$TMP" && mv "$TMP" "$LOCAL"
rm "$STATE_TMP"jq -jr-j-rmv<localPath>/stateedit/v2suggestion.addrewrite.applyLIVE_CLIENTS_PRESENTby: "ai:compound-engineering"X-Agent-Id: ai:compound-engineeringbaseToken/state/snapshotSTALE_BASE