@gempack/squad-mcp 0.3.1 → 0.5.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/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  MCP server that exposes the `squad-dev` workflow as deterministic tools, prompts, and resources. It classifies a task, scores its risk, picks an advisory squad of specialist reviewers, slices the changed files per agent, validates the plan, and consolidates the advisory verdicts. The host LLM (Claude Code, Cursor, Warp, Claude Desktop, …) orchestrates; `squad-mcp` provides the building blocks.
8
8
 
9
- It also ships as a Claude Code plugin that bundles the MCP server and the `/squad` and `/squad-review` slash commands behind a single `/plugin install`.
9
+ It also ships as a Claude Code plugin that bundles the MCP server, four slash commands (`/squad`, `/squad-review`, `/brainstorm`, `/commit-suggest`), and the matching skills behind a single `/plugin install`.
10
10
 
11
11
  ## Install
12
12
 
@@ -17,7 +17,7 @@ It also ships as a Claude Code plugin that bundles the MCP server and the `/squa
17
17
  /plugin install squad@gempack
18
18
  ```
19
19
 
20
- The plugin bundles the MCP server, the `/squad` command, and the `/squad-review` command. After install, restart Claude Code to pick up the new commands and the `squad` MCP server.
20
+ The plugin bundles the MCP server plus four slash commands and skills (`/squad`, `/squad-review`, `/brainstorm`, `/commit-suggest`). After install, restart Claude Code to pick up the new commands and the `squad` MCP server.
21
21
 
22
22
  ### npm package (any MCP client)
23
23
 
@@ -77,7 +77,7 @@ node dist/index.js
77
77
 
78
78
  | Tool | Purpose |
79
79
  |------|---------|
80
- | `detect_changed_files` | Hardened `git diff --name-status` for a workspace. Allowlisted refs, 10s timeout, 1MB stdout cap. |
80
+ | `detect_changed_files` | Hardened `git diff --name-status --no-renames` for a workspace. Allowlisted refs, 10s timeout, 1MB stdout cap. |
81
81
  | `classify_work_type` | Heuristic `WorkType` from prompt + paths (`Feature` / `Bug Fix` / `Refactor` / `Performance` / `Security` / `Business Rule`) with Low/Medium/High confidence. |
82
82
  | `score_risk` | Compute Low/Medium/High from boolean signals (auth, money, migration, files_count, new_module, api_change). |
83
83
  | `select_squad` | Select advisory agents for a work type. Combines matrix + path hints + content sniff. Returns evidence per file. |
@@ -102,6 +102,31 @@ node dist/index.js
102
102
  - `severity://_severity-and-ownership` — severity matrix + ownership rules.
103
103
  - `severity://skill-squad-dev`, `severity://skill-squad-review` — full skill specs.
104
104
 
