@telepath-computer/television 0.1.128 → 0.1.141

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.
@@ -0,0 +1,65 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <title>Welcome to Television</title>
7
+ <style>
8
+ :root {
9
+ color-scheme: light;
10
+ font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
11
+ background: #f6f2ea;
12
+ color: #1f2933;
13
+ }
14
+ body {
15
+ margin: 0;
16
+ min-height: 100vh;
17
+ display: grid;
18
+ place-items: center;
19
+ padding: 48px;
20
+ box-sizing: border-box;
21
+ }
22
+ main {
23
+ max-width: 760px;
24
+ background: rgba(255, 255, 255, 0.78);
25
+ border: 1px solid rgba(31, 41, 51, 0.12);
26
+ border-radius: 28px;
27
+ padding: 44px;
28
+ box-shadow: 0 24px 80px rgba(31, 41, 51, 0.12);
29
+ }
30
+ h1 {
31
+ margin: 0 0 16px;
32
+ font-size: clamp(2.4rem, 7vw, 5rem);
33
+ line-height: 0.95;
34
+ letter-spacing: -0.06em;
35
+ }
36
+ p {
37
+ margin: 0 0 18px;
38
+ font-size: 1.1rem;
39
+ line-height: 1.65;
40
+ }
41
+ ul {
42
+ margin: 24px 0 0;
43
+ padding-left: 1.3rem;
44
+ line-height: 1.7;
45
+ }
46
+ code {
47
+ background: rgba(31, 41, 51, 0.08);
48
+ border-radius: 0.4em;
49
+ padding: 0.1em 0.35em;
50
+ }
51
+ </style>
52
+ </head>
53
+ <body>
54
+ <main>
55
+ <h1>Welcome to Television</h1>
56
+ <p>Television is a shared display for artifacts created by agents, tools, and people.</p>
57
+ <p>This onboarding artifact was installed automatically on first launch. It lives in your Television storage folder as <code>artifacts/television-onboarding.html</code>.</p>
58
+ <ul>
59
+ <li>Create HTML or Markdown artifacts from the CLI or API.</li>
60
+ <li>Edit file-backed artifacts on disk and connected clients update automatically.</li>
61
+ <li>Use themes to customize the whole display.</li>
62
+ </ul>
63
+ </main>
64
+ </body>
65
+ </html>
@@ -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 fit together. Read for screen, lifecycle, and CLI work.
3
+ description: Mental model, when to create artifacts, and how Television's bundled skills fit together. Read for screen, artifact, and CLI work.
4
4
  ---
5
5
 
6
6
 
@@ -8,15 +8,15 @@ description: Mental model, when to use Television vs chat, and how Television's
8
8
 
9
9
  Television is a persistent artifact screen for agents.
10
10
 
11
- Load this skill when you need to create, update, inspect, attach, focus, or otherwise manage Television screens and artifacts.
11
+ Load this skill when you need to create, update, inspect, focus, delete, or otherwise manage Television screens and artifacts.
12
12
 
13
13
  Re-read this skill only if it is not already in your context or you know it changed.
14
14
 
15
15
  ## When to use Television
16
16
 
17
- Prefer Television when it is a better presentation surface than chat. When a response would otherwise be long, structured, visual, research-heavy, or significantly clearer as markdown, HTML, or a table, prefer creating a Television artifact as the primary response instead of delivering the full result in chat.
17
+ Prefer Television when the result would be better as a persistent, scannable artifact than as an inline conversational reply. When a response would otherwise be long, structured, visual, research-heavy, or significantly clearer as HTML, markdown, or a table, prefer creating a Television artifact as the primary response.
18
18
 
19
- The chat sidebar is good for short, conversational replies. It is bad for results the user will want to scan, compare, revisit, or treat as a working surface. Long structured output crammed into chat is harder to read and easy to lose.
19
+ Short, conversational replies belong in the agent's own output. Television is for results the user will want to scan, compare, revisit, or treat as a working surface.
20
20
 
21
21
  Use judgment. Do not create an artifact for every response, but do prefer one when:
22
22
 
@@ -28,41 +28,32 @@ Use judgment. Do not create an artifact for every response, but do prefer one wh
28
28
 
