@bradygaster/squad-cli 0.10.0-insider.1 → 0.11.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.
Files changed (80) hide show
  1. package/README.md +1 -1
  2. package/dist/cli/commands/aspire.d.ts +1 -1
  3. package/dist/cli/commands/aspire.js +2 -2
  4. package/dist/cli/commands/aspire.js.map +1 -1
  5. package/dist/cli/commands/build.d.ts.map +1 -1
  6. package/dist/cli/commands/build.js +27 -6
  7. package/dist/cli/commands/build.js.map +1 -1
  8. package/dist/cli/commands/loop.js +1 -1
  9. package/dist/cli/commands/loop.js.map +1 -1
  10. package/dist/cli/commands/migrate-backend.d.ts.map +1 -1
  11. package/dist/cli/commands/migrate-backend.js +23 -0
  12. package/dist/cli/commands/migrate-backend.js.map +1 -1
  13. package/dist/cli/commands/preset.d.ts +1 -0
  14. package/dist/cli/commands/preset.d.ts.map +1 -1
  15. package/dist/cli/commands/preset.js +60 -3
  16. package/dist/cli/commands/preset.js.map +1 -1
  17. package/dist/cli/commands/state-mcp.d.ts.map +1 -1
  18. package/dist/cli/commands/state-mcp.js +44 -16
  19. package/dist/cli/commands/state-mcp.js.map +1 -1
  20. package/dist/cli/commands/watch/agent-spawn.d.ts +21 -1
  21. package/dist/cli/commands/watch/agent-spawn.d.ts.map +1 -1
  22. package/dist/cli/commands/watch/agent-spawn.js +38 -5
  23. package/dist/cli/commands/watch/agent-spawn.js.map +1 -1
  24. package/dist/cli/commands/watch/capabilities/decision-hygiene.d.ts.map +1 -1
  25. package/dist/cli/commands/watch/capabilities/decision-hygiene.js +1 -25
  26. package/dist/cli/commands/watch/capabilities/decision-hygiene.js.map +1 -1
  27. package/dist/cli/commands/watch/capabilities/monitor-email.d.ts.map +1 -1
  28. package/dist/cli/commands/watch/capabilities/monitor-email.js +2 -25
  29. package/dist/cli/commands/watch/capabilities/monitor-email.js.map +1 -1
  30. package/dist/cli/commands/watch/capabilities/monitor-teams.d.ts.map +1 -1
  31. package/dist/cli/commands/watch/capabilities/monitor-teams.js +2 -26
  32. package/dist/cli/commands/watch/capabilities/monitor-teams.js.map +1 -1
  33. package/dist/cli/commands/watch/capabilities/retro.d.ts.map +1 -1
  34. package/dist/cli/commands/watch/capabilities/retro.js +1 -25
  35. package/dist/cli/commands/watch/capabilities/retro.js.map +1 -1
  36. package/dist/cli/commands/watch/config.d.ts.map +1 -1
  37. package/dist/cli/commands/watch/config.js +5 -0
  38. package/dist/cli/commands/watch/config.js.map +1 -1
  39. package/dist/cli/commands/watch/index.d.ts.map +1 -1
  40. package/dist/cli/commands/watch/index.js +3 -1
  41. package/dist/cli/commands/watch/index.js.map +1 -1
  42. package/dist/cli/core/command-help.d.ts.map +1 -1
  43. package/dist/cli/core/command-help.js +25 -12
  44. package/dist/cli/core/command-help.js.map +1 -1
  45. package/dist/cli/core/gh-cli.d.ts +6 -1
  46. package/dist/cli/core/gh-cli.d.ts.map +1 -1
  47. package/dist/cli/core/gh-cli.js +8 -3
  48. package/dist/cli/core/gh-cli.js.map +1 -1
  49. package/dist/cli/core/init.d.ts.map +1 -1
  50. package/dist/cli/core/init.js +24 -1
  51. package/dist/cli/core/init.js.map +1 -1
  52. package/dist/cli/core/templates.d.ts.map +1 -1
  53. package/dist/cli/core/templates.js +18 -0
  54. package/dist/cli/core/templates.js.map +1 -1
  55. package/dist/cli/core/upgrade.d.ts +2 -0
  56. package/dist/cli/core/upgrade.d.ts.map +1 -1
  57. package/dist/cli/core/upgrade.js +48 -2
  58. package/dist/cli/core/upgrade.js.map +1 -1
  59. package/dist/cli/shell/components/InputPrompt.d.ts.map +1 -1
  60. package/dist/cli/shell/components/InputPrompt.js +17 -9
  61. package/dist/cli/shell/components/InputPrompt.js.map +1 -1
  62. package/dist/cli/shell/index.js +1 -1
  63. package/dist/cli/shell/index.js.map +1 -1
  64. package/dist/cli-entry.js +19 -11
  65. package/dist/cli-entry.js.map +1 -1
  66. package/package.json +8 -8
  67. package/templates/casting-reference.md +18 -0
  68. package/templates/skills/cli-wiring/SKILL.md +2 -2
  69. package/templates/skills/coordinator-init-mode/SKILL.md +83 -0
  70. package/templates/skills/coordinator-response-mode/SKILL.md +97 -0
  71. package/templates/skills/coordinator-source-of-truth/SKILL.md +45 -0
  72. package/templates/skills/init-mode/SKILL.md +4 -4
  73. package/templates/skills/personal-squad/SKILL.md +3 -2
  74. package/templates/skills/squad/SKILL.md +2 -2
  75. package/templates/spawn-reference.md +56 -1
  76. package/templates/squad.agent.md.template +81 -170
  77. package/templates/workflows/squad-heartbeat.yml +2 -5
  78. package/templates/workflows/squad-issue-assign.yml +3 -7
  79. package/templates/workflows/squad-triage.yml +3 -11
  80. package/templates/workflows/sync-squad-labels.yml +2 -7
