Repository navigation
Description
Summary
Add a squad loop command that runs a continuous work loop driven by a loop.md prompt file — no GitHub issues required.
Today, squad watch is issue-centric: it polls for squad-labeled issues, triages them, and optionally executes them. But many users want a simpler pattern: write a prompt that describes what you want your squad to do, and let it loop.
What this adds
squad loop command
A new top-level command that:
- Reads
loop.mdfrom the repo root (configurable path via--file) - Validates YAML frontmatter (must include
configured: trueto confirm intentional setup) - Each cycle: spawns a Copilot agent with the loop prompt as the work driver
- Sleeps for the configured interval, then repeats
- Ctrl+C to stop
Frontmatter contract
loop.md requires YAML frontmatter to tell the loop it's been configured:
---
configured: true
interval: 10 # minutes between cycles
timeout: 30 # max minutes per cycle
description: "What this loop does (shown in status output)"
---The configured: true field is required — it ensures the user has intentionally set up their loop prompt rather than leaving a blank scaffold.
squad loop --init
Generates a boilerplate loop.md with:
- Frontmatter template (configured: false — user must flip to true)
- Guidance sections explaining how to structure a loop prompt
- Example patterns (work queue, monitoring, mixed mode)
Missing loop.md handling
If loop.md doesn't exist, exit cleanly with:
💤 No loop.md found. Create one with: squad loop --init
In-product help
squad loop --helpprints usage, flags, and frontmatter docssquad --helplistsloopas a first-class command
Capabilities integration
The existing watch capability system (email/Teams monitors, self-pull, decision-hygiene) can be composed with the loop:
squad loop --monitor-email --monitor-teams --self-pullArchitecture
This reuses the watch capability plugin system. The key difference:
- watch:
runCheck()(issue triage) is the core driver, capabilities are additive - loop:
loop.mdprompt is the core driver,runCheck()is skipped entirely
The loop command shares: capability registry, config loading, circuit breaker, platform adapter (for monitors that need it).
Implementation plan
- New
packages/squad-cli/src/cli/commands/loop.ts— loop runner + frontmatter parser - CLI wiring in
cli-entry.ts—squad loop,--init,--help - In-product help update in
cli-entry.ts -
loop.mdscaffold template inpackages/squad-cli/templates/loop.md - Docs:
docs/src/content/docs/features/loop.md - Tests:
test/cli/loop.test.ts - Changeset for insiders release
Prior art
This pattern has been battle-tested in Brady's personal squad (bradyland) where loop.md drives a continuous work loop with Teams DM routing, email monitoring, and personal interest updates. The productized version will be simpler and more generic, with the frontmatter contract ensuring intentional configuration.
Labels
squadenhancement
Activity
github-actions commentedon Apr 2, 2026
🏗️ Squad Triage — Flight (Lead)
Issue: #761 — feat(cli): Add squad loop command — prompt-driven continuous work loop
Assigned to: FIDO (Quality Owner)
Reason: Issue relates to testing/quality work
@copilot evaluation: 🔴 Not suitable — issue involves work outside the coding agent's capability profile.
Team roster:
squad:flightsquad:proceduressquad:eecomsquad:fidosquad:paosquad:capcomsquad:controlsquad:surgeonsquad:boostersquad:gncsquad:networksquad:retrosquad:incosquad:guidosquad:telemetrysquad:voxsquad:dskysquad:simssquad:handbooksquad:ralphsquad:copilotAdd documentation for squad loop command
feat(cli): implement squad loop command (#761)
test(cli): add 21 unit tests for squad loop command (#761)
fix(sdk): address Teams adapter review findings — lazy load, config d…
fix(loop): address architectural review — split Teams adapter, fix lo…
feat(cli): Add squad loop command (#761) (#767)
Revert "feat(cli): Add squad loop command (#761) (#767)"
fix(sdk): address Teams adapter review findings — lazy load, config d…