squads-cli 0.4.10 → 0.4.11
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/README.md +66 -2
- package/dist/cli.js +868 -241
- package/dist/cli.js.map +1 -1
- package/dist/index.d.ts +569 -5
- package/dist/index.js +1030 -0
- package/dist/index.js.map +1 -1
- package/docker/docker-compose.engram.yml +55 -66
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -285,6 +285,36 @@ squads memory show engineering
|
|
|
285
285
|
squads memory query "performance"
|
|
286
286
|
```
|
|
287
287
|
|
|
288
|
+
### Learning Loop
|
|
289
|
+
|
|
290
|
+
Capture insights that persist across sessions:
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
# After fixing a bug
|
|
294
|
+
squads learn "PostgreSQL connection pool exhaustion was caused by unclosed transactions"
|
|
295
|
+
|
|
296
|
+
# With metadata
|
|
297
|
+
squads learn "Always check memory before researching" --squad engineering --category pattern
|
|
298
|
+
|
|
299
|
+
# View learnings
|
|
300
|
+
squads learnings show engineering
|
|
301
|
+
squads learnings search "postgres"
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Learnings are stored in `.agents/memory/<squad>/shared/learnings.md` and sync with `squads memory sync`.
|
|
305
|
+
|
|
306
|
+
**Categories:**
|
|
307
|
+
- `success` — What worked well
|
|
308
|
+
- `failure` — What didn't work (learn from mistakes)
|
|
309
|
+
- `pattern` — Reusable approach
|
|
310
|
+
- `tip` — General advice
|
|
311
|
+
|
|
312
|
+
**The learning loop:**
|
|
313
|
+
1. Session starts → hooks inject squad status + memory
|
|
314
|
+
2. Work happens → you solve problems, discover things
|
|
315
|
+
3. Session ends → Stop hook prompts "Capture learnings: squads learn..."
|
|
316
|
+
4. Next session → Previous learnings compound via memory queries
|
|
317
|
+
|
|
288
318
|
### Goals with Metrics
|
|
289
319
|
|
|
290
320
|
Goals can include optional metric annotations for tracking KPIs:
|
|
@@ -436,6 +466,19 @@ squads feedback show research -n 10 # Show more entries
|
|
|
436
466
|
squads feedback stats # Summary across all squads
|
|
437
467
|
```
|
|
438
468
|
|
|
469
|
+
### Learnings
|
|
470
|
+
|
|
471
|
+
```bash
|
|
472
|
+
squads learn "Insight here" # Capture a learning
|
|
473
|
+
squads learn "Pattern" -s engineering -c pattern # With squad and category
|
|
474
|
+
squads learn "Tip" -t "cli,perf" # With tags
|
|
475
|
+
squads learnings show engineering # View squad learnings
|
|
476
|
+
squads learnings show engineering -n 5 # Limit results
|
|
477
|
+
squads learnings show engineering --category pattern # Filter by category
|
|
478
|
+
squads learnings show engineering --tag perf # Filter by tag
|
|
479
|
+
squads learnings search "postgres" # Search all learnings
|
|
480
|
+
```
|
|
481
|
+
|
|
439
482
|
### Session Management
|
|
440
483
|
|
|
441
484
|
```bash
|
|
@@ -729,6 +772,18 @@ squads feedback show <squad> View history
|
|
|
729
772
|
-n, --limit <n> Entries to show (default: 5)
|
|
730
773
|
squads feedback stats Summary across squads
|
|
731
774
|
|
|
775
|
+
squads learn <insight> Capture a learning
|
|
776
|
+
-s, --squad <squad> Associate with squad (default: general)
|
|
777
|
+
-c, --category <category> Category: success, failure, pattern, tip
|
|
778
|
+
-t, --tags <tags> Comma-separated tags
|
|
779
|
+
--context <context> Additional context
|
|
780
|
+
squads learnings show <squad> View squad learnings
|
|
781
|
+
-n, --limit <n> Entries to show (default: 10)
|
|
782
|
+
--category <category> Filter by category
|
|
783
|
+
--tag <tag> Filter by tag
|
|
784
|
+
squads learnings search <query> Search all learnings
|
|
785
|
+
-n, --limit <n> Results to show (default: 10)
|
|
786
|
+
|
|
732
787
|
squads sessions List active sessions
|
|
733
788
|
-v, --verbose Session details
|
|
734
789
|
-j, --json JSON output
|
|
@@ -869,7 +924,7 @@ squads whoami Show user
|
|
|
869
924
|
|
|
870
925
|
## Claude Code Integration
|
|
871
926
|
|
|
872
|
-
### Option 1: Session
|
|
927
|
+
### Option 1: Session Hooks (Recommended)
|
|
873
928
|
|
|
874
929
|
Add to `.claude/settings.json`:
|
|
875
930
|
|
|
@@ -882,12 +937,21 @@ Add to `.claude/settings.json`:
|
|
|
882
937
|
"command": "squads status",
|
|
883
938
|
"timeout": 10
|
|
884
939
|
}]
|
|
940
|
+
}],
|
|
941
|
+
"Stop": [{
|
|
942
|
+
"hooks": [{
|
|
943
|
+
"type": "command",
|
|
944
|
+
"command": "squads memory sync && echo \"\\n💡 Capture learnings: squads learn \\\"<insight>\\\"\\n\"",
|
|
945
|
+
"timeout": 15
|
|
946
|
+
}]
|
|
885
947
|
}]
|
|
886
948
|
}
|
|
887
949
|
}
|
|
888
950
|
```
|
|
889
951
|
|
|
890
|
-
Now every Claude Code session
|
|
952
|
+
Now every Claude Code session:
|
|
953
|
+
- **Starts** with squad status injected
|
|
954
|
+
- **Ends** with memory synced and a prompt to capture learnings
|
|
891
955
|
|
|
892
956
|
### Option 2: CLAUDE.md Instructions
|
|
893
957
|
|