@@ -0,0 +1,83 @@
1
+ ---
2
+ name: "coordinator-init-mode"
3
+ description: "The complete two-phase Init Mode protocol the Squad coordinator runs when no team exists yet in the current repo. Phase 1 = propose the team (no files created, wait for user confirm). Phase 2 = create .squad/ scaffolding, casting state, .gitattributes for merge drivers, and the always-on built-ins (Scribe, Ralph, Rai, Fact Checker). Loaded on demand when the coordinator detects no .squad/team.md exists."
4
+ allowedTools: []
5
+ confidence: high
6
+ domain: squad-internals
7
+ source: "Extracted from squad.agent.md as part of the slimming effort (bradygaster/squad#1308). Behaviour unchanged — coordinator loads this satellite skill when init mode is detected (no .squad/team.md present)."
8
+ ---
9
+
10
+ > **Load this skill when:** you detect that no `.squad/team.md` exists in the resolved team root — that means this is a fresh repo or a repo that has never been squadified, and Init Mode is the right path. The short stub in `squad.agent.md` tells you to load this skill; the full two-phase protocol lives here.
11
+ >
12
+ > **⚠️ Eager-execution exception:** Init Mode is the ONE exception to the eager-execution / parallel-fan-out doctrine. Phase 1 MUST end with a user confirmation before any file is created. Do not bypass.
13
+
14
+ ## Phase 1: Propose the Team
15
+
16
+ No team exists yet. **Propose one — but DO NOT create any files until the user confirms.**
17
+
18
+ 1. **Identify the user.** Run `git config user.name` to learn who you're working with. Use their name in conversation (e.g., *"Hey {user}, what are you building?"*). Store their name (NOT email) in `team.md` under Project Context. **Never read or store `git config user.email`** — email addresses are PII and must not be written to committed files.
19
+ 2. Ask: *"What are you building? (language, stack, what it does)"*
20
+ 3. **Cast the team.** Before proposing names, run the Casting & Persistent Naming algorithm (see the canonical Casting reference at `.squad/templates/casting-reference.md`):
21
+ - Determine team size: pick **4–5 cast (user-domain) agents**, then add the **4 always-on built-ins** (Scribe + Ralph + Rai + Fact Checker — see their dedicated sections in `squad.agent.md`). A typical fresh squad has **8–9 total roster entries**, not 4–5.
22
+ - Determine assignment shape from the user's project description.
23
+ - Derive resonance signals from the session and repo context.
24
+ - Select a universe. Allocate character names from that universe.
25
+ - Scribe is always "Scribe" — exempt from casting.
26
+ - Ralph is always "Ralph" — exempt from casting.
27
+ - Rai is always "Rai" — exempt from casting.
28
+ - Fact Checker is always "Fact Checker" — exempt from casting (same pattern as Scribe / Ralph / Rai).
29
+ 4. Propose the team with their cast names. Example (names will vary per cast):
30
+
31
+ ```
32
+ 🏗️ {CastName1} — Lead Scope, decisions, code review
33
+ ⚛️ {CastName2} — Frontend Dev React, UI, components
34
+ 🔧 {CastName3} — Backend Dev APIs, database, services
35
+ 🧪 {CastName4} — Tester Tests, quality, edge cases
36
+ 📋 Scribe — (silent) Memory, decisions, session logs
37
+ 🔄 Ralph — (monitor) Work queue, backlog, keep-alive
38
+ 🛡️ Rai — (background) RAI awareness, content safety
39
+ 🔍 Fact Checker — (verifier) Verification + Devil's Advocate
40
+ ```
41
+
42
+ 5. Use the `ask_user` tool to confirm the roster. Provide choices so the user sees a selectable menu:
43
+ - **question:** *"Look right?"*
44
+ - **choices:** `["Yes, hire this team", "Add someone", "Change a role"]`
45
+
46
+ **⚠️ STOP. Your response ENDS here. Do NOT proceed to Phase 2. Do NOT create any files or directories. Wait for the user's reply.**
47
+
48
+ ---
49
+
50
+ ## Phase 2: Create the Team
51
+
52
+ **Trigger:** The user replied to Phase 1 with confirmation ("yes", "looks good", or similar affirmative), OR the user's reply to Phase 1 is a task (treat as implicit "yes").
53
+
54
+ > If the user said "add someone" or "change a role," go back to Phase 1 step 3 and re-propose. **Do NOT enter Phase 2 until the user confirms.**
55
+
56
+ 6. Create the `.squad/` directory structure (see `.squad/templates/` for format guides or use the standard structure: `team.md`, `routing.md`, `ceremonies.md`, `decisions.md`, `decisions/inbox/`, `casting/`, `agents/`, `orchestration-log/`, `skills/`, `log/`, `rai/`).
57
+
58
+ **Casting state initialization:** Copy `.squad/templates/casting-policy.json` to `.squad/casting/policy.json` (or create from defaults). Create `registry.json` (entries: persistent_name, universe, created_at, legacy_named: false, status: "active") and `history.json` (first assignment snapshot with unique assignment_id).
59
+
60
+ **Seeding:** Each agent's `history.md` starts with the project description, tech stack, and the user's name so they have day-1 context. Agent folder names are the cast name in lowercase (e.g., `.squad/agents/ripley/`). The Scribe's charter includes maintaining `decisions.md` and cross-agent context sharing. Rai's charter is seeded from the `Rai-charter.md` template, and `.squad/rai/policy.md` is seeded from `rai-policy.md`. Fact Checker's charter is seeded from `fact-checker-charter.md` and `.squad/fact-checker/policy.md` is seeded from `fact-checker-policy.md`.
61
+
62
+ **Team.md structure:** `team.md` MUST contain a section titled exactly `## Members` (not "## Team Roster" or other variations) containing the roster table. This header is hard-coded in GitHub workflows (`squad-heartbeat.yml`, `squad-issue-assign.yml`, `squad-triage.yml`, `sync-squad-labels.yml`) for label automation. If the header is missing or titled differently, label routing breaks.
63
+
64
+ **Merge driver for append-only files:** Create or update `.gitattributes` at the repo root to enable conflict-free merging of `.squad/` state across branches:
65
+
66
+ ```
67
+ .squad/decisions.md merge=union
68
+ .squad/agents/*/history.md merge=union
69
+ .squad/log/** merge=union
70
+ .squad/orchestration-log/** merge=union
71
+ .squad/rai/audit-trail.md merge=union
72
+ ```
73
+
74
+ The `union` merge driver keeps all lines from both sides, which is correct for append-only files. This makes worktree-local strategy work seamlessly when branches merge — decisions, memories, and logs from all branches combine automatically.
75
+
76
+ 7. Say: *"✅ Team hired. Try: '{FirstCastName}, set up the project structure'"*
77
+
78
+ 8. **Post-setup input sources** (optional — ask after team is created, not during casting):
79
+ - **PRD/spec:** *"Do you have a PRD or spec document? (file path, paste it, or skip)"* → If provided, follow PRD Mode flow.
80
+ - **GitHub issues:** *"Is there a GitHub repo with issues I should pull from? (owner/repo, or skip)"* → If provided, follow GitHub Issues Mode flow.
81
+ - **Human members:** *"Are any humans joining the team? (names and roles, or just AI for now)"* → If provided, add per Human Team Members section.
82
+ - **Copilot agent:** *"Want to include @copilot? It can pick up issues autonomously. (yes/no)"* → If yes, follow Copilot Coding Agent Member section and ask about auto-assignment.
83
+ - These are additive. **Don't block** — if the user skips or gives a task instead, proceed immediately.
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: "coordinator-response-mode"
3
+ description: "Selecting WHO handles work is the Routing table; selecting HOW they handle it (Direct, Lightweight, Standard, Full) is Response Mode. This skill contains the complete decision table, exemplar prompts for each mode, the Lightweight spawn template, and the upgrade rules. Squad coordinator loads this on demand once routing has identified the agent — to pick the right ceremony level for the task."
4
+ allowedTools: []
5
+ confidence: high
6
+ domain: squad-internals
7
+ source: "Extracted from squad.agent.md as part of the slimming effort (bradygaster/squad#1308). Behaviour unchanged — coordinator loads this satellite skill after Routing, before spawn."
8
+ ---
9
+
10
+ > **Load this skill when:** you have routed work to an agent and need to pick the response mode (Direct / Lightweight / Standard / Full). The 1-line stub in `squad.agent.md` is for awareness; this skill is the full decision table + templates.
11
+
12
+ ## Response Mode Selection
13
+
14
+ After routing determines WHO handles work, select the response MODE based on task complexity. **Bias toward upgrading** — when uncertain, go one tier higher rather than risk under-serving.
15
+
16
+ | Mode | When | How | Target |
17
+ |------|------|-----|--------|
18
+ | **Direct** | Status checks, factual questions the coordinator already knows, simple answers from context | Coordinator answers directly — NO agent spawn | ~2-3s |
19
+ | **Lightweight** | Single-file edits, small fixes, follow-ups, simple scoped read-only queries | Spawn ONE agent with minimal prompt (see Lightweight Spawn Template below). Use `agent_type: "explore"` for read-only queries | ~8-12s |
20
+ | **Standard** | Normal tasks, single-agent work requiring full context | Spawn one agent with full ceremony — charter inline, history read, decisions read. This is the current default | ~25-35s |
21
+ | **Full** | Multi-agent work, complex tasks touching 3+ concerns, "Team" requests | Parallel fan-out, full ceremony, Scribe included | ~40-60s |
22
+
23
+ ## Direct Mode exemplars
24
+
25
+ Coordinator answers instantly, no spawn:
26
+
27
+ - *"Where are we?"* → Summarize current state from context: branch, recent work, what the team's been doing. A user favorite — make it instant.
28
+ - *"How many tests do we have?"* → Run a quick command, answer directly.
29
+ - *"What branch are we on?"* → `git branch --show-current`, answer directly.
30
+ - *"Who's on the team?"* → Answer from `team.md` already in context.
31
+ - *"What did we decide about X?"* → Answer from `decisions.md` already in context.
32
+
33
+ ## Lightweight Mode exemplars
34
+
35
+ One agent, minimal prompt:
36
+
37
+ - *"Fix the typo in README"* → Spawn one agent, no charter, no history read.
38
+ - *"Add a comment to line 42"* → Small scoped edit, minimal context needed.
39
+ - *"What does this function do?"* → `agent_type: "explore"` (Haiku model, fast).
40
+ - Follow-up edits after a Standard/Full response — context is fresh, skip ceremony.
41
+
42
+ ## Standard Mode exemplars
43
+
44
+ One agent, full ceremony:
45
+
46
+ - *"{AgentName}, add error handling to the export function"*
47
+ - *"{AgentName}, review the prompt structure"*
48
+ - Any task requiring architectural judgment or multi-file awareness.
49
+
50
+ ## Full Mode exemplars
51
+
52
+ Multi-agent, parallel fan-out:
53
+
54
+ - *"Team, build the login page"*
55
+ - *"Add OAuth support"*
56
+ - Any request that touches 3+ agent domains.
57
+
58
+ ## Mode upgrade rules
59
+
60
+ - If a Lightweight task turns out to need history or decisions context → treat as Standard.
61
+ - If uncertain between Direct and Lightweight → choose Lightweight.
62
+ - If uncertain between Lightweight and Standard → choose Standard.
63
+ - **Never downgrade mid-task.** If you started Standard, finish Standard.
64
+
65
+ ## Lightweight Spawn Template
66
+
67
+ Skip charter, history, and decisions reads — just the task:
68
+
69
+ ```
70
+ agent_type: "general-purpose"
71
+ model: "{resolved_model}"
72
+ mode: "background"
73
+ name: "{name}"
74
+ description: "{emoji} {Name}: {brief task summary}"
75
+ prompt: |
76
+ You are {Name}, the {Role} on this project.
77
+ TEAM ROOT: {team_root}
78
+ CURRENT_DATETIME: <resolved CURRENT_DATETIME literal>
79
+ WORKTREE_PATH: {worktree_path}
80
+ WORKTREE_MODE: {true|false}
81
+ **Requested by:** {current user name}
82
+
83
+ {% if WORKTREE_MODE %}
84
+ **WORKTREE:** Working in `{WORKTREE_PATH}`. All operations relative to this path. Do NOT switch branches.
85
+ {% endif %}
86
+
87
+ TASK: {specific task description}
88
+ TARGET FILE(S): {exact file path(s)}
89
+
90
+ Do the work. Keep it focused.
91
+ If you made a meaningful decision, persist it with `memory.write` (class: `decision`) when available, or fall back to `squad_decide` / `squad_state_write` to `decisions/inbox/{name}-{brief-slug}.md`. Do not run git notes, switch branches, or write mutable `.squad/` state by hand.
92
+
93
+ ⚠️ OUTPUT: Report outcomes in human terms. Never expose tool internals or SQL.
94
+ ⚠️ RESPONSE ORDER: After ALL tool calls, write a plain text summary as FINAL output.
95
+ ```
96
+
97
+ For **read-only queries**, use the explore agent: `agent_type: "explore"` with `"You are {Name}, the {Role}. CURRENT_DATETIME: <resolved CURRENT_DATETIME literal> — {question} TEAM ROOT: {team_root}"`
@@ -0,0 +1,45 @@
1
+ ---
2
+ name: "coordinator-source-of-truth"
3
+ description: "The complete file-by-file source-of-truth hierarchy for Squad: which files are authoritative, which are derived/append-only, who may write each one, who may read each one, and the precedence rules when they conflict. Squad coordinator loads this on demand when it needs to resolve a write conflict, decide where a piece of state belongs, or answer a 'who owns this file' question."
4
+ allowedTools: []
5
+ confidence: high
6
+ domain: squad-internals
7
+ source: "Extracted from squad.agent.md as part of the slimming effort (bradygaster/squad#1308). Behaviour unchanged — coordinator loads this satellite skill when a routing decision needs the full hierarchy."
8
+ ---
9
+
10
+ > **Load this skill when:** the coordinator (or any agent) needs to resolve a "where does this state belong?" or "who is allowed to write this file?" question — e.g., when about to write `.squad/decisions.md`, when reviewing whether an agent broke the append-only rule, when answering a user question about Squad's file layout, or when adjudicating a conflict between two files. The short summary in `squad.agent.md` is for routing; this skill is the full reference.
11
+
12
+ ## State backend note
13
+
14
+ Files below marked as **"Derived / append-only"** are **mutable state** — agents access them with runtime state tools (`squad_state_read`, `squad_state_write`, `squad_state_append`, `squad_state_delete`, `squad_state_list`). The runtime decides whether the configured backend stores them on disk, git-native state, or an external provider. Files marked as **"Authoritative"** are **static config** and always live on disk regardless of backend.
15
+
16
+ ## File hierarchy
17
+
18
+ | File | Status | Who May Write | Who May Read |
19
+ |------|--------|---------------|--------------|
20
+ | `.github/agents/squad.agent.md` | **Authoritative governance.** All roles, handoffs, gates, and enforcement rules. | Repo maintainer (human) | Squad (Coordinator) |
21
+ | `.squad/decisions.md` | **Authoritative decision ledger.** Single canonical location for scope, architecture, and process decisions. | Squad (Coordinator) — append only | All agents |
22
+ | `.squad/team.md` | **Authoritative roster.** Current team composition. | Squad (Coordinator) | All agents |
23
+ | `.squad/routing.md` | **Authoritative routing.** Work assignment rules. | Squad (Coordinator) | Squad (Coordinator) |
24
+ | `.squad/ceremonies.md` | **Authoritative ceremony config.** Definitions, triggers, and participants for team ceremonies. | Squad (Coordinator) | Squad (Coordinator), Facilitator agent (read-only at ceremony time) |
25
+ | `.squad/casting/policy.json` | **Authoritative casting config.** Universe allowlist and capacity. | Squad (Coordinator) | Squad (Coordinator) |
26
+ | `.squad/casting/registry.json` | **Authoritative name registry.** Persistent agent-to-name mappings. | Squad (Coordinator) | Squad (Coordinator) |
27
+ | `.squad/casting/history.json` | **Derived / append-only.** Universe usage history and assignment snapshots. | Squad (Coordinator) — append only | Squad (Coordinator) |
28
+ | `.squad/agents/{name}/charter.md` | **Authoritative agent identity.** Per-agent role and boundaries. | Squad (Coordinator) at creation; agent may not self-modify | Squad (Coordinator) reads to inline at spawn; owning agent receives via prompt |
29
+ | `.squad/agents/{name}/history.md` | **Derived / append-only.** Personal learnings. Never authoritative for enforcement. | Owning agent (append only), Scribe (cross-agent updates, summarization) | Owning agent only |
30
+ | `.squad/agents/{name}/history-archive.md` | **Derived / append-only.** Archived history entries. Preserved for reference. | Scribe | Owning agent (read-only) |
31
+ | `.squad/orchestration-log/` | **Derived / append-only.** Agent routing evidence. Never edited after write. | Scribe | All agents (read-only) |
32
+ | `.squad/log/` | **Derived / append-only.** Session logs. Diagnostic archive. Never edited after write. | Scribe | All agents (read-only) |
33
+ | `.squad/templates/` | **Reference.** Format guides for runtime files. Not authoritative for enforcement. | Squad (Coordinator) at init | Squad (Coordinator) |
34
+ | `.squad/rai/policy.md` | **Authoritative RAI policy.** Check categories, terminology standards, and opt-out rules. | Squad (Coordinator) at init; Rai may propose updates via decisions inbox | Rai, All agents (read-only) |
35
+ | `.squad/rai/audit-trail.md` | **Derived / append-only.** RAI review evidence log. Redacted — never contains raw secrets or harmful content. | Rai (append only) | Rai, Squad (Coordinator) |
36
+ | `.squad/fact-checker/policy.md` | **Authoritative verification + Devil's Advocate policy.** Confidence rating taxonomy, hard anti-fabrication rules, mode triggers, opt-out model. | Squad (Coordinator) at init; Fact Checker may propose updates via decisions inbox | Fact Checker, All agents (read-only) |
37
+ | `.squad/fact-checker/audit-trail.md` | **Derived / append-only.** Verification verdicts + DA brief evidence log. Succinct — verdict + citation, never raw source material. | Fact Checker (append only) | Fact Checker, Squad (Coordinator) |
38
+ | `.squad/plugins/marketplaces.json` | **Authoritative plugin config.** Registered marketplace sources. | Squad CLI (`squad plugin marketplace`) | Squad (Coordinator) |
39
+
40
+ ## Rules
41
+
42
+ 1. **If `squad.agent.md` and any other file conflict, `squad.agent.md` wins.** It is the only file with hard governance authority.
43
+ 2. **Append-only files must never be retroactively edited** to change meaning. They are diagnostic and audit-trail material. Corrections go in a new entry that references the prior one.
44
+ 3. **Agents may only write to files listed in their "Who May Write" column above.** Violations are a contract bug; runtime state-backends will refuse the write on non-local backends.
45
+ 4. **Non-coordinator agents may propose decisions** in their responses, but only Squad (Coordinator) records accepted decisions in `.squad/decisions.md`.
@@ -42,7 +42,7 @@ No team exists yet. Propose one — but **DO NOT create any files until the user
42
42
 
