@yargote/artifacts-cli 0.1.0-beta.1 → 0.1.0-beta.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Artifacts CLI reference
2
2
 
3
- The `artifacts` Node CLI reads and writes retained artifacts through REST. It prints JSON results to stdout and diagnostics to stderr. Node 24 or later is required. Its private credential database uses Node's experimental built-in SQLite API.
3
+ The `artifacts` Node CLI reads and writes retained artifacts through REST. It prints JSON results to stdout and diagnostics to stderr. Offline skills commands print plain text. Node 24 or later is required. Its private credential database uses Node's experimental built-in SQLite API.
4
4
 
5
5
  The `@yargote/artifacts-cli` package exposes the `artifacts` binary as compiled ESM JavaScript. Its client and contracts dependencies install automatically. Repository development uses `pnpm artifacts` with the same command syntax.
6
6
 
@@ -11,9 +11,9 @@ Use Node 24 or later. The beta targets macOS and Linux. Windows has not been ver
11
11
  Choose one persistent installation:
12
12
 
13
13
  ```sh
14
- npm install --global @yargote/artifacts-cli@0.1.0-beta.1
14
+ npm install --global @yargote/artifacts-cli@0.1.0-beta.3
15
15
  # Or, with pnpm and an existing global bin directory on PATH:
16
- pnpm add --global @yargote/artifacts-cli@0.1.0-beta.1
16
+ pnpm add --global @yargote/artifacts-cli@0.1.0-beta.3
17
17
  artifacts --version
18
18
  ```
19
19
 
@@ -22,8 +22,8 @@ If pnpm reports that no global bin directory exists, run `pnpm setup` and reopen
22
22
  For one-off execution, pin the same version:
23
23
 
24
24
  ```sh
25
- npx --yes @yargote/artifacts-cli@0.1.0-beta.1 --help
26
- pnpm dlx @yargote/artifacts-cli@0.1.0-beta.1 --help
25
+ npx --yes @yargote/artifacts-cli@0.1.0-beta.3 --help
26
+ pnpm dlx @yargote/artifacts-cli@0.1.0-beta.3 --help
27
27
  ```
28
28
 
29
29
  `@beta` follows future prereleases. Exact versions remain reproducible. No stable `latest` release is part of this beta. An organization's pnpm minimum release age or trust policy can delay a new release. Follow that policy rather than disabling it globally.
@@ -80,6 +80,8 @@ Run `artifacts logout` before uninstalling if you want to clear credentials. Uni
80
80
 
81
81
  ## Server and local state
82
82
 
83
+ Skills, help, and version commands work without a server or login. Skills commands do not read credentials or create private state. They accept and ignore global `--server` and `--state-dir` values, including their environment defaults.
84
+
83
85
  `--server RESOURCE` selects the exact canonical OAuth resource. `ARTIFACTS_SERVER` supplies the same value. A resource ending in `/mcp` uses REST under `/mcp/v1`. The CLI has no production default.
84
86
 
85
87
  `--state-dir DIR` overrides `ARTIFACTS_STATE_DIR`. The default is `~/.local/state/artifacts`. The state directory must be private and owned by the current user. Credentials are separate from operation files. Profiles bind credentials to the exact resource. Retained operation paths hash the resource and request ID, so request IDs cannot select filesystem paths.
@@ -109,7 +111,7 @@ artifacts whoami
109
111
  artifacts create --snapshot FILE [--request-id ID] [--response full|compact]
110
112
  artifacts create --command FILE
111
113
  artifacts list [--limit N] [--cursor CURSOR]
112
- artifacts read ID [--revision REV] [--response full|compact] [--out FILE]
114
+ artifacts read ID [--revision REV] [--response full|compact] [--out FILE [--quiet]]
113
115
  artifacts update ID --snapshot FILE --expected-revision REV [--request-id ID]
114
116
  [--response full|compact]
115
117
  artifacts update [ID] --command FILE
