@bradygaster/squad-cli 0.8.25 → 0.9.1
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 +329 -77
- package/dist/cli/commands/aspire.d.ts.map +1 -1
- package/dist/cli/commands/aspire.js +3 -0
- package/dist/cli/commands/aspire.js.map +1 -1
- package/dist/cli/commands/build.js +3 -3
- package/dist/cli/commands/build.js.map +1 -1
- package/dist/cli/commands/cast.d.ts +13 -0
- package/dist/cli/commands/cast.d.ts.map +1 -0
- package/dist/cli/commands/cast.js +77 -0
- package/dist/cli/commands/cast.js.map +1 -0
- package/dist/cli/commands/cost.d.ts +2 -0
- package/dist/cli/commands/cost.d.ts.map +1 -0
- package/dist/cli/commands/cost.js +170 -0
- package/dist/cli/commands/cost.js.map +1 -0
- package/dist/cli/commands/cross-squad.d.ts +12 -0
- package/dist/cli/commands/cross-squad.d.ts.map +1 -0
- package/dist/cli/commands/cross-squad.js +80 -0
- package/dist/cli/commands/cross-squad.js.map +1 -0
- package/dist/cli/commands/doctor.d.ts +5 -0
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +156 -0
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/economy.d.ts +10 -0
- package/dist/cli/commands/economy.d.ts.map +1 -0
- package/dist/cli/commands/economy.js +64 -0
- package/dist/cli/commands/economy.js.map +1 -0
- package/dist/cli/commands/export.d.ts.map +1 -1
- package/dist/cli/commands/export.js +11 -4
- package/dist/cli/commands/export.js.map +1 -1
- package/dist/cli/commands/import.js +2 -2
- package/dist/cli/commands/import.js.map +1 -1
- package/dist/cli/commands/personal.d.ts +16 -0
- package/dist/cli/commands/personal.d.ts.map +1 -0
- package/dist/cli/commands/personal.js +213 -0
- package/dist/cli/commands/personal.js.map +1 -0
- package/dist/cli/commands/roles.d.ts +2 -0
- package/dist/cli/commands/roles.d.ts.map +1 -0
- package/dist/cli/commands/roles.js +54 -0
- package/dist/cli/commands/roles.js.map +1 -0
- package/dist/cli/commands/schedule.d.ts +14 -0
- package/dist/cli/commands/schedule.d.ts.map +1 -0
- package/dist/cli/commands/schedule.js +208 -0
- package/dist/cli/commands/schedule.js.map +1 -0
- package/dist/cli/commands/watch.d.ts.map +1 -1
- package/dist/cli/commands/watch.js +17 -5
- package/dist/cli/commands/watch.js.map +1 -1
- package/dist/cli/core/cast.d.ts +9 -0
- package/dist/cli/core/cast.d.ts.map +1 -1
- package/dist/cli/core/cast.js +170 -60
- package/dist/cli/core/cast.js.map +1 -1
- package/dist/cli/core/detect-squad-dir.d.ts +10 -0
- package/dist/cli/core/detect-squad-dir.d.ts.map +1 -1
- package/dist/cli/core/detect-squad-dir.js +47 -0
- package/dist/cli/core/detect-squad-dir.js.map +1 -1
- package/dist/cli/core/init.d.ts +8 -0
- package/dist/cli/core/init.d.ts.map +1 -1
- package/dist/cli/core/init.js +115 -2
- package/dist/cli/core/init.js.map +1 -1
- package/dist/cli/core/migrations.d.ts.map +1 -1
- package/dist/cli/core/migrations.js +21 -0
- package/dist/cli/core/migrations.js.map +1 -1
- package/dist/cli/core/team-md.js +34 -34
- package/dist/cli/core/templates.d.ts.map +1 -1
- package/dist/cli/core/templates.js +8 -1
- package/dist/cli/core/templates.js.map +1 -1
- package/dist/cli/core/upgrade.d.ts +14 -0
- package/dist/cli/core/upgrade.d.ts.map +1 -1
- package/dist/cli/core/upgrade.js +182 -48
- package/dist/cli/core/upgrade.js.map +1 -1
- package/dist/cli/core/version.js +2 -2
- package/dist/cli/core/version.js.map +1 -1
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/self-update.d.ts +21 -0
- package/dist/cli/self-update.d.ts.map +1 -0
- package/dist/cli/self-update.js +113 -0
- package/dist/cli/self-update.js.map +1 -0
- package/dist/cli/shell/autocomplete.d.ts.map +1 -1
- package/dist/cli/shell/autocomplete.js +5 -0
- package/dist/cli/shell/autocomplete.js.map +1 -1
- package/dist/cli/shell/commands.d.ts.map +1 -1
- package/dist/cli/shell/commands.js +55 -24
- package/dist/cli/shell/commands.js.map +1 -1
- package/dist/cli/shell/components/AgentPanel.d.ts.map +1 -1
- package/dist/cli/shell/components/AgentPanel.js +21 -6
- package/dist/cli/shell/components/AgentPanel.js.map +1 -1
- package/dist/cli/shell/components/App.d.ts.map +1 -1
- package/dist/cli/shell/components/App.js +33 -15
- package/dist/cli/shell/components/App.js.map +1 -1
- package/dist/cli/shell/components/InputPrompt.js +1 -1
- package/dist/cli/shell/components/InputPrompt.js.map +1 -1
- package/dist/cli/shell/components/MessageStream.d.ts +2 -0
- package/dist/cli/shell/components/MessageStream.d.ts.map +1 -1
- package/dist/cli/shell/components/MessageStream.js +20 -20
- package/dist/cli/shell/components/MessageStream.js.map +1 -1
- package/dist/cli/shell/components/ThinkingIndicator.d.ts +4 -0
- package/dist/cli/shell/components/ThinkingIndicator.d.ts.map +1 -1
- package/dist/cli/shell/components/ThinkingIndicator.js +23 -4
- package/dist/cli/shell/components/ThinkingIndicator.js.map +1 -1
- package/dist/cli/shell/coordinator.d.ts +7 -0
- package/dist/cli/shell/coordinator.d.ts.map +1 -1
- package/dist/cli/shell/coordinator.js +206 -88
- package/dist/cli/shell/coordinator.js.map +1 -1
- package/dist/cli/shell/error-messages.d.ts +14 -0
- package/dist/cli/shell/error-messages.d.ts.map +1 -1
- package/dist/cli/shell/error-messages.js +65 -1
- package/dist/cli/shell/error-messages.js.map +1 -1
- package/dist/cli/shell/index.d.ts +1 -1
- package/dist/cli/shell/index.d.ts.map +1 -1
- package/dist/cli/shell/index.js +83 -12
- package/dist/cli/shell/index.js.map +1 -1
- package/dist/cli/shell/router.d.ts.map +1 -1
- package/dist/cli/shell/router.js +21 -2
- package/dist/cli/shell/router.js.map +1 -1
- package/dist/cli/shell/stream-bridge.d.ts +2 -0
- package/dist/cli/shell/stream-bridge.d.ts.map +1 -1
- package/dist/cli/shell/stream-bridge.js +11 -2
- package/dist/cli/shell/stream-bridge.js.map +1 -1
- package/dist/cli/shell/terminal.d.ts +5 -5
- package/dist/cli/shell/terminal.d.ts.map +1 -1
- package/dist/cli/shell/terminal.js +35 -26
- package/dist/cli/shell/terminal.js.map +1 -1
- package/dist/cli-entry.js +124 -42
- package/dist/cli-entry.js.map +1 -1
- package/package.json +20 -4
- package/scripts/patch-esm-imports.mjs +106 -77
- package/scripts/patch-ink-rendering.mjs +115 -0
- package/templates/casting/Futurama.json +10 -0
- package/templates/casting-history.json +4 -4
- package/templates/casting-policy.json +37 -35
- package/templates/casting-reference.md +104 -0
- package/templates/casting-registry.json +3 -3
- package/templates/ceremonies.md +41 -41
- package/templates/charter.md +53 -53
- package/templates/constraint-tracking.md +38 -38
- package/templates/cooperative-rate-limiting.md +229 -0
- package/templates/copilot-instructions.md +46 -46
- package/templates/history.md +10 -10
- package/templates/identity/now.md +9 -9
- package/templates/identity/wisdom.md +15 -15
- package/templates/issue-lifecycle.md +412 -0
- package/templates/keda-scaler.md +164 -0
- package/templates/machine-capabilities.md +75 -0
- package/templates/mcp-config.md +90 -90
- package/templates/multi-agent-format.md +28 -28
- package/templates/orchestration-log.md +27 -27
- package/templates/plugin-marketplace.md +49 -49
- package/templates/ralph-circuit-breaker.md +313 -0
- package/templates/raw-agent-output.md +37 -37
- package/templates/roster.md +60 -60
- package/templates/routing.md +39 -54
- package/templates/run-output.md +50 -50
- package/templates/scribe-charter.md +119 -119
- package/templates/skill.md +24 -24
- package/templates/skills/agent-collaboration/SKILL.md +42 -0
- package/templates/skills/agent-conduct/SKILL.md +24 -0
- package/templates/skills/architectural-proposals/SKILL.md +151 -0
- package/templates/skills/ci-validation-gates/SKILL.md +84 -0
- package/templates/skills/cli-wiring/SKILL.md +47 -0
- package/templates/skills/client-compatibility/SKILL.md +89 -0
- package/templates/skills/cross-squad/SKILL.md +114 -0
- package/templates/skills/distributed-mesh/SKILL.md +287 -0
- package/templates/skills/distributed-mesh/mesh.json.example +30 -0
- package/templates/skills/distributed-mesh/sync-mesh.ps1 +111 -0
- package/templates/skills/distributed-mesh/sync-mesh.sh +104 -0
- package/templates/skills/docs-standards/SKILL.md +71 -0
- package/templates/skills/economy-mode/SKILL.md +114 -0
- package/templates/skills/external-comms/SKILL.md +329 -0
- package/templates/skills/gh-auth-isolation/SKILL.md +183 -0
- package/templates/skills/git-workflow/SKILL.md +204 -0
- package/templates/skills/github-multi-account/SKILL.md +95 -0
- package/templates/skills/history-hygiene/SKILL.md +36 -0
- package/templates/skills/humanizer/SKILL.md +105 -0
- package/templates/skills/init-mode/SKILL.md +102 -0
- package/templates/skills/model-selection/SKILL.md +117 -0
- package/templates/skills/nap/SKILL.md +24 -0
- package/templates/skills/personal-squad/SKILL.md +57 -0
- package/templates/skills/release-process/SKILL.md +423 -0
- package/templates/skills/reskill/SKILL.md +92 -0
- package/templates/skills/reviewer-protocol/SKILL.md +79 -0
- package/templates/skills/secret-handling/SKILL.md +200 -0
- package/templates/skills/session-recovery/SKILL.md +155 -0
- package/templates/skills/squad-conventions/SKILL.md +69 -69
- package/templates/skills/test-discipline/SKILL.md +37 -0
- package/templates/skills/windows-compatibility/SKILL.md +74 -0
- package/templates/squad.agent.md +1287 -1146
- package/templates/workflows/squad-ci.yml +24 -24
- package/templates/workflows/squad-docs.yml +54 -50
- package/templates/workflows/squad-heartbeat.yml +3 -4
- package/templates/workflows/squad-insider-release.yml +61 -61
- package/templates/workflows/squad-issue-assign.yml +161 -161
- package/templates/workflows/squad-label-enforce.yml +181 -181
- package/templates/workflows/squad-preview.yml +55 -55
- package/templates/workflows/squad-promote.yml +120 -120
- package/templates/workflows/squad-release.yml +77 -77
- package/templates/workflows/squad-triage.yml +260 -260
- package/templates/workflows/sync-squad-labels.yml +169 -169
package/templates/run-output.md
CHANGED
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
# Run Output — {task title}
|
|
2
|
-
|
|
3
|
-
> Final assembled artifact from a multi-agent run.
|
|
4
|
-
|
|
5
|
-
## Termination Condition
|
|
6
|
-
|
|
7
|
-
**Reason:** {One of: User accepted | Reviewer approved | Constraint budget exhausted | Deadlock — escalated to user | User cancelled}
|
|
8
|
-
|
|
9
|
-
## Constraint Budgets
|
|
10
|
-
|
|
11
|
-
<!-- Track all active constraints inline. Remove this section if no constraints are active. -->
|
|
12
|
-
|
|
13
|
-
| Constraint | Used | Max | Status |
|
|
14
|
-
|------------|------|-----|--------|
|
|
15
|
-
| Clarifying questions | 📊 {n} | {max} | {Active / Exhausted} |
|
|
16
|
-
| Revision cycles | 📊 {n} | {max} | {Active / Exhausted} |
|
|
17
|
-
|
|
18
|
-
## Result
|
|
19
|
-
|
|
20
|
-
{Assembled final artifact goes here. This is the Coordinator's synthesis of agent outputs.}
|
|
21
|
-
|
|
22
|
-
---
|
|
23
|
-
|
|
24
|
-
## Reviewer Verdict
|
|
25
|
-
|
|
26
|
-
<!-- Include one block per review. Remove this section if no review occurred. -->
|
|
27
|
-
|
|
28
|
-
### Review by {Name} ({Role})
|
|
29
|
-
|
|
30
|
-
| Field | Value |
|
|
31
|
-
|-------|-------|
|
|
32
|
-
| **Verdict** | {Approved / Rejected} |
|
|
33
|
-
| **What's wrong** | {Specific issue — not vague} |
|
|
34
|
-
| **Why it matters** | {Impact if not fixed} |
|
|
35
|
-
| **Who fixes it** | {Name of agent assigned to revise — MUST NOT be the original author} |
|
|
36
|
-
| **Revision budget** | 📊 {used} / {max} revision cycles remaining |
|
|
37
|
-
|
|
38
|
-
---
|
|
39
|
-
|
|
40
|
-
## APPENDIX: RAW AGENT OUTPUTS
|
|
41
|
-
|
|
42
|
-
<!-- Paste each agent's verbatim response below. Do NOT edit, summarize, rewrite, or wrap in code fences. One section per agent. -->
|
|
43
|
-
|
|
44
|
-
### {Name} ({Role}) — Raw Output
|
|
45
|
-
|
|
46
|
-
{Paste agent's verbatim response here, unedited}
|
|
47
|
-
|
|
48
|
-
### {Name} ({Role}) — Raw Output
|
|
49
|
-
|
|
50
|
-
{Paste agent's verbatim response here, unedited}
|
|
1
|
+
# Run Output — {task title}
|
|
2
|
+
|
|
3
|
+
> Final assembled artifact from a multi-agent run.
|
|
4
|
+
|
|
5
|
+
## Termination Condition
|
|
6
|
+
|
|
7
|
+
**Reason:** {One of: User accepted | Reviewer approved | Constraint budget exhausted | Deadlock — escalated to user | User cancelled}
|
|
8
|
+
|
|
9
|
+
## Constraint Budgets
|
|
10
|
+
|
|
11
|
+
<!-- Track all active constraints inline. Remove this section if no constraints are active. -->
|
|
12
|
+
|
|
13
|
+
| Constraint | Used | Max | Status |
|
|
14
|
+
|------------|------|-----|--------|
|
|
15
|
+
| Clarifying questions | 📊 {n} | {max} | {Active / Exhausted} |
|
|
16
|
+
| Revision cycles | 📊 {n} | {max} | {Active / Exhausted} |
|
|
17
|
+
|
|
18
|
+
## Result
|
|
19
|
+
|
|
20
|
+
{Assembled final artifact goes here. This is the Coordinator's synthesis of agent outputs.}
|
|
21
|
+
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
## Reviewer Verdict
|
|
25
|
+
|
|
26
|
+
<!-- Include one block per review. Remove this section if no review occurred. -->
|
|
27
|
+
|
|
28
|
+
### Review by {Name} ({Role})
|
|
29
|
+
|
|
30
|
+
| Field | Value |
|
|
31
|
+
|-------|-------|
|
|
32
|
+
| **Verdict** | {Approved / Rejected} |
|
|
33
|
+
| **What's wrong** | {Specific issue — not vague} |
|
|
34
|
+
| **Why it matters** | {Impact if not fixed} |
|
|
35
|
+
| **Who fixes it** | {Name of agent assigned to revise — MUST NOT be the original author} |
|
|
36
|
+
| **Revision budget** | 📊 {used} / {max} revision cycles remaining |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## APPENDIX: RAW AGENT OUTPUTS
|
|
41
|
+
|
|
42
|
+
<!-- Paste each agent's verbatim response below. Do NOT edit, summarize, rewrite, or wrap in code fences. One section per agent. -->
|
|
43
|
+
|
|
44
|
+
### {Name} ({Role}) — Raw Output
|
|
45
|
+
|
|
46
|
+
{Paste agent's verbatim response here, unedited}
|
|
47
|
+
|
|
48
|
+
### {Name} ({Role}) — Raw Output
|
|
49
|
+
|
|
50
|
+
{Paste agent's verbatim response here, unedited}
|
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
# Scribe
|
|
2
|
-
|
|
3
|
-
> The team's memory. Silent, always present, never forgets.
|
|
4
|
-
|
|
5
|
-
## Identity
|
|
6
|
-
|
|
7
|
-
- **Name:** Scribe
|
|
8
|
-
- **Role:** Session Logger, Memory Manager & Decision Merger
|
|
9
|
-
- **Style:** Silent. Never speaks to the user. Works in the background.
|
|
10
|
-
- **Mode:** Always spawned as `mode: "background"`. Never blocks the conversation.
|
|
11
|
-
|
|
12
|
-
## What I Own
|
|
13
|
-
|
|
14
|
-
- `.squad/log/` — session logs (what happened, who worked, what was decided)
|
|
15
|
-
- `.squad/decisions.md` — the shared decision log all agents read (canonical, merged)
|
|
16
|
-
- `.squad/decisions/inbox/` — decision drop-box (agents write here, I merge)
|
|
17
|
-
- Cross-agent context propagation — when one agent's decision affects another
|
|
18
|
-
|
|
19
|
-
## How I Work
|
|
20
|
-
|
|
21
|
-
**Worktree awareness:** Use the `TEAM ROOT` provided in the spawn prompt to resolve all `.squad/` paths. If no TEAM ROOT is given, run `git rev-parse --show-toplevel` as fallback. Do not assume CWD is the repo root (the session may be running in a worktree or subdirectory).
|
|
22
|
-
|
|
23
|
-
After every substantial work session:
|
|
24
|
-
|
|
25
|
-
1. **Log the session** to `.squad/log/{timestamp}-{topic}.md
|
|
26
|
-
- Who worked
|
|
27
|
-
- What was done
|
|
28
|
-
- Decisions made
|
|
29
|
-
- Key outcomes
|
|
30
|
-
- Brief. Facts only.
|
|
31
|
-
|
|
32
|
-
2. **Merge the decision inbox:**
|
|
33
|
-
- Read all files in `.squad/decisions/inbox/`
|
|
34
|
-
- APPEND each decision's contents to `.squad/decisions.md`
|
|
35
|
-
- Delete each inbox file after merging
|
|
36
|
-
|
|
37
|
-
3. **Deduplicate and consolidate decisions.md:**
|
|
38
|
-
- Parse the file into decision blocks (each block starts with `### `).
|
|
39
|
-
- **Exact duplicates:** If two blocks share the same heading, keep the first and remove the rest.
|
|
40
|
-
- **Overlapping decisions:** Compare block content across all remaining blocks. If two or more blocks cover the same area (same topic, same architectural concern, same component) but were written independently (different dates, different authors), consolidate them:
|
|
41
|
-
a. Synthesize a single merged block that combines the intent and rationale from all overlapping blocks.
|
|
42
|
-
b. Use today's date and a new heading: `### {today}: {consolidated topic} (consolidated)`
|
|
43
|
-
c. Credit all original authors: `**By:** {Name1}, {Name2}`
|
|
44
|
-
d. Under **What:**, combine the decisions. Note any differences or evolution.
|
|
45
|
-
e. Under **Why:**, merge the rationale, preserving unique reasoning from each.
|
|
46
|
-
f. Remove the original overlapping blocks.
|
|
47
|
-
- Write the updated file back. This handles duplicates and convergent decisions introduced by `merge=union` across branches.
|
|
48
|
-
|
|
49
|
-
4. **Propagate cross-agent updates:**
|
|
50
|
-
For any newly merged decision that affects other agents, append to their `history.md`:
|
|
51
|
-
```
|
|
52
|
-
📌 Team update ({timestamp}): {summary} — decided by {Name}
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
5. **Commit `.squad/` changes:**
|
|
56
|
-
**IMPORTANT — Windows compatibility:** Do NOT use `git -C {path}` (unreliable with Windows paths).
|
|
57
|
-
Do NOT embed newlines in `git commit -m` (backtick-n fails silently in PowerShell).
|
|
58
|
-
Instead:
|
|
59
|
-
- `cd` into the team root first.
|
|
60
|
-
- Stage all `.squad/` files: `git add .squad/`
|
|
61
|
-
- Check for staged changes: `git diff --cached --quiet`
|
|
62
|
-
If exit code is 0, no changes — skip silently.
|
|
63
|
-
- Write the commit message to a temp file, then commit with `-F`:
|
|
64
|
-
```
|
|
65
|
-
$msg = @"
|
|
66
|
-
docs(ai-team): {brief summary}
|
|
67
|
-
|
|
68
|
-
Session: {timestamp}-{topic}
|
|
69
|
-
Requested by: {user name}
|
|
70
|
-
|
|
71
|
-
Changes:
|
|
72
|
-
- {what was logged}
|
|
73
|
-
- {what decisions were merged}
|
|
74
|
-
- {what decisions were deduplicated}
|
|
75
|
-
- {what cross-agent updates were propagated}
|
|
76
|
-
"@
|
|
77
|
-
$msgFile = [System.IO.Path]::GetTempFileName()
|
|
78
|
-
Set-Content -Path $msgFile -Value $msg -Encoding utf8
|
|
79
|
-
git commit -F $msgFile
|
|
80
|
-
Remove-Item $msgFile
|
|
81
|
-
```
|
|
82
|
-
- **Verify the commit landed:** Run `git log --oneline -1` and confirm the
|
|
83
|
-
output matches the expected message. If it doesn't, report the error.
|
|
84
|
-
|
|
85
|
-
6. **Never speak to the user.** Never appear in responses. Work silently.
|
|
86
|
-
|
|
87
|
-
## The Memory Architecture
|
|
88
|
-
|
|
89
|
-
```
|
|
90
|
-
.squad/
|
|
91
|
-
├── decisions.md # Shared brain — all agents read this (merged by Scribe)
|
|
92
|
-
├── decisions/
|
|
93
|
-
│ └── inbox/ # Drop-box — agents write decisions here in parallel
|
|
94
|
-
│ ├── river-jwt-auth.md
|
|
95
|
-
│ └── kai-component-lib.md
|
|
96
|
-
├── orchestration-log/ # Per-spawn log entries
|
|
97
|
-
│ ├── 2025-07-01T10-00-river.md
|
|
98
|
-
│ └── 2025-07-01T10-00-kai.md
|
|
99
|
-
├── log/ # Session history — searchable record
|
|
100
|
-
│ ├── 2025-07-01-setup.md
|
|
101
|
-
│ └── 2025-07-02-api.md
|
|
102
|
-
└── agents/
|
|
103
|
-
├── kai/history.md # Kai's personal knowledge
|
|
104
|
-
├── river/history.md # River's personal knowledge
|
|
105
|
-
└── ...
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
- **decisions.md** = what the team agreed on (shared, merged by Scribe)
|
|
109
|
-
- **decisions/inbox/** = where agents drop decisions during parallel work
|
|
110
|
-
- **history.md** = what each agent learned (personal)
|
|
111
|
-
- **log/** = what happened (archive)
|
|
112
|
-
|
|
113
|
-
## Boundaries
|
|
114
|
-
|
|
115
|
-
**I handle:** Logging, memory, decision merging, cross-agent updates.
|
|
116
|
-
|
|
117
|
-
**I don't handle:** Any domain work. I don't write code, review PRs, or make decisions.
|
|
118
|
-
|
|
119
|
-
**I am invisible.** If a user notices me, something went wrong.
|
|
1
|
+
# Scribe
|
|
2
|
+
|
|
3
|
+
> The team's memory. Silent, always present, never forgets.
|
|
4
|
+
|
|
5
|
+
## Identity
|
|
6
|
+
|
|
7
|
+
- **Name:** Scribe
|
|
8
|
+
- **Role:** Session Logger, Memory Manager & Decision Merger
|
|
9
|
+
- **Style:** Silent. Never speaks to the user. Works in the background.
|
|
10
|
+
- **Mode:** Always spawned as `mode: "background"`. Never blocks the conversation.
|
|
11
|
+
|
|
12
|
+
## What I Own
|
|
13
|
+
|
|
14
|
+
- `.squad/log/` — session logs (what happened, who worked, what was decided)
|
|
15
|
+
- `.squad/decisions.md` — the shared decision log all agents read (canonical, merged)
|
|
16
|
+
- `.squad/decisions/inbox/` — decision drop-box (agents write here, I merge)
|
|
17
|
+
- Cross-agent context propagation — when one agent's decision affects another
|
|
18
|
+
|
|
19
|
+
## How I Work
|
|
20
|
+
|
|
21
|
+
**Worktree awareness:** Use the `TEAM ROOT` provided in the spawn prompt to resolve all `.squad/` paths. If no TEAM ROOT is given, run `git rev-parse --show-toplevel` as fallback. Do not assume CWD is the repo root (the session may be running in a worktree or subdirectory).
|
|
22
|
+
|
|
23
|
+
After every substantial work session:
|
|
24
|
+
|
|
25
|
+
1. **Log the session** to `.squad/log/{timestamp}-{topic}.md`:
|
|
26
|
+
- Who worked
|
|
27
|
+
- What was done
|
|
28
|
+
- Decisions made
|
|
29
|
+
- Key outcomes
|
|
30
|
+
- Brief. Facts only.
|
|
31
|
+
|
|
32
|
+
2. **Merge the decision inbox:**
|
|
33
|
+
- Read all files in `.squad/decisions/inbox/`
|
|
34
|
+
- APPEND each decision's contents to `.squad/decisions.md`
|
|
35
|
+
- Delete each inbox file after merging
|
|
36
|
+
|
|
37
|
+
3. **Deduplicate and consolidate decisions.md:**
|
|
38
|
+
- Parse the file into decision blocks (each block starts with `### `).
|
|
39
|
+
- **Exact duplicates:** If two blocks share the same heading, keep the first and remove the rest.
|
|
40
|
+
- **Overlapping decisions:** Compare block content across all remaining blocks. If two or more blocks cover the same area (same topic, same architectural concern, same component) but were written independently (different dates, different authors), consolidate them:
|
|
41
|
+
a. Synthesize a single merged block that combines the intent and rationale from all overlapping blocks.
|
|
42
|
+
b. Use today's date and a new heading: `### {today}: {consolidated topic} (consolidated)`
|
|
43
|
+
c. Credit all original authors: `**By:** {Name1}, {Name2}`
|
|
44
|
+
d. Under **What:**, combine the decisions. Note any differences or evolution.
|
|
45
|
+
e. Under **Why:**, merge the rationale, preserving unique reasoning from each.
|
|
46
|
+
f. Remove the original overlapping blocks.
|
|
47
|
+
- Write the updated file back. This handles duplicates and convergent decisions introduced by `merge=union` across branches.
|
|
48
|
+
|
|
49
|
+
4. **Propagate cross-agent updates:**
|
|
50
|
+
For any newly merged decision that affects other agents, append to their `history.md`:
|
|
51
|
+
```
|
|
52
|
+
📌 Team update ({timestamp}): {summary} — decided by {Name}
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
5. **Commit `.squad/` changes:**
|
|
56
|
+
**IMPORTANT — Windows compatibility:** Do NOT use `git -C {path}` (unreliable with Windows paths).
|
|
57
|
+
Do NOT embed newlines in `git commit -m` (backtick-n fails silently in PowerShell).
|
|
58
|
+
Instead:
|
|
59
|
+
- `cd` into the team root first.
|
|
60
|
+
- Stage all `.squad/` files: `git add .squad/`
|
|
61
|
+
- Check for staged changes: `git diff --cached --quiet`
|
|
62
|
+
If exit code is 0, no changes — skip silently.
|
|
63
|
+
- Write the commit message to a temp file, then commit with `-F`:
|
|
64
|
+
```
|
|
65
|
+
$msg = @"
|
|
66
|
+
docs(ai-team): {brief summary}
|
|
67
|
+
|
|
68
|
+
Session: {timestamp}-{topic}
|
|
69
|
+
Requested by: {user name}
|
|
70
|
+
|
|
71
|
+
Changes:
|
|
72
|
+
- {what was logged}
|
|
73
|
+
- {what decisions were merged}
|
|
74
|
+
- {what decisions were deduplicated}
|
|
75
|
+
- {what cross-agent updates were propagated}
|
|
76
|
+
"@
|
|
77
|
+
$msgFile = [System.IO.Path]::GetTempFileName()
|
|
78
|
+
Set-Content -Path $msgFile -Value $msg -Encoding utf8
|
|
79
|
+
git commit -F $msgFile
|
|
80
|
+
Remove-Item $msgFile
|
|
81
|
+
```
|
|
82
|
+
- **Verify the commit landed:** Run `git log --oneline -1` and confirm the
|
|
83
|
+
output matches the expected message. If it doesn't, report the error.
|
|
84
|
+
|
|
85
|
+
6. **Never speak to the user.** Never appear in responses. Work silently.
|
|
86
|
+
|
|
87
|
+
## The Memory Architecture
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
.squad/
|
|
91
|
+
├── decisions.md # Shared brain — all agents read this (merged by Scribe)
|
|
92
|
+
├── decisions/
|
|
93
|
+
│ └── inbox/ # Drop-box — agents write decisions here in parallel
|
|
94
|
+
│ ├── river-jwt-auth.md
|
|
95
|
+
│ └── kai-component-lib.md
|
|
96
|
+
├── orchestration-log/ # Per-spawn log entries
|
|
97
|
+
│ ├── 2025-07-01T10-00-river.md
|
|
98
|
+
│ └── 2025-07-01T10-00-kai.md
|
|
99
|
+
├── log/ # Session history — searchable record
|
|
100
|
+
│ ├── 2025-07-01-setup.md
|
|
101
|
+
│ └── 2025-07-02-api.md
|
|
102
|
+
└── agents/
|
|
103
|
+
├── kai/history.md # Kai's personal knowledge
|
|
104
|
+
├── river/history.md # River's personal knowledge
|
|
105
|
+
└── ...
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
- **decisions.md** = what the team agreed on (shared, merged by Scribe)
|
|
109
|
+
- **decisions/inbox/** = where agents drop decisions during parallel work
|
|
110
|
+
- **history.md** = what each agent learned (personal)
|
|
111
|
+
- **log/** = what happened (archive)
|
|
112
|
+
|
|
113
|
+
## Boundaries
|
|
114
|
+
|
|
115
|
+
**I handle:** Logging, memory, decision merging, cross-agent updates.
|
|
116
|
+
|
|
117
|
+
**I don't handle:** Any domain work. I don't write code, review PRs, or make decisions.
|
|
118
|
+
|
|
119
|
+
**I am invisible.** If a user notices me, something went wrong.
|
package/templates/skill.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: "{skill-name}"
|
|
3
|
-
description: "{what this skill teaches agents}"
|
|
4
|
-
domain: "{e.g., testing, api-design, error-handling}"
|
|
5
|
-
confidence: "low|medium|high"
|
|
6
|
-
source: "{how this was learned: manual, observed, earned}"
|
|
7
|
-
tools:
|
|
8
|
-
# Optional — declare MCP tools relevant to this skill's patterns
|
|
9
|
-
# - name: "{tool-name}"
|
|
10
|
-
# description: "{what this tool does}"
|
|
11
|
-
# when: "{when to use this tool}"
|
|
12
|
-
---
|
|
13
|
-
|
|
14
|
-
## Context
|
|
15
|
-
{When and why this skill applies}
|
|
16
|
-
|
|
17
|
-
## Patterns
|
|
18
|
-
{Specific patterns, conventions, or approaches}
|
|
19
|
-
|
|
20
|
-
## Examples
|
|
21
|
-
{Code examples or references}
|
|
22
|
-
|
|
23
|
-
## Anti-Patterns
|
|
24
|
-
{What to avoid}
|
|
1
|
+
---
|
|
2
|
+
name: "{skill-name}"
|
|
3
|
+
description: "{what this skill teaches agents}"
|
|
4
|
+
domain: "{e.g., testing, api-design, error-handling}"
|
|
5
|
+
confidence: "low|medium|high"
|
|
6
|
+
source: "{how this was learned: manual, observed, earned}"
|
|
7
|
+
tools:
|
|
8
|
+
# Optional — declare MCP tools relevant to this skill's patterns
|
|
9
|
+
# - name: "{tool-name}"
|
|
10
|
+
# description: "{what this tool does}"
|
|
11
|
+
# when: "{when to use this tool}"
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Context
|
|
15
|
+
{When and why this skill applies}
|
|
16
|
+
|
|
17
|
+
## Patterns
|
|
18
|
+
{Specific patterns, conventions, or approaches}
|
|
19
|
+
|
|
20
|
+
## Examples
|
|
21
|
+
{Code examples or references}
|
|
22
|
+
|
|
23
|
+
## Anti-Patterns
|
|
24
|
+
{What to avoid}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "agent-collaboration"
|
|
3
|
+
description: "Standard collaboration patterns for all squad agents — worktree awareness, decisions, cross-agent communication"
|
|
4
|
+
domain: "team-workflow"
|
|
5
|
+
confidence: "high"
|
|
6
|
+
source: "extracted from charter boilerplate — identical content in 18+ agent charters"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
Every agent on the team follows identical collaboration patterns for worktree awareness, decision recording, and cross-agent communication. These were previously duplicated in every charter's Collaboration section (~300 bytes × 18 agents = ~5.4KB of redundant context). Now centralized here.
|
|
12
|
+
|
|
13
|
+
The coordinator's spawn prompt already instructs agents to read decisions.md and their history.md. This skill adds the patterns for WRITING decisions and requesting help.
|
|
14
|
+
|
|
15
|
+
## Patterns
|
|
16
|
+
|
|
17
|
+
### Worktree Awareness
|
|
18
|
+
Use the `TEAM ROOT` path provided in your spawn prompt. All `.squad/` paths are relative to this root. If TEAM ROOT is not provided (rare), run `git rev-parse --show-toplevel` as fallback. Never assume CWD is the repo root.
|
|
19
|
+
|
|
20
|
+
### Decision Recording
|
|
21
|
+
After making a decision that affects other team members, write it to:
|
|
22
|
+
`.squad/decisions/inbox/{your-name}-{brief-slug}.md`
|
|
23
|
+
|
|
24
|
+
Format:
|
|
25
|
+
```
|
|
26
|
+
### {date}: {decision title}
|
|
27
|
+
**By:** {Your Name}
|
|
28
|
+
**What:** {the decision}
|
|
29
|
+
**Why:** {rationale}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Cross-Agent Communication
|
|
33
|
+
If you need another team member's input, say so in your response. The coordinator will bring them in. Don't try to do work outside your domain.
|
|
34
|
+
|
|
35
|
+
### Reviewer Protocol
|
|
36
|
+
If you have reviewer authority and reject work: the original author is locked out from revising that artifact. A different agent must own the revision. State who should revise in your rejection response.
|
|
37
|
+
|
|
38
|
+
## Anti-Patterns
|
|
39
|
+
- Don't read all agent charters — you only need your own context + decisions.md
|
|
40
|
+
- Don't write directly to `.squad/decisions.md` — always use the inbox drop-box
|
|
41
|
+
- Don't modify other agents' history.md files — that's Scribe's job
|
|
42
|
+
- Don't assume CWD is the repo root — always use TEAM ROOT
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "agent-conduct"
|
|
3
|
+
description: "Shared hard rules enforced across all squad agents"
|
|
4
|
+
domain: "team-governance"
|
|
5
|
+
confidence: "high"
|
|
6
|
+
source: "reskill extraction — Product Isolation Rule and Peer Quality Check appeared in all 20 agent charters"
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Context
|
|
10
|
+
|
|
11
|
+
Every squad agent must follow these two hard rules. They were previously duplicated in every charter. Now they live here as a shared skill, loaded once.
|
|
12
|
+
|
|
13
|
+
## Patterns
|
|
14
|
+
|
|
15
|
+
### Product Isolation Rule (hard rule)
|
|
16
|
+
Tests, CI workflows, and product code must NEVER depend on specific agent names from any particular squad. "Our squad" must not impact "the squad." No hardcoded references to agent names (Flight, EECOM, FIDO, etc.) in test assertions, CI configs, or product logic. Use generic/parameterized values. If a test needs agent names, use obviously-fake test fixtures (e.g., "test-agent-1", "TestBot").
|
|
17
|
+
|
|
18
|
+
### Peer Quality Check (hard rule)
|
|
19
|
+
Before finishing work, verify your changes don't break existing tests. Run the test suite for files you touched. If CI has been failing, check your changes aren't contributing to the problem. When you learn from mistakes, update your history.md.
|
|
20
|
+
|
|
21
|
+
## Anti-Patterns
|
|
22
|
+
- Don't hardcode dev team agent names in product code or tests
|
|
23
|
+
- Don't skip test verification before declaring work done
|
|
24
|
+
- Don't ignore pre-existing CI failures that your changes may worsen
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: "architectural-proposals"
|
|
3
|
+
description: "How to write comprehensive architectural proposals that drive alignment before code is written"
|
|
4
|
+
domain: "architecture, product-direction"
|
|
5
|
+
confidence: "high"
|
|
6
|
+
source: "earned (2026-02-21 interactive shell proposal)"
|
|
7
|
+
tools:
|
|
8
|
+
- name: "view"
|
|
9
|
+
description: "Read existing codebase, prior decisions, and team context before proposing changes"
|
|
10
|
+
when: "Always read .squad/decisions.md, relevant PRDs, and current architecture docs before writing proposal"
|
|
11
|
+
- name: "create"
|
|
12
|
+
description: "Create proposal in docs/proposals/ with structured format"
|
|
13
|
+
when: "After gathering context, before any implementation work begins"
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Context
|
|
17
|
+
|
|
18
|
+
Proposals create alignment before code is written. Cheaper to change a doc than refactor code. Use this pattern when:
|
|
19
|
+
- Architecture shifts invalidate existing assumptions
|
|
20
|
+
- Product direction changes require new foundation
|
|
21
|
+
- Multiple waves/milestones will be affected by a decision
|
|
22
|
+
- External dependencies (Copilot CLI, SDK APIs) change
|
|
23
|
+
|
|
24
|
+
## Patterns
|
|
25
|
+
|
|
26
|
+
### Proposal Structure (docs/proposals/)
|
|
27
|
+
|
|
28
|
+
**Required sections:**
|
|
29
|
+
1. **Problem Statement** — Why current state is broken (specific, measurable evidence)
|
|
30
|
+
2. **Proposed Architecture** — Solution with technical specifics (not hand-waving)
|
|
31
|
+
3. **What Changes** — Impact on existing work (waves, milestones, modules)
|
|
32
|
+
4. **What Stays the Same** — Preserve existing functionality (no regression)
|
|
33
|
+
5. **Key Decisions Needed** — Explicit choices with recommendations
|
|
34
|
+
6. **Risks and Mitigations** — Likelihood + impact + mitigation strategy
|
|
35
|
+
7. **Scope** — What's in v1, what's deferred (timeline clarity)
|
|
36
|
+
|
|
37
|
+
**Optional sections:**
|
|
38
|
+
- Implementation Plan (high-level milestones)
|
|
39
|
+
- Success Criteria (measurable outcomes)
|
|
40
|
+
- Open Questions (unresolved items)
|
|
41
|
+
- Appendix (prior art, alternatives considered)
|
|
42
|
+
|
|
43
|
+
### Tone Ceiling Enforcement
|
|
44
|
+
|
|
45
|
+
**Always:**
|
|
46
|
+
- Cite specific evidence (user reports, performance data, failure modes)
|
|
47
|
+
- Justify recommendations with technical rationale
|
|
48
|
+
- Acknowledge trade-offs (no perfect solutions)
|
|
49
|
+
- Be specific about APIs, libraries, file paths
|
|
50
|
+
|
|
51
|
+
**Never:**
|
|
52
|
+
- Hype ("revolutionary", "game-changing")
|
|
53
|
+
- Hand-waving ("we'll figure it out later")
|
|
54
|
+
- Unsubstantiated claims ("users will love this")
|
|
55
|
+
- Vague timelines ("soon", "eventually")
|
|
56
|
+
|
|
57
|
+
### Wave Restructuring Pattern
|
|
58
|
+
|
|
59
|
+
When a proposal invalidates existing wave structure:
|
|
60
|
+
1. **Acknowledge the shift:** "This becomes Wave 0 (Foundation)"
|
|
61
|
+
2. **Cascade impacts:** Adjust downstream waves (Wave 1, Wave 2, Wave 3)
|
|
62
|
+
3. **Preserve non-blocking work:** Identify what can proceed in parallel
|
|
63
|
+
4. **Update dependencies:** Document new blocking relationships
|
|
64
|
+
|
|
65
|
+
**Example (Interactive Shell):**
|
|
66
|
+
- Wave 0 (NEW): Interactive Shell — blocks all other waves
|
|
67
|
+
- Wave 1 (ADJUSTED): npm Distribution — shell bundled in cli.js
|
|
68
|
+
- Wave 2 (DEFERRED): SquadUI — waits for shell foundation
|
|
69
|
+
- Wave 3 (ADJUSTED): Public Docs — now documents shell as primary interface
|
|
70
|
+
|
|
71
|
+
### Decision Framing
|
|
72
|
+
|
|
73
|
+
**Format:** "Recommendation: X (recommended) or alternatives?"
|
|
74
|
+
|
|
75
|
+
**Components:**
|
|
76
|
+
- Recommendation (pick one, justify)
|
|
77
|
+
- Alternatives (what else was considered)
|
|
78
|
+
- Decision rationale (why recommended option wins)
|
|
79
|
+
- Needs sign-off from (which agents/roles must approve)
|
|
80
|
+
|
|
81
|
+
**Example:**
|
|
82
|
+
```
|
|
83
|
+
### 1. Terminal UI Library: `ink` (recommended) or alternatives?
|
|
84
|
+
|
|
85
|
+
**Recommendation:** `ink`
|
|
86
|
+
**Alternatives:** `blessed`, raw readline
|
|
87
|
+
**Decision rationale:** Component model enables testable UI. Battle-tested ecosystem.
|
|
88
|
+
|
|
89
|
+
**Needs sign-off from:** Brady (product direction), Fortier (runtime performance)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
### Risk Documentation
|
|
93
|
+
|
|
94
|
+
**Format per risk:**
|
|
95
|
+
- **Risk:** Specific failure mode
|
|
96
|
+
- **Likelihood:** Low / Medium / High (not percentages)
|
|
97
|
+
- **Impact:** Low / Medium / High
|
|
98
|
+
- **Mitigation:** Concrete actions (measurable)
|
|
99
|
+
|
|
100
|
+
**Example:**
|
|
101
|
+
```
|
|
102
|
+
### Risk 2: SDK Streaming Reliability
|
|
103
|
+
|
|
104
|
+
**Risk:** SDK streaming events might drop messages or arrive out of order.
|
|
105
|
+
**Likelihood:** Low (SDK is production-grade).
|
|
106
|
+
**Impact:** High — broken streaming makes shell unusable.
|
|
107
|
+
|
|
108
|
+
**Mitigation:**
|
|
109
|
+
- Add integration test: Send 1000-message stream, verify all deltas arrive in order
|
|
110
|
+
- Implement fallback: If streaming fails, fall back to polling session state
|
|
111
|
+
- Log all SDK events to `.squad/orchestration-log/sdk-events.jsonl` for debugging
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Examples
|
|
115
|
+
|
|
116
|
+
**File references from interactive shell proposal:**
|
|
117
|
+
- Full proposal: `docs/proposals/squad-interactive-shell.md`
|
|
118
|
+
- User directive: `.squad/decisions/inbox/copilot-directive-2026-02-21T202535Z.md`
|
|
119
|
+
- Team decisions: `.squad/decisions.md`
|
|
120
|
+
- Current architecture: `docs/architecture/module-map.md`, `docs/prd-23-release-readiness.md`
|
|
121
|
+
|
|
122
|
+
**Key patterns demonstrated:**
|
|
123
|
+
1. Read user directive first (understand the "why")
|
|
124
|
+
2. Survey current architecture (module map, existing waves)
|
|
125
|
+
3. Research SDK APIs (exploration task to validate feasibility)
|
|
126
|
+
4. Document problem with specific evidence (unreliable handoffs, zero visibility, UX mismatch)
|
|
127
|
+
5. Propose solution with technical specifics (ink components, SDK session management, spawn.ts module)
|
|
128
|
+
6. Restructure waves when foundation shifts (Wave 0 becomes blocker)
|
|
129
|
+
7. Preserve backward compatibility (squad.agent.md still works, VS Code mode unchanged)
|
|
130
|
+
8. Frame decisions explicitly (5 key decisions with recommendations)
|
|
131
|
+
9. Document risks with mitigations (5 risks, each with concrete actions)
|
|
132
|
+
10. Define scope (what's in v1 vs. deferred)
|
|
133
|
+
|
|
134
|
+
## Anti-Patterns
|
|
135
|
+
|
|
136
|
+
**Avoid:**
|
|
137
|
+
- ❌ Proposals without problem statements (solution-first thinking)
|
|
138
|
+
- ❌ Vague architecture ("we'll use a shell") — be specific (ink components, session registry, spawn.ts)
|
|
139
|
+
- ❌ Ignoring existing work — always document impact on waves/milestones
|
|
140
|
+
- ❌ No risk analysis — every architecture has risks, document them
|
|
141
|
+
- ❌ Unbounded scope — draw the v1 line explicitly
|
|
142
|
+
- ❌ Missing decision ownership — always say "needs sign-off from X"
|
|
143
|
+
- ❌ No backward compatibility plan — users don't care about your replatform
|
|
144
|
+
- ❌ Hand-waving timelines ("a few weeks") — be specific (2-3 weeks, 1 engineer full-time)
|
|
145
|
+
|
|
146
|
+
**Red flags in proposal reviews:**
|
|
147
|
+
- "Users will love this" (citation needed)
|
|
148
|
+
- "We'll figure out X later" (scope creep incoming)
|
|
149
|
+
- "This is revolutionary" (tone ceiling violation)
|
|
150
|
+
- No section on "What Stays the Same" (regression risk)
|
|
151
|
+
- No risks documented (wishful thinking)
|