@bradygaster/squad-sdk 0.9.6-insider.2 → 0.10.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/adapter/client.d.ts.map +1 -1
- package/dist/adapter/client.js +16 -3
- package/dist/adapter/client.js.map +1 -1
- package/dist/adapter/types.d.ts +6 -1
- package/dist/adapter/types.d.ts.map +1 -1
- package/dist/agents/charter-compiler.d.ts +2 -0
- package/dist/agents/charter-compiler.d.ts.map +1 -1
- package/dist/agents/charter-compiler.js +6 -1
- package/dist/agents/charter-compiler.js.map +1 -1
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +24 -25
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/lifecycle.d.ts.map +1 -1
- package/dist/agents/lifecycle.js +11 -2
- package/dist/agents/lifecycle.js.map +1 -1
- package/dist/agents/onboarding.d.ts.map +1 -1
- package/dist/agents/onboarding.js +24 -0
- package/dist/agents/onboarding.js.map +1 -1
- package/dist/config/agent-source.d.ts.map +1 -1
- package/dist/config/agent-source.js +60 -33
- package/dist/config/agent-source.js.map +1 -1
- package/dist/config/feature-audit.js +1 -1
- package/dist/config/feature-audit.js.map +1 -1
- package/dist/config/init.d.ts +4 -0
- package/dist/config/init.d.ts.map +1 -1
- package/dist/config/init.js +177 -44
- package/dist/config/init.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/marketplace/index.d.ts +7 -0
- package/dist/marketplace/index.d.ts.map +1 -1
- package/dist/marketplace/index.js +4 -0
- package/dist/marketplace/index.js.map +1 -1
- package/dist/marketplace/plugin-manifest.d.ts +113 -0
- package/dist/marketplace/plugin-manifest.d.ts.map +1 -0
- package/dist/marketplace/plugin-manifest.js +820 -0
- package/dist/marketplace/plugin-manifest.js.map +1 -0
- package/dist/marketplace/plugin-runtime.d.ts +37 -0
- package/dist/marketplace/plugin-runtime.d.ts.map +1 -0
- package/dist/marketplace/plugin-runtime.js +217 -0
- package/dist/marketplace/plugin-runtime.js.map +1 -0
- package/dist/marketplace/plugin-state.d.ts +89 -0
- package/dist/marketplace/plugin-state.d.ts.map +1 -0
- package/dist/marketplace/plugin-state.js +278 -0
- package/dist/marketplace/plugin-state.js.map +1 -0
- package/dist/memory/index.d.ts +262 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +1122 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/multi-squad.d.ts.map +1 -1
- package/dist/multi-squad.js +5 -2
- package/dist/multi-squad.js.map +1 -1
- package/dist/platform/azure-devops.d.ts.map +1 -1
- package/dist/platform/azure-devops.js +17 -3
- package/dist/platform/azure-devops.js.map +1 -1
- package/dist/platform/detect.d.ts.map +1 -1
- package/dist/platform/detect.js +12 -5
- package/dist/platform/detect.js.map +1 -1
- package/dist/platform/index.d.ts.map +1 -1
- package/dist/platform/index.js +26 -0
- package/dist/platform/index.js.map +1 -1
- package/dist/ralph/triage.js +1 -1
- package/dist/ralph/triage.js.map +1 -1
- package/dist/resolution.d.ts +18 -0
- package/dist/resolution.d.ts.map +1 -1
- package/dist/resolution.js +64 -2
- package/dist/resolution.js.map +1 -1
- package/dist/runtime/memory-value-benchmark.d.ts +61 -0
- package/dist/runtime/memory-value-benchmark.d.ts.map +1 -0
- package/dist/runtime/memory-value-benchmark.js +245 -0
- package/dist/runtime/memory-value-benchmark.js.map +1 -0
- package/dist/runtime/scheduler.d.ts +8 -0
- package/dist/runtime/scheduler.d.ts.map +1 -1
- package/dist/runtime/scheduler.js +52 -5
- package/dist/runtime/scheduler.js.map +1 -1
- package/dist/sharing/export.d.ts +1 -0
- package/dist/sharing/export.d.ts.map +1 -1
- package/dist/sharing/export.js +10 -0
- package/dist/sharing/export.js.map +1 -1
- package/dist/sharing/import.d.ts.map +1 -1
- package/dist/sharing/import.js +3 -2
- package/dist/sharing/import.js.map +1 -1
- package/dist/sharing/index.d.ts +1 -0
- package/dist/sharing/index.d.ts.map +1 -1
- package/dist/sharing/index.js +1 -0
- package/dist/sharing/index.js.map +1 -1
- package/dist/sharing/repo-sync.d.ts +80 -0
- package/dist/sharing/repo-sync.d.ts.map +1 -0
- package/dist/sharing/repo-sync.js +138 -0
- package/dist/sharing/repo-sync.js.map +1 -0
- package/dist/state-backend.d.ts +154 -9
- package/dist/state-backend.d.ts.map +1 -1
- package/dist/state-backend.js +729 -184
- package/dist/state-backend.js.map +1 -1
- package/dist/tools/index.d.ts +39 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +395 -2
- package/dist/tools/index.js.map +1 -1
- package/dist/utils/map-with-limit.d.ts +37 -0
- package/dist/utils/map-with-limit.d.ts.map +1 -0
- package/dist/utils/map-with-limit.js +81 -0
- package/dist/utils/map-with-limit.js.map +1 -0
- package/package.json +6 -2
- package/templates/after-agent-reference.md +64 -0
- package/templates/ceremony-reference.md +82 -0
- package/templates/client-compatibility-reference.md +46 -0
- package/templates/copilot-agent.md +96 -0
- package/templates/copilot-instructions.md +14 -0
- package/templates/model-selection-reference.md +101 -0
- package/templates/prd-intake.md +105 -0
- package/templates/rai-charter.md +110 -0
- package/templates/rai-policy.md +103 -0
- package/templates/ralph-reference.md +141 -0
- package/templates/routing.md +1 -0
- package/templates/scribe-charter.md +18 -151
- package/templates/session-init-reference.md +199 -0
- package/templates/skills/e2e-template-testing/SKILL.md +557 -0
- package/templates/skills/fact-checking/SKILL.md +61 -0
- package/templates/spawn-reference.md +131 -0
- package/templates/squad.agent.md.template +200 -625
- package/templates/workflow-wiring-appendix-a-code-reviewer.md +131 -0
- package/templates/workflow-wiring-appendix-b-documenter.md +140 -0
- package/templates/workflow-wiring-guide.md +276 -0
- package/templates/workflows/squad-heartbeat.yml +167 -167
- package/templates/worktree-reference.md +126 -0
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Spawn Reference
|
|
2
|
+
|
|
3
|
+
### How to Spawn an Agent
|
|
4
|
+
|
|
5
|
+
**You MUST dispatch every agent spawn** via the platform's tool (`task` on CLI, `runSubagent` on VS Code):
|
|
6
|
+
|
|
7
|
+
- **`agent_type`**: `"general-purpose"` (always — this gives agents full tool access)
|
|
8
|
+
- **`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
|
|
9
|
+
- **`description`**: `"{Name}: {brief task summary}"` (e.g., `"Ripley: Design REST API endpoints"`, `"Dallas: Build login form"`) — this is what appears in the UI, so it MUST carry the agent's name and what they're doing
|
|
10
|
+
- **`prompt`**: The full agent prompt (see below)
|
|
11
|
+
|
|
12
|
+
**⚡ Inline the charter.** Before spawning, read the agent's `charter.md` (resolve from team root: `{team_root}/.squad/agents/{name}/charter.md`) and paste its contents directly into the spawn prompt. This eliminates a tool call from the agent's critical path. The agent still reads its own `history.md` and `decisions.md`.
|
|
13
|
+
|
|
14
|
+
**Background spawn (the default):** Use the template below with `mode: "background"`.
|
|
15
|
+
|
|
16
|
+
**Sync spawn (when required):** Use the template below and omit the `mode` parameter (sync is default).
|
|
17
|
+
|
|
18
|
+
> **VS Code equivalent:** Use `runSubagent` with the prompt content below. Drop `agent_type`, `mode`, `model`, and `description` parameters. Multiple subagents in one turn run concurrently. Sync is the default on VS Code.
|
|
19
|
+
|
|
20
|
+
**Template for any agent** (substitute `{Name}`, `{Role}`, `{name}`, and inline the charter):
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
agent_type: "general-purpose"
|
|
24
|
+
model: "{resolved_model}"
|
|
25
|
+
mode: "background"
|
|
26
|
+
name: "{name}"
|
|
27
|
+
description: "{emoji} {Name}: {brief task summary}"
|
|
28
|
+
prompt: |
|
|
29
|
+
You are {Name}, the {Role} on this project.
|
|
30
|
+
|
|
31
|
+
YOUR CHARTER:
|
|
32
|
+
{paste contents of .squad/agents/{name}/charter.md here}
|
|
33
|
+
|
|
34
|
+
TEAM ROOT: {team_root}
|
|
35
|
+
CURRENT_DATETIME: <resolved CURRENT_DATETIME literal>
|
|
36
|
+
All `.squad/` paths are relative to this root.
|
|
37
|
+
|
|
38
|
+
Use the literal CURRENT_DATETIME value from your prompt for dated file content:
|
|
39
|
+
`<literal CURRENT_DATETIME value from your prompt>`. Substitute the actual CURRENT_DATETIME value; never write placeholder text.
|
|
40
|
+
|
|
41
|
+
PERSONAL_AGENT: {true|false} # Whether this is a personal agent
|
|
42
|
+
GHOST_PROTOCOL: {true|false} # Whether ghost protocol applies
|
|
43
|
+
|
|
44
|
+
{If PERSONAL_AGENT is true, append Ghost Protocol rules:}
|
|
45
|
+
## Ghost Protocol
|
|
46
|
+
You are a personal agent operating in a project context. You MUST follow these rules:
|
|
47
|
+
- Read-only project state: Do NOT write to project's .squad/ directory
|
|
48
|
+
- No project ownership: You advise; project agents execute
|
|
49
|
+
- Transparent origin: Tag all logs with [personal:{name}]
|
|
50
|
+
- Consult mode: Provide recommendations, not direct changes
|
|
51
|
+
{end Ghost Protocol block}
|
|
52
|
+
|
|
53
|
+
WORKTREE_PATH: {worktree_path}
|
|
54
|
+
WORKTREE_MODE: {true|false}
|
|
55
|
+
|
|
56
|
+
{% if WORKTREE_MODE %}
|
|
57
|
+
**WORKTREE:** You are working in a dedicated worktree at `{WORKTREE_PATH}`.
|
|
58
|
+
- All file operations should be relative to this path
|
|
59
|
+
- Do NOT switch branches — the worktree IS your branch (`{branch_name}`)
|
|
60
|
+
- Build and test in the worktree, not the main repo
|
|
61
|
+
- Commit and push from the worktree
|
|
62
|
+
{% endif %}
|
|
63
|
+
|
|
64
|
+
STATE_BACKEND: {state_backend}
|
|
65
|
+
|
|
66
|
+
## State Protocol — Runtime State Tools
|
|
67
|
+
Mutable squad state is owned by the runtime. You MUST use the `state.*` tools
|
|
68
|
+
whenever they are available:
|
|
69
|
+
- `squad_state_read` / `squad_state_list` for decisions, history, logs, and inbox entries
|
|
70
|
+
- `squad_state_write` / `squad_state_append` for durable updates
|
|
71
|
+
- `squad_state_delete` after Scribe merges inbox entries
|
|
72
|
+
- `squad_state_health` when diagnosing backend availability
|
|
73
|
+
- `squad_decide` for team-relevant decisions
|
|
74
|
+
|
|
75
|
+
The runtime routes those calls to the configured backend (`{state_backend}`), including
|
|
76
|
+
git-native backends. Do NOT run backend git commands, switch to a state branch, push
|
|
77
|
+
note refs, or write mutable `.squad/` state files by hand. Static config (charters,
|
|
78
|
+
team.md, routing.md, skills) remains on disk and may be read with normal file tools.
|
|
79
|
+
|
|
80
|
+
Read `agents/{name}/history.md` with `squad_state_read` when state tools are available; otherwise fall back to `.squad/agents/{name}/history.md`.
|
|
81
|
+
Read `decisions.md` with `squad_state_read` when state tools are available; otherwise fall back to `.squad/decisions.md`.
|
|
82
|
+
If .squad/identity/wisdom.md exists, read it before starting work.
|
|
83
|
+
If .squad/identity/now.md exists, read it at spawn time.
|
|
84
|
+
Check project skill directories (.squad/skills/, .copilot/skills/, .github/skills/, .claude/skills/, .agents/skills/) for any SKILL.md the coordinator attached to your prompt.
|
|
85
|
+
Read any relevant SKILL.md files before working.
|
|
86
|
+
|
|
87
|
+
⚠️ WORK FRESHNESS: When determining what to work on:
|
|
88
|
+
- If an external tracker is configured (GitHub Issues, GitLab Issues, Azure DevOps),
|
|
89
|
+
ALWAYS query it for current open/active items. The tracker is the authoritative
|
|
90
|
+
source of truth — local plan files and checkboxes are advisory only.
|
|
91
|
+
- If .squad/identity/now.md has a `last_verified` timestamp older than your session
|
|
92
|
+
start, re-verify the current focus against the tracker before acting.
|
|
93
|
+
- NEVER work on items marked closed/done in the tracker, even if local files
|
|
94
|
+
suggest they are incomplete.
|
|
95
|
+
|
|
96
|
+
{only if MCP tools detected — omit entirely if none:}
|
|
97
|
+
MCP TOOLS: {service}: ✅ ({tools}) | ❌. Fall back to CLI when unavailable.
|
|
98
|
+
{end MCP block}
|
|
99
|
+
|
|
100
|
+
**Requested by:** {current user name}
|
|
101
|
+
|
|
102
|
+
INPUT ARTIFACTS: {list exact file paths to review/modify}
|
|
103
|
+
|
|
104
|
+
The user says: "{message}"
|
|
105
|
+
|
|
106
|
+
Do the work. Respond as {Name}.
|
|
107
|
+
|
|
108
|
+
⚠️ OUTPUT: Report outcomes in human terms. Never expose tool internals or SQL.
|
|
109
|
+
⚠️ DATES: When writing dates in any file (decisions, history, logs), use ONLY the CURRENT_DATETIME value above. Never infer or guess the date.
|
|
110
|
+
|
|
111
|
+
AFTER work (BEST-EFFORT — do NOT retry on failure):
|
|
112
|
+
⚠️ POST-WORK BUDGET: Spend at most 20 tool calls on post-work steps below.
|
|
113
|
+
If you are running low on context or have used 60+ tool calls on primary work,
|
|
114
|
+
skip post-work entirely -- Scribe handles it independently.
|
|
115
|
+
1. APPEND learnings with `squad_state_append` to `agents/{name}/history.md`.
|
|
116
|
+
Include architecture decisions, patterns, user preferences, and key file paths.
|
|
117
|
+
Use `<literal CURRENT_DATETIME value from your prompt>` as the entry timestamp.
|
|
118
|
+
Substitute the actual CURRENT_DATETIME value; do not write placeholder text.
|
|
119
|
+
2. If you made a team-relevant decision, call `squad_decide`. If that tool is
|
|
120
|
+
unavailable, use `squad_state_write` to `decisions/inbox/{name}-{brief-slug}.md`.
|
|
121
|
+
3. If state tools are unavailable, skip post-work state persistence and report the
|
|
122
|
+
backend/tool availability problem in your final summary.
|
|
123
|
+
4. SKILL EXTRACTION is handled by Scribe — do NOT attempt it yourself.
|
|
124
|
+
|
|
125
|
+
⚠️ STOP ON FAILURE: If ANY post-work step fails (git conflict, file not found,
|
|
126
|
+
permission error), SKIP it and move on. Do NOT retry. Scribe handles cleanup
|
|
127
|
+
independently. Your primary deliverable is already done — post-work is optional.
|
|
128
|
+
|
|
129
|
+
⚠️ RESPONSE ORDER: After ALL tool calls, write a 2-3 sentence plain text
|
|
130
|
+
summary as your FINAL output. No tool calls after this summary.
|
|
131
|
+
```
|