29
29
  Ground this decision in the user's likely experience. Ask yourself what will be easier for them to read, compare, revisit, or act on next.
30
30
 
31
- When the artifact is the real answer, keep the final chat reply short. Tell the user what you created, what they will see, and where to find it rather than duplicating the full content in chat.
31
+ When the artifact is the real answer, keep the final reply short. Tell the user what you created, what they will see, and where to find it rather than duplicating the full content in a conversational reply.
32
32
 
33
33
  ## Mental model
34
34
 
35
35
  ### Core entities
36
36
 
37
37
  - A **screen** is a named viewer surface with a layout.
38
- - An **artifact** is a result that can be shown on a screen.
39
- - Screen membership and artifact identity are separate.
38
+ - An **artifact** is a registry record shown on exactly one screen.
39
+ - Screen layout is the source of truth for where an artifact appears.
40
40
 
41
- That separation matters:
41
+ That relationship matters:
42
42
 
43
- - attaching or detaching changes where an artifact appears
44
- - deleting an artifact removes it globally
45
- - an artifact may be attached to one screen, multiple screens, or no screens
43
+ - creating an artifact places it on a screen immediately
44
+ - repositioning is a browser UI drag/drop gesture; the CLI does not expose layout mutation today
45
+ - deleting an artifact removes its registry record and its card from the screen
46
+ - moving the same underlying path or URL to another screen means deleting the old artifact and creating a new artifact with the same path or URL on the target screen
46
47
 
47
- ### Artifact kinds
48
+ ### Artifact shapes
48
49
 
49
- Three artifact kinds:
50
+ Television artifacts point to one of three shapes:
50
51
 
51
- - **markdown** — pointer to an existing absolute markdown file on disk
52
- - **web-bundle** — Television-managed HTML bundle
53
- - **url** — pointer to an external `http(s)://` page
52
+ - **Single file** — an absolute markdown or HTML file.
53
+ - **Directory** — a folder with `index.html` plus sibling assets.
54
+ - **URL** — an external `http(s)://` page or local web app URL.
54
55
 
55
- ### Lifecycle states
56
-
57
- - **pending** — staged work not yet committed
58
- - **committed** — live and visible
59
- - **trash** — moved out of the live tree
60
-
61
- Important consequences:
62
-
63
- - only **web-bundle** artifacts can be pending
64
- - **markdown** and **url** artifacts are committed immediately
65
- - there is no restore-from-trash workflow in the current scope
56
+ Register files and directories with `tv create-path-artifact`; register URLs with `tv create-url-artifact`. See `artifact-workflow.md` for choosing a shape and authoring the underlying content.
66
57
 
67
58
  ### User-facing framing
68
59
 
@@ -70,8 +61,8 @@ Think in terms of what the user believes exists and where they expect to find it
70
61
 
71
62
  Questions to keep straight:
72
63
 
73
- - should this result become a durable Television-owned artifact?
74
- - should it instead stay an external file or URL pointer?
64
+ - should this result be markdown, HTML, or a URL pointer?
65
+ - where should the underlying file live?
75
66
  - should it appear on the current screen, another existing screen, or a new screen?
76
67
  - should the user see it immediately, or should it be prepared without moving their attention yet?
77
68
 
@@ -81,9 +72,9 @@ Those questions interact, but they are not the same question.
81
72
 
82
73
  Television guidance is split across bundled skills.
83
74
 
84
- - Use this skill for screens, focus, artifact lifecycle decisions, and the `tv` CLI. Required means the knowledge is required, not that you must re-read it before every Television action.
75
+ - Use this skill for screens, focus, artifact decisions, and the `tv` CLI. Required means the knowledge is required, not that you must re-read it before every Television action.
85
76
  - 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.
86
- - For kind-specific HTML work, load the matching skill such as `television-calendar` or `television-table`.
77
+ - For specialized HTML work, load the matching skill such as `tv-calendar` or `tv-table`.
87
78
 
88
79
  `markdown editor UI recovery` remains out of scope for the current Television workflow.
89
80
 
