You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,10 +30,13 @@ Domscribe bridges both directions: click a DOM element to tell your agent what t
30
30
Your agent is editing `Button.tsx` line 12. It calls `domscribe.query.bySource` and instantly gets back the live DOM snapshot, current props, component state, and rendered attributes — without any human interaction. The agent can verify what an element looks like _before_ changing it and confirm the result _after_.
31
31
32
32
33
-
```jsonc
34
-
// Agent asks: "What's rendering at Button.tsx line 12?"
<imgsrc="./docs/code-to-ui.png"alt="Code → UI: Let the agent see the browser" />
35
+
</p>
36
36
37
+
Here's an example response that the agent might get back:
38
+
39
+
```json
37
40
{
38
41
"sourceLocation": {
39
42
"file": "src/components/Button.tsx",
@@ -59,9 +62,13 @@ Your agent is editing `Button.tsx` line 12. It calls `domscribe.query.bySource`
59
62
60
63
A developer clicks an element in the browser overlay, types "make this button use the primary color," and submits. Domscribe captures the element's source location, runtime context, and user intent as an annotation. The agent claims it, navigates to the exact file and line, and implements the change.
61
64
62
-
```jsonc
63
-
// → domscribe.annotation.process (claims next queued annotation)
65
+
<palign="center">
66
+
<imgsrc="./docs/ui-to-code.png"alt="UI → Code: Point and tell" />
67
+
</p>
64
68
69
+
The annotation is stored as a JSON file in your repository in the `.domscribe/annotations` directory. Here's an example:
70
+
71
+
```json
65
72
{
66
73
"found": true,
67
74
"annotationId": "ann_A1B2C3D4_1710500000",
@@ -87,7 +94,7 @@ A developer clicks an element in the browser overlay, types "make this button us
87
94
}
88
95
```
89
96
90
-
The agent edits the code, calls `domscribe.annotation.respond` with a description of what it did, and the overlay shows the result in real time via WebSocket.
97
+
Once the agent is done with the edits, it calls `domscribe.annotation.respond` with a description of what it did. The overlay shows the result in real time via WebSocket.
0 commit comments