@fro.bot/systematic 1.21.3 → 1.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,185 @@
1
+ ---
2
+ name: proof
3
+ description: Create, edit, comment on, and share markdown documents via Proof's web API and local bridge. Use when asked to "proof", "share a doc", "create a proof doc", "comment on a document", "suggest edits", "review in proof", or when given a proofeditor.ai URL.
4
+ allowed-tools:
5
+ - Bash
6
+ - Read
7
+ - Write
8
+ - WebFetch
9
+ ---
10
+
11
+ # Proof - Collaborative Markdown Editor
12
+
13
+ Proof is a collaborative document editor for humans and agents. It supports two modes:
14
+
15
+ 1. **Web API** - Create and edit shared documents via HTTP (no install needed)
16
+ 2. **Local Bridge** - Drive the macOS Proof app via localhost:9847
17
+
18
+ ## Web API (Primary for Sharing)
19
+
20
+ ### Create a Shared Document
21
+
22
+ No authentication required. Returns a shareable URL with access token.
23
+
24
+ ```bash
25
+ curl -X POST https://www.proofeditor.ai/share/markdown \
26
+ -H "Content-Type: application/json" \
27
+ -d '{"title":"My Doc","markdown":"# Hello\n\nContent here."}'
28
+ ```
29
+
30
+ **Response format:**
31
+ ```json
32
+ {
33
+ "slug": "abc123",
34
+ "tokenUrl": "https://www.proofeditor.ai/d/abc123?token=xxx",
35
+ "accessToken": "xxx",
36
+ "ownerSecret": "yyy",
37
+ "_links": {
38
+ "state": "https://www.proofeditor.ai/api/agent/abc123/state",
39
+ "ops": "https://www.proofeditor.ai/api/agent/abc123/ops"
40
+ }
41
+ }
42
+ ```
43
+
44
+ Use the `tokenUrl` as the shareable link. The `_links` give you the exact API paths.
45
+
46
+ ### Read a Shared Document
47
+
48
+ ```bash
49
+ curl -s "https://www.proofeditor.ai/api/agent/{slug}/state" \
50
+ -H "x-share-token: <token>"
51
+ ```
52
+
53
+ ### Edit a Shared Document
54
+
55
+ All operations go to `POST https://www.proofeditor.ai/api/agent/{slug}/ops`
56
+
57
+ **Note:** Use the `/api/agent/{slug}/ops` path (from `_links` in create response), NOT `/api/documents/{slug}/ops`.
58
+
59
+ **Authentication for protected docs:**
60
+ - Header: `x-share-token: <token>` or `Authorization: Bearer <token>`
61
+ - Token comes from the URL parameter: `?token=xxx` or the `accessToken` from create response
62
+
63
+ **Comment on text:**
64
+ ```json
65
+ {"op": "comment.add", "quote": "text to comment on", "by": "ai:<agent-name>", "text": "Your comment here"}
66
+ ```
67
+
68
+ **Reply to a comment:**
69
+ ```json
70
+ {"op": "comment.reply", "markId": "<id>", "by": "ai:<agent-name>", "text": "Reply text"}
71
+ ```
72
+
73
+ **Resolve a comment:**
74
+ ```json
75
+ {"op": "comment.resolve", "markId": "<id>", "by": "ai:<agent-name>"}
76
+ ```
77
+
78
+ **Suggest a replacement:**
79
+ ```json
80
+ {"op": "suggestion.add", "kind": "replace", "quote": "original text", "by": "ai:<agent-name>", "content": "replacement text"}
81
+ ```
82
+
83
+ **Suggest a deletion:**
84
+ ```json
85
+ {"op": "suggestion.add", "kind": "delete", "quote": "text to delete", "by": "ai:<agent-name>"}
86
+ ```
87
+
88
+ **Bulk rewrite:**
89
+ ```json
90
+ {"op": "rewrite.apply", "content": "full new markdown", "by": "ai:<agent-name>"}
91
+ ```
92
+
93
+ ### Known Limitations (Web API)
94
+
95
+ - `suggestion.add` with `kind: "insert"` returns Bad Request on the web ops endpoint. Use `kind: "replace"` with a broader quote instead, or use `rewrite.apply` for insertions.
96
+ - Bridge-style endpoints (`/d/{slug}/bridge/*`) require client version headers (`x-proof-client-version`, `x-proof-client-build`, `x-proof-client-protocol`) and return 426 CLIENT_UPGRADE_REQUIRED without them. Use the `/api/agent/{slug}/ops` endpoint instead.
97
+
98
+ ## Local Bridge (macOS App)
99
+
100
+ Requires Proof.app running. Bridge at `http://localhost:9847`.
101
+
102
+ **Required headers:**
103
+ - `X-Agent-Id: claude` (identity for presence)
104
+ - `Content-Type: application/json`
105
+ - `X-Window-Id: <uuid>` (when multiple docs open)
106
+
107
+ ### Key Endpoints
108
+
109
+ | Method | Endpoint | Purpose |
110
+ |--------|----------|---------|
111
+ | GET | `/windows` | List open documents |
112
+ | GET | `/state` | Read markdown, cursor, word count |
113
+ | GET | `/marks` | List all suggestions and comments |
114
+ | POST | `/marks/suggest-replace` | `{"quote":"old","by":"ai:<agent-name>","content":"new"}` |
115
+ | POST | `/marks/suggest-insert` | `{"quote":"after this","by":"ai:<agent-name>","content":"insert"}` |
116
+ | POST | `/marks/suggest-delete` | `{"quote":"delete this","by":"ai:<agent-name>"}` |
117
+ | POST | `/marks/comment` | `{"quote":"text","by":"ai:<agent-name>","text":"comment"}` |
118
+ | POST | `/marks/reply` | `{"markId":"<id>","by":"ai:<agent-name>","text":"reply"}` |
119
+ | POST | `/marks/resolve` | `{"markId":"<id>","by":"ai:<agent-name>"}` |
120
+ | POST | `/marks/accept` | `{"markId":"<id>"}` |
121
+ | POST | `/marks/reject` | `{"markId":"<id>"}` |
122
+ | POST | `/rewrite` | `{"content":"full markdown","by":"ai:<agent-name>"}` |
123
+ | POST | `/presence` | `{"status":"reading","summary":"..."}` |
124
+ | GET | `/events/pending` | Poll for user actions |
125
+
126
+ ### Presence Statuses
127
+
128
+ `thinking`, `reading`, `idle`, `acting`, `waiting`, `completed`
129
+
130
+ ## Workflow: Review a Shared Document
131
+
132
+ When given a Proof URL like `https://www.proofeditor.ai/d/abc123?token=xxx`:
133
+
134
+ 1. Extract the slug (`abc123`) and token from the URL
135
+ 2. Read the document state via the API
136
+ 3. Add comments or suggest edits using the ops endpoint
137
+ 4. The author sees changes in real-time
138
+
139
+ ```bash
140
+ # Read
141
+ curl -s "https://www.proofeditor.ai/api/agent/abc123/state" \
142
+ -H "x-share-token: xxx"
143
+
144
+ # Comment
145
+ curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops" \
146
+ -H "Content-Type: application/json" \
147
+ -H "x-share-token: xxx" \
148
+ -d '{"op":"comment.add","quote":"text","by":"ai:systematic","text":"comment"}'
149
+
150
+ # Suggest edit
151
+ curl -X POST "https://www.proofeditor.ai/api/agent/abc123/ops" \
152
+ -H "Content-Type: application/json" \
153
+ -H "x-share-token: xxx" \
154
+ -d '{"op":"suggestion.add","kind":"replace","quote":"old","by":"ai:systematic","content":"new"}'
155
+ ```
156
+
157
+ ## Workflow: Create and Share a New Document
158
+
159
+ ```bash
160
+ # 1. Create
161
+ RESPONSE=$(curl -s -X POST https://www.proofeditor.ai/share/markdown \
162
+ -H "Content-Type: application/json" \
163
+ -d '{"title":"My Doc","markdown":"# Title\n\nContent here."}')
164
+
165
+ # 2. Extract URL and token
166
+ URL=$(echo "$RESPONSE" | jq -r '.tokenUrl')
167
+ SLUG=$(echo "$RESPONSE" | jq -r '.slug')
168
+ TOKEN=$(echo "$RESPONSE" | jq -r '.accessToken')
169
+
170
+ # 3. Share the URL
171
+ echo "$URL"
172
+
173
+ # 4. Make edits using the ops endpoint
174
+ curl -X POST "https://www.proofeditor.ai/api/agent/$SLUG/ops" \
175
+ -H "Content-Type: application/json" \
176
+ -H "x-share-token: $TOKEN" \
177
+ -d '{"op":"comment.add","quote":"Content here","by":"ai:systematic","text":"Added a note"}'
178
+ ```
179
+
180
+ ## Safety
181
+
182
+ - Use `/state` content as source of truth before editing
183
+ - Prefer suggest-replace over full rewrite for small changes
184
+ - Don't span table cells in a single replace
185
+ - Always include `by` field for attribution tracking
@@ -6,11 +6,17 @@ disable-model-invocation: true
6
6
 
