@rudderhq/agent-runtime-opencode-local 0.5.0 → 0.5.1
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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/server/execute.d.ts.map +1 -1
- package/dist/server/execute.js +8 -12
- package/dist/server/execute.js.map +1 -1
- package/dist/server/parse.test.js +1 -1
- package/dist/server/parse.test.js.map +1 -1
- package/dist/server/skills.d.ts.map +1 -1
- package/dist/server/skills.js +3 -12
- package/dist/server/skills.js.map +1 -1
- package/package.json +2 -2
- package/skills/browser/references/tool-contract.md +2 -2
- package/skills/rudder-docs/SKILL.md +20 -4
- package/skills/rudder-docs/evals/retrieval-authority-evals.json +262 -0
- package/skills/rudder-docs/evals/trigger-evals.json +11 -11
- package/skills/rudder-docs/references/agent-creation.md +153 -0
- package/skills/rudder-docs/references/api-reference.md +9 -2
- package/skills/rudder-docs/references/cli-reference.md +12 -12
- package/skills/rudder-docs/references/{control-plane-practices.md → operating-practices.md} +4 -4
- package/skills/rudder-docs/references/organization-skills.md +3 -3
- package/skills/rudder-docs/references/plugin-authoring.md +116 -0
- package/skills/rudder-docs/references/source-map.md +26 -2
- package/skills/visualize/SKILL.md +29 -27
- package/skills/visualize/references/runtime-contract.md +18 -8
- package/skills/rudder-create-agent/SKILL.md +0 -185
- package/skills/rudder-create-agent/references/api-reference.md +0 -179
- package/skills/rudder-create-agent/references/cli-reference.md +0 -132
- package/skills/rudder-create-plugin/SKILL.md +0 -103
- package/skills/skill-optimizer/CHANGELOG.md +0 -29
- package/skills/skill-optimizer/SKILL.md +0 -205
- package/skills/skill-optimizer/references/adapters/creative-brand-content.md +0 -30
- package/skills/skill-optimizer/references/adapters/customer-support-sales.md +0 -30
- package/skills/skill-optimizer/references/adapters/document-data-processing.md +0 -31
- package/skills/skill-optimizer/references/adapters/education-training.md +0 -31
- package/skills/skill-optimizer/references/adapters/finance-accounting.md +0 -31
- package/skills/skill-optimizer/references/adapters/healthcare-operations.md +0 -30
- package/skills/skill-optimizer/references/adapters/hr-people-ops.md +0 -31
- package/skills/skill-optimizer/references/adapters/legal-compliance.md +0 -31
- package/skills/skill-optimizer/references/adapters/operations-supply-chain.md +0 -31
- package/skills/skill-optimizer/references/adapters/personal-productivity.md +0 -29
- package/skills/skill-optimizer/references/adapters/research-knowledge.md +0 -31
- package/skills/skill-optimizer/references/adapters/software-ai.md +0 -31
- package/skills/skill-optimizer/references/domain-adapter-patterns.md +0 -66
- package/skills/skill-optimizer/references/eval-method.md +0 -17
- package/skills/skill-optimizer/references/universal-optimization-lens.md +0 -73
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Plugin Authoring
|
|
2
|
+
|
|
3
|
+
Use this workflow for a Rudder Plugin source question or an explicit request to
|
|
4
|
+
scaffold, develop, or verify a Plugin. Reading authoring guidance is read-only.
|
|
5
|
+
Only an explicit user request to scaffold or modify a package authorizes writes,
|
|
6
|
+
and those writes must stay inside the requested repository or target directory.
|
|
7
|
+
|
|
8
|
+
The current fact sources are
|
|
9
|
+
`doc/engineering/PLUGIN_AUTHORING_GUIDE.md` and
|
|
10
|
+
`packages/plugins/sdk/README.md`. Use
|
|
11
|
+
`doc/engineering/PLUGIN_RUNTIME_CONTRACT.md` only to understand the implemented
|
|
12
|
+
runtime boundary, and label future ideas as non-current.
|
|
13
|
+
|
|
14
|
+
## Section Map
|
|
15
|
+
|
|
16
|
+
- [Confirm scope and package layout](#confirm-scope-and-package-layout)
|
|
17
|
+
- [Scaffold from the current package](#scaffold-from-the-current-package)
|
|
18
|
+
- [Implement within current boundaries](#implement-within-current-boundaries)
|
|
19
|
+
- [Wire a bundled example only when requested](#wire-a-bundled-example-only-when-requested)
|
|
20
|
+
- [Verify the package and host](#verify-the-package-and-host)
|
|
21
|
+
|
|
22
|
+
## Confirm Scope And Package Layout
|
|
23
|
+
|
|
24
|
+
Before writing, determine whether the Plugin is:
|
|
25
|
+
|
|
26
|
+
- a repository-local example under `packages/plugins/examples/`;
|
|
27
|
+
- another Rudder monorepo package under `packages/plugins/`; or
|
|
28
|
+
- an external npm package in an absolute target directory.
|
|
29
|
+
|
|
30
|
+
Repository-local examples are a development workflow. For deployable Plugins,
|
|
31
|
+
prefer an npm package installed from a public or private npm-compatible
|
|
32
|
+
registry. GitHub installs are not a first-class path today.
|
|
33
|
+
|
|
34
|
+
Treat both Plugin workers and Plugin UI as trusted code. Plugin UI runs as
|
|
35
|
+
same-origin JavaScript and is not sandboxed by manifest capabilities.
|
|
36
|
+
Worker-side host APIs are capability-gated. Keep these boundaries visible when
|
|
37
|
+
reviewing third-party code or selecting capabilities.
|
|
38
|
+
|
|
39
|
+
## Scaffold From The Current Package
|
|
40
|
+
|
|
41
|
+
Use `create-rudder-plugin` instead of hand-writing boilerplate. In a Rudder
|
|
42
|
+
checkout, first build the scaffold package, then run its generated CLI for the
|
|
43
|
+
requested npm package name and output root. `--output` names the parent
|
|
44
|
+
directory; the CLI appends the package basename, and that destination must not
|
|
45
|
+
already exist. Verify the exact commands in
|
|
46
|
+
the current authoring guide before execution.
|
|
47
|
+
|
|
48
|
+
For a repository-local package, the scaffold uses `workspace:*` for
|
|
49
|
+
`@rudderhq/plugin-sdk`. For an external package, pass `--sdk-path` pointing to
|
|
50
|
+
the checkout's `packages/plugins/sdk`; the scaffold snapshots the SDK/shared
|
|
51
|
+
packages into `.rudder-sdk/` so the Plugin can build and test before an npm
|
|
52
|
+
publication exists.
|
|
53
|
+
|
|
54
|
+
The generated package should include:
|
|
55
|
+
|
|
56
|
+
- `src/manifest.ts`;
|
|
57
|
+
- `src/worker.ts`;
|
|
58
|
+
- `src/ui/index.tsx` when UI is used;
|
|
59
|
+
- `tests/plugin.spec.ts`;
|
|
60
|
+
- `package.json` and current build configuration.
|
|
61
|
+
|
|
62
|
+
Scaffold only under the explicit output root and confirm the derived package
|
|
63
|
+
directory before execution. Do not install the generated Plugin into a running
|
|
64
|
+
Rudder instance unless the user also requested that host mutation.
|
|
65
|
+
|
|
66
|
+
## Implement Within Current Boundaries
|
|
67
|
+
|
|
68
|
+
Review the manifest, worker, UI, and tests together:
|
|
69
|
+
|
|
70
|
+
- Declare only capabilities used by the worker-side host APIs.
|
|
71
|
+
- Keep tool names Plugin-namespaced; they must not shadow core or other Plugin
|
|
72
|
+
tools.
|
|
73
|
+
- Keep UI self-contained. Rudder does not provide a shared Plugin React
|
|
74
|
+
component kit yet.
|
|
75
|
+
- Do not use `ctx.assets`; it is not supported in the current runtime.
|
|
76
|
+
- Use `routePath` only for a `page` slot. It must be one lowercase slug and may
|
|
77
|
+
not collide with a reserved host route or another installed Plugin page.
|
|
78
|
+
- Use the SDK's declared worker, UI, testing, bundler, and dev-server surfaces
|
|
79
|
+
rather than undocumented application internals.
|
|
80
|
+
- Treat jobs and webhooks as namespaced external execution surfaces and keep
|
|
81
|
+
their capabilities, ownership, logs, and failure evidence explicit.
|
|
82
|
+
|
|
83
|
+
Local development installs must use an absolute filesystem path. The server
|
|
84
|
+
can watch a local-path Plugin and restart its worker after rebuilds, but that
|
|
85
|
+
does not make a repo-local checkout a production deployment artifact.
|
|
86
|
+
|
|
87
|
+
## Wire A Bundled Example Only When Requested
|
|
88
|
+
|
|
89
|
+
Only if the user explicitly asks for bundled example or discoverable host
|
|
90
|
+
wiring, update the host's bundled-example list and the documentation that
|
|
91
|
+
enumerates in-repo examples. A request to scaffold or develop a Plugin alone
|
|
92
|
+
does not authorize changing `server/src/routes/plugins.ts` or other host
|
|
93
|
+
registration surfaces.
|
|
94
|
+
|
|
95
|
+
If host runtime, SDK, capability validation, static UI serving, or lifecycle
|
|
96
|
+
code changes, follow the repository's Plugin engineering and Product Logic
|
|
97
|
+
rules in addition to the package workflow.
|
|
98
|
+
|
|
99
|
+
## Verify The Package And Host
|
|
100
|
+
|
|
101
|
+
At minimum, run the generated or existing Plugin package's:
|
|
102
|
+
|
|
103
|
+
- `typecheck`;
|
|
104
|
+
- `test`; and
|
|
105
|
+
- `build`.
|
|
106
|
+
|
|
107
|
+
Use the package scripts or the monorepo's `pnpm --filter <plugin-package>`
|
|
108
|
+
forms. For a new scaffold, execute them in a temporary or explicitly requested
|
|
109
|
+
target and confirm that its worker, manifest, UI bundle, and
|
|
110
|
+
`tests/plugin.spec.ts` compile against the selected SDK layout.
|
|
111
|
+
|
|
112
|
+
When host or SDK code changed, also run the relevant host integration tests,
|
|
113
|
+
repository typecheck, test suite, and build. If the user asked to install the
|
|
114
|
+
Plugin, verify the real host from its absolute local path and surface worker
|
|
115
|
+
health, logs, route behavior, and capability failures. Package creation alone
|
|
116
|
+
is not evidence that a Plugin is installed or active in Rudder.
|
|
@@ -25,6 +25,30 @@ two pages. Prefer the user's language when equivalent official pages exist.
|
|
|
25
25
|
Public docs own published user guidance; a local `docs/` checkout is useful
|
|
26
26
|
when the live site is unavailable or the task is editing the public site.
|
|
27
27
|
|
|
28
|
+
Use these routes for governance and operational evidence questions:
|
|
29
|
+
|
|
30
|
+
| User topic | English | 简体中文 |
|
|
31
|
+
| --- | --- | --- |
|
|
32
|
+
| Approvals, budgets, cost, and activity | `https://docs.rudderhq.dev/reference/approvals-budgets-activity` | `https://docs.rudderhq.dev/zh/reference/approvals-budgets-activity` |
|
|
33
|
+
| Run evidence and Run detail | `https://docs.rudderhq.dev/concepts/agents` | `https://docs.rudderhq.dev/zh/concepts/agents` |
|
|
34
|
+
| Dashboard summary | `https://docs.rudderhq.dev/concepts/overview` | `https://docs.rudderhq.dev/zh/concepts/overview` |
|
|
35
|
+
| Calendar source and history | `https://docs.rudderhq.dev/concepts/calendar` | `https://docs.rudderhq.dev/zh/concepts/calendar` |
|
|
36
|
+
| Human attention, Inbox, and Messenger | `https://docs.rudderhq.dev/concepts/chat-messenger` | `https://docs.rudderhq.dev/zh/concepts/chat-messenger` |
|
|
37
|
+
|
|
38
|
+
The approvals reference includes stable `#approvals`, `#budgets-and-cost`, and
|
|
39
|
+
`#activity` anchors for narrow retrieval. Legacy public URLs are compatibility
|
|
40
|
+
entries only. Cite the canonical routes in new answers.
|
|
41
|
+
|
|
42
|
+
Other lookup pages are similarly narrow:
|
|
43
|
+
|
|
44
|
+
| User topic | English | 简体中文 |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| Issue states | `https://docs.rudderhq.dev/reference/issue-statuses` | `https://docs.rudderhq.dev/zh/reference/issue-statuses` |
|
|
47
|
+
| Runtime choices and readiness | `https://docs.rudderhq.dev/reference/runtime-types` | `https://docs.rudderhq.dev/zh/reference/runtime-types` |
|
|
48
|
+
| Workspace and file placement | `https://docs.rudderhq.dev/reference/workspace-boundaries` | `https://docs.rudderhq.dev/zh/reference/workspace-boundaries` |
|
|
49
|
+
| Automation result destinations | `https://docs.rudderhq.dev/reference/automation-output-routing` | `https://docs.rudderhq.dev/zh/reference/automation-output-routing` |
|
|
50
|
+
| Deployment trust, credentials, Browser, and platform behavior | `https://docs.rudderhq.dev/reference/permissions-and-platforms` | `https://docs.rudderhq.dev/zh/reference/permissions-and-platforms` |
|
|
51
|
+
|
|
28
52
|
## Product Logic Registry
|
|
29
53
|
|
|
30
54
|
- Entry point: `doc/product/README.md`
|
|
@@ -50,7 +74,7 @@ Common domain routes include:
|
|
|
50
74
|
- Chat, Messenger, comments, and integrations:
|
|
51
75
|
`doc/product/domains/collaboration/`
|
|
52
76
|
- approvals, budgets, costs, and activity:
|
|
53
|
-
`doc/product/domains/
|
|
77
|
+
`doc/product/domains/governance-and-visibility/`
|
|
54
78
|
- reviews, feedback, and learning:
|
|
55
79
|
`doc/product/domains/review-feedback-learning/`
|
|
56
80
|
- automations: `doc/product/domains/automations/`
|
|
@@ -114,7 +138,7 @@ Within this package:
|
|
|
114
138
|
|
|
115
139
|
- `cli-reference.md` preserves the typed capability and CLI fallback catalog;
|
|
116
140
|
- `api-reference.md` preserves internal/debug compatibility endpoints;
|
|
117
|
-
- `
|
|
141
|
+
- `operating-practices.md` preserves conditional operating semantics; and
|
|
118
142
|
- `organization-skills.md` preserves organization skill workflows.
|
|
119
143
|
|
|
120
144
|
Use only the relevant section. These references are version-adjacent fallback
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: visualize
|
|
3
|
-
description: "Create safe inline visual explanations in Rudder Chat. Use when asked for a chart, plot, diagram, timeline, comparison, static map, simulator, scenario view, or compact visual that materially improves understanding. Prefer Mermaid for static node-and-edge structures; use Rudder's HTML/SVG/CSS
|
|
4
|
-
compatibility: "Rudder Chat inline visual
|
|
3
|
+
description: "Create safe inline visual explanations in Rudder Chat. Use when asked for a chart, plot, diagram, timeline, comparison, static map, simulator, scenario view, or compact visual that materially improves understanding. Prefer Mermaid for static node-and-edge structures; use Rudder's runtime-neutral HTML/SVG/CSS message envelope for custom geometry. Rudder visuals are declarative and scriptless: convert simulator requests to static scenarios or disclosure-based comparisons and never rely on JavaScript, network access, or external assets."
|
|
4
|
+
compatibility: "Rudder Chat v1 inline visual message protocol. Provider-neutral and filesystem-independent; outside Rudder Chat, fall back to Mermaid, Markdown, or prose."
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
# Visualize
|
|
@@ -16,38 +16,40 @@ access, so design for a useful first render with declarative HTML, SVG, and CSS.
|
|
|
16
16
|
a static structure or flow. Do not create an HTML artifact for that case.
|
|
17
17
|
2. Use an inline visual for charts, timelines, comparisons, spatial layouts,
|
|
18
18
|
static scenario views, or compact reports that benefit from custom geometry.
|
|
19
|
-
3.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## File And Directive
|
|
28
|
-
|
|
29
|
-
- Choose a concise ASCII lowercase-hyphenated title and write
|
|
30
|
-
`<title>.html` inside the current thread-scoped visualization directory.
|
|
19
|
+
3. Use the v1 message envelope only in Rudder Chat. It is a Rudder protocol,
|
|
20
|
+
independent of Codex, Claude, Gemini, Cursor, OpenCode, Pi, Hermes, process,
|
|
21
|
+
HTTP, or gateway filesystem conventions.
|
|
22
|
+
4. Outside Rudder Chat, fall back to Mermaid, Markdown tables, or concise prose.
|
|
23
|
+
Do not emit a Rudder envelope on a surface that cannot render it.
|
|
24
|
+
|
|
25
|
+
## Message Envelope
|
|
26
|
+
|
|
31
27
|
- Write only an HTML fragment. Do not include a doctype or `html`, `head`, or
|
|
32
28
|
`body` elements.
|
|
33
|
-
- Keep every fragment
|
|
34
|
-
|
|
29
|
+
- Keep every fragment at or below 64 KiB UTF-8, all fragments together at or
|
|
30
|
+
below 128 KiB, and the complete visual-bearing final reply at or below
|
|
31
|
+
256 KiB. Emit at most three visuals in one assistant message.
|
|
35
32
|
- Give the fragment one top-level markup root, `<div id="widget">`. Bounded
|
|
36
33
|
`<style>` blocks may precede that root.
|
|
37
34
|
- Put any custom CSS in bounded `<style>` elements. Inline `style` attributes
|
|
38
35
|
are removed.
|
|
39
|
-
-
|
|
36
|
+
- Check the fragment before replying. Fix escaped markup such as literal `\"`
|
|
40
37
|
or `\n`, missing labels, clipped content, and malformed SVG.
|
|
41
|
-
-
|
|
38
|
+
- Put this exact opening marker on its own line where the visual should render,
|
|
39
|
+
then the fragment, then the exact closing marker on its own line:
|
|
42
40
|
|
|
43
41
|
```text
|
|
44
|
-
|
|
42
|
+
:::rudder-inline-visual:v1
|
|
43
|
+
<style>#widget .series { color: var(--viz-series-1); }</style>
|
|
44
|
+
<div id="widget">...</div>
|
|
45
|
+
:::rudder-inline-visual:end
|
|
45
46
|
```
|
|
46
47
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
second
|
|
48
|
+
The markers must have no indentation, attributes, or trailing text. Keep any
|
|
49
|
+
necessary explanation outside the envelope. Never emit
|
|
50
|
+
`::codex-inline-vis{...}`, `::rudder-inline-vis{...}`, a file path, an iframe,
|
|
51
|
+
or a second link to source HTML; Rudder owns capture, trusted placement,
|
|
52
|
+
persistence, sandboxing, and rendering.
|
|
51
53
|
|
|
52
54
|
## Rudder Safety Boundary
|
|
53
55
|
|
|
@@ -120,13 +122,13 @@ not as data or copy to repeat.
|
|
|
120
122
|
|
|
121
123
|
Before replying:
|
|
122
124
|
|
|
123
|
-
1. Confirm
|
|
124
|
-
|
|
125
|
-
three directives.
|
|
125
|
+
1. Confirm each envelope uses the exact v1 markers, satisfies the 64/128/256 KiB
|
|
126
|
+
limits, and the message has no more than three visuals.
|
|
126
127
|
2. Confirm the fragment contains no scripts, handlers, URLs, external assets,
|
|
127
128
|
active controls, document-level elements, or unsupported embeds.
|
|
128
129
|
3. Confirm SVG view boxes, labels, referenced IDs, table semantics, and CSS
|
|
129
130
|
selectors are valid.
|
|
130
131
|
4. Check both narrow and wide layout when a preview path is available. If not,
|
|
131
132
|
keep the geometry responsive and the composition conservative.
|
|
132
|
-
5. Emit the
|
|
133
|
+
5. Emit the envelope only after the fragment is complete and valid. Never leave
|
|
134
|
+
an opening marker unterminated.
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Read this reference when producing a Rudder inline visual. The runtime is
|
|
4
4
|
scriptless, sanitized, isolated from Rudder state, and has no network access.
|
|
5
|
-
Every fragment must be
|
|
6
|
-
|
|
5
|
+
Every fragment must be at or below 64 KiB UTF-8, all fragment bodies together
|
|
6
|
+
must be at or below 128 KiB, the complete visual-bearing final reply must be at
|
|
7
|
+
or below 256 KiB, and one assistant message may contain at most three fragments.
|
|
7
8
|
|
|
8
9
|
## Output Envelope
|
|
9
10
|
|
|
@@ -12,16 +13,25 @@ Write a fragment with one top-level markup root, `<div id="widget">`. Bounded
|
|
|
12
13
|
`head`, or `body`; Rudder extracts and sanitizes the CSS before it sanitizes the
|
|
13
14
|
markup.
|
|
14
15
|
|
|
15
|
-
The
|
|
16
|
+
The final Rudder Chat message places the fragment inside this exact v1 envelope:
|
|
16
17
|
|
|
17
18
|
```text
|
|
18
|
-
|
|
19
|
+
:::rudder-inline-visual:v1
|
|
20
|
+
<style>#widget .series { color: var(--viz-series-1); }</style>
|
|
21
|
+
<div id="widget">...</div>
|
|
22
|
+
:::rudder-inline-visual:end
|
|
19
23
|
```
|
|
20
24
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
Both marker lines must be unindented, exact, and free of trailing text. Rudder
|
|
26
|
+
rejects nested, empty, unterminated, excessive, and oversized envelopes. It
|
|
27
|
+
buffers the fragment during streaming, publishes it only after a successful
|
|
28
|
+
complete result, and replaces it with a Server-owned trusted placement. The
|
|
29
|
+
Agent never writes a provider visualization directory, file directive,
|
|
30
|
+
attachment id, canonical placement, iframe, or source link.
|
|
31
|
+
|
|
32
|
+
The v1 authoring protocol is the same for every conforming Rudder Agent Runtime.
|
|
33
|
+
Legacy `::codex-inline-vis{file="..."}` input remains readable during migration,
|
|
34
|
+
but new output must never emit it.
|
|
25
35
|
|
|
26
36
|
## Preserved Markup
|
|
27
37
|
|
|
@@ -1,185 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rudder-create-agent
|
|
3
|
-
description: Create new agents in Rudder through the `rudder` CLI with governance-aware hiring. Use when you need to inspect adapter configuration options, compare existing agent configs, draft a new agent prompt/config, and submit a hire request.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Rudder Create Agent Skill
|
|
7
|
-
|
|
8
|
-
Use this skill when you are asked to hire or create an agent in Rudder.
|
|
9
|
-
|
|
10
|
-
## Preconditions
|
|
11
|
-
|
|
12
|
-
You need either:
|
|
13
|
-
|
|
14
|
-
- board access, or
|
|
15
|
-
- agent permission `canCreateAgents=true` in your org
|
|
16
|
-
|
|
17
|
-
If you do not have this permission, escalate to your CEO or board.
|
|
18
|
-
|
|
19
|
-
This workflow is **CLI-first**.
|
|
20
|
-
|
|
21
|
-
- Use `rudder ... --json` for structured reads and mutations.
|
|
22
|
-
- Use `references/cli-reference.md` as the canonical command catalog for this skill.
|
|
23
|
-
- Treat `references/api-reference.md` as internal/debug/compatibility documentation, not the normal runtime interface.
|
|
24
|
-
- Do not create agent directories, instruction files, or org metadata manually as a fallback.
|
|
25
|
-
- If CLI auth is unavailable in a heartbeat run, stop and report the auth problem instead of mutating the filesystem.
|
|
26
|
-
|
|
27
|
-
## Workflow
|
|
28
|
-
|
|
29
|
-
1. Confirm identity and organization context.
|
|
30
|
-
|
|
31
|
-
```sh
|
|
32
|
-
rudder agent me --json
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
If this returns `{"error":"Agent authentication required"}`, treat it as a run-auth failure:
|
|
36
|
-
|
|
37
|
-
- do not ask for `RUDDER_API_KEY` inside the heartbeat
|
|
38
|
-
- do not fall back to manual filesystem creation
|
|
39
|
-
- stop and report that injected agent authentication is missing or invalid for this run
|
|
40
|
-
|
|
41
|
-
2. Discover available adapter configuration docs for this Rudder instance.
|
|
42
|
-
|
|
43
|
-
```sh
|
|
44
|
-
rudder agent config index
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
3. Read adapter-specific docs for the runtime you plan to use.
|
|
48
|
-
|
|
49
|
-
```sh
|
|
50
|
-
rudder agent config doc codex_local
|
|
51
|
-
rudder agent config doc claude_local
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
4. Compare existing agents and redacted configurations in your organization.
|
|
55
|
-
|
|
56
|
-
```sh
|
|
57
|
-
rudder agent list --org-id "$RUDDER_ORG_ID" --json
|
|
58
|
-
rudder agent config list --org-id "$RUDDER_ORG_ID" --json
|
|
59
|
-
rudder agent config get "<agent-id>" --json
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
5. If the role needs organization skills on day one, inspect or import them before hiring.
|
|
63
|
-
|
|
64
|
-
```sh
|
|
65
|
-
rudder skill list --org-id "$RUDDER_ORG_ID" --json
|
|
66
|
-
rudder skill get "<skill-id>" --org-id "$RUDDER_ORG_ID" --json
|
|
67
|
-
rudder skill file "<skill-id>" --org-id "$RUDDER_ORG_ID" --path SKILL.md --json
|
|
68
|
-
rudder skill import --org-id "$RUDDER_ORG_ID" --source "<source>" --json
|
|
69
|
-
rudder skill scan-local --org-id "$RUDDER_ORG_ID" --roots "<csv>" --json
|
|
70
|
-
rudder skill scan-projects --org-id "$RUDDER_ORG_ID" --project-ids "<csv>" --workspace-ids "<csv>" --json
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
6. Draft the hire payload.
|
|
74
|
-
|
|
75
|
-
Required thinking:
|
|
76
|
-
|
|
77
|
-
- role / title / optional `name`
|
|
78
|
-
- `name` is optional; if omitted, Rudder assigns a distinct personal name automatically
|
|
79
|
-
- omit `icon` for normal hires; Rudder assigns a DiceBear Notionists avatar automatically
|
|
80
|
-
- only set `icon` when preserving an explicit DiceBear avatar reference or an uploaded `asset:<uuid>` image avatar reference provided by the board/UI
|
|
81
|
-
- reporting line (`reportsTo`)
|
|
82
|
-
- adapter type
|
|
83
|
-
- optional `desiredSkills` from the organization skill library
|
|
84
|
-
- adapter and runtime config aligned to this environment
|
|
85
|
-
- capabilities
|
|
86
|
-
- structured role/persona instructions for the new agent (`promptTemplate` when the CLI payload is the available surface; Rudder materializes this as `SOUL.md`)
|
|
87
|
-
- source issue linkage (`sourceIssueId` or `sourceIssueIds`) when this hire came from an issue
|
|
88
|
-
|
|
89
|
-
`role` is a fixed Rudder enum, not a free-form job title. Use one of:
|
|
90
|
-
`ceo`, `cto`, `cmo`, `cfo`, `engineer`, `designer`, `pm`, `qa`, `devops`, `researcher`, `general`.
|
|
91
|
-
Put specialization in `title`, `capabilities`, and `promptTemplate`. For example, a Founding Engineer hire should use
|
|
92
|
-
`"role": "engineer"` and `"title": "Founding Engineer"`, not `"role": "founding_engineer"`.
|
|
93
|
-
|
|
94
|
-
Do not copy Rudder's shared filesystem, memory, language, or safety contract into the hire prompt. Rudder injects that operating contract from runtime code for supported local runtimes. The hire-specific prompt should only define the new agent's role, identity, scope, tone, and durable responsibilities.
|
|
95
|
-
|
|
96
|
-
Draft `promptTemplate` as a durable SOUL document, not a one-line command. Use these sections when the role is not trivial:
|
|
97
|
-
|
|
98
|
-
- Opening: one sentence that captures who the agent is
|
|
99
|
-
- Mission: the outcome this agent owns
|
|
100
|
-
- Responsibilities: durable duties and ownership boundaries
|
|
101
|
-
- Boundaries: what the agent should not do or should escalate
|
|
102
|
-
- Decision Principles: role-specific judgment rules
|
|
103
|
-
- Voice: how the agent should communicate
|
|
104
|
-
- Continuity: what should become memory or explicit instruction updates over time
|
|
105
|
-
|
|
106
|
-
7. Submit the canonical hire request.
|
|
107
|
-
|
|
108
|
-
```sh
|
|
109
|
-
rudder agent hire --org-id "$RUDDER_ORG_ID" --payload '{
|
|
110
|
-
"role": "cto",
|
|
111
|
-
"title": "Chief Technology Officer",
|
|
112
|
-
"reportsTo": "<ceo-agent-id>",
|
|
113
|
-
"capabilities": "Owns technical roadmap, architecture, staffing, execution",
|
|
114
|
-
"desiredSkills": ["vercel-labs/agent-browser/agent-browser"],
|
|
115
|
-
"agentRuntimeType": "codex_local",
|
|
116
|
-
"agentRuntimeConfig": {
|
|
117
|
-
"cwd": "/abs/path/to/repo",
|
|
118
|
-
"model": "o4-mini",
|
|
119
|
-
"promptTemplate": "# SOUL.md -- CTO Persona\n\nYou are the CTO.\n\n## Mission\nOwn technical strategy, architecture, engineering execution, and quality bars.\n\n## Responsibilities\n- Set technical direction and execution standards.\n- Review architecture and staffing trade-offs.\n- Keep delivery risks visible and actionable.\n\n## Boundaries\n- Do not approve risky shortcuts without naming the trade-off.\n- Escalate product or budget ambiguity instead of guessing.\n\n## Decision Principles\n- Prefer simple architectures with explicit trade-offs.\n- Treat reliability, developer velocity, and product learning as linked constraints.\n\n## Voice\nDirect, specific, and evidence-led.\n\n## Continuity\nPreserve durable technical standards, repeated failure patterns, and long-running architecture decisions in memory or explicit instructions."
|
|
120
|
-
},
|
|
121
|
-
"runtimeConfig": {"heartbeat": {"enabled": true, "intervalSec": 300, "wakeOnDemand": true, "maxConcurrentRuns": 3}},
|
|
122
|
-
"sourceIssueId": "<issue-id>"
|
|
123
|
-
}' --json
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
`agent hire` is the canonical surface because it preserves the real server behavior:
|
|
127
|
-
|
|
128
|
-
- if the organization does not require approval, it creates the agent directly and returns `"approval": null`
|
|
129
|
-
- if the organization requires approval, it creates the agent in `pending_approval` and returns both `agent` and `approval`
|
|
130
|
-
|
|
131
|
-
Do **not** substitute `rudder approval create --type hire_agent` for this step unless you are doing low-level debugging. That bypasses the canonical direct-create vs pending-approval behavior.
|
|
132
|
-
|
|
133
|
-
8. Handle governance state.
|
|
134
|
-
|
|
135
|
-
If the hire response includes `approval`, monitor and discuss on the approval thread:
|
|
136
|
-
|
|
137
|
-
```sh
|
|
138
|
-
rudder approval get "<approval-id>" --json
|
|
139
|
-
cat > /tmp/rudder-approval-comment.md <<'EOF'
|
|
140
|
-
## CTO hire request submitted
|
|
141
|
-
|
|
142
|
-
- Approval: [<approval-id>](/<prefix>/messenger/approvals/<approval-id>)
|
|
143
|
-
- Pending agent: [<agent-ref>](/<prefix>/agents/<agent-url-key-or-id>)
|
|
144
|
-
- Source issue: [<issue-ref>](/<prefix>/issues/<issue-identifier-or-id>)
|
|
145
|
-
|
|
146
|
-
Updated prompt and adapter config per board feedback.
|
|
147
|
-
EOF
|
|
148
|
-
rudder approval comment "<approval-id>" --body-file /tmp/rudder-approval-comment.md --json
|
|
149
|
-
rudder approval resubmit "<approval-id>" --payload '{"title":"Revised title","agentRuntimeConfig":{"cwd":"/abs/path/to/repo","model":"o4-mini"}}' --json
|
|
150
|
-
rudder approval issues "<approval-id>" --json
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
When the board approves, you may be woken with `RUDDER_APPROVAL_ID`:
|
|
154
|
-
|
|
155
|
-
```sh
|
|
156
|
-
rudder approval get "$RUDDER_APPROVAL_ID" --json
|
|
157
|
-
rudder approval issues "$RUDDER_APPROVAL_ID" --json
|
|
158
|
-
```
|
|
159
|
-
|
|
160
|
-
For each linked issue, either:
|
|
161
|
-
|
|
162
|
-
- close it if the approval resolved the request, or
|
|
163
|
-
- comment in markdown with links to the approval and next actions
|
|
164
|
-
|
|
165
|
-
## Quality Bar
|
|
166
|
-
|
|
167
|
-
Before sending a hire request:
|
|
168
|
-
|
|
169
|
-
- if the role needs skills, make sure they already exist in the org library or import them first using the Rudder org-skills workflow
|
|
170
|
-
- reuse proven config patterns from related agents where possible
|
|
171
|
-
- omit `icon` for normal hires so the server generates the default DiceBear Notionists avatar
|
|
172
|
-
- avoid secrets in plain text unless required by adapter behavior
|
|
173
|
-
- ensure the reporting line is correct and in-org
|
|
174
|
-
- ensure the prompt is role-specific, operationally scoped, and structured enough to become the agent's durable `SOUL.md`
|
|
175
|
-
- include mission, responsibilities, boundaries, decision principles, voice, and continuity when the role has ongoing authority
|
|
176
|
-
- prefer `sourceIssueId` or `sourceIssueIds` in the hire payload instead of manual approval linking
|
|
177
|
-
- if board requests revision, update the payload and resubmit through the approval flow
|
|
178
|
-
- do not report success unless `rudder agent hire` itself succeeded and you can cite the returned `agent.id` or `approval.id`
|
|
179
|
-
- creating local directories or instruction files is not evidence that an agent exists in Rudder
|
|
180
|
-
|
|
181
|
-
For canonical command syntax and examples, read:
|
|
182
|
-
`references/cli-reference.md`
|
|
183
|
-
|
|
184
|
-
For low-level route shapes and underlying compatibility endpoints, read:
|
|
185
|
-
`references/api-reference.md`
|