@telepath-computer/television 0.1.97 → 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.
- package/dist/cli.cjs +444 -434
- package/dist/skills/television/SKILL.md +215 -198
- package/dist/skills/television-calendar/SKILL.md +99 -0
- package/dist/skills/television-table/SKILL.md +89 -0
- package/dist/views/markdown/manifest.json +1 -1
- package/dist/web/assets/{index-DOzy-86J.js → index-_dpb69va.js} +95 -95
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/dist/skills/artifact-calendar/SKILL.md +0 -151
- package/dist/skills/artifact-calendar/house-style.md +0 -67
- package/dist/skills/artifact-table/SKILL.md +0 -217
- package/dist/skills/artifact-table/house-style.md +0 -67
- package/dist/views/text/index.html +0 -38
- package/dist/views/text/manifest.json +0 -5
- /package/dist/skills/{artifact-calendar → television-calendar}/calendar.css +0 -0
- /package/dist/skills/{artifact-calendar → television-calendar}/calendar.js +0 -0
|
@@ -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
|
|
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
|
|
47
|
+
Three artifact kinds:
|
|
48
48
|
|
|
49
|
-
- **
|
|
50
|
-
- **
|
|
51
|
-
- **
|
|
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** —
|
|
56
|
-
- **committed** —
|
|
57
|
-
- **trash** —
|
|
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
|
|
62
|
-
-
|
|
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
|
-
-
|
|
85
|
-
-
|
|
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
|
-
|
|
97
|
+
Install bundled Television skills with either:
|
|
99
98
|
|
|
100
99
|
```bash
|
|
101
|
-
tv skills
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
##
|
|
227
|
+
## Choosing the artifact kind
|
|
240
228
|
|
|
241
|
-
|
|
229
|
+
Television has three artifact kinds. Pick the one that best fits the result:
|
|
242
230
|
|
|
243
|
-
- **markdown**
|
|
244
|
-
- **
|
|
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
|
-
|
|
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
|
-
##
|
|
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
|
-
|
|
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
|
-
-
|
|
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
|
|
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.
|
|
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
|
|
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
|
-
-
|
|
304
|
-
-
|
|
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
|
-
|
|
303
|
+
## Web-bundle workflow
|
|
310
304
|
|
|
311
|
-
|
|
312
|
-
- `data.json`
|
|
313
|
-
- `memory.md`
|
|
314
|
-
- `public/index.md` or `public/index.html`
|
|
305
|
+
### Pending is the default
|
|
315
306
|
|
|
316
|
-
|
|
307
|
+
The recommended workflow for new Television-owned web bundles is the pending workflow:
|
|
317
308
|
|
|
318
|
-
|
|
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
|
-
|
|
313
|
+
This creates a pending bundle under `.pending/<id>/`. Nothing is visible until commit.
|
|
337
314
|
|
|
338
|
-
|
|
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
|
-
|
|
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
|
-
|
|
322
|
+
### Data before presentation
|
|
349
323
|
|
|
350
|
-
|
|
324
|
+
Before authoring the final HTML, think through the underlying data in a pure-data way.
|
|
351
325
|
|
|
352
|
-
|
|
326
|
+
Ask yourself:
|
|
353
327
|
|
|
354
|
-
-
|
|
355
|
-
-
|
|
356
|
-
-
|
|
357
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
339
|
+
Structure it with these sections:
|
|
376
340
|
|
|
377
|
-
-
|
|
378
|
-
-
|
|
379
|
-
-
|
|
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
|
-
|
|
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
|
-
|
|
350
|
+
### `memory.md`
|
|
384
351
|
|
|
385
|
-
|
|
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
|
-
|
|
392
|
-
`house-style.md` guidance.
|
|
354
|
+
Record:
|
|
393
355
|
|
|
394
|
-
|
|
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
|
-
|
|
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
|
|
364
|
+
### Create a new web bundle
|
|
399
365
|
|
|
400
|
-
1.
|
|
401
|
-
2.
|
|
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-
|
|
370
|
+
tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --focus-artifact
|
|
406
371
|
```
|
|
407
372
|
|
|
408
|
-
|
|
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
|
|
380
|
+
tv commit-artifact --id "<artifact-id>"
|
|
412
381
|
```
|
|
413
382
|
|
|
414
|
-
|
|
383
|
+
Commit is the pending → committed promotion.
|
|
415
384
|
|
|
416
|
-
|
|
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
|
-
|
|
425
|
-
tv commit-pending-artifact --id "<artifact-id>"
|
|
426
|
-
```
|
|
387
|
+
Use:
|
|
427
388
|
|
|
428
|
-
|
|
389
|
+
```bash
|
|
390
|
+
tv edit-artifact --id "<artifact-id>"
|
|
391
|
+
```
|
|
429
392
|
|
|
430
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
446
|
-
|
|
447
|
-
|
|
401
|
+
```bash
|
|
402
|
+
tv commit-artifact --id "<artifact-id>"
|
|
403
|
+
```
|
|
448
404
|
|
|
449
|
-
|
|
405
|
+
If you want to discard the staged edit instead:
|
|
450
406
|
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
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
|
-
###
|
|
411
|
+
### Skip pending
|
|
461
412
|
|
|
462
|
-
If
|
|
413
|
+
If you do not want pending states for this artifact, create the committed bundle immediately:
|
|
463
414
|
|
|
464
415
|
```bash
|
|
465
|
-
tv
|
|
416
|
+
tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --skip-pending --no-focus
|
|
466
417
|
```
|
|
467
418
|
|
|
468
|
-
|
|
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
|
-
|
|
421
|
+
## Markdown artifacts
|
|
471
422
|
|
|
472
|
-
|
|
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-
|
|
426
|
+
tv create-markdown-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/file.md --focus-artifact
|
|
476
427
|
```
|
|
477
428
|
|
|
478
|
-
|
|
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-
|
|
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
|
-
- `--
|
|
487
|
-
- the
|
|
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
|
-
|
|
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
|
-
|
|
452
|
+
## Abandoning staged work
|
|
453
|
+
|
|
454
|
+
If staged web-bundle work should be discarded rather than committed:
|
|
495
455
|
|
|
496
456
|
```bash
|
|
497
|
-
tv
|
|
457
|
+
tv abandon-artifact --id "<artifact-id>"
|
|
498
458
|
```
|
|
499
459
|
|
|
500
|
-
|
|
460
|
+
For a pending create, the artifact never becomes live. For a pending edit, the previously committed version remains live.
|
|
501
461
|
|
|
502
|
-
|
|
503
|
-
|
|
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
|
-
|
|
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
|
-
|
|
509
|
-
|
|
510
|
-
-
|
|
511
|
-
|
|
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`.
|