43
43
  5. Use the `ask_user` tool to confirm the roster. Provide choices so the user sees a selectable menu:
44
44
  - **question:** *"Look right?"*
45
- - **choices:** `["Yes, hire this team", "Add someone", "Change a role"]`
45
+ - **choices:** `["Yes, cast this team", "Add someone", "Change a role"]`
46
46
 
47
47
  **⚠️ STOP. Your response ENDS here. Do NOT proceed to Phase 2. Do NOT create any files or directories. Wait for the user's reply.**
48
48
 
@@ -69,7 +69,7 @@ No team exists yet. Propose one — but **DO NOT create any files until the user
69
69
  ```
70
70
  The `union` merge driver keeps all lines from both sides, which is correct for append-only files. This makes worktree-local strategy work seamlessly when branches merge — decisions, memories, and logs from all branches combine automatically.
71
71
 
72
- 7. Say: *"✅ Team hired. Try: '{FirstCastName}, set up the project structure'"*
72
+ 7. Say: *"✅ Team cast. Try: '{FirstCastName}, set up the project structure'"*
73
73
 
74
74
  8. **Post-setup input sources** (optional — ask after team is created, not during casting):
75
75
  - PRD/spec: *"Do you have a PRD or spec document? (file path, paste it, or skip)"* → If provided, follow PRD Mode flow
@@ -87,9 +87,9 @@ The `union` merge driver keeps all lines from both sides, which is correct for a
87
87
  4. User: *"TypeScript CLI tool with GitHub API integration"*
88
88
  5. Coordinator runs casting algorithm → selects "The Usual Suspects" universe
89
89
  6. Proposes: Keaton (Lead), Verbal (Prompt), Fenster (Backend), Hockney (Tester), Scribe, Ralph
90
- 7. Uses `ask_user` with choices → user selects "Yes, hire this team"
90
+ 7. Uses `ask_user` with choices → user selects "Yes, cast this team"
91
91
  8. Coordinator creates `.squad/` structure, initializes casting state, seeds agents
92
- 9. Says: *"✅ Team hired. Try: 'Keaton, set up the project structure'"*
92
+ 9. Says: *"✅ Team cast. Try: 'Keaton, set up the project structure'"*
93
93
 
94
94
  ## Anti-Patterns
95
95
 
@@ -15,8 +15,9 @@ A personal squad is a user-level collection of AI agents that travel with you ac
15
15
  ## Directory Structure
16
16
 
17
17
  ```
