@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.
Files changed (127) hide show
  1. package/dist/adapter/client.d.ts.map +1 -1
  2. package/dist/adapter/client.js +16 -3
  3. package/dist/adapter/client.js.map +1 -1
  4. package/dist/adapter/types.d.ts +6 -1
  5. package/dist/adapter/types.d.ts.map +1 -1
  6. package/dist/agents/charter-compiler.d.ts +2 -0
  7. package/dist/agents/charter-compiler.d.ts.map +1 -1
  8. package/dist/agents/charter-compiler.js +6 -1
  9. package/dist/agents/charter-compiler.js.map +1 -1
  10. package/dist/agents/index.d.ts.map +1 -1
  11. package/dist/agents/index.js +24 -25
  12. package/dist/agents/index.js.map +1 -1
  13. package/dist/agents/lifecycle.d.ts.map +1 -1
  14. package/dist/agents/lifecycle.js +11 -2
  15. package/dist/agents/lifecycle.js.map +1 -1
  16. package/dist/agents/onboarding.d.ts.map +1 -1
  17. package/dist/agents/onboarding.js +24 -0
  18. package/dist/agents/onboarding.js.map +1 -1
  19. package/dist/config/agent-source.d.ts.map +1 -1
  20. package/dist/config/agent-source.js +60 -33
  21. package/dist/config/agent-source.js.map +1 -1
  22. package/dist/config/feature-audit.js +1 -1
  23. package/dist/config/feature-audit.js.map +1 -1
  24. package/dist/config/init.d.ts +4 -0
  25. package/dist/config/init.d.ts.map +1 -1
  26. package/dist/config/init.js +177 -44
  27. package/dist/config/init.js.map +1 -1
  28. package/dist/index.d.ts +4 -2
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +3 -2
  31. package/dist/index.js.map +1 -1
  32. package/dist/marketplace/index.d.ts +7 -0
  33. package/dist/marketplace/index.d.ts.map +1 -1
  34. package/dist/marketplace/index.js +4 -0
  35. package/dist/marketplace/index.js.map +1 -1
  36. package/dist/marketplace/plugin-manifest.d.ts +113 -0
  37. package/dist/marketplace/plugin-manifest.d.ts.map +1 -0
  38. package/dist/marketplace/plugin-manifest.js +820 -0
  39. package/dist/marketplace/plugin-manifest.js.map +1 -0
  40. package/dist/marketplace/plugin-runtime.d.ts +37 -0
  41. package/dist/marketplace/plugin-runtime.d.ts.map +1 -0
  42. package/dist/marketplace/plugin-runtime.js +217 -0
  43. package/dist/marketplace/plugin-runtime.js.map +1 -0
  44. package/dist/marketplace/plugin-state.d.ts +89 -0
  45. package/dist/marketplace/plugin-state.d.ts.map +1 -0
  46. package/dist/marketplace/plugin-state.js +278 -0
  47. package/dist/marketplace/plugin-state.js.map +1 -0
  48. package/dist/memory/index.d.ts +262 -0
  49. package/dist/memory/index.d.ts.map +1 -0
  50. package/dist/memory/index.js +1122 -0
  51. package/dist/memory/index.js.map +1 -0
  52. package/dist/multi-squad.d.ts.map +1 -1
  53. package/dist/multi-squad.js +5 -2
  54. package/dist/multi-squad.js.map +1 -1
  55. package/dist/platform/azure-devops.d.ts.map +1 -1
  56. package/dist/platform/azure-devops.js +17 -3
  57. package/dist/platform/azure-devops.js.map +1 -1
  58. package/dist/platform/detect.d.ts.map +1 -1
  59. package/dist/platform/detect.js +12 -5
  60. package/dist/platform/detect.js.map +1 -1
  61. package/dist/platform/index.d.ts.map +1 -1
  62. package/dist/platform/index.js +26 -0
  63. package/dist/platform/index.js.map +1 -1
  64. package/dist/ralph/triage.js +1 -1
  65. package/dist/ralph/triage.js.map +1 -1
  66. package/dist/resolution.d.ts +18 -0
  67. package/dist/resolution.d.ts.map +1 -1
  68. package/dist/resolution.js +64 -2
  69. package/dist/resolution.js.map +1 -1
  70. package/dist/runtime/memory-value-benchmark.d.ts +61 -0
  71. package/dist/runtime/memory-value-benchmark.d.ts.map +1 -0
  72. package/dist/runtime/memory-value-benchmark.js +245 -0
  73. package/dist/runtime/memory-value-benchmark.js.map +1 -0
  74. package/dist/runtime/scheduler.d.ts +8 -0
  75. package/dist/runtime/scheduler.d.ts.map +1 -1
  76. package/dist/runtime/scheduler.js +52 -5
  77. package/dist/runtime/scheduler.js.map +1 -1
  78. package/dist/sharing/export.d.ts +1 -0
  79. package/dist/sharing/export.d.ts.map +1 -1
  80. package/dist/sharing/export.js +10 -0
  81. package/dist/sharing/export.js.map +1 -1
  82. package/dist/sharing/import.d.ts.map +1 -1
  83. package/dist/sharing/import.js +3 -2
  84. package/dist/sharing/import.js.map +1 -1
  85. package/dist/sharing/index.d.ts +1 -0
  86. package/dist/sharing/index.d.ts.map +1 -1
  87. package/dist/sharing/index.js +1 -0
  88. package/dist/sharing/index.js.map +1 -1
  89. package/dist/sharing/repo-sync.d.ts +80 -0
  90. package/dist/sharing/repo-sync.d.ts.map +1 -0
  91. package/dist/sharing/repo-sync.js +138 -0
  92. package/dist/sharing/repo-sync.js.map +1 -0
  93. package/dist/state-backend.d.ts +154 -9
  94. package/dist/state-backend.d.ts.map +1 -1
  95. package/dist/state-backend.js +729 -184
  96. package/dist/state-backend.js.map +1 -1
  97. package/dist/tools/index.d.ts +39 -1
  98. package/dist/tools/index.d.ts.map +1 -1
  99. package/dist/tools/index.js +395 -2
  100. package/dist/tools/index.js.map +1 -1
  101. package/dist/utils/map-with-limit.d.ts +37 -0
  102. package/dist/utils/map-with-limit.d.ts.map +1 -0
  103. package/dist/utils/map-with-limit.js +81 -0
  104. package/dist/utils/map-with-limit.js.map +1 -0
  105. package/package.json +6 -2
  106. package/templates/after-agent-reference.md +64 -0
  107. package/templates/ceremony-reference.md +82 -0
  108. package/templates/client-compatibility-reference.md +46 -0
  109. package/templates/copilot-agent.md +96 -0
  110. package/templates/copilot-instructions.md +14 -0
  111. package/templates/model-selection-reference.md +101 -0
  112. package/templates/prd-intake.md +105 -0
  113. package/templates/rai-charter.md +110 -0
  114. package/templates/rai-policy.md +103 -0
  115. package/templates/ralph-reference.md +141 -0
  116. package/templates/routing.md +1 -0
  117. package/templates/scribe-charter.md +18 -151
  118. package/templates/session-init-reference.md +199 -0
  119. package/templates/skills/e2e-template-testing/SKILL.md +557 -0
  120. package/templates/skills/fact-checking/SKILL.md +61 -0
  121. package/templates/spawn-reference.md +131 -0
  122. package/templates/squad.agent.md.template +200 -625
  123. package/templates/workflow-wiring-appendix-a-code-reviewer.md +131 -0
  124. package/templates/workflow-wiring-appendix-b-documenter.md +140 -0
  125. package/templates/workflow-wiring-guide.md +276 -0
  126. package/templates/workflows/squad-heartbeat.yml +167 -167
  127. 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
+ ```