Skip to content

Commit b88bd5b

Browse files
authored
Merge pull request #303 from diberry/squad/new-customer-docs-5
Docs update: comprehensive new-user experience improvements
2 parents 153eabc + 21ad721 commit b88bd5b

8 files changed

Lines changed: 309 additions & 10 deletions

File tree

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Architecture
2+
3+
> ⚠️ **Experimental** — Squad is alpha software. APIs, commands, and behavior may change between releases.
4+
5+
How Squad works — one page, no handwaving.
6+
7+
---
8+
9+
## System diagram
10+
11+
```
12+
User request
13+
↓
14+
Coordinator (routing engine)
15+
↓
16+
Spawns agents in parallel
17+
↓
18+
Agents read memory (.squad/) → work → write results
19+
↓
20+
Scribe merges decisions, Ralph tracks issues
21+
↓
22+
Results returned to user
23+
```
24+
25+
---
26+
27+
## Components
28+
29+
### Coordinator
30+
31+
The coordinator is Squad's routing engine. It reads your request, checks routing rules in `.squad/routing.md`, and decides which agents to spawn. If you say "team," it decomposes the work and launches multiple agents in parallel. If you name an agent, it routes directly to them.
32+
33+
### Agents
34+
35+
Each agent is a specialist with a charter, role, and persistent memory. Agents are spawned as independent subprocesses with their own context windows and tools. They read `.squad/decisions.md` and their own history before working, then write results back. Agents never see each other's conversations — the coordinator orchestrates coordination.
36+
37+
### Memory (.squad/)
38+
39+
All team state lives in `.squad/`. This includes the roster (`team.md`), routing rules (`routing.md`), decisions (`decisions.md`), agent charters and histories (`agents/`), and ceremony schedules (`ceremonies.md`). Agents read this before every spawn. You own these files — edit them anytime.
40+
41+
### Routing
42+
43+
Routing rules in `.squad/routing.md` define which agent handles which work. The coordinator reads these rules before spawning. You can override routing by naming an agent directly in your request.
44+
45+
### Scribe
46+
47+
The Scribe is a silent agent that tracks decisions and logs sessions. Every team has a Scribe. You never talk to them directly — they work in the background, merging decisions from all agents into `.squad/decisions.md`.
48+
49+
### Ralph
50+
51+
Ralph is the work monitor. He watches your GitHub or GitLab issues, tracks work in progress, and alerts the team when something is ready. Every team has a Ralph. He's silent unless you ask him for status.
52+
53+
---
54+
55+
## What happens when you say "Team, build X"?
56+
57+
1. **Coordinator reads the request** and checks `.squad/routing.md` for decomposition rules.
58+
2. **Coordinator spawns multiple agents in parallel** — one for frontend, one for backend, one for tests, etc.
59+
3. **Each agent reads `.squad/decisions.md`** and their own history (`agents/{name}/history.md`), then works independently.
60+
4. **Agents write results** to their history files and propose decisions.
61+
5. **Scribe merges all decisions** into `.squad/decisions.md`.
62+
6. **Coordinator returns labeled results** to you, tagged with each agent's name.
63+
64+
---
65+
66+
## Learn more
67+
68+
- [**Work routing**](../features/routing) — How the coordinator decides which agents to spawn
69+
- [**Memory and knowledge**](memory-and-knowledge) — How decisions, skills, and history persist
70+
- [**Parallel work**](parallel-work) — How agents work simultaneously without conflicts
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Choose your path
2+
3+
> ⚠️ **Experimental** — Squad is alpha software. APIs, commands, and behavior may change between releases.
4+
5+
CLI, Copilot agent, or SDK? Pick the right mode for your workflow.
6+
7+
---
8+
9+
## Three modes
10+
11+
### CLI mode
12+
13+
Install Squad globally or per-project, then use terminal commands to initialize, route work, and manage your team.
14+
15+
```bash
16+
npm install -g @bradygaster/squad-cli
17+
squad init
18+
squad status
19+
squad watch
20+
```
21+
22+
**Use for:** Terminal workflows, automation scripts, CI/CD integration.
23+
24+
---
25+
26+
### Copilot agent mode
27+
28+
Talk to Squad in GitHub Copilot CLI or VS Code. Squad is built-in as an agent. Your `.squad/` directory works identically to CLI mode.
29+
30+
```bash
31+
copilot
32+
> /agent Squad
33+
34+
Squad: Hey Brady, what are you building?
35+
```
36+
37+
**Use for:** Conversational workflows, exploratory work, VS Code users.
38+
39+
---
40+
41+
### SDK mode
42+
43+
Write TypeScript code that spawns agents, routes work, and coordinates teams programmatically. Full access to Squad's internals.
44+
45+
```bash
46+
npm install @bradygaster/squad-sdk
47+
```
48+
49+
```typescript
50+
import { Coordinator } from '@bradygaster/squad-sdk';
51+
52+
const coordinator = new Coordinator();
53+
const result = await coordinator.route('Build a login page');
54+
```
55+
56+
**Use for:** Building tools on Squad, custom integrations, advanced automation.
57+
58+
---
59+
60+
## Decision table
61+
62+
| **Your goal** | **Use** |
63+
|---------------|---------|
64+
| Try Squad quickly | **Copilot agent** — no install |
65+
| Work in the terminal | **CLI** |
66+
| Work in VS Code | **Copilot agent** |
67+
| Automate repetitive tasks | **CLI** or **SDK** |
68+
| Build custom tooling | **SDK** |
69+
| CI/CD integration | **CLI** or **SDK** |
70+
71+
---
72+
73+
## Can I use multiple modes?
74+
75+
Yes. Your `.squad/` directory is the source of truth. CLI, Copilot agent, and SDK all read and write the same files. You can switch between modes anytime.
76+
77+
Example workflow:
78+
1. Use **Copilot agent** to form your team and do exploratory work
79+
2. Use **CLI** (`squad watch`) to monitor issues in the background
80+
3. Use **SDK** to build a custom deployment script that spawns agents
81+
82+
All three modes share the same memory and decisions.