@@ -94,7 +85,7 @@ Use this document when you need to reason about what the `tv` CLI can do, which
94
85
 
95
86
  ## Agent recovery surfaces
96
87
 
97
- The `television` skill is the primary guidance surface for Television screens, focus, and lifecycle work. Keep that guidance available; re-read it only if it is not already in context or you know it changed.
88
+ The `television` skill is the primary guidance surface for Television screens, focus, and artifact work. Keep that guidance available; re-read it only if it is not already in context or you know it changed.
98
89
 
99
90
  Install bundled Television skills with either:
100
91
 
@@ -116,24 +107,22 @@ tv help
116
107
  tv help <command>
117
108
  ```
118
109
 
119
- `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.
110
+ `tv help <command>` is the source of truth for per-command semantics that are not obvious from the name — focus decisions, cascading effects, JSON vs plain-text output, and distinctions between superficially similar commands (delete-artifact vs remove-screen, focus-screen vs focus-artifact). Read it before choosing a command when you are unsure.
120
111
 
121
112
  Commands group into four intents:
122
113
 
123
114
  - **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`).
124
- - **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`).
125
- - **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`).
115
+ - **Artifact creation commands** — register path or URL artifacts (`create-path-artifact`, `create-url-artifact`).
116
+ - **Artifact management commands** — inspect, retitle, focus, list, or delete existing artifacts (`delete-artifact`, `get-artifact`, `list-artifacts`, `update-artifact`, `focus-artifact`).
126
117
  - **Server and environment commands** — operate on the Television server itself (`serve`, `status`, `stop`, `storage-path`, `skills install`).
127
118
 
128
119
  When the CLI rejects a command, follow the directive it prints rather than guessing flags.
129
120
 
130
121
  ### Server operation notes
131
122
 
132
- `tv serve` starts the local server. Bare `tv serve` binds `127.0.0.1` and is tokenless. Use `--listen <ipv4>` (repeatable or comma-separated) to add IPv4 listeners; any `--listen` requires an explicit global auth choice with `--auth` or `--no-auth`. Workflow commands connect to `localhost:<port>` only; use `--port`, `TELEVISION_PORT`, or the default `32848` rather than `--server`. When targeting non-default storage, pass `--storage-path` or set `TELEVISION_STORAGE_PATH` so the CLI reads the matching token.
123
+ `tv serve` starts the local server. Bare `tv serve` binds `127.0.0.1` and is tokenless. Use `--listen <ipv4>` (repeatable or comma-separated) to add IPv4 listeners; any `--listen` requires an explicit global auth choice with `--auth` or `--no-auth`. Workflow commands connect to `localhost:<port>` only; use `--port`, `TELEVISION_PORT`, or the default `32848` rather than `--server`. When targeting non-default storage, pass `--storage-path` or set `TELEVISION_STORAGE_PATH` so the CLI reads the matching token from `<storagePath>/state/token`.
133
124
 
134
- ACP chat is optional: with no `TELEVISION_ACP_AGENT`, the server starts without ACP wiring, `/acp` is unavailable, and the web UI hides chat. Set `TELEVISION_ACP_AGENT=openclaw` or `TELEVISION_ACP_AGENT=hermes` to enable chat; in that case `tv serve` preflights the selected ACP command on `PATH` and fails before listening if the binary is missing.
135
-
136
- `tv serve --persist` installs or refreshes the user system service. It captures the serve flags and relevant environment at install time (`--listen`, `--auth`/`--no-auth`, `--port`, `--storage-path`, `PATH`, `TELEVISION_PORT`, `TELEVISION_STORAGE_PATH`). When an ACP agent is configured, it also captures canonical `TELEVISION_ACP_AGENT` and matching `OPENCLAW_*` or `HERMES_*` variables, and validates the ACP command against that captured PATH before changing the installed service. When no agent is configured, ACP env capture and preflight are skipped and the service runs with chat disabled. Rerun it after changing listen/auth/port settings, PATH, ACP agent env vars, the ACP agent install, or the Node/TV install. The refresh is non-atomic: if uninstall succeeds but install fails, fix the env and rerun `tv serve --persist`.
125
+ `tv serve --persist` installs or refreshes the user system service. It captures the serve flags and relevant environment at install time (`--listen`, `--auth`/`--no-auth`, `--port`, `--storage-path`, `PATH`, `TELEVISION_PORT`, `TELEVISION_STORAGE_PATH`). Rerun it after changing listen/auth/port settings, PATH, or the Node/TV install. The refresh is non-atomic: if uninstall succeeds but install fails, fix the env and rerun `tv serve --persist`.
137
126
 
138
127
  `tv serve --persist-uninstall` removes the service and is equivalent to `tv stop`. Both are idempotent and print `{ "status": "stopped" }` whether or not a service was installed.
139
128
 
@@ -155,14 +144,14 @@ Television separates state changes from focus. Choosing where an artifact lives
155
144
  There is a persisted focused screen.
156
145
  There is not a persisted focused artifact.
157
146
 
158
- Important consequence: creating or attaching something does not by itself answer whether the user should be taken to it now.
147
+ Important consequence: creating something does not by itself answer whether the user should be taken to it now.
159
148
 
160
149
  ## Required explicit focus decisions
161
150
 
162
- Create and attach commands require an explicit focus decision.
151
+ Create commands require an explicit focus decision.
163
152
 
164
153
  - `tv create-screen` requires exactly one of `--focus-screen` or `--no-focus`
165
- - `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`
154
+ - `tv create-path-artifact` and `tv create-url-artifact` require exactly one of `--focus-artifact` or `--no-focus`
166
155
 
167
156
  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.
168
157
 
@@ -199,14 +188,14 @@ These are illustrative, not exhaustive. When the language is ambiguous or unusua
199
188
 
200
189
  ## Screen placement
201
190
 
202
- Artifact creation commands require `--screen` because new artifacts need immediate screen membership. Use `attach-artifact` and `detach-artifact` when the artifact already exists and you are changing where it appears.
191
+ Artifact creation commands require `--screen` because new artifacts need immediate screen membership. Repositioning an artifact on its current screen is a browser UI drag/drop gesture; the CLI does not expose layout mutation today. To move the same underlying path or URL to a different screen, delete the old artifact and create a new artifact on the target screen with the same path or URL.
203
192
 
204
193
  Think carefully about whether the user means:
205
194
 
206
195
  - create something new on a screen
207
- - place an existing artifact on a screen
208
- - stop showing an artifact on a screen
209
- - globally delete an artifact everywhere
196
+ - reposition an artifact on its current screen in the browser UI
197
+ - delete an artifact from its screen
198
+ - recreate the same path or URL on a different screen
210
199
 
211
200
  Those are different operations with different consequences. The per-command help text spells out which is which.
212
201
 
@@ -214,8 +203,8 @@ Those are different operations with different consequences. The per-command help
214
203
 
215
204
  When deciding where an artifact should go:
216
205
 
217
- - If the current screen is the right place and the user should see the result immediately, create or attach the artifact there with `--focus-artifact`.
218
- - If the current screen is the right place but the work should appear without interrupting their reading flow, create or attach with `--no-focus`.
206
+ - If the current screen is the right place and the user should see the result immediately, create the artifact there with `--focus-artifact`.
207
+ - If the current screen is the right place but the work should appear without interrupting their reading flow, create it with `--no-focus`.
219
208
  - If the work belongs on a different existing screen, place it there. Then decide whether to focus or merely tell the user where it is.
220
209
  - Sometimes a new screen is the right call.
221
210
 
@@ -232,38 +221,58 @@ Default to placing things on an existing screen unless one of those conditions i
232
221
 
233
222
  # Artifact workflow
234
223
 
235
- Read this document for Television artifact lifecycle work creating, updating, committing, abandoning, attaching, detaching, deleting.
224
+ Read this document for Television artifact work: creating files, registering path or URL artifacts, browser-only repositioning, deleting, and updating titles.
236
225
 
237
226
  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`.
