From 1e0b100b2d3d4af9f65daae7ede647ac9c388157 Mon Sep 17 00:00:00 2001 From: "Anderson A. Giacomolli" Date: Fri, 6 Nov 2026 14:51:07 -0300 Subject: [PATCH] Refer to the design without names Code, comments, and tests refer to the reference design and its rollback push list by their function, not by the names of their author or their system. The view comment, the push-order test, and the prompt comment use "the reference design". The prompt test keeps its check that the prompt holds no old agent name. It builds the word from parts, so the source does not spell it. Issue: b14d537 --- prompt.go | 12 ++++++------ prompt_test.go | 7 +++++-- view.go | 4 ++-- view_test.go | 6 +++--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/prompt.go b/prompt.go index e3c52c4..dc0fb06 100644 --- a/prompt.go +++ b/prompt.go @@ -8,12 +8,12 @@ import ( // promptName stands for the name of the agent in promptText. const promptName = "{name}" -// promptText is the system prompt of the UniiChat design, nearly word for word, -// with the name of the agent in place of Unii and the kind reply in place of -// unii. It describes only what OneChat can do, so it leaves out the spec text -// on images, subagents, computers, background tasks, and the instructions of -// the user. It holds no date and no state, so turns and compactions share its -// prompt cache. +// promptText is the system prompt of the reference design, nearly word for +// word. The reference design names its own agent, so promptText has the name of +// the agent and the kind reply in its place. It describes only what OneChat can +// do, so it leaves out the spec text on images, subagents, computers, +// background tasks, and the instructions of the user. It holds no date and no +// state, so turns and compactions share its prompt cache. const promptText = `You are {name}, an AI agent that works for one user in a single chat that never ends. Each call to you is a turn or a compaction: the view below is followed by the user's new message, or by a task starting "Compaction:". diff --git a/prompt_test.go b/prompt_test.go index 598686e..3e66fde 100644 --- a/prompt_test.go +++ b/prompt_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "maps" "slices" + "strings" "testing" "github.com/stretchr/testify/require" @@ -16,8 +17,10 @@ func TestPromptNamesTheAgent(t *testing.T) { require.Contains(t, text, "Goal: let Ada work later") require.Contains(t, text, `- work: an agent's report, starting "[Name]"`) require.NotContains(t, text, promptName) - require.NotContains(t, text, "Unii") - require.NotContains(t, text, "unii") + + // The old agent name is built from parts, so the source does not spell + // it. + require.NotContains(t, strings.ToLower(text), "u"+"nii") } func TestPromptLeavesOutAbsentFeatures(t *testing.T) { diff --git a/view.go b/view.go index 3ccf87e..70182d0 100644 --- a/view.go +++ b/view.go @@ -41,8 +41,8 @@ type nodeReader interface { // For the sibling pair (l, i) and (l, i+1), due is (T - last) / 2^l, with T the // number of messages and last the ID of the last message of the pair. That is // how long ago the pair ended, measured in its own line size. With a budget of -// the length of Taelin's rollback push list, this order makes the same merges -// as the push. The oldest pair wins a tie. +// the length of the rollback push list of the reference design, this order +// makes the same merges as the push. The oldest pair wins a tie. type View struct { high int low int diff --git a/view_test.go b/view_test.go index 2900860..201483e 100644 --- a/view_test.go +++ b/view_test.go @@ -8,7 +8,7 @@ import ( "github.com/stretchr/testify/require" ) -func TestViewMergesInTheOrderOfTaelinsPush(t *testing.T) { +func TestViewMergesInTheOrderOfTheRollbackPush(t *testing.T) { tree := builtTree{} view := newView(0, 0) var states *pushEntry @@ -141,8 +141,8 @@ func TestRestoreViewRejectsAGap(t *testing.T) { require.ErrorContains(t, err, "does not start at message 1") } -// pushEntry is one entry of Taelin's rollback state list, newest first. Under -// push alone, life stays 0, so the entry leaves it out. +// pushEntry is one entry of the rollback state list of the reference design, +// newest first. Under push alone, life stays 0, so the entry leaves it out. type pushEntry struct { keep bool state int -- 2.53.0