7
7
  # Systematic Setup
8
8
 
9
- Interactive setup for `systematic.local.md` — configures which agents run during `/workflows:review` and `/workflows:work`.
9
+ ## Interaction Method
10
+
11
+ If `AskUserQuestion` is available, use it for all prompts below.
12
+
13
+ If not, present each question as a numbered list and wait for a reply before proceeding to the next step. For multiSelect questions, accept comma-separated numbers (e.g. `1, 3`). Never skip or auto-configure.
14
+
15
+ Interactive setup for `systematic.local.md` — configures which agents run during `/ce:review` and `/ce:work`.
10
16
 
11
17
  ## Step 1: Check Existing Config
12
18
 
13
- Read `systematic.local.md` in the project root. If it exists, display current settings summary and use question:
19
+ Read `systematic.local.md` in the project root. If it exists, display current settings summary and use AskUserQuestion:
14
20
 
15
21
  ```
16
22
  question: "Settings file already exists. What would you like to do?"
@@ -41,7 +47,7 @@ test -f requirements.txt && echo "python" || \
41
47
  echo "general"
42
48
  ```
43
49
 
44
- Use question:
50
+ Use AskUserQuestion:
45
51
 
46
52
  ```
47
53
  question: "Detected {type} project. How would you like to configure?"
@@ -145,7 +151,7 @@ plan_review_agents: [{computed plan agent list}]
145
151
  # Review Context
146
152
 
147
153
  Add project-specific review instructions here.
148
- These notes are passed to all review agents during /workflows:review and /workflows:work.
154
+ These notes are passed to all review agents during /ce:review and /ce:work.
149
155
 
150
156
  Examples:
151
157
  - "We use Turbo Frames heavily — check for frame-busting issues"