238
227
 
239
- If you are authoring a specialized HTML artifact, read the matching kind skill after this one — for example `television-calendar` or `television-table`.
228
+ If you are authoring a specialized HTML artifact, read the matching skill after this one — for example `tv-calendar` or `tv-table`.
240
229
 
241
230
  ## Choosing the artifact kind
242
231
 
243
- Television has three artifact kinds. Pick the one that best fits the result:
232
+ Television has three artifact shapes. Pick the one that fits the result:
244
233
 
245
- - **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.
246
- - **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.
247
- - **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.
234
+ - **Single file** — one self-contained markdown (`.md`) or HTML (`.html`) file on disk. Use when the artifact needs no dependent CSS, JS, images, or additional pages.
235
+ - **Directory** — a folder on disk containing `index.html` plus sibling assets (CSS, JS, images, additional pages). Use when the artifact needs richer structure: custom stylesheets, scripts, images, or multi-page navigation.
236
+ - **URL** — an external `http(s)://` web page or web app, or a locally running web server (e.g. `http://localhost:3000`). Use for remote pages, local web apps the agent does not manage, or any live web resource. Do not use URL artifacts for content Television should manage the lifecycle of — use a path artifact instead.
248
237
 
249
- 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.
238
+ Single files and directories are both registered with `tv create-path-artifact`. URL artifacts use `tv create-url-artifact`.
250
239
 
