@metaharness/devops 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 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,86 @@
1
+ # MetaHarness: devops vertical
2
+
3
+ A ready-made multi-agent scaffold for incident response on top of Claude Code. It provisions four specialized agents — `responder`, `runbook-runner`, `escalator`, and `postmortem` — wired together with tiered model routing, project-scoped settings, and a `harness doctor` health check. Use it to bootstrap an on-call assistant that triages alerts, executes runbooks, escalates when stuck, and writes the postmortem afterward.
4
+
5
+ This scaffold is for SREs, platform engineers, and on-call developers who want a working incident-response harness in one command instead of assembling agents, prompts, and config by hand. It is NOT a hosted service, an alerting system, or a replacement for PagerDuty / Opsgenie / Grafana OnCall — it is the Claude Code layer that sits next to those tools.
6
+
7
+ ## Quickstart
8
+
9
+ ```bash
10
+ npx @metaharness/devops@latest my-bot
11
+ cd my-bot && npm install && npx harness doctor
12
+ ```
13
+
14
+ Then launch Claude Code against the scaffold:
15
+
16
+ ```bash
17
+ claude -p --plugin-dir my-bot "page: api-gateway 5xx spike, last 10m"
18
+ ```
19
+
20
+ ## What you get
21
+
22
+ - `agents/responder.md` — first-touch triage agent (tier: **sonnet**). Reads the alert, pulls recent logs/metrics, proposes hypotheses.
23
+ - `agents/runbook-runner.md` — executes documented runbooks step-by-step (tier: **haiku**). Cheap, deterministic, fast.
24
+ - `agents/escalator.md` — decides when human escalation is warranted and drafts the page (tier: **sonnet**).
25
+ - `agents/postmortem.md` — writes a blameless postmortem from the incident transcript (tier: **opus**).
26
+ - `.claude/settings.json` — project-scoped Claude Code config with allow-listed tools (Read, Grep, Glob, Bash for read-only commands).
27
+ - `mcp.json` — pre-wired MCP server stubs for log search and metrics queries; edit to point at your stack.
28
+ - `runbooks/` — example runbook templates the `runbook-runner` agent consumes.
29
+ - `package.json` with a `harness` bin shim so `npx harness doctor` and `npx harness validate` work out of the box.
30
+
31
+ ## Advanced
32
+
33
+ Run the bundled doctor to verify the scaffold is healthy:
34
+
35
+ ```bash
36
+ $ npx harness doctor
37
+ [harness] node: v20.11.1 ok
38
+ [harness] claude code: detected
39
+ [harness] agents: 4 found (responder, runbook-runner, escalator, postmortem)
40
+ [harness] mcp.json: 2 servers configured
41
+ [harness] settings.json: valid
42
+ ok
43
+ ```
44
+
45
+ Validate the agent frontmatter and tier assignments:
46
+
47
+ ```bash
48
+ $ npx harness validate
49
+ [harness] agents/responder.md tier=sonnet tools=Read,Grep,Bash ok
50
+ [harness] agents/runbook-runner.md tier=haiku tools=Read,Bash ok
51
+ [harness] agents/escalator.md tier=sonnet tools=Read,WebFetch ok
52
+ [harness] agents/postmortem.md tier=opus tools=Read,Write ok
53
+ ok
54
+ ```
55
+
56
+ Drive the harness headlessly for CI or webhook integrations:
57
+
58
+ ```bash
59
+ claude -p --plugin-dir my-bot --output-format json \
60
+ "incident: redis OOMKilled in prod-us-east-1, alert id INC-4421"
61
+ ```
62
+
63
+ Pipe a recent alert payload from your incident tool straight into the responder:
64
+
65
+ ```bash
66
+ cat alert.json | claude -p --plugin-dir my-bot --append-system-prompt "You are the on-call responder. Start with the responder agent."
67
+ ```
68
+
69
+ ## FAQ
70
+
71
+ **Q: Does this replace PagerDuty / Opsgenie?**
72
+ A: No. It plugs into them. The `escalator` agent drafts the page; your existing tool delivers it. Wire the MCP server in `mcp.json` to your incident platform's API.
73
+
74
+ **Q: Can I change which model each agent uses?**
75
+ A: Yes. Edit the `model:` field in the YAML frontmatter of each `agents/*.md` file. The defaults (haiku for runbook execution, sonnet for triage, opus for postmortems) follow the 3-tier cost/latency pattern but every choice is a one-line override.
76
+
77
+ **Q: How do I add my own runbook?**
78
+ A: Drop a markdown file into `runbooks/`. The `runbook-runner` agent discovers them by glob and matches against the incident description. No registration step.
79
+
80
+ ## License
81
+
82
+ MIT. Built on metaharness (https://www.npmjs.com/package/metaharness).
83
+
84
+ ## Deep-dive
85
+
86
+ Full explainer gist: https://gist.github.com/ruvnet/7c2975652c9be393536a71cdafc358f3
@@ -0,0 +1,30 @@
1
+ #!/usr/bin/env node
2
+ import { execSync } from 'node:child_process';
3
+ import process from 'node:process';
4
+
5
+ const name = process.argv[2] || 'my-bot';
6
+ const extra = process.argv.slice(3);
7
+
8
+ const cmd = [
9
+ 'npx',
10
+ '--yes',
11
+ 'metaharness@latest',
12
+ JSON.stringify(name),
13
+ '--template',
14
+ 'vertical:devops',
15
+ '--host',
16
+ 'claude-code',
17
+ '--force',
18
+ ...extra.map((a) => JSON.stringify(a)),
19
+ ].join(' ');
20
+
21
+ try {
22
+ execSync(cmd, { stdio: 'inherit' });
23
+ console.log('');
24
+ console.log(`Next: cd ${name} && npm install`);
25
+ console.log(`Then: npx harness doctor`);
26
+ console.log(`Run: claude -p --plugin-dir ${name} "page: <your incident here>"`);
27
+ } catch (err) {
28
+ console.error('[@metaharness/devops] scaffold failed:', err?.message || err);
29
+ process.exit(typeof err?.status === 'number' ? err.status : 1);
30
+ }
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "name": "@metaharness/devops",
3
+ "version": "0.1.0",
4
+ "description": "MetaHarness example — Claude Code incident-response vertical with responder, runbook-runner, escalator, postmortem agents (npx @metaharness/devops my-bot)",
5
+ "homepage": "https://github.com/ruvnet/agent-harness-generator/tree/main/examples-packages/devops",
6
+ "repository": {
7
+ "type": "git",
8
+ "url": "https://github.com/ruvnet/agent-harness-generator.git",
9
+ "directory": "examples-packages/devops"
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
+ "devops",
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
+ }