@squadrules/mcp 5.1.0 → 5.3.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 (96) hide show
  1. package/README.md +66 -311
  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 +5 -4
  8. package/dist/config/embedding-fastembed.d.ts.map +1 -1
  9. package/dist/config/embedding-fastembed.js +8 -7
  10. package/dist/config/embedding-fastembed.js.map +1 -1
  11. package/dist/config.js +1 -1
  12. package/dist/config.js.map +1 -1
  13. package/dist/embed-docs/mem/adapter-migration.md +1 -1
  14. package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
  15. package/dist/embed-docs/mem/challenge-type-guide.md +1 -1
  16. package/dist/embed-docs/mem/create-new-protocol.md +1 -1
  17. package/dist/embed-docs/mem/phase-critic-guide.md +1 -1
  18. package/dist/embed-docs/mem/phase-critic.md +1 -1
  19. package/dist/embed-docs/mem/protocol-linking-guide.md +1 -1
  20. package/dist/embed-docs/mem/refine-search.md +1 -1
  21. package/dist/embed-docs/mem/skill-format-guide.md +1 -1
  22. package/dist/http/http-auth-callback.js +1 -1
  23. package/dist/http/http-auth-callback.js.map +1 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/index.js +12 -15
  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.js +13 -13
  34. package/dist/resources/mem-resources-boot.js.map +1 -1
  35. package/dist/resources/mem-uuid-mapper.js +1 -1
  36. package/dist/resources/mem-uuid-mapper.js.map +1 -1
  37. package/dist/resources/prompt-resources.d.ts +3 -1
  38. package/dist/resources/prompt-resources.d.ts.map +1 -1
  39. package/dist/resources/prompt-resources.js +16 -2
  40. package/dist/resources/prompt-resources.js.map +1 -1
  41. package/dist/services/embedding/audit.js +1 -1
  42. package/dist/services/embedding/audit.js.map +1 -1
  43. package/dist/services/embedding/provider-audit.js +1 -1
  44. package/dist/services/embedding/provider-audit.js.map +1 -1
  45. package/dist/services/key-value-store-factory.d.ts.map +1 -1
  46. package/dist/services/key-value-store-factory.js +3 -0
  47. package/dist/services/key-value-store-factory.js.map +1 -1
  48. package/dist/services/oidc-state-store.js +2 -2
  49. package/dist/services/oidc-state-store.js.map +1 -1
  50. package/dist/services/redis-cache.js +1 -1
  51. package/dist/services/redis-cache.js.map +1 -1
  52. package/dist/services/stats/model-stats.js +2 -2
  53. package/dist/services/stats/model-stats.js.map +1 -1
  54. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js +1 -1
  55. package/dist/services/vector-store/lancedb/LanceVectorRecordStore.js.map +1 -1
  56. package/dist/services/vector-store/lancedb/lance-records-writes.js +1 -1
  57. package/dist/services/vector-store/lancedb/lance-records-writes.js.map +1 -1
  58. package/dist/stdio/stdio-server.d.ts.map +1 -1
  59. package/dist/stdio/stdio-server.js +1 -3
  60. package/dist/stdio/stdio-server.js.map +1 -1
  61. package/dist/ui/assets/{AccountPage-BqJYrqYP.js → AccountPage-DhaO-G9K.js} +1 -1
  62. package/dist/ui/assets/{ChallengeCard-gY-n7rwI.js → ChallengeCard-DVXo4j0b.js} +1 -1
  63. package/dist/ui/assets/{ErrorAlert-BQMph5Nh.js → ErrorAlert-BoPXaBKG.js} +1 -1
  64. package/dist/ui/assets/{HomePage-B06u5RCw.js → HomePage-B--ESwM9.js} +1 -1
  65. package/dist/ui/assets/{NotFoundPage-Dz-PKC4R.js → NotFoundPage-bTE_mpMC.js} +1 -1
  66. package/dist/ui/assets/{ProtocolDetailPage-DCw5D34S.js → ProtocolDetailPage-DFe_JOr3.js} +1 -1
  67. package/dist/ui/assets/{ProtocolEditPage-mChBe3JY.js → ProtocolEditPage-HAcAGXw7.js} +2 -2
  68. package/dist/ui/assets/{RichTextEditor-Bj6JxHM5.js → RichTextEditor-DWLV579w.js} +1 -1
  69. package/dist/ui/assets/{RunGuidedPage-Bd1bUTBH.js → RunGuidedPage-Bewi7Wsx.js} +1 -1
  70. package/dist/ui/assets/{RunsPage-4kDF_Ylg.js → RunsPage-BSgcu2TO.js} +1 -1
  71. package/dist/ui/assets/{SkillBundlePage-D1OPKJzA.js → SkillBundlePage-CiMQN0nf.js} +1 -1
  72. package/dist/ui/assets/{SpaceSelect-DDhPkDXU.js → SpaceSelect-D3al0TgQ.js} +1 -1
  73. package/dist/ui/assets/{SquadrulesPage-D84vIaBc.js → SquadrulesPage-C37VEZnc.js} +1 -1
  74. package/dist/ui/assets/{StepFlowGraph-DsL5lsIq.js → StepFlowGraph-BXsWPPO0.js} +1 -1
  75. package/dist/ui/assets/{SurfaceCard-CRidnDLP.js → SurfaceCard-BzJidvvn.js} +1 -1
  76. package/dist/ui/assets/{export-skill-zip-C1bRyhE2.js → export-skill-zip-D8iQY1Dl.js} +1 -1
  77. package/dist/ui/assets/{index-CXDgvzCM.js → index-BtwABqCT.js} +3 -3
  78. package/dist/ui/assets/react-BvB9BS1T.js +9 -0
  79. package/dist/ui/assets/tiptap-CCr8bvo1.js +204 -0
  80. package/dist/ui/assets/{useRunSession-BX2U9D53.js → useRunSession-CB5wPJ8O.js} +1 -1
  81. package/dist/ui/assets/vendor-xESPQGR9.js +31 -0
  82. package/dist/ui/index.html +4 -4
  83. package/dist/utils/concurrency-limit.d.ts.map +1 -1
  84. package/dist/utils/concurrency-limit.js +3 -8
  85. package/dist/utils/concurrency-limit.js.map +1 -1
  86. package/dist/utils/log-core.d.ts.map +1 -1
  87. package/dist/utils/log-core.js +3 -1
  88. package/dist/utils/log-core.js.map +1 -1
  89. package/dist/utils/squadrules-user-dirs.d.ts +6 -8
  90. package/dist/utils/squadrules-user-dirs.d.ts.map +1 -1
  91. package/dist/utils/squadrules-user-dirs.js +10 -9
  92. package/dist/utils/squadrules-user-dirs.js.map +1 -1
  93. package/package.json +61 -114
  94. package/dist/ui/assets/react-CR5VJ85Q.js +0 -9
  95. package/dist/ui/assets/tiptap-74Cp-fci.js +0 -204
  96. 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 default for Docker Compose 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,185 +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
