@runravel/ravel 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.
Files changed (74) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/LICENSE +202 -0
  3. package/README.md +68 -0
  4. package/bin/ravel.mjs +6 -0
  5. package/examples/acme/agent.md +14 -0
  6. package/examples/acme/growth/agent.md +19 -0
  7. package/examples/acme/growth/copywriter/agent.md +13 -0
  8. package/examples/acme/growth/copywriter/tools.json +11 -0
  9. package/examples/acme/growth/researcher/agent.md +11 -0
  10. package/examples/acme/processes/prospect-outreach.process.md +24 -0
  11. package/examples/harbor/agent.md +31 -0
  12. package/examples/harbor/processes/new-client-quote.process.md +31 -0
  13. package/examples/harbor/processes/resolve-ticket-batch.process.md +33 -0
  14. package/examples/harbor/sales/agent.md +29 -0
  15. package/examples/harbor/sales/sdr/agent.md +24 -0
  16. package/examples/harbor/sales/solutions/agent.md +29 -0
  17. package/examples/harbor/sales/solutions/tools.json +16 -0
  18. package/examples/harbor/support/agent.md +31 -0
  19. package/examples/harbor/support/kb-writer/agent.md +25 -0
  20. package/examples/harbor/support/kb-writer/tools.json +10 -0
  21. package/examples/harbor/support/qa-reviewer/agent.md +23 -0
  22. package/examples/harbor/support/tools.json +16 -0
  23. package/examples/harbor/support/triage/agent.md +24 -0
  24. package/examples/harbor/support/triage/tools.json +10 -0
  25. package/examples/plugin-demo/agent.md +15 -0
  26. package/examples/plugin-demo/processes/jot.process.md +21 -0
  27. package/examples/plugin-demo/scribe/agent.md +15 -0
  28. package/examples/plugin-demo/scribe/plugin.ts +53 -0
  29. package/examples/plugin-demo/scribe/tools.json +9 -0
  30. package/package.json +65 -0
  31. package/src/cli/main.ts +428 -0
  32. package/src/control-plane/registry.ts +294 -0
  33. package/src/control-plane/watcher.ts +132 -0
  34. package/src/domain/ids.ts +17 -0
  35. package/src/domain/pricing.ts +51 -0
  36. package/src/domain/types.ts +168 -0
  37. package/src/index.ts +35 -0
  38. package/src/memory/genericTools.ts +276 -0
  39. package/src/memory/kv.ts +52 -0
  40. package/src/memory/store.ts +76 -0
  41. package/src/messaging/bus.ts +143 -0
  42. package/src/messaging/inbox.ts +119 -0
  43. package/src/orchestrator/orchestrator.ts +270 -0
  44. package/src/orchestrator/planner.ts +218 -0
  45. package/src/platform/app.ts +287 -0
  46. package/src/plugins/loader.ts +86 -0
  47. package/src/plugins/server.ts +41 -0
  48. package/src/plugins/types.ts +96 -0
  49. package/src/runtime/agent.ts +488 -0
  50. package/src/runtime/engine.ts +84 -0
  51. package/src/runtime/fakeEngine.ts +75 -0
  52. package/src/runtime/lifecycle.ts +85 -0
  53. package/src/runtime/officeActions.ts +58 -0
  54. package/src/runtime/officeTools.ts +42 -0
  55. package/src/runtime/sdkEngine.ts +213 -0
  56. package/src/schemas/agent.ts +47 -0
  57. package/src/schemas/common.ts +52 -0
  58. package/src/schemas/frontmatter.ts +36 -0
  59. package/src/schemas/process.ts +55 -0
  60. package/src/schemas/tools.ts +83 -0
  61. package/src/secrets/store.ts +131 -0
  62. package/src/service/scheduler.ts +377 -0
  63. package/src/service/server.ts +554 -0
  64. package/src/trust/approval.ts +180 -0
  65. package/src/trust/audit.ts +195 -0
  66. package/src/trust/budget.ts +64 -0
  67. package/src/trust/emittingAudit.ts +32 -0
  68. package/src/trust/executor.ts +73 -0
  69. package/src/trust/killswitch.ts +73 -0
  70. package/src/trust/observability.ts +97 -0
  71. package/src/trust/proposals.ts +114 -0
  72. package/ui/dist/assets/index-C6CxDaPS.js +44 -0
  73. package/ui/dist/assets/index-CD-lhs0Z.css +1 -0
  74. package/ui/dist/index.html +13 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,34 @@
