@squadrules/mcp 5.2.0 → 5.3.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.
Files changed (109) hide show
  1. package/README.md +66 -318
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/cli/commands/serve.js +2 -2
  4. package/dist/cli/commands/serve.js.map +1 -1
  5. package/dist/cli/index.js +6 -0
  6. package/dist/cli/index.js.map +1 -1
  7. package/dist/config/embedding-fastembed.d.ts +4 -3
  8. package/dist/config/embedding-fastembed.d.ts.map +1 -1
  9. package/dist/config/embedding-fastembed.js +6 -5
  10. package/dist/config/embedding-fastembed.js.map +1 -1
  11. package/dist/config/mem-boot.d.ts +3 -0
  12. package/dist/config/mem-boot.d.ts.map +1 -0
  13. package/dist/config/mem-boot.js +21 -0
  14. package/dist/config/mem-boot.js.map +1 -0
  15. package/dist/embed-docs/mem/adapter-migration.md +1 -1
  16. package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
  17. package/dist/embed-docs/mem/challenge-type-guide.md +1 -1
  18. package/dist/embed-docs/mem/create-new-protocol.md +1 -1
  19. package/dist/embed-docs/mem/phase-critic-guide.md +1 -1
  20. package/dist/embed-docs/mem/phase-critic.md +1 -1
  21. package/dist/embed-docs/mem/protocol-linking-guide.md +1 -1
  22. package/dist/embed-docs/mem/refine-search.md +1 -1
  23. package/dist/embed-docs/mem/skill-format-guide.md +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +17 -17
  26. package/dist/index.js.map +1 -1
  27. package/dist/resources/docs-resources.js +1 -1
  28. package/dist/resources/docs-resources.js.map +1 -1
  29. package/dist/resources/embedded-mcp-resources.js +9 -9
  30. package/dist/resources/mem-dir-utils.js +3 -3
  31. package/dist/resources/mem-dir-utils.js.map +1 -1
  32. package/dist/resources/mem-resources-boot.d.ts +1 -1
  33. package/dist/resources/mem-resources-boot.d.ts.map +1 -1
  34. package/dist/resources/mem-resources-boot.js +29 -24
  35. package/dist/resources/mem-resources-boot.js.map +1 -1
  36. package/dist/resources/mem-uuid-mapper.js +1 -1
  37. package/dist/resources/mem-uuid-mapper.js.map +1 -1
  38. package/dist/resources/prompt-resources.d.ts +3 -1
  39. package/dist/resources/prompt-resources.d.ts.map +1 -1
  40. package/dist/resources/prompt-resources.js +16 -2
  41. package/dist/resources/prompt-resources.js.map +1 -1
  42. package/dist/services/embedding/audit.js +1 -1
  43. package/dist/services/embedding/audit.js.map +1 -1
  44. package/dist/services/embedding/provider-audit.js +1 -1
  45. package/dist/services/embedding/provider-audit.js.map +1 -1
  46. package/dist/services/key-value-store-factory.d.ts.map +1 -1
  47. package/dist/services/key-value-store-factory.js +3 -0
  48. package/dist/services/key-value-store-factory.js.map +1 -1
  49. package/dist/services/memory/memory-accessors.d.ts +10 -0
  50. package/dist/services/memory/memory-accessors.d.ts.map +1 -1
  51. package/dist/services/memory/memory-accessors.js +19 -0
  52. package/dist/services/memory/memory-accessors.js.map +1 -1
  53. package/dist/services/memory/store.d.ts.map +1 -1
  54. package/dist/services/memory/store.js +2 -2
  55. package/dist/services/memory/store.js.map +1 -1
  56. package/dist/services/oidc-state-store.js +2 -2
  57. package/dist/services/oidc-state-store.js.map +1 -1
  58. package/dist/services/redis-cache.js +1 -1
  59. package/dist/services/redis-cache.js.map +1 -1
  60. package/dist/services/stats/model-stats.js +2 -2
  61. package/dist/services/stats/model-stats.js.map +1 -1
  62. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js +1 -1
  63. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js.map +1 -1
  64. package/dist/services/vector-store/lancedb/lance-records-reads.d.ts.map +1 -1
  65. package/dist/services/vector-store/lancedb/lance-records-reads.js +2 -2
  66. package/dist/services/vector-store/lancedb/lance-records-reads.js.map +1 -1
  67. package/dist/services/vector-store/lancedb/lance-records-writes.js +1 -1
  68. package/dist/services/vector-store/lancedb/lance-records-writes.js.map +1 -1
  69. package/dist/stdio/stdio-server.d.ts.map +1 -1
  70. package/dist/stdio/stdio-server.js +1 -3
  71. package/dist/stdio/stdio-server.js.map +1 -1
  72. package/dist/ui/assets/{AccountPage-Ci29Zidn.js → AccountPage-BWPmUlfc.js} +1 -1
  73. package/dist/ui/assets/{ChallengeCard-gY-n7rwI.js → ChallengeCard-DVXo4j0b.js} +1 -1
  74. package/dist/ui/assets/{ErrorAlert-BQMph5Nh.js → ErrorAlert-BoPXaBKG.js} +1 -1
  75. package/dist/ui/assets/{HomePage-B06u5RCw.js → HomePage-B--ESwM9.js} +1 -1
  76. package/dist/ui/assets/{NotFoundPage-Dz-PKC4R.js → NotFoundPage-bTE_mpMC.js} +1 -1
  77. package/dist/ui/assets/{ProtocolDetailPage-DCw5D34S.js → ProtocolDetailPage-DFe_JOr3.js} +1 -1
  78. package/dist/ui/assets/{ProtocolEditPage-mChBe3JY.js → ProtocolEditPage-HAcAGXw7.js} +2 -2
  79. package/dist/ui/assets/{RichTextEditor-Bj6JxHM5.js → RichTextEditor-DWLV579w.js} +1 -1
  80. package/dist/ui/assets/{RunGuidedPage-Bd1bUTBH.js → RunGuidedPage-Bewi7Wsx.js} +1 -1
  81. package/dist/ui/assets/{RunsPage-4kDF_Ylg.js → RunsPage-BSgcu2TO.js} +1 -1
  82. package/dist/ui/assets/{SkillBundlePage-D1OPKJzA.js → SkillBundlePage-CiMQN0nf.js} +1 -1
  83. package/dist/ui/assets/{SpaceSelect-DDhPkDXU.js → SpaceSelect-D3al0TgQ.js} +1 -1
  84. package/dist/ui/assets/{SquadrulesPage-D84vIaBc.js → SquadrulesPage-C37VEZnc.js} +1 -1
  85. package/dist/ui/assets/{StepFlowGraph-DsL5lsIq.js → StepFlowGraph-BXsWPPO0.js} +1 -1
  86. package/dist/ui/assets/{SurfaceCard-CRidnDLP.js → SurfaceCard-BzJidvvn.js} +1 -1
  87. package/dist/ui/assets/{export-skill-zip-C1bRyhE2.js → export-skill-zip-D8iQY1Dl.js} +1 -1
  88. package/dist/ui/assets/index-CSUUmfdT.css +2 -0
  89. package/dist/ui/assets/{index-BD4O80zW.js → index-dJ-Vbr4x.js} +3 -3
  90. package/dist/ui/assets/react-BvB9BS1T.js +9 -0
  91. package/dist/ui/assets/tiptap-CCr8bvo1.js +204 -0
  92. package/dist/ui/assets/{useRunSession-BX2U9D53.js → useRunSession-CB5wPJ8O.js} +1 -1
  93. package/dist/ui/assets/vendor-xESPQGR9.js +31 -0
  94. package/dist/ui/index.html +5 -5
  95. package/dist/utils/concurrency-limit.d.ts.map +1 -1
  96. package/dist/utils/concurrency-limit.js +3 -8
  97. package/dist/utils/concurrency-limit.js.map +1 -1
  98. package/dist/utils/log-core.d.ts.map +1 -1
  99. package/dist/utils/log-core.js +3 -1
  100. package/dist/utils/log-core.js.map +1 -1
  101. package/dist/utils/squadrules-user-dirs.d.ts +6 -8
  102. package/dist/utils/squadrules-user-dirs.d.ts.map +1 -1
  103. package/dist/utils/squadrules-user-dirs.js +10 -9
  104. package/dist/utils/squadrules-user-dirs.js.map +1 -1
  105. package/package.json +52 -50
  106. package/dist/ui/assets/index-fBTJW4Qq.css +0 -2
  107. package/dist/ui/assets/react-CR5VJ85Q.js +0 -9
  108. package/dist/ui/assets/tiptap-74Cp-fci.js +0 -204
  109. package/dist/ui/assets/vendor-DGTQ2S8W.js +0 -31
