Conversation
…r safety, gh preflight - Replace module-level FSStorageProvider with direct node:fs calls (existsSync/readFileSync) to eliminate import side-effect - Replace unsafe type-assertion adapter stub with createNoopAdapter() that implements all PlatformAdapter methods with safe no-ops / clear errors - Add gh copilot preflight check before entering the loop (skipped when agentCmd is set) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…utdown, path.resolve, docs Closes #765 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Cherry-pick squad.agent.md.template changes from PR #765 that implement decisions archiving hard gates (20KB/51KB thresholds) and history summarization gates (15KB) — needed to prevent runaway file growth during continuous loop operation. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Adds a new squad loop CLI command to run a prompt-driven continuous work loop from a loop.md file, reusing the existing watch capability system (pre-scan + housekeeping) without requiring GitHub issues.
Changes:
- Introduces
packages/squad-cli/src/cli/commands/loop.tswith frontmatter parsing, loop scaffolding, capability preflight, and round execution. - Wires
loopintopackages/squad-cli/src/cli-entry.tswith--help,--init,--file,--interval,--timeout, and capability flags. - Adds docs, template(s), tests for the pure parser/generator, and a changeset for a minor CLI release.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
packages/squad-cli/src/cli/commands/loop.ts |
New loop command implementation: frontmatter parser, boilerplate generator, capability integration, and interval runner. |
packages/squad-cli/src/cli-entry.ts |
Adds squad loop help + argument parsing and --init scaffolding behavior. |
test/cli/loop.test.ts |
Unit tests for parseLoopFile() and generateLoopFile(). |
templates/loop.md |
Adds a user-facing loop prompt template intended to be copied into .squad/templates/. |
docs/src/content/docs/features/loop.md |
New feature documentation for Loop usage, frontmatter, and examples. |
docs/src/content/docs/reference/cli.md |
Updates CLI reference: adds loop entries and a new squad loop section. |
templates/squad.agent.md.template |
Updates coordinator template content (incl. Scribe task ordering/thresholds). |
packages/squad-cli/templates/squad.agent.md.template |
Updates CLI-packaged coordinator template (incl. Scribe task ordering/thresholds). |
.changeset/loop-command.md |
Declares a minor bump for @bradygaster/squad-cli with loop command release notes. |
Comments suppressed due to low confidence (1)
docs/src/content/docs/reference/cli.md:206
- After adding the new
### squad loopsection, the documentation no longer has a heading for the interactive shell section — the textEnter the shell with \squad`now appears immediately after a horizontal rule. Consider reintroducing an## Interactive Shell` (or similar) heading before that content so the page structure and TOC remain clear.
For complete documentation and examples, see [Loop — Prompt-driven work loop](../features/loop.md).
---
Enter the shell with `squad` (no arguments). You'll see:
</details>
…ocs default
- Stream stdout/stderr from execFile to terminal in real-time
- Use workTreeRoot for consistent CWD in worktree scenarios
- Align docs description default with code ("Squad Loop")
Closes review comments on #767
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Test configured gate (configured: false returns early) - Test missing loop.md file handling - Test empty prompt body fatal error - Test interval/timeout validation - Test gh copilot preflight check Addresses review comment on #767 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
docs/src/content/docs/reference/cli.md:206
- The
## Interactive Shellsection header appears to have been removed when inserting the newsquad loopdocs. After the---separator, the text jumps straight into “Enter the shell…” without a heading, which breaks the page’s structure/TOC. Re-add an appropriate heading (e.g., restore## Interactive Shell) before the shell instructions.
For complete documentation and examples, see [Loop — Prompt-driven work loop](../features/loop.md).
---
Enter the shell with `squad` (no arguments). You'll see:
</details>
- Move 71 dated entries (2026-02-21:2026-03-25) to decisions-archive.md - Trim decisions.md to foundational directives + current entries (2026-03-26+) - decisions.md: 12.1KB (from 385KB) - decisions-archive.md: 373.8KB (append-only preserved) - Archive gate: PASS (decisions.md now below 20KB threshold) Archival timestamp: 2026-04-03T03:28:22.5673588Z Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Archive log: decisions.md trimmed 385KB → 11.9KB (96.9% reduction) - 71 entries (2026-02-21:2026-03-25) moved to append-only archive - Archive gate: PASS (decisions.md < 20KB threshold) - Context savings: ~373KB per agent load Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Derive teamRoot from detectSquadDir() path for worktree consistency - Read loop scaffold from templates/loop.md instead of hardcoding - Update docs prerequisites: gh+copilot required, --agent-cmd is escape hatch Addresses review comments on #767 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Teaches agents to reply to PR review threads after fixing issues, making resolutions traceable and visible to reviewers. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Post-Merge Team Review — Squad Mission ControlReviewed by: Flight (Architecture), RETRO (Security), FIDO (Quality), CONTROL (TypeScript), GNC (Runtime) Verdicts
0 blockers. 0 red findings from architecture, security, types, or runtime. Key FindingsArchitecture (Flight):
Security (RETRO):
Test Coverage (FIDO):
Type Safety (CONTROL):
Runtime (GNC):
Recommended Follow-ups (non-blocking)
|
Summary
Split from PR #765 — loop command only, Teams adapter extracted to separate PR.
Adds the squad loop command — a prompt-driven continuous work loop that reads a loop.md file and runs it on a configurable interval, no GitHub issues required.
Closes #761
Review findings addressed