squads-cli 0.4.13 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-HIQ2APYR.js → chunk-7PRYDHZW.js} +2 -2
- package/dist/chunk-BV6S5AWZ.js +419 -0
- package/dist/chunk-BV6S5AWZ.js.map +1 -0
- package/dist/{chunk-3TSY2K7R.js → chunk-QPH5OR7J.js} +4 -3
- package/dist/chunk-QPH5OR7J.js.map +1 -0
- package/dist/cli.js +4580 -3370
- package/dist/cli.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/{memory-4PVUKIDK.js → memory-ZXDXF6KF.js} +8 -4
- package/dist/{sessions-R4VWIGFR.js → sessions-F6LRY7EN.js} +2 -2
- package/dist/{squad-parser-YRE2FEAA.js → squad-parser-MSYE4PXL.js} +2 -2
- package/dist/templates/core/AGENTS.md.template +64 -0
- package/dist/templates/core/BUSINESS_BRIEF.md.template +29 -0
- package/dist/templates/core/CLAUDE.md.template +50 -0
- package/dist/templates/core/provider.yaml.template +5 -0
- package/dist/templates/first-squad/SQUAD.md.template +23 -0
- package/dist/templates/first-squad/lead.md.template +44 -0
- package/dist/templates/memory/getting-started/state.md.template +19 -0
- package/dist/templates/skills/squads-learn/SKILL.md +86 -0
- package/dist/templates/skills/squads-workflow/instruction.md +70 -0
- package/docker/docker-compose.yml +16 -0
- package/package.json +4 -2
- package/templates/core/AGENTS.md.template +64 -0
- package/templates/core/BUSINESS_BRIEF.md.template +29 -0
- package/templates/core/CLAUDE.md.template +50 -0
- package/templates/core/provider.yaml.template +5 -0
- package/templates/first-squad/SQUAD.md.template +23 -0
- package/templates/first-squad/lead.md.template +44 -0
- package/templates/memory/getting-started/state.md.template +19 -0
- package/templates/skills/squads-learn/SKILL.md +86 -0
- package/templates/skills/squads-workflow/instruction.md +70 -0
- package/dist/chunk-3TSY2K7R.js.map +0 -1
- package/dist/chunk-FUHBEL3L.js +0 -203
- package/dist/chunk-FUHBEL3L.js.map +0 -1
- /package/dist/{chunk-HIQ2APYR.js.map → chunk-7PRYDHZW.js.map} +0 -0
- /package/dist/{memory-4PVUKIDK.js.map → memory-ZXDXF6KF.js.map} +0 -0
- /package/dist/{sessions-R4VWIGFR.js.map → sessions-F6LRY7EN.js.map} +0 -0
- /package/dist/{squad-parser-YRE2FEAA.js.map → squad-parser-MSYE4PXL.js.map} +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# {{SQUAD_NAME}}
|
|
2
|
+
|
|
3
|
+
{{SQUAD_DESCRIPTION}}
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- [ ] {{GOAL}}
|
|
8
|
+
|
|
9
|
+
## Agents
|
|
10
|
+
|
|
11
|
+
| Agent | Purpose |
|
|
12
|
+
|-------|---------|
|
|
13
|
+
| lead | Orchestrates the squad and coordinates work |
|
|
14
|
+
|
|
15
|
+
## Pipeline
|
|
16
|
+
|
|
17
|
+
`lead` (orchestrates all work)
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
squads run {{SQUAD_ID}} --execute
|
|
23
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Lead Agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Orchestrate the {{SQUAD_NAME}} squad to achieve its goals.
|
|
5
|
+
|
|
6
|
+
## Model
|
|
7
|
+
leader
|
|
8
|
+
|
|
9
|
+
## Tools
|
|
10
|
+
- Read
|
|
11
|
+
- Write
|
|
12
|
+
- Edit
|
|
13
|
+
- Bash
|
|
14
|
+
- WebSearch
|
|
15
|
+
- WebFetch
|
|
16
|
+
- Task
|
|
17
|
+
|
|
18
|
+
## Instructions
|
|
19
|
+
|
|
20
|
+
You are the lead agent for the {{SQUAD_NAME}} squad.
|
|
21
|
+
|
|
22
|
+
**Goal**: {{GOAL}}
|
|
23
|
+
|
|
24
|
+
### Approach
|
|
25
|
+
|
|
26
|
+
1. **Understand the goal** - Break down what needs to be accomplished
|
|
27
|
+
2. **Plan the work** - Create a clear execution plan
|
|
28
|
+
3. **Execute** - Work through the plan step by step
|
|
29
|
+
4. **Verify** - Confirm the goal is achieved
|
|
30
|
+
5. **Document** - Update memory with learnings
|
|
31
|
+
|
|
32
|
+
### Guidelines
|
|
33
|
+
|
|
34
|
+
- Use the Task tool to spawn sub-agents for complex, parallelizable work
|
|
35
|
+
- Check existing memory before researching: `squads memory query "<topic>"`
|
|
36
|
+
- Create GitHub issues for follow-up work
|
|
37
|
+
- Update `.agents/memory/{{SQUAD_ID}}/lead/state.md` with progress
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
Progress updates and work artifacts as appropriate.
|
|
41
|
+
|
|
42
|
+
## Labels
|
|
43
|
+
- lead
|
|
44
|
+
- orchestration
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Getting Started with Squads
|
|
2
|
+
|
|
3
|
+
## What You've Set Up
|
|
4
|
+
|
|
5
|
+
- **Your first squad** ready to run (`squads run {{SQUAD_ID}}`)
|
|
6
|
+
- **Memory system** for persistent context
|
|
7
|
+
- **Hooks** that sync status and memory automatically
|
|
8
|
+
|
|
9
|
+
## Next Steps
|
|
10
|
+
|
|
11
|
+
1. Run your squad: `squads run {{SQUAD_ID}} --execute`
|
|
12
|
+
2. Check the dashboard: `squads dash`
|
|
13
|
+
3. Create more squads in `.agents/squads/`
|
|
14
|
+
|
|
15
|
+
## Tips
|
|
16
|
+
|
|
17
|
+
- Check memory before researching: `squads memory query "<topic>"`
|
|
18
|
+
- Use `squads context` for business alignment on complex tasks
|
|
19
|
+
- Agents are reusable - if you do something twice, make it an agent
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: squads-learn
|
|
3
|
+
description: Capture learnings after completing work. Use when finishing a task, fixing a bug, discovering a pattern, or learning something worth remembering for future sessions. Helps build institutional memory.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Capture Learnings
|
|
7
|
+
|
|
8
|
+
After completing work, capture what you learned so future sessions can benefit.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- **After fixing a bug** - What was the root cause? How did you find it?
|
|
13
|
+
- **After completing a feature** - What approach worked? What didn't?
|
|
14
|
+
- **After research** - What did you discover? What's the key insight?
|
|
15
|
+
- **When you notice a pattern** - Something that works consistently
|
|
16
|
+
|
|
17
|
+
## How to Capture
|
|
18
|
+
|
|
19
|
+
### Quick Learning (one-liner)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
squads learn "The auth token needs to be refreshed after 1 hour, not when the API returns 401"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### With Context
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
squads learn "Always check memory before researching to avoid duplicate work" \
|
|
29
|
+
--squad engineering \
|
|
30
|
+
--category pattern \
|
|
31
|
+
--tags "memory,research,efficiency"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Categories
|
|
35
|
+
|
|
36
|
+
- `success` - Something that worked well
|
|
37
|
+
- `failure` - Something that didn't work (learn from mistakes)
|
|
38
|
+
- `pattern` - A reusable approach
|
|
39
|
+
- `tip` - General advice
|
|
40
|
+
|
|
41
|
+
## Workflow Integration
|
|
42
|
+
|
|
43
|
+
### End of Task
|
|
44
|
+
|
|
45
|
+
Before marking a task complete, ask yourself:
|
|
46
|
+
1. What worked that I should remember?
|
|
47
|
+
2. What didn't work that I should avoid?
|
|
48
|
+
3. Is there a pattern here worth capturing?
|
|
49
|
+
|
|
50
|
+
If yes to any → `squads learn "<insight>"`
|
|
51
|
+
|
|
52
|
+
### Before Similar Tasks
|
|
53
|
+
|
|
54
|
+
Check existing learnings:
|
|
55
|
+
```bash
|
|
56
|
+
squads learnings search "auth"
|
|
57
|
+
squads learnings show engineering --tag auth
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# After fixing a bug
|
|
64
|
+
squads learn "PostgreSQL connection pool exhaustion was caused by unclosed transactions in error paths" --category failure --tags db,postgres,connection
|
|
65
|
+
|
|
66
|
+
# After successful implementation
|
|
67
|
+
squads learn "Using TypeScript strict mode caught 3 type errors before runtime" --category success --tags typescript,types
|
|
68
|
+
|
|
69
|
+
# Noticing a pattern
|
|
70
|
+
squads learn "When context exceeds 70%, always run squads memory sync before continuing" --category pattern --tags context,memory
|
|
71
|
+
|
|
72
|
+
# General tip
|
|
73
|
+
squads learn "The gh CLI is faster than the GitHub API for simple operations" --category tip --tags github,cli
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## View Learnings
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
squads learnings show <squad> # Squad's learnings
|
|
80
|
+
squads learnings search "<query>" # Search all learnings
|
|
81
|
+
squads learnings show engineering -n 5 # Last 5 for engineering
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Key Principle
|
|
85
|
+
|
|
86
|
+
**Learnings compound.** Each captured insight makes future sessions smarter. A 30-second `squads learn` call can save hours of re-discovery.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Squads Workflow
|
|
2
|
+
|
|
3
|
+
Use this skill when working with squads-cli to maintain persistent memory, track goals, and coordinate work.
|
|
4
|
+
|
|
5
|
+
## Session Start
|
|
6
|
+
|
|
7
|
+
At session start, you'll see `squads status` output automatically. For complex tasks, run:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
squads context # Get business context, goals, decisions
|
|
11
|
+
squads memory query "<topic>" # Check what we already know
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
**Skip context loading for simple tasks** (typo fixes, quick questions).
|
|
15
|
+
|
|
16
|
+
## Core Commands
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
# Context & Status
|
|
20
|
+
squads context # Business context for alignment
|
|
21
|
+
squads status # Squad overview
|
|
22
|
+
squads dash # Full dashboard
|
|
23
|
+
|
|
24
|
+
# Memory
|
|
25
|
+
squads memory query "<topic>" # Search memory
|
|
26
|
+
squads memory show <squad> # Squad's full memory
|
|
27
|
+
|
|
28
|
+
# Goals
|
|
29
|
+
squads goal list # All active goals
|
|
30
|
+
squads goal set <squad> "X" # Add a goal
|
|
31
|
+
|
|
32
|
+
# Running Agents
|
|
33
|
+
squads run <squad> # Run all agents in squad
|
|
34
|
+
squads run <squad>/<agent> # Run specific agent
|
|
35
|
+
squads list # List all agents
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Workflow
|
|
39
|
+
|
|
40
|
+
### Before Research
|
|
41
|
+
Always check memory first to avoid re-researching:
|
|
42
|
+
```bash
|
|
43
|
+
squads memory query "topic"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### After Work
|
|
47
|
+
Update memory with what you learned by editing:
|
|
48
|
+
`.agents/memory/<squad>/<agent>/state.md`
|
|
49
|
+
|
|
50
|
+
### Commits
|
|
51
|
+
Include goal attribution when relevant:
|
|
52
|
+
```
|
|
53
|
+
feat: add user auth [goal:engineering/1]
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Agent Execution
|
|
57
|
+
|
|
58
|
+
When a task could be automated:
|
|
59
|
+
1. Check if agent exists: `squads list | grep <keyword>`
|
|
60
|
+
2. If yes: `squads run <squad>/<agent>`
|
|
61
|
+
3. If no: Create agent in `.agents/squads/<squad>/<name>.md`
|
|
62
|
+
|
|
63
|
+
## Memory Locations
|
|
64
|
+
|
|
65
|
+
- `.agents/memory/<squad>/<agent>/state.md` - Current knowledge
|
|
66
|
+
- `.agents/memory/<squad>/<agent>/learnings.md` - Insights over time
|
|
67
|
+
|
|
68
|
+
## Key Principle
|
|
69
|
+
|
|
70
|
+
**Memory is your cross-session brain.** Without it, every session starts fresh. With it, you build on previous work.
|
|
@@ -115,11 +115,23 @@ services:
|
|
|
115
115
|
environment:
|
|
116
116
|
# Override database URL for container network
|
|
117
117
|
DATABASE_URL: postgresql://squads:squads@postgres:5432/squads
|
|
118
|
+
# Redis URL for caching and event buffer
|
|
119
|
+
REDIS_URL: redis://redis:6379/0
|
|
120
|
+
# HQ path for agent file access
|
|
121
|
+
HQ_PATH: /hq
|
|
122
|
+
# GCP credentials for KMS
|
|
123
|
+
GOOGLE_APPLICATION_CREDENTIALS: /gcloud/application_default_credentials.json
|
|
124
|
+
GCP_PROJECT: agents-squads-prod
|
|
125
|
+
volumes:
|
|
126
|
+
- ../../hq:/hq:ro
|
|
127
|
+
- ~/.config/gcloud:/gcloud:ro
|
|
118
128
|
ports:
|
|
119
129
|
- "${SCHEDULER_API_PORT:-8090}:8090"
|
|
120
130
|
depends_on:
|
|
121
131
|
postgres:
|
|
122
132
|
condition: service_healthy
|
|
133
|
+
redis:
|
|
134
|
+
condition: service_healthy
|
|
123
135
|
healthcheck:
|
|
124
136
|
test: ["CMD", "curl", "-f", "http://localhost:8090/health"]
|
|
125
137
|
interval: 30s
|
|
@@ -199,8 +211,12 @@ services:
|
|
|
199
211
|
HQ_PATH: /hq
|
|
200
212
|
SLACK_WORKER_POLL_INTERVAL: "5"
|
|
201
213
|
SLACK_WORKER_MODEL: "claude-sonnet-4-20250514"
|
|
214
|
+
# GCP credentials for KMS
|
|
215
|
+
GOOGLE_APPLICATION_CREDENTIALS: /gcloud/application_default_credentials.json
|
|
216
|
+
GCP_PROJECT: agents-squads-prod
|
|
202
217
|
volumes:
|
|
203
218
|
- ../../hq:/hq:ro
|
|
219
|
+
- ~/.config/gcloud:/gcloud:ro
|
|
204
220
|
depends_on:
|
|
205
221
|
postgres:
|
|
206
222
|
condition: service_healthy
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "squads-cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Open source CLI for AI agent coordination and execution. Domain-aligned squads with persistent memory and goals.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -16,6 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"files": [
|
|
18
18
|
"dist",
|
|
19
|
+
"templates",
|
|
19
20
|
"docker/docker-compose.yml",
|
|
20
21
|
"docker/docker-compose.engram.yml",
|
|
21
22
|
"docker/.env.example",
|
|
@@ -28,7 +29,7 @@
|
|
|
28
29
|
"docker/telemetry-ping/"
|
|
29
30
|
],
|
|
30
31
|
"scripts": {
|
|
31
|
-
"build": "tsup",
|
|
32
|
+
"build": "tsup && cp -r templates dist/",
|
|
32
33
|
"dev": "tsup --watch",
|
|
33
34
|
"start": "node dist/cli.js",
|
|
34
35
|
"lint": "eslint src",
|
|
@@ -80,6 +81,7 @@
|
|
|
80
81
|
"dotenv": "^17.2.3",
|
|
81
82
|
"gray-matter": "^4.0.3",
|
|
82
83
|
"inquirer": "^9.2.12",
|
|
84
|
+
"ioredis": "^5.9.2",
|
|
83
85
|
"minimatch": "^10.1.1",
|
|
84
86
|
"open": "^11.0.0",
|
|
85
87
|
"ora": "^8.0.1",
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# AGENTS.md
|
|
2
|
+
# Project guidance for AI coding agents (vendor-neutral)
|
|
3
|
+
|
|
4
|
+
This project uses AI agent squads for development and operations.
|
|
5
|
+
|
|
6
|
+
## Getting Started
|
|
7
|
+
|
|
8
|
+
If this project is not yet set up, run:
|
|
9
|
+
```bash
|
|
10
|
+
squads setup # Guided onboarding (recommended)
|
|
11
|
+
squads init # Quick init (non-interactive)
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Provider: {{PROVIDER_NAME}}
|
|
15
|
+
|
|
16
|
+
Configure in: `.agents/config/provider.yaml`
|
|
17
|
+
|
|
18
|
+
## Repository Structure
|
|
19
|
+
|
|
20
|
+
```
|
|
21
|
+
.agents/
|
|
22
|
+
├── squads/ # Agent team definitions
|
|
23
|
+
│ └── <squad>/
|
|
24
|
+
│ ├── SQUAD.md # Squad definition
|
|
25
|
+
│ └── *.md # Agent files
|
|
26
|
+
├── memory/ # Persistent context
|
|
27
|
+
├── config/ # Provider and model configuration
|
|
28
|
+
└── outputs/ # Agent outputs
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Agent Guidelines
|
|
32
|
+
|
|
33
|
+
### Before Starting Work
|
|
34
|
+
1. Run `squads status` to understand current state
|
|
35
|
+
2. Check `squads memory query "<topic>"` for existing knowledge
|
|
36
|
+
3. Read relevant SQUAD.md files
|
|
37
|
+
|
|
38
|
+
### During Work
|
|
39
|
+
- Update todo list frequently for visibility
|
|
40
|
+
- Prefer editing existing files over creating new ones
|
|
41
|
+
- Keep changes focused - one task per commit/PR
|
|
42
|
+
|
|
43
|
+
### After Work
|
|
44
|
+
- Update memory in `.agents/memory/<squad>/<agent>/state.md`
|
|
45
|
+
- Create GitHub issues for follow-up work
|
|
46
|
+
|
|
47
|
+
## Quick Reference
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
squads setup # Guided onboarding (new projects)
|
|
51
|
+
squads status # Overview
|
|
52
|
+
squads dash # Full dashboard
|
|
53
|
+
squads run <squad> # Run a squad
|
|
54
|
+
squads list # All agents
|
|
55
|
+
squads memory query X # Search memory
|
|
56
|
+
squads goal list # View goals
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Model Aliases
|
|
60
|
+
|
|
61
|
+
Agents can use semantic model names that resolve per provider:
|
|
62
|
+
- `leader` - Most capable (complex tasks)
|
|
63
|
+
- `worker` - Balanced (standard tasks)
|
|
64
|
+
- `simple` - Fast (simple tasks)
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Business Brief
|
|
2
|
+
|
|
3
|
+
## #1 Priority
|
|
4
|
+
|
|
5
|
+
**[Define your top priority here]**
|
|
6
|
+
|
|
7
|
+
## Runway
|
|
8
|
+
|
|
9
|
+
**Pressure**: LOW | MEDIUM | HIGH
|
|
10
|
+
|
|
11
|
+
## Current Focus
|
|
12
|
+
|
|
13
|
+
1. **[Focus area 1]** - Description
|
|
14
|
+
2. **[Focus area 2]** - Description
|
|
15
|
+
3. **[Focus area 3]** - Description
|
|
16
|
+
|
|
17
|
+
## Blockers
|
|
18
|
+
|
|
19
|
+
- None currently (or list blockers)
|
|
20
|
+
|
|
21
|
+
## Decision Framework
|
|
22
|
+
|
|
23
|
+
1. Does this drive the #1 priority?
|
|
24
|
+
2. Is there a simpler approach?
|
|
25
|
+
3. What's the opportunity cost?
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
*This file is read by `squads context` to provide business alignment.*
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Claude-Specific Instructions
|
|
2
|
+
|
|
3
|
+
Extends AGENTS.md with Claude Code specific features.
|
|
4
|
+
|
|
5
|
+
## New Project Setup
|
|
6
|
+
|
|
7
|
+
If this project needs squads setup, run:
|
|
8
|
+
```bash
|
|
9
|
+
squads setup # Guided 6-step onboarding with prereq checks
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
This validates Docker, GitHub CLI, Claude CLI, then helps create first squad.
|
|
13
|
+
|
|
14
|
+
## Skill Available
|
|
15
|
+
|
|
16
|
+
Use `/squads-workflow` for detailed workflow guidance.
|
|
17
|
+
|
|
18
|
+
## Session Hooks
|
|
19
|
+
|
|
20
|
+
Claude Code hooks are configured in `.claude/settings.json`:
|
|
21
|
+
- **SessionStart**: Runs `squads status` automatically
|
|
22
|
+
- **Stop**: Syncs memory and prompts for learnings
|
|
23
|
+
|
|
24
|
+
## Creating Agents
|
|
25
|
+
|
|
26
|
+
Agents live in `.agents/squads/<squad-name>/<agent-name>.md`:
|
|
27
|
+
|
|
28
|
+
```markdown
|
|
29
|
+
# Agent Name
|
|
30
|
+
|
|
31
|
+
## Purpose
|
|
32
|
+
One sentence: what this agent does.
|
|
33
|
+
|
|
34
|
+
## Model
|
|
35
|
+
simple # or: worker, leader
|
|
36
|
+
|
|
37
|
+
## Instructions
|
|
38
|
+
1. Specific step
|
|
39
|
+
2. Another step
|
|
40
|
+
3. Output location
|
|
41
|
+
|
|
42
|
+
## Output
|
|
43
|
+
What it produces and where it goes.
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
## Commit Signature
|
|
47
|
+
|
|
48
|
+
```
|
|
49
|
+
Co-Authored-By: Claude <model> <noreply@anthropic.com>
|
|
50
|
+
```
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# {{SQUAD_NAME}}
|
|
2
|
+
|
|
3
|
+
{{SQUAD_DESCRIPTION}}
|
|
4
|
+
|
|
5
|
+
## Goals
|
|
6
|
+
|
|
7
|
+
- [ ] {{GOAL}}
|
|
8
|
+
|
|
9
|
+
## Agents
|
|
10
|
+
|
|
11
|
+
| Agent | Purpose |
|
|
12
|
+
|-------|---------|
|
|
13
|
+
| lead | Orchestrates the squad and coordinates work |
|
|
14
|
+
|
|
15
|
+
## Pipeline
|
|
16
|
+
|
|
17
|
+
`lead` (orchestrates all work)
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
squads run {{SQUAD_ID}} --execute
|
|
23
|
+
```
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Lead Agent
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
Orchestrate the {{SQUAD_NAME}} squad to achieve its goals.
|
|
5
|
+
|
|
6
|
+
## Model
|
|
7
|
+
leader
|
|
8
|
+
|
|
9
|
+
## Tools
|
|
10
|
+
- Read
|
|
11
|
+
- Write
|
|
12
|
+
- Edit
|
|
13
|
+
- Bash
|
|
14
|
+
- WebSearch
|
|
15
|
+
- WebFetch
|
|
16
|
+
- Task
|
|
17
|
+
|
|
18
|
+
## Instructions
|
|
19
|
+
|
|
20
|
+
You are the lead agent for the {{SQUAD_NAME}} squad.
|
|
21
|
+
|
|
22
|
+
**Goal**: {{GOAL}}
|
|
23
|
+
|
|
24
|
+
### Approach
|
|
25
|
+
|
|
26
|
+
1. **Understand the goal** - Break down what needs to be accomplished
|
|
27
|
+
2. **Plan the work** - Create a clear execution plan
|
|
28
|
+
3. **Execute** - Work through the plan step by step
|
|
29
|
+
4. **Verify** - Confirm the goal is achieved
|
|
30
|
+
5. **Document** - Update memory with learnings
|
|
31
|
+
|
|
32
|
+
### Guidelines
|
|
33
|
+
|
|
34
|
+
- Use the Task tool to spawn sub-agents for complex, parallelizable work
|
|
35
|
+
- Check existing memory before researching: `squads memory query "<topic>"`
|
|
36
|
+
- Create GitHub issues for follow-up work
|
|
37
|
+
- Update `.agents/memory/{{SQUAD_ID}}/lead/state.md` with progress
|
|
38
|
+
|
|
39
|
+
## Output
|
|
40
|
+
Progress updates and work artifacts as appropriate.
|
|
41
|
+
|
|
42
|
+
## Labels
|
|
43
|
+
- lead
|
|
44
|
+
- orchestration
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Getting Started with Squads
|
|
2
|
+
|
|
3
|
+
## What You've Set Up
|
|
4
|
+
|
|
5
|
+
- **Your first squad** ready to run (`squads run {{SQUAD_ID}}`)
|
|
6
|
+
- **Memory system** for persistent context
|
|
7
|
+
- **Hooks** that sync status and memory automatically
|
|
8
|
+
|
|
9
|
+
## Next Steps
|
|
10
|
+
|
|
11
|
+
1. Run your squad: `squads run {{SQUAD_ID}} --execute`
|
|
12
|
+
2. Check the dashboard: `squads dash`
|
|
13
|
+
3. Create more squads in `.agents/squads/`
|
|
14
|
+
|
|
15
|
+
## Tips
|
|
16
|
+
|
|
17
|
+
- Check memory before researching: `squads memory query "<topic>"`
|
|
18
|
+
- Use `squads context` for business alignment on complex tasks
|
|
19
|
+
- Agents are reusable - if you do something twice, make it an agent
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: squads-learn
|
|
3
|
+
description: Capture learnings after completing work. Use when finishing a task, fixing a bug, discovering a pattern, or learning something worth remembering for future sessions. Helps build institutional memory.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Capture Learnings
|
|
7
|
+
|
|
8
|
+
After completing work, capture what you learned so future sessions can benefit.
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
- **After fixing a bug** - What was the root cause? How did you find it?
|
|
13
|
+
- **After completing a feature** - What approach worked? What didn't?
|
|
14
|
+
- **After research** - What did you discover? What's the key insight?
|
|
15
|
+
- **When you notice a pattern** - Something that works consistently
|
|
16
|
+
|
|
17
|
+
## How to Capture
|
|
18
|
+
|
|
19
|
+
### Quick Learning (one-liner)
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
squads learn "The auth token needs to be refreshed after 1 hour, not when the API returns 401"
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### With Context
|
|
26
|
+
|
|
27
|
+
```bash
|
|
28
|
+
squads learn "Always check memory before researching to avoid duplicate work" \
|
|
29
|
+
--squad engineering \
|
|
30
|
+
--category pattern \
|
|
31
|
+
--tags "memory,research,efficiency"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
### Categories
|
|
35
|
+
|
|
36
|
+
- `success` - Something that worked well
|
|
37
|
+
- `failure` - Something that didn't work (learn from mistakes)
|
|
38
|
+
- `pattern` - A reusable approach
|
|
39
|
+
- `tip` - General advice
|
|
40
|
+
|
|
41
|
+
## Workflow Integration
|
|
42
|
+
|
|
43
|
+
### End of Task
|
|
44
|
+
|
|
45
|
+
Before marking a task complete, ask yourself:
|
|
46
|
+
1. What worked that I should remember?
|
|
47
|
+
2. What didn't work that I should avoid?
|
|
48
|
+
3. Is there a pattern here worth capturing?
|
|
49
|
+
|
|
50
|
+
If yes to any → `squads learn "<insight>"`
|
|
51
|
+
|
|
52
|
+
### Before Similar Tasks
|
|
53
|
+
|
|
54
|
+
Check existing learnings:
|
|
55
|
+
```bash
|
|
56
|
+
squads learnings search "auth"
|
|
57
|
+
squads learnings show engineering --tag auth
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
# After fixing a bug
|
|
64
|
+
squads learn "PostgreSQL connection pool exhaustion was caused by unclosed transactions in error paths" --category failure --tags db,postgres,connection
|
|
65
|
+
|
|
66
|
+
# After successful implementation
|
|
67
|
+
squads learn "Using TypeScript strict mode caught 3 type errors before runtime" --category success --tags typescript,types
|
|
68
|
+
|
|
69
|
+
# Noticing a pattern
|
|
70
|
+
squads learn "When context exceeds 70%, always run squads memory sync before continuing" --category pattern --tags context,memory
|
|
71
|
+
|
|
72
|
+
# General tip
|
|
73
|
+
squads learn "The gh CLI is faster than the GitHub API for simple operations" --category tip --tags github,cli
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## View Learnings
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
squads learnings show <squad> # Squad's learnings
|
|
80
|
+
squads learnings search "<query>" # Search all learnings
|
|
81
|
+
squads learnings show engineering -n 5 # Last 5 for engineering
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Key Principle
|
|
85
|
+
|
|
86
|
+
**Learnings compound.** Each captured insight makes future sessions smarter. A 30-second `squads learn` call can save hours of re-discovery.
|