‎docs/src/content/docs/get-started/first-session.md‎

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Start the Copilot CLI:
4848
copilot
4949
```
5050

51-
Select **Squad** from the `/agent` list (CLI) or `/agents` (VS Code). Squad greets you by name (pulled from `git config user.name`):
51+
Select **Squad** from the `/agent` list (CLI) or `/agents` (VS Code). Squad greets you by name:
5252

5353
```
5454
Hey Brady, what are you building?
@@ -61,7 +61,7 @@ Describe your project:
6161
> post recipes, search by ingredient, and save favorites.
6262
```
6363

64-
Squad proposes a team. Names come from a fictional universe — the exact universe depends on your project shape and history:
64+
Squad proposes a team. The coordinator analyzes your description and suggests specialists:
6565

6666
```
6767
Here's your team:
@@ -72,6 +72,8 @@ Here's your team:
7272
🧪 Lambert — Tester Tests, quality, edge cases
7373
📋 Scribe — (silent) Memory, decisions, session logs
7474
75+
**Scribe** and **Ralph** are always on every roster — you don't manage them.
76+
7577
Look right? Say yes, add someone, or change a role.
7678
(Or just give me a task to start!)
7779
```
@@ -86,7 +88,7 @@ Say "yes" or skip straight to a task (which is implicit confirmation):
8688
> Yes. Dallas, set up the Express server with basic routing.
8789
```
8890

89-
Squad creates the `.squad/` directory structure — team roster, routing rules, casting state, ceremony config, agent charters, and histories — all seeded with your project context.
91+
Squad creates the `.squad/` directory structure — team roster, routing rules, casting state, ceremony config, agent charters, and histories — all seeded with your project context. Each agent spawns to do their work.
9092

9193
### What's inside .squad/?
9294