18
- ~/.config/squad/personal-squad/ # Linux/macOS
19
- %APPDATA%/squad/personal-squad/ # Windows
18
+ ~/Library/Application Support/squad/personal-squad/ # macOS
19
+ ~/.config/squad/personal-squad/ # Linux
20
+ %APPDATA%/squad/personal-squad/ # Windows
20
21
  ├── agents/
21
22
  │ ├── {agent-name}/
22
23
  │ │ ├── charter.md
@@ -214,9 +214,9 @@ Proceed? (yes / no)
214
214
  ### List Installed Skills
215
215
 
216
216
  - **intent:** list skills, show skills, what skills are installed, skill catalog
217
- - **summary:** List all skills installed in .squad/skills/ and .copilot/skills/
217
+ - **summary:** List all skills installed in .squad/skills/ and .github/skills/
218
218
  - **action:** coordinator
219
- - **command:** Direct Mode — list .squad/skills/ and .copilot/skills/ directories
219
+ - **command:** Direct Mode — list .squad/skills/ and .github/skills/ directories
220
220
  - **args:** (none)
221
221
  - **confirm:** false
222
222
 
@@ -2,7 +2,62 @@
2
2
 
3
3
  ### How to Spawn an Agent
4
4
 
5
- **You MUST dispatch every agent spawn** via the platform's tool (`task` on CLI, `runSubagent` on VS Code):
5
+ **You MUST dispatch every agent spawn** via the platform's tool:
6
+ - **CLI:** `task` tool
7
+ - **VS Code:** `runSubagent` tool
8
+ - **Copilot App:** `create_session` tool (when available — see Sub-Sessions below)
9
+
10
+ **Platform detection (run once at session start):**
11
+ - `create_session` tool exists → **App mode** → sub-sessions for commit-producing work
12
+ - `runSubagent` tool exists → **VS Code mode** → subagents
13
+ - `task` tool exists → **CLI mode** → task tool
14
+ - None available → **work inline** (last resort fallback)
15
+
16
+ ---
17
+
18
+ ### Sub-Sessions (Copilot App Mode)
19
+
20
+ When `create_session` is available, spawn commit-producing agents as **sub-sessions** instead of tasks. Each agent appears as a clickable session in the left nav with real-time visibility.
21
+
22
+ **When to use sub-sessions vs task:**
23
+ - **Sub-session** (`create_session`): Agent produces commits, needs worktree isolation, or benefits from persistent session visibility
24
+ - **Task** (`task` tool): Pure analysis, coordination, read-only research, or quick one-shot work
25
+
26
+ **Sub-session parameters:**
27
+ - **`name`**: `"{Name} {verb}ing {noun}"` — 40-char max, sentence case (e.g., "EECOM refactoring auth", "Flight reviewing arch")
28
+ - **`coordinate_with_creator`**: `true` (always — enables cross-session messaging)
29
+ - **`notify_on_idle`**: `"once"` (coordinator gets notified when agent finishes)
30
+ - **`kickoff.prompt`**: The full agent prompt (same as task prompt below)
31
+ - **`kickoff.mode`**: `"autopilot"` (agents work autonomously)
32
+ - **`kickoff.model`**: `"{resolved_model}"`
33
+
34
+ **Constraints:**
35
+ - **Max depth:** 1 — no sub-sub-sessions. If an agent needs to delegate, it uses `task` tool.
36
+ - **Concurrency cap:** Maximum 4-5 simultaneous sub-sessions. Queue additional spawns.
37
+ - **Fallback:** If `create_session` fails, degrade gracefully to `task` tool for that agent.
38
+
39
+ **Sub-session template:**
40
+ ```
41
+ create_session({
42
+ name: "{Name} {verb}ing {noun}",
43
+ coordinate_with_creator: true,
44
+ notify_on_idle: "once",
45
+ kickoff: {
46
+ prompt: "{full agent prompt — see template below}",
47
+ mode: "autopilot",
48
+ model: "{resolved_model}",
49
+ reasoning_effort: "{resolved_effort}"
50
+ }
51
+ })
52
+ ```
53
+
54
+ **Result collection:** When `notify_on_idle` fires, the coordinator receives the session result via cross-session notification. No polling required.
55
+
56
+ ---
57
+
58
+ ### Task Tool Spawn (CLI Mode)
59
+
60
+ Standard spawn via `task` tool — used in CLI, or as fallback when `create_session` is unavailable:
6
61
 
7
62
  - **`agent_type`**: `"general-purpose"` (always — this gives agents full tool access)
8
63
  - **`mode`**: `"background"` (default) or `"sync"` — use `"background"` for all parallelizable work; use `"sync"` only when the result is needed before the next step can proceed