Skip to content

Commit ac9e156

Browse files
authored
Merge pull request #186 from bradygaster/migration-merged
v0.8.18: Migration from squad-pr → squad
2 parents 38cb896 + 905b2d7 commit ac9e156

907 files changed

Lines changed: 165478 additions & 1783 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.changeset/README.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

‎.changeset/config.json‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config@3.1.2/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

‎.gitattributes‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Squad: union merge for append-only team state files
2-
.ai-team/decisions.md merge=union
3-
.ai-team/agents/*/history.md merge=union
4-
.ai-team/log/** merge=union
5-
.ai-team/orchestration-log/** merge=union
2+
.squad/decisions.md merge=union
3+
.squad/agents/*/history.md merge=union
4+
.squad/log/** merge=union
5+
.squad/orchestration-log/** merge=union
6+
# Squad: union merge for append-only team state files
7+
.squad/decisions/decisions.md merge=union

‎.github/agents/squad.agent.md‎

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ You are **Squad (Coordinator)** — the orchestrator for this project's AI team.
2222

2323
Check: Does `.squad/team.md` exist? (fall back to `.ai-team/team.md` for repos migrating from older installs)
2424
- **No** → Init Mode
25-
- **Yes** → Team Mode
25+
- **Yes, but `## Members` has zero roster entries** → Init Mode (treat as unconfigured — scaffold exists but no team was cast)
26+
- **Yes, with roster entries** → Team Mode
2627

2728
---
2829

@@ -717,8 +718,8 @@ prompt: |
717718
SPAWN MANIFEST: {spawn_manifest}
718719

719720
Tasks (in order):
720-
1. ORCHESTRATION LOG: Write .squad/orchestration-log/{timestamp}-{agent}.md per agent. Use ISO 8601 UTC timestamp.
721-
2. SESSION LOG: Write .squad/log/{timestamp}-{topic}.md. Brief. Use ISO 8601 UTC timestamp.
721+
1. ORCHESTRATION LOG: Write .squad/orchestration-log/{timestamp}-{agent}.md per agent. Use filename-safe ISO 8601 UTC timestamp (replace colons with hyphens, e.g., `2026-02-23T20-16-27Z` not `2026-02-23T20:16:27Z`).
722+
2. SESSION LOG: Write .squad/log/{timestamp}-{topic}.md. Brief. Use filename-safe ISO 8601 UTC timestamp (replace colons with hyphens, e.g., `2026-02-23T20-16-27Z`).
722723
3. DECISION INBOX: Merge .squad/decisions/inbox/ → decisions.md, delete inbox files. Deduplicate.
723724
4. CROSS-AGENT: Append team updates to affected agents' history.md.
724725
5. DECISIONS ARCHIVE: If decisions.md exceeds ~20KB, archive entries older than 30 days to decisions-archive.md.
@@ -951,7 +952,7 @@ Ralph is a built-in squad member whose job is keeping tabs on work. **Ralph trac
951952
952953
**⚡ 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).**
953954
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).
955+
**Between checks:** Ralph's in-session loop runs while work exists. For persistent polling when the board is clear, use `npx @bradygaster/squad-cli watch --interval N` — a standalone local process that checks GitHub every N minutes and triggers triage/assignment. See [Watch Mode](#watch-mode-squad-watch).
955956
956957
**On-demand reference:** Read `.squad/templates/ralph-reference.md` for the full work-check cycle, idle-watch mode, board format, and integration details.
957958
@@ -1001,7 +1002,7 @@ gh pr list --state open --draft --json number,title,author,labels,checks --limit
10011002
| **Review feedback** | PR has `CHANGES_REQUESTED` review | Route feedback to PR author agent to address |
10021003
| **CI failures** | PR checks failing | Notify assigned agent to fix, or create a fix issue |
10031004
| **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+
| **No work found** | All clear | Report: "📋 Board is clear. Ralph is idling." Suggest `npx @bradygaster/squad-cli watch` for persistent polling. |
10051006

10061007
**Step 3 — Act on highest-priority item:**
10071008
- Process one category at a time, highest priority first (untriaged > assigned > CI failures > review feedback > approved PRs)
@@ -1027,9 +1028,9 @@ After every 3-5 rounds, pause and report before continuing:
10271028
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:
10281029

10291030
```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
1031+
npx @bradygaster/squad-cli watch # polls every 10 minutes (default)
1032+
npx @bradygaster/squad-cli watch --interval 5 # polls every 5 minutes
1033+
npx @bradygaster/squad-cli watch --interval 30 # polls every 30 minutes
10331034
```
10341035

10351036
This runs as a standalone local process (not inside Copilot) that:
@@ -1043,7 +1044,7 @@ This runs as a standalone local process (not inside Copilot) that:
10431044
| Layer | When | How |
10441045
|-------|------|-----|
10451046
| **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` |
1047+
| **Local watchdog** | You're away but machine is on | `npx @bradygaster/squad-cli watch --interval 10` |
10471048
| **Cloud heartbeat** | Fully unattended | `squad-heartbeat.yml` GitHub Actions cron |
10481049

10491050
### Ralph State
@@ -1079,9 +1080,9 @@ After the coordinator's step 6 ("Immediately assess: Does anything trigger follo
10791080
3. Follow-up work assessed → more agents if needed
10801081
4. Ralph scans GitHub again (Step 1) → IMMEDIATELY, no pause
10811082
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+
6. No more work → "📋 Board is clear. Ralph is idling." (suggest `npx @bradygaster/squad-cli watch` for persistent polling)
10831084

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+
**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 @bradygaster/squad-cli watch`.
10851086

10861087
These are intent signals, not exact strings — match the user's meaning, not their exact words.
10871088

‎.github/copilot-instructions.md‎

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,46 @@
1-
# Copilot Instructions — Squad Source Repository
1+
# Copilot Coding Agent — Squad Instructions
22

3-
<!-- This file is for the Squad source repo itself, not the template shipped to users.
4-
See templates/copilot-instructions.md for the user-facing version. -->
3+
You are working on a project that uses **Squad**, an AI team framework. When picking up issues autonomously, follow these guidelines.
54

6-
This is the **source repository** for Squad, an AI team framework for GitHub Copilot.
5+
## Team Context
76

8-
## Using the Squad Agent
7+
Before starting work on any issue:
98

10-
This repo has an active Squad agent at `.github/agents/squad.agent.md`. For team operations, roster management, or multi-agent work, select **Squad** from the agent picker in VS Code rather than asking Copilot directly.
9+
1. Read `.squad/team.md` for the team roster, member roles, and your capability profile.
10+
2. Read `.squad/routing.md` for work routing rules.
11+
3. If the issue has a `squad:{member}` label, read that member's charter at `.squad/agents/{member}/charter.md` to understand their domain expertise and coding style — work in their voice.
1112

12-
- Team roster: `.ai-team/team.md`
13-
- Routing rules: `.ai-team/routing.md`
13+
## Capability Self-Check
1414

15-
## Repository Structure
15+
Before starting work, check your capability profile in `.squad/team.md` under the **Coding Agent → Capabilities** section.
1616

17-
- `index.js` — CLI entry point (`npx create-squad`)
18-
- `.github/agents/squad.agent.md` — The Squad coordinator agent (~1,800 lines)
19-
- `templates/` — Files copied to consumer repos during `create-squad` init
20-
- `.ai-team/` — This repo's own Squad team state (live, not a template)
21-
- `docs/` — Documentation site source
22-
- `test/` — Test suite (`node --test test/*.test.js`)
17+
- **🟢 Good fit** — proceed autonomously.
18+
- **🟡 Needs review** — proceed, but note in the PR description that a squad member should review.
19+
- **🔴 Not suitable** — do NOT start work. Instead, comment on the issue:
20+
```
21+
🤖 This issue doesn't match my capability profile (reason: {why}). Suggesting reassignment to a squad member.
22+
```
2323

24-
## Conventions
24+
## Branch Naming
2525

26-
- **Branch naming:** `squad/{issue-number}-{kebab-case-slug}`
27-
- **Decisions:** Write to `.ai-team/decisions/inbox/`
28-
- **Testing:** Run `npm test` before opening PRs
29-
- **Template vs. source:** Files in `templates/` are copied verbatim by `index.js` to consumer repos. The `.ai-team/` directory here is Squad's own team — don't confuse them.
26+
Use the squad branch convention:
27+
```
28+
squad/{issue-number}-{kebab-case-slug}
29+
```
30+
Example: `squad/42-fix-login-validation`
3031

31-
## Quick Answers
32+
## PR Guidelines
3233

33-
Quick factual questions about file locations, build commands, or public API may be answered directly. Domain questions (architecture, prompt design, VS Code integration) should route through the Squad agent to reach the relevant specialist.
34+
When opening a PR:
35+
- Reference the issue: `Closes #{issue-number}`
36+
- If the issue had a `squad:{member}` label, mention the member: `Working as {member} ({role})`
37+
- If this is a 🟡 needs-review task, add to the PR description: `⚠️ This task was flagged as "needs review" — please have a squad member review before merging.`
38+
- Follow any project conventions in `.squad/decisions.md`
39+
40+
## Decisions
41+
42+
If you make a decision that affects other team members, write it to:
43+
```
44+
.squad/decisions/inbox/copilot-{brief-slug}.md
45+
```
46+
The Scribe will merge it into the shared decisions file.

‎.github/workflows/publish.yml‎

Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
name: Publish to npm and Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to publish (e.g., 0.8.0)'
11+
required: true
12+
13+
permissions:
14+
contents: write
15+
packages: write
16+
17+
jobs:
18+
publish-sdk:
19+
name: Publish @bradygaster/squad-sdk
20+
runs-on: ubuntu-latest
21+
strategy:
22+
matrix:
23+
node-version: [20]
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
fetch-depth: 0
28+
29+
- uses: actions/setup-node@v4
30+
with:
31+
node-version: ${{ matrix.node-version }}
32+
registry-url: 'https://registry.npmjs.org'
33+
34+
- name: Install dependencies
35+
run: npm ci
36+
37+
- name: Build squad-sdk
38+
run: npm -w packages/squad-sdk run build
39+
40+
- name: Publish squad-sdk to npm
41+
run: npm -w packages/squad-sdk publish --access public --provenance
42+
env:
43+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
44+
45+
publish-cli:
46+
name: Publish @bradygaster/squad-cli
47+
needs: publish-sdk
48+
runs-on: ubuntu-latest
49+
strategy:
50+
matrix:
51+
node-version: [20]
52+
steps:
53+
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 0
56+
57+
- uses: actions/setup-node@v4
58+
with:
59+
node-version: ${{ matrix.node-version }}
60+
registry-url: 'https://registry.npmjs.org'
61+
62+
- name: Install dependencies
63+
run: npm ci
64+
65+
- name: Build squad-cli
66+
run: npm -w packages/squad-cli run build
67+
68+
- name: Publish squad-cli to npm
69+
run: npm -w packages/squad-cli publish --access public --provenance
70+
env:
71+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
72+
73+
release:
74+
name: Create GitHub Release
75+
needs: publish-cli
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
with:
80+
fetch-depth: 0
81+
82+
- name: Determine version and tag
83+
id: version_info
84+
run: |
85+
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/* ]]; then
86+
TAG="${{ github.ref }}"
87+
TAG="${TAG#refs/tags/}"
88+
VERSION="${TAG#v}"
89+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
90+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
91+
echo "📦 Triggered by tag push: ${TAG}"
92+
else
93+
VERSION="${{ github.event.inputs.version }}"
94+
TAG="v${VERSION}"
95+
echo "tag=${TAG}" >> "$GITHUB_OUTPUT"
96+
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
97+
echo "📦 Triggered by workflow_dispatch: ${TAG}"
98+
fi
99+
100+
- name: Check if release already exists
101+
id: check_release
102+
env:
103+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
104+
run: |
105+
if gh release view "${{ steps.version_info.outputs.tag }}" >/dev/null 2>&1; then
106+
echo "exists=true" >> "$GITHUB_OUTPUT"
107+
echo "⏭️ Release ${{ steps.version_info.outputs.tag }} already exists"
108+
else
109+
echo "exists=false" >> "$GITHUB_OUTPUT"
110+
echo "🆕 Release ${{ steps.version_info.outputs.tag }} will be created"
111+
fi
112+
113+
- name: Create git tag (if needed)
114+
if: steps.check_release.outputs.exists == 'false' && github.event_name == 'workflow_dispatch'
115+
run: |
116+
git config user.name "github-actions[bot]"
117+
git config user.email "github-actions[bot]@users.noreply.github.com"
118+
if ! git rev-parse "refs/tags/${{ steps.version_info.outputs.tag }}" >/dev/null 2>&1; then
119+
git tag -a "${{ steps.version_info.outputs.tag }}" -m "Release ${{ steps.version_info.outputs.tag }}"
120+
git push origin "${{ steps.version_info.outputs.tag }}"
121+
echo "✅ Created tag: ${{ steps.version_info.outputs.tag }}"
122+
fi
123+
124+
- name: Create GitHub Release
125+
if: steps.check_release.outputs.exists == 'false'
126+
env:
127+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128+
run: |
129+
gh release create "${{ steps.version_info.outputs.tag }}" \
130+
--title "${{ steps.version_info.outputs.tag }}" \
131+
--generate-notes \
132+
--latest
133+
134+
- name: Verify release
135+
if: steps.check_release.outputs.exists == 'false'
136+
env:
137+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
138+
run: |
139+
gh release view "${{ steps.version_info.outputs.tag }}"
140+
echo "✅ Release ${{ steps.version_info.outputs.tag }} created and verified"

‎.github/workflows/squad-ci.yml‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,11 @@ jobs:
2020
with:
2121
node-version: 22
2222

23+
- name: Install dependencies
24+
run: npm ci
25+
26+
- name: Build
27+
run: npm run build
28+
2329
- name: Run tests
24-
run: node --test test/*.test.js
30+
run: npm test

0 commit comments

Comments
 (0)