Dodaios is an open-source agent OS for your desktop: it runs your coding agents, browser and apps by voice or chat, on your own machine. Formerly Personal Jarvis.
Python agent-orchestrationai-agentai-coding-assistantclaude-codecoding-agentcomputer-usedesktop-applocal-firstmcppersonal-jarvisvoice-assistantvoice-coding
perf(agentic-ide): write terminal briefs in 1-5s without thinking
Haraldb3621558b249
diff --git a/jarvis/agentic_ide/prompt_blueprint.py b/jarvis/agentic_ide/prompt_blueprint.pyindex a81b1d9b11..71ef3c51f6 100644--- a/jarvis/agentic_ide/prompt_blueprint.py+++ b/jarvis/agentic_ide/prompt_blueprint.py@@ -32,19 +32,16 @@ made the receiving agent behave *worse*:can never open, which is worth exactly as much as writing nothing. Therecent turns travel with the instruction (``conversation``) so the referencecan be replaced by what it stands for.-* **Full specification up front.** Complete does not mean prescriptive: the- agent should not have to come back with questions, which is a statement- about the CONTEXT it was handed, not about how many steps were dictated.-* **The reason, not only the request.** A model connects a task to the right- context when it knows the intent behind it, so ``## Why this matters`` earns- its place whenever the intent is actually known.-* **Scope as intent, not as a prohibition list.** The first version listed- what the agent must not do (no surrounding cleanup, no unrequested- refactors, no speculative abstractions, no defensive handling). Anthropic's- own measured replacement for exactly that failure mode is an intent- instruction — deliver what was asked at the scope intended, make routine- judgement calls, flag rather than silently widen — which in testing cut- scope drift to near zero without producing extra clarifying questions.+* **A lean brief, not a map of the code.** Complete means the agent has the+ task and the starting ``@files``, not that the writer narrated how those+ files work. The agent opens them. A 1400-2400 character specification+ (2026-07-27) cost 10-30 s of thinking and then made the agent re-read the+ same files; the 2026-08-18 mandate is 1-5 s, cleaned speech plus key files.+* **Scope lives in the task, not in a prohibition list.** The first version+ listed what the agent must not do (no surrounding cleanup, no unrequested+ refactors, no speculative abstractions). Anthropic's own measured+ replacement is an intent instruction — deliver what was asked at the+ scope intended — which cut scope drift without extra clarifying questions.* **No verification ritual.** "If your prompt contains explicit verificationinstructions … remove them: instructions like these cause over-verification… and removing them reduces wasted tokens with no loss in quality." Success@@ -66,6 +63,7 @@ spoken language pulls same-language commit messages and comments after it. The*spoken readback* to the user is unaffected — that stays in the turn'sresolved output language."""+from __future__ import annotationsimport re@@ -81,54 +79,31 @@ from .task_kind import ()# The hard ceiling. MAX_PROMPT_CHARS is the transport cap above this.-# Set above what real briefs measure rather than at it: a limit the writer-# breaches on every ordinary composition teaches it that the limits in this-# prompt are approximate, and the ones that matter — invent nothing, never end-# on a reference — are not.-MAX_BODY_CHARS = 3600--# What a GOOD prompt weighs, which is a different question from what is allowed.-# Both bounds were learned the hard way and BOTH are load-bearing:-#-# * Without a stated target the writer is brief — three live compositions came-# back at 549 / 865 / 904 characters, and a lean-prompt A/B on 2026-07-27-# produced a `## Done when` reading "the time taken is reduced", which is not-# an acceptance criterion at all. A model reads "keep it under N" as "be-# brief", so the target has to be said out loud.-# * The old 1800-3200 target then bought length from the wrong place. The brief-# it produced measured 3801 characters — over its own ceiling — and spent the-# surplus dictating an implementation the agent should have chosen itself.-#-# So the target came down and the rules changed what the words are spent ON:-# describing the code that exists, not prescribing the code to write. Every-# character also costs the user real waiting time — 3801 characters took 21.8 s-# against 16.0 s for a leaner brief on the same writer.-TARGET_MIN_CHARS = 1400-TARGET_MAX_CHARS = 2400+# Set above what a lean brief plus a dropped-file description measures, not+# at the target: a limit the writer breaches on every ordinary composition+# teaches it that the limits in this prompt are approximate.+MAX_BODY_CHARS = 1800++# What a GOOD prompt weighs. The 1400-2400 target (2026-07-27) bought a+# specification the agent then re-read from the same @files, and the writer+# spent 10-30 s of thinking plus generation on it. A competitor Flash call+# that cleaned the spoken sentence and attached the neighbouring files landed+# a comparable brief in about a second (maintainer, 2026-08-18). The target+# is therefore the cleaned task plus a short Key files list — not a map of+# the code the agent is about to open.+TARGET_MIN_CHARS = 280+TARGET_MAX_CHARS = 900_SKELETON = """\## Task-<what must be achieved, in the imperative - two to four sentences naming the-concrete symbols, files and behaviours involved>--## Why this matters-<the intent behind the request, and what breaks or improves for the user --ONLY when known or clearly derivable>--## How it works today-<the current behaviour in real symbol names: which function does what, who-calls it, which state it keeps>+<what must be achieved, in the imperative - one to three sentences>## Key files-- `@path/to/file` - what lives here and which symbol in it matters+- `@path/to/file` - why this file is the starting point- `@path/to/other` - same, specifically-## Scope-<the bound the user actually drew>-## Done when-- <an observable outcome>-- <an observable outcome>\+- <an observable outcome the user actually stated>\"""_SHARED_RULES = f"""\@@ -168,24 +143,20 @@ Markdown, exactly this skeleton:- `## Task` is mandatory; every other section is OPTIONAL. Omit any you cannot \ground rather than padding it.-DESCRIBING is not INVENTING, and the difference decides how good this brief is:-- INVENTING is forbidden: a requirement, constraint, boundary or success \+INVENTING is forbidden: a requirement, constraint, boundary or success \criterion the user did not state and the workspace does not establish. `## Done \when` holds only what the user asked for or what the repository itself \-determines (its test command, its lint gate); `## Scope` only a line the user \-actually drew. Omit either otherwise.-- DESCRIBING is wanted, in detail: what the code in the outlines does, which \-function is called from where, what the workspace profile and house rules \-impose. That is context you were handed and the agent would otherwise rediscover.+determines (its test command, its lint gate). Omit it otherwise. Do not add a \+`## Scope` or `## How it works today` section - the agent will open the @files \+and discover the current code itself.+- Aim for {TARGET_MIN_CHARS}-{TARGET_MAX_CHARS} characters, never over \-{MAX_BODY_CHARS}. Under 800 you have dropped context you were given. Length \-comes from concrete file, symbol and behaviour detail - never from filler, \-restatement, hedging or dictated steps.+{MAX_BODY_CHARS}. Length comes from a clean task and a concrete Key files \+list, never from restating the files' internals, hedging or dictated steps.- `@path` references only inside `## Key files`, only from the candidate list, \-each naming the symbol that matters ("`_fuse_ranked()`, which merges the ranked \-lists before the relevance gate" beats "the ranking pipeline"). Never end the \-prompt on an `@path` or `/command` - a trailing reference holds the agent's \-completion popup open and the prompt is never submitted.+each with one short reason. Never end the prompt on an `@path` or `/command` \+- a trailing reference holds the agent's completion popup open and the prompt \+is never submitted.- ENGLISH, whatever language the user spoke.- Preserve every constraint, file, symbol and intent expressed; drop speech \artefacts and the clause addressing the agent by name.@@ -210,15 +181,14 @@ This is an IMPLEMENTATION task. Specific to it:coming back with questions: the behaviour that must exist afterwards, how it \should behave when things go wrong, and any constraint it has to respect. \Complete means the agent lacks no context - not that you dictated the steps.-- `## How it works today` is close to mandatory here: the function the change \-lands in, what it currently does, and who calls it - the agent cannot fit a \-change into code it has to find first. Give it the MAP, not every path; the \-helpers it will meet on its own do not need listing.-- `## Scope` only when the user actually drew a line. Do not fill it with \-generic don'ts - "no unrequested refactors", "no speculative abstractions", "no \-surrounding cleanup" are things the agent already gets right, and spending the \-section on them costs the place a real boundary would have gone.-- `## Done when` states observable outcomes, not activities.\+- Point at the starting files. Do not narrate how those files work today - \+the agent will open them. A symbol name from the outline is enough.+- A bound the user actually drew belongs in `## Task`, not in a separate \+section. Do not fill the brief with generic don'ts - "no unrequested \+refactors", "no speculative abstractions", "no surrounding cleanup" are \+things the agent already gets right.+- `## Done when` states observable outcomes, not activities, and only when \+the user stated one or the workspace names the test command.\""",KIND_REVIEW: """\This is a REVIEW task. Specific to it:@@ -243,9 +213,8 @@ would confirm it. Say so explicitly.a fix before the user has seen it.- Carry across every symptom, error message, timing and reproduction detail \the user gave, VERBATIM. Those are the evidence; do not summarise them away.-- Describe the path the code takes through the area under suspicion, in real \-symbol names, and name the places where it could plausibly go wrong. Giving \-the agent the map is not the same as giving it the answer.\+- Point at the files under suspicion. Do not walk the path for the agent - \+it will open the @files.\""",KIND_QUESTION: """\This is a QUESTION. Specific to it:@@ -262,8 +231,8 @@ The kind of work is not clearly determined. Stay with what the user said:- State the task as they framed it, at the scope they framed it. Do not \sharpen an open request into a specific one - if they were broad, the agent \gets to decide where to start.-- Still describe the relevant code as it stands today. Being unsure which KIND \-of work this is is no reason to hand over less context.+- Attach the candidate files. Do not fill in a map of the code - being unsure \+which KIND of work this is is no reason to write a longer brief.- If they described a problem rather than asking for a change, say that the \deliverable is the assessment.\""",@@ -313,8 +282,8 @@ The user DROPPED one or more files into this instruction, and their contents \are given above. Specific to that:- Carry the substance across. The agent may not be able to open an image at \all, so the description is its only view of it: put what the image actually \-shows into `## How it works today` or `## Task`, in detail, rather than \-writing "the screenshot the user dropped".+shows into `## Task`, in detail, rather than writing "the screenshot the \+user dropped".- Quote the exact strings. Error messages, stack traces, labels and code from \an attachment go into the prompt VERBATIM — those are what the agent will \search the repository for, and a paraphrase cannot be grepped.@@ -382,16 +351,14 @@ def user_block(else "(no candidate files matched - omit the Key files section)")parts.append(- "CANDIDATE FILES (repo-relative; use only these in @ references)\n"- + candidate_block+ "CANDIDATE FILES (repo-relative; use only these in @ references)\n" + candidate_block)spoken = conversation_module.render(conversation or ())if spoken:parts.append("THE CONVERSATION THIS CAME OUT OF (oldest first; the agent will "- "never see any of it, so resolve every back-reference against it)\n"- + spoken+ "never see any of it, so resolve every back-reference against it)\n" + spoken)parts.append(diff --git a/jarvis/agentic_ide/prompt_composer.py b/jarvis/agentic_ide/prompt_composer.pyindex 1ff58dea3c..83d1b05cab 100644--- a/jarvis/agentic_ide/prompt_composer.py+++ b/jarvis/agentic_ide/prompt_composer.py@@ -16,20 +16,19 @@ happens when any of that is unavailable.What the composed prompt contains, and why each part earns its place:-* **A briefed task in markdown**, not a rephrased sentence. Opus 5 and Fable 5- both work best from a complete specification given up front, so the prompt- states the task, why it matters, the files, the scope bound, and what done- looks like — dropping any section it cannot ground rather than padding it.+* **A briefed task in markdown**, not the raw transcript. The task, the+ neighbouring ``@files``, and a ``## Done when`` only when the user stated+ one — dropping any section it cannot ground rather than padding it. The+ agent opens those files; the brief does not narrate them.* **File references in the agent's own syntax** (``@path``), inside the Keyfiles list with a reason each. Both supported CLIs read ``@`` as "pull thisfile into context", which removes the agent's entire opening round of blindsearching. Paths come from the workspace file index — never invented, andevery one is verified to exist before it ships.-* **Real symbol names**, because the writer reads a bounded outline of those- files first (``code_skeleton``). Without it the prompt can only say "the- ranking logic" where it could say ``_fuse_ranked()``.-* **The repository's own house rules**, so ``## Done when`` cites the project's- actual test command instead of inventing a plausible one.+* **A slim outline of the top files**, so the writer can name a real symbol+ in the Key files list (``_fuse_ranked()`` instead of "the ranking logic")+ without pasting the module. House rules stay out: the receiving agent+ already has them.Two-layer construction, because the product must work for a downloader with noAPI key at all (§3):@@ -52,44 +51,32 @@ API key at all (§3):The composer is honest about which layer produced the result (``composed_by``),because the readback the user hears should not claim more than happened.-**On latency (deliberate trade, maintainer decision 2026-07-25).** An earlier-change routed this through the router-tier model the voice turn already held,-because a rewrite took 1-3 s there against 7-8 s on the deep tier. That-optimised the wrong axis: the maintainer's instruction was that these prompts-must be accurate about the codebase and "must not be dumb", and chose the-slower, better prompt explicitly. Reading file outlines costs more still. So-the composer takes its time and the bound below is generous — what must never-happen is a silent demotion to a weaker model, because nobody inspects a prompt-that looks fine.--**What was made faster, and what deliberately was not.** The model's own-writing is the wait, and shortening it means a shorter brief — the one thing-this module exists not to do. What WAS serial and did not need to be is the-preparation around it: resolving the writer (a config load plus a subscription-probe per candidate CLI) ran on the event loop and finished before the first-file was opened, and the file outlines were read before the house rules were.-All of that now overlaps and none of it runs on the loop, so the model call-starts as soon as the slowest single piece of preparation is done instead of-after their sum.--Measured again live 2026-08-12 (09:54, T1+T3): the writer call was 95%+ of a-72 s delivery, and two things inside it were pure overhead. First, every-subscription-CLI turn paid to start MCP servers, skills, and session-persistence it can never use — the CLI brain now switches those off for-structured turns (see ``claude_cli``), which cut the same real payload from-27.5 s to 16.4 s with the brief unchanged. Second, a slow writer was waited-out IN FULL before anyone else was allowed to start; attempts now overlap-after ``HEDGE_AFTER_S`` and the first valid brief wins, which bounds the tail-without demoting the model.--**On the silence.** The rest is perceived latency: for 10-27 s nothing at all-was said, so a working composer and a wedged one looked identical. The three-beats below (``start`` → ``thinking``/``drafting`` → ``ready``, and ``sent``-once the pane took it) are printed as they happen, and each one names the pane-it belongs to — with a fleet composing at once, an unattributed line is worse-than none. They are terminal lines, so they follow the English-artifact rule-like every other log line; the SPOKEN readback the user hears is a separate-surface and stays in the turn's resolved output language.+**On latency (maintainer decision 2026-08-18, supersedes 2026-07-25).** The+2026-07-25 trade sent this through a thinking model and asked for a 1400-2400+character specification of the code. Live that was 10-30 s of writing for a+job that is: clean the spoken sentence, attach the neighbouring ``@files``.+A competitor Flash call did the same job in about a second, at comparable+quality. The tolerance is therefore 1-5 s. Thinking is off+(``reasoning_effort="none"``), the brief is lean (see ``prompt_blueprint``),+and house rules stay out of the writer prompt because the receiving agent+already has them. What must still never happen is a silent demotion to a+weaker *quality tier* — a fast Flash/Tool-Model writer is the intended+rung, not a fallback.++Preparation still overlaps: resolving the writer and reading a slim outline+of the top files run together so the model call starts as soon as the+slowest single piece is done.++A slow writer is still hedged after ``HEDGE_AFTER_S`` / ``HEDGE_AFTER_API_S``+and the first valid brief wins. The hedge is insurance against a hang, not+the path to a 1 s brief.++**On the silence.** The beats below (``start`` → ``thinking``/``drafting`` →+``ready``, and ``sent`` once the pane took it) are printed as they happen,+and each one names the pane it belongs to. They are terminal lines, so they+follow the English-artifact rule like every other log line; the SPOKEN+readback the user hears is a separate surface and stays in the turn's+resolved output language."""from __future__ import annotations@@ -168,7 +155,10 @@ HEDGE_AFTER_S = 30.0# healthy band, so the double spend stays as rare as it is for the CLI.## Since 2026-08-18 the CEILING for an API writer — see ``_hedge_after_s``.-HEDGE_AFTER_API_S = 20.0+# Tightened 20 → 8 s the same day: a no-thinking Flash/Tool-Model brief is+# supposed to land inside 5 s, so a 20 s first-boot ceiling let a hung+# writer sit four times the tolerance before insurance even started.+HEDGE_AFTER_API_S = 8.0# The insurance threshold calibrates itself to the writer actually in use.#@@ -632,25 +622,13 @@ def _rescue_writer(tried: Sequence[str]): # noqa: ANN202 - (Brain | None, str)return resolve_rescue_writer(cli_timeout_s=COMPOSE_TIMEOUT_S, exclude=tuple(tried))-# How much of the repository's agent instructions to carry. Enough for the-# headline conventions; far short of pasting a whole CLAUDE.md into every call.-_HOUSE_RULES_CHARS = 1200---def _house_rules(session) -> str: # noqa: ANN001 - Session, avoid an import cycle- """The repository's own conventions, so ``## Done when`` stays grounded.-- Without this the writer has to guess a test command, and a guessed one is- exactly the kind of invented acceptance criterion the blueprint forbids.- """- from .code_skeleton import skeleton_for-- names = list(getattr(session.profile, "instruction_files", None) or [])- for name in names:- text = skeleton_for(session.folder, name, max_chars=_HOUSE_RULES_CHARS)- if text:- return f"From {name}:\n{text}"- return ""+# Slim outlines only. The receiving agent opens the @files itself; a handful+# of signatures is enough for the writer to name a real symbol. The previous+# 5 × 9 k / 34 k budget (plus a 1200-char house-rules dump) was most of the+# input tokens on every call, and house rules already live in the agent's+# own system prompt.+_OUTLINE_FILES = 3+_OUTLINE_CHARS = 1_800async def _llm_compose(@@ -675,18 +653,16 @@ async def _llm_compose(# Deterministic rewriting, not creative writing: the prompt must carry# the user's intent, so temperature stays low.temperature=0.2,- # Generous, because on a thinking model max_tokens covers the THINKING- # as well as the answer. Measured: at 3000 with medium effort, a live- # investigation brief was cut off mid-sentence ("...to find") and still- # returned as a success. The brief itself never exceeds MAX_BODY_CHARS;- # the headroom exists so the reasoning cannot eat the answer.- max_tokens=8000,+ # The brief itself is capped well below this (see prompt_blueprint).+ # Thinking is off, so the budget no longer has to cover a reasoning+ # trace — 2048 is a lean brief plus a dropped-file description, not+ # the 8000 that existed so medium effort could not eat the answer.+ max_tokens=2048,stream=True,- # Turning a spoken sentence plus a set of file outlines into a briefed- # task is judgement work, not transcription. The documentation is- # explicit that thinking disabled performs worse than a modest effort at- # comparable cost, and "none" is what made this a rephraser.- reasoning_effort="medium",+ # Maintainer 2026-08-18: writing this brief is "what was said, plus+ # the neighbouring @files". Medium effort was the 10-30 s wait. Gemini+ # maps "none" to thinking_budget=0; providers without a knob ignore it.+ reasoning_effort="none",)chunks: list[str] = []async for delta in brain.complete(request):@@ -701,19 +677,23 @@ async def _read_context(session, # noqa: ANN001 - Session, avoid an import cyclecandidates: list[str],) -> tuple[dict[str, str], str]:- """The file outlines and the repository's house rules, read at once.+ """Slim file outlines for the writer. House rules are not included.- Both are disk IO on a path a voice turn is waiting on, and neither needs- the other's result. They used to be awaited one after the other for no- reason beyond the order they were written in.+ The receiving agent already has the repository's instruction files in its+ own prompt; pasting them here cost tokens and thinking time without+ changing what the pane does. Outlines stay, tightly bounded, so the+ writer can name a real symbol in ``## Key files``."""from .code_skeleton import skeletons as read_skeletons- outlines, house_rules = await asyncio.gather(- asyncio.to_thread(read_skeletons, session.folder, candidates),- asyncio.to_thread(_house_rules, session),+ outlines = await asyncio.to_thread(+ read_skeletons,+ session.folder,+ candidates,+ max_files=_OUTLINE_FILES,+ max_total=_OUTLINE_CHARS,)- return outlines, house_rules+ return outlines, ""async def _compose_once(@@ -822,9 +802,10 @@ async def compose("""Build the prompt for ``terminal_name`` out of what the user said.``brain`` pins the writing model explicitly. Leave it None — the default- resolves a quality-tier model and degrades openly when none is reachable.- Passing a fast model here trades prompt accuracy for a few seconds, which- is the trade the maintainer decided against on 2026-07-25.+ resolves the writer ``jarvis.agentic_ide.writer`` chose (Tool Model first+ under ``auto``) and degrades openly when none is reachable. The call+ itself is a no-thinking rewrite; a slower pin is still honoured, it just+ should not be the default.``attachments`` are ``drop_analysis.DropAnalysis`` entries for files theuser dropped alongside the instruction — a described screenshot, andiff --git a/jarvis/core/protocols.py b/jarvis/core/protocols.pyindex 6c8ca6b839..7386c238aa 100644--- a/jarvis/core/protocols.py+++ b/jarvis/core/protocols.py@@ -110,19 +110,13 @@ class BrainRequest:# Hint for providers whose models spend internal reasoning ("thinking")# tokens before answering. "none" asks the provider to disable/minimize# internal reasoning for THIS call — used by small deterministic- # structured-output calls (Computer-Use actions/judges) where thinking- # would eat the whole ``max_tokens`` budget and truncate the visible- # reply. The graded levels serve callers whose OUTPUT is the product: the- # Agentic IDE's prompt composer passes "medium" because turning a spoken- # sentence plus a set of file outlines into a briefed task is judgement- # work, and "none" is what once made it a mere rephraser.+ # structured-output calls (Computer-Use actions/judges) and by the+ # Agentic IDE prompt composer, where thinking was the 10-30 s wait on a+ # job that is "clean the spoken sentence and attach the neighbouring+ # files". The graded levels remain for callers whose OUTPUT is still+ # judgement work (the work splitter still passes "medium").# ``None`` keeps the provider default; providers without a reasoning knob# ignore the field (capability hint, never a hard switch).- #- # The graded levels were added 2026-07-26: the composer had been passing- # "medium" into a field declared to accept only "none" since it was- # written, which survived only because nothing validates this. An- # annotation that is wrong is worse than none — the next caller trusts it.reasoning_effort: Literal["none", "low", "medium", "high"] | None = None@@ -330,7 +324,11 @@ class Brain(Protocol):supports_tools: boolsupports_vision: bool- async def complete(self, req: BrainRequest) -> AsyncIterator[BrainDelta]:+ # Declared WITHOUT ``async``: every implementation is an async GENERATOR,+ # so calling it returns the iterator directly and no call site awaits it.+ # An ``async def`` here would type the call as a coroutine and make every+ # ``async for delta in brain.complete(req)`` a false type error.+ def complete(self, req: BrainRequest) -> AsyncIterator[BrainDelta]:"""Stream a response. When stream=False everything is in the first delta."""...diff --git a/jarvis/ui/web/agentic_ide_routes.py b/jarvis/ui/web/agentic_ide_routes.pyindex 60c38b3f65..f5565c334d 100644--- a/jarvis/ui/web/agentic_ide_routes.py+++ b/jarvis/ui/web/agentic_ide_routes.py@@ -3475,12 +3475,13 @@ async def terminal_prompt(request: Request, name: str, req: PromptRequest) -> di# point the agent at files that are not in its tree.session, term_for_compose = found- # Composition is 10-30 s of real model work, and the typed prompt- # bar used to show a silent spinner for all of it. The composer's- # own beats ride the app socket so every client can narrate the- # wait; the stdout line stays, because a headless install watches- # THAT. A dry run keeps the default sink — it is a preview, and- # progress lines about a prompt nobody asked to send are noise.+ # Composition is a no-thinking rewrite (target 1-5 s) and the+ # typed prompt bar used to show a silent spinner for all of it.+ # The composer's own beats ride the app socket so every client+ # can narrate the wait; the stdout line stays, because a+ # headless install watches THAT. A dry run keeps the default+ # sink — it is a preview, and progress lines about a prompt+ # nobody asked to send are noise.beat_bus = getattr(request.app.state, "bus", None)on_progress = Noneif beat_bus is not None and not req.dry_run:diff --git a/tests/unit/agentic_ide/test_compose_progress_route.py b/tests/unit/agentic_ide/test_compose_progress_route.pyindex 8a66ebc5a9..c98b53247d 100644--- a/tests/unit/agentic_ide/test_compose_progress_route.py+++ b/tests/unit/agentic_ide/test_compose_progress_route.py@@ -1,6 +1,6 @@"""The typed prompt bar hears the brief being written, beat by beat.-Composition is 10-30 s of real model work. The composer has always narrated+Composition is a no-thinking rewrite (target 1-5 s). The composer has always narratedits stages, but for a typed send that narration went to stdout — the one placethe desktop user is guaranteed not to be looking — so the bar showed a silentspinner and a working composer was indistinguishable from a wedged one. Thediff --git a/tests/unit/agentic_ide/test_prompt_blueprint.py b/tests/unit/agentic_ide/test_prompt_blueprint.pyindex 58ee171345..e6c7aae7f5 100644--- a/tests/unit/agentic_ide/test_prompt_blueprint.py+++ b/tests/unit/agentic_ide/test_prompt_blueprint.py@@ -8,6 +8,7 @@ request. So the guardrails are asserted POSITIVELY: the prohibition must bepresent and phrased as one. Whether the writer model then obeys is a livequestion, not a unit-test question."""+from __future__ import annotationsimport pytest@@ -49,8 +50,20 @@ def test_every_kind_demands_the_markdown_skeleton(kind):text = system_prompt(kind)assert "## Task" in textassert "## Key files" in text- assert "## Scope" in textassert "## Done when" in text+ # A lean brief: the agent opens the @files, so these sections stay out+ # of the skeleton (they may still be named in the "do not add" rule).+ skeleton = _skeleton_only(text)+ assert "## How it works today" not in skeleton+ assert "## Why this matters" not in skeleton+ assert "## Scope" not in skeleton+++def _skeleton_only(text: str) -> str:+ """The markdown skeleton block, not the surrounding rules that mention it."""+ start = text.find("## Task")+ end = text.find("- Output ONLY the brief")+ return text[start:end] if start != -1 and end != -1 else text@pytest.mark.parametrize("kind", _ALL_KINDS)@@ -126,8 +139,9 @@ def test_implement_specifies_the_outcome_without_dictating_the_route():assert "Specify the OUTCOME completely" in text# Complete must be defined as context, not as dictated steps.assert "not that you dictated the steps" in text- # And the generic prohibition list must stay OUT of `## Scope`.- assert "only when the user actually drew a line" in text+ # A bound the user drew belongs in the task, not in a Scope dump.+ assert "A bound the user actually drew belongs in `## Task`" in text+ assert "Do not narrate how those files work today" in textdef test_question_forbids_changing_anything():@@ -247,26 +261,24 @@ def test_the_target_length_sits_inside_the_hard_ceiling():@pytest.mark.parametrize("kind", _ALL_KINDS)def test_every_kind_states_the_target_length_not_only_the_ceiling(kind):- """Both bounds, and a floor that names what a too-short brief dropped.+ """Both bounds, and the words are spent on the task plus key files.- "Be thorough" used to carry the floor and it bought length from the wrong- place — the writer padded with dictated implementation steps rather than- with description. The floor is now stated as the thing actually missing- from a thin brief: context the writer was handed and did not pass on.+ The 1400-2400 floor bought a map of the code the agent then re-read from+ the same @files. The new target is the cleaned task plus a Key files list."""text = system_prompt(kind)assert str(TARGET_MIN_CHARS) in textassert str(TARGET_MAX_CHARS) in text- assert "Under 800 you have dropped context you were given" in text+ assert "clean task and a concrete Key files" in text@pytest.mark.parametrize("kind", _ALL_KINDS)-def test_every_kind_separates_describing_from_inventing(kind):- """The anti-invention rule was suppressing legitimate description too."""+def test_every_kind_forbids_inventing_without_asking_for_a_code_map(kind):+ """Invent nothing, and do not narrate the files the agent will open."""text = system_prompt(kind)- assert "DESCRIBING is not INVENTING" in textassert "INVENTING is forbidden" in text- assert "DESCRIBING is wanted" in text+ assert "the agent will open the @files" in text+ assert "DESCRIBING is wanted" not in text@pytest.mark.parametrize("kind", _ALL_KINDS)@@ -286,9 +298,9 @@ def test_every_kind_asks_for_the_goal_and_not_the_implementation(kind):@pytest.mark.parametrize("kind", _ALL_KINDS)-def test_every_kind_offers_the_current_behaviour_section(kind):- """Describing today's code is what saves the agent a discovery round."""- assert "## How it works today" in system_prompt(kind)+def test_no_kind_asks_the_writer_to_map_todays_code(kind):+ """The agent opens the @files. Narrating them was the 10-30 s wait."""+ assert "Do not add a `## Scope` or `## How it works today` section" in system_prompt(kind)def test_no_kind_tells_the_writer_to_keep_it_short():diff --git a/tests/unit/agentic_ide/test_prompt_composer.py b/tests/unit/agentic_ide/test_prompt_composer.pyindex 0de6790468..2c814a8635 100644--- a/tests/unit/agentic_ide/test_prompt_composer.py+++ b/tests/unit/agentic_ide/test_prompt_composer.py@@ -349,6 +349,31 @@ async def test_an_explicitly_pinned_brain_is_used(assert seen["brain"] is pinned+async def test_the_writer_call_disables_thinking() -> None:+ """The 10-30 s wait was medium-effort reasoning. This brief is a rewrite."""++ class Brain:+ def __init__(self) -> None:+ self.requests: list[object] = []++ async def complete(self, request): # noqa: ANN001, ANN202 - protocol fake+ self.requests.append(request)+ yield type("Delta", (), {"content": "## Task\nDo it."})()++ brain = Brain()+ text = await prompt_composer._llm_compose( # noqa: SLF001+ brain=brain,+ system_prompt="sys",+ user_block="user",+ )++ assert text == "## Task\nDo it."+ assert len(brain.requests) == 1+ request = brain.requests[0]+ assert request.reasoning_effort == "none"+ assert request.max_tokens == 2048++# --------------------------------------------------------------------------# The deterministic filler pass may not eat words that carry the instruction# --------------------------------------------------------------------------diff --git a/tests/unit/core/test_brain_request_reasoning_effort.py b/tests/unit/core/test_brain_request_reasoning_effort.pyindex c7c39d55bd..8b008aa632 100644--- a/tests/unit/core/test_brain_request_reasoning_effort.py+++ b/tests/unit/core/test_brain_request_reasoning_effort.py@@ -18,8 +18,8 @@ def test_declared_values_cover_every_level_in_use() -> None:assert {"none", "low", "medium", "high"} <= set(literal)-def test_medium_is_accepted_by_the_agentic_ide_composer() -> None:- """The composer's live value: judgement work, not transcription."""+def test_medium_is_accepted_by_the_work_splitter() -> None:+ """The work splitter still passes medium; the composer now passes none."""request = BrainRequest(messages=(), reasoning_effort="medium")assert request.reasoning_effort == "medium"