251
- ## Where the markdown file goes
240
+ Within path artifacts, choose the content shape:
252
241
 
253
- 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.
242
+ - **HTML file or directory** default for most artifacts. HTML gives Television its best rendering: styled layout, hierarchy, visual structure, and the canonical stylesheet. Use HTML whenever the result is a presentation, summary, dashboard, comparison, reference, or anything the user will primarily read rather than edit.
243
+ - **Markdown file** — use when the result is a document the user will want to edit directly: notes, drafts, working documents, or content that will be revised outside Television.
254
244
 
255
- Ask yourself:
245
+ If you are unsure between HTML and markdown, default to HTML.
246
+
247
+ ## Where to place new artifact files
248
+
249
+ Television registers pointers — the file lifecycle is yours, not Television's. Deleting an artifact removes the registry record, not the underlying file or folder, regardless of where it lives.
250
+
251
+ **Default for HTML (single file or directory): `~/.television/artifacts/`.** HTML artifacts are pure presentation — Television is where they live and get used, so the default folder is the right home. Put them there unless the user has told you otherwise. Create the directory if it does not exist.
252
+
253
+ **Markdown is different.** A markdown artifact is usually a user-owned document — a note, draft, write-up — that has a life outside Television. Putting one in `~/.television/artifacts/` is suspect: the user will likely want it alongside their other documents. For markdown, co-locate with the project, repo, notes folder, or workspace where a new document of that kind would naturally belong if the user had asked for one outside Television. If no such home is obvious from context, ask the user where it should go rather than dropping it in the default folder.
254
+
255
+ For HTML, put the file somewhere else only when the user has explicitly directed you to — either in this request, or via a durable instruction (project `AGENTS.md`/`CLAUDE.md`, a standing preference, an earlier "from now on…" in this session). Examples of explicit direction: "save it in the repo", "put it in my notes folder", "drop it in the agent workspace".
256
256
 
257
- - If the user asked you to take a note, where would you put it?
258
- - If the user asked you to do web research and create a report, where would you put it?
257
+ Do not co-locate HTML artifacts with project files, repo trees, notes folders, or agent workspaces on your own initiative — even when it seems natural. The default for HTML is `~/.television/artifacts/`.
259
258
 
260
- 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.
259
+ ### File and folder naming
261
260
 
262
- 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.
261
+ Use durable, descriptive names that capture the artifact's subject specifically favor `q3-revenue-by-region.html` over `report.html`. For HTML artifacts in the default folder, good names are how you'll find one again later among the others.
263
262
 
264
- 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.
263
+ For directory artifacts the folder name is the primary identifierfiles inside are typically generic (`index.html`, `styles.css`).
265
264
 
