fix(amicode): context tree never surfaces user prompt text - #83
Merged
Conversation
Turn branches in the thinking-animation context tree carried a 26-char
excerpt of the user's prompt ("I · optimize a CZ gate"). Drop the
excerpt — turns are now anonymous roman numerals, and the tree surfaces
only the context amico checks and the scripts it writes. The prompt
plumbing (ContextTurn.title, turnTitle) is removed entirely so prompt
text never reaches the tree layer.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The "amico is thinking" context tree (top panel) labeled each turn branch with a 26-char excerpt of the user's prompt —
I · optimize a CZ gate. This PR deletes that: turn branches are now anonymous roman numerals, and the tree surfaces only the context amico checks and the scripts it writes (notes / source / skills / agents — the commit-type touches it already charts).Why
The thinking animation is a map of the agent's working context, not a transcript. Echoing the user's prompt into it duplicates what the chat already shows, and leaks conversation text into a surface that's meant to chart files and tools.
How
context-tree-data.ts—ContextTurn.titleremoved; turn label is justroman(n). A comment marks the no-prompt-text rule as a design decision so excerpts don't get re-added.context-tree-panel.tsx—turnTitle()(the prompt-text extractor) and its wiring deleted, so prompt text never reaches the tree layer at all — including the canvas labels and the keyboard/screen-reader announcements that readnode.label.["I", "II"]labels; engine-test fixture no longer models prompt text.Out of scope (verified, not touched): the retired brain strip ("plate N · prompt excerpt") has no live mount, and the timeline's
reasoningHeadingderives from the model's reasoning headings, not the prompt.Verification
bun testcontext-tree-data + context-tree-engine: 20/20 passtsgotypecheck: all 23 packages pass (pre-push hook)npm run lint(oxlint): 0 errors🤖 Generated with Claude Code