Repository navigation
feat(watch): support explicit prompt placement for custom agent commands - #1708
Merged
bradygaster merged 2 commits intoAug 23, 2026
Merged
Conversation
Allow watch and loop runners to replace one standalone {prompt} token while preserving the existing -p fallback. Closes github#1707.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
🛫 PR Readiness Check
PR Scope: 📦🔧 Mixed (product + infrastructure)
|
| Status | Check | Details |
|---|---|---|
| ❌ | Single commit | 2 commits — consider squashing before review |
| ✅ | Not in draft | Ready for review |
| ✅ | Branch up to date | Up to date with dev |
| ❌ | Copilot review | No Copilot review yet — it may still be processing |
| ✅ | Changeset present | Changeset file found |
| ✅ | Scope clean | No .squad/ or docs/proposals/ files |
| ✅ | No merge conflicts | No merge conflicts |
| ✅ | Copilot threads resolved | No Copilot review threads |
| ❌ | CI passing | 6 check(s) still running |
Files Changed (10 files, +125 −20)
| File | +/− |
|---|---|
.changeset/agent-command-prompt-placeholder.md |
+5 −0 |
README.md |
+4 −5 |
docs/src/content/docs/features/ralph.md |
+11 −2 |
docs/src/content/docs/reference/cli.md |
+1 −1 |
packages/squad-cli/src/cli/commands/loop.ts |
+3 −3 |
packages/squad-cli/src/cli/commands/watch/agent-spawn.ts |
+22 −6 |
packages/squad-cli/src/cli/commands/watch/index.ts |
+2 −2 |
test/cli/loop.test.ts |
+14 −0 |
test/cli/watch-agent-spawn.test.ts |
+41 −1 |
test/cli/watch-execute.test.ts |
+22 −0 |
Total: +125 −20
This check runs automatically on every push. Fix any ❌ items and push again.
See CONTRIBUTING.md and PR Requirements for details.
Contributor
🟡 Impact Analysis — PR #1708Risk tier: 🟡 MEDIUM 📊 Summary
🎯 Risk Factors
📦 Modules Affecteddocs (2 files)
root (2 files)
squad-cli (3 files)
tests (3 files)
|
mavaali
marked this pull request as ready for review
August 13, 2026 20:19
Contributor
|
👋 Friendly nudge — this PR has had no activity for 7 days. What needs attention:
If this PR is abandoned, please close it. If it's blocked on something external, leave a comment so the team knows. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds an explicit prompt-placement contract for custom
squad watchandsquad loopagent commands:{prompt}argv token is replaced with the complete generatedprompt;
-p <prompt>behavior; andThe same helper now serves the live watch capability path, the
backward-compatible watch helper, and loop execution.
Why
--agent-cmdis documented as a custom runner override, but every commandbuilder previously appended Copilot CLI's
-pflag. Alternate engines withanother prompt contract could not be invoked directly. Boundary's
--taskflag is one motivating example; this change is generic and adds no Boundary
dependency.
Closes #1707.
How
watch/agent-spawn.ts.duplicate rejection, multi-word prompts, backward-compatible watch exports,
and loop.
--copilot-flags, automatic MCPinjection, or
squad_state_*tools.@bradygaster/squad-cli.Local validation
npm run build -w packages/squad-clipassed.The corporate npm proxy did not contain two locked root dev packages
(
eslint-plugin-n@18.3.0and@types/node@26.2.0), so the exact full-rootcommands are left to PR CI rather than bypassing the approved feed.
Quick Check
PR Readiness Checklist
Branch & Commit
dev.dev.Build & Test
npm run buildpasses in exact CI dependencies.npm testpasses in exact CI dependencies.npm run lint:eslintpasses in exact CI dependencies.Changeset
.changeset/agent-command-prompt-placeholder.md.Docs
Exports
Breaking Changes
None. Commands without
{prompt}retain the current-p <prompt>behavior.Waivers
None requested. Exact full-root checks are pending PR CI.