@@ -119,10 +121,42 @@ artifacts publish ID --revision REV --expected-version N [--request-id ID]
119
121
  artifacts publish [ID] --command FILE
120
122
  artifacts export ID --revision REV --out FILE
121
123
  artifacts retry REQUEST_ID
124
+ artifacts skills [list]
125
+ artifacts skills get NAME [--full]
126
+ artifacts skills get --all [--full]
127
+ artifacts skills path [NAME]
128
+ artifacts skills install [NAME] [--agent claude] [--global] [--force]
122
129
  ```
123
130
 
124
131
  Global `--server RESOURCE` and `--state-dir DIR` options can appear before or after the command. Options cannot be repeated. Unknown options and options for another command fail before submission.
125
132
 
133
+ ## Bundled skills
134
+
135
+ Check `artifacts --help` for `skills` support. The published `0.1.0-beta.1` package predates this command group. These commands describe the current source and packages built from it.
136
+
137
+ `artifacts skills` and `artifacts skills list` print each bundled skill's name and description, separated by a tab. The catalog contains `artifacts-cli` and `artifacts-design`, which owns HTML design, bundled fonts, and the font embedding script. Their complete source directories are bundled with the CLI, so the instructions match the installed version and work offline.
138
+
139
+ `artifacts skills get artifacts-cli` prints the complete `SKILL.md` without headers or changes to its bytes. `--full` includes every bundled reference and template. Binary files such as fonts appear as a marker with their size, for example `=== artifacts-design/fonts/public-sans.woff2 (binary, 26636 bytes) ===`; read them from `artifacts skills path artifacts-design`. Each file starts with a catalog-relative marker such as `=== artifacts-cli/references/commands.md ===`. `artifacts skills get --all` prints every `SKILL.md` with these markers. Add `--full` to include every skill's support files.
140
+
141
+ `artifacts skills path` prints the absolute bundled catalog directory. Add a skill name to print that skill's directory. These paths belong to the CLI package and do not depend on the current directory.
142
+
143
+ Install a discovery skill for an agent with one of these commands.
144
+
145
+ | Command | Destination |
146
+ | --- | --- |
147
+ | `artifacts skills install` | `./.agents/skills/artifacts-cli/SKILL.md` |
148
+ | `artifacts skills install --agent claude` | `./.claude/skills/artifacts-cli/SKILL.md` |
149
+ | `artifacts skills install --global` | `~/.agents/skills/artifacts-cli/SKILL.md` |
150
+ | `artifacts skills install --agent claude --global` | `~/.claude/skills/artifacts-cli/SKILL.md` |
151
+
152
+ The optional name defaults to `artifacts-cli`. The default destination always uses `.agents`, even if `.claude` already exists. Only explicit `--agent claude` selects `.claude`. Local paths resolve from the current directory. Global paths resolve from the user's home directory.
153
+
154
+ The command prints the absolute destination. It leaves identical files unchanged, including their modification time. A differing file requires `--force`. Forced installation replaces only `SKILL.md` and preserves neighboring files. A directory or symbolic link at `SKILL.md` is rejected.
155
+
156
+ The discovery file instructs the agent to run `artifacts skills get artifacts-cli --full` and follow the returned instructions. It contains no copied workflow or fixed package path. After a CLI upgrade, the same discovery command loads that installed version's skill.
157
+
158
+ ## Artifact input and output
159
+
126
160
  Create and update snapshot files contain the complete domain snapshot.
127
161
 
128
162
  ```json
@@ -133,7 +167,11 @@ Create and update snapshot files contain the complete domain snapshot.
133
167
  }