- > **Developers:** to run the full Docker Compose stack (Qdrant + app + optional
199
- > Keycloak / Redis / Postgres) for local development and testing, see
200
- > [CONTRIBUTING.md](CONTRIBUTING.md).
201
-
202
- ## CLI
203
-
204
- The `squadrules` CLI is installed as part of the global package (see
205
- [Install](#install) above). It provides bulk adapter operations, authentication,
206
- export/import, and server management — the same binary your MCP host uses for
207
- `squadrules serve`.
208
-
209
- ```bash
210
- squadrules --help
211
- ```
212
-
213
- See [docs/CLI.md](docs/CLI.md).
214
-
215
- ## Add SquadRules to your agent instructions
216
-
217
- This repo ships the **squadrules** skill for running protocols. Use `--list`
218
- to see what the skills registry reports for this repo.
219
-
220
- If you want agents to use SquadRules consistently, add a short repo rule or
221
- instruction such as:
222
-
223
- > SquadRules MCP is a Model Context Protocol server for persistent memory and
224
- > deterministic adapter execution. Execute protocols in this order:
225
- > **`activate`** → **`forward`** (loop per layer until `next_action` points to
226
- > **`reward`**) → **`reward`**. Echo all server-generated hashes, nonces, and
227
- > URIs exactly.
228
-
229
- ## Agent skills shipped in this repo
230
-
231
- This repository ships its agent skills under
232
- [`.agents/skills/`](.agents/skills/). Two skills are published:
233
-
234
- | Skill | Audience | Purpose |
235
- |-------|----------|---------|
236
- | `squadrules` | Users | Run SquadRules protocols; install and update guidance; bug reports |
237
- | `squadrules-dev` | Developers | Docker Compose dev environment and maintainer workflows (internal; not installed by `npx skills add`) |
238
-
239
- The former `squadrules` and `squadrules-dev` skill directories are retained for
240
- compatibility with existing installations; hosts prefer `squadrules` when both
241
- are present.
242
-
243
- Install the user skill:
68
+ Install the routing skill using a compatible skill loader, for example:
244
69
 
245
70
  ```bash
246
71
  npx skills add SquadRules/mcp --skill squadrules
247
72
  ```
248
73
 
249
- List available skills:
250
-
251
- ```bash
252
- npx skills add SquadRules/mcp --list
253
- ```
254
-
255
- Popular global installs:
256
-
257
- | Agents | Command |
258
- |--------|---------|
259
- | Cursor | `npx skills add SquadRules/mcp --skill squadrules -y -g -a cursor` |
260
- | Claude Code | `npx skills add SquadRules/mcp --skill squadrules -y -g -a claude-code` |
261
- | Cursor + Claude Code | `npx skills add SquadRules/mcp --skill squadrules -y -g -a cursor -a claude-code` |
262
-
263
- More detail: [.agents/skills/README.md](.agents/skills/README.md)
264
-
265
- ## Helm (advanced)
266
-
267
- The Helm chart for Kubernetes deployment now lives in the
268
- [`SquadRules/charts`](https://github.com/SquadRules/charts) repository and is
269
- published to `oci://ghcr.io/squadrules/charts/mcp`. See that repository for
270
- installation, values, and chart-testing details.
271
-
272
- ## Container images
273
-
274
- Container images are built, scanned, signed and published from the
275
- [`SquadRules/containers`](https://github.com/SquadRules/containers) repository,
276
- FROM the published `@squadrules/mcp` npm package, to Docker Hub
277
- (`docker.io/squadrules/mcp`) and quay.io. This repository publishes npm only;
278
- see that repository for the image pipeline, base-image OS scanning and signing.
279
-
280
- ## Documentation map
281
-
282
- - [Documentation index](docs/README.md)
283
- - [Install and environment](docs/install/README.md)
284
- - [Cursor and MCP](docs/install/README.md#cursor-and-mcp)
285
- - [CLI reference](docs/CLI.md)
286
- - [Architecture (SquadRules wiki)](https://github.com/SquadRules/mcp/wiki)
287
- - [Adapter examples](docs/examples/README.md)
288
- - [Contributing](CONTRIBUTING.md)
289
-
290
- ## Troubleshooting
291
-
292
- ### The server does not start
293
-
294
- In stdio mode SquadRules logs to **stderr** (stdout is reserved for MCP frames).
295
- Check your host's MCP log panel for the `SquadRules` server. The most common cause
296
- is Qdrant not being reachable.
297
-
298
- ### SquadRules cannot reach Qdrant
299
-
300
- SquadRules requires a Qdrant instance and only becomes healthy once Qdrant is
301
- ready. Confirm one is listening on your `QDRANT_URL` (default
302
- `http://localhost:6333`):
303
-
304
- ```bash
305
- curl http://localhost:6333/readyz
306
- ```
307
-
308
- If you run SquadRules in HTTP mode (`--transport http`), you can also check its own
309
- 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.
310
77
 
311
- ### Embeddings fail on startup
312
-
313
- By default embeddings run **locally with fastembed** — no key required — but the
314
- **first run downloads the model**, so it needs network access once (cached under
315
- `~/.config/squadrules/models`; air-gapped hosts must pre-seed it). Override the
316
- model or location with `FASTEMBED_MODEL` / `FASTEMBED_CACHE_DIR`. To use an
317
- external backend instead, set one working provider in the host `env`:
318
-
319
- - OpenAI: `OPENAI_API_KEY`
320
- - Ollama/OpenAI-compatible: `OPENAI_API_URL`, `OPENAI_EMBEDDING_MODEL`, `OPENAI_API_KEY=ollama`
321
- - TEI (deprecated): `TEI_BASE_URL` (+ optional `TEI_MODEL`)
322
-
323
- ### The CLI keeps asking for login
324
-
325
- The CLI stores tokens per API URL. Confirm that:
326
-
327
- - you are using the expected `--url` / `SQUADRULES_API_URL`
328
- - the token is still valid
329
- - Keycloak and the SquadRules server agree on issuer and audience
330
-
331
- Use:
332
-
333
- ```bash
334
- squadrules token --validate
335
- ```
78
+ ## Runtime modes
336
79
 
337
- > **Developers:** for Docker Compose, fullstack, and auth troubleshooting, see
338
- > [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. |
339
84
 
340
- ## 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`.
341
90
 
342
- - [Documentation](docs/README.md)
343
- - [Issues](https://github.com/SquadRules/mcp/issues)
344
- - [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).
345
94
 
346
- ## Trademark
95
+ ## Repository work
347
96
 
348
- SquadRules MCP™ and the SquadRules MCP logo are trademarks of the project owner.
349
- 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.
350
102
 
351
- 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.
352
106
 
353
- ## License
107
+ ## License and trademark
354
108
 
355
- 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).