105
+ ### Bundled skills
106
+
107
+ The plugin auto-registers these skills via `skills/` (or sync them to `~/.claude/skills/` for non-plugin clients with `node tools/sync-agents.mjs`):
108
+
109
+ | Skill | Trigger | Purpose |
110
+ |-------|---------|---------|
111
+ | `/squad` | implementation workflow | Builds an approved plan, distributes work to specialist agents in parallel, implements the change, consolidates via tech-lead. Optional `--codex` second-opinion. New `--quick` mode reduces to 1 specialist + tech-lead with terse prompts (mutually exclusive with `--codex`; auto-fallback to normal mode on security/data-layer scope). |
112
+ | `/squad-review` | multi-perspective review | Auto-detects affected domains, spawns specialist agents in parallel, scores on a weighted rubric (Code Quality 20%, Security 20%, Maintainability 20%, Performance 20%, Async/Concurrency 8%, Error Handling 7%, Architecture Fit 5%), tech-lead consolidates the verdict. New `--quick` mode for fast iteration. |
113
+ | `/brainstorm` | pre-implementation research | Web research in parallel + specialist agent perspectives → options matrix with cited sources and a recommendation. Produces no code. Position: `/brainstorm` decides what to build, `/squad` implements, `/squad-review` reviews. |
114
+ | `/commit-suggest` | commit message generator | Read-only suggester for Conventional Commits messages. Runs only an allowlist of git commands; never executes mutations; never adds AI co-author trailers. The user runs the commit themselves. |
115
+
116
+ Workflow positioning:
117
+
118
+ ```
119
+ /brainstorm -> decide what to build
120
+ v
121
+ /squad -> implement what was decided
122
+ v
123
+ /squad-review -> review what was implemented
124
+ v
125
+ /commit-suggest -> craft the commit message
126
+ ```
127
+
128
+ See [INSTALL.md](INSTALL.md#bundled-skills) for trigger examples and the optional `commit-msg` git hook + `permissions.deny` snippet that hard-enforce the read-only and no-AI-attribution invariants at the OS / Claude Code layer.
129
+
105
130
  ## Detection strategy (`select_squad` / `slice_files_for_agent`)
106
131
 
107
132
  Three layers, in order of strength:
@@ -114,13 +139,18 @@ Output of `select_squad` includes per-file `evidence` with `confidence` and `low
114
139
 
115
140
  ## Local override of agent definitions
116
141
 
117
- Agent markdown is loaded with this priority:
142
+ The loader picks ONE local override directory:
143
+
144
+ - If `SQUAD_AGENTS_DIR` is set, that path is used **exclusively** (the platform default is not consulted).
145
+ - Otherwise: `%APPDATA%\squad-mcp\agents` on Windows, `$XDG_CONFIG_HOME/squad-mcp/agents` on Unix (falls back to `~/.config/squad-mcp/agents` if `XDG_CONFIG_HOME` is unset).
146
+
147
+ Per-file resolution: if the agent's `*.md` exists in the chosen local directory, it wins. Otherwise, the embedded default bundled in the package is used.
148
+
149
+ Override files are loaded verbatim and rendered into the LLM's context with full agent authority — treat the directory as code (user-only writable, not on shared volumes, never sourced from untrusted input).
118
150
 
119
- 1. `$SQUAD_AGENTS_DIR` (env var, if set)
120
- 2. `%APPDATA%\squad-mcp\agents` (Windows) / `$XDG_CONFIG_HOME/squad-mcp/agents` (Unix)
121
- 3. Embedded defaults bundled in the package
151
+ Since v0.4.0, the override directory is validated against an allowlist (`HOME`, `APPDATA`, `LOCALAPPDATA`, `XDG_CONFIG_HOME`, `process.cwd()`); paths outside the allowlist are rejected with `OVERRIDE_REJECTED`. Set `SQUAD_AGENTS_ALLOW_UNSAFE=1` to bypass for unusual setups (logs a warn banner). See [INSTALL.md](INSTALL.md#local-override-of-agent-definitions) for the full security guidance.
122
152
 
123
- Run the `init_local_config` tool once to seed the local directory with defaults you can edit.
153
+ Run the `init_local_config` tool once to seed the local directory with editable defaults.
124
154
 
125
155
  ## Repo layout
126
156
 
@@ -129,10 +159,11 @@ squad-mcp/
129
159
  ├── .claude-plugin/ # Claude Code plugin manifest + marketplace
130
160
  ├── .github/workflows/ # CI + release workflows
131
161
  ├── agents/ # Bundled agent markdown defaults
132
- ├── commands/ # Plugin slash commands (/squad, /squad-review)
162
+ ├── commands/ # Plugin slash commands (/squad, /squad-review, /brainstorm, /commit-suggest)
163
+ ├── skills/ # Bundled skills (commit-suggest, brainstorm)
133
164
  ├── src/
134
165
  │ ├── index.ts # stdio entry
135
- │ ├── tools/ # MCP tools (10 deterministic functions)
166
+ │ ├── tools/ # MCP tools (12 deterministic functions)
136
167
  │ ├── resources/ # MCP resources + agent loader
137
168
  │ ├── prompts/ # MCP prompt templates
138
169
  │ ├── exec/git.ts # hardened git execution layer
@@ -141,6 +172,9 @@ squad-mcp/
141
172
  │ └── config/
142
173
  │ └── ownership-matrix.ts # agents, work types, content/path patterns
143
174
  ├── tests/ # vitest unit + integration + stdio smoke
175
+ ├── tools/
176
+ │ ├── sync-agents.mjs # mirror agents + skills into ~/.claude/ for non-plugin clients
177
+ │ └── git-hooks/commit-msg # opt-in hook rejecting AI-attribution trailers
144
178
  └── dist/ # compiled JS (gitignored, shipped via npm)
145
179
  ```
146
180