@metaharness/support 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 +69 -0
- package/bin/scaffold.mjs +35 -0
- package/package.json +41 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 rUv
|
|
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,69 @@
|
|
|
1
|
+
# MetaHarness: support vertical
|
|
2
|
+
|
|
3
|
+
A ready-made customer-support multi-agent template for Claude Code. Scaffolds a four-agent pipeline — triager, KB-searcher, responder, escalator — wired with tier-routed model selection, shared memory, and the MCP servers a support workflow actually needs. It is opinionated about pipeline shape and agent boundaries; it is not a hosted product, not a ticketing system, and not a CRM. You bring the knowledge base, the inbox, and the escalation channel; the scaffold gives you the agents and the glue.
|
|
4
|
+
|
|
5
|
+
## Quickstart
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npx @metaharness/support@latest my-bot
|
|
9
|
+
cd my-bot && npm install && harness doctor
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
`harness doctor` checks Node, the Claude CLI, MCP server reachability, and the agent files. Fix anything red before sending traffic.
|
|
13
|
+
|
|
14
|
+
## What you get
|
|
15
|
+
|
|
16
|
+
- `agents/triager.md` — classifies inbound tickets by intent, urgency, and product area. **Tier: haiku** (cheap, high-volume).
|
|
17
|
+
- `agents/kb-searcher.md` — semantic search over your knowledge base via the memory MCP server. **Tier: haiku**.
|
|
18
|
+
- `agents/responder.md` — drafts the customer reply grounded in KB hits, handles tone and policy. **Tier: sonnet**.
|
|
19
|
+
- `agents/escalator.md` — decides when to hand off to a human, writes the internal handoff note, redacts PII. **Tier: opus** (judgment-heavy, low-volume).
|
|
20
|
+
- `mcp.json` — preconfigured MCP servers: memory (KB + conversation state), filesystem (transcripts), and a stub `tickets` server you point at your real ticketing backend.
|
|
21
|
+
- `settings.json` — Claude Code permissions allowlist tuned for read-mostly support work plus the write paths the responder and escalator need.
|
|
22
|
+
- `CLAUDE.md` — pipeline contract: who messages whom via `SendMessage`, what each agent must hand off, the escalation policy.
|
|
23
|
+
|
|
24
|
+
## Advanced
|
|
25
|
+
|
|
26
|
+
Validate the scaffold structure:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
harness validate
|
|
30
|
+
# ok agents/triager.md
|
|
31
|
+
# ok agents/kb-searcher.md
|
|
32
|
+
# ok agents/responder.md
|
|
33
|
+
# ok agents/escalator.md
|
|
34
|
+
# ok mcp.json
|
|
35
|
+
# ok settings.json
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Run a one-shot ticket through the pipeline headless, no interactive session:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
claude -p --plugin-dir my-bot "Triage and respond to ticket #4821: 'Refund still not received after 10 days'"
|
|
42
|
+
# triager -> intent=refund_status, urgency=high
|
|
43
|
+
# kb-searcher -> 3 KB hits (refund SLA, escalation policy, billing contact)
|
|
44
|
+
# responder -> drafted reply (412 tokens)
|
|
45
|
+
# escalator -> human handoff required: refund > 7 days
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Swap the KB backend by editing `mcp.json`'s `memory` entry — point it at your existing AgentDB, a Postgres+pgvector store, or any MCP-compatible memory server. The agent prompts use the MCP tool surface, not a hardcoded backend.
|
|
49
|
+
|
|
50
|
+
Override an agent's tier without editing prompts — set `tier: opus` in the agent's frontmatter and the responder will route through Opus instead of Sonnet on next run.
|
|
51
|
+
|
|
52
|
+
## FAQ
|
|
53
|
+
|
|
54
|
+
**Q: Does this connect to Zendesk / Intercom / Front out of the box?**
|
|
55
|
+
A: No. The `tickets` MCP server in `mcp.json` is a stub. Replace its `command` with an MCP server that wraps your real ticketing API, or write a thin adapter — the agents only call MCP tools, not vendor SDKs.
|
|
56
|
+
|
|
57
|
+
**Q: Where does the knowledge base live?**
|
|
58
|
+
A: Wherever you point the `memory` MCP server. The default config uses a local AgentDB store at `./data/kb`. Index your KB once with `harness kb ingest <path>` (the scaffold ships the ingest script) and the kb-searcher agent will find it.
|
|
59
|
+
|
|
60
|
+
**Q: Can I run this without the escalator agent?**
|
|
61
|
+
A: Yes. Delete `agents/escalator.md` and remove the escalator handoff line in `CLAUDE.md`. The responder will then be the terminal node and you lose the human-handoff policy — wire one in your ticketing system instead.
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
MIT. Built on metaharness (https://www.npmjs.com/package/metaharness).
|
|
66
|
+
|
|
67
|
+
## Deep-dive
|
|
68
|
+
|
|
69
|
+
Full explainer gist: https://gist.github.com/ruvnet/97a386e2c52cf15c6ec6d33386386180
|
package/bin/scaffold.mjs
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { execSync } from 'node:child_process';
|
|
3
|
+
import process from 'node:process';
|
|
4
|
+
|
|
5
|
+
const args = process.argv.slice(2);
|
|
6
|
+
const name = args[0] && !args[0].startsWith('-') ? args[0] : 'my-bot';
|
|
7
|
+
const extra = (args[0] && !args[0].startsWith('-') ? args.slice(1) : args)
|
|
8
|
+
.map((a) => (/\s/.test(a) ? `"${a.replace(/"/g, '\\"')}"` : a))
|
|
9
|
+
.join(' ');
|
|
10
|
+
|
|
11
|
+
const cmd = [
|
|
12
|
+
'npx',
|
|
13
|
+
'--yes',
|
|
14
|
+
'metaharness@latest',
|
|
15
|
+
name,
|
|
16
|
+
'--template',
|
|
17
|
+
'vertical:support',
|
|
18
|
+
'--host',
|
|
19
|
+
'claude-code',
|
|
20
|
+
'--force',
|
|
21
|
+
extra,
|
|
22
|
+
]
|
|
23
|
+
.filter(Boolean)
|
|
24
|
+
.join(' ');
|
|
25
|
+
|
|
26
|
+
try {
|
|
27
|
+
execSync(cmd, { stdio: 'inherit' });
|
|
28
|
+
} catch (err) {
|
|
29
|
+
console.error(`\nmetaharness failed: ${err.message || err}`);
|
|
30
|
+
process.exit(typeof err.status === 'number' ? err.status : 1);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
console.log(`\nScaffolded support harness at ./${name}`);
|
|
34
|
+
console.log(`Next: cd ${name} && npm install && harness doctor`);
|
|
35
|
+
console.log(`Then: claude -p --plugin-dir ${name} "Triage ticket: <paste ticket here>"`);
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@metaharness/support",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "MetaHarness example — customer-support multi-agent template (triager, KB-searcher, responder, escalator) for Claude Code. npx @metaharness/support my-bot",
|
|
5
|
+
"homepage": "https://github.com/ruvnet/agent-harness-generator/tree/main/examples-packages/support",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/ruvnet/agent-harness-generator.git",
|
|
9
|
+
"directory": "examples-packages/support"
|
|
10
|
+
},
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"author": "rUv <ruv@ruv.net>",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"bin": "./bin/scaffold.mjs",
|
|
15
|
+
"files": [
|
|
16
|
+
"bin/**",
|
|
17
|
+
"README.md",
|
|
18
|
+
"LICENSE"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"smoke": "node --check bin/scaffold.mjs"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"metaharness",
|
|
25
|
+
"agent-harness",
|
|
26
|
+
"agent-harness-generator",
|
|
27
|
+
"support",
|
|
28
|
+
"vertical",
|
|
29
|
+
"claude-code",
|
|
30
|
+
"ai-agent",
|
|
31
|
+
"mcp",
|
|
32
|
+
"npx",
|
|
33
|
+
"scaffold"
|
|
34
|
+
],
|
|
35
|
+
"publishConfig": {
|
|
36
|
+
"access": "public"
|
|
37
|
+
},
|
|
38
|
+
"engines": {
|
|
39
|
+
"node": ">=20.0.0"
|
|
40
|
+
}
|
|
41
|
+
}
|