134
168
  ```
135
169
 
136
- `read --out FILE` saves the returned artifact JSON and also prints it to stdout. A default full read contains the complete snapshot under `revision.snapshot`. `export --out FILE` saves the exact ZIP and prints its filename, local path, media type, SHA-256, and byte count. Output files use exclusive creation and never overwrite an existing path.
170
+ `read --out FILE` saves the returned artifact JSON and also prints it to stdout. Add `--quiet` to suppress successful stdout while saving the same bytes for the selected response mode. `--quiet` is available only for `read` and requires a nonempty `--out FILE`. Errors still go to stderr and exit with code `1`.
171
+
172
+ Check installed help for `--quiet` support. Version `0.1.0-beta.1` predates this option. With that version, `artifacts read ARTIFACT_ID --out saved.json > /dev/null` suppresses stdout while preserving stderr and the exit status.
173
+
174
+ A default full read contains the complete snapshot under `revision.snapshot`. `export --out FILE` saves the exact ZIP and prints its filename, local path, media type, SHA-256, and byte count. Output files use exclusive creation and never overwrite an existing path.
137
175
 
138
176
  History defaults to complete revisions. `--summary` returns revision metadata and attachment summaries. `--before-sequence` continues a page. `list --cursor` continues an artifact list.
139
177
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yargote/artifacts-cli",
3
- "version": "0.1.0-beta.1",
3
+ "version": "0.1.0-beta.3",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Command-line client for the Artifacts REST API.",
@@ -23,14 +23,19 @@
23
23
  "files": [
24
24
  "src",
25
25
  "README.md",
26
- "LICENSE"
26
+ "LICENSE",
27
+ "skills"
27
28
  ],
28
29
  "dependencies": {
29
- "@yargote/artifacts-contracts": "0.1.0-beta.1",
30
- "@yargote/artifacts-client": "0.1.0-beta.1",
30
+ "@yargote/artifacts-contracts": "0.1.0-beta.3",
31
+ "@yargote/artifacts-client": "0.1.0-beta.3",
31
32
  "openid-client": "6.8.8",
32
33
  "zod": "4.6.5"
33
34
  },
35
+ "artifactsSkills": [
36
+ "artifacts-cli",
37
+ "artifacts-design"
38
+ ],
34
39
  "publishConfig": {
35
40
  "access": "public",
36
41
  "tag": "beta",
@@ -0,0 +1,56 @@
1
+ ---
2
+ name: artifacts-cli
3
+ description: Create, revise, inspect, publish, and export retained Artifacts through the artifacts CLI and REST API. Use when the user chooses the CLI or a terminal workflow for Artifacts. Exclude generic build artifacts and unrelated local files.
4
+ ---
5
+
6
+ # Manage retained Artifacts with the CLI
7
+
8
+ Use the installed `artifacts` executable. Run `artifacts --help` and read [the command workflow](references/commands.md) before the first operation. With bundled skills support, `artifacts skills get artifacts-cli --full` returns this skill and its complete command reference. If the executable is unavailable, report that prerequisite. Do not substitute database writes or invent CLI results.
9
+
10
+ ## Select the account and resource
11
+
12
+ Use the resource selected by the user or the existing `ARTIFACTS_SERVER` environment value. Pass `--server RESOURCE` or set `ARTIFACTS_SERVER` for service commands. Skills, help, and version commands work offline without a server or login. Login does not set an implicit default. A resource is the canonical OAuth URL, such as `https://artifacts.example.test/mcp`. REST routes are below that resource at `/v1`. Do not infer a production connection from an example or silently switch to a local server.
13
+
14
+ Run `artifacts whoami` before the first mutation when the current identity is not established. Keep the selected resource and owner consistent throughout one operation. If login is needed, use `artifacts login --server RESOURCE`. The user authenticates in the browser. Do not collect their password or read another application's credentials. Never put tokens in command arguments, operation files, logs, or the final reply.
15
+
16
+ ## Prepare retained content
17
+
18
+ A revision is a complete snapshot with `metadata`, `content`, and `files`. The command reference contains its JSON shape. Use the requested title, language, content, and attachments. Do not include unrelated files or credentials.
19
+
20
+ Use self-contained HTML for interactive content. Inline styles and scripts and embed required assets as data URLs. External requests, CDN dependencies, relative executable assets, forms, browser storage, and multi-file websites are unsupported. Attachments are downloads, not importable website resources. Markdown and text display inertly.
21
+
22
+ Keep the whole revision within 1 MiB of decoded content, metadata, attachment paths, media types, and attachment bytes. At most 32 attachments are accepted. Base64 changes wire size, not the decoded limit. If required content exceeds a limit, explain the constraint without silently removing it.
23
+
24
+ Before writing or restyling HTML, run `artifacts skills get artifacts-design --full` and follow it. It owns typography, embedded fonts, color, layout, and the rendered checks. Finish those checks before saving when browser tools are available. A successful CLI write proves persistence, not visual quality or browser compatibility. Interactive HTML follows the server's Chrome policy; do not promise it in every browser.
25
+
26
+ ## Create or revise
27
+
28
+ Create a draft when the user asks to save new content. Use a complete snapshot file and retain the CLI's request ID and operation record until the result is verified.
29
+
30
+ Resolve an existing artifact by its supplied ID, an observed publication URL, or a paginated list. If several results match, ask which one the user means. Read its current full snapshot before editing. Preserve metadata, custom JSON, content fields, and attachments the user did not ask to change.
31
+
32
+ Use `edit` for partial changes that preserve omitted fields. Use `update` for a complete next snapshot with the observed `headRevisionId` as its expected revision. Changing the attachment list replaces that inventory; an empty list removes all attachments. An update creates a retained revision and does not change the published revision.
33
+
34
+ ## Publish deliberately
35
+
36
+ Publish when the user requests publication, a shareable artifact URL, or a change to the live artifact. Use the exact saved revision selected by the user or returned by the edit. Read the current publication version before preparing publication. Use zero only when the artifact is unpublished.
37
+
38
+ A published URL still requires its owner's Artifacts login. Publishing a historical revision leaves the draft head unchanged. Report the returned protected URL only after the publication succeeds and its current state is verified.
39
+
40
+ ## Recover an uncertain write
41
+
42
+ The CLI retains complete mutations before sending them. After a connection failure or uncertain result, use `retry` with that retained request ID once. Keep the same resource, owner, request ID, response mode, snapshot, and expected versions. Do not rerun a convenience edit or generate a new ID to repeat an operation whose outcome is unknown.
43
+
44
+ If the retry remains unavailable, report the uncertainty and retain the recovery record. A conflict stops the failed operation. Read the current state and report the concurrent change. Do not replace expected versions to force a write. A changed operation needs a deliberate new command and request ID.
45
+
46
+ A `request_conflict` means the ID was used with different arguments. Do not describe it as success. Authentication, validation, missing-artifact, and service failures likewise remain failures.
47
+
48
+ ## Verify and deliver
49
+
50
+ After create or update, read the explicit returned revision. Use `read ARTIFACT_ID --revision REVISION_ID --out FILE --quiet` to retain the full response without printing its snapshot. Check that the installed `--help` supports `--quiet` first. For older versions, use the command workflow's stdout redirection fallback. Compare the saved complete metadata, content, and decoded attachment bytes with the intended snapshot. For an update, check that its parent is the head used for preparation. Compact responses cannot verify omitted content.
51
+
52
+ After publication, read current publication and compare revision, version, and URL with the committed result. A replayed receipt describes the original commit; another writer may have changed the current publication afterward. Report that difference.
53
+
54
+ Follow list and history cursors when the request needs more than the first page. Export an explicit retained revision to the requested destination. The CLI checks the archive digest. Confirm that the file exists and inspect its manifest and relevant content before linking it.
55
+
56
+ Report the title, saved revision, and draft or published state in the user's language. Link the actual export or returned protected publication URL. Distinguish persistence from any visual or browser checks that did not run. Keep local credential and session identifiers private.
@@ -0,0 +1,156 @@
1
+ # Command workflow
2
+
3
+ Check the installed `artifacts --help` before use. These examples use the canonical resource selected for the task. `ARTIFACT_ID` and `REVISION_ID` stand for IDs observed in actual command output.
4
+
5
+ ## Inspect and install bundled skills
6
+
7
+ When installed help lists `skills`, use these commands without a server or login.
8
+
9
+ ```sh
10
+ artifacts skills
11
+ artifacts skills get artifacts-cli --full
12
+ artifacts skills get --all --full
13
+ artifacts skills path artifacts-cli
14
+ artifacts skills install
15
+ artifacts skills install --agent claude --global
16
+ ```
17
+
18
+ `skills` and `skills list` list names and descriptions. Plain `skills get artifacts-cli` returns the complete `SKILL.md`. `--full` includes references and templates with relative file paths. `skills path` without a name returns the catalog directory.
19
+
20
+ Installation defaults to `artifacts-cli` in `.agents/skills` under the current directory. `--agent claude` selects `.claude/skills`. `--global` selects the user's home directory. Existing agent directories do not affect the default. The discovery file instructs the agent to load the installed CLI's complete instructions with `artifacts skills get artifacts-cli --full`. Installation reports the absolute path, leaves identical files unchanged, and requires `--force` to replace differing files.
21
+
22
+ The published `0.1.0-beta.1` package predates skills commands. Do not assume support without checking help.
23
+
24
+ ## Authenticate
25
+
26
+ ```sh
27
+ export ARTIFACTS_SERVER=https://artifacts.example.test/mcp
28
+ artifacts login
29
+ artifacts whoami
30
+ ```
31
+
32
+ Replace the example with the selected resource before executing it. Service commands read `ARTIFACTS_SERVER` or an explicit `--server RESOURCE`. Login does not save a default resource. `--state-dir DIR` or `ARTIFACTS_STATE_DIR` selects an isolated private state directory. For automation, `ARTIFACTS_ACCESS_TOKEN` supplies an already authorized bearer token. Do not echo it or put it in an argument.
33
+
34
+ Use `--no-browser` when the environment cannot open a browser automatically. Open the printed authorization URL and keep the CLI running for its loopback callback. A remote machine's loopback callback must be reachable by the browser used for login. Do not replace the callback with an arbitrary public listener.
35
+
36
+ `logout` clears local credentials and attempts refresh-token revocation. Copied access JWTs can remain valid until expiry. The existing account page's global session revocation stops access across CLI, REST, MCP, and panel. Local logout does not claim to perform that global action.
37
+
38
+ ## Create a complete snapshot
39
+
40
+ Save this JSON as `snapshot.json`, replacing its content with the requested artifact.
41
+
42
+ ```json
43
+ {
44
+ "metadata": {
45
+ "title": "Project note",
46
+ "description": "A retained note",
47
+ "custom": { "source": "requested content" }
48
+ },
49
+ "content": {
50
+ "kind": "html",
51
+ "text": "<!doctype html><html lang=\"en\"><meta charset=\"utf-8\"><title>Project note</title><main><h1>Project note</h1><p>Retained content.</p></main></html>"
52
+ },
53
+ "files": [
54
+ {
55
+ "path": "notes.txt",
56
+ "mediaType": "text/plain",
57
+ "encoding": "utf8",
58
+ "data": "Retained attachment.\n"
59
+ }
60
+ ]
61
+ }
62
+ ```
63
+
64
+ `metadata.description` and `files` are required even when empty. Content kind is `html`, `markdown`, or `text`. Binary files use `encoding: "base64"` and canonical padded base64. Paths are unique normalized relative paths. Do not use empty, dot, parent, absolute, backslash, percent, or colon path segments. A file cannot also be another file's directory.
65
+
66
+ ```sh
67
+ artifacts create --snapshot snapshot.json
68
+ artifacts list --limit 25
69
+ artifacts read ARTIFACT_ID --out saved.json --quiet
70
+ ```
71
+
72
+ Keep the request ID printed for the mutation. Successful JSON goes to stdout; diagnostics and recovery instructions go to stderr. Exit zero indicates command success. A nonzero exit must be inspected before claiming completion.
73
+
74
+ For `read`, `--out FILE --quiet` saves the returned response without printing successful JSON. It requires a nonempty output path. It preserves the selected response mode, so use the default full response for snapshot verification. Errors still go to stderr and exit nonzero. Without `--quiet`, `read --out FILE` also prints the response to stdout.
75
+
76
+ Check installed help for `--quiet` support before running these examples. Older versions, including `0.1.0-beta.1`, can suppress stdout with `artifacts read ARTIFACT_ID --out saved.json > /dev/null`. This redirection preserves stderr and the command's exit status. Use the same fallback for the revision reads below.
77
+
78
+ ## Edit without losing retained data
79
+
80
+ For a title change, save `changes.json` with only the requested field.
81
+
82
+ ```json
83
+ { "metadata": { "title": "Reviewed project note" } }
84
+ ```
85
+
86
+ ```sh
87
+ artifacts edit ARTIFACT_ID --changes changes.json
88
+ artifacts read ARTIFACT_ID --out current.json --quiet
89
+ ```
90
+
91
+ For a complete replacement, read the current head, preserve untouched data in `next-snapshot.json`, and use that observed revision.
92
+
93
+ ```sh
94
+ artifacts update ARTIFACT_ID --snapshot next-snapshot.json --expected-revision REVISION_ID
95
+ ```
96
+
97
+ A complete command file can preserve a caller-owned request ID, snapshot, and expected revision. Use `artifacts create --command create.json`, `artifacts update --command update.json`, or `artifacts publish --command publish.json`. Do not add `response: "full"` to an existing command that omitted it. Optional response modes affect exact mutation identity.
98
+
99
+ Command files contain the command itself, without the CLI's retained-operation wrapper.
100
+
101
+ | Command | Required JSON fields |
102
+ | --- | --- |
103
+ | `create` | `requestId`, `snapshot` |
104
+ | `update` | `requestId`, `artifactId`, `expectedRevisionId`, `snapshot` |
105
+ | `publish` | `requestId`, `artifactId`, `revisionId`, `expectedPublicationVersion` |
106
+
107
+ `requestId` is a caller-chosen string of 8 to 128 characters. Create and update also accept optional `response` with value `full` or `compact`. This complete update example replaces a snapshot. Substitute the observed IDs and preserve all required content and attachments in its `snapshot`.
108
+
109
+ ```json
110
+ {
111
+ "requestId": "reviewed-update-001",
112
+ "artifactId": "OBSERVED_ARTIFACT_ID",
113
+ "expectedRevisionId": "OBSERVED_HEAD_REVISION_ID",
114
+ "snapshot": {
115
+ "metadata": { "title": "Reviewed project note", "description": "A retained note" },
116
+ "content": { "kind": "text", "text": "Reviewed content." },
117
+ "files": []
118
+ }
119
+ }
120
+ ```
121
+
122
+ Create uses the same `requestId` and complete `snapshot` fields without artifact or expected-revision IDs. A complete publication command has this shape. Replace zero with the observed publication version when already published.
123
+
124
+ ```json
125
+ {
126
+ "requestId": "reviewed-publish-001",
127
+ "artifactId": "OBSERVED_ARTIFACT_ID",
128
+ "revisionId": "SELECTED_REVISION_ID",
129
+ "expectedPublicationVersion": 0
130
+ }
131
+ ```
132
+
133
+ ## Inspect history and publish
134
+
135
+ ```sh
136
+ artifacts history ARTIFACT_ID --summary
137
+ artifacts read ARTIFACT_ID --revision REVISION_ID --out historical.json --quiet
138
+ artifacts publish ARTIFACT_ID --revision REVISION_ID --expected-version 0
139
+ ```
140
+
141
+ The publication example applies only to an unpublished artifact. For an existing publication, replace zero with the `publication.version` observed in a current read. After publishing, read again and compare current publication with the returned receipt.
142
+
143
+ History returns `nextBeforeSequence`; pass it as `--before-sequence N` to continue. List returns `nextCursor`; pass it as `--cursor CURSOR`. Do not substitute an offset or assume that one page contains everything.
144
+
145
+ ## Retry and export
146
+
147
+ ```sh
148
+ artifacts retry REQUEST_ID
149
+ artifacts export ARTIFACT_ID --revision REVISION_ID --out artifact.zip
150
+ ```
151
+
152
+ `retry` loads the saved complete operation. It does not prepare a new edit or change expected versions. Keep the record after an uncertain result. The server checks current authority before replaying an original receipt.
153
+
154
+ `read --out` and `export --out` create files exclusively. Use a new destination if one already exists. Do not delete an existing output merely to rerun an example.
155
+
156
+ The archive contains `artifact.json`, `content.html`, `content.md`, or `content.txt`, and attachments under `files/`. Inspect the manifest's artifact and revision IDs, content, and required attachment bytes. Exporting the same retained revision through REST, MCP, or the panel must yield identical ZIP bytes.
@@ -0,0 +1,76 @@
1
+ ---
2
+ name: artifacts-design
3
+ description: Design the HTML document of a retained Artifact with embedded fonts, light and dark Catppuccin tokens, purposeful layout, and rendered checks. Use before writing or restyling HTML for the artifacts or artifacts-cli skills.
4
+ ---
5
+
6
+ # Design HTML artifacts
7
+
8
+ The calling skill owns the snapshot, size limit, and save workflow. This skill owns how the document looks and behaves. Follow the user's visual direction first. When revising content only, keep an existing artifact's established style. When the user asks to redesign or improve the look, start from these defaults.
9
+
10
+ The document renders in a sandbox that blocks every network request. Fonts, images, and icons load only as `data:` URIs. External stylesheets, Google Fonts links, and CDN scripts silently fail. Inline all CSS and JavaScript.
11
+
12
+ ## Start from the starter
13
+
14
+ Copy the `<style>` block of [the starter](templates/starter.html) into the new document. It defines the color, font, and spacing tokens and the shared primitives: eyebrow and label, lede, summary strip, pills, expandable rows, panel, note, table, filter bar, and footer. Delete primitives the page does not use. Derive every new color and type decision from its tokens.
15
+
16
+ The starter supplies a vocabulary, not a layout. Compose the body for the reader's task:
17
+
18
+ | Purpose | Composition |
19
+ | --- | --- |
20
+ | Report or guide | A conclusion first, a reading column near 68 characters, and evidence beside the claim it supports. |
21
+ | Inventory, ledger, or status | A summary strip, a filter bar with a live count, then one `.row` per record. Its summary shows the identifier, title, and state; its detail holds everything else. Set `--cols` on `.rows` to match the summary cells. Rows stack to one column below 720 px. |
22
+ | Compare options | Aligned criteria in a table, consistent scales, and the tradeoff stated in words. |
23
+ | Explore data | A dominant chart or table sized to carry the page, with filters beside it. |
24
+ | Calculate or simulate | Labeled inputs beside the result they change, with units and a realistic starting example. |
25
+ | Explain a concept | A sequence of large diagrams with short captions; read [visual explanations](references/visual-explanations.md). |
26
+
27
+ Open in a complete state with the user's real data. Never ship an empty shell or placeholder text.
28
+
29
+ ## Typography
30
+
31
+ Use the bundled faces through the starter's tokens:
32
+
33
+ - `--f-display` is Bricolage Grotesque. Use it for `h1` to `h3` and large figures only.
34
+ - `--f-body` is Public Sans for running text and controls.
35
+ - `--f-mono` is JetBrains Mono for code, identifiers, table headers, eyebrows, and labels.
36
+ - Newsreader is an optional reading face. For a long essay or editorial guide, set `--f-body` to `"Newsreader",Charter,Georgia,serif` and keep Public Sans for controls.
37
+
38
+ Keep the starter's scale: `h1` at `clamp(28px,4vw,40px)`, body at 15 to 16 px with a 1.55 line height, uppercase mono labels at 11 to 12 px with `.06em` tracking, and `text-wrap: balance` on headings. Use `font-variant-numeric: tabular-nums` wherever digits align.
39
+
40
+ After the HTML file is complete, embed the fonts it names:
41
+
42
+ ```sh
43
+ node <skill-directory>/scripts/embed-fonts.mjs page.html
44
+ ```
45
+
46
+ For the CLI, `<skill-directory>` is the output of `artifacts skills path artifacts-design`. The script rewrites the file in place and is safe to rerun after edits. It embeds only the families the page names and adds italic faces only for `font-style: italic`, `<em>`, `<i>`, or `<cite>`. It refuses to write a page above 1 MiB. Three families add about 135 KB. Newsreader adds about 80 to 165 KB. Do not name another family unless you embed its `woff2` yourself, because an unembedded face silently falls back. Without Node, keep the fallback stacks and report that the fonts were not embedded.
47
+
48
+ ## Color
49
+
50
+ The starter follows the viewer's system theme. Light uses Catppuccin Latte and dark uses Mocha, with Blue as the only accent. [Catppuccin roles](references/catppuccin.md) lists every token and the extra chart colors.
51
+
52
+ - Define each color once as a token on bare `:root` and redefine only the tokens in both dark blocks. Never write a literal color in a component rule.
53
+ - Keep `body` on `var(--page)`. Use `--surface` for the objects you set apart, and `--sunken` for table headers and hover.
54
+ - Show state with soft pills: a `*-soft` background and `*-ink` text. Do not fill badges with saturated pastels. Map every state to neutral, accent, ok, warn, or bad. Do not add a hue for an extra state; distinguish it with its label.
55
+ - Use the accent for links, focus, the selected state, and one primary action. Status colors carry meaning only.
56
+ - When the user names a single dark look, set the Mocha values on bare `:root`, keep `color-scheme: dark`, and drop the media blocks.
57
+
58
+ ## Layout and components
59
+
60
+ - Center one `.wrap` column at `--width` with `max(16px, env(safe-area-inset-*))` side gutters. Space siblings with grid or flex `gap`.
61
+ - Use borders and fills by role. A summary strip, a table, and one panel can each earn a surface. Running text and headings sit on the page.
62
+ - Mark structure that is true: an eyebrow names the source or scope, a label names a field, and numbering appears only for real sequences.
63
+ - Encode attention in form. A row that needs action gets a pill or a muted closed state, not only a different word.
64
+ - Put wide code and diagrams in their own `overflow-x: auto` container. Use a `<table>` only for short records that stay readable when scrolled; use expandable rows for records with long text. The page itself never scrolls sideways at 375 px.
65
+ - Draw diagrams in inline SVG with token colors and labels inside the view box. For icons, use inline Tabler outline SVGs with `currentColor`.
66
+ - Respect `prefers-reduced-motion`. Use motion only to explain a change of state.
67
+
68
+ ## Copy
69
+
70
+ Give the `<title>` a specific name of two to four words, or the name the user already uses for the document. Write labels from the reader's side, in the user's language. State units next to numbers. Put the source and date of the data in the footer.
71
+
72
+ ## Check the rendered page
73
+
74
+ Run the [interface checks](references/interface-checks.md) when browser tools are available. Render at 375 px and 1280 px in both light and dark. Confirm that the fonts loaded, nothing overflows, and every control changes something visible. Fix what you see once, then save. Report checks you could not run.
75
+
76
+ The license notices for bundled fonts and adapted guidance are in [third-party notices](THIRD-PARTY-NOTICES.md).
@@ -0,0 +1,124 @@
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
+ ## Bundled fonts
123
+
124
+ 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.