From 3551a3af7159bf451d65835611a69bd5b9f8ec60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Padez?= Date: Sat, 22 Aug 2026 23:53:58 +0000 Subject: [PATCH] give the commander the name it was given MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Named "Platform Deploys" and started in the platform checkout, the second intake asked whether we were working on the urgent routing item or on commanders. The name is the one thing the owner says before anything else — the whole reason they type it into an empty field — and it went nowhere near the model. It was used to title the transcript and for nothing else. So the opening brief now carries it, and says what it is: not decoration, the subject, chosen before anything else was said. Reading a directory with a subject in hand is a different exercise from reading it cold, which is what the first two attempts did. Also invalidates the per-commander query alongside the grid when a turn ends. The first pass at that fixed the list pill and left the header beside it showing the opening brief, so one commander displayed two different wrong names depending on which panel you looked at. Co-Authored-By: Claude Opus 5 --- .../src/apps/CommandHQ/CommandHqDetail.tsx | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx b/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx index 3979a951..c9bfca0b 100644 --- a/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx +++ b/src/workspaces/officerdev/src/apps/CommandHQ/CommandHqDetail.tsx @@ -79,12 +79,15 @@ const NewCommanderGuide = () => ( * before asking anything at all, all live in the Commanders skill — which is re-read from disk every run, so * it can be reworded without a deploy. Duplicating any of it here would create a second copy to drift. */ -const START_BRIEF = [ - 'I have given you a name and a working directory. I have not told you what I want yet — that is what this', - 'conversation is for, and I would rather answer your questions than write a specification up front.', - '', - 'Orient yourself here first, then ask me one question.', -].join('\n'); +const startBrief = (name: string): string => + [ + `You have been named "${name}", and that is the only thing I have told you about what I want.`, + 'It is not decoration — I chose it before anything else, so treat it as the subject and read this', + 'directory looking for what it refers to.', + '', + 'I have not said more than that on purpose. I would rather answer your questions than write a', + 'specification up front, so orient yourself first and then ask me one.', + ].join('\n'); const StartCommanderButton = ({ ready, blockedBy, onStart }: StartCommanderButtonProps) => (
@@ -243,7 +246,10 @@ function NewCommander({ const qc = useQueryClient(); useEffect(() => { if (wasGenerating.current && !chat.isGenerating) { + // Both shapes, not just the grid: the header reads the per-commander query and went stale the same + // way, so the first attempt at this fixed the pill and left the title beside it still wrong. qc.invalidateQueries({ queryKey: ['command-hq', 'commanders'] }); + qc.invalidateQueries({ queryKey: ['command-hq', 'commander'] }); } wasGenerating.current = chat.isGenerating; }, [chat.isGenerating, qc]); @@ -305,7 +311,7 @@ function NewCommander({ onStart={() => // Positional, and the shape is why `opts` was added rather than a tenth slot: displayText is #7. chat.sendPrompt( - START_BRIEF, + startBrief(name.trim()), undefined, undefined, cwd ? { path: cwd } : undefined,