@telepath-computer/television 0.1.98 → 0.1.99

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.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: television
3
- description: Mental model, when to use Television vs chat, and how Television's bundled skills are split. Read for screen and CLI work.
3
+ description: Mental model, when to use Television vs chat, and how Television's bundled skills fit together. Read for screen, lifecycle, and CLI work.
4
4
  ---
5
5
 
6
6
 
@@ -44,23 +44,22 @@ That separation matters:
44
44
 
45
45
  ### Artifact kinds
46
46
 
47
- Three operational categories:
47
+ Three artifact kinds:
48
48
 
49
- - **internal artifact** — Television-managed bundle content. Use when Television should own the result as a durable bundle that later agents can inspect and maintain.
50
- - **external artifact** — pointer to an existing absolute file on disk. Use when a real file already exists and Television should display it without taking ownership of that file.
51
- - **URL artifact** — pointer to an external `http(s)://` page. Use when the right answer is to show a live web page rather than Television-owned content or a local file.
49
+ - **markdown** — pointer to an existing absolute markdown file on disk
50
+ - **web-bundle** — Television-managed HTML bundle
51
+ - **url** — pointer to an external `http(s)://` page
52
52
 
53
53
  ### Lifecycle states
54
54
 
55
- - **pending** — internal create/edit work has been staged but not committed yet
56
- - **committed** — the artifact is live
57
- - **trash** — live metadata and any committed internal bundle have been moved out of the active tree
55
+ - **pending** — staged work not yet committed
56
+ - **committed** — live and visible
57
+ - **trash** — moved out of the live tree
58
58
 
59
59
  Important consequences:
60
60
 
61
- - only internal artifacts use pending create/edit/commit/abandon
62
- - external file artifacts are committed immediately
63
- - URL artifacts are committed immediately
61
+ - only **web-bundle** artifacts can be pending
62
+ - **markdown** and **url** artifacts are committed immediately
64
63
  - there is no restore-from-trash workflow in the current scope
65
64
 
66
65
  ### User-facing framing
@@ -81,8 +80,8 @@ Those questions interact, but they are not the same question.
81
80
  Television guidance is split across bundled skills.
82
81
 
83
82
  - Use this skill for screens, focus, artifact lifecycle decisions, and the `tv` CLI.
84
- - For artifact authoring, install or inspect the bundled skills with `tv skills install` or `tv skills show`.
85
- - Then let the matching `artifact-*` skill guide the output. Artifact skills can read `house-style.md` and any kind-specific assets from their own skill folder on demand.
83
+ - Install the bundled Television skills into the agent harness skills folder with `tv skills install <path>` (for example `~/.openclaw/skills`, `~/.hermes/skills`, or `~/.agents/skills`) or use `tv skills install -i` before artifact authoring work.
84
+ - For kind-specific HTML work, load the matching skill such as `television-calendar` or `television-table`.
86
85
 
87
86
  `markdown editor UI recovery` remains out of scope for the current Television workflow.
88
87
 
@@ -95,45 +94,34 @@ Use this document when you need to reason about what the `tv` CLI can do, which
95
94
 
96
95
  The `television` skill is the primary guidance surface for Television screens, focus, and lifecycle work.
97
96
 
98
- If the bundled skills are not installed yet, use:
97
+ Install bundled Television skills with either:
99
98
 
100
99
  ```bash
101
- tv skills show
100
+ tv skills install ~/.openclaw/skills
101
+ tv skills install ~/.hermes/skills
102
+ tv skills install ~/.agents/skills
103
+ tv skills install -i
102
104
  ```
103
105
 
104
- That lists each bundled skill with its description and absolute path.
105
-
106
- To inspect one bundled skill directly:
107
-
108
- ```bash
109
- tv skills show television
110
- tv skills show artifact-calendar
111
- ```
112
-
113
- For artifact authoring, install all bundled skills with `tv skills install` or inspect the relevant `artifact-*` skill directly. `tv help` is normal CLI help plus routing pointers.
106
+ `tv help` is normal CLI help plus routing pointers.
114
107
 
115
108
  ## Command surface
116
109
 
117
- The CLI is the source of truth for command syntax and per-command behavior. Run:
110
+ Run:
118
111
 
119
112
  ```bash
120
113
  tv help
121
- ```
122
-
123
- for the full command list. For details, flags, and behavioral nuance for a single command, run:
124
-
125
- ```bash
126
114
  tv help <command>
127
115
  ```
128
116
 