@@ -177,7 +179,7 @@ At any point, check status:
177179
> Where are we?
178180
```
179181

180-
This is a Direct mode response — no agent spawn, just the coordinator reading recent logs:
182+
The coordinator reads recent logs:
181183

182184
```
183185
Last session: Recipe listing page (15 minutes ago)
@@ -274,7 +276,7 @@ squad export
274276
5 agents, 3 skills, 6 decisions
275277
```
276278

277-
This snapshot contains everything — charters, histories, casting state, skills, and decisions. Import into another repo anytime:
279+
This snapshot contains charters, histories, casting state, skills, and decisions. Import into another repo anytime:
278280

279281
```bash
280282
cd ../other-project
@@ -286,8 +288,8 @@ squad import ../my-app/squad-export.json
286288

287289
## Tips
288290

289-
- **First session is the slowest.** Agents have no history yet. After 2–3 sessions, they know your conventions and stop asking repeated questions.
290-
- **Commit `.squad/`.** It's your team's brain. Anyone who clones the repo gets the team with all their knowledge.
291+
- **First session is slowest.** Agents have no history yet. After 2–3 sessions, they know your conventions.
292+
- **Commit `.squad/`** — your team's brain. Anyone who clones the repo gets the full team.
291293
- **Say "team" for big tasks.** The word "team" triggers parallel fan-out across multiple agents.
292294
- **Name an agent for focused work.** `"Dallas, fix the login bug"` sends work to one specific agent.
293295
- **Directives are sticky.** Once captured, they persist across all future sessions.
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
# Quick start
2+
3+
> ⚠️ **Experimental** — Squad is alpha software. APIs, commands, and behavior may change between releases.
4+
5+
Your first 5 minutes with Squad. Prove it works before you learn anything.
6+
7+
---
8+
9+
## Prerequisites
10+
11+
- **Node.js 20+** — Check with `node --version`
12+
- **Git repository** — New or existing
13+
14+
---
15+
16+
## Install
17+
18+
```bash
19+
npm install --save-dev @bradygaster/squad-cli
20+
```
21+
22+
Then initialize:
23+
24+
```bash
25+
npx squad init
26+
```
27+
28+
You'll see:
29+
30+
```
31+
✅ Squad installed.
32+
.github/agents/squad.agent.md — coordinator agent
33+
.squad/templates/ — 11 template files
34+
35+
Open GitHub Copilot and select Squad from the agent list.
36+
```
37+
38+
---
39+
40+
## Validate
41+
42+
Check that Squad created your team directory:
43+
44+
```bash
45+
ls .squad/
46+
```
47+
48+
You should see: `team.md`, `routing.md`, `decisions.md`, `agents/`, and more.
49+
50+
Confirm Squad is ready:
51+
52+
```bash
53+
npx squad status
54+
```
55+
56+
---
57+
58+
## Try it
59+
60+
Open GitHub Copilot in your terminal or VS Code. Select **Squad** from the agent list (`/agent Squad` in CLI or `/agents` in VS Code).
61+
62+
Say something simple:
63+
64+
```
65+
> I'm building a task management app with React and Node.js.
66+
> Users can create, update, and delete tasks.
67+
```
68+
69+
Squad forms your team and responds with agent names and roles. Say yes, or just give your first task:
70+
71+
```
72+
> Team, create a basic Express server with a /health endpoint.
73+
```
74+
75+
Squad spawns agents and does the work.
76+
77+
---
78+
79+
## What just happened?
80+
81+
Squad read your description, formed a team of specialists, wrote their charters to `.squad/agents/`, and coordinated parallel work. Check `.squad/decisions.md` to see what they decided.
82+
83+
---
84+
85+
## Next steps
86+
87+
[**Your first session**](first-session) — Step-by-step walkthrough of parallel work, decisions, and memory.
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Glossary
2+
3+
> ⚠️ **Experimental** — Squad is alpha software. APIs, commands, and behavior may change between releases.
4+
5+
Key terms defined in one sentence each. Alphabetical order.
6+
7+
---
8+
9+
**Agent** — A specialist AI team member with a role, charter, and persistent memory that handles specific types of work.
10+
11+
**Casting** — The process of forming your team by proposing agents, confirming roles, and writing their charters to `.squad/`.
12+
13+
**Ceremony** — A scheduled team event like retrospectives, reviews, or planning sessions defined in `.squad/ceremonies.md`.
14+
15+
**Coordinator** — Squad's routing engine that reads your request, checks routing rules, and spawns the right agents.
16+
17+
**Decisions** — Architectural choices, conventions, and directives captured in `.squad/decisions.md` that all agents read before working.
18+
19+
**Directive** — A persistent rule or convention you give the team (like "Always use Zod for validation") that gets written to `decisions.md`.
20+
21+
**History** — Each agent's memory of past work, stored in `.squad/agents/{name}/history.md` and read before every spawn.
22+
23+
**Memory** — All persistent team state stored in the `.squad/` directory, including roster, routing rules, decisions, and agent histories.
24+
25+
**Ralph** — The silent work monitor agent that watches your GitHub or GitLab issues and tracks work in progress.
26+
27+
**Routing** — Rules in `.squad/routing.md` that define which agent handles which type of work, read by the coordinator before spawning.
28+
29+
**Scribe** — The silent agent that tracks decisions and logs sessions, merging proposals from all agents into `.squad/decisions.md`.
30+
31+
**Skill** — A reusable capability stored in `.squad/skills/` that agents can learn and execute.
32+
33+
**Spawn** — The act of starting an agent as an independent subprocess with its own context window, tools, and memory.
34+
35+
**Squad** — Your AI development team, coordinated through the Squad framework.
36+
37+
**.squad/ directory** — The root directory containing all team state: roster, routing, decisions, agent charters and histories, and ceremony config.
38+
39+
**Team** — The collection of agents working on your project, defined in `.squad/team.md`.