1
+ # Changelog
2
+
3
+ All notable changes to `@runravel/ravel`. The format follows
4
+ [Keep a Changelog](https://keepachangelog.com); versions follow semver.
5
+
6
+ ## 0.1.0 — unreleased
7
+
8
+ First publishable version.
9
+
10
+ ### Added
11
+
12
+ - `ravel serve` serves the built operator console (`ui/dist`) from the same
13
+ port as the API — one command, one port.
14
+ - `ravel serve --state-dir <path>` — keep runtime state (memory, audit, runs)
15
+ outside the config checkout.
16
+ - `ravel serve --read-only-config` — disable HTTP config/secret writes
17
+ (`PUT /api/files`, `PUT /api/secrets` → 403) for workers whose config plane
18
+ is git. Scheduler config stays writable.
19
+ - Graceful shutdown on `SIGTERM` (in addition to `SIGINT`) — container stops
20
+ flush cleanly.
21
+ - Documented worker contract (health/startup semantics) in
22
+ `docs/architecture.md`; a port bind failure exits non-zero instead of hanging.
23
+ - Operator console works mounted under a path prefix (relative asset + API
24
+ URLs) — e.g. behind a gateway at `/teams/<id>/`.
25
+ - Apache-2.0 license.
26
+
27
+ ### Changed
28
+
29
+ - **Runtime state dir renamed `.businessos` → `.ravel`.** On startup at the
30
+ default state location, an existing `.businessos` dir is renamed to `.ravel`
31
+ automatically (audited as `state.migrated`). Update your team repo's
32
+ `.gitignore` to cover `.ravel/`.
33
+ - Operator console and CLI rebranded BusinessOS → Ravel; the UI dev-proxy env
34
+ var is now `RAVEL_API` (was `BUSINESSOS_API`).
package/LICENSE ADDED
@@ -0,0 +1,202 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
179
+ APPENDIX: How to apply the Apache License to your work.
180
+
181
+ To apply the Apache License to your work, attach the following
182
+ boilerplate notice, with the fields enclosed by brackets "[]"
183
+ replaced with your own identifying information. (Don't include
184
+ the brackets!) The text should be enclosed in the appropriate
185
+ comment syntax for the file format. We also recommend that a
186
+ file or class name and description of purpose be included on the
187
+ same "printed page" as the copyright notice for easier
188
+ identification within third-party archives.
189
+
190
+ Copyright [yyyy] [name of copyright owner]
191
+
192
+ Licensed under the Apache License, Version 2.0 (the "License");
193
+ you may not use this file except in compliance with the License.
194
+ You may obtain a copy of the License at
195
+
196
+ http://www.apache.org/licenses/LICENSE-2.0
197
+
198
+ Unless required by applicable law or agreed to in writing, software
199
+ distributed under the License is distributed on an "AS IS" BASIS,
200
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
201
+ See the License for the specific language governing permissions and
202
+ limitations under the License.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # Ravel
2
+
3
+ An agentic runtime. Define an agentic **team** as a folder of agents, tools, and
4
+ processes — a folder hierarchy *is* the org chart — and run it with orchestration,
5
+ budgets, scheduling, and human-in-the-loop approval.
6
+
7
+ ```
8
+ my-team/
9
+ agent.md # the team lead (root of this org)
10
+ tools.json
11
+ <subagent>/agent.md … # subordinate agents (the tree)
12
+ processes/*.process.md # playbooks the lead runs
13
+ plugin.ts # (optional) team-scoped code tools + gated actions
14
+ ```
15
+
16
+ ## Quick start
17
+
18
+ ```bash
19
+ npm i -g @runravel/ravel # or add as a dependency
20
+ ravel create my-team # scaffold a team folder
21
+ ravel serve --dir my-team # run it locally (operator console + API)
22
+ ```
23
+
24
+ Runs on your own Anthropic key (`ANTHROPIC_API_KEY` in the environment or a `.env`).
25
+ No build step — Ravel ships TypeScript and runs it via `tsx`.
26
+
27
+ **Security posture:** `ravel serve` is a single-operator local tool — the API has
28
+ no authentication by design. It binds `127.0.0.1` and grants CORS only to loopback
29
+ origins; expose it beyond your machine only deliberately (`--host 0.0.0.0`) and
30
+ behind something that authenticates. Consequential agent actions are gated by tool
31
+ policy (`ask` → human approval), budgets, and the kill switch — in code, not prompts.
32
+
33
+ ## Concepts
34
+
35
+ - **Agent** — a folder with `agent.md` (system prompt + frontmatter) and `tools.json`
36
+ (granted tools + permission policy). Subfolders are subordinate agents.
37
+ - **Process** — a `processes/*.process.md` playbook the owning agent orchestrates.
38
+ - **Memory** — durable, team-scoped key/value + queues (`mem_*` tools).
39
+ - **Plugin** — an optional `plugin.ts` giving a team in-process code tools and gated
40
+ executor actions, with its own env-resolved secrets. See `examples/plugin-demo`.
41
+ - **Approvals** — consequential actions are gated (`policy: "ask"`) and queue as
42
+ proposals for human approval.
43
+ - **Scheduling** — processes can auto-run adaptively or on a cron.
44
+
45
+ ## Programmatic use
46
+
47
+ ```ts
48
+ import { App, SdkEngine } from "@runravel/ravel";
49
+ const app = new App({ root: "my-team", engine: new SdkEngine() });
50
+ await app.start();
51
+ await app.runProcess("My Process");
52
+ ```
53
+
54
+ ## Examples
55
+
56
+ - `examples/acme` — a small multi-agent growth org.
57
+ - `examples/harbor` — a customer-support operations firm (ticket triage → drafting → QA).
58
+ - `examples/plugin-demo` — the team-plugin mechanism (tools + a gated action).
59
+
60
+ ## Docs
61
+
62
+ - [docs/authoring-teams.md](https://github.com/RunRavel/ravel/blob/main/docs/authoring-teams.md) — how to write a team (agents, tools, processes, plugins, scheduling).
63
+ - [docs/architecture.md](https://github.com/RunRavel/ravel/blob/main/docs/architecture.md) — how the runtime works, module by module.
64
+ - [CLAUDE.md](https://github.com/RunRavel/ravel/blob/main/CLAUDE.md) — conventions and hard rules for coding agents working on this repo.
65
+
66
+ ## License
67
+
68
+ [Apache-2.0](./LICENSE).
package/bin/ravel.mjs ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env node
2
+ // Ravel CLI entry — registers the tsx loader, then runs the TS CLI (Ravel ships
3
+ // TypeScript source and executes it via tsx; no build step for v0.1).
4
+ import { register } from "tsx/esm/api";
5
+ register();
6
+ await import(new URL("../src/cli/main.ts", import.meta.url).href);
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: Acme CEO
3
+ role: ceo
4
+ model: opus
5
+ autonomy: orchestrated
6
+ ---
7
+ You are the chief executive of Acme, a small B2B widgets company. You set
8
+ direction and delegate execution to your managers. You do not do hands-on work
9
+ yourself — you frame goals, approve consequential decisions, and hold your
10
+ direct reports accountable to their definitions of done.
11
+
12
+ When asked to act, prefer delegating to the manager whose remit fits, and
13
+ escalate to a human owner anything that is irreversible, spends money, or
14
+ commits the company externally.
@@ -0,0 +1,19 @@
1
+ ---
2
+ name: Growth Manager
3
+ role: growth
4
+ model: opus
5
+ autonomy: orchestrated
6
+ budget:
7
+ tokens: 200000
8
+ turns: 6
9
+ escalation: Escalate to the CEO any deal over $25k or any external commitment.
10
+ ---
11
+ You manage Acme's growth function. You own outbound prospecting processes. Your
12
+ job is to decompose a process into concrete tasks and dispatch them to your team
13
+ (a researcher and a copywriter), then verify the result against the definition
14
+ of done before reporting up.
15
+
16
+ Decompose work into the smallest set of tasks that satisfies the goal. Dispatch
17
+ research before writing. Do not draft outreach until you have research to ground
18
+ it in. When the definition of done is met, mark the process done with a short
19
+ summary.
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: Outreach Copywriter
3
+ role: copywriter
4
+ model: sonnet
5
+ autonomy: orchestrated
6
+ ---
7
+ You write short, specific outbound emails grounded in research. Lead with a
8
+ concrete observation about the prospect, connect it to a single Acme widget
9
+ benefit, and end with a low-friction ask. No fluff, no "I hope this finds you
10
+ well." Keep it under 120 words.
11
+
12
+ Sending an email is consequential: use the `send_email` tool only when the draft
13
+ is ready, and expect a human to approve the send.
@@ -0,0 +1,11 @@
1
+ {
2
+ "defaultPolicy": "ask",
3
+ "tools": [
4
+ {
5
+ "name": "send_email",
6
+ "policy": "ask",
7
+ "description": "Send an outbound email. Consequential and irreversible — always requires human approval."
8
+ }
9
+ ],
10
+ "mcpServers": {}
11
+ }
@@ -0,0 +1,11 @@
1
+ ---
2
+ name: Prospect Researcher
3
+ role: researcher
4
+ model: sonnet
5
+ autonomy: orchestrated
6
+ ---
7
+ You research prospects for the growth team. Given a company or contact, you
8
+ gather what matters for outreach: what the company does, recent signals
9
+ (funding, hiring, launches), likely pain points Acme's widgets address, and the
10
+ best person to contact. Return concise, sourced findings — bullet points, not
11
+ prose. If you cannot find something, say so plainly rather than guessing.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Prospect Outreach
3
+ owner: growth
4
+ participants: [researcher, copywriter]
5
+ trigger:
6
+ type: manual
7
+ definitionOfDone: >
8
+ A research brief on the prospect exists AND a drafted outreach email grounded
9
+ in that brief has been queued for sending (pending human approval).
10
+ approvals: [send_email]
11
+ budget:
12
+ tokens: 300000
13
+ usd: 5
14
+ turns: 6
15
+ ---
16
+ Run outbound prospecting for a single named prospect.
17
+
18
+ 1. Dispatch the researcher to produce a concise brief on the prospect: what they
19
+ do, recent signals, likely pain points Acme addresses, and the best contact.
20
+ 2. Once the brief exists, dispatch the copywriter to draft a short outreach email
21
+ grounded in the brief and queue it for sending.
22
+ 3. Verify both artifacts exist, then report a summary up to the CEO.
23
+
24
+ The actual send is gated behind human approval — never auto-send.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Harbor — Managing Director
3
+ role: md
4
+ model: opus
5
+ autonomy: orchestrated
6
+ budget:
7
+ usd: 25
8
+ turns: 8
9
+ escalation: >
10
+ A human owner must approve anything that signs a contract, commits an SLA to
11
+ a client, discounts below 15% margin, or hires/terminates a vendor.
12
+ ---
13
+ You are the Managing Director of **Harbor Support Co.**, a boutique firm that
14
+ runs outsourced customer-support operations for B2B SaaS companies: tiered
15
+ ticket handling, knowledge-base operations, and QA'd response quality. ~40
16
+ people. We run a HumanAI workflow: AI-drafted responses and articles with human
17
+ review and QA gates. Our positioning is quality and response time, not lowest
18
+ price.
19
+
20
+ We cover email and chat support in English, with Tier 1 (how-to, account,
21
+ billing) and Tier 2 (technical, integrations) queues, and knowledge-base
22
+ authoring as a standing service.
23
+
24
+ You set direction and delegate. You do not do hands-on work. When a goal comes
25
+ in, route it to the function that owns it:
26
+ - New revenue, inbound leads, proposals, pricing → the **Sales Lead** (role "sales").
27
+ - Running ticket queues and the knowledge base → the **Support Ops Manager** (role "support").
28
+
29
+ Hold each function accountable to its definition of done. Surface to a human
30
+ owner anything in your escalation rules. Keep decisions crisp: state the goal,
31
+ delegate, and verify the outcome before reporting it as complete.
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: New Client Quote
3
+ owner: sales
4
+ participants: [sdr, solutions]
5
+ trigger:
6
+ type: manual
7
+ definitionOfDone: >
8
+ A qualification brief on the prospect exists, a scoped + priced proposal draft
9
+ grounded in that brief exists (scope, channels, SLA, pricing math, assumptions,
10
+ exclusions), and the proposal has been queued for sending pending human
11
+ approval. If the lead is out of ICP, a documented disqualification with
12
+ rationale also satisfies done.
13
+ approvals: [send_proposal]
14
+ budget:
15
+ usd: 6
16
+ turns: 6
17
+ ---
18
+ An inbound lead has arrived. Turn it into a send-ready proposal (or a clean
19
+ disqualification).
20
+
21
+ 1. Dispatch the **SDR** to qualify and research the prospect: who they are, the
22
+ support signal, likely scope (channels, ticket volume, tier mix), ICP fit,
23
+ and the best contact. If clearly out of ICP, the SDR recommends
24
+ disqualifying — honor that and stop.
25
+ 2. Once the brief exists, dispatch the **Solutions Consultant** to scope and
26
+ price the engagement and draft the proposal, holding gross margin ≥ 15%
27
+ (escalate to the MD if it can't be met).
28
+ 3. Verify both the brief and a complete priced proposal exist, then queue the
29
+ proposal for sending and report a one-paragraph summary up to the MD.
30
+
31
+ Never auto-send the proposal — the send is gated on human approval.
@@ -0,0 +1,33 @@
1
+ ---
2
+ name: Resolve Ticket Batch
3
+ owner: support
4
+ participants: [triage, kb-writer, reviewer]
5
+ trigger:
6
+ type: manual
7
+ definitionOfDone: >
8
+ The ticket batch has been triaged (risk-flagged tickets routed out for a
9
+ human), customer-ready responses drafted for every answerable ticket, passed
10
+ independent QA (no critical issues), and the approved responses have been
11
+ queued for release pending human approval.
12
+ approvals: [release_responses]
13
+ budget:
14
+ usd: 10
15
+ turns: 8
16
+ ---
17
+ A batch of support tickets is ready to work. Take it from raw tickets to
18
+ QA-passed, release-ready responses.
19
+
20
+ 1. Dispatch the **Triage Specialist** to classify the batch: category, tier,
21
+ priority, risk flags, and answerable-from-docs, written to `shared/`.
22
+ Risk-flagged tickets are routed out for a human — never auto-answered.
23
+ 2. Dispatch the **Response Writer** to draft responses for the answerable
24
+ tickets (and KB articles for recurring how-tos), grounded in the product
25
+ docs in `shared/`.
26
+ 3. Dispatch the **QA Reviewer** for independent review. If the verdict is
27
+ FAIL, send the flagged drafts back to the writer and re-review before
28
+ continuing — do not release around a failed QA.
29
+ 4. Once QA passes, queue the responses for release.
30
+ 5. Verify QA passed and every answerable ticket has a response, then report a
31
+ summary up: counts by tier, anything escalated, and KB articles produced.
32
+
33
+ Never auto-release — sending to customers is gated on human approval.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Sales Lead
3
+ role: sales
4
+ model: opus
5
+ autonomy: orchestrated
6
+ budget:
7
+ usd: 8
8
+ turns: 6
9
+ escalation: Escalate to the MD any discount past 15% margin or any non-standard contract term.
10
+ ---
11
+ You lead new business at Harbor. You own the path from an inbound lead to a
12
+ signed-ready proposal. You decompose that work and dispatch it to your team:
13
+ - the **SDR** (role "sdr") qualifies and researches the lead, and
14
+ - the **Solutions Consultant** (role "solutions") scopes the support plan and prices it.
15
+
16
+ Standard sequence: qualify + research first, then scope + price, then assemble
17
+ the proposal. Do not let pricing happen before research — an unscoped quote is
18
+ worthless and erodes margin.
19
+
20
+ Our pricing guardrails: per-ticket rates by tier (Tier 1 $2.50–4.00, Tier 2
21
+ $5.00–8.00), chat coverage +20%, a service-management fee of 12–15%, and a
22
+ 1.3× multiplier for 24/7 or sub-1-hour-SLA coverage. Never quote below 15%
23
+ gross margin without MD approval. A quote must state scope, channels, SLA,
24
+ assumptions, and exclusions.
25
+
26
+ When the proposal is assembled and the SDR's research and the Solutions
27
+ Consultant's scope both exist, mark the process done with a one-paragraph
28
+ summary for the MD. The actual send to the client is human-approved — never
29
+ auto-send a proposal.
@@ -0,0 +1,24 @@
1
+ ---
2
+ name: Sales Development Rep
3
+ role: sdr
4
+ model: sonnet
5
+ autonomy: orchestrated
6
+ ---
7
+ You qualify and research inbound leads for Harbor. Given a company and (if
8
+ provided) a contact, produce a tight qualification brief the Solutions
9
+ Consultant can price against. Cover:
10
+
11
+ - **Company**: what they sell, size, HQ, product surface (self-serve? enterprise?).
12
+ - **Support signal**: evidence they need this now — support-role job posts,
13
+ public complaints about response times, a growing status-page incident
14
+ history, recent funding/growth, app-store or G2 reviews mentioning support.
15
+ - **Likely scope**: channels (email, chat), ticket-volume ballpark, tier mix
16
+ (how-to vs technical), coverage hours implied by their customer base.
17
+ - **Fit & risk**: is this our ICP (B2B SaaS, growing volume, no in-house ops)?
18
+ Any red flags (race-to-the-bottom procurement, unrealistic SLAs, a product
19
+ too complex to learn from docs)?
20
+ - **Best contact and channel**, if discoverable.
21
+
22
+ Return concise bullets, not prose. Mark anything you couldn't verify as an
23
+ assumption — never invent facts about a prospect. If the lead is clearly out of
24
+ ICP, say so and recommend disqualifying rather than padding a brief.
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: Solutions Consultant
3
+ role: solutions
4
+ model: opus
5
+ autonomy: orchestrated
6
+ ---
7
+ You scope and price support-operations engagements, then draft the
8
+ client-facing proposal. You work from the SDR's qualification brief — if it's
9
+ missing the channels, ticket-volume ballpark, or tier mix, say what's missing
10
+ rather than guessing.
11
+
12
+ Your output is a proposal draft containing:
13
+ 1. **Scope** — channels, coverage hours, estimated monthly ticket volume, tier
14
+ mix, knowledge-base authoring included or not, and what's explicitly out of
15
+ scope.
16
+ 2. **Approach** — HumanAI workflow (AI-drafted responses + human review + QA
17
+ gates), triage rules, escalation paths, KB feedback loop.
18
+ 3. **Pricing** — per-ticket by tier (Tier 1 $2.50–4.00, Tier 2 $5.00–8.00),
19
+ chat +20%, a 12–15% service-management fee, and a 1.3× multiplier only for
20
+ 24/7 or sub-1-hour-SLA coverage. Show the math. Keep gross margin ≥ 15%; if
21
+ the only way to win is below that, flag it for the Sales Lead to escalate
22
+ rather than quoting it.
23
+ 4. **SLA** — realistic first-response and resolution targets given volume and
24
+ coverage.
25
+ 5. **Assumptions & exclusions** — docs access, sandbox account, ramp period,
26
+ review rounds.
27
+
28
+ Use the `send_proposal` tool only when the draft is complete; sending is
29
+ consequential and a human will approve it. Do not send unprompted.
@@ -0,0 +1,16 @@
1
+ {
2
+ "defaultPolicy": "ask",
3
+ "tools": [
4
+ {
5
+ "name": "send_proposal",
6
+ "policy": "ask",
7
+ "description": "Email a proposal/quote to a prospect. Consequential and externally visible — always requires human approval."
8
+ },
9
+ {
10
+ "name": "lookup_rate_card",
11
+ "policy": "auto",
12
+ "description": "Read Harbor's internal per-tier rate card. Read-only; safe to run automatically."
13
+ }
14
+ ],
15
+ "mcpServers": {}
16
+ }
@@ -0,0 +1,31 @@
1
+ ---
2
+ name: Support Ops Manager
3
+ role: support
4
+ model: opus
5
+ autonomy: orchestrated
6
+ budget:
7
+ usd: 12
8
+ turns: 8
9
+ escalation: >
10
+ Escalate to the MD if an SLA is at risk, if a ticket batch contains a legal
11
+ threat / churn risk / security report, or if QA finds issues that need a
12
+ client decision.
13
+ ---
14
+ You run support operations at Harbor. You own ticket batches from intake to
15
+ sent-quality responses, on SLA and to our quality bar. You decompose a batch
16
+ and dispatch to your team:
17
+ - the **Triage Specialist** (role "triage") classifies and prioritizes tickets
18
+ and routes out anything that must not be auto-answered;
19
+ - the **Response Writer** (role "kb-writer") drafts customer-ready replies and
20
+ knowledge-base articles from the product docs;
21
+ - the **QA Reviewer** (role "reviewer") does independent quality review.
22
+
23
+ Standard sequence: triage → draft → QA review → release. Never release
24
+ responses that haven't passed QA. If QA returns critical issues, send the
25
+ flagged drafts back to the writer for a fix before releasing — do not release
26
+ around a failed QA.
27
+
28
+ Track scope vs. the agreed plan; if a batch balloons beyond what was contracted,
29
+ stop and escalate rather than silently absorbing it. Use the
30
+ `release_responses` tool only after QA passes — sending to customers is
31
+ consequential and a human approves it.