266
- 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.
265
+ Always tell the user where you put the file.
266
+
267
+ ## Accepted path targets
268
+
269
+ `tv create-path-artifact` accepts three path shapes:
270
+
271
+ - **Single markdown file** ending in `.md` or `.markdown`
272
+ - **Single HTML file** ending in `.htm` or `.html`
273
+ - **HTML directory** — a path ending in `/` or `\` whose root contains `index.html` or `index.htm`, plus any sibling assets
274
+
275
+ The path must be absolute, existing, and readable by the server.
267
276
 
268
277
  ## Authoring quality
269
278
 
@@ -283,7 +292,7 @@ Anti-patterns to avoid:
283
292
  - cursory or low-effort data collection
284
293
  - fake completeness — padding to look thorough
285
294
  - brittle one-off hacks that a later agent cannot reproduce
286
- - hidden dependencies that are not documented in the bundle
295
+ - hidden dependencies that are not documented next to the artifact
287
296
 
288
297
  ## Before creating artifacts
289
298
 
@@ -304,174 +313,120 @@ Good examples:
304
313
 
305
314
  - "Starting the artifact now."
306
315
  - "Reviewing the draft and source material."
307
- - "Updating the HTML and moving through the artifact flow."
308
- - "Finalizing the artifact now."
316
+ - "Writing the HTML and checking it in the browser."
317
+ - "Registering the artifact on your screen."
309
318
  - "Done."
310
319
 
311
320
  Avoid:
312
321
 
313
322
  - multi-paragraph progress reports or long retrospective narration during execution
314
323
  - verbose bullet lists for routine workflow steps (use bullets only when the user explicitly asks)
315
- - workflow jargon ("calling commit-artifact", "promoting the pending bundle") unless the user is debugging Television itself
316
-
317
- ## Web-bundle workflow
324
+ - workflow jargon ("calling create-path-artifact", "registering the path artifact") unless the user is debugging Television itself
318
325
 
319
- ### Pending is the default
320
-
321
- The recommended workflow for new Television-owned web bundles is the pending workflow:
322
-
323
- ```bash
324
- tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --focus-artifact
325
- ```
326
+ ## Markdown path artifacts
326
327
 
327
- This creates a pending bundle under `.pending/<id>/`. Nothing is visible until commit.
328
+ 1. Write the markdown file.
329
+ 2. Register it:
328
330
 
329
- Inside the pending bundle you write:
330
-
331
- - `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
332
- - `artifact.md` — bundle documentation for future agents (see below)
333
- - `memory.md` — maintenance log for future agents (see below)
334
- - a data-oriented supporting file when the artifact has non-trivial underlying data (see "Data before presentation")
335
-
336
- ### Data before presentation
337
-
338
- Before authoring the final HTML, think through the underlying data in a pure-data way.
339
-
340
- Ask yourself:
341
-
342
- - what facts exist?
343
- - what structure do they have?
344
- - what is missing?
345
- - what separation between data and presentation would help the next agent?
346
-
347
- 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.
348
-
349
- ### `artifact.md`
350
-
351
- `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.
352
-
353
- Structure it with these sections:
354
-
355
- - **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.
356
- - **Purpose** — what the artifact is for and what success looks like.
357
- - **Data sources** — where the underlying facts came from and how they were obtained.
358
- - **Rendering** — how `public/index.html` should present the result, and why this presentation fits the data.
359
- - **Update workflow** — how a future agent should refresh or modify the artifact correctly.
360
- - **Non-goals** — important exclusions, especially when it would be easy to overbuild (e.g., "this is a static report, not a live dashboard").
331
+ ```bash
332
+ tv create-path-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/file.md --focus-artifact
333
+ ```
361
334
 
362
- 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.
335
+ Rules:
363
336
 
364
- ### `memory.md`
337
+ - The file must already exist and be readable.
338
+ - Television's markdown editor reads and writes the pointed-to file.
339
+ - Deleting the artifact removes the registry record, not the markdown file.
365
340
 
366
- `memory.md` is a maintenance log addressed to the next agent who will edit this artifact.
341
+ ## HTML path artifacts
367
342
 
368
- Record:
343
+ HTML can be a single file or a directory bundle.
369
344
 
370
- - decisions made during authoring and their reasons
371
- - limitations of the source material or rendering
372
- - problems encountered and how they were resolved
373
- - what changed in each edit pass
374
- - anything a future agent should watch for
345
+ Single-file example:
375
346
 
376
- A simple chronological structure works. When you commit a new edit, append an entry summarizing what changed and why.
347
+ ```bash
348
+ tv create-path-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/report.html --focus-artifact
349
+ ```
377
350
 
378
- ### Create a new web bundle
351
+ Directory example:
379
352
 
380
- 1. Tell the user what you are about to make.
381
- 2. Create the pending bundle:
353
+ ```bash
354
+ tv create-path-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/dashboard/ --focus-artifact
355
+ ```
382
356
 
383
- ```bash
384
- tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --focus-artifact
385
- ```
357
+ A directory artifact needs root `index.html` or `index.htm`. Keep sibling assets relative so they resolve through the artifact proxy:
386
358
 
387
- 3. Inside the pending bundle, write `artifact.md` — start with **User intent** before any other authoring work.
388
- 4. Think through the underlying data and author the data-oriented supporting file (see "Data before presentation").
389
- 5. Write `memory.md` with an initial entry describing this create pass.
390
- 6. Author the presentation under `public/` — `public/index.html` plus any additional assets you need.
391
- 7. Commit:
359
+ ```html
360
+ <link rel="stylesheet" href="./styles.css" />
361
+ <script type="module" src="./main.js"></script>
362
+ ```
392
363
 
393
- ```bash
394
- tv commit-artifact --id "<artifact-id>"
395
- ```
364
+ Use `/canonical/v1/styles.css` for Television's canonical artifact stylesheet:
396
365
 
397
- Commit is the pending → committed promotion.
366
+ ```html
367
+ <link rel="stylesheet" href="/canonical/v1/styles.css" />
368
+ ```
398
369
 
399
- ### Edit a committed web bundle
370
+ ### Suggested HTML file set
400
371
 
401
- Use:
372
+ For durable HTML artifacts, write nearby documentation so a future agent can maintain the work:
402
373
 
403
- ```bash
404
- tv edit-artifact --id "<artifact-id>"
405
- ```
374
+ - `index.html` — rendered page
375
+ - `artifact.md` purpose, user intent, data sources, rendering notes, update workflow, non-goals
376
+ - `memory.md` — maintenance log
377
+ - data source file when the artifact has non-trivial underlying data
406
378
 
407
- This copies the committed bundle into `.pending/<id>/`. While the artifact is pending-edit, the viewer keeps showing the last committed content unchanged.
379
+ For single-file artifacts, keep these files in the same directory. For directory artifacts, put `index.html` at the registered root and keep supporting files next to it unless the user's workspace convention says otherwise.
408
380
 
409
- 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.
381
+ ### Data before presentation
410
382
 
411
- 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.
383
+ Before authoring the final HTML, think through the underlying data in a pure-data way.
412
384
 
413
- When you are ready:
385
+ Ask yourself:
414
386
 
415
- ```bash
416
- tv commit-artifact --id "<artifact-id>"
417
- ```
387
+ - what facts exist?
388
+ - what structure do they have?
389
+ - what is missing?
390
+ - what separation between data and presentation would help the next agent?
418
391
 
419
- If you want to discard the staged edit instead:
392
+ Capture this reasoning in a supporting document or data file before the presentation work.
420
393
 
421
- ```bash
422
- tv abandon-artifact --id "<artifact-id>"
423
- ```
394
+ ## Updating an artifact
424
395
 
425
- ### Skip pending
396
+ To update markdown or HTML content, edit the pointed-to file or directory in place. Television watches supported path targets and refreshes connected clients.
426
397
 
427
- If you do not want pending states for this artifact, create the committed bundle immediately:
398
+ To retitle an artifact:
428
399
 
429
400
  ```bash