129
- The help text is intentionally written to surface non-obvious semantics — idempotency, cascading effects, transient vs persistent state changes, JSON vs plain-text output, and so on. Read it before choosing a command, especially when two commands look superficially similar (detach vs delete, focus-screen vs focus-artifact, attach vs create).
117
+ `tv help <command>` is the source of truth for per-command semantics that are not obvious from the name — idempotency, cascading effects, JSON vs plain-text output, and distinctions between superficially similar commands (detach vs delete, focus-screen vs focus-artifact, attach vs create). Read it before choosing a command when you are unsure.
130
118
 
131
119
  Commands group into four intents:
132
120
 
133
121
  - **Screen and display commands** — create, inspect, remove, or switch screens, or change the active display theme (`create-screen`, `list-screens`, `get-screen`, `remove-screen`, `focus-screen`, `focus-status`, `set-theme`).
134
- - **Artifact creation and lifecycle commands** — create or maintain artifact content (`create-internal-artifact`, `edit-internal-artifact`, `commit-pending-artifact`, `abandon-pending-artifact`, `create-external-artifact`, `create-url-artifact`).
122
+ - **Artifact creation and lifecycle commands** — create or maintain artifact content (`create-web-bundle-artifact`, `edit-artifact`, `commit-artifact`, `abandon-artifact`, `create-markdown-artifact`, `create-url-artifact`).
135
123
  - **Artifact membership and removal commands** — place, unplace, inspect, retitle, or remove an existing artifact (`attach-artifact`, `detach-artifact`, `delete-artifact`, `get-artifact`, `list-artifacts`, `update-artifact`, `focus-artifact`).
136
- - **Server and environment commands** — operate on the Television server itself (`serve`, `status`, `stop`, `storage-path`).
124
+ - **Server and environment commands** — operate on the Television server itself (`serve`, `status`, `stop`, `storage-path`, `skills install`).
137
125
 
138
126
  When the CLI rejects a command, follow the directive it prints rather than guessing flags.
139
127
 
@@ -160,7 +148,7 @@ Important consequence: creating or attaching something does not by itself answer
160
148
  Create and attach commands require an explicit focus decision.
161
149
 
162
150
  - `tv create-screen` requires exactly one of `--focus-screen` or `--no-focus`
163
- - `tv create-internal-artifact`, `tv create-external-artifact`, `tv create-url-artifact`, and `tv attach-artifact` require exactly one of `--focus-artifact` or `--no-focus`
151
+ - `tv create-web-bundle-artifact`, `tv create-markdown-artifact`, `tv create-url-artifact`, and `tv attach-artifact` require exactly one of `--focus-artifact` or `--no-focus`
164
152
 
165
153
  If you omit that decision, the CLI rejects the command. Dedicated `focus-screen` and `focus-artifact` commands can also move attention later as separate steps.
166
154
 
@@ -174,20 +162,20 @@ Rules of thumb:
174
162
  - **`--no-focus`** when the user is likely to want the result available without breaking their current flow, or when the work should run in the background
175
163
  - **direct `focus-screen` / `focus-artifact` commands** when placement and attention movement should happen as separate steps
176
164
 
177
- If you used `--no-focus`, explicitly tell the user what you did and where it went. Otherwise the Television display may not visibly change and the user may not know whether anything happened. Same applies if you placed something on a non-current screen without focusing it: name the screen. If you did move focus, say so, because that affects what the user will see next.
165
+ When your action would not be visually obvious to the user you used `--no-focus`, you placed something on a non-current screen, or you moved focus tell them what you did, name the screen, and say what they should see. Otherwise the Television display may not change in a way they can interpret.
178
166
 
179
167
  ## Listening for focus intent in the user's language
180
168
 
181
169
  The user's phrasing is a strong cue — not a deterministic rule, but a real signal worth listening for.
182
170
 
183
- Phrases that usually indicate the user wants attention moved (use a focus flag, or a direct `focus-screen` / `focus-artifact` command):
171
+ Phrases that usually indicate the user wants attention moved:
184
172
 
185
173
  - "show me", "show me that", "let me see it", "let me review it"
186
174
  - "switch to", "change to", "go to", "take me there", "open it"
187
175
  - "put it on screen", "put it on my screen", "bring it up"
188
176
  - references to the **active**, **current**, **showing**, or **visible** screen or artifact
189
177
 
190
- Phrases that usually indicate the user wants the work to happen without disturbing their current view (use `--no-focus`):
178
+ Phrases that usually indicate the user wants the work to happen without disturbing their current view:
191
179
 
192
180
  - "in the background", "while I'm doing X", "while I work on Y go and do Z"
193
181
  - "set this up", "prepare it", "wire it in", "get it ready"
@@ -223,7 +211,7 @@ Reach for `tv create-screen` when:
223
211
 
