Skill routing sends prompts that only mention "green", or contain "run" and "check" anywhere, to /build-check

Abierto
#4,971 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
72/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
bun, typescript

Línea de trabajo

Start by reading lib/skill-route.ts, especially the trigger scoring, EVERYDAY_SPAN, and prompt-window logic described in the issue. Run the Bun repro from the issue to confirm which ordinary prompts route to /build-check. Adjust scoring so single-word collapses require the full phrase and proximity checks cover other matches; verify the repro routes only the real check request.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Version: v1.105.4.0. lib/skill-route.ts is byte-identical to main (last change 76dd597ff, #4831).

The UserPromptSubmit router sends ordinary prompts to /build-check in two situations:

  • the prompt only mentions the word "green";
  • the prompt has the words "run" and "check" anywhere in it, however far apart.

The hint says "Run /build-check with the Skill tool before you start", so a session that follows it starts the project's test suite when nobody asked for one.

Repro

Run with bun from any directory:

import { routePrompt, scanInstalledSkills, installedSkillsDir } from '<gstack>/lib/skill-route';
const { skills } = scanInstalledSkills(installedSkillsDir());
const filler = 'Background notes for the next session about the onboarding flow and its copy. '.repeat(30);
for (const p of [
  "Please don't treat a green CI run as acceptance; the user's own retest is what counts.",
  "Run the onboarding redesign end to end, then check the copy with the designer before you merge.",
  "Run the onboarding redesign end to end. " + filler + " Then check the copy with the designer before you merge.",
  "run the checks",
  "Draft the onboarding email for new users.",
]) { const d = routePrompt(p, skills); console.log(p.length, d.route ? `${d.route.skill} via "${d.route.trigger}" ${d.route.score}` : 'no route'); }

Output:

86   build-check via "make it green" 1      <- a sentence that says NOT to rely on green CI
95   build-check via "run the checks" 1     <- "run ... check" in two clauses
2436 build-check via "run the checks" 1     <- "run" and "check" ~2,400 chars apart
14   build-check via "run the checks" 1     <- the real request (correct)
41   no route                               <- correct
Cause (lib/skill-route.ts)
  1. Single-word collapse.
    • make and it are in STOPWORDS, so "make it green" and "is it green" each have one content word: green.
    • green has 5 letters, so SPECIFIC_WORD accepts it and it is not treated as weakSingle.
    • The result is that matched / content = 1/1 = 1.0 for any prompt that contains "green".
  2. Proximity check skipped.
    • "run the checks" has the content words run and check.
    • check has 5 letters, so it counts as specific. That makes everyday false, so the EVERYDAY_SPAN rule (scattered) never runs.
    • The trigger contains "the", so it is not a noun phrase, and asksForWork does not apply either.
    • Any prompt with both words anywhere in the 4000-char head plus 1000-char tail window scores 1.0.
  3. No length guard. A 40,000-char brief or handoff is scored like a one-line request, and long prompts are where both words show up by chance.
Field data

Single machine, Claude Code, ~/.gstack/hooks/skill-route.log, 2026-11-25 to 2026-12-01:

  • 272 of 643 typed prompts were routed: 240 to /build-check and 32 to /review.
  • 262 of those 272 were 4,000+ chars (pasted directives and session briefs).
  • 0 of 158 prompts under 300 chars were routed.
  • The prompts that were routed were not requests to run checks.
  • Sessions followed the hint 4 times without being asked. Two of those started a pytest run.
Suggested fix
  • Score a trigger whose content words collapse to one word ("make it green", "is it green") only when the whole phrase, stopwords included, appears in the prompt.
  • Apply the EVERYDAY_SPAN proximity rule (or asksForWork) to every match that is not the whole phrase, not only to triggers made of everyday words.
  • Optionally, for typed prompts longer than the head window, route only when the sentence that holds the match asks for the work (ASK_CUE or imperative-first, as in #4802).

Workaround: gstack-config set skill_routing off.

Lenguaje dominante
TypeScript
Estrellas
143k
Forks
21k
Merge medio
5 h 25 min
PR fusionados (30 d)
791

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de garrytan/gstack

Todos los issues de garrytan/gstack

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.