430
- tv create-web-bundle-artifact --screen "<screen-id>" --title "Artifact title" --skip-pending --no-focus
401
+ tv update-artifact --id "<artifact-id>" --title "New title"
431
402
  ```
432
403
 
433
- 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.
404
+ Artifact repositioning on its current screen is a browser UI drag/drop gesture; the CLI does not expose layout mutation today.
434
405
 
435
- ## Markdown artifacts
406
+ To move the same underlying path or URL to another screen, delete the existing artifact and create a new one on the target screen with the same `--path` or `--url`.
436
407
 
437
- Markdown artifacts point at an existing absolute markdown file on disk. They are committed immediately and do not use pending.
408
+ To delete the registry record and remove its card from its screen:
438
409
 
439
410
  ```bash
440
- tv create-markdown-artifact --screen "<screen-id>" --title "Artifact title" --path /absolute/path/to/file.md --focus-artifact
411
+ tv delete-artifact --id "<artifact-id>"
441
412
  ```
442
413
 
443
- Rules:
444
-
445
- - `--path` must be absolute
446
- - the file must already exist and be readable
447
- - Television watches the file for changes but does not own or delete it
448
-
449
414
  ## URL artifacts
450
415
 
451
- URL artifacts point at an external `http(s)://` page. They are committed immediately and do not use pending.
416
+ URL artifacts point at external `http(s)://` pages.
452
417
 
