Add forge-route shortcut to template#6
Conversation
There was a problem hiding this comment.
Pull request overview
Adds a convenience “forge-route” wrapper script to speed up natural-language routing execution, registers it in the script registry, and documents the shortcut in the template docs.
Changes:
- Added
scripts/forge-routebash wrapper aroundscripts/route_and_run.py(supports--execute). - Registered the new shortcut in
scripts/registry.yaml. - Updated
README.mdandAGENTS.mdto include the new wrapper and usage examples.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| scripts/registry.yaml | Registers forge-route so it can be selected/routed like other scripts. |
| scripts/forge-route | New wrapper script providing a shorter entrypoint for NL routing and optional execution. |
| README.md | Documents the new wrapper in the “Script-First” section. |
| AGENTS.md | Adds examples for using the new wrapper (dry-run and execute). |
| description: "Shortcut wrapper around route-and-run for Forge session command routing" | ||
| command: "scripts/forge-route '<request>'" | ||
| parameters: | ||
| - "execute" | ||
| - "request" |
There was a problem hiding this comment.
The command template wraps <request> in single quotes (scripts/forge-route '<request>'). Because scripts/route_and_run.py performs a raw placeholder substitution and then executes via subprocess.run(..., shell=True), any request containing an apostrophe will break the command (and can potentially change the shell command structure). Consider changing the execution path to avoid shell=True (e.g., render with shlex.quote and run with shell=False), or otherwise ensure placeholder values are safely shell-escaped so arbitrary NL text is handled correctly.
Summary
scripts/forge-routewrapper for faster NL routing executionscripts/registry.yaml