mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-23 16:41:35 +01:00
The prompt-routing hook no longer acts on words inside backticks or code blocks, so a prompt that quotes a command (`Run `mycli check` now`) stops getting a wrong "run /verify" or "run /review" line. Why: routing is on by default, so any session that quotes commands got these hints; this fixes the report in #4564 by @vilano93, rebuilt on current main. Nothing to do: plain requests ("run the checks", "review this pr", bug reports in words) route as before. Co-authored-by: vilano93 <244097767+vilano93@users.noreply.github.com> Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> Review-Finding: p1/specialist-batched#1 reader=red-team Review-Finding: p1/specialist-batched#2 reader=testing
This commit is contained in:
4 files changed
+108
-6
No files matched your search
@@ -49,6 +49,7 @@ The hook scores the prompt against the `triggers:` list in each installed `SKILL
|
||||
- A bug report goes to the installed skill that claims bug reports, named alone, whatever the other triggers score (GST-3237). A skill claims bug reports when one of its triggers names the defect and fixing it, and nothing else ("fix this bug", "reproduce the bug in a test"); a trigger that names its own target ("fix lint errors", "fix postgres bugs") claims only that kind of fix. gstack's own routed skills only check work, so they never claim one, and /verify is never named ahead of the bug-fix skill. A prompt that holds the whole phrase of one of /review's or /qa's own triggers ("review this pr for bugs", "find bugs on site") and never asks for a fix keeps that skill, since finding bugs is not fixing one. With none installed, a bug report routes on triggers as before. In B1d's in-sample run (gstack-evals #385), Opus 5.5 loaded prove-it in 29 of 33 sessions when the line named it alone and in none of the 20 where it was not named, and took /verify in 4 of the 7 where /verify came first. On B1's 60 in-sample prompts the line now names prove-it alone on all 46 bug reports; before, it named prove-it on 40 of the 60 and put /verify first on 7 of those (`test/fixtures/skill-route-b1-in-sample.json` labels each prompt).
|
||||
- A prompt reads as a bug report on one strong sign: a word for what went wrong (bug, crash, hang, stuck, leak, wrong, incorrect, unexpected, regression and the like), an exception name such as `ValueError`, the verb fix, an issue template's expected or actual heading ("expected behavior", "steps to reproduce", "correct output"), a failure verb ("fails", "failed to", "doesn't work") or a "should X, not Y" correction. Feature requests use error, exception and failure as nouns ("add error handling", "a custom exception class"), so those words, a negated verb, "should" and "instead of" are weak signs, and it takes two different ones. None of the 60 plain prompts in `test/fixtures/skill-route-plain-prompts.txt` reads as a bug report; 5 of B1's 14 in-sample feature requests do.
|
||||
- Words a bug report uses for the defect (error, exception, traceback, crash, fails, failure, broken, regression, incorrect, wrong, defect, and exception names such as `ValueError`) score as "bug", so "parse_one raises ValueError, please fix" matches a "fix this bug" trigger. Paths and identifiers stay whole (`site-packages`, `src/review.ts`, `max_retries`), so a traceback's paths never match a trigger's words.
|
||||
- Triggers and the bug-report signs read only the prompt's prose. Markdown code, meaning inline code in backticks and fenced code blocks as CommonMark reads them, is left out, so a command quoted in backticks never routes a prompt (#4564): "Run `mycli check` now" no longer matches "run the checks", "Run `gh pr review 123`" no longer matches "review this pr", and a `--fix` flag or the word broken in a pasted log is not a bug report. The prose around the code still routes ("run the checks, then `git push`"). One sign still reads the code: an exception name as code writes it (`KeyError`, `NullPointerException`), since a quoted error or a pasted traceback reports a bug.
|
||||
- When a trigger ties with another of the same skill on score and words, a whole-phrase match wins.
|
||||
- A prompt longer than 5,000 characters is scored on its first 4,000 and last 1,000 characters, where the request usually sits; a log pasted between them is not scored, so its words cannot match everything. Until GST-3110 such prompts (over 8,000 characters) were never routed.
|
||||
- Prompts that start with `/` (you already picked a skill) are never routed.
|
||||
|
||||
Reference in new issue
Block a user