Skip to content

Add forge-route shortcut to template#6

Merged
alexanderholman merged 1 commit intomasterfrom
opencode/agentfactory-template
Feb 7, 2026
Merged

Add forge-route shortcut to template#6
alexanderholman merged 1 commit intomasterfrom
opencode/agentfactory-template

Conversation

@alexanderholman
Copy link
Copy Markdown
Owner

Summary

  • add scripts/forge-route wrapper for faster NL routing execution
  • register shortcut in scripts/registry.yaml
  • update template AGENTS/README examples

Copilot AI review requested due to automatic review settings February 7, 2026 05:09
@alexanderholman alexanderholman merged commit f6f1e1a into master Feb 7, 2026
3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-route bash wrapper around scripts/route_and_run.py (supports --execute).
  • Registered the new shortcut in scripts/registry.yaml.
  • Updated README.md and AGENTS.md to 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).

Comment on lines +10 to +14
description: "Shortcut wrapper around route-and-run for Forge session command routing"
command: "scripts/forge-route '<request>'"
parameters:
- "execute"
- "request"
Copy link

Copilot AI Feb 7, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants