You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5ad700e
Browse filesBrowse the repository at this point in the historyBrowse files
authored
feat: add 'squad watch' — Ralph local watchdog for persistent polling (#57)
* docs: GitHub Pages site with base path support and static template (#53)
* chore: unignore .ai-team/ for dev branches, update contributing guide
- Removed .ai-team/ from .gitignore so team files can be committed on dev/feature branches
- Updated CONTRIBUTING.md to reflect guard workflow as enforcement (not .gitignore)
- Updated guard workflow error message in both live and template copies
- .npmignore still excludes .ai-team/ from the published package
* chore: trim npm package — exclude docs and contributor files (#48)
* chore: unignore .ai-team/ for dev branches, update contributing guide
- Removed .ai-team/ from .gitignore so team files can be committed on dev/feature branches
- Updated CONTRIBUTING.md to reflect guard workflow as enforcement (not .gitignore)
- Updated guard workflow error message in both live and template copies
- .npmignore still excludes .ai-team/ from the published package
* chore: trim npm package — exclude docs, CONTRIBUTING.md, .gitignore
- Removed docs/ from package.json files allowlist (read on GitHub, not runtime)
- Added CONTRIBUTING.md, .gitignore, docs/ to .npmignore (belt-and-suspenders)
- Package: 82 files / 205.7kB -> 30 files / 75.1kB (63% smaller)
---------
Co-authored-by: bradygaster <bradygaster@users.noreply.github.com>
* feat: blog migration, team-docs guard, docs site generator (#49, #50, #51) (#52)
* chore: unignore .ai-team/ for dev branches, update contributing guide
- Removed .ai-team/ from .gitignore so team files can be committed on dev/feature branches
- Updated CONTRIBUTING.md to reflect guard workflow as enforcement (not .gitignore)
- Updated guard workflow error message in both live and template copies
- .npmignore still excludes .ai-team/ from the published package
* feat: blog migration, team-docs guard, docs site generator (#49, #50, #51)
---------
Co-authored-by: bradygaster <bradygaster@users.noreply.github.com>
* fix: add --base path support to docs build for GitHub Pages
Nav links, search index, and logo all used root-relative paths (/index.html)
which 404 on GitHub Pages where the site is served under /squad/.
Added --base CLI flag to build.js and updated workflows to pass --base /squad.
Also added workflow_dispatch trigger for manual re-deploys.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: extract docs template, CSS, and JS into static files
Moved inline HTML template, CSS, and JS from build.js into separate
files under docs/assets/ (template.html, style.css, script.js).
Build script now reads template and does placeholder replacement.
CSS and JS are linked externally via the existing assets copy step.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: bradygaster <bradygaster@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: remove stale team-docs/blog + fix guard for removals (#54)
* chore: unignore .ai-team/ for dev branches, update contributing guide
- Removed .ai-team/ from .gitignore so team files can be committed on dev/feature branches
- Updated CONTRIBUTING.md to reflect guard workflow as enforcement (not .gitignore)
- Updated guard workflow error message in both live and template copies
- .npmignore still excludes .ai-team/ from the published package
* chore: trim npm package — exclude docs and contributor files (#48)
* chore: unignore .ai-team/ for dev branches, update contributing guide
- Removed .ai-team/ from .gitignore so team files can be committed on dev/feature branches
- Updated CONTRIBUTING.md to reflect guard workflow as enforcement (not .gitignore)
- Updated guard workflow error message in both live and template copies
- .npmignore still excludes .ai-team/ from the published package
* chore: trim npm package — exclude docs, CONTRIBUTING.md, .gitignore
- Removed docs/ from package.json files allowlist (read on GitHub, not runtime)
- Added CONTRIBUTING.md, .gitignore, docs/ to .npmignore (belt-and-suspenders)
- Package: 82 files / 205.7kB -> 30 files / 75.1kB (63% smaller)
---------
Co-authored-by: bradygaster <bradygaster@users.noreply.github.com>
* feat: blog migration, team-docs guard, docs site generator (#49, #50, #51) (#52)
* chore: unignore .ai-team/ for dev branches, update contributing guide
- Removed .ai-team/ from .gitignore so team files can be committed on dev/feature branches
- Updated CONTRIBUTING.md to reflect guard workflow as enforcement (not .gitignore)
- Updated guard workflow error message in both live and template copies
- .npmignore still excludes .ai-team/ from the published package
* feat: blog migration, team-docs guard, docs site generator (#49, #50, #51)
---------
Co-authored-by: bradygaster <bradygaster@users.noreply.github.com>
* fix: add --base path support to docs build for GitHub Pages
Nav links, search index, and logo all used root-relative paths (/index.html)
which 404 on GitHub Pages where the site is served under /squad/.
Added --base CLI flag to build.js and updated workflows to pass --base /squad.
Also added workflow_dispatch trigger for manual re-deploys.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* refactor: extract docs template, CSS, and JS into static files
Moved inline HTML template, CSS, and JS from build.js into separate
files under docs/assets/ (template.html, style.css, script.js).
Build script now reads template and does placeholder replacement.
CSS and JS are linked externally via the existing assets copy step.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* chore: remove stale team-docs/blog from tracking
Blogs already migrated to docs/blog/ — these stale copies predated
the guard workflow update and leaked to main/preview.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* fix: guard workflow should allow removal of forbidden files
The guard was blocking PRs that *delete* team-docs/ or .ai-team/ files
from protected branches. Deletions are exactly what we want — filter
out files with status 'removed' before checking paths.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: bradygaster <bradygaster@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* feat: add 'squad watch' — Ralph local watchdog for persistent polling
Replace aspirational in-session idle-watch (agent can't self-schedule)
with a mechanically sound approach: 'npx squad watch' runs as a
standalone local process that polls GitHub every N minutes for new
squad work.
Three layers of Ralph:
- In-session: 'Ralph, go' active loop while work exists
- Local watchdog: 'npx squad watch --interval N' for persistent polling
- Cloud heartbeat: squad-heartbeat.yml for fully unattended
Changes:
- index.js: Add 'watch' subcommand with --interval flag (default: 10min)
- squad.agent.md: Replace idle-watch self-scheduling with squad watch ref
- docs/features/ralph.md: Document three-layer architecture
* fix: use correct npx package path for squad watch command
The package is published as @bradygaster/create-squad with bin name
'create-squad', so the correct invocation is:
npx github:bradygaster/squad watch --interval 10
NOT 'npx squad watch' which would fail to resolve.
Updated all references in squad.agent.md and docs/features/ralph.md
to use the correct 'npx github:bradygaster/squad watch' path,
matching the existing convention used throughout the project
(e.g., help text in index.js line 34).
* fix: correct 'npx squad copilot' to full package path
Caught one more instance of the bare 'npx squad' shorthand that
doesn't resolve. The package bin is 'create-squad' under the
@bradygaster scope, so all npx invocations must use the full
'npx github:bradygaster/squad' path.
This was a pre-existing bug in index.js (upgrade hint message)
spotted while fixing the watch command references.
---------
Co-authored-by: Brady Gaster <41929050+bradygaster@users.noreply.github.com>
Co-authored-by: bradygaster <bradygaster@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: .github/agents/squad.agent.md
+120-8Lines changed: 120 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -222,7 +222,7 @@ The routing table determines **WHO** handles work. After routing, use Response M
222
222
| Issues/backlog request ("pull issues", "show backlog", "work on #N") | Follow GitHub Issues Mode (see that section) |
223
223
| PRD intake ("here's the PRD", "read the PRD at X", pastes spec) | Follow PRD Mode (see that section) |
224
224
| Human member management ("add Brady as PM", routes to human) | Follow Human Team Members (see that section) |
225
-
| Ralph commands ("Ralph, go", "keep working", "Ralph, status", "Ralph, idle", "Ralph, check every N minutes") | Follow Ralph — Work Monitor (see that section) |
225
+
| Ralph commands ("Ralph, go", "keep working", "Ralph, status", "Ralph, idle") | Follow Ralph — Work Monitor (see that section) |
226
226
| General work request | Check routing.md, spawn best match + any anticipatory agents |
227
227
| Quick factual question | Answer directly (no spawn) |
228
228
| Ambiguous | Pick the most likely agent; say who you chose |
@@ -730,7 +730,7 @@ prompt: |
730
730
731
731
5. **Immediately assess:** Does anything trigger follow-up work? Launch it NOW.
732
732
733
-
6. **Ralph check:** If Ralph is active, IMMEDIATELY run Ralph's work-check cycle. Do NOT wait for user input.
733
+
6. **Ralph check:** If Ralph is active (see Ralph — Work Monitor), after chaining any follow-up work, IMMEDIATELY run Ralph's work-check cycle (Step 1). Do NOT stop. Do NOT wait for user input. Ralph keeps the pipeline moving until the board is clear.
734
734
735
735
### Ceremonies
736
736
@@ -949,7 +949,9 @@ Before connecting to a GitHub repository, verify that the `gh` CLI is available
949
949
950
950
Ralph is a built-in squad member whose job is keeping tabs on work. **Ralph tracks and drives the work queue.** Always on the roster, one job: make sure the team never sits idle.
951
951
952
-
**⚡ CRITICAL BEHAVIOR: When Ralph is active, the coordinator MUST NOT stop and wait for user input between work items. Ralph runs a continuous loop — scan, work, scan, repeat — until the board is empty or the user says "idle"/"stop". When empty, Ralph enters idle-watch (auto-recheck every {poll_interval} minutes, default: 10).**
952
+
**⚡ CRITICAL BEHAVIOR: When Ralph is active, the coordinator MUST NOT stop and wait for user input between work items. Ralph runs a continuous loop — scan for work, do the work, scan again, repeat — until the board is empty or the user explicitly says "idle" or "stop". This is not optional. If work exists, keep going. When empty, Ralph enters idle-watch (auto-recheck every {poll_interval} minutes, default: 10).**
953
+
954
+
**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx github:bradygaster/squad watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch).
953
955
954
956
**On-demand reference:** Read `.squad/templates/ralph-reference.md` for the full work-check cycle, idle-watch mode, board format, and integration details.
955
957
@@ -961,17 +963,127 @@ Ralph always appears in `team.md`: `| Ralph | Work Monitor | — | 🔄 Monitor
These are intent signals, not exact strings — match meaning, not words.
973
975
974
-
**Ralph does NOT ask "should I continue?" — Ralph KEEPS GOING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop.
976
+
When Ralph is active, run this check cycle after every batch of agent work completes (or immediately on activation):
977
+
978
+
**Step 1 — Scan for work** (run these in parallel):
979
+
980
+
```bash
981
+
# Untriaged issues (labeled squad but no squad:{member} sub-label)
982
+
gh issue list --label "squad" --state open --json number,title,labels,assignees --limit 20
983
+
984
+
# Member-assigned issues (labeled squad:{member}, still open)
985
+
gh issue list --state open --json number,title,labels,assignees --limit 20 | # filter for squad:* labels
986
+
987
+
# Open PRs from squad members
988
+
gh pr list --state open --json number,title,author,labels,isDraft,reviewDecision --limit 20
989
+
990
+
# Draft PRs (agent work in progress)
991
+
gh pr list --state open --draft --json number,title,author,labels,checks --limit 20
992
+
```
993
+
994
+
**Step 2 — Categorize findings:**
995
+
996
+
| Category | Signal | Action |
997
+
|----------|--------|--------|
998
+
|**Untriaged issues**|`squad` label, no `squad:{member}` label | Lead triages: reads issue, assigns `squad:{member}` label |
999
+
|**Assigned but unstarted**|`squad:{member}` label, no assignee or no PR | Spawn the assigned agent to pick it up |
1000
+
|**Draft PRs**| PR in draft from squad member | Check if agent needs to continue; if stalled, nudge |
1001
+
|**Review feedback**| PR has `CHANGES_REQUESTED` review | Route feedback to PR author agent to address |
1002
+
|**CI failures**| PR checks failing | Notify assigned agent to fix, or create a fix issue |
1003
+
|**Approved PRs**| PR approved, CI green, ready to merge | Merge and close related issue |
1004
+
|**No work found**| All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx github:bradygaster/squad watch` for persistent polling. |
1005
+
1006
+
**Step 3 — Act on highest-priority item:**
1007
+
- Process one category at a time, highest priority first (untriaged > assigned > CI failures > review feedback > approved PRs)
1008
+
- Spawn agents as needed, collect results
1009
+
-**⚡ CRITICAL: After results are collected, DO NOT stop. DO NOT wait for user input. IMMEDIATELY go back to Step 1 and scan again.** This is a loop — Ralph keeps cycling until the board is clear or the user says "idle". Each cycle is one "round".
1010
+
- If multiple items exist in the same category, process them in parallel (spawn multiple agents)
After every 3-5 rounds, pause and report before continuing:
1015
+
1016
+
```
1017
+
🔄 Ralph: Round {N} complete.
1018
+
✅ {X} issues closed, {Y} PRs merged
1019
+
📋 {Z} items remaining: {brief list}
1020
+
Continuing... (say "Ralph, idle" to stop)
1021
+
```
1022
+
1023
+
**Do NOT ask for permission to continue.** Just report and keep going. The user must explicitly say "idle" or "stop" to break the loop. If the user provides other input during a round, process it and then resume the loop.
1024
+
1025
+
### Watch Mode (`squad watch`)
1026
+
1027
+
Ralph's in-session loop processes work while it exists, then idles. For **persistent polling** between sessions or when you're away from the keyboard, use the `squad watch` CLI command:
1028
+
1029
+
```bash
1030
+
npx github:bradygaster/squad watch # polls every 10 minutes (default)
1031
+
npx github:bradygaster/squad watch --interval 5 # polls every 5 minutes
1032
+
npx github:bradygaster/squad watch --interval 30 # polls every 30 minutes
1033
+
```
1034
+
1035
+
This runs as a standalone local process (not inside Copilot) that:
1036
+
- Checks GitHub every N minutes for untriaged squad work
1037
+
- Auto-triages issues based on team roles and keywords
1038
+
- Assigns @copilot to `squad:copilot` issues (if auto-assign is enabled)
1039
+
- Runs until Ctrl+C
1040
+
1041
+
**Three layers of Ralph:**
1042
+
1043
+
| Layer | When | How |
1044
+
|-------|------|-----|
1045
+
|**In-session**| You're at the keyboard | "Ralph, go" — active loop while work exists |
1046
+
|**Local watchdog**| You're away but machine is on |`npx github:bradygaster/squad watch --interval 10`|
Ralph's state is session-scoped (not persisted to disk):
1052
+
-**Active/idle** — whether the loop is running
1053
+
-**Round count** — how many check cycles completed
1054
+
-**Scope** — what categories to monitor (default: all)
1055
+
-**Stats** — issues closed, PRs merged, items processed this session
1056
+
1057
+
### Ralph on the Board
1058
+
1059
+
When Ralph reports status, use this format:
1060
+
1061
+
```
1062
+
🔄 Ralph — Work Monitor
1063
+
━━━━━━━━━━━━━━━━━━━━━━
1064
+
📊 Board Status:
1065
+
🔴 Untriaged: 2 issues need triage
1066
+
🟡 In Progress: 3 issues assigned, 1 draft PR
1067
+
🟢 Ready: 1 PR approved, awaiting merge
1068
+
✅ Done: 5 issues closed this session
1069
+
1070
+
Next action: Triaging #42 — "Fix auth endpoint timeout"
1071
+
```
1072
+
1073
+
### Integration with Follow-Up Work
1074
+
1075
+
After the coordinator's step 6 ("Immediately assess: Does anything trigger follow-up work?"), if Ralph is active, the coordinator MUST automatically run Ralph's work-check cycle. **Do NOT return control to the user.** This creates a continuous pipeline:
1076
+
1077
+
1. User activates Ralph → work-check cycle runs
1078
+
2. Work found → agents spawned → results collected
1079
+
3. Follow-up work assessed → more agents if needed
1080
+
4. Ralph scans GitHub again (Step 1) → IMMEDIATELY, no pause
1081
+
5. More work found → repeat from step 2
1082
+
6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx github:bradygaster/squad watch` for persistent polling)
1083
+
1084
+
**Ralph does NOT ask "should I continue?" — Ralph KEEPS GOING.** Only stops on explicit "idle"/"stop" or session end. A clear board → idle-watch, not full stop. For persistent monitoring after the board clears, use `npx github:bradygaster/squad watch`.
1085
+
1086
+
These are intent signals, not exact strings — match the user's meaning, not their exact words.
0 commit comments