Repository navigation
Ask a department, get that department: room role prompt + its own desk - #247
Merged
Merged
Conversation
A question addressed to Finance in Ask got a mandate and a skill list (DEPARTMENT_FOUNDATIONS) over the same context every department got. The room's role prompts — lens, metrics, pushback, characteristic failure — were only ever read in Plan, so the same Finance answered a convened question with runway arithmetic and an Ask question without it. Prompt (companyChatCore.ts): with a dept_key, the cached static block now carries that department's room role prompt, framed for a one-to-one chat, plus an on-record rule: a figure the answer depends on that is not in the context is named as missing, never invented. Still shared across founders, so the prefix cache keeps paying. registry.ts is safe to import into the chat sidecar: its graph is anthropicCore (model ids, no SDK), preamble and types — checked before choosing not to split the role strings out. Context (ChatContext.compose): a "<Dept> desk" block — the brief fields that department owns (runway/constraints to Finance, traction to Sales, problem to Marketing/Design, goal to all; an empty one reads "not on record"), its done and open tasks, and up to 4 of its own filed deliverables. Desk items are excluded from the ranked prior work so none is excerpted twice. Four of the five interview fields that reached no prompt at all now reach the department that needs them. The desk follows the SAME department the prompt answers as (deptKeyFor: task, chip, or text), not only the chip — otherwise "ask finance about runway" got Finance's lens over a context with none of Finance's work. Deliverables resolve through deptKey(forSourceTaskId:), so Team Build drafts land on the right desk. Verified: jest 1068/1068; ChatContext suites 42/42 incl. 5 new desk tests; department/speaker suites pass (host restarts are the known 26.2 isolated-deinit crash — same count on main). In the app on a real account, "Ask Finance: how many months of runway…" answered "it is not on record", named both open Finance tasks and the locked pricing decision. Co-Authored-By: Claude Opus 5.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
When the founder addresses one department in Ask (chip, roster tap, or "ask finance…" in the text), the answer now comes from that department's room role prompt and its own desk, not a generalist with a department label.
Prompt (
companyChatCore.ts): the room's role prompt (lens, metrics, pushback, characteristic failure) joins the cached static block, plus an on-record rule: a figure the answer depends on that isn't in context is named as missing, never invented. An ordinary turn is byte-identical to before.Context (
ChatContext.compose): a<Dept> deskblock containing:Desk items aren't repeated in the ranked prior work.
Store: the desk follows the same
deptKeythe prompt uses (task, chip, or text), and deliverables resolve throughdeptKey(forSourceTaskId:), so Team Build drafts count too.This is step 1 of "one founder runs the whole company". Per-department memory and single-department routing in the room come later.
Verified
mainNote
Department answers run longer than the usual 2–4 sentences when they show their arithmetic. The prompt allows that on purpose; worth a look in testing.
🤖 Generated with Claude Code