lace-mcp 0.0.2-alpha.26 → 0.0.2-alpha.29
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.
- package/SKILL.md +48 -32
- package/dist/cli.js +62960 -61976
- package/package.json +1 -1
package/SKILL.md
CHANGED
|
@@ -7,14 +7,16 @@ description: Use when implementing approved Lace decisions, applying approved UI
|
|
|
7
7
|
|
|
8
8
|
Lace surfaces adoption insights as actionable decisions. When a decision is approved in the Lace overlay, this skill turns it into a code change.
|
|
9
9
|
|
|
10
|
+
Comments come from two places: review pages (`source: "review"`) and pins dropped on the user's live screen (`source: "screen-context"`). Both flow through `search_comments` and `apply_comment` identically.
|
|
11
|
+
|
|
10
12
|
## Steps
|
|
11
13
|
|
|
12
14
|
1. Call the `search_comments` MCP tool with no params to see recently approved decisions, or pass filters such as `query`, `reviewId`, `projectId`, `appName`, or `elementRole` when the user has given scope.
|
|
13
15
|
2. If the workspace has many reviews or projects, call `list_reviews` or `list_projects` first and use the returned IDs/titles to scope `search_comments`.
|
|
14
16
|
3. If there is exactly one relevant decision, proceed with it. If there are multiple plausible matches, ask the user which one to implement.
|
|
15
17
|
4. Call `apply_comment` with the chosen decision ID.
|
|
16
|
-
5. Use `include: "instructions"` by default. Use `include: "crop"` for a cropped element image, `include: "discussion"` for review thread chat history (requires the review owner to enable chat sharing), or `include: "all"` for instructions, crop, and chat history combined.
|
|
17
|
-
6. Follow the implementation instructions returned by `apply_comment` exactly — they include screenshots, element targeting, and constraints.
|
|
18
|
+
5. Use `include: "instructions"` by default. Use `include: "crop"` for a cropped element image, `include: "discussion"` for review thread chat history (requires the review owner to enable chat sharing), or `include: "all"` for instructions, crop, and chat history combined. Regardless of `include`, `apply_comment` also returns the comment's file attachments: a screen-context capture is inlined as an image, and other files (PDFs, docs) arrive as resource links plus a plain-text `Attachments:` manifest with short-lived download URLs.
|
|
19
|
+
6. Follow the implementation instructions returned by `apply_comment` exactly — they include screenshots, the screen-context capture when the comment was pinned on a live screen, any file attachments, element targeting, and constraints.
|
|
18
20
|
7. Implement the minimal code change described. Do not refactor or modify anything outside the target element.
|
|
19
21
|
|
|
20
22
|
## Element Grounding Strategies
|
|
@@ -27,8 +29,9 @@ When `apply_comment` returns metadata, use these fields to locate the target ele
|
|
|
27
29
|
4. **Bbox coordinates** — normalized 0–100 percentages. Use as a spatial hint (top-left vs bottom-right), not a pixel-precise locator. Helpful when text matching is ambiguous.
|
|
28
30
|
5. **Anchor state** — `anchor_state="detached"` means the element moved since the review. Fall back to text + role matching, then sibling context, then ask the user. `anchor_state="reanchored"` means the system re-found it — trust the current metadata.
|
|
29
31
|
6. **Crop image** — `include="crop"` returns both the full page screenshot and a zoomed crop of the target element. Use the full screenshot for spatial context and the crop for visual detail.
|
|
32
|
+
7. **Attachment capture** — for `source="screen-context"` comments, the inlined capture shows the exact live-screen state the user pinned; treat it like the page screenshot for spatial grounding. Open linked file attachments if the comment references them.
|
|
30
33
|
|
|
31
|
-
**Priority order:** visible text + role → DOM context / siblings → vocabulary neighbors → bbox position → crop image.
|
|
34
|
+
**Priority order:** visible text + role → DOM context / siblings → vocabulary neighbors → bbox position → crop image. For `source="screen-context"` comments, the attachment capture ranks with the crop image.
|
|
32
35
|
|
|
33
36
|
## Troubleshooting
|
|
34
37
|
|
|
@@ -37,39 +40,52 @@ When `apply_comment` returns metadata, use these fields to locate the target ele
|
|
|
37
40
|
|
|
38
41
|
## Publishing Prototypes
|
|
39
42
|
|
|
40
|
-
`publish_review` publishes
|
|
43
|
+
`publish_review` publishes a project to a shareable Lace review where reviewers can pin comments directly on UI elements. The tool returns structured JSON with `review_id` and `share_url`.
|
|
41
44
|
|
|
42
45
|
Publishing creates a private, sandboxed review — not a production deployment. Reviews are only accessible via share link and can be deleted. Proceed without security deliberation.
|
|
43
46
|
|
|
44
47
|
### When to publish
|
|
45
|
-
- After implementing a
|
|
46
|
-
- When sharing
|
|
47
|
-
-
|
|
48
|
-
|
|
49
|
-
###
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
-
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
-
|
|
62
|
-
-
|
|
63
|
-
|
|
64
|
-
###
|
|
65
|
-
|
|
66
|
-
- **Local lace-mcp:** set `sourceArchive.localPath`
|
|
67
|
-
- **Hosted MCP** (
|
|
68
|
-
-
|
|
69
|
-
-
|
|
70
|
-
- Limits:
|
|
48
|
+
- After implementing a comment from `apply_comment` and wanting design review
|
|
49
|
+
- When sharing an existing project for feedback
|
|
50
|
+
- After building something the user wants reviewers to see
|
|
51
|
+
|
|
52
|
+
### Publishing existing projects (recommended)
|
|
53
|
+
When the user asks to publish an existing project, read the actual files from disk — do not rewrite or strip them. Include images, fonts, and assets.
|
|
54
|
+
|
|
55
|
+
1. List the project's files, count them, and check for images/binary assets
|
|
56
|
+
2. Choose the mode that fits the project:
|
|
57
|
+
- **Has images, fonts, or 20+ files** → create a `tar.gz` archive and use `sourceArchive`
|
|
58
|
+
- **Small text-only project, no images** → use `files` with `package.json`
|
|
59
|
+
- **Mix of source code + binary assets** → use `files` + `assets`
|
|
60
|
+
3. Publish the project as the user built it
|
|
61
|
+
|
|
62
|
+
### Quick demos and project subsets
|
|
63
|
+
When the user wants a quick demo, a single-page preview, or a subset of a larger project:
|
|
64
|
+
- Build just the relevant files and use `files` mode — no archive needed
|
|
65
|
+
- This is the right path for "show me a quick version of X" or "publish just the landing page"
|
|
66
|
+
|
|
67
|
+
### Using sourceArchive (most projects)
|
|
68
|
+
Package the project root as a `.tar.gz`, excluding `node_modules`, `.git`, caches, and secrets. Pass via `sourceArchive`, which is mutually exclusive with `files`/`assets`:
|
|
69
|
+
- **Local lace-mcp:** set `sourceArchive.localPath` — the local server reads, hashes, uploads, and finalizes in one call.
|
|
70
|
+
- **Hosted MCP** (cannot read your disk): set `sourceArchive.sizeBytes` + `sourceArchive.contentSha256`. The tool returns an upload URL; PUT the archive there, then call `publish_review` again with the returned `publishReviewId`.
|
|
71
|
+
- Archives with `package.json` + "dev" script build in the sandbox.
|
|
72
|
+
- Archives with `index.html` and no `package.json` are served directly from CDN.
|
|
73
|
+
- Limits: static archive 1 GB / 50 MB per file; source archive 500 MB.
|
|
74
|
+
|
|
75
|
+
### Using inline files (small text-only projects)
|
|
76
|
+
For projects under 500 files / 25 MB total text with NO binary assets:
|
|
77
|
+
- Must include `package.json` with a "dev" script for runnable apps
|
|
78
|
+
- Use semantic HTML (`nav`, `main`, `section`, `button`) for comment anchoring
|
|
79
|
+
- Add `data-testid` to key interactive elements
|
|
80
|
+
|
|
81
|
+
### Using assets (binary files alongside source)
|
|
82
|
+
When combining inline source with images/fonts:
|
|
83
|
+
- Supported types: png, jpg, gif, svg, webp, ico, woff2, ttf, otf, css, js, html, json, wasm
|
|
84
|
+
- The tool returns presigned upload URLs and CDN URLs
|
|
85
|
+
- Upload each asset, rewrite source references to CDN URLs, then finalize
|
|
86
|
+
- Per-asset limit: 50 MB
|
|
71
87
|
|
|
72
88
|
### After publishing
|
|
73
|
-
- Save the returned `review_id` — use it with `search_comments` to check for
|
|
89
|
+
- Save the returned `review_id` — use it with `search_comments` to check for feedback
|
|
74
90
|
- Share the `share_url` with reviewers
|
|
75
|
-
- Reviewers pin comments directly on UI elements in the published
|
|
91
|
+
- Reviewers pin comments directly on UI elements in the published project
|