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:
96 files changed
+3259
-527
No files matched your search
@@ -60,9 +60,6 @@ const result = await Bun.build({
|
||||
},
|
||||
define: {
|
||||
LEMBAS_VERSION: JSON.stringify(version),
|
||||
// Reserved: an instance a build could offer on its first-run screen. Empty, and read by
|
||||
// nothing yet — rule 1, nothing predefined, holds for every build this script makes.
|
||||
LEMBAS_DEFAULT_INSTANCE: JSON.stringify(""),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@ if (import.meta.main) {
|
||||
])
|
||||
const d = await drive({ cols, rows, home, cwd, bin: binAt > 0 ? process.argv[binAt + 1] : undefined })
|
||||
const show = (label: string) => console.log(`\n=== ${label}\n` + d.screen().map((l) => l.trimEnd()).join("\n"))
|
||||
await d.waitFor("☤ LLeMbas")
|
||||
await d.waitFor("shift+tab mode · /help")
|
||||
show("start")
|
||||
await d.type("greet me")
|
||||
await d.key("\r")
|
||||
|
||||
+4
-1
@@ -18,7 +18,10 @@ let changed = 0
|
||||
for (const f of readdirSync(dir).filter((x) => x.endsWith(".json")).sort()) {
|
||||
const area = f.replace(/\.json$/, "")
|
||||
const run = AREAS[area]
|
||||
if (!run) throw new Error(`no runner for ${area}`)
|
||||
if (!run) {
|
||||
console.log(`${area}: no runner in tests/conformance.ts yet — skipped`)
|
||||
continue
|
||||
}
|
||||
const doc = JSON.parse(readFileSync(join(dir, f), "utf8")) as { about: string; cases: Record<string, unknown>[] }
|
||||
for (const c of doc.cases) {
|
||||
if ("expect" in c && flag !== "--all") continue
|
||||
|
||||
+3
-3
@@ -103,7 +103,7 @@ for (const [cols, rows] of [
|
||||
// A fresh directory opens with the first-run question; trust it (the default), then work.
|
||||
const firstRun = await d.waitFor("Trust this directory?")
|
||||
await d.key("\r")
|
||||
const drawn = await d.waitFor("☤ LLeMbas")
|
||||
const drawn = await d.waitFor("shift+tab mode · /help")
|
||||
await d.type("make a file")
|
||||
await d.key("\r")
|
||||
const asked = await d.waitFor("Allow once")
|
||||
@@ -175,7 +175,7 @@ for (const [cols, rows] of [
|
||||
await d.key("\r")
|
||||
// The new program draws its welcome box again, with the conversation loaded under it.
|
||||
await Bun.sleep(300)
|
||||
const back = await d.waitFor("☤ LLeMbas")
|
||||
const back = await d.waitFor("shift+tab mode · /help")
|
||||
// The new program's next request carries the conversation from before the reload.
|
||||
await d.type("again")
|
||||
await d.key("\r")
|
||||
@@ -209,7 +209,7 @@ for (const [cols, rows] of [
|
||||
const d = await drive({ cols: 100, rows: 30, bin, home: h, cwd, args: ["-l"], env: { HOME: h, TMPDIR: tmp, XDG_CONFIG_HOME: join(h, ".config"), XDG_DATA_HOME: join(h, ".local/share"), XDG_STATE_HOME: join(h, ".local/state") } })
|
||||
const firstRun = await d.waitFor("Trust this directory?")
|
||||
await d.key("\r")
|
||||
const drawn = await d.waitFor("☤ LLeMbas", 15000)
|
||||
const drawn = await d.waitFor("shift+tab mode · /help", 15000)
|
||||
await d.type("make a file")
|
||||
await d.key("\r")
|
||||
const asked = await d.waitFor("Allow once")
|
||||
|
||||
Reference in new issue
Block a user