package/README.md CHANGED
@@ -1,163 +1,52 @@
1
- # SquadRules MCP
1
+ # SquadRules
2
2
 
3
- <!-- squadrules-lint-allow-protocol-synonyms -->
3
+ SquadRules is a framework where AI agents exchange and maintain knowledge of
4
+ their team's preferences and procedures. AI agents are its only users. One AI
5
+ and one human already form a team; ideally, the human never needs to know
6
+ SquadRules exists.
4
7
 
5
- <img src="logo/squadrules-mcp.svg" width="128" alt="SquadRules MCP logo" />
8
+ ## Purpose
6
9
 
7
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8
- [![Node.js Version](https://img.shields.io/badge/node-%3E%3D24.0.0-brightgreen)](https://nodejs.org/)
10
+ An agent may know how to commit code, yet still need its team's commit rules.
11
+ SquadRules makes that knowledge available across tasks and sessions through
12
+ stored adapters: instructions for applying preferences and executing workflows.
9
13
 
10
- SquadRules is an agent-facing persistent protocol system that bridges generic
11
- model competence and your actual local procedure. Even an agent that already
12
- knows Git must consult your local rules before acting on "Create PR." MCP is
13
- one interface into SquadRules, not the whole identity.
14
+ Agents own these adapters. They must maintain them when preferences change or
15
+ when missing, ambiguous, or outdated instructions prevent autonomous execution.
16
+ Routine adapter maintenance belongs to the agent's work; it should not become
17
+ a separate task for the human.
14
18
 
15
- SquadRules MCP is a TypeScript service for storing and executing reusable
16
- protocol chains for AI agents. It exposes:
19
+ Autonomy operates within the team's actual authorization boundaries. A workflow
20
+ must identify a genuinely missing decision or permission instead of inventing
21
+ one. Learning a preference does not authorize an unrelated action.
17
22
 
18
- - an MCP endpoint at `POST /mcp`
19
- - REST endpoints under `/api/*`
20
- - a browser UI under `/ui`
21
- - a CLI named `squadrules`
23
+ ## How it works
22
24
 
23
- Without persistent workflows, agents repeat work, lose context, and cannot
24
- follow multi-step procedures reliably. SquadRules fixes this with three core
25
- ideas (the diagrams below list every **MCP tool**):
25
+ - **Find:** `activate` discovers adapters relevant to an intent.
26
+ - **Execute:** `forward` supplies a layer's contract and guides continuation.
27
+ - **Finalize:** `reward` records the run's outcome.
28
+ - **Maintain:** `train`, `tune`, `export`, `delete`, and `spaces` support adapter
29
+ and space management according to their tool contracts.
26
30
 
27
- - **Persistent memory** — store and retrieve protocol chains across sessions
28
- - **Deterministic execution** — **activate** → **forward** (per layer) →
29
- **reward**; the server drives `next_action` at every step
30
- - **Agent-facing design** — tool descriptions and error messages built for
31
- programmatic consumption and recovery
31
+ Semantic search discovers relevant knowledge. Explicit links compose known
32
+ workflow dependencies. Agents perform the work required by each layer and
33
+ submit evidence; advancing through a workflow does not itself prove that the
34
+ underlying task succeeded.
32
35
 
33
- Protocol execution runs in a fixed order: **activate** (match adapters),
34
- **forward** (run each layer’s contract; loop), then **reward** (finalize the
35
- run). Use **train** / **tune** / **export** / **delete** / **spaces** as
36
- described in each tool’s MCP description.
36
+ Use the connected server's schemas and returned instructions for actual calls.
37
+ The [SquadRules skill](.agents/skills/squadrules/SKILL.md) contains agent entry
38
+ instructions; [tool documentation](src/embed-docs/tools/) and
39
+ [built-in adapters](src/embed-docs/mem/) live with the implementation.
37
40
 
38
- **Default run order** — `activate` → `forward` (loop per layer) → `reward`:
41
+ ## Local setup
39
42
 
40
- ```mermaid
41
- flowchart LR
42
- A([activate]) --> B([forward])
43
- B -.-> B
44
- B --> D([reward])
45
- style A fill:#4a6fa5,stroke:#2d4a7a,color:#fff
46
- style B fill:#ffb74d,stroke:#f57c00,color:#333
47
- style D fill:#81c784,stroke:#388e3c,color:#333
48
- ```
49
-
50
- **Discovery and adapter lifecycle** — no fixed order; follow each tool’s MCP description:
51
-
52
- ```mermaid
53
- flowchart LR
54
- S([spaces]) --- TR([train]) --- TU([tune]) --- EX([export]) --- DL([delete])
55
- style S fill:#4a6fa5,stroke:#2d4a7a,color:#fff
56
- style TR fill:#ede7f6,stroke:#5e35b1,color:#333
57
- style TU fill:#fff3e0,stroke:#f57c00,color:#333
58
- style EX fill:#e8f5e9,stroke:#388e3c,color:#333
59
- style DL fill:#ffebee,stroke:#c62828,color:#333
60
- ```
61
-
62
- The server generates challenge data (`nonce`, `proof_hash`, URIs); agents echo
63
- those values back exactly.
64
-
65
- ## Protocol execution
66
-
67
- Authoritative behavior for agents is defined in the MCP tool resources under
68
- [`src/embed-docs/tools/`](src/embed-docs/tools/) (**`activate`**, **`forward`**,
69
- **`reward`**). This is an on-wire summary; follow each response’s `next_action`
70
- and `must_obey` fields in real runs.
71
-
72
- 1. **`activate`** — Provide a short `query` string (about 3-8 words) on every
73
- call. From `choices`, pick **one** row and obey **that** row’s `next_action`
74
- (do not mix in another URI). Typical roles: **`match`** (continue with
75
- **`forward`** on the given adapter URI), **`refine`**, **`create`**
76
- (register a new adapter with **`train`**).
77
-
78
- 2. **`forward`** — With the adapter URI from **`activate`**, call **`forward`**
79
- and **omit** `solution` on the **first** call for that run. Read `contract`
80
- and `next_action`. For each layer, call **`forward`** again using the **layer**
81
- URI from the last response (add `?execution_id=...` when the server returns
82
- it) and supply a `solution` whose `type` matches `contract.type`. Loop until
83
- `next_action` tells you to call **`reward`**.
84
-
85
- 3. **`reward`** — After the last layer, call **`reward`** with the **layer** URI
86
- from **`forward`** (not the adapter URI unless the schema explicitly allows
87
- it), `outcome` (`success` or `failure`), and optional evaluator fields per the
88
- tool description.
89
-
90
- **Must always:** Obey `next_action` verbatim. Echo server-issued `nonce`,
91
- `proof_hash`, and URIs exactly.
92
-
93
- **Must never:** Invent URIs; skip layers; submit a solution whose type does not
94
- match `contract.type`.
95
-
96
- For a longer narrative, see the **Workflow Engine** pages in the
97
- [SquadRules wiki](https://github.com/SquadRules/mcp/wiki).
98
-
99
- ## What runs in this repository
100
-
101
- The current codebase includes:
102
-
103
- - **HTTP application server** — Express app for MCP, REST, auth routes, and UI
104
- - **stdio MCP transport** — direct local-host launch path for desktop/IDE MCP clients
105
- - **Vector/trace store** — embedded LanceDB by default; Qdrant when `QDRANT_URL` is set
106
- - **Optional Redis cache / proof-of-work state store** — enabled when `REDIS_URL` is set
107
- - **Optional Keycloak auth integration** — browser session + Bearer JWT validation
108
- - **React UI** — served from the same origin at `/ui`
109
- - **CLI** — talks to the HTTP API
110
-
111
- ## Transport modes
112
-
113
- Use one transport mode per process:
114
-
115
- **`squadrules serve` / `squadrules-mcp serve`** (run the MCP server from the npm package):
116
-
117
- - **`--transport stdio|http`** overrides **`TRANSPORT_TYPE`** for that process only.
118
- - If neither is set, **`serve` defaults to stdio** (good for local MCP hosts).
119
- - Other **`squadrules`** commands (login, train, …) do not use `--transport`; they only see
120
- **`TRANSPORT_TYPE`** if you set it in the environment (normally leave it unset for CLI-only use).
121
-
122
- - **`TRANSPORT_TYPE=http`**: serves `/mcp`, `/api/*`, `/ui`, and `/health`; this is
123
- the mode used by container image and Helm chart deployments.
124
- - **`TRANSPORT_TYPE=stdio`**: runs MCP over stdin/stdout for local hosts such as
125
- Claude Desktop, Cursor, or Claude Code. In this mode, stdout is reserved for
126
- MCP protocol frames and logs go to stderr.
127
-
128
- ## Quick start
129
-
130
- SquadRules runs as a local MCP server that your agent host launches over **stdio**
131
- (the default transport). You do not need to clone this repo or run Docker
132
- Compose — install the package globally and point your host at `squadrules serve`.
133
-
134
- ### Prerequisites
135
-
136
- - **Node.js 24+**.
137
- - **One embedding backend**, supplied through the host `env` below (the embedded
138
- store removes the vector *database* dependency, not the embedding provider).
139
- - **No database required.** By default SquadRules keeps its vectors in an embedded,
140
- file-backed LanceDB store under `~/.config/squadrules/lancedb` (created on first
141
- run) — no Qdrant, Redis, or Docker. To keep an existing Qdrant, set `QDRANT_URL`;
142
- the single-switch selection rule and limitations live in
143
- [Known issues & limitations](docs/known-issues-and-limitations.md#vector-store-backends).
144
-
145
- ### Install
43
+ Requires Node.js 24 or newer. Install the package:
146
44
 
147
45
  ```bash
148
46
  npm install -g @squadrules/mcp
149
- squadrules --help
150
47
  ```
151
48
 
152
- The global install provides both the **`squadrules`** CLI (bulk operations, auth,
153
- server management) and the MCP server binary used by your agent host. The
154
- package also installs **`squadrules-mcp`** and retains the former **`squadrules`**
155
- and **`squadrules-mcp`** command names as compatibility aliases.
156
-
157
- ### Configure your MCP host
158
-
159
- Add SquadRules to your host's `mcp.json` (Cursor, Claude Desktop, Claude Code, …).
160
- `serve` uses **stdio** by default, so **no `--transport` flag is needed**:
49
+ Configure the agent host to launch the MCP server:
161
50
 
162
51
  ```json
163
52
  {
@@ -171,192 +60,51 @@ Add SquadRules to your host's `mcp.json` (Cursor, Claude Desktop, Claude Code,
171
60
  }
172
61
  ```
173
62
 
174
- An empty `env` is enough: with no `QDRANT_URL` the server uses the embedded
175
- LanceDB store (created on first run under `~/.config/squadrules/lancedb`), and
176
- embeddings run **locally with fastembed** (no API key, no inference service; the
177
- model is downloaded once into `~/.config/squadrules/models`). To use an existing
178
- Qdrant instead, add `"QDRANT_URL": "http://localhost:6333"` (and
179
- `"QDRANT_API_KEY": ""` for no-auth localhost Qdrant). To override the local
180
- embedding default with an external backend, supply **one** of:
181
-
182
- - **OpenAI** — `OPENAI_API_KEY`
183
- - **Ollama / OpenAI-compatible** — `OPENAI_API_URL`, `OPENAI_EMBEDDING_MODEL`,
184
- and `OPENAI_API_KEY=ollama`
185
- - **TEI** (deprecated) — `TEI_BASE_URL` (+ optional `TEI_MODEL`)
186
-
187
- Every parameter is **ENV-overridable**. To run SquadRules as an HTTP listener
188
- instead of stdio, add `"--transport", "http"` to `args` (see
189
- [Transport modes](#transport-modes)).
63
+ With no environment overrides, this uses stdio, embedded LanceDB storage, and
64
+ local fastembed embeddings. No database service, Docker, or API key is needed.
65
+ The embedding model downloads on first use and is cached locally. The host
66
+ must be able to find the installed `squadrules` executable.
190
67
 
191
- Some hosts show a longer **agent-visible** server id (for example one ending in
192
- `-SQUADRULES`); see [AGENTS.md](AGENTS.md) for the runtime authority note.
193
-
194
- When executing over MCP, follow **[Protocol execution](#protocol-execution)**
195
- above and each tool result's `next_action`. The connected server's tool
196
- descriptions are the runtime authority if they differ from this file.
197
-
198
- > **Container or Kubernetes deployment?** Signed multi-arch images live in
199
- > [`SquadRules/containers`](https://github.com/SquadRules/containers); the Helm
200
- > chart lives in [`SquadRules/charts`](https://github.com/SquadRules/charts).
201
- > **Working on this repo?** Local development infrastructure (Qdrant, Valkey,
202
- > Postgres, Keycloak) is in `compose/infra.yaml` and driven by scripts in
203
- > [CONTRIBUTING.md](CONTRIBUTING.md).
204
-
205
- ## CLI
206
-
207
- The `squadrules` CLI is installed as part of the global package (see
208
- [Install](#install) above). It provides bulk adapter operations, authentication,
209
- export/import, and server management — the same binary your MCP host uses for
210
- `squadrules serve`.
211
-
212
- ```bash
213
- squadrules --help
214
- ```
215
-
216
- See [docs/CLI.md](docs/CLI.md).
217
-
218
- ## Add SquadRules to your agent instructions
219
-
220
- This repo ships the **squadrules** skill for running protocols. Use `--list`
221
- to see what the skills registry reports for this repo.
222
-
223
- If you want agents to use SquadRules consistently, add a short repo rule or
224
- instruction such as:
225
-
226
- > SquadRules MCP is a Model Context Protocol server for persistent memory and
227
- > deterministic adapter execution. Execute protocols in this order:
228
- > **`activate`** → **`forward`** (loop per layer until `next_action` points to
229
- > **`reward`**) → **`reward`**. Echo all server-generated hashes, nonces, and
230
- > URIs exactly.
231
-
232
- ## Agent skills shipped in this repo
233
-
234
- This repository ships its agent skills under
235
- [`.agents/skills/`](.agents/skills/). Two skills are published:
236
-
237
- | Skill | Audience | Purpose |
238
- |-------|----------|---------|
239
- | `squadrules` | Users | Run SquadRules protocols; install and update guidance; bug reports |
240
- | `squadrules-dev` | Developers | Local dev stack (Qdrant / Valkey / Postgres / Keycloak via `compose/infra.yaml`) and maintainer workflows (internal; not installed by `npx skills add`) |
241
-
242
- The former `squadrules` and `squadrules-dev` skill directories are retained for
243
- compatibility with existing installations; hosts prefer `squadrules` when both
244
- are present.
245
-
246
- Install the user skill:
68
+ Install the routing skill using a compatible skill loader, for example:
247
69
 
248
70
  ```bash
249
71
  npx skills add SquadRules/mcp --skill squadrules
250
72
  ```
251
73
 
252
- List available skills:
253
-
254
- ```bash
255
- npx skills add SquadRules/mcp --list
256
- ```
257
-
258
- Popular global installs:
259
-
260
- | Agents | Command |
261
- |--------|---------|
262
- | Cursor | `npx skills add SquadRules/mcp --skill squadrules -y -g -a cursor` |
263
- | Claude Code | `npx skills add SquadRules/mcp --skill squadrules -y -g -a claude-code` |
264
- | Cursor + Claude Code | `npx skills add SquadRules/mcp --skill squadrules -y -g -a cursor -a claude-code` |
265
-
266
- More detail: [.agents/skills/README.md](.agents/skills/README.md)
267
-
268
- ## Container images
269
-
270
- Container images are built, scanned, signed and published from the
271
- [`SquadRules/containers`](https://github.com/SquadRules/containers) repository,
272
- FROM the published `@squadrules/mcp` npm package, to Docker Hub
273
- (`docker.io/squadrules/mcp`) and quay.io. This repository publishes npm only;
274
- see that repository for the image pipeline, base-image OS scanning and signing.
275
-
276
- ## Helm (advanced)
277
-
278
- The Helm chart for Kubernetes deployment lives in the
279
- [`SquadRules/charts`](https://github.com/SquadRules/charts) repository and is
280
- published to `oci://ghcr.io/squadrules/charts/mcp`. See that repository for
281
- installation, values, and chart-testing details.
282
-
283
- ## Documentation map
284
-
285
- - [Documentation index](docs/README.md)
286
- - [Install and environment](docs/install/README.md)
287
- - [Cursor and MCP](docs/install/README.md#cursor-and-mcp)
288
- - [CLI reference](docs/CLI.md)
289
- - [Architecture (SquadRules wiki)](https://github.com/SquadRules/mcp/wiki)
290
- - [Adapter examples](docs/examples/README.md)
291
- - [Contributing](CONTRIBUTING.md)
292
-
293
- ## Troubleshooting
294
-
295
- ### The server does not start
296
-
297
- In stdio mode SquadRules logs to **stderr** (stdout is reserved for MCP frames).
298
- Check your host's MCP log panel for the `SquadRules` server. The most common cause
299
- is Qdrant not being reachable.
300
-
301
- ### SquadRules cannot reach Qdrant
302
-
303
- SquadRules requires a Qdrant instance and only becomes healthy once Qdrant is
304
- ready. Confirm one is listening on your `QDRANT_URL` (default
305
- `http://localhost:6333`):
306
-
307
- ```bash
308
- curl http://localhost:6333/readyz
309
- ```
310
-
311
- If you run SquadRules in HTTP mode (`--transport http`), you can also check its own
312
- health endpoint (`curl http://localhost:3000/health`).
74
+ The skill directs agents to consult team knowledge even for familiar work.
75
+ Its loading and invocation depend on the host; installing an MCP server alone
76
+ does not guarantee that every agent will consult it.
313
77
 
314
- ### Embeddings fail on startup
315
-
316
- By default embeddings run **locally with fastembed** — no key required — but the
317
- **first run downloads the model**, so it needs network access once (cached under
318
- `~/.config/squadrules/models`; air-gapped hosts must pre-seed it). Override the
319
- model or location with `FASTEMBED_MODEL` / `FASTEMBED_CACHE_DIR`. To use an
320
- external backend instead, set one working provider in the host `env`:
321
-
322
- - OpenAI: `OPENAI_API_KEY`
323
- - Ollama/OpenAI-compatible: `OPENAI_API_URL`, `OPENAI_EMBEDDING_MODEL`, `OPENAI_API_KEY=ollama`
324
- - TEI (deprecated): `TEI_BASE_URL` (+ optional `TEI_MODEL`)
325
-
326
- ### The CLI keeps asking for login
327
-
328
- The CLI stores tokens per API URL. Confirm that:
329
-
330
- - you are using the expected `--url` / `SQUADRULES_API_URL`
331
- - the token is still valid
332
- - Keycloak and the SquadRules server agree on issuer and audience
333
-
334
- Use:
335
-
336
- ```bash
337
- squadrules token --validate
338
- ```
78
+ ## Runtime modes
339
79
 
340
- > **Container / Kubernetes operators:** for image verification see
341
- > [`SquadRules/containers`](https://github.com/SquadRules/containers); for
342
- > chart values and auth troubleshooting see
343
- > [`SquadRules/charts`](https://github.com/SquadRules/charts).
344
- > **Working on this repo:** for local dev infrastructure and auth troubleshooting, see
345
- > [CONTRIBUTING.md](CONTRIBUTING.md).
80
+ | Mode | Behavior |
81
+ | --- | --- |
82
+ | Local stdio | Host launches `squadrules serve`; embedded storage, authentication off, no HTTP listener. |
83
+ | HTTP | `squadrules serve --transport http`; serves MCP at `/mcp`, REST at `/api/*`, and the UI at `/ui`; authentication defaults on. |
346
84
 
347
- ## Support
85
+ Local stdio rejects `AUTH_ENABLED=true` and a nonempty `QDRANT_URL`. Configure
86
+ HTTP mode for an authenticated deployment or an external Qdrant backend.
87
+ See [runtime configuration](src/config/runtime-mode.ts) and the
88
+ [environment template](scripts/env/.env.template) for settings.
89
+ For CLI commands, run `squadrules --help`.
348
90
 
349
- - [Documentation](docs/README.md)
350
- - [Issues](https://github.com/SquadRules/mcp/issues)
351
- - [Discussions](https://github.com/SquadRules/mcp/discussions)
91
+ Container packaging and Helm deployment are maintained in
92
+ [SquadRules/containers](https://github.com/SquadRules/containers) and
93
+ [SquadRules/charts](https://github.com/SquadRules/charts).
352
94
 
353
- ## Trademark
95
+ ## Repository work
354
96
 
355
- SquadRules MCP™ and the SquadRules MCP logo are trademarks of the project owner.
356
- They are not covered by the MIT license. Forks must remove the name and logo.
97
+ Read [CONTRIBUTING.md](CONTRIBUTING.md) for development and validation and
98
+ [AGENTS.md](AGENTS.md) for repository agent instructions.
99
+ [Architecture decisions](docs/adr/) remain available as reference material.
100
+ Documents under `docs-to-be-reviewed/` are pending review and must not be used
101
+ as authoritative instructions.
357
102
 
358
- See [TRADEMARK.md](TRADEMARK.md).
103
+ The ownership principles above guide the ongoing agent instruction review.
104
+ Individual built-in adapters and skills may still need alignment; this is
105
+ not a claim that runtime enforcement is already complete.
359
106
 
360
- ## License
107
+ ## License and trademark
361
108
 
362
- MIT — see [LICENSE](LICENSE).
109
+ The code is licensed under [MIT](LICENSE). The SquadRules name and logo are
110
+ covered separately by [TRADEMARK.md](TRADEMARK.md).