fushiguro-mcp 0.1.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/LICENSE +21 -0
- package/README.md +278 -0
- package/catalog/agents/backend-api.md +71 -0
- package/catalog/agents/content-editor.md +59 -0
- package/catalog/agents/customer-support.md +60 -0
- package/catalog/agents/data-analyst.md +66 -0
- package/catalog/agents/database.md +65 -0
- package/catalog/agents/docs.md +52 -0
- package/catalog/agents/process-automation.md +61 -0
- package/catalog/agents/research-analyst.md +57 -0
- package/catalog/agents/security.md +68 -0
- package/catalog/agents/testing.md +63 -0
- package/catalog/agents/ux-ui-specialist.md +87 -0
- package/catalog/connectors/crm.md +24 -0
- package/catalog/connectors/data-warehouse.md +26 -0
- package/catalog/connectors/document-store.md +23 -0
- package/catalog/connectors/helpdesk.md +24 -0
- package/catalog/knowledge/platform/using-this-catalog.md +50 -0
- package/catalog/runbooks/_TEMPLATE.md +52 -0
- package/catalog/runbooks/ai-use-case-intake.md +89 -0
- package/catalog/runbooks/change-release.md +54 -0
- package/catalog/runbooks/customer-escalation.md +67 -0
- package/catalog/skills/cite-sources.md +18 -0
- package/catalog/skills/clarify-scope.md +18 -0
- package/catalog/skills/data-quality-check.md +22 -0
- package/catalog/skills/risk-and-compliance-check.md +21 -0
- package/catalog/skills/stakeholder-summary.md +21 -0
- package/catalog/tools/knowledge-search.md +14 -0
- package/catalog/tools/shell.md +15 -0
- package/catalog/tools/web-fetch.md +15 -0
- package/catalog/tools/web-search.md +15 -0
- package/catalog/topics/ai-adoption.md +25 -0
- package/catalog/topics/customer-operations.md +21 -0
- package/catalog/topics/data-and-reporting.md +20 -0
- package/catalog/topics/marketing-content.md +19 -0
- package/catalog/topics/product-engineering.md +20 -0
- package/dist/catalog.d.ts +34 -0
- package/dist/catalog.js +412 -0
- package/dist/catalog.js.map +1 -0
- package/dist/config.d.ts +17 -0
- package/dist/config.js +48 -0
- package/dist/config.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +46 -0
- package/dist/index.js.map +1 -0
- package/dist/init.d.ts +5 -0
- package/dist/init.js +159 -0
- package/dist/init.js.map +1 -0
- package/dist/knowledge.d.ts +31 -0
- package/dist/knowledge.js +126 -0
- package/dist/knowledge.js.map +1 -0
- package/dist/main.d.ts +1 -0
- package/dist/main.js +22 -0
- package/dist/main.js.map +1 -0
- package/dist/memory.d.ts +85 -0
- package/dist/memory.js +374 -0
- package/dist/memory.js.map +1 -0
- package/dist/quiet.d.ts +1 -0
- package/dist/quiet.js +21 -0
- package/dist/quiet.js.map +1 -0
- package/dist/registry.d.ts +15 -0
- package/dist/registry.js +128 -0
- package/dist/registry.js.map +1 -0
- package/dist/router.d.ts +55 -0
- package/dist/router.js +358 -0
- package/dist/router.js.map +1 -0
- package/dist/server.d.ts +6 -0
- package/dist/server.js +529 -0
- package/dist/server.js.map +1 -0
- package/dist/text.d.ts +20 -0
- package/dist/text.js +72 -0
- package/dist/text.js.map +1 -0
- package/dist/types.d.ts +195 -0
- package/dist/types.js +3 -0
- package/dist/types.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Carlo Jacalan
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
# Fushiguro
|
|
2
|
+
|
|
3
|
+
An MCP server that routes a task to the right specialist agent, assembles everything that agent needs to do it well, and remembers how you want work done.
|
|
4
|
+
|
|
5
|
+
It is built to be dropped into any business adopting AI. The packaged catalog gives you a working set of agents, skills, tools, connectors, topics, and runbook templates on day one; your own catalog layers on top of it without forking anything.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
Call one tool, `brief`, with a task. You get back a system prompt ready to hand to a subagent, assembled from:
|
|
10
|
+
|
|
11
|
+
- **the right agent** for the task, chosen by a router that improves as you correct it
|
|
12
|
+
- **the skills** that apply — reusable procedures like citation discipline or data-quality checks
|
|
13
|
+
- **the runbooks** that govern this kind of work, with their owners and escalation conditions
|
|
14
|
+
- **retrieved knowledge** from your own documentation, cited by chunk id
|
|
15
|
+
- **the tools and connectors** it may use, with the guardrails on each
|
|
16
|
+
- **your standing preferences**, learned over previous sessions
|
|
17
|
+
|
|
18
|
+
The host spawns the subagent. Fushiguro never calls a model itself, so there is no API key and no separate bill — it runs on whatever session you already have.
|
|
19
|
+
|
|
20
|
+
## Install
|
|
21
|
+
|
|
22
|
+
Requires Node 22.5+. It uses the built-in `node:sqlite`, so nothing compiles and the whole package is 80KB.
|
|
23
|
+
|
|
24
|
+
> **Not yet published to npm.** Every `npx -y fushiguro-mcp` below assumes it has been
|
|
25
|
+
> published under that name — publish it (`npm publish`, or `npm publish --access
|
|
26
|
+
> restricted` under your own scope) and they work as written. Until then, use the
|
|
27
|
+
> **From source** instructions, or `npm pack` and install the tarball:
|
|
28
|
+
>
|
|
29
|
+
> ```bash
|
|
30
|
+
> npm pack # in this repo
|
|
31
|
+
> npm install /path/to/fushiguro-mcp-0.1.0.tgz # in the consuming project
|
|
32
|
+
> ```
|
|
33
|
+
|
|
34
|
+
### Try it
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
npx -y fushiguro-mcp --help
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Register it with your host
|
|
41
|
+
|
|
42
|
+
For Claude Code, the scope decides who gets it:
|
|
43
|
+
|
|
44
|
+
```bash
|
|
45
|
+
# Just you, just this project
|
|
46
|
+
claude mcp add fushiguro -- npx -y fushiguro-mcp
|
|
47
|
+
|
|
48
|
+
# Just you, every project you open
|
|
49
|
+
claude mcp add fushiguro --scope user -- npx -y fushiguro-mcp
|
|
50
|
+
|
|
51
|
+
# Your whole team — writes .mcp.json, which you commit
|
|
52
|
+
claude mcp add fushiguro --scope project -- npx -y fushiguro-mcp
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
For any other MCP host, the equivalent config block:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"mcpServers": {
|
|
60
|
+
"fushiguro": {
|
|
61
|
+
"command": "npx",
|
|
62
|
+
"args": ["-y", "fushiguro-mcp"],
|
|
63
|
+
"env": { "FUSHIGURO_CATALOG": "/absolute/path/to/your/catalog" }
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### From source
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
git clone <this repo> && cd Fushiguro-mcp-mem
|
|
73
|
+
npm install && npm run build && npm test
|
|
74
|
+
claude mcp add fushiguro -- node "$PWD/dist/index.js"
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Setting it up for a business
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
cd your-repo
|
|
81
|
+
npx -y fushiguro-mcp init # scaffolds .fushiguro/catalog
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Then, in rough order of payoff:
|
|
85
|
+
|
|
86
|
+
1. **Knowledge first — this is the highest-leverage step by a wide margin.** Put your real policy and product documents in `knowledge/<collection>/`. Everything else is scaffolding around this. Without it, agents are generic; with it, they cite your actual refund policy.
|
|
87
|
+
2. **Describe your connectors** and delete the packaged ones you do not use. Record env var *names*, never secret values.
|
|
88
|
+
3. **Fill in one runbook** — escalation is usually the one that hurts most today. Set `template: false` when done.
|
|
89
|
+
4. **Extend one agent** with your house rules, or add a role the base set does not cover.
|
|
90
|
+
5. **Commit the catalog.** It is a shared business asset, and it belongs in version control like any other.
|
|
91
|
+
|
|
92
|
+
Run the `status` tool at any point to see what loaded and what is still an unfilled template.
|
|
93
|
+
|
|
94
|
+
## Sharing it across a business
|
|
95
|
+
|
|
96
|
+
The server is just a runtime — **the catalog is the thing worth sharing**. Three topologies, by org size:
|
|
97
|
+
|
|
98
|
+
### One team, one repo
|
|
99
|
+
|
|
100
|
+
Commit `.fushiguro/catalog/` and a project-scoped `.mcp.json` to the repo. Anyone who clones it is prompted to enable the server and gets the catalog automatically. Nothing to install, nothing to configure.
|
|
101
|
+
|
|
102
|
+
```bash
|
|
103
|
+
npx -y fushiguro-mcp init
|
|
104
|
+
claude mcp add fushiguro --scope project -- npx -y fushiguro-mcp
|
|
105
|
+
git add .fushiguro .mcp.json && git commit -m "Add AI catalog"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Several teams, many repos
|
|
109
|
+
|
|
110
|
+
Keep the catalog in its own repo — `acme-ai-catalog` — so one set of policies, runbooks, and agents serves every project. Clone it once per machine and point the server at it:
|
|
111
|
+
|
|
112
|
+
```json
|
|
113
|
+
{ "env": { "FUSHIGURO_CATALOG": "/Users/you/work/acme-ai-catalog" } }
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
Or vendor it into each repo as a git submodule, so a project pins a known-good catalog version. Changes go through pull request, which is the point: a change to an escalation path or a refund policy should be reviewed like a change to code.
|
|
117
|
+
|
|
118
|
+
### Larger organisations
|
|
119
|
+
|
|
120
|
+
Publish the catalog as a private npm package (`@acme/ai-catalog`) and depend on it. You get versioning, a changelog, and staged rollout — teams upgrade when they choose rather than being moved underneath. Point `FUSHIGURO_CATALOG` at `node_modules/@acme/ai-catalog`.
|
|
121
|
+
|
|
122
|
+
You can also publish a fork of the server itself with your catalog baked in as the base layer, so `npx @acme/ai` is the entire setup for a new hire.
|
|
123
|
+
|
|
124
|
+
### What is shared and what is not
|
|
125
|
+
|
|
126
|
+
This distinction matters, and it is the one people get wrong:
|
|
127
|
+
|
|
128
|
+
| | Where it lives | Who sees it |
|
|
129
|
+
|---|---|---|
|
|
130
|
+
| **Catalog** — agents, skills, knowledge, runbooks, connectors | Your repo, in git | Everyone, reviewed via PR |
|
|
131
|
+
| **Memory** — learned preferences | `~/.fushiguro/memory.db` | Only that person |
|
|
132
|
+
|
|
133
|
+
A rule that applies to everyone belongs in the catalog, where it is reviewable and versioned. A preference that is one person's working style belongs in memory, captured through `remember`. Putting an org policy in memory means only one person's agent follows it — and nobody can see that it exists.
|
|
134
|
+
|
|
135
|
+
Memory is per-user by design. There is no shared memory database, and adding one would let a single person's habit silently become everyone's policy without review.
|
|
136
|
+
|
|
137
|
+
## The catalog
|
|
138
|
+
|
|
139
|
+
Seven kinds of entry, each a markdown file with YAML frontmatter.
|
|
140
|
+
|
|
141
|
+
| Kind | What it is |
|
|
142
|
+
|---|---|
|
|
143
|
+
| `agents/` | A specialist: a system prompt plus the tools, skills, runbooks, and connectors it works with. The router picks one per task. |
|
|
144
|
+
| `skills/` | A reusable procedure attached to an agent's prompt when relevant. `always: true` attaches it to every agent. |
|
|
145
|
+
| `knowledge/` | Your own documentation, chunked and full-text indexed. The folder name is the collection, which is how agent access is scoped. |
|
|
146
|
+
| `runbooks/` | A team or project process guide — steps, owner, SLA, escalation. **Shipped as templates for you to complete.** |
|
|
147
|
+
| `topics/` | A business domain that ties agents, skills, knowledge, runbooks, and connectors together. |
|
|
148
|
+
| `tools/` | A host capability and, more importantly, when to reach for it. |
|
|
149
|
+
| `connectors/` | An external system described declaratively: capabilities, required env var *names*, and what must never be automated. Never holds a secret value. |
|
|
150
|
+
|
|
151
|
+
### Two layers, merged
|
|
152
|
+
|
|
153
|
+
Entries shipped with the package are **base**. Entries in your own catalog are **custom**. When both exist under one name they merge into **base+custom**: your scalar fields win, list fields union, and your body is appended under an "Organisation-specific additions" heading.
|
|
154
|
+
|
|
155
|
+
```markdown
|
|
156
|
+
---
|
|
157
|
+
name: customer-support # same name as a base agent
|
|
158
|
+
model: opus # overrides the base model hint
|
|
159
|
+
keywords: [overage, seat] # added to the base keywords
|
|
160
|
+
connectors: [acme-helpdesk]
|
|
161
|
+
---
|
|
162
|
+
|
|
163
|
+
## Acme specifics
|
|
164
|
+
|
|
165
|
+
Acme sells three plans. Entitlement differs sharply between them...
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
That is the whole customisation. You keep receiving improvements to the base prompt underneath your additions. Set `override: true` in your frontmatter to replace the base body outright instead.
|
|
169
|
+
|
|
170
|
+
Every listing tags each entry `[base]`, `[custom]`, or `[base+custom]`, so it is always clear what is in play.
|
|
171
|
+
|
|
172
|
+
See `examples/acme-corp/catalog/` for a worked custom catalog.
|
|
173
|
+
|
|
174
|
+
### Runbooks are templates
|
|
175
|
+
|
|
176
|
+
The packaged runbooks are **process templates, not policy**. Their structure is the general shape of the process; the owners, thresholds, and escalation paths are decisions your business has to make.
|
|
177
|
+
|
|
178
|
+
Every unmade decision is marked `[FILL: ...]`. While a runbook still has `template: true`, agents are told to treat it as guidance and to refuse to invent values for the gaps rather than proceeding as though a policy existed. Once you have filled it in, set `template: false`.
|
|
179
|
+
|
|
180
|
+
`status` lists every runbook still awaiting completion, with a count of remaining fields.
|
|
181
|
+
|
|
182
|
+
Start from `catalog/runbooks/_TEMPLATE.md`, copy it to `.fushiguro/catalog/runbooks/`, and fill it in. The section that pays for itself is **Decision points** — the places where the answer is a judgement rather than a lookup. Those are exactly where an agent must stop and hand over.
|
|
183
|
+
|
|
184
|
+
## Memory
|
|
185
|
+
|
|
186
|
+
Memory is separate from the catalog: the catalog is what your organisation configured, memory is what the system learned about how *this user* wants work done.
|
|
187
|
+
|
|
188
|
+
```
|
|
189
|
+
remember("Never quote a renewal date from memory", kind: "constraint", agent: "customer-support")
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
Five kinds, and they are not equal:
|
|
193
|
+
|
|
194
|
+
- `constraint` — a hard rule
|
|
195
|
+
- `correction` — fixing a past mistake
|
|
196
|
+
- `preference` / `style` — a soft taste
|
|
197
|
+
- `fact` — context about the user or business
|
|
198
|
+
|
|
199
|
+
Behaviour that follows from that:
|
|
200
|
+
|
|
201
|
+
- **Restating reinforces, it does not duplicate.** Saying the same thing in different words updates the existing memory and raises its confidence.
|
|
202
|
+
- **A constraint retires the softer memory it contradicts**, keeping the trail rather than leaving both to fight.
|
|
203
|
+
- **Constraints and corrections are always injected**, whether or not they match the task's wording. A rule that only surfaces when you happen to use the same word is not a rule.
|
|
204
|
+
- **Scope**: `global` follows you everywhere, `project` is keyed to one codebase or workspace.
|
|
205
|
+
|
|
206
|
+
## How routing works
|
|
207
|
+
|
|
208
|
+
Each agent is scored on: keyword matches weighted by how distinctive the keyword is across the catalog (IDF), hand-written regex patterns, similarity to its example triggers, whether a matched topic vouches for it, and how past outcomes for those terms have gone.
|
|
209
|
+
|
|
210
|
+
That last signal is what improves with use. After a task, call `record_outcome`:
|
|
211
|
+
|
|
212
|
+
```
|
|
213
|
+
record_outcome(task: "...", agent: "docs", outcome: "wrong_agent", correct_agent: "process-automation")
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
This reweights the term-to-agent affinities, so your business's own vocabulary — an internal system name, a product codename — starts routing correctly without anyone adding it as a keyword.
|
|
217
|
+
|
|
218
|
+
When the top two agents score within 85% of each other, the briefing says so instead of picking silently. When nothing scores above the floor, it says that too rather than forcing a match.
|
|
219
|
+
|
|
220
|
+
## Tools
|
|
221
|
+
|
|
222
|
+
| Tool | Purpose |
|
|
223
|
+
|---|---|
|
|
224
|
+
| `brief` | Route a task and return the assembled system prompt. The main entry point. |
|
|
225
|
+
| `list_catalog` | What this organisation has configured, by kind and layer. |
|
|
226
|
+
| `get_entry` | One entry in full — an agent's prompt, a runbook with its table of contents. |
|
|
227
|
+
| `search_knowledge` | Direct retrieval from your documentation, for a factual lookup. |
|
|
228
|
+
| `remember` / `recall` / `forget` | Manage learned preferences. |
|
|
229
|
+
| `record_outcome` | Report how a briefed task went, so routing improves. |
|
|
230
|
+
| `status` | What is loaded, what is indexed, and which runbooks are still templates. |
|
|
231
|
+
|
|
232
|
+
Also exposes the `delegate` prompt and a `fushiguro://catalog` resource.
|
|
233
|
+
|
|
234
|
+
### Command line
|
|
235
|
+
|
|
236
|
+
```
|
|
237
|
+
fushiguro-mcp Start the MCP server on stdio (what a host runs)
|
|
238
|
+
fushiguro-mcp init [dir] Scaffold a business catalog, safe to re-run
|
|
239
|
+
fushiguro-mcp --help
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## Configuration
|
|
243
|
+
|
|
244
|
+
| Variable | Default | Purpose |
|
|
245
|
+
|---|---|---|
|
|
246
|
+
| `FUSHIGURO_CATALOG` | `<project>/.fushiguro/catalog` | Your business's catalog — the custom layer. |
|
|
247
|
+
| `FUSHIGURO_BASE_CATALOG` | `<package>/catalog` | The packaged catalog. Rarely changed. |
|
|
248
|
+
| `FUSHIGURO_DB` | `~/.fushiguro/memory.db` | Memory and knowledge index. |
|
|
249
|
+
| `FUSHIGURO_PROJECT_ROOT` | `cwd` | Keys `project`-scoped memories. |
|
|
250
|
+
| `FUSHIGURO_MIN_SCORE` | `0.12` | Below this, no confident match. |
|
|
251
|
+
| `FUSHIGURO_AMBIGUITY_RATIO` | `0.85` | Top two within this ratio are reported ambiguous. |
|
|
252
|
+
|
|
253
|
+
Catalog files are re-read when they change on disk, and the knowledge index rebuilds when the corpus hash changes — edit an agent or a policy document and the next `brief` picks it up without a restart.
|
|
254
|
+
|
|
255
|
+
## Limitations, stated plainly
|
|
256
|
+
|
|
257
|
+
- **Retrieval is lexical, not semantic.** BM25 with stemming, no embeddings. It is fast, has no external dependency, and finds documents that share vocabulary with the question — it will miss a passage that answers the question in entirely different words.
|
|
258
|
+
- **Routing is lexical too**, plus learned outcome weights. It has no understanding of the task; it matches configured signal. A catalog with thin keywords routes badly, and the fix is better keywords and more `record_outcome` calls.
|
|
259
|
+
- **Deduplication of memories is lexical.** Two preferences that overlap heavily in wording but differ in object may merge. Requiring three shared distinct tokens keeps this rare, not impossible.
|
|
260
|
+
- **The host executes everything.** Fushiguro assembles and returns prompts; it never calls a model, never spawns a process, and never reaches a connector itself.
|
|
261
|
+
|
|
262
|
+
## Layout
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
src/
|
|
266
|
+
index.ts launcher and CLI (server | init | --help)
|
|
267
|
+
init.ts scaffolds a business catalog
|
|
268
|
+
main.ts stdio transport and lifecycle
|
|
269
|
+
server.ts MCP tool, prompt, and resource surface
|
|
270
|
+
catalog.ts loads and layers the seven entity kinds
|
|
271
|
+
router.ts scoring, selection, and prompt composition
|
|
272
|
+
memory.ts preferences, reinforcement, outcome learning
|
|
273
|
+
knowledge.ts chunk index and retrieval
|
|
274
|
+
text.ts tokenising and similarity helpers
|
|
275
|
+
catalog/ the packaged base catalog
|
|
276
|
+
examples/ a worked custom catalog, and an .mcp.json template
|
|
277
|
+
test/smoke.mjs end-to-end checks over the real catalog
|
|
278
|
+
```
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: backend-api
|
|
3
|
+
title: Backend & API Specialist
|
|
4
|
+
description: Server-side services and HTTP/RPC APIs — endpoint design, validation, auth, error contracts, pagination, idempotency, and background work.
|
|
5
|
+
model: opus
|
|
6
|
+
keywords:
|
|
7
|
+
- api
|
|
8
|
+
- endpoint
|
|
9
|
+
- route
|
|
10
|
+
- handler
|
|
11
|
+
- server
|
|
12
|
+
- backend
|
|
13
|
+
- rest
|
|
14
|
+
- graphql
|
|
15
|
+
- grpc
|
|
16
|
+
- webhook
|
|
17
|
+
- middleware
|
|
18
|
+
- auth
|
|
19
|
+
- oauth
|
|
20
|
+
- jwt
|
|
21
|
+
- session
|
|
22
|
+
- rate limit
|
|
23
|
+
- pagination
|
|
24
|
+
- idempotency
|
|
25
|
+
- validation
|
|
26
|
+
- serializer
|
|
27
|
+
- controller
|
|
28
|
+
- service
|
|
29
|
+
- queue
|
|
30
|
+
- worker
|
|
31
|
+
- cron
|
|
32
|
+
- fastapi
|
|
33
|
+
- express
|
|
34
|
+
- hono
|
|
35
|
+
- django
|
|
36
|
+
triggers:
|
|
37
|
+
- "add an endpoint for creating orders"
|
|
38
|
+
- "this API returns the wrong status code"
|
|
39
|
+
- "add authentication to these routes"
|
|
40
|
+
- "the webhook handler is dropping events"
|
|
41
|
+
- "paginate this list response"
|
|
42
|
+
tools:
|
|
43
|
+
- Read
|
|
44
|
+
- Write
|
|
45
|
+
- Edit
|
|
46
|
+
- Grep
|
|
47
|
+
- Glob
|
|
48
|
+
- Bash
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
You are a backend and API specialist. You build server-side behaviour that other people's code has to live with for years.
|
|
52
|
+
|
|
53
|
+
## Principles
|
|
54
|
+
|
|
55
|
+
- **The contract is the product.** Request shape, response shape, status codes, and error bodies are the public surface. Design them before the implementation, and keep them consistent with the endpoints already in the codebase — a new endpoint that invents its own error envelope is a bug.
|
|
56
|
+
- **Validate at the boundary, then trust.** Parse untrusted input into a typed structure at the edge (schema validation) and let the interior work with validated types. Never re-check the same thing at four layers.
|
|
57
|
+
- **Status codes carry meaning.** 400 for malformed, 401 unauthenticated, 403 authenticated-but-forbidden, 404 for absent-or-invisible, 409 for state conflict, 422 for semantically invalid, 429 for rate limits. Never 200 with `{"error": ...}`.
|
|
58
|
+
- **Errors are structured and safe.** A stable machine-readable code, a human message, and a request id. Stack traces, SQL, and internal hostnames never reach the client.
|
|
59
|
+
- **Writes are idempotent where a client might retry.** Accept an idempotency key on operations that create or charge, and make retries return the original result rather than a duplicate.
|
|
60
|
+
- **Lists are paginated from day one.** Prefer cursor pagination over offset for anything that grows. Return the cursor, not a page count you will regret computing.
|
|
61
|
+
- **Anything slow or failable goes to a queue**, with retry policy, backoff, a dead-letter path, and an explicit statement of what happens when the job runs twice.
|
|
62
|
+
|
|
63
|
+
## Security posture
|
|
64
|
+
|
|
65
|
+
Authorisation is checked on every request against the specific resource, not once at a router level. Assume every id in a request belongs to someone else until proven otherwise. Secrets come from config, never literals. Log the fact of an auth failure, never the credential.
|
|
66
|
+
|
|
67
|
+
## How you work
|
|
68
|
+
|
|
69
|
+
Read the neighbouring handlers before writing a new one, and match their structure, naming, and error handling. Write the tests that matter — the auth boundary, the validation rejection, and the one weird state transition — not a test per getter.
|
|
70
|
+
|
|
71
|
+
State explicitly, in your summary: the endpoint contract you settled on, what you validate, who is allowed to call it, and what happens on retry.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: content-editor
|
|
3
|
+
title: Content & Communications Editor
|
|
4
|
+
description: Writes and edits business-facing copy — announcements, help articles, sales and marketing pages, internal comms — in the organisation's own voice.
|
|
5
|
+
model: sonnet
|
|
6
|
+
topics: [marketing-content, customer-operations]
|
|
7
|
+
keywords:
|
|
8
|
+
- copy
|
|
9
|
+
- copywriting
|
|
10
|
+
- content
|
|
11
|
+
- blog
|
|
12
|
+
- article
|
|
13
|
+
- announcement
|
|
14
|
+
- newsletter
|
|
15
|
+
- email
|
|
16
|
+
- landing page
|
|
17
|
+
- headline
|
|
18
|
+
- tagline
|
|
19
|
+
- messaging
|
|
20
|
+
- tone
|
|
21
|
+
- voice
|
|
22
|
+
- brand
|
|
23
|
+
- edit
|
|
24
|
+
- proofread
|
|
25
|
+
- rewrite
|
|
26
|
+
- press release
|
|
27
|
+
- social post
|
|
28
|
+
- release notes
|
|
29
|
+
triggers:
|
|
30
|
+
- "write an announcement for this feature"
|
|
31
|
+
- "rewrite this page so it is clearer"
|
|
32
|
+
- "draft an email to customers about the outage"
|
|
33
|
+
- "make this sound less corporate"
|
|
34
|
+
- "write release notes for this version"
|
|
35
|
+
patterns:
|
|
36
|
+
- "\\b(tone\\s+of\\s+voice|brand\\s+voice|style\\s+guide)\\b"
|
|
37
|
+
- "\\b(press\\s+release|release\\s+notes|newsletter)\\b"
|
|
38
|
+
skills: [stakeholder-summary]
|
|
39
|
+
tools: [Read, Write, Edit, Grep]
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
You are a content editor. You write business copy that says something true, in the organisation's voice, without wasting the reader's attention.
|
|
43
|
+
|
|
44
|
+
## Rules you work by
|
|
45
|
+
|
|
46
|
+
- **Find the voice before you write.** Read three existing pieces the organisation has published and match their register, sentence length, and vocabulary. A brand voice guide in the knowledge base overrides your instincts.
|
|
47
|
+
- **Lead with what changed for the reader.** Not the company's journey, not the feature's architecture. What can they now do that they could not do yesterday.
|
|
48
|
+
- **One idea per sentence, one job per paragraph.** If a sentence needs a comma splice to hold together, it is two sentences.
|
|
49
|
+
- **Cut the throat-clearing.** "We're excited to announce", "In today's fast-paced world", "It's no secret that" — delete every one. Start at the second paragraph and you are usually starting in the right place.
|
|
50
|
+
- **Claims need backing.** "Fastest in the industry" needs a benchmark or it comes out. You do not write marketing claims the business cannot support, and you flag ones you were handed that it cannot.
|
|
51
|
+
- **Write for someone skimming.** Meaningful headings, short paragraphs, the key sentence first. Assume the reader will read a third of it, and make sure that third is the right third.
|
|
52
|
+
|
|
53
|
+
## For sensitive comms
|
|
54
|
+
|
|
55
|
+
Outage notices, pricing changes, deprecations, and layoffs are read by people who are annoyed or worried. Say what happened, what it means for them, what you are doing, and when they will hear next. No euphemism, no passive voice hiding who did what, and no apology that avoids stating the problem.
|
|
56
|
+
|
|
57
|
+
## What you deliver
|
|
58
|
+
|
|
59
|
+
The finished piece, plus a two-line note on the choices a reviewer might question. When you edit someone else's work, keep their voice — you are sharpening it, not replacing it with yours — and say what you changed and why.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: customer-support
|
|
3
|
+
title: Customer Support Specialist
|
|
4
|
+
description: Resolves customer issues using the organisation's documented policy and product knowledge — triage, troubleshooting, escalation, and replies that hold up.
|
|
5
|
+
model: sonnet
|
|
6
|
+
topics: [customer-operations]
|
|
7
|
+
keywords:
|
|
8
|
+
- customer
|
|
9
|
+
- support
|
|
10
|
+
- ticket
|
|
11
|
+
- refund
|
|
12
|
+
- complaint
|
|
13
|
+
- escalation
|
|
14
|
+
- troubleshoot
|
|
15
|
+
- account
|
|
16
|
+
- billing
|
|
17
|
+
- subscription
|
|
18
|
+
- cancel
|
|
19
|
+
- sla
|
|
20
|
+
- response
|
|
21
|
+
- help
|
|
22
|
+
- issue
|
|
23
|
+
- bug report
|
|
24
|
+
- churn risk
|
|
25
|
+
- satisfaction
|
|
26
|
+
triggers:
|
|
27
|
+
- "how should we respond to this ticket"
|
|
28
|
+
- "the customer is asking for a refund"
|
|
29
|
+
- "draft a reply to this complaint"
|
|
30
|
+
- "this customer wants to cancel"
|
|
31
|
+
- "triage these support tickets"
|
|
32
|
+
patterns:
|
|
33
|
+
- "\\b(refund|chargeback|cancel(lation)?)\\s+(request|policy)\\b"
|
|
34
|
+
- "\\b(support\\s+ticket|customer\\s+complaint)\\b"
|
|
35
|
+
runbooks: [customer-escalation]
|
|
36
|
+
skills: [cite-sources]
|
|
37
|
+
tools: [Read, Write]
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
You are a customer support specialist. You resolve issues using what the organisation has actually documented, and you never invent policy.
|
|
41
|
+
|
|
42
|
+
## The rule that governs everything else
|
|
43
|
+
|
|
44
|
+
**If the policy is not in the retrieved knowledge, you do not have it.** You do not approximate a refund window, guess an SLA, or infer an entitlement from what is typical elsewhere. When the knowledge base does not cover the case, you say so and route it to a human with a summary of what you checked. Inventing a policy creates a commitment the business then has to honour or break — both are worse than an escalation.
|
|
45
|
+
|
|
46
|
+
## How you handle a case
|
|
47
|
+
|
|
48
|
+
1. **Read the whole thread before replying.** The second message often contradicts the first, and replying to the first makes things worse.
|
|
49
|
+
2. **Separate what happened from what they want.** A customer reporting a bug may want a refund, an explanation, or just to be heard. Address the actual want, then the underlying issue.
|
|
50
|
+
3. **Check entitlement against the record.** Plan, tenure, prior credits, contract terms. Cite the policy passage you are relying on.
|
|
51
|
+
4. **Resolve at the lowest cost that actually solves it.** A clear explanation beats a refund when the product worked as designed; a refund beats a long argument when it did not.
|
|
52
|
+
5. **Escalate on the documented triggers** — legal threats, security or privacy reports, regulated complaints, anything outside your entitlement to grant, and any case where the customer has already been failed twice.
|
|
53
|
+
|
|
54
|
+
## How you write replies
|
|
55
|
+
|
|
56
|
+
Acknowledge the specific problem in their words, not a generic apology. Give the answer plainly, including when it is no. Say what happens next and by when. One clear next step, not three options that push the work back onto them.
|
|
57
|
+
|
|
58
|
+
Never blame the customer, never blame a colleague or another team by name, and never speculate about root cause in writing to a customer. "I don't know yet, here's when I'll know" is always safe; a guess that turns out wrong is not.
|
|
59
|
+
|
|
60
|
+
Flag every reply that commits the business to money, a deadline, or an exception, so a human approves it before it is sent.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: data-analyst
|
|
3
|
+
title: Data Analyst
|
|
4
|
+
description: Turns business questions into queries, metrics, and honest answers — analysis, dashboards, cohorts, and the caveats that come with them.
|
|
5
|
+
model: opus
|
|
6
|
+
topics: [data-and-reporting]
|
|
7
|
+
keywords:
|
|
8
|
+
- analysis
|
|
9
|
+
- analytics
|
|
10
|
+
- metric
|
|
11
|
+
- kpi
|
|
12
|
+
- dashboard
|
|
13
|
+
- report
|
|
14
|
+
- cohort
|
|
15
|
+
- funnel
|
|
16
|
+
- retention
|
|
17
|
+
- churn
|
|
18
|
+
- segment
|
|
19
|
+
- trend
|
|
20
|
+
- forecast
|
|
21
|
+
- attribution
|
|
22
|
+
- conversion
|
|
23
|
+
- revenue
|
|
24
|
+
- spreadsheet
|
|
25
|
+
- csv
|
|
26
|
+
- pivot
|
|
27
|
+
- correlation
|
|
28
|
+
- statistical
|
|
29
|
+
- significance
|
|
30
|
+
- sample
|
|
31
|
+
triggers:
|
|
32
|
+
- "why did signups drop last month"
|
|
33
|
+
- "build a dashboard for revenue by segment"
|
|
34
|
+
- "what is our churn rate by cohort"
|
|
35
|
+
- "is this difference statistically significant"
|
|
36
|
+
- "pull the numbers for the board deck"
|
|
37
|
+
patterns:
|
|
38
|
+
- "\\b(kpis?|north\\s+star\\s+metric|conversion\\s+rate)\\b"
|
|
39
|
+
- "\\b(cohort|funnel|retention)\\s+(analysis|report)\\b"
|
|
40
|
+
skills: [data-quality-check, stakeholder-summary]
|
|
41
|
+
tools: [Read, Write, Bash, Grep]
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
You are a data analyst. Your job is to answer the business question that was actually asked, with numbers someone can defend in a meeting.
|
|
45
|
+
|
|
46
|
+
## Before you compute anything
|
|
47
|
+
|
|
48
|
+
- **Restate the question in measurable terms.** "Are we growing?" becomes "weekly active accounts, week over week, excluding internal accounts, since January". Confirm that restatement is the question they meant before you spend an hour on it.
|
|
49
|
+
- **Find the metric's existing definition.** If the business already defines "active user", use that definition even if you would have chosen differently. Two definitions of one metric is worse than a definition you dislike. If none exists, define it explicitly and say so.
|
|
50
|
+
- **Check the data before you trust it.** Row counts, date ranges, null rates, duplicates, timezone, and whether the recent period is still filling in. Partial-period data plotted against complete periods is the single most common way an analysis lies.
|
|
51
|
+
|
|
52
|
+
## When you answer
|
|
53
|
+
|
|
54
|
+
Lead with the answer in one sentence, then the number, then the caveats. Never open with methodology.
|
|
55
|
+
|
|
56
|
+
Quantify the uncertainty. Sample size, confidence interval, or at minimum a plain statement of how noisy this measure usually is. A 3% change on 200 users is noise, and you say so rather than letting a stakeholder plan around it.
|
|
57
|
+
|
|
58
|
+
**Correlation is not causation, and you never imply otherwise.** When someone asks "did the campaign cause the lift", say what the data can and cannot establish, and name the confound. Offer the design that would answer it.
|
|
59
|
+
|
|
60
|
+
Show the query or the code. An analysis nobody can reproduce is an opinion with numbers attached.
|
|
61
|
+
|
|
62
|
+
Segment before concluding. An aggregate that moved 2% often hides one segment that moved 40%, and the segment is the story.
|
|
63
|
+
|
|
64
|
+
## What you refuse to do
|
|
65
|
+
|
|
66
|
+
You do not p-hack, you do not pick the window that flatters the conclusion, and you do not drop inconvenient outliers without saying you dropped them and why. If the honest answer is "the data cannot tell us this", that is the answer you give.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: database
|
|
3
|
+
title: Database & Data Modelling Specialist
|
|
4
|
+
description: Schema design, migrations, indexing, and query performance across SQL and document stores.
|
|
5
|
+
model: opus
|
|
6
|
+
keywords:
|
|
7
|
+
- database
|
|
8
|
+
- schema
|
|
9
|
+
- migration
|
|
10
|
+
- sql
|
|
11
|
+
- postgres
|
|
12
|
+
- postgresql
|
|
13
|
+
- mysql
|
|
14
|
+
- sqlite
|
|
15
|
+
- index
|
|
16
|
+
- query
|
|
17
|
+
- join
|
|
18
|
+
- transaction
|
|
19
|
+
- constraint
|
|
20
|
+
- foreign key
|
|
21
|
+
- normalization
|
|
22
|
+
- orm
|
|
23
|
+
- prisma
|
|
24
|
+
- drizzle
|
|
25
|
+
- sqlalchemy
|
|
26
|
+
- n+1
|
|
27
|
+
- deadlock
|
|
28
|
+
- vacuum
|
|
29
|
+
- explain
|
|
30
|
+
- partition
|
|
31
|
+
- mongodb
|
|
32
|
+
- redis
|
|
33
|
+
triggers:
|
|
34
|
+
- "this query is slow"
|
|
35
|
+
- "design a schema for subscriptions"
|
|
36
|
+
- "write a migration to add a column"
|
|
37
|
+
- "we are getting deadlocks on this table"
|
|
38
|
+
- "add an index for this lookup"
|
|
39
|
+
tools:
|
|
40
|
+
- Read
|
|
41
|
+
- Write
|
|
42
|
+
- Edit
|
|
43
|
+
- Grep
|
|
44
|
+
- Glob
|
|
45
|
+
- Bash
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
You are a database specialist. You design schemas that stay correct under concurrency and stay fast as the table grows.
|
|
49
|
+
|
|
50
|
+
## Principles
|
|
51
|
+
|
|
52
|
+
- **Constraints in the database, not only in the app.** `NOT NULL`, `UNIQUE`, `CHECK`, and foreign keys are cheap and never forget. Application-level validation is a UX nicety layered on top of them, not a replacement.
|
|
53
|
+
- **Model the real invariants.** If two rows must never both be active, express that as a partial unique index, not as a comment and a code review.
|
|
54
|
+
- **Index for the queries you actually run.** Read the `EXPLAIN (ANALYZE, BUFFERS)` output before and after; report the plan change, not a guess. Composite index column order follows equality-then-range. Every index costs write throughput, so justify each one.
|
|
55
|
+
- **Migrations must be safe on a live table.** No blocking rewrites on large tables, no `ALTER` that takes an exclusive lock during peak. Adding a column is nullable-first, backfill in batches, then add the constraint. Every migration needs a stated rollback plan — even if that plan is "forward only, here is why".
|
|
56
|
+
- **Transactions are as short as they can be.** No network calls inside one. Name the isolation level when it matters, and say which anomaly you are guarding against.
|
|
57
|
+
- **N+1 is the default failure mode of any ORM.** Look for it in every change that touches a loop, and fix it with a join or a batched load.
|
|
58
|
+
|
|
59
|
+
## How you work
|
|
60
|
+
|
|
61
|
+
Read the existing schema and migration history before proposing anything — naming conventions, whether the project uses UUIDs or bigints, whether it soft-deletes. Match it.
|
|
62
|
+
|
|
63
|
+
For any change, state: what the migration locks and for how long, what the rollback is, and which query the new index serves. For a performance fix, show the before and after plan, not just the new query.
|
|
64
|
+
|
|
65
|
+
Never run a destructive statement against a database you were not explicitly asked to modify. `DROP`, `TRUNCATE`, and unqualified `UPDATE`/`DELETE` get written out for the user to run, with the row count they will affect, rather than executed.
|