Skip to content

Tool-schema descriptions are 85% of the acting-turn prompt on fail-open turns; measure before trimming #1924

Closed as not planned

Description

@malibio

Split from #1922 — genuinely separate scope: this is prompt-mass reduction for tool schemas specifically, not a scenario-6 fix.

Finding

Captured the full turn-1 acting prompt for agent-matrix scenario 6 (20,005 chars, zero conversation history, fresh purged DB, gemma-4-e4b-q4km). Section breakdown:

system prose (identity + guidance): 3,043 chars (15%)
tool declarations (12 tools):      16,962 chars (85%)

Per-tool sizes:

3,310  create_schema
3,195  search_nodes
2,953  search_semantic
2,329  update_schema
1,133  create_node
  683  update_node
  597  create_relationship
  551  create_nodes_from_markdown
  546  get_related_nodes
  475  get_node
  427  update_task_status
  286  delete_node

Top 4 tools account for 11,787 of 16,485 chars (71%) of all tool-schema text, sent in full on every turn those tools are offered — none of it retrieved or summarized adaptively.

Why this is NOT a simple trim (checked, not assumed)

Read create_schema's full rendered description directly. Most of its size is genuinely load-bearing argument-shape content per ADR-064 rule 1 — required-field rules, the title_template↔fields cross-reference constraint, coreValues validation requirements. This is correctly-placed content, not padding.

A confound in the specific measurement

The 20,005-char turn measured landed on routing::fail_open_surface (12 tools, near-maximum surface) because no skill cleared the score gate that turn — a routing-miss symptom, not purely tool-description verbosity. Fixing routing reliability would also reduce prompt size on fail-open turns, for free. Worth checking whether fail-open frequency is itself a measurable, fixable rate before concluding tool-schema size is the primary lever.

Proposed approach, mirroring #1813's rigor (do not skip this)

#1813 ("reduce the resident prompt") required: a repaired measurement harness, a non-adversarial case set, before/after size AND success-rate comparison, and an explicit non-goal against re-occupying the channel with differently-worded content. The same discipline should apply here before any tool-schema description is shortened — this is shared, load-bearing surface across the whole tool registry, and ADR-064 rule 1 gives tool schemas argument-shape authority for a measured reason (100% compliance vs 62.5% absent, 87.5% for prose).

Acceptance criteria

Reference

