@yargote/artifacts-cli 0.1.0-beta.1 → 0.1.0-beta.11
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/README.md +167 -19
- package/package.json +9 -4
- package/skills/artifacts-cli/SKILL.md +80 -0
- package/skills/artifacts-cli/references/commands.md +250 -0
- package/skills/artifacts-cli/references/verify-retained.md +119 -0
- package/skills/artifacts-cli/scripts/prepare-retained.mjs +149 -0
- package/skills/artifacts-design/SKILL.md +92 -0
- package/skills/artifacts-design/THIRD-PARTY-NOTICES.md +155 -0
- package/skills/artifacts-design/fonts/OFL.txt +96 -0
- package/skills/artifacts-design/fonts/bricolage-grotesque.woff2 +0 -0
- package/skills/artifacts-design/fonts/jetbrains-mono.woff2 +0 -0
- package/skills/artifacts-design/fonts/newsreader-italic.woff2 +0 -0
- package/skills/artifacts-design/fonts/newsreader.woff2 +0 -0
- package/skills/artifacts-design/fonts/public-sans-italic.woff2 +0 -0
- package/skills/artifacts-design/fonts/public-sans.woff2 +0 -0
- package/skills/artifacts-design/references/canvas.md +100 -0
- package/skills/artifacts-design/references/catppuccin.md +38 -0
- package/skills/artifacts-design/references/interface-checks.md +60 -0
- package/skills/artifacts-design/references/local-checks.md +70 -0
- package/skills/artifacts-design/references/visual-explanations.md +13 -0
- package/skills/artifacts-design/scripts/embed-fonts.mjs +246 -0
- package/skills/artifacts-design/scripts/verify-local.mjs +333 -0
- package/skills/artifacts-design/templates/starter.html +170 -0
- package/src/auth.d.ts +4 -1
- package/src/auth.js +184 -45
- package/src/credentials.d.ts +2 -0
- package/src/credentials.js +22 -0
- package/src/index.js +153 -31
- package/src/operations.d.ts +155 -38
- package/src/operations.js +11 -1
- package/src/skills.d.ts +9 -0
- package/src/skills.js +181 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
These notices apply to the named adapted references and bundled fonts. They do not set a license
|
|
4
|
+
for the Artifacts application or the original Artifacts skill instructions.
|
|
5
|
+
|
|
6
|
+
## Emil Kowalski skills
|
|
7
|
+
|
|
8
|
+
Adapted in [references/interface-checks.md](references/interface-checks.md). [Upstream license](https://raw.githubusercontent.com/emilkowalski/skills/refs/heads/main/LICENSE).
|
|
9
|
+
|
|
10
|
+
```text
|
|
11
|
+
MIT License
|
|
12
|
+
|
|
13
|
+
Copyright (c) 2026 Emil Kowalski
|
|
14
|
+
|
|
15
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
16
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
17
|
+
in the Software without restriction, including without limitation the rights
|
|
18
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
19
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
20
|
+
furnished to do so, subject to the following conditions:
|
|
21
|
+
|
|
22
|
+
The above copyright notice and this permission notice shall be included in all
|
|
23
|
+
copies or substantial portions of the Software.
|
|
24
|
+
|
|
25
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
26
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
27
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
28
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
29
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
30
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
31
|
+
SOFTWARE.
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Vercel Web Interface Guidelines
|
|
35
|
+
|
|
36
|
+
Adapted in [references/interface-checks.md](references/interface-checks.md). [Upstream license](https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/refs/heads/main/LICENSE).
|
|
37
|
+
|
|
38
|
+
```text
|
|
39
|
+
MIT License
|
|
40
|
+
|
|
41
|
+
Copyright (c) 2025 Vercel Labs
|
|
42
|
+
|
|
43
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
44
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
45
|
+
in the Software without restriction, including without limitation the rights
|
|
46
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
47
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
48
|
+
furnished to do so, subject to the following conditions:
|
|
49
|
+
|
|
50
|
+
The above copyright notice and this permission notice shall be included in all
|
|
51
|
+
copies or substantial portions of the Software.
|
|
52
|
+
|
|
53
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
54
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
55
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
56
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
57
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
58
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
59
|
+
SOFTWARE.
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Catppuccin palette
|
|
63
|
+
|
|
64
|
+
Adapted in [references/catppuccin.md](references/catppuccin.md). [Upstream license](https://raw.githubusercontent.com/catppuccin/palette/refs/heads/main/LICENSE).
|
|
65
|
+
|
|
66
|
+
```text
|
|
67
|
+
MIT License
|
|
68
|
+
|
|
69
|
+
Copyright (c) 2021 Catppuccin
|
|
70
|
+
|
|
71
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
72
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
73
|
+
in the Software without restriction, including without limitation the rights
|
|
74
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
75
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
76
|
+
furnished to do so, subject to the following conditions:
|
|
77
|
+
|
|
78
|
+
The above copyright notice and this permission notice shall be included in all
|
|
79
|
+
copies or substantial portions of the Software.
|
|
80
|
+
|
|
81
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
82
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
83
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
84
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
85
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
86
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
87
|
+
SOFTWARE.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Vercel Agent Skills
|
|
91
|
+
|
|
92
|
+
Adapted in [interface guidelines](references/interface-checks.md).
|
|
93
|
+
[Upstream repository](https://github.com/vercel-labs/agent-skills).
|
|
94
|
+
This notice is retained from the reviewed Packy Web Pack.
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
Vercel Agent Skills
|
|
98
|
+
|
|
99
|
+
The upstream repository declares these skills licensed under the MIT License.
|
|
100
|
+
|
|
101
|
+
Copyright (c) Vercel
|
|
102
|
+
|
|
103
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
104
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
105
|
+
in the Software without restriction, including without limitation the rights
|
|
106
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
107
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
108
|
+
furnished to do so, subject to the following conditions:
|
|
109
|
+
|
|
110
|
+
The above copyright notice and this permission notice shall be included in all
|
|
111
|
+
copies or substantial portions of the Software.
|
|
112
|
+
|
|
113
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
114
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
115
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
116
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
117
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
118
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
119
|
+
SOFTWARE.
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
## Hallmark
|
|
123
|
+
|
|
124
|
+
The composition guidance in [SKILL.md](SKILL.md) and the review categories in
|
|
125
|
+
[references/interface-checks.md](references/interface-checks.md) adapt ideas from
|
|
126
|
+
[Hallmark](https://github.com/Nutlope/hallmark), reviewed on 2026-10-24.
|
|
127
|
+
[Upstream license](https://github.com/Nutlope/hallmark/blob/main/LICENSE).
|
|
128
|
+
|
|
129
|
+
```text
|
|
130
|
+
MIT License
|
|
131
|
+
|
|
132
|
+
Copyright (c) 2026 Hallmark contributors
|
|
133
|
+
|
|
134
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
135
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
136
|
+
in the Software without restriction, including without limitation the rights
|
|
137
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
138
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
139
|
+
furnished to do so, subject to the following conditions:
|
|
140
|
+
|
|
141
|
+
The above copyright notice and this permission notice shall be included in all
|
|
142
|
+
copies or substantial portions of the Software.
|
|
143
|
+
|
|
144
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
145
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
146
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
147
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
148
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
149
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
150
|
+
SOFTWARE.
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Bundled fonts
|
|
154
|
+
|
|
155
|
+
The files in [fonts](fonts) are the Latin subsets of Bricolage Grotesque, Public Sans, JetBrains Mono, and Newsreader, as served by Google Fonts on 2026-10-17. Each is licensed under the SIL Open Font License, Version 1.1. The copyright lines and the complete license text are in [fonts/OFL.txt](fonts/OFL.txt).
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Copyright 2022 The Bricolage Grotesque Project Authors (https://github.com/ateliertriay/bricolage)
|
|
2
|
+
Copyright 2015 The Public Sans Project Authors (https://github.com/uswds/public-sans)
|
|
3
|
+
Copyright 2020 The JetBrains Mono Project Authors (https://github.com/JetBrains/JetBrainsMono)
|
|
4
|
+
Copyright 2020 The Newsreader Project Authors (http://github.com/productiontype/Newsreader)
|
|
5
|
+
|
|
6
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
7
|
+
This license is copied below, and is also available with a FAQ at:
|
|
8
|
+
https://scripts.sil.org/OFL
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
-----------------------------------------------------------
|
|
12
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
13
|
+
-----------------------------------------------------------
|
|
14
|
+
|
|
15
|
+
PREAMBLE
|
|
16
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
17
|
+
development of collaborative font projects, to support the font creation
|
|
18
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
19
|
+
open framework in which fonts may be shared and improved in partnership
|
|
20
|
+
with others.
|
|
21
|
+
|
|
22
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
23
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
24
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
25
|
+
redistributed and/or sold with any software provided that any reserved
|
|
26
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
27
|
+
however, cannot be released under any other type of license. The
|
|
28
|
+
requirement for fonts to remain under this license does not apply
|
|
29
|
+
to any document created using the fonts or their derivatives.
|
|
30
|
+
|
|
31
|
+
DEFINITIONS
|
|
32
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
33
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
34
|
+
include source files, build scripts and documentation.
|
|
35
|
+
|
|
36
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
37
|
+
copyright statement(s).
|
|
38
|
+
|
|
39
|
+
"Original Version" refers to the collection of Font Software components as
|
|
40
|
+
distributed by the Copyright Holder(s).
|
|
41
|
+
|
|
42
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
43
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
44
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
45
|
+
new environment.
|
|
46
|
+
|
|
47
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
48
|
+
writer or other person who contributed to the Font Software.
|
|
49
|
+
|
|
50
|
+
PERMISSION & CONDITIONS
|
|
51
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
52
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
53
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
54
|
+
Software, subject to the following conditions:
|
|
55
|
+
|
|
56
|
+
1) Neither the Font Software nor any of its individual components,
|
|
57
|
+
in Original or Modified Versions, may be sold by itself.
|
|
58
|
+
|
|
59
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
60
|
+
redistributed and/or sold with any software, provided that each copy
|
|
61
|
+
contains the above copyright notice and this license. These can be
|
|
62
|
+
included either as stand-alone text files, human-readable headers or
|
|
63
|
+
in the appropriate machine-readable metadata fields within text or
|
|
64
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
65
|
+
|
|
66
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
67
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
68
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
69
|
+
presented to the users.
|
|
70
|
+
|
|
71
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
72
|
+
Software shall not be used to promote, endorse or advertise any
|
|
73
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
74
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
75
|
+
permission.
|
|
76
|
+
|
|
77
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
78
|
+
must be distributed entirely under this license, and must not be
|
|
79
|
+
distributed under any other license. The requirement for fonts to
|
|
80
|
+
remain under this license does not apply to any document created
|
|
81
|
+
using the Font Software.
|
|
82
|
+
|
|
83
|
+
TERMINATION
|
|
84
|
+
This license becomes null and void if any of the above conditions are
|
|
85
|
+
not met.
|
|
86
|
+
|
|
87
|
+
DISCLAIMER
|
|
88
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
89
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
90
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
91
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
92
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
93
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
94
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
95
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
96
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Author a design canvas
|
|
2
|
+
|
|
3
|
+
Create a retained `design` snapshot when several HTML boards belong in one canvas. Each board is a complete self-contained HTML document. The canvas supplies placement, page selection, notes, pan, zoom, and a focus view. The calling MCP or CLI skill owns saving and publication.
|
|
4
|
+
|
|
5
|
+
## Compose the boards
|
|
6
|
+
|
|
7
|
+
1. Choose a frame size for each board. Common starting sizes are 1440 by 900 for desktop, 390 by 844 for a phone, and 768 by 1024 for a tablet. These are authoring conventions, not schema limits.
|
|
8
|
+
2. Place boards in a row with 80 px between their edges. Start another row 120 px below the tallest board in the preceding row. Coordinates are canvas pixels, and boards can use different sizes.
|
|
9
|
+
3. Write each board under `boards/` as one UTF-8 `.html` file. Inline its styles, scripts, images, and fonts. Files retained beside a board are downloads, not relative executable assets.
|
|
10
|
+
4. Apply this skill's typography and Catppuccin tokens inside each board. The canvas ground follows the viewer's light or dark theme independently.
|
|
11
|
+
5. Define `canvas.json` with the exact index below. Keep snapshot metadata outside the index.
|
|
12
|
+
|
|
13
|
+
```json
|
|
14
|
+
{
|
|
15
|
+
"v": 1,
|
|
16
|
+
"boards": {
|
|
17
|
+
"boards/Desktop.html": { "x": 0, "y": 0, "w": 1440, "h": 900, "title": "Desktop", "page": "overview" },
|
|
18
|
+
"boards/Phone.html": { "x": 1520, "y": 0, "w": 390, "h": 844, "title": "Phone", "page": "overview" },
|
|
19
|
+
"boards/Detail.html": { "x": 0, "y": 0, "w": 1440, "h": 900, "title": "Detail", "page": "detail" },
|
|
20
|
+
"boards/DetailPhone.html": { "x": 1520, "y": 0, "w": 390, "h": 844, "title": "Detail phone", "page": "detail" }
|
|
21
|
+
},
|
|
22
|
+
"order": ["boards/Desktop.html", "boards/Phone.html", "boards/Detail.html", "boards/DetailPhone.html"],
|
|
23
|
+
"notes": {
|
|
24
|
+
"review": { "x": 0, "y": 1020, "w": 390, "text": "Review both layouts.", "page": "overview" }
|
|
25
|
+
},
|
|
26
|
+
"pages": [
|
|
27
|
+
{ "id": "overview", "name": "Overview" },
|
|
28
|
+
{ "id": "detail", "name": "Detail" }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The first page opens initially. Boards and notes without `page` appear on the first page when pages exist. Without pages, every board and note appears together. A page can reuse the coordinates of another page.
|
|
34
|
+
|
|
35
|
+
## Index reference
|
|
36
|
+
|
|
37
|
+
The index and its nested entries reject unknown fields. The complete rules are:
|
|
38
|
+
|
|
39
|
+
| Field | Rule |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `v` | Required integer `1`. |
|
|
42
|
+
| `boards` | Required object with at most 32 entries. Every key matches `^boards/[A-Za-z0-9_][A-Za-z0-9_.-]*\.html$`. Names are case-sensitive and flat. |
|
|
43
|
+
| Board `x`, `y` | Required finite numbers from -1,000,000 to 1,000,000 inclusive. Fractions are accepted. |
|
|
44
|
+
| Board `w`, `h` | Required finite numbers from 40 to 8000 inclusive. Fractions are accepted. |
|
|
45
|
+
| Board `title` | Optional string of 1 to 256 characters. The board path is the display fallback. |
|
|
46
|
+
| Board `page` | Optional ID that names a declared page. |
|
|
47
|
+
| `order` | Required array of 1 to 32 board paths. It names every board exactly once and contains no other path. Its order controls rendering. |
|
|
48
|
+
| `notes` | Optional object with at most 200 entries. Each key is an ID. |
|
|
49
|
+
| Note `x`, `y`, `text` | Coordinates use the board coordinate limits. `text` is a required string rendered as escaped text, not HTML. |
|
|
50
|
+
| Note `w`, `page` | Optional width from 40 to 8000 and an optional declared page ID. |
|
|
51
|
+
| `pages` | Optional array of at most 32 objects with required `id` and `name`. IDs are unique. `name` contains 1 to 256 characters. |
|
|
52
|
+
| ID | 1 to 40 ASCII letters, digits, underscores, or hyphens. `__proto__` is rejected. |
|
|
53
|
+
|
|
54
|
+
Every indexed board has a matching snapshot file with the same `path`, `mediaType: "text/html"`, `encoding: "utf8"`, and the complete HTML in `data`. A snapshot has at most 32 files total, including other retained downloads. The directory preparer rejects every unindexed entry in `boards/`, missing boards, directories, symbolic links, and invalid UTF-8. The snapshot contract itself permits other unindexed attachments.
|
|
55
|
+
|
|
56
|
+
## Embed fonts within the shared budget
|
|
57
|
+
|
|
58
|
+
Run the real font helper once for each board after completing its HTML:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
node <design-skill-directory>/scripts/embed-fonts.mjs my-canvas/boards/Desktop.html
|
|
62
|
+
node <design-skill-directory>/scripts/embed-fonts.mjs my-canvas/boards/Phone.html
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
For the CLI, resolve `<design-skill-directory>` with `artifacts skills path artifacts-design`. The helper selects bundled Latin font subsets from actual CSS declarations and embeds `data:` WOFF2 faces. It rewrites the board in place and is safe to rerun.
|
|
66
|
+
|
|
67
|
+
Use one small, consistent selection of bundled families and styles across boards. Each board needs its own embedded font bytes because each iframe is an independent document. A subset cannot be shared through an attachment URL. Three families add about 135 KB per board, so repeated embedding can exhaust the canvas budget. Prefer one family and only the styles the board uses when many boards share one revision. The helper checks one board's 1 MiB limit. The preparer and server check the combined revision.
|
|
68
|
+
|
|
69
|
+
The shared limit is 1,048,576 decoded bytes. It includes serialized snapshot metadata, UTF-8 index text, every file path and media type, and every decoded file body. Whitespace in `canvas.json` counts. The 1 MiB limit applies to all boards together, not to each board separately.
|
|
70
|
+
|
|
71
|
+
## Save the canvas
|
|
72
|
+
|
|
73
|
+
For MCP, send one complete snapshot to `artifacts_create` or `artifacts_update`:
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
{
|
|
77
|
+
metadata: { title: 'Product layouts', description: 'Desktop and phone review.' },
|
|
78
|
+
content: { kind: 'design', text: JSON.stringify(index) },
|
|
79
|
+
files: boardPaths.map((path) => ({ path, mediaType: 'text/html', encoding: 'utf8', data: boardHtml[path] }))
|
|
80
|
+
}
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Here `index`, `boardPaths`, and `boardHtml` come from your completed source files. Read the saved revision back through `artifacts_read` before reporting persistence.
|
|
84
|
+
|
|
85
|
+
For the CLI, keep `canvas.json` and `boards/*.html` in one directory. Run the bundled preparer:
|
|
86
|
+
|
|
87
|
+
```sh
|
|
88
|
+
node <cli-skill-directory>/scripts/prepare-retained.mjs ./my-canvas > snapshot.json
|
|
89
|
+
artifacts create --snapshot snapshot.json
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Resolve `<cli-skill-directory>` with `artifacts skills path artifacts-cli`. Use the script at that returned path so its installed contracts dependency resolves. The preparer preserves the index text and board HTML and sorts snapshot files by path. Canvas rendering still follows `order`. It emits a validated snapshot on stdout, uses the directory basename as `metadata.title`, and sets `metadata.description` to `""`. Edit those metadata fields in the emitted JSON before saving when the task calls for a specific title or description. The directory form accepts exactly one positional argument. The named-option form prepares retained-verification configuration and keeps its separate contract.
|
|
93
|
+
|
|
94
|
+
## Check the retained canvas
|
|
95
|
+
|
|
96
|
+
Open the exact saved revision in the authenticated panel. Confirm all boards fit on the initial page, select each page, and open a board through its name button. Focus view shows that board at its declared width and height and enables its controls. **Volver al lienzo** returns to the prior pan and zoom. Escape also returns when a canvas control has keyboard focus. After interacting inside a board, use **Volver al lienzo** to return. For Escape, first use Shift+Tab to move focus back to the canvas controls. Embedded boards remain inert in the overview.
|
|
97
|
+
|
|
98
|
+
Check publication through the protected URL returned by `artifacts_publish`. In unsupported browsers, the canvas displays an inert listing of board source. Rendering uses nested opaque `srcdoc` iframes with `sandbox="allow-scripts"` and the existing content policy. Board scripts can still consume renderer time or briefly perturb focus. The canvas is not an absolute keyboard isolation boundary.
|
|
99
|
+
|
|
100
|
+
Export retains the index as `content.json` and boards as `files/boards/*.html`. To recreate a snapshot, use the manifest's `metadata`, preserve `content.json` as `content.text`, and reconstruct each file using its declared encoding. The ZIP manifest sorts files by path, matching the directory preparer. Snapshot digests preserve the original `files` array order, so keep that order from an independent saved read when comparing digests after recreation. A directory preparer also derives new metadata. Restore the manifest metadata and original file order before comparing snapshot digests.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Catppuccin roles
|
|
2
|
+
|
|
3
|
+
The starter maps the official [Catppuccin palette](https://github.com/catppuccin/palette/blob/main/palette.json) to semantic tokens. Latte serves the light theme and Mocha the dark theme. Blue is the Artifacts accent.
|
|
4
|
+
|
|
5
|
+
| Token | Role | Latte (light) | Mocha (dark) |
|
|
6
|
+
| --- | --- | --- | --- |
|
|
7
|
+
| `--page` | Page background | Base `#eff1f5` | Mantle `#181825` |
|
|
8
|
+
| `--surface` | Strip, table, or panel | White `#ffffff` | Base `#1e1e2e` |
|
|
9
|
+
| `--sunken` | Table header, hover, code | Mantle `#e6e9ef` | Crust `#11111b` |
|
|
10
|
+
| `--line` | Hairline divider | Surface 0 `#ccd0da` | Surface 0 `#313244` |
|
|
11
|
+
| `--control` | Input and button boundary | Overlay 1 `#8c8fa1` | Overlay 0 `#6c7086` |
|
|
12
|
+
| `--fg` | Main text | Text `#4c4f69` | Text `#cdd6f4` |
|
|
13
|
+
| `--muted` | Secondary text and labels | Subtext 1 `#5c5f77` | Subtext 0 `#a6adc8` |
|
|
14
|
+
| `--accent` | Focus, selection, primary fill | Blue `#1e66f5` | Blue `#89b4fa` |
|
|
15
|
+
| `--accent-ink` | Links and accent text | `#1957d0` | Blue `#89b4fa` |
|
|
16
|
+
| `--ok` / `--ok-ink` | Success mark / text | Green `#40a02b` / `#307820` | Green `#a6e3a1` |
|
|
17
|
+
| `--warn` / `--warn-ink` | Warning mark / text | Yellow `#df8e1d` / `#915c13` | Yellow `#f9e2af` |
|
|
18
|
+
| `--bad` / `--bad-ink` | Error mark / text | Red `#d20f39` / `#b20d30` | Red `#f38ba8` |
|
|
19
|
+
|
|
20
|
+
The Latte ink values darken the palette color so pill text reaches 4.5:1 on its soft background. Each `*-soft` token mixes 14 % of its color into `--surface`, so it adapts to both themes without a second definition.
|
|
21
|
+
|
|
22
|
+
Every text token reaches 4.5:1 on `--page` and `--surface` in both themes. `--control` reaches 3:1 for input boundaries. `--line` is decorative and must not be the only boundary of a control.
|
|
23
|
+
|
|
24
|
+
## Chart series
|
|
25
|
+
|
|
26
|
+
Use these in order after Blue. Give each series a direct label or marker as well as a color.
|
|
27
|
+
|
|
28
|
+
| Series | Latte | Mocha |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| 1 | Blue `#1e66f5` | Blue `#89b4fa` |
|
|
31
|
+
| 2 | Peach `#fe640b` | Peach `#fab387` |
|
|
32
|
+
| 3 | Teal `#179299` | Teal `#94e2d5` |
|
|
33
|
+
| 4 | Mauve `#8839ef` | Mauve `#cba6f7` |
|
|
34
|
+
| 5 | Yellow `#df8e1d` | Yellow `#f9e2af` |
|
|
35
|
+
|
|
36
|
+
Mauve is a data color only, never the accent.
|
|
37
|
+
|
|
38
|
+
The palette's license notice is retained in [third-party notices](../THIRD-PARTY-NOTICES.md).
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# Interface checks for HTML artifacts
|
|
2
|
+
|
|
3
|
+
Use these checks for visual authoring and review. Apply only the checks relevant to the artifact. Keep the requested content and behavior central.
|
|
4
|
+
|
|
5
|
+
## Accessible, resilient interfaces
|
|
6
|
+
|
|
7
|
+
- Use semantic headings, buttons, links, and tables. Label controls and icon buttons. Give meaningful images alternative text.
|
|
8
|
+
- Make every action keyboard accessible. Keep focus visible and unobscured. Restore focus after dismissing overlays.
|
|
9
|
+
- Announce asynchronous status changes without interrupting reading. Pair errors with a useful next action.
|
|
10
|
+
- Provide click and keyboard alternatives for gestures. Keep essential information available without hover.
|
|
11
|
+
- Preserve zoom and paste. Associate input labels with their controls. Use suitable input types.
|
|
12
|
+
- Support narrow viewports, empty results, and long content. Let flex children shrink. Wrap text before hiding overflow.
|
|
13
|
+
- Reserve image dimensions. Defer below-fold media. Batch layout reads and writes. Paginate or virtualize long lists when needed.
|
|
14
|
+
- Use tabular numerals for comparisons and `Intl` for localized values. Keep units attached to numbers.
|
|
15
|
+
- Set native controls to the document's color scheme. Keep hover, active, and focus states distinguishable.
|
|
16
|
+
- Avoid motion that blocks interaction. Provide pause controls for extended autoplay and a reduced-motion alternative.
|
|
17
|
+
|
|
18
|
+
## Motion and interaction detail
|
|
19
|
+
|
|
20
|
+
Adapt motion to repetition and purpose. Frequent actions should respond immediately. Add animation when it explains a state change or spatial relationship.
|
|
21
|
+
|
|
22
|
+
Prefer interruptible CSS transitions with named properties. Start around 100 to 160 ms for press feedback and 125 to 250 ms for small overlays. Use an ease-out curve for entry. Anchor popover transforms to their trigger and center modal transforms.
|
|
23
|
+
|
|
24
|
+
Prefer `transform` and `opacity` for movement. Avoid `transition: all`, large blur effects, and entrance scaling from zero. Keep feedback subtle enough that labels remain readable.
|
|
25
|
+
|
|
26
|
+
Under `prefers-reduced-motion: reduce`, remove decorative movement and retain immediate state feedback. Gate hover effects with `(hover: hover) and (pointer: fine)`. Do not make content wait for an entrance animation.
|
|
27
|
+
|
|
28
|
+
## Adapt to the Artifacts sandbox
|
|
29
|
+
|
|
30
|
+
Keep input-driven calculations in document memory. Use labeled controls without a form submission workflow. Do not imply that an in-document control saves a retained revision or publishes an artifact.
|
|
31
|
+
|
|
32
|
+
Keep filters and tabs local to the document. Do not depend on host URL synchronization, router packages, persistent storage, network requests, or remote fonts. Embed fonts and other required assets as `data:` URIs within the snapshot budget.
|
|
33
|
+
|
|
34
|
+
## Required checks
|
|
35
|
+
|
|
36
|
+
Check content fidelity, sandbox compatibility, and usable behavior regardless of the composition. Preserve supplied facts, units, qualifications, and requested controls. For a visual revision, record the existing content and actions before editing and confirm that they still work afterward.
|
|
37
|
+
|
|
38
|
+
When browser tools are available, inspect the generated document at a narrow viewport around 375 px and a wide viewport around 1280 px, or the user's requested sizes. Verify that body content fits, labels remain legible, and only intentionally wide tables or code regions scroll locally. Check the artifact itself rather than relying on the surrounding application's appearance.
|
|
39
|
+
|
|
40
|
+
Exercise every distinct action with keyboard and pointer input. Observe the expected output or state change, including input errors, reset behavior, and empty filter results where applicable. Confirm that focus stays visible and follows opened and dismissed overlays. Check reduced motion when animation is present. Inspect the console for runtime errors and confirm that required content and controls work without external requests.
|
|
41
|
+
|
|
42
|
+
Finish when each relevant check passes or an unavailable check is identified. Fix observed failures and repeat affected checks. Source inspection establishes markup and script intent; report browser behavior as verified only after observing it.
|
|
43
|
+
|
|
44
|
+
For a requested audit, identify each issue by element or source location and state its correction. Distinguish source inspection from browser verification. Do not turn ordinary artifact delivery into an unsolicited audit report.
|
|
45
|
+
|
|
46
|
+
## Visual judgment
|
|
47
|
+
|
|
48
|
+
Check whether the main visual or result answers the reader's task, whether its labels stay close to what they describe, and whether the reading order is clear at both widths. Read the headings alone and check that they describe this document's content. Remove containers and repeated labels that add no grouping or information.
|
|
49
|
+
|
|
50
|
+
Choose density, alignment, cards, and section rhythm for the content. A long report, a diagram sequence, and a calculator need different compositions. These choices are defaults to reconsider with a concrete reason, not automatic failures. Keep the user's requested style and content. Do not remove evidence or simplify away a qualification to meet an aesthetic preference.
|
|
51
|
+
|
|
52
|
+
## Sources
|
|
53
|
+
|
|
54
|
+
Adapted on 2026-10-14 from [Emil Kowalski's design engineering skill](https://raw.githubusercontent.com/emilkowalski/skills/refs/heads/main/skills/emil-design-eng/SKILL.md) and [Vercel's web design guidelines skill](https://raw.githubusercontent.com/vercel-labs/agent-skills/refs/heads/main/skills/web-design-guidelines/SKILL.md).
|
|
55
|
+
|
|
56
|
+
The accessibility and interface checks incorporate Vercel's Web Interface Guidelines `command.md` as local guidance. Its remote command workflow and output format are not required. The sandbox adaptations are specific to Artifacts.
|
|
57
|
+
|
|
58
|
+
The composition workflow and the distinction between required checks and visual judgment draw on [Hallmark](https://github.com/Nutlope/hallmark), reviewed on 2026-10-24. This adaptation retains Artifacts' document types, palette, embedded fonts, and sandbox constraints.
|
|
59
|
+
|
|
60
|
+
License notices are retained in [Third-party notices](../THIRD-PARTY-NOTICES.md).
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Check local HTML before saving
|
|
2
|
+
|
|
3
|
+
Run the helper after embedding fonts and before the calling skill's create or update operation.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
design_skill=$(artifacts skills path artifacts-design)
|
|
7
|
+
node "$design_skill/scripts/verify-local.mjs" page.html --evidence ./page-evidence
|
|
8
|
+
```
|
|
9
|
+
|
|
10
|
+
The helper needs Node 24+, an existing `playwright` or `playwright-core` package, and Chrome or Chromium 152+. It resolves the package from the current project first, then from its own installation. It tries existing Playwright browser binaries and system executables. To select an existing browser explicitly, add `--browser /absolute/path/to/chromium`. An explicit selection does not fall back to another executable.
|
|
11
|
+
|
|
12
|
+
Missing dependencies, incompatible versions, and launch failures produce actionable diagnostics. The helper never installs software, downloads a browser, disables browser sandboxing, or relaxes document policies.
|
|
13
|
+
|
|
14
|
+
## Describe controls
|
|
15
|
+
|
|
16
|
+
Add `--expectations checks.json` to replay actions and assert their results. Each matrix case starts with a fresh document. Steps run in order. A failed step ends that case's sequence because later steps may depend on it. The remaining cases still run.
|
|
17
|
+
|
|
18
|
+
```json
|
|
19
|
+
{
|
|
20
|
+
"expectations": [
|
|
21
|
+
{ "kind": "visibleCount", "selector": ".mobile-map, .desktop-map", "count": 1 },
|
|
22
|
+
{ "kind": "visible", "selector": ".mobile-map", "visible": true, "when": { "width": 375 } },
|
|
23
|
+
{ "kind": "visible", "selector": ".desktop-map", "visible": true, "when": { "width": 1280 } },
|
|
24
|
+
{ "kind": "text", "selector": "#total", "text": "5.00" },
|
|
25
|
+
{ "kind": "click", "selector": "#calculate" },
|
|
26
|
+
{ "kind": "text", "selector": "#total", "text": "28.40" },
|
|
27
|
+
{ "kind": "press", "selector": "#reset", "key": "Enter" },
|
|
28
|
+
{ "kind": "text", "selector": "#total", "text": "5.00" }
|
|
29
|
+
]
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Every step requires `kind` and a Playwright locator `selector`. Optional `when` limits it to `width` of 375 or 1280, `theme` of `light` or `dark`, or both. Unknown fields and malformed values fail configuration validation.
|
|
34
|
+
|
|
35
|
+
| Kind | Additional fields | Observable result |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `text` | `text`, a string | Exact inner text of one element. Add a `visible` check when visibility is required. |
|
|
38
|
+
| `count` | `count`, a nonnegative integer | Number of matching elements. |
|
|
39
|
+
| `visible` | `visible`, a boolean | Visibility of exactly one matching element. A missing element fails. |
|
|
40
|
+
| `visibleCount` | `count`, a nonnegative integer | Number of visible matches. Use one selector matching both responsive variants to assert exclusivity. |
|
|
41
|
+
| `attribute` | `name`, a nonempty string, and `value`, a string or `null` | Exact attribute value. `null` requires absence. |
|
|
42
|
+
| `click` | None. | Real pointer activation. |
|
|
43
|
+
| `press` | `key`, a Playwright key string such as `Enter`, `Space`, or `Tab` | Keyboard input to the selected element. |
|
|
44
|
+
| `fill` | `value`, a string | Input or textarea edit. |
|
|
45
|
+
| `check` | `checked`, a boolean | Checkbox or radio state. |
|
|
46
|
+
| `select` | `values`, an array of strings | Selected option values. |
|
|
47
|
+
|
|
48
|
+
Assertions poll for their expected result. Actions wait for Playwright's actionability checks. The JSON document accepts at most 100 steps and an optional `timeoutMs` from 100 to 30000. Its default is 3000 ms per expectation. With no expectations file, the helper checks rendering and errors but does not infer the document's intended controls.
|
|
49
|
+
|
|
50
|
+
Each variant also has a total deadline of `timeoutMs * (step count + 1)`, bounded between 10 and 60 seconds. The deadline includes loading, checks, captures, and final observations. If the renderer stops responding, the helper closes that variant's context, records `deadline.exceeded`, and marks its remaining evidence incomplete. The other variants still run. A deadline failure cannot pass the automatic checks.
|
|
51
|
+
|
|
52
|
+
## Inspect the evidence
|
|
53
|
+
|
|
54
|
+
The helper creates a fresh `local-*` subdirectory under `--evidence`. It writes `report.json`, `index.md`, and PNG images. Repeated runs keep separate evidence.
|
|
55
|
+
|
|
56
|
+
The fixed matrix is 375 and 1280 px wide at 900 px high, each in light and dark. Every case checks document overflow before and after its scenario, runtime exceptions, error console entries, and forbidden resource attempts. CSP violations include resource attempts blocked before a browser request occurs. Initial and final captures scroll the actual iframe in viewport-sized steps. Each phase saves at most 12 tiles. Capture records include actual scroll offsets and mark incomplete coverage in `captureCoverage.truncated`.
|
|
57
|
+
|
|
58
|
+
The document runs in an opaque-origin iframe with `sandbox="allow-scripts"`. Its response uses the Artifacts preview CSP, `Connection-Allowlist: ()`, and disabled DNS prefetching. Fonts, images, and media must be embedded as `data:` URIs. Network connections, remote scripts, frames, objects, forms, and workers remain blocked. The local server exposes only the generated wrapper and content, without arbitrary filesystem access. Browser request routing also denies other destinations.
|
|
59
|
+
|
|
60
|
+
The report records the chosen executable, version, user agent, rejected browser candidates, source hashes before and after verification, actual content response policy and hash, per-case checks, errors, and screenshots. It identifies the evidence as **renderizado local** and leaves `authenticatedPublication` as `not-verified`. It does not modify the HTML, save a revision, publish, or contact the Artifacts service. No service credentials are required.
|
|
61
|
+
|
|
62
|
+
| Exit code | Meaning |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| 0 | Automatic checks passed. Visual review remains required. |
|
|
65
|
+
| 1 | An automatic check failed. |
|
|
66
|
+
| 2 | Setup or configuration blocked the run. |
|
|
67
|
+
|
|
68
|
+
A structured blocked report is written when a valid evidence destination is available. The helper prints the report as JSON on standard output.
|
|
69
|
+
|
|
70
|
+
Read the screenshots and the [interface checks](interface-checks.md) before accepting the design. Check content fidelity, reading order, labels, focus, alignment, density, and both themes. A clean console cannot establish those judgments. Each run observes load, font readiness, its declared interactions, and a short settling period. Delayed behavior beyond the run and content outside captured coverage require further inspection. Verify the retained revision and protected publication separately through the service workflow after saving.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Beginner visual explanations
|
|
2
|
+
|
|
3
|
+
When the user requests a visual HTML explanation for a beginner, assume no prior knowledge. Identify the topic from the conversation. Ask for it only if it is missing or ambiguous.
|
|
4
|
+
|
|
5
|
+
Build a visual sequence with one idea per scene. Start with a concrete example the reader can recognize, then show how the parts connect or change. Use large illustrations, diagrams, or pictures to carry the explanation. Decorative icons and oversized headings do not replace explanatory images.
|
|
6
|
+
|
|
7
|
+
Pair each visual with a short heading and a brief caption. Use familiar words and define necessary terms where they first appear. Keep labels close to what they explain. Preserve essential qualifications and the limits of an analogy even when the user asks for few words.
|
|
8
|
+
|
|
9
|
+
Use inline SVG or CSS for diagrams. Use embedded raster images when the subject benefits from illustrations or photographs. Resize and compress them to fit the snapshot budget while keeping details readable. If image tools are unavailable, use a clear diagram when it can convey the concept faithfully. Report any requested imagery you cannot provide.
|
|
10
|
+
|
|
11
|
+
Make the main visual dominant and its labels legible on narrow and wide screens. Give meaningful images text alternatives. Add interaction only when it helps the reader understand a relationship or change. Keep the core explanation accessible without operating a control.
|
|
12
|
+
|
|
13
|
+
Before saving, check that the sequence explains the topic with its pictures and short captions, without a separate essay. Apply the [interface guidelines](interface-checks.md) visual checks and report any checks you could not run.
|