spec 3.8.1: a page for what is to be seen, a shown file for what has to run
ci / check (push) Canceled after 0s
ci / check (push) Canceled after 0s
The pages block now says that something the person asks to see in the answer is written as a page, not as an HTML file opened with `show`, and that a page is static: what has to run is said to be beyond a page and, where the model has `write` and `show`, written as a file and shown. A text; nothing else moves. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
6 files changed
+50
-3
No files matched your search
@@ -4,6 +4,18 @@ All notable changes to LLeMbas CLI. The format follows
|
||||
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the project uses
|
||||
[Semantic Versioning](https://semver.org/).
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Changed
|
||||
|
||||
- **Harness spec 3.8.1: a page for what is to be seen, a shown file for what has to run.** The
|
||||
text a model is given when HTML pages are on (`harness/prompts/blocks/html-pages.md`) now says
|
||||
that something the person asks to see in the answer is written as a page, not as an HTML file
|
||||
opened with `show`; and that a page is static, so anything that has to run — a calculator, a
|
||||
game, something that reacts to a click — is not a page: the model says so and, where it can,
|
||||
writes an HTML file and shows that. A text only; the CLI is never offered pages and behaves
|
||||
as before.
|
||||
|
||||
## [2.0.0-beta.10] — 2026-11-13
|
||||
|
||||
Harness spec 3.8.0: reports from scheduled runs, HTML pages in answers, which permission rule decides.
|
||||
|
||||
@@ -78,6 +78,17 @@ page *Harness-parity* in LLeMbas CLI's wiki.
|
||||
approval in plan mode and answers its `unavailable` text outside it. Their permission key is
|
||||
`plan` (`permission/defaults.json`), which a rule written for the former `todo` key still reaches.
|
||||
|
||||
## 3.8.1
|
||||
|
||||
A text. `prompts/blocks/html-pages.md` (`pages.md` §2) now says which of the two ways of
|
||||
showing HTML is for what: **something the person asks to see in the answer is a page** — not
|
||||
an HTML file written and opened with `show`, which is what a model did when nothing said
|
||||
otherwise, leaving a card to open where the drawing was asked for — and **something that has to
|
||||
run is not a page**: a page is static, so for a calculator, a game or anything that reacts to a
|
||||
click the model says a page cannot do it and, where it has `write` and `show`, writes an HTML
|
||||
file and shows that. Nothing else changes: no tool, rule, field or conformance case; the CLI is
|
||||
never offered pages, so its behaviour is the same.
|
||||
|
||||
## 3.8.0
|
||||
|
||||
Written ahead of the implementations; the CLI carries it in the same round.
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
3.8.0
|
||||
3.8.1
|
||||
+6
-1
@@ -40,7 +40,12 @@ A page is a fenced code block whose info string begins with the word **`html-vie
|
||||
## 2. What the model is told
|
||||
|
||||
`prompts/blocks/html-pages.md`, as bullets of the system prompt when pages are offered (§4) —
|
||||
in short: the answer stays Markdown and must make sense without the page; a page is a complete
|
||||
in short: the answer stays Markdown and must make sense without the page; **what the person
|
||||
asks to see in the answer is a page, not an HTML file opened with `show`** (3.8.1: without
|
||||
this a model wrote a file and showed it, and the person got a card to open instead of the thing
|
||||
they asked for); **what has to run is not a page** — the model says a page cannot run anything
|
||||
and, where it has `write` and `show`, writes an HTML file and shows that, which a client runs
|
||||
in its sealed viewer; a page is a complete
|
||||
document in an `html-view` fence with a short title, one page per fence; it is **static** — HTML,
|
||||
CSS and inline SVG, nothing that runs and nothing loaded from anywhere; a chart is inline SVG the
|
||||
model writes out, shapes and numbers it worked out itself; tables and layout are CSS; colours
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
<!-- Spec 3.8.0 (pages.md). Offered only when the instance, the model and the chat all say so; never
|
||||
<!-- Spec 3.8.0 (pages.md); 3.8.1: a page for what is to be seen, a shown file for what has to run. Offered only when the instance, the model and the chat all say so; never
|
||||
to a subagent, the phone assistant or an agent chat. The fence word, the variables and what a
|
||||
static page may hold are loop.json `pages`. -->
|
||||
- Your answer is Markdown, as always. Where seeing answers better than reading — a chart, a comparison laid out as a table with colour, a diagram, a timeline — you may add a page to it: a complete, self-contained HTML document in a fenced block whose info string is `html-view` followed by a short title, for example ```html-view Monthly sales. One page per block. It is shown at that place in your answer, in a sealed frame of a fixed height that scrolls.
|
||||
- When the user asks to see something in your answer — "show me", "draw", "visualise", a chart, a diagram, a table laid out — and it can be drawn without running anything, write it as a page here. Do not write it to an HTML file and open that with `show` instead: a page is what appears in the conversation, at the place you put it, and stays there when the conversation is opened again.
|
||||
- A page is static: HTML, CSS and inline SVG only. Nothing in it runs and nothing is loaded: no `<script>` and no event handlers; no `<link>`, `<meta>`, `<base>`, frames, objects, audio, video, canvas or forms; no address anywhere except `#fragment` and an inline `data:image/…` picture. Anything else is removed before the page is shown.
|
||||
- So a page cannot be interactive. When what is asked for has to run — a calculator, a game, a clock, an animation driven by script, anything that reacts to a click or to typing — do not write it as a page, and do not pretend one can do it: say in a sentence that a page in an answer cannot run anything, and, if you have the `write` and `show` tools, write it as an HTML file and open that with `show`, where the user can run it in a sealed viewer.
|
||||
- Draw a chart as inline SVG you write out yourself: work the numbers out first, then write the bars, lines or slices as SVG shapes with their labels. Lay out and style tables and text with CSS in a `<style>` element — no `@import`, no `url(…)` to anywhere.
|
||||
- Follow the reader's light or dark theme with the frame's CSS variables, always with a fallback: --page-bg (background), --page-ink (text), --page-muted (secondary text), --page-accent (the accent colour) and --page-line (rules and borders) — for example `color: var(--page-ink, #222)`.
|
||||
- If the page itself contains a line of three backticks, open and close its block with four.
|
||||
|
||||
@@ -93,3 +93,20 @@ test("the old `prototypes: true` setting is dropped with a line saying so, never
|
||||
else writeFileSync(file, before)
|
||||
}
|
||||
})
|
||||
|
||||
// Spec 3.8.1: with nothing said, a model asked to "show" a chart wrote an HTML file and opened it
|
||||
// with `show` — a card to open where the drawing was asked for. The block says which is for what.
|
||||
test("the block says a page is for what is to be seen and a shown file for what has to run", async () => {
|
||||
const block = await Bun.file(new URL("../harness/prompts/blocks/html-pages.md", import.meta.url)).text()
|
||||
const bullets = block.split("\n").filter((line) => line.startsWith("- "))
|
||||
const seen = bullets.find((line) => line.includes("asks to see something in your answer"))
|
||||
expect(seen).toBeDefined()
|
||||
expect(seen).toContain("Do not write it to an HTML file and open that with `show`")
|
||||
const runs = bullets.find((line) => line.includes("a page cannot be interactive"))
|
||||
expect(runs).toBeDefined()
|
||||
expect(runs).toContain("a page in an answer cannot run anything")
|
||||
expect(runs).toContain("open that with `show`")
|
||||
// The static rule comes between the two: what a page is, then what follows from it.
|
||||
const order = [seen, bullets.find((line) => line.startsWith("- A page is static")), runs].map((line) => bullets.indexOf(line as string))
|
||||
expect(order).toEqual([...order].sort((a, b) => a - b))
|
||||
})
|
||||
Reference in new issue
Block a user