Harness spec 1.1.0: one plan, prototypes and the library shared; the CLI implements it

The spec: plan_write and plan_update (new, shared, offered in every mode) and
plan_submit (now shared) keep one structured plan — findings, objectives,
phases of tasks — in place of the todo list, which lives on as a former name
of plan_write. The shared system text is one text for both projects, with
variables for what differs; the mode texts, a prototypes block and a library
block are shared. acp.md: the client hands the device what only it knows
(context, library, prototypes), the plan travels as a structure (plan_state),
library calls carry the chat's scope, and a client may rewind a session.
loop.json says its numbers as numbers. Four conformance areas: plan,
prototype, library_scope, toolcall_index.

The CLI: the plan is kept per session in the store and drawn above the prompt
and on the approval card; the prompt is assembled from the spec's texts with
their variables filled; the link reads the instance's instructions,
personalization, knowledge scope and prototype offer, sends the plan as a
structure and answers rewind; library calls to the instance carry the session
as scope; a prototype written in the terminal is saved as a file and named in
the transcript; a tool-call fragment without an index continues the last call;
the default theme is Moria; dead exports and Hermes leftovers removed.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
HomerandClaude Fable 5.1 committed 2026-10-18 04:02:12 +02:00
1 parent 6e70ff46d0
commit 837f38c744
96 files changed
+3259 -527

No files matched your search

+4 -4
View File
@@ -24,8 +24,8 @@ const contrast = (a: string, b: string) => {
// The themes that paint their own background (hermes and mono keep the terminal's).
const painted = Object.values(BUILTIN_THEMES).filter((t) => t.colors.bg)
test("the default is lembas, and every built-in theme has every colour as #rrggbb", () => {
expect(DEFAULT_THEME.name).toBe("lembas")
test("the default is moria, and every built-in theme has every colour as #rrggbb", () => {
expect(DEFAULT_THEME.name).toBe("moria")
expect(painted.map((t) => t.name).sort()).toEqual(["lembas", "lembas-light", "moria", "shire"])
for (const t of Object.values(BUILTIN_THEMES)) {
for (const k of Object.keys(HERMES.colors) as (keyof Theme["colors"])[]) expect({ theme: t.name, key: k, ok: /^#[0-9a-fA-F]{6}$/.test(t.colors[k] ?? "") }).toEqual({ theme: t.name, key: k, ok: true })
@@ -46,7 +46,7 @@ test("readable: text 7:1 on the background; what is read 4.5:1 on the background
expect(low).toEqual([])
})
test("a user theme in themes/ (or the old skins/) is merged over lembas; an unknown one falls back with a warning", () => {
test("a user theme in themes/ (or the old skins/) is merged over the default; an unknown one falls back with a warning", () => {
mkdirSync(join(paths.config, "themes"), { recursive: true })
writeFileSync(join(paths.config, "themes", "mine.yaml"), "colors:\n accent: '#ff00ff'\n")
mkdirSync(join(paths.config, "skins"), { recursive: true })
@@ -57,7 +57,7 @@ test("a user theme in themes/ (or the old skins/) is merged over lembas; an unkn
expect(mine.colors.bg).toBe(DEFAULT_THEME.colors.bg)
expect(loadTheme("old").theme.colors.title).toBe("#00ff00")
const none = loadTheme("nope")
expect(none.theme.name).toBe("lembas")
expect(none.theme.name).toBe("moria")
expect(none.warning).toContain('theme "nope" not found')
})