224
212
  - the request is meaningfully separate from the current screen's purpose
225
213
  - the result should become its own durable workspace the user can return to
226
- - mixing it into the current screen would make the user's mental model worse (e.g., a research dossier vs a live dashboard, or two unrelated topics that should not share a strip)
214
+ - mixing it into the current screen would make the user's mental model worse
227
215
 
228
216
  Default to placing things on an existing screen unless one of those conditions is true. Spawning a new screen for every request fragments the user's workspace; spawning none ever forces unrelated content together.
229
217
 
@@ -232,22 +220,38 @@ Default to placing things on an existing screen unless one of those conditions i
232
220
 
233
221
  Read this document for Television artifact lifecycle work — creating, updating, committing, abandoning, attaching, detaching, deleting.
234
222
 
235
- The earlier sections in this skill cover the artifact-vs-chat decision, the Television mental model, and the CLI focus model. This section covers everything else: which type to use, the staged lifecycle for internal artifacts, what each bundle file contains, validation rules, the quality bar, and the prescriptive recipes.
223
+ If you need bundled Television authoring skills installed first, copy them into the agent harness skills folder with `tv skills install <path>` (for example `~/.openclaw/skills`, `~/.hermes/skills`, or `~/.agents/skills`) or use `tv skills install -i`.
236
224
 
237
- If you are authoring an HTML artifact, use the matching `artifact-*` skill and read its `house-style.md` guidance when directed.
225
+ If you are authoring a specialized HTML artifact, read the matching kind skill after this one — for example `television-calendar` or `television-table`.
238
226
 
239
- ## Markdown or HTML
227
+ ## Choosing the artifact kind
240
228
 
241
- Once you have decided to make an artifact, choose the type:
229
+ Television has three artifact kinds. Pick the one that best fits the result:
242
230
 
243
- - **markdown** when the result is primarily textual and benefits from simple structured reading. Headings, lists, code blocks, links. Most research summaries, comparisons, and write-ups.
244
- - **HTML** when richer layout, stronger visual hierarchy, or more custom presentation will make the result substantially better. Dashboards, multi-column layouts, custom-styled cards, simple interactive widgets, anything where typographic prose is not the dominant mode.
231
+ - **markdown** the default. Create or use a markdown file in a sensible filesystem location, then point a markdown artifact at it. Television displays it; the file itself is the user's. This is right for almost all textual results: notes, reports, research summaries, comparisons, write-ups.
232
+ - **web-bundle** — a Television-managed HTML bundle. Reach for this when the additional visual structure (rich layout, hierarchy, styled cards, custom widgets, dashboards) is doing real communicative work that markdown cannot. More work to author and maintain than markdown; only pays off when the structure earns its keep.
233
+ - **url** — pointer to a live page (a remote site or a local web application). Use when the right answer is to embed an existing page rather than author Television-owned content.
245
234
 
246
- Default to markdown. HTML is more work to author, more work to maintain, and only pays off when the visual structure is doing real communicative work.
235
+ If you are unsure between markdown and web-bundle, default to markdown. A markdown artifact can be rewritten as a web bundle later if the structure proves insufficient.
247
236
 