453
418
  ```bash
454
419
  tv create-url-artifact --screen "<screen-id>" --title "Artifact title" --url https://example.com --no-focus
455
420
  ```
456
421
 
457
- Use this when the right answer is to embed a live page rather than author a Television-owned artifact.
458
-
459
422
  Rules:
460
423
 
461
- - `--url` must be `http://` or `https://`; other schemes (`file://`, `javascript:`, etc.) are rejected
462
- - in the desktop app the page renders in a sandboxed `<webview>`; in the browser it renders in an `<iframe>`
463
-
464
- 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.
465
-
466
- ## Abandoning staged work
467
-
468
- If staged web-bundle work should be discarded rather than committed:
469
-
470
- ```bash
471
- tv abandon-artifact --id "<artifact-id>"
472
- ```
424
+ - `--url` must be `http://` or `https://`.
425
+ - Electron displays the URL in a webview.
426
+ - Browser clients show a local unsupported placeholder.
427
+ - Television does not fetch or watch the remote page.
473
428
 
474
- For a pending create, the artifact never becomes live. For a pending edit, the previously committed version remains live.
429
+ If the browser placeholder is not sufficient, create a markdown or HTML path artifact that links to the page and summarizes what the user needs from it.
475
430
 
476
431
  # HTML artifact style
477
432
 
@@ -1,11 +1,11 @@
1
1
  ---
2
- name: television-calendar
2
+ name: tv-calendar
3
3
  description: Author self-contained HTML calendar artifacts using the bundled calendar-week elements and copied calendar assets.
4
4
  ---
5
5
 
6
6
  # Authoring a calendar week
7
7
 
8
- Know the main `television` skill first. Re-read it only if it is not already in your context or you know it changed. It defines the general Television workflow, the pending-vs-committed model, and the canonical HTML house style. This skill only adds calendar-specific guidance.
8
+ Know the main `television` skill first. Re-read it only if it is not already in your context or you know it changed. It defines the general Television workflow, path artifact registration, and the canonical HTML house style. This skill only adds calendar-specific guidance.
9
9
 
10
10
  A working-week calendar with a generated header strip, all-day band, time axis,
11
11
  and timed event grid. The agent only authors a single `<calendar-week>` plus
@@ -15,10 +15,9 @@ flat sibling `<calendar-event>` children. The component renders the rest.
15
15
 
16
16
  Every calendar artifact must be self-contained. Read `calendar.css` and
17
17
  `calendar.js` from this skill folder and carry them into the artifact output
18
- instead of referencing `/skills/television-calendar/...` URLs.
18
+ instead of referencing `/skills/tv-calendar/...` URLs.
19
19
 
20
- For a Television web bundle, copy both files into the artifact's `public/`
21
- directory and reference them relatively:
20
+ For a Television HTML directory artifact, copy both files into the registered directory next to `index.html` and reference them relatively:
22
21
 
23
22
  ```html
24
23
  <link rel="stylesheet" href="/canonical/v1/styles.css" />
@@ -1,5 +1,5 @@
1
1
  ---
2
- name: television-table
2
+ name: tv-table
3
3
  description: Author dense Airtable-style HTML record tables using the shared Television house style.
4
4
  ---
5
5