stacklok / stacklok/mecatl

Free keyword prefilter to cut per-delegation router classifier cost

Open
#99 0 comments 0 reactions 1 assignee View on GitHub

@JAORMX is already working on this.

Since Sep 7, 2026.

enhancement
Dominant language
Go
Stars
152
Forks
16
Avg merge
14h 48m
Merged PRs (30d)
536

Description

Documented follow-up from PR #87 (https://github.com/stacklok/mecatl/pull/87) — not in scope for the model-selection slice.

Current state

The subagent model router (ADR 0031) classifies every delegation through a tool-less one-turn classifier on the router slot. Every plain delegation under a routed session pays a full classifier round-trip before the child runs — even when the task prompt obviously matches a category (e.g. a one-word "fix the typo" → small).

Work

Add a free keyword prefilter that short-circuits the classifier call for unambiguous task prompts, cutting per-delegation classifier cost. Keep it operator-gated (--subagent-model-router empty = OFF, byte-identical when unconfigured) and fail-soft: on any ambiguity, fall through to the full classifier. Decide-once semantics preserved.

Related: the cumulative classifier spend is itself unbounded by --max-run-tokens today — see #92 for that brake fix.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.