248
- ## Authoring quality
237
+ ## Where the markdown file goes
238
+
239
+ When you create a markdown artifact in response to a user request, you have to decide where the underlying file lives on disk. This decision is user-dependent — there is no Television-defined location, and no formula. The right path depends on the user's workspace conventions.
240
+
241
+ Ask yourself:
242
+
243
+ - If the user asked you to take a note, where would you put it?
244
+ - If the user asked you to do web research and create a report, where would you put it?
245
+
246
+ The point of those questions isn't to produce a single canonical answer. It's to direct you at the *class* of location (the user's notes folder, an agent workspace, the project root, a scratch directory) that fits the request and the user's working context.
247
+
248
+ If you cannot infer a sensible location from context, ask the user rather than guess. A misplaced file is worse than a brief clarifying question.
249
+
250
+ Consider including Television-indicating cues in the file name or path — a `television/` subdirectory, a filename marker, or similar — so the user and future agents can recognize that a given file was created by and for use in Television. A sensible default when no explicit user-supplied path is provided.
251
+
252
+ Always tell the user where you put it. If the user can't see where the file landed, they may not know anything happened, or may not be able to find it later.
249
253
 
250
- This applies to every artifact you author or maintain — internal, external, or URL.
254
+ ## Authoring quality
251
255
 
252
256
  Build artifacts that are durable, truthful, and maintainable by later agents.
253
257
 
@@ -258,8 +262,7 @@ Required standards:
258
262
  - do not silently truncate a dataset and pretend it is comprehensive
259
263
  - prefer truth over completeness when those goals conflict
260
264
  - make limitations, sampling, gaps, and freshness visible when they matter
261
- - keep the rendering aligned with the reasoning captured in the bundle files (for internal artifacts)
262
- - keep the artifact maintainable by a future agent reading only the bundle (for internal artifacts)
265
+ - avoid unnecessary layout or styling churn during simple refreshes
263
266
 
264
267
  Anti-patterns to avoid:
265
268
 
@@ -267,245 +270,259 @@ Anti-patterns to avoid:
267
270
  - fake completeness — padding to look thorough
268
271
  - brittle one-off hacks that a later agent cannot reproduce
269
272
  - hidden dependencies that are not documented in the bundle
270
- - unnecessary layout or styling churn during a simple data refresh
271
273
 
272
274
  ## Before creating artifacts
273
275
 
274
- Before starting artifact-creation tool work, briefly tell the user what you are about to make. Artifact creation can take noticeable time, and the user may not otherwise be able to tell what is happening during the agent loop.
275
-
276
- Also work expediently. Do not skip lifecycle or validation steps, but avoid unnecessary extra steps when building the artifact. There is real user wait time while artifact creation is in progress.
276
+ Before starting artifact creation, briefly tell the user what you are about to make. Artifact creation can be time-consuming; the user should be kept informed. Think about how to work expediently and avoid unnecessary extra steps without compromising the outcome.
277
277
 
278
278
  ## In-flight narration style
279
279
 
280
- While a multi-step artifact workflow is running, narrate concisely so the user knows you are still working. Frame updates in their world and goals, not in CLI mechanics or workflow jargon.
280
+ While a multi-step artifact workflow is running, narrate concisely so the user knows you are still working.
281
281
 
282
282
  Required style:
283
283
 
284
284
  - verbalize key actions and decisions as they happen
285
285
  - keep updates short — a sentence per beat, not a paragraph
286
286
  - prefer the user's framing over Television's internal machinery
287
- - do not write reports, retrospective summaries, or chatty explanations while work is in progress
288
- - do not use bullet lists unless the user explicitly asks for one
289
287
  - optimize for speed and token efficiency
290
288
 
291
289
  Good examples:
292
290
 
293
291
  - "Starting the artifact now."
294
292
  - "Reviewing the draft and source material."
295
- - "Updating the HTML and moving through the artifact creation flow."
296
- - "The artifact did not pass validation; fixing the draft notes and retrying."
293
+ - "Updating the HTML and moving through the artifact flow."
297
294
  - "Finalizing the artifact now."
298
295
  - "Done."
299
296
 
300
297
  Avoid:
301
298
 
302
- - multi-paragraph progress reports
303
- - long retrospective narration during execution
304
- - verbose bullet lists for routine workflow steps
305
- - workflow jargon ("calling commit-pending-artifact", "validator rejected memory.md") unless the user is debugging Television itself
306
-
307
- ## Internal bundle structure
299
+ - multi-paragraph progress reports or long retrospective narration during execution
300
+ - verbose bullet lists for routine workflow steps (use bullets only when the user explicitly asks)
301
+ - workflow jargon ("calling commit-artifact", "promoting the pending bundle") unless the user is debugging Television itself
308
302
 
309
- Internal artifacts are Television-managed bundles. Every internal artifact bundle contains:
303
+ ## Web-bundle workflow
310
304
 
311
- - `artifact.md`
312
- - `data.json`
313
- - `memory.md`
314
- - `public/index.md` or `public/index.html`
305
+ ### Pending is the default
315
306
 
316
- Fresh pending bundles are intentionally minimal. Do not treat the scaffold as meaningfully authored content — the structure below describes what each file must contain before commit.
307
+ The recommended workflow for new Television-owned web bundles is the pending workflow:
317
308
 
318
- External artifacts and URL artifacts have no bundle and no pending lifecycle.
319
-
320
- ### `artifact.md`
321
-
322
- `artifact.md` is the contract for the artifact. It explains what the artifact is for, what material it is based on, how it should render, and how later agents should maintain it.
323
-
324
- Before commit, `artifact.md` must be non-empty and contain all of these exact headings:
325
-
326
- ```md
327
- ## User intent
328
- ## Purpose
329
- ## Data shape
330
- ## Data sources
331
- ## Rendering
332
- ## Update workflow
333
- ## Non-goals
309
+ ```bash
310
+ tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --focus-artifact
334
311
  ```
335
312
 
336
- Section guidance:
313
+ This creates a pending bundle under `.pending/<id>/`. Nothing is visible until commit.
337
314
 
338
- - `## User intent` — faithfully preserve what the user actually wants, including requests, constraints, corrections, complaints, and feedback when those matter. Use direct quotes when helpful.
339
- - `## Purpose` — what the artifact is trying to achieve.
340
- - `## Data shape` — the conceptual structure you used while authoring. For markdown artifacts this is often just `{}`.
341
- - `## Data sources` — where the underlying facts came from and how they were obtained.
342
- - `## Rendering` — how the public entry file should present the result.
343
- - `## Update workflow` — how a future agent should refresh or modify it correctly.
344
- - `## Non-goals` — important exclusions, especially when it would be easy to overbuild (e.g., "this is a static report, not a live dashboard").
315
+ Inside the pending bundle you write:
345
316
 
346
- ### `data.json`
317
+ - `public/` — the public render directory; the entry file is `public/index.html`, and additional assets (CSS, images, fonts, helper JS) may live under `public/`. Keep asset paths relative to the bundle so they resolve under `<id>/public/` when served
318
+ - `artifact.md` — bundle documentation for future agents (see below)
319
+ - `memory.md` — maintenance log for future agents (see below)
320
+ - a data-oriented supporting file when the artifact has non-trivial underlying data (see "Data before presentation")
347
321
 
348
- `data.json` is a thinking artifact, not a runtime payload.
322
+ ### Data before presentation
349
323
 
350
- Use it to clarify authoring structure when that helps you think, not to create an application state layer.
324
+ Before authoring the final HTML, think through the underlying data in a pure-data way.
351
325
 
352
- Hard rules:
326
+ Ask yourself:
353
327
 
354
- - do not treat `data.json` as live runtime state
355
- - do not build HTML/JS that depends on `data.json` as an application data source
356
- - do not turn Television artifacts into runtime data-backed apps through `data.json`
357
- - artifacts are static markdown or static HTML documents; HTML artifacts may include presentation-oriented JavaScript and assets under `public/`, but JS must not be driven by `data.json` as application state
328
+ - what facts exist?
329
+ - what structure do they have?
330
+ - what is missing?
331
+ - what separation between data and presentation would help the next agent?
358
332
 
359
- For markdown artifacts, prefer to leave `data.json` as exactly:
333
+ Capture this reasoning in a supporting document inside the bundle — pick a file name and format that fits the data (a markdown table, a JSON snapshot, a YAML manifest, whatever expresses the data cleanly). Author this data-oriented asset **before** the presentation assets. The staged workflow (data first, then presentation) keeps the thinking discipline visible and gives the next agent a clear handle on what the rendering is built from.
360
334
 
361
- ```json
362
- {}
363
- ```
364
-
365
- For HTML artifacts, use `data.json` only when it materially helps your authoring process.
366
-
367
- Validation requires that `data.json` exist and contain valid JSON.
368
-
369
- ### `memory.md`
370
-
371
- `memory.md` is for maintenance-oriented notes to future agents.
335
+ ### `artifact.md`
372
336
 
373
- Record decisions, limitations, source-retrieval notes, problems encountered, what changed, and anything that should be watched during future edits.
337
+ `artifact.md` is the bundle's self-documentation for the next agent. Write it so that an agent reading only this file can pick up the artifact and continue work on it.
374
338
 
375
- Required validation anchors:
339
+ Structure it with these sections:
376
340
 
377
- - `memory.md` must contain `## Activity Log`
378
- - it must contain at least one UTC timestamp in exact `YYYY-MM-DDTHH:MM:SSZ` format
379
- - at least one timestamp must be fresh enough for commit validation (recent enough to prove this commit is current)
341
+ - **User intent** — what the user actually asked for, in their language. Use direct quotes where helpful, close paraphrase where clearer. Write this section *first*, before any other authoring work: it anchors the artifact in the user's actual ask and keeps you from retrofitting intent from memory after the fact.
342
+ - **Purpose** what the artifact is for and what success looks like.
343
+ - **Data sources** where the underlying facts came from and how they were obtained.
344
+ - **Rendering** — how `public/index.html` should present the result, and why this presentation fits the data.
345
+ - **Update workflow** — how a future agent should refresh or modify the artifact correctly.
346
+ - **Non-goals** — important exclusions, especially when it would be easy to overbuild (e.g., "this is a static report, not a live dashboard").
380
347
 
381
- ### Public entry file
348
+ When the user's ask changes during a later edit, **revise** the User intent section to reflect what they want now — preserve the new language as direct quotes or close paraphrases. Old intent that no longer reflects the current ask should be revised, not just appended to. The goal is a faithful record of the *current* request, not a transcript of the conversation history.
382
349
 
383
- This is what Television actually renders.
350
+ ### `memory.md`
384
351
 
385
- - markdown artifacts use `public/index.md`
386
- - HTML artifacts use `public/index.html`
387
- - the entry file must match the artifact type
388
- - the entry file must be non-empty before commit
389
- - HTML artifacts may include additional public assets under `public/`; keep paths relative
352
+ `memory.md` is a maintenance log addressed to the next agent who will edit this artifact.
390
353
 
391
- For HTML artifacts, also use the matching `artifact-*` skill and read its
392
- `house-style.md` guidance.
354
+ Record:
393
355
 
394
- ## Workflows
356
+ - decisions made during authoring and their reasons
357
+ - limitations of the source material or rendering
358
+ - problems encountered and how they were resolved
359
+ - what changed in each edit pass
360
+ - anything a future agent should watch for
395
361
 
396
- These recipes are prescriptive on purpose. The lifecycle steps and their order matter — `commit-pending-artifact` will refuse a bundle that has not satisfied the validation anchors above.
362
+ A simple chronological structure works. When you commit a new edit, append an entry summarizing what changed and why.
397
363
 
398
- ### Create a new internal artifact
364
+ ### Create a new web bundle
399
365
 
400
- 1. Confirm internal is the right kind for this result (the result should be Television-owned and maintainable by future agents).
401
- 2. Tell the user what you are about to make before starting tool work.
402
- 3. Stage the pending bundle:
366
+ 1. Tell the user what you are about to make.
367
+ 2. Create the pending bundle:
403
368
 
404
369
  ```bash
405
- tv create-internal-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --focus-artifact
370
+ tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --focus-artifact
406
371
  ```
407
372
 
408
- Or, for HTML:
373
+ 3. Inside the pending bundle, write `artifact.md` — start with **User intent** before any other authoring work.
374
+ 4. Think through the underlying data and author the data-oriented supporting file (see "Data before presentation").
375
+ 5. Write `memory.md` with an initial entry describing this create pass.
376
+ 6. Author the presentation under `public/` — `public/index.html` plus any additional assets you need.
377
+ 7. Commit:
409
378
 
410
379
  ```bash
411
- tv create-internal-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --no-focus
380
+ tv commit-artifact --id "<artifact-id>"
412
381
  ```
413
382
 
414
- `--screen` is required so the artifact has immediate screen membership. `--focus-artifact` or `--no-focus` is required so focus is an explicit choice. (See the CLI capabilities section earlier in this skill for how to make that choice.)
383
+ Commit is the pending committed promotion.
415
384
 
416
- 4. Read the returned pending path. Edit files there.
417
- 5. Write `## User intent` in `artifact.md` **first**, before authoring anything else. Capture the user's language faithfully — direct quotes when helpful, close paraphrase when clearer. The rest of the bundle should serve that intent, so writing it first anchors the work and keeps you from retrofitting intent from memory after the fact.
418
- 6. Fill out the remaining required `artifact.md` headings: `## Purpose`, `## Data shape`, `## Data sources`, `## Rendering`, `## Update workflow`, `## Non-goals`.
419
- 7. Use `data.json` only as an authoring aid — not as runtime state. For markdown artifacts, leave it as `{}` unless there is a strong authoring reason not to.
420
- 8. Render `public/index.md` or `public/index.html`. The entry file must match the artifact type and must be non-empty.
421
- 9. Append a current UTC-timestamped entry under `## Activity Log` in `memory.md` (format: `YYYY-MM-DDTHH:MM:SSZ`). At least one timestamp must be fresh enough to satisfy commit validation.
422
- 10. Commit:
385
+ ### Edit a committed web bundle
423
386
 
424
- ```bash
425
- tv commit-pending-artifact --id "<artifact-id>"
426
- ```
387
+ Use:
427
388
 
428
- If the validator rejects the commit, read the directive, fix the bundle, and retry. Do not bypass validation by editing committed state directly.
389
+ ```bash
390
+ tv edit-artifact --id "<artifact-id>"
391
+ ```
429
392
 
430
- ### Update an internal artifact with fresh data
393
+ This copies the committed bundle into `.pending/<id>/`. While the artifact is pending-edit, the viewer keeps showing the last committed content unchanged.
431
394
 
432
- 1. Stage the edit:
395
+ Before changing anything, read the existing `artifact.md` and `memory.md`. They tell you what the artifact is for, what shape it expects, and what prior agents decided.
433
396
 
434
- ```bash
435
- tv edit-internal-artifact --id "<artifact-id>"
436
- ```
397
+ When the user's ask has changed, revise **User intent** in `artifact.md` (and **Non-goals** if anything has been ruled out). Update the data-oriented supporting file only if the underlying data changed. Make the minimum rendering changes the new ask requires. Append a `memory.md` entry describing what changed and why.
437
398
 
438
- 2. Read `artifact.md`, `data.json`, and `memory.md` before changing anything. They tell you what the artifact is, what shape it expects, and what prior agents decided.
439
- 3. Refresh the underlying facts or source material.
440
- 4. Update `data.json` only if it improves the authoring model. For markdown artifacts, prefer to keep it as `{}`.
441
- 5. Make the minimum rendering changes needed to keep the artifact correct. Avoid layout or styling churn during a data-only refresh — that breaks the user's mental model of "same artifact, fresher data."
442
- 6. Append a current UTC-timestamped entry to `## Activity Log` in `memory.md` describing what changed.
443
- 7. Commit:
399
+ When you are ready:
444
400
 
445
- ```bash
446
- tv commit-pending-artifact --id "<artifact-id>"
447
- ```
401
+ ```bash
402
+ tv commit-artifact --id "<artifact-id>"
403
+ ```
448
404
 
449
- ### Modify an internal artifact from user feedback
405
+ If you want to discard the staged edit instead:
450
406
 
451
- 1. Stage the edit (`tv edit-internal-artifact --id "<artifact-id>"`).
452
- 2. Read `artifact.md`, `data.json`, and `memory.md`.
453
- 3. Update `## User intent` in `artifact.md` so it remains a faithful record of what the user actually wants now. Preserve the user's new language as direct quotes or close paraphrases. Old intent that no longer reflects the current ask should be revised, not just appended to.
454
- 4. Update `## Non-goals` if the user has ruled something out.
455
- 5. Adjust `data.json` only if the authoring model changed.
456
- 6. Adjust `public/index.md` or `public/index.html` as narrowly as the change requires.
457
- 7. Append an `## Activity Log` entry capturing the request, the decision, and the resulting change with a current timestamp.
458
- 8. Commit.
407
+ ```bash
408
+ tv abandon-artifact --id "<artifact-id>"
409
+ ```
459
410
 
460
- ### Abandon pending work
411
+ ### Skip pending
461
412
 
462
- If staged work should be discarded rather than committed:
413
+ If you do not want pending states for this artifact, create the committed bundle immediately:
463
414
 
464
415
  ```bash
465
- tv abandon-pending-artifact --id "<artifact-id>"
416
+ tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --skip-pending --no-focus
466
417
  ```
467
418
 
468
- For a pending create, the artifact never becomes live. For a pending edit, the previously committed version is kept unchanged.
419
+ After that, write `artifact.md`, the data asset, `memory.md`, and the presentation under `public/` directly in the committed bundle. The content discipline is the same as the pending workflow; only the staging step is skipped.
469
420
 
470
- ### Create an external artifact
421
+ ## Markdown artifacts
471
422
 
472
- External artifacts point at a file that already exists on disk. Television displays it and watches for changes, but does not own it — there is no bundle and no pending lifecycle.
423
+ Markdown artifacts point at an existing absolute markdown file on disk. They are committed immediately and do not use pending.
473
424
 
474
425
  ```bash
475
- tv create-external-artifact --screen "<screen-id>" --type text/markdown --title "Artifact title" --path /absolute/path/to/file.md --focus-artifact
426
+ tv create-markdown-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/file.md --focus-artifact
476
427
  ```
477
428
 
478
- Or:
429
+ Rules:
430
+
431
+ - `--path` must be absolute
432
+ - the file must already exist and be readable
433
+ - Television watches the file for changes but does not own or delete it
434
+
435
+ ## URL artifacts
436
+
437
+ URL artifacts point at an external `http(s)://` page. They are committed immediately and do not use pending.
479
438
 
480
439
  ```bash
481
- tv create-external-artifact --screen "<screen-id>" --type text/html --title "Artifact title" --path /absolute/path/to/file.html --no-focus
440
+ tv create-url-artifact --screen "<screen-id>" --title "Artifact title" --url https://example.com --no-focus
482
441
  ```
483
442
 
443
+ Use this when the right answer is to embed a live page rather than author a Television-owned artifact.
444
+
484
445
  Rules:
485
446
 
486
- - `--path` must be absolute
487
- - the file must already exist and be readable
488
- - the extension must match `--type`
489
- - there is no pending create / pending edit / commit / abandon flow
490
- - `tv delete-artifact` only forgets the pointer; the underlying file is never deleted
447
+ - `--url` must be `http://` or `https://`; other schemes (`file://`, `javascript:`, etc.) are rejected
448
+ - in the desktop app the page renders in a sandboxed `<webview>`; in the browser it renders in an `<iframe>`
491
449
 
492
- ### Create a URL artifact
450
+ If the user reports that an embedded URL artifact is rendering blank, this is most likely the site refusing iframe embedding (typically via `X-Frame-Options` or a `frame-ancestors` CSP directive). Recovery: create a markdown or web-bundle artifact that just links to the page instead of embedding it.
493
451
 
494
- URL artifacts embed a live `http(s)://` page. They commit immediately and have no pending lifecycle.
452
+ ## Abandoning staged work
453
+
454
+ If staged web-bundle work should be discarded rather than committed:
495
455
 
496
456
  ```bash
497
- tv create-url-artifact --screen "<screen-id>" --title "Artifact title" --url https://example.com --focus-artifact
457
+ tv abandon-artifact --id "<artifact-id>"
498
458
  ```
499
459
 
500
- Or:
460
+ For a pending create, the artifact never becomes live. For a pending edit, the previously committed version remains live.
501
461
 
502
- ```bash
503
- tv create-url-artifact --screen "<screen-id>" --title "Artifact title" --url https://example.com --no-focus
462
+ # Authoring artifacts
463
+
464
+ You're writing a single self-contained HTML artifact that will be rendered
465
+ inside a Television viewer (or downloaded for offline viewing later). This
466
+ skill documents the conventions you must follow.
467
+
468
+ ## House style
469
+
470
+ Artifacts inherit a versioned, canonical stylesheet served by the
471
+ Television runtime. Include it in `<head>`:
472
+
473
+ ```html
474
+ <link rel="stylesheet" href="/canonical/v1/styles.css">
504
475
  ```
505
476
 
506
- Rules:
477
+ That stylesheet provides:
478
+
479
+ - A CSS reset and font-face declarations (Hind variable font, loaded
480
+ automatically — no extra link tags needed).
481
+ - The full design-system token catalog as CSS custom properties:
482
+ typography (`--text-*`, `--font-*`, `--leading-*`), spacing
483
+ (`--space-*`), color (`--color-*`, `--neutral-*`), radii
484
+ (`--radius-*`), and surfaces. The runtime source of truth is
485
+ `packages/ui/styles/tokens.css`; the bundle inlines it.
486
+ - Bare-tag styling. `body`, `a`, `h1`–`h6`, `code`, `pre`, and similar
487
+ semantic elements have built-in styling — you do not need to add
488
+ classes to make them look right.
489
+
490
+ **Lean on semantic HTML and the bare-tag styling.** Reach for `<h1>`,
491
+ `<p>`, `<ul>`, `<code>`, etc. before inventing custom classes. Use tokens
492
+ (`var(--space-8)`, `var(--color-text-muted)`, etc.) for any custom CSS
493
+ you do write — never hardcoded pixel values or hex colors.
494
+
495
+ ## Document shape
496
+
497
+ Emit a complete HTML document, not a fragment:
498
+
499
+ ```html
500
+ <!doctype html>
501
+ <html lang="en">
502
+ <head>
503
+ <meta charset="utf-8">
504
+ <title>{{title}}</title>
505
+ <link rel="stylesheet" href="/canonical/v1/styles.css">
506
+ </head>
507
+ <body>
508
+ <!-- artifact content -->
509
+ </body>
510
+ </html>
511
+ ```
507
512
 
508
- - `--url` must be `http://` or `https://`
509
- - the type is always `text/html` — do not pass `--type`
510
- - in the desktop app the page renders in a sandboxed `<webview>`; in the browser it renders in an `<iframe>`
511
- - some sites block embedding (X-Frame-Options, CSP); if the page may be one of those, prefer an internal artifact that links to the page
513
+ ## Conventions
514
+
515
+ - **Self-contained.** By default, emit one HTML file. If the active
516
+ kind skill ships local CSS or JS assets, copy or inline them from the
517
+ skill folder so the final artifact remains self-contained without any
518
+ `/skills/...` runtime dependency.
519
+ - **No arbitrary `<script>` tags.** Static HTML is the default. Only
520
+ include local, bundled scripts when the active kind skill explicitly
521
+ requires them.
522
+ - **No external network fetches.** No CDN links, no remote images, no
523
+ font URLs other than what `/canonical/v1/styles.css` already includes.
524
+ - **No inline `<style>` overrides for chrome-level concerns.** Small
525
+ layout-specific styles for the artifact's content are fine; redefining
526
+ brand colors or typography is not.
527
+ - **Use tokens, not hardcoded values.** `padding: var(--space-12)`, not
528
+ `padding: 12px`. `color: var(--color-text-muted)`, not `color: #999`.