Subtraction and simplicity report · NVIDIA/hyperflare-inference #686

Raw Markdown for agents: https://autobot.eidonix.com/p/b7d9263b-3674-4c86-92fa-eaf55cc30401.md

Key findings

Verdict for this lens: the diff is already lean. Two non-blocking trims, one no-action note, no code-level subtraction applicable.

  1. Single-source duplication (medium, the one worth acting on). docs/core-design.md:1727-1730 restates in near-verbatim form the per-encoder required-mode rule that docs/api.md:666-674 specifies in full — and links to it — while docs/core-design.md:1735 already points into api.md two sentences later. Collapsing the encoder clause to the pointer keeps one authoritative statement of the rule (which is precisely the drift #445 reported) and removes the duplicate pointer.
  2. Tautological tail (low). docs/api.md:670-672 ends with "so generation starts inside the tool-call envelope", which the preceding clause already implies. Seven words.
  3. No action, cosmetic only. The insertion incidentally reflows two unrelated wrap points (docs/api.md:674, docs/core-design.md:1731). This is unavoidable in an insert and is not "unsolicited formatting churn" under AGENTS.md:188-193.
  4. Nothing to delete at code level. A prose-only change cannot add or leave behind flags, config knobs, wrappers, fallback branches, speculative generality, or dead code, and none appears. No existing repo helper or abstraction is duplicated: the vocabulary the new prose uses (Jinja-template, TMLv0, DeepSeek V4/V4.1 prompt encoders, DSML) is the vocabulary docs/api.md:667-672, 720-721, 735, 745 already uses, and the described behavior matches helios/src/frontend/mod.rs:151-156, helios/src/server/request.rs:465-476, and helios/src/frontend/deepseek.rs:272-280.
  5. Conventions followed. Both edits satisfy .agents/skills/repo-prose/SKILL.md:13-14 (not opened) (describe the system as it exists, do not narrate the journey) and :26-29 (present-state specification, replace stale claims rather than layering history). AGENTS.md:165-169 makes "inaccurate documentation" a sufficient merge reason. The one convention blemish — an unexplained identifier — is net-zero under finding 1 below.

All quotes are from head 9ca1f72bd0b40ead0fe13f20364fb876c6607295 (pr_diff, files read at that commit).


Finding 1 — medium: docs/core-design.md:1727-1730 duplicates docs/api.md:666-674 and adds a second pointer to the same file

Verbatim, docs/core-design.md:1727-1732:

`tool_choice=required` requires a completed call to a declared tool;
Jinja-template and TMLv0 prompt encoders also add a system prompt instruction,
while native DeepSeek V4 and V4.1 encoders do not (see the
[API contracts](api.md#conversation-and-tool-semantics)). Without a grammar it
uses ordinary sampling. Named tool
selection filters the definitions to that tool; it does not by itself enable a

The per-encoder split it restates is spelled out in full, with the mechanisms, at docs/api.md:666-674:

tool. Jinja-template and TMLv0 prompt encoders add a system instruction to call
a tool to the prompt. The native DeepSeek V4 and V4.1 prompt encoders add none:
in thinking mode they render required mode identically to `"auto"` so reasoning
starts in `<think>`, and in non-thinking mode their template opens the DSML
tool-call block at the end of the prompt so generation starts inside the
tool-call envelope. In all modes, including DeepSeek thinking mode, completion
validates that generation produced at least one completed call to a declared
tool.

Two problems, one edit:

`tool_choice=none` removes tools from the template. See the [API contracts](api.md)

(docs/core-design.md:1735-1736). The first is a section anchor, the second an unanchored whole-file pointer, so they are not identical, but the reader now gets two "see api.md" nudges inside six lines.

Concrete replacement — keep the design-level invariant, drop the restatement and the extra pointer:

`tool_choice=required` requires a completed call to a declared tool; prompt
encoders differ in the instruction they add (see the
[API contracts](api.md#conversation-and-tool-semantics)). Without a grammar it
uses ordinary sampling. Named tool selection filters the definitions to that
tool; it does not by itself enable a grammar. The encoder requires a completed
call to the selected tool and rejects other tool names. It omits ordinary answer
text but preserves reasoning and arguments.
`tool_choice=none` removes tools from the template. See the [API contracts](api.md)
for the accepted strict schema subset, parser formats, protocol mappings and streamed errors.

That removes 1 line net, removes the bare TMLv0 identifier from the design document, and leaves exactly one pointer per section. If the author prefers to keep the encoder enumeration in core-design.md on purpose, the alternative is to drop the parenthetical link at :1729-1730 and keep only :1735 — but the collapse above is simpler and is the recommendation. Not a blocker either way.


Finding 2 — low: tautological tail at docs/api.md:670-672

starts in `<think>`, and in non-thinking mode their template opens the DSML
tool-call block at the end of the prompt so generation starts inside the
tool-call envelope.

"opens the DSML tool-call block at the end of the prompt" already entails that generation continues inside that block; the trailing clause adds no checkable fact. Replace the three lines with two:

starts in `<think>`, and in non-thinking mode their template opens the DSML
tool-call block at the end of the prompt.

Saves seven words, keeps the observable claim (the prompt ends inside the block) and drops the inference.


Finding 3 — trivial, no action: incidental wrap-point churn

Both are unavoidable consequences of inserting text into a hard-wrapped paragraph. AGENTS.md:188-193 rejects unsolicited formatting churn "by themselves"; this is not that. No change requested.


Checked and clean (so the author need not re-litigate these)

Open questions

  1. Does the author want core-design.md to carry the encoder enumeration (duplicated, drift-prone) or only the invariant plus a pointer? Finding 1 assumes the latter, which is the simpler reading of a document titled "core design".
  2. Which of the two api.md pointers in core-design.md should survive if the enumeration stays — the new anchored one (:1730) or the pre-existing unanchored one (:1735)? Either is defensible; keeping both is the only option that adds nothing.
  3. Human review: the only review on #686 is the bot's; yatesdr, the maintainer who asked for the doc correction in #445, has not commented, and no CI evidence exists for head 9ca1f72.

Referenced