‎docs/src/content/docs/scenarios/troubleshooting.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,18 @@ Common issues and fixes for Squad installation and usage.
44

55
---
66

7+
## Quick fixes
8+
9+
| Error | Cause | Fix |
10+
|-------|-------|-----|
11+
| `squad: command not found` | Squad CLI not installed or not in PATH | Run `npm install -g @bradygaster/squad-cli` or use `npx @bradygaster/squad-cli` |
12+
| `No .squad/ directory found` | Not in a git repo or Squad not initialized | Run `git init` then `npx squad init` |
13+
| `Cannot find agent "{name}"` | Agent doesn't exist in `.squad/agents/` | Check `.squad/team.md` for roster, or re-run casting |
14+
| `gh: command not found` | GitHub CLI not installed | Install from [cli.github.com](https://cli.github.com/) then `gh auth login` |
15+
| `Node.js version error` | Node.js version below v20 | Upgrade Node.js to v20+ (see below) |
16+
17+
---
18+
719
## `npx github:bradygaster/squad` appears to hang
820

921
**Problem:** Running the install command shows a frozen npm spinner. Nothing happens.

‎docs/src/navigation.ts‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ export const NAV_SECTIONS: NavSection[] = [
1414
title: 'Get Started',
1515
dir: 'get-started',
1616
items: [
17+
{ title: 'Quick start', slug: 'get-started/five-minute-start' },
1718
{ title: 'Installation', slug: 'get-started/installation' },
19+
{ title: 'Choose your path', slug: 'get-started/choosing-your-path' },
1820
{ title: 'Your First Session', slug: 'get-started/first-session' },
1921
{ title: 'Migration Guide', slug: 'get-started/migration' },
2022
],
@@ -78,6 +80,7 @@ export const NAV_SECTIONS: NavSection[] = [
7880
{ title: 'SDK Integration', slug: 'reference/integration' },
7981
{ title: 'Tools & Hooks', slug: 'reference/tools-and-hooks' },
8082
{ title: 'Config', slug: 'reference/config' },
83+
{ title: 'Glossary', slug: 'reference/glossary' },
8184
],
8285
},
8386
{
@@ -115,6 +118,7 @@ export const NAV_SECTIONS: NavSection[] = [
115118
title: 'Concepts',
116119
dir: 'concepts',
117120
items: [
121+
{ title: 'Architecture', slug: 'concepts/architecture' },
118122
{ title: 'Your Team', slug: 'concepts/your-team' },
119123
{ title: 'Memory & Knowledge', slug: 'concepts/memory-and-knowledge' },
120124
{ title: 'Parallel Work', slug: 'concepts/parallel-work' },

0 commit comments

Comments
 (0)