Activity

  1. malibio commented on Aug 2, 2026

    @malibio
    CollaboratorAuthor

    Classification + fail-open frequency measurement

    Per-sentence classification of the top 4 tools' descriptions (top-level description + parameter-level description fields — the full rendered surface the #1924 char counts are drawn from), and a fail-open frequency measurement from existing matrix artifacts. No code changed, no live-model calls made — source-reading + on-disk artifact analysis only, per the task scope.

    Method note on scope of "description"

    The 3,310/3,195/2,953/2,329-char figures in #1924 count the whole rendered tool schema (top-level description + every parameter/sub-field description), not just the top-level string. I classified all of it — the parameter descriptions carry real weight (e.g. create_schema's coreValues field description alone is ~340 chars) and ADR-064 rule 1 speaks to "parameter names, types, required-ness, enum membership" which lives almost entirely at that level.


    create_schema (source: packages/agent/src/local_agent/tools.rs:696-767)

    Top-level description, sentence by sentence:

    # Text Bucket
    1 "Create a new entity type (schema) with custom fields and relationships." Neither — this is the tool's one-line purpose statement, not selection guidance in the "use this tool when X" sense and not argument shape. Keep as-is; it's the minimum identifying sentence every tool description needs.
    2 "The top-level 'name' parameter is REQUIRED — it is the display name of the entity type (e.g. 'Invoice', 'Project')." Argument-shape. Required-ness restated in prose. The schema's own "required": ["name", "fields"] already encodes this structurally — this sentence is redundant with that, though it does add the "display name" semantic gloss the bare schema can't carry. Borderline: keep the semantic gloss, the required-ness restatement is redundant.
    3 "The schema ID is auto-generated as lowercase snake_case from name (e.g. 'Customer Profile' → 'customer_profile')." Argument-shape. Describes a derived value's format — not encoded anywhere else. Genuinely load-bearing; keep.
    4 "After creation, use this ID as node_type when creating instances." Tool-selection guidance — this is cross-tool sequencing advice (how output of create_schema feeds into create_node's node_type param), not this tool's own argument shape. ADR-064 rule 2 territory. Candidate to move to create_node's description (which already partially covers this — see below) or trim.
    5 "FIELDS: Every node already has a built-in content/title — do NOT add a 'name' or 'title' entry to the fields array." Argument-shape. A real validation/collision rule (built-in field vs. user-defined field namespace) not expressible in JSON Schema (can't express "excluded field name" declaratively here). Keep.
    6 "EXCEPTION: if title_template references '{name}' (e.g. title_template='{name} ({status})'), you MUST define 'name' as a text field so the template can reference it." Argument-shape. This is the title_template↔fields cross-reference constraint #1924 already flagged as load-bearing — confirmed: this is enforced in code (interpolate_title_template_with_schema, packages/core/src/utils/markdown.rs), not just asserted in prose. Keep, this is exactly the kind of cross-field constraint a flat JSON Schema cannot express.
    7 "Only define type-specific fields." Argument-shape, but genuinely redundant — restates sentence 5's own "do NOT add name/title" rule at a higher level of abstraction, no new information. Candidate for deletion.
    8 "If a field maps to an existing node type, define it as a relationship instead." Argument-shape (field-vs-relationship modeling rule — real constraint, relationships is a separate top-level array). Keep, but could be tightened; it's also partially restated in the relationships param description ("Use instead of array fields when referencing existing types") — see redundancy note below.

    Parameter-level descriptions:

    Field Text Bucket
    description (top-level param) "Brief prose summary of what this entity type represents. This is NOT parsed into fields — define every field explicitly in "fields"." Second clause is argument-shape (clarifies this field is not a source of structure) and non-redundant — keep. First clause is boilerplate, harmless, low-cost.
    fields "REQUIRED. Array of field definitions — every field on this entity type must be listed explicitly here, even if empty ([]). Only use for scalar properties (text, number, date, enum, boolean). Do NOT use for references to other node types — use relationships instead." Argument-shape, all load-bearing. "REQUIRED" is redundant with the schema's "required": ["name", "fields"] (minor). The scalar-vs-relationship split restates top-level sentence 8 — this is the genuinely redundant pairing: the same "fields are scalar-only, use relationships for refs" rule appears at the top-level description (sentence 8) AND here AND again in the relationships param description below. Three-way redundancy; two of the three occurrences are candidates for deletion, keep the one closest to the parameter it governs (this one, on fields).
    fields.items.coreValues "REQUIRED and must be non-empty when type="enum" — an enum field with no values always fails validation. Array of {value, label} pairs. Use lowercase values (e.g., 'active' not 'Active'). If predefined values aren't known yet, use type="text" instead; values can be added later with update_schema." Mixed. "REQUIRED and must be non-empty when type=enum...fails validation" is argument-shape — a real conditional-required rule JSON Schema's flat required array can't express (required only when a sibling field has a specific value). Keep. "Use lowercase values" is argument-shape (a convention/format rule) — keep, cheap and prevents a real failure mode. "If predefined values aren't known yet, use type=text instead; values can be added later with update_schema" is tool-selection guidance — it's telling the model when NOT to use this tool's own enum machinery and to defer to a different tool (update_schema) later. Candidate to trim or relocate to update_schema's add_fields.coreValues (which currently lacks this same escape-hatch advice, creating an asymmetry).
    title_template "Template for auto-generating node titles. Use {field_name} placeholders. RULE: every {field_name} token MUST have a matching entry in the fields array — if you write '{name}' here, you MUST add {"name": "name", "type": "text"} to fields. Missing fields cause a validation error." Argument-shape, all of it — this is the other half of the cross-reference constraint from top-level sentence 6, restated here from the title_template side. This is not redundant in the pejorative sense — cross-referencing constraints genuinely need to be visible from both sides (a model filling fields first needs the rule as much as one filling title_template first) — but it IS the same rule stated twice. Given ADR-064 doesn't have a rule against restating a single cross-field constraint from both of its endpoints (this is different from restating the same single-field rule redundantly), I'd call this legitimately-duplicated argument-shape, not "genuinely redundant" — recommend keeping both.
    relationships "Relationships to other node types. Use instead of array fields when referencing existing types (e.g., project has_task task)." Second sentence is the third occurrence of the fields-vs-relationships rule (see fields row above) — genuinely redundant with the other two. Candidate for deletion (keep it on fields, drop here and at top-level sentence 8, OR keep here and top-level, drop the fields one — either way, one of the three should go).
    relationships.items.targetType "Target node type ID — MUST be an existing type from the ENTITY TYPES list (e.g., 'project', 'task', 'customer'). Do NOT invent types that don't exist yet." Argument-shape (referential-integrity rule, points at a specific channel — the ENTITY TYPES context block — as the source of truth). Keep.

    create_schema summary: ~85% of the text is genuinely load-bearing argument-shape (much of it enforcing constraints JSON Schema cannot express structurally: conditional-required, cross-field references, field-name collisions). One real tool-selection sentence (output feeds create_node.node_type). The clearest trim target is the 3-way duplication of "fields are scalar, use relationships for type references" (top-level sentence 8, fields param, relationships param) — collapsing to one occurrence saves real chars with zero information loss. Sentence 7 ("Only define type-specific fields") is pure restatement of sentence 5 and can go outright.


    search_nodes (source: tools.rs:327-418)

    Top-level description:

    # Text Bucket
    1 "Find, list, and filter nodes." Purpose statement, keep.
    2 "This is the single tool for querying the graph by title, type, and/or typed properties — use it for all three of: (1) title/keyword lookup (query='invoice'); (2) listing every node of a type (query='', node_type='task' — empty query lists all of that type); (3) filtering by typed properties with operators (status='open', amount > 500, due_date before a date) — pass 'filters' for these." Mixed and the largest block in the tool. "use it for all three of..." framing is tool-selection guidance (when to reach for this tool vs. alternatives) — ADR-064 rule 2 territory, correctly placed in a tool description per the doctrine, not a trim candidate on channel grounds. But the three worked examples embedded here (query='invoice', query='', node_type='task', status='open', amount > 500, due_date before a date) are argument-shape usage examples that substantially duplicate what the filters parameter's own items schema already documents in more precise, structured form (operator enum, type enum, worked example on filters.items.property). This is the strongest genuinely-redundant candidate in this tool: the prose walks through the same three query modes the parameter schema already fully specifies.
    3 "Combine as needed (e.g. node_type + a property filter)." Tool-selection guidance (usage pattern) — keep, cheap, not duplicated elsewhere.
    4 "Returns each node's properties, so this is the right tool whenever the user wants to see or act on typed data." Tool-selection guidance — correctly placed, not argument shape. Keep.
    5 "Dates use YYYY-MM-DD." Argument-shape — format rule, not encoded in the JSON Schema (value field is untyped/description-only: "Use string for dates (YYYY-MM-DD)..." — see below, this is a second, near-verbatim occurrence). Genuinely redundant with filters.items.value's own description. Keep one, drop the other — I'd keep it on value (closer to the field it governs) and drop it from the top-level description.
    6 "Prefer this over search_semantic when you know the name/type or want structured results; use search_semantic only for meaning-based / fuzzy questions." Tool-selection guidance, textbook ADR-064 rule 2 case — this is the cross-tool disambiguation rule between search_nodes and search_semantic. Correctly placed per doctrine (rule 2 says tool descriptions own tool selection). Not a trim candidate on channel-misplacement grounds. Note: asymmetric — search_semantic's own description carries no reciprocal pointer back to search_nodes. Not itself a defect (doctrine doesn't require symmetry), but worth flagging since a routing failure that surfaces search_semantic without search_nodes loses this disambiguation entirely.

    Parameter-level descriptions (the largest share of this tool's size — the filters array's nested schema):

    Field Text Bucket
    query "Keyword or phrase to match against node titles (substring match). Pass empty string to skip the title filter (e.g. to list all nodes of a type)." Argument-shape, non-redundant (the "empty string" behavior isn't expressible via JSON Schema types). Keep. Second clause duplicates top-level sentence 2's "(2) listing every node of a type" example — minor, low-value redundancy.
    node_type "Filter by node type (e.g. 'task', 'text', or a custom schema ID). For a custom schema ID, copy the id exactly from the RELEVANT ENTITY TYPES block — character for character, including underscores — never shorten, singularize, paraphrase, or guess it from the user's wording. Omit to search all types." Argument-shape — the "copy exactly from RELEVANT ENTITY TYPES" instruction is a real, measured failure mode (per ADR-064's own evidence section on ids/paraphrasing). Keep, load-bearing. This exact clause is repeated near-verbatim in create_node.node_type, resolve_query.node_type — cross-tool redundancy, not within-tool, so out of this tool's own scope to trim, but worth flagging as a registry-wide pattern (same warning copy-pasted 3+ times across tools rather than centralized).
    filters (array-level) "Optional typed-property filters. Use for status/due_date/amount and any custom schema field, with operators. Omit for plain title/type listing." Tool-selection/usage guidance at the field level — legitimate, tells the model when to populate this optional array. Keep.
    filters.items.type "Filter category: 'property' for ANY schema/node field (status, due_date, priority, and all custom schema fields) — use this for status. 'content' for node text. 'metadata' ONLY for the 4 built-in fields created_at, modified_at, node_type, content — NEVER use 'metadata' for status or any schema field, it will fail with 'Invalid metadata field'. 'relationship' for graph edges." Argument-shape, and the single densest, most load-bearing sentence in this tool. The enum itself (["property","content","metadata","relationship"]) gives membership but not semantics or the property-vs-metadata confusion this text is specifically guarding against — "NEVER use 'metadata' for status...it will fail with 'Invalid metadata field'" documents a real, named error message a model would otherwise hit and have to recover from blind. Keep in full — this is the strongest possible case for rule-1 placement, not a trim candidate.
    filters.items.operator "Comparison operator" Trivial, adds nothing beyond the enum. Low-value but also nearly free (21 chars) — not worth flagging as a priority trim.
    filters.items.property "Property key. Example: {"type": "property", "property": "status", "operator": "equals", "value": "open"} — status is a property filter, not metadata." Argument-shape, and genuinely redundant: this worked example restates exactly what filters.items.type's own description already establishes ("status is a property filter, not metadata" is the same fact as "'property' for ANY schema/node field...use this for status" / "NEVER use 'metadata' for status"). Strong trim candidate — the full JSON example adds format-syntax value but the trailing clause is pure repetition.
    filters.items.value "Value to compare against. Use string for dates (YYYY-MM-DD), string/number for others. Use array for 'in' operator." Argument-shape, load-bearing, and the second occurrence of "dates use YYYY-MM-DD" (see top-level sentence 5). Keep this occurrence, drop the top-level one.
    filters.items.case_sensitive "For 'contains' operator: case sensitivity (default: true)" Argument-shape, minimal, keep.
    filters.items.relationship_type "For 'relationship' filters: which graph edge direction to traverse" Argument-shape, keep (though the enum values ["parent","children","mentions","mentioned_by"] are more "which edge" than "direction" — minor wording nit, not a channel issue).
    filters.items.node_id "For 'relationship' filters: the anchor node ID to traverse from" Argument-shape, keep.
    sorting, sorting.items.field, sorting.items.direction, limit All short, single-clause, argument-shape, no redundancy found. Keep as-is.

    search_nodes summary: This tool has the clearest redundancy findings of the four. Two concrete, low-risk trims: (a) drop the "Dates use YYYY-MM-DD" top-level sentence, keep it on filters.items.value where it already exists; (b) drop the trailing "status is a property filter, not metadata" clause from filters.items.property's example, since filters.items.type already states this fact more completely (and is the field that actually governs it). The big top-level "use it for all three of..." block is tool-selection guidance correctly placed per ADR-064 rule 2 and should NOT be cut on channel grounds, though its three inline examples are lower-value than the structured schema examples elsewhere in the same tool.


    search_semantic (source: tools.rs:480-543)

    Top-level description (one block, no clear sentence boundaries beyond these 4):

    # Text Bucket
    1 "Find nodes semantically related to a natural-language query." Purpose statement, keep.
    2 "By default returns full content for the top result (include_markdown=1)." Argument-shape — documents the default value's behavioral effect, which the schema's bare "description": "Number of top results..." on include_markdown doesn't itself convey (a default of 1 looks arbitrary without this). Keep, though see redundancy note below.
    3 "Increase include_markdown to get full content for more results, or set to 0 for IDs and snippets only." Argument-shape, but near-fully redundant with include_markdown's own parameter description: "Number of top results to include full markdown content for (0-5, default 1). Set to 0 for IDs and snippets only, or increase to get full content for multiple results." — this is almost a verbatim restatement, two sentences apart. Strongest redundancy finding in this tool; drop one copy (recommend keeping the parameter-level one, dropping this top-level sentence, since the parameter-level version already carries the range 0-5 and default that this one lacks).
    4 "If a result's 'markdown' field is non-empty, that is the complete document — summarize or answer from it directly, do not call get_node or search_nodes again for that result." Tool-selection guidance — this is explicitly a cross-tool sequencing rule ("do not call get_node or search_nodes again"), textbook ADR-064 rule 2. Correctly placed; not a channel-misplacement issue. This is also the tool's single highest-value sentence behaviorally (it's the one guarding against a redundant-tool-call pattern), so even though it's "tool-selection" and technically a rule-2 category, I would NOT recommend cutting it — it's exactly what rule 2 says belongs here.

    Parameter-level descriptions:

    All parameter descriptions (query, limit, include_markdown, collection, threshold, scope, include_archived, node_types, exclude_collections, property_filters, include_edges, graph_boost) are argument-shape, each describing a single field's semantics/format/default with no cross-tool or selection content. No redundancy found among them except the include_markdown overlap with top-level sentence 3 noted above. scope's note about ai-chat conversations never being embedded ("Note: ai-chat conversations are not embedded, so they are never returned by search regardless of scope") is a real, non-obvious behavioral fact — keep, it prevents a plausible-looking dead end.

    search_semantic summary: Smallest of the 4 tools and the cleanest — one clear redundancy (include_markdown default/behavior explained twice), everything else load-bearing. The one tool-selection sentence present (sentence 4) is correctly placed and should not be touched.


    update_schema (source: tools.rs:769-847)

    Top-level description:

    # Text Bucket
    1 "Modify an existing schema type: add/remove/rename fields, add/remove relationships, update description or title_template." Purpose/capability summary — mostly restates the parameter names (add_fields/remove_fields/rename_fields/add_relationships/remove_relationships/description/title_template) that are already visible as top-level keys in the schema itself. Borderline genuinely redundant with the schema's own key names, but a capability-summary sentence like this is standard/expected tool-description content across the registry (e.g. create_schema's own opening sentence does the same) — I would not flag this one for deletion in isolation, since removing it would leave the tool with no prose purpose statement at all.
    2 "Use rename_fields to safely rename a field — it migrates all existing node property data to the new key and updates the schema definition." Tool-selection guidance with a strong safety justification ("safely" — implying an unsafe alternative, i.e. remove+add, would lose data). This is real, non-obvious behavioral information (a naive model might reach for remove_fields + add_fields to rename, silently losing data) — correctly placed, keep.

    Parameter-level descriptions:

    Field Text Bucket
    schema_id "ID of the schema to update (e.g. 'project', 'customer')" Argument-shape, minimal. Note: unlike search_nodes.node_type and create_node.node_type, this one lacks the "copy exactly from RELEVANT ENTITY TYPES block, don't paraphrase" warning that ADR-064's own evidence section identifies as measurably load-bearing elsewhere in the registry. This is an asymmetry/gap, not a redundancy — flagging it as a possible place to add a proven-effective sentence, not cut one, so out of scope for a trim but worth recording.
    description "New description (optional)" Trivial, argument-shape, keep.
    title_template "New title template using {field_name} placeholders (e.g. '{name} ({status})'). All referenced fields must exist in the schema." Argument-shape — the cross-field constraint (same rule as create_schema.title_template, restated for the update path). Legitimately duplicated across the two tools for the same reason as create_schema's internal duplication (both endpoints of a schema-authoring workflow need it); not a within-tool redundancy. Keep.
    add_fields (array + items) Field-level descriptions largely mirror create_schema.fields.items (name, type, description, coreValues) Argument-shape, keep. Note the coreValues description here ("REQUIRED and must be non-empty when type="enum"...Array of {value, label} pairs.") is a shortened version of create_schema's — it's missing the "use lowercase values" convention rule and the "if predefined values aren't known yet, use type=text instead" escape hatch that create_schema carries. This is an inconsistency (same field, same constraint, different completeness across two tools) rather than a redundancy — flagging, not a trim target.
    remove_fields "Field names to remove" Trivial, keep.
    rename_fields (array + items) "Fields to rename. Each entry rekeys property data on ALL existing nodes of this schema type and updates the schema definition. Renaming to an existing field name is rejected. Processed before add_fields/remove_fields." Argument-shape, all load-bearing: the "processed before add_fields/remove_fields" ordering rule and the "renaming to an existing name is rejected" collision rule are both real semantics no enum/type can express. Also partially redundant with top-level sentence 2 (both explain that rename migrates data) — minor, low-value overlap, not worth trimming (the top-level one motivates why to use this field, the param-level one specifies what it does mechanically; different audiences within the same read).
    add_relationships, remove_relationships Short, structural, argument-shape. Keep.

    update_schema summary: The smallest of the 4 (2,329 chars) and proportionally the tightest — no strong redundancy findings within the tool itself. The two things worth recording are cross-tool, not within-tool: (1) schema_id is missing the "copy exactly, don't paraphrase" warning node_type carries elsewhere — a gap, not something to cut; (2) add_fields.coreValues is a strictly weaker version of create_schema.fields.coreValues for the identical constraint — worth reconciling for consistency, though which direction (shorten create_schema's or lengthen update_schema's) is a product judgment, not something this classification pass should decide.


    Cross-tool pattern: the real redundancy is often between tools, not within one

    The single-tool redundancy findings above are individually small. The larger pattern, visible only by reading all 4 side by side: the "copy the id exactly from RELEVANT ENTITY TYPES — character for character, including underscores — never shorten, singularize, paraphrase, or guess" warning is repeated near-verbatim in search_nodes.node_type, create_node.node_type, and resolve_query.node_type (and appears in create_schema's narrative around targetType in a shorter form). That's real, measured-effective content per ADR-064's own evidence section — I'm not suggesting deleting it — but if a future pass wants a structural fix rather than a wording trim, centralizing this into something the ENTITY TYPES context-block renderer states once (channel 4, not tool schemas) rather than repeating per-tool would cut more aggregate text than any single-tool sentence trim identified above, without touching the content's effectiveness. Flagging as a structural observation, not a recommendation to act on now — it's a bigger design change than "delete a redundant clause" and deserves its own measurement.


    Fail-open frequency measurement

    Data source: /tmp/matrix-1917*/run{1,2,3}.json (8 matrix passes × 3 reps = 24 run files, 288 total scenario-turns), all at evalCommit=db708a90 (current HEAD) per each file's provenance.evalCommit field — directly comparable to today's tool registry and to the #1924 measurement. (Excluded from the count: /tmp/agent-matrix-/ and /tmp/nodespace-matrix-e4b/, both at older commits 4c580818/6f7250cd from 2026-07-31 — not comparable, noted for completeness but not folded into the number below.)

    Method: parsed each turn's toolsOffered (comma-separated tool-name string) and counted tool names per turn. The registry has 14 tools; fail_open_surface() (packages/agent/src/local_agent/routing.rs:466) excludes tools whose required params depend on routed guidance (resolve_query), and the observed fail-open turns additionally lack search_skills — confirmed the max observed count (12) matches 14 − resolve_query − search_skills exactly by diffing the observed 12-tool set against the full registry.

    Result:

    Total turns across 24 runs:              288
    Turns where any tools were offered:      223  (65 turns were clarify/greeting, 0 tools)
    Turns landing on the 12-tool fail-open surface:  2
    Fail-open rate (of all turns):           0.69%
    Fail-open rate (of tool-offering turns): 0.90%
    

    Both fail-open turns are in the same run (matrix-1917-schemafix/run3.json), scenarios 8d and 8e, both routingDecision: "failed". Critically, the same scenarios in the same matrix pass's run1 and run2 routed normally (8d: 9 tools in run1/run2 vs 12 in run3; 8e: 7 tools in run1/run2 vs 12 in run3) — this confirms fail-open is a genuine per-attempt routing-miss event, not a fixed property of scenario 8d/8e's prompt content, consistent with #1924's own framing ("a routing-miss symptom, not purely tool-description verbosity").

    Answer to the acceptance-criteria question: the one turn #1924 measured (20,005 chars, 12-tool fail-open) was not representative — it's rare (under 1% of turns that reach routing) across the available real matrix data, not a common steady-state condition. This means: fixing routing reliability, if pursued, would only shrink prompt size on <1% of turns — it is not a competitive alternative to a tool-schema trim as a general-purpose size reduction, though it's still worth having independently for correctness reasons unrelated to prompt size.

    Caveat on this number: the 24 runs are drawn from one working session's WIP debugging directories (7 of 8 passes are dirty=True, i.e., uncommitted local changes were present when captured) rather than a clean, purpose-built fail-open-frequency study — I did not run anything new, per the task's explicit instruction not to spend budget on a fresh matrix pass. The dirty flag doesn't invalidate the tool-count observation (that depends only on the registry + routing logic, both stable across these captures at the same evalCommit), but it does mean this wasn't a controlled, single-purpose data collection — treat 0.69–0.90% as a reasonable point estimate from real (if incidentally-collected) data, not a designed study's result.


    What a properly-scoped trim should target (classification-derived, not implemented)

    Real candidates, ranked by confidence:

    1. search_semantic: drop top-level sentence 3 (near-verbatim duplicate of include_markdown's own description) — highest-confidence, cleanest single deletion of the whole set.
    2. search_nodes: drop the trailing clause of filters.items.property's example ("— status is a property filter, not metadata") — fully covered by filters.items.type.
    3. search_nodes: drop the top-level "Dates use YYYY-MM-DD" sentence — fully covered by filters.items.value.
    4. create_schema: collapse the 3-way "fields are scalar, use relationships for type references" duplication (top-level sentence 8, fields param, relationships param) to one occurrence.
    5. create_schema: drop top-level sentence 7 ("Only define type-specific fields") — pure restatement of sentence 5.

    Not candidates — confirmed load-bearing, do not touch:

    • create_schema's title_template↔fields cross-reference (both directions) — code-enforced constraint, not restatable via JSON Schema.
    • search_nodes.filters.items.type's full property/metadata disambiguation — names an actual error message, prevents a real failure mode.
    • search_semantic's "do not call get_node or search_nodes again" sentence — correctly-placed rule-2 content, arguably the tool's single most valuable sentence.
    • The node_type/schema_id "copy exactly, don't paraphrase" warnings — directly the kind of content ADR-064's evidence section measured as effective; also the strongest case that some redundancy here is cross-tool infrastructure (same warning needed at 3+ independent call sites) rather than waste, and better addressed by a structural fix (centralize into the ENTITY TYPES block renderer) than a per-sentence trim.
    • update_schema's rename_fields ordering/collision rules and add_fields/create_schema.fields conditional-required-when-enum rules — all encode constraints no flat JSON Schema required/enum can express.

    Net assessment: the classification does not support a large trim. The five items above are real but individually small (rough estimate: 150–250 chars combined across all 4 tools, well under 5% of the 11,787-char top-4 total) — most of the top-4 tools' bulk is legitimately-placed argument-shape content per ADR-064 rule 1, exactly as #1924's own "why this is not a simple trim" section already anticipated. The larger lever, if one exists, is the structural cross-tool node_type-warning centralization noted above — a bigger design change than a wording trim and out of scope for this classification pass. Combined with the fail-open measurement above (routing-miss is <1% of turns, not the common case), neither lever available here would meaningfully reduce the 20,005-char worst case; a repaired-harness, non-adversarial before/after study per #1813's precedent (acceptance criterion 3) remains the right next step before cutting anything, and should be scoped against the ~150–250 char realistic trim budget this classification found rather than against the full 11,787-char top-4 total.

  2. added a commit that references this issue on Aug 2, 2026
  3. malibio commented on Aug 3, 2026

    @malibio
    CollaboratorAuthor

    Closing as a documented negative result. Independently verified: fail-open frequency measured at 0.69% (2 of 288 scenario-turns), and the classification pass found most of the tool-schema content is legitimately load-bearing per ADR-064 rule 1 (argument-shape constraints no flat JSON Schema can express) — the realistic trim budget is ~150-250 chars, nowhere near enough to meaningfully shrink the 20,005-char worst case. Neither lever (trimming redundancy or reducing fail-open frequency) pays off at the scale needed. A structural fix (centralizing the repeated node_type/schema_id warning across tools into the entity-types block renderer) was noted as the only lever with real potential, but that's a larger design change than a wording trim — worth its own issue if pursued, not a reason to keep this one open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions