#3675·rtk

`pnpm test` / `pnpm build` are not routed, only `pnpm run <script>`

Author: dwin-gharibiCreated Aug 23, 2026Updated Sep 16, 2026
Labelsbuggood first issuepriority:lowarea:cli

Type: Enhancement (coverage gap) · Severity: Low–Medium · Area: src/discover/rules.rs

Summary

pnpm runs a bare script name directly — pnpm test is pnpm run test — and that shorter form is what people actually type. The rule only matched ^pnpm\s+(exec|i|install|list|ls|outdated|run|run-script), so pnpm test, pnpm build, pnpm lint fell through while pnpm run build was routed.

A second, smaller problem

The rule had no trailing word boundary, so pnpm installer matched on the install alternative and was rewritten. Adding (\s|$) fixes that.

Not every script is safe to route

pnpm dev, pnpm start, pnpm serve and pnpm watch do not terminate. rtk captures child output rather than streaming it, so routing a long-running script would leave the agent with a blank screen until it gives up. Those are deliberately excluded.

Environment

  • rtk 0.42.4 (develop @ 29f9bb7)