@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
|
@@ -1,179 +0,0 @@
|
|
|
1
|
-
# Rudder Create Agent API Reference
|
|
2
|
-
|
|
3
|
-
Internal/debug reference for the bundled `rudder-create-agent` skill.
|
|
4
|
-
|
|
5
|
-
- Normal runtime execution should follow the CLI-first workflow in `../SKILL.md`.
|
|
6
|
-
- The canonical command catalog lives in `cli-reference.md`.
|
|
7
|
-
- Keep this document for route-level debugging, compatibility work, and payload-shape inspection.
|
|
8
|
-
|
|
9
|
-
## CLI-to-API Mapping
|
|
10
|
-
|
|
11
|
-
| CLI command | Primary route |
|
|
12
|
-
| --- | --- |
|
|
13
|
-
| `rudder agent config index` | `GET /llms/agent-configuration.txt` |
|
|
14
|
-
| `rudder agent config doc <agentRuntimeType>` | `GET /llms/agent-configuration/:agentRuntimeType.txt` |
|
|
15
|
-
| `rudder agent config list --org-id <orgId>` | `GET /api/orgs/:orgId/agent-configurations` |
|
|
16
|
-
| `rudder agent config get <agentId>` | `GET /api/agents/:agentId/configuration` |
|
|
17
|
-
| `rudder agent hire --org-id <orgId> --payload <json>` | `POST /api/orgs/:orgId/agent-hires` |
|
|
18
|
-
| `rudder approval get <approvalId>` | `GET /api/approvals/:approvalId` |
|
|
19
|
-
| `rudder approval comment <approvalId> --body-file <path>` | `POST /api/approvals/:approvalId/comments` |
|
|
20
|
-
| `rudder approval resubmit <approvalId> [--payload <json>]` | `POST /api/approvals/:approvalId/resubmit` |
|
|
21
|
-
| `rudder approval issues <approvalId>` | `GET /api/approvals/:approvalId/issues` |
|
|
22
|
-
|
|
23
|
-
## Reflection Endpoints
|
|
24
|
-
|
|
25
|
-
- `GET /llms/agent-configuration.txt`
|
|
26
|
-
- `GET /llms/agent-configuration/:agentRuntimeType.txt`
|
|
27
|
-
|
|
28
|
-
Auth:
|
|
29
|
-
|
|
30
|
-
- board access, or
|
|
31
|
-
- same-org agent auth with `canCreateAgents=true`
|
|
32
|
-
|
|
33
|
-
These endpoints return plain text. The CLI wraps them directly.
|
|
34
|
-
|
|
35
|
-
## Configuration Snapshots
|
|
36
|
-
|
|
37
|
-
- `GET /api/orgs/:orgId/agent-configurations`
|
|
38
|
-
- `GET /api/agents/:agentId/configuration`
|
|
39
|
-
|
|
40
|
-
These responses are redacted snapshots for comparison and reuse.
|
|
41
|
-
|
|
42
|
-
Representative shape:
|
|
43
|
-
|
|
44
|
-
```json
|
|
45
|
-
{
|
|
46
|
-
"id": "uuid",
|
|
47
|
-
"orgId": "uuid",
|
|
48
|
-
"name": "CTO",
|
|
49
|
-
"role": "cto",
|
|
50
|
-
"title": "Chief Technology Officer",
|
|
51
|
-
"status": "idle",
|
|
52
|
-
"reportsTo": "uuid-or-null",
|
|
53
|
-
"agentRuntimeType": "codex_local",
|
|
54
|
-
"agentRuntimeConfig": {
|
|
55
|
-
"cwd": "/absolute/path",
|
|
56
|
-
"model": "o4-mini"
|
|
57
|
-
},
|
|
58
|
-
"runtimeConfig": {
|
|
59
|
-
"heartbeat": {
|
|
60
|
-
"enabled": true,
|
|
61
|
-
"intervalSec": 300,
|
|
62
|
-
"wakeOnDemand": true,
|
|
63
|
-
"maxConcurrentRuns": 3
|
|
64
|
-
}
|
|
65
|
-
},
|
|
66
|
-
"permissions": {
|
|
67
|
-
"canCreateAgents": true
|
|
68
|
-
},
|
|
69
|
-
"updatedAt": "2026-04-19T12:00:00.000Z"
|
|
70
|
-
}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
## `POST /api/orgs/:orgId/agent-hires`
|
|
74
|
-
|
|
75
|
-
Canonical hire route used by `rudder agent hire`.
|
|
76
|
-
|
|
77
|
-
Request body:
|
|
78
|
-
|
|
79
|
-
```json
|
|
80
|
-
{
|
|
81
|
-
"role": "cto",
|
|
82
|
-
"title": "Chief Technology Officer",
|
|
83
|
-
"reportsTo": "uuid-or-null",
|
|
84
|
-
"capabilities": "Owns architecture and engineering execution",
|
|
85
|
-
"desiredSkills": ["vercel-labs/agent-browser/agent-browser"],
|
|
86
|
-
"agentRuntimeType": "codex_local",
|
|
87
|
-
"agentRuntimeConfig": {
|
|
88
|
-
"cwd": "/absolute/path",
|
|
89
|
-
"model": "o4-mini",
|
|
90
|
-
"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."
|
|
91
|
-
},
|
|
92
|
-
"runtimeConfig": {
|
|
93
|
-
"heartbeat": {
|
|
94
|
-
"enabled": true,
|
|
95
|
-
"intervalSec": 300,
|
|
96
|
-
"wakeOnDemand": true,
|
|
97
|
-
"maxConcurrentRuns": 3
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
|
-
"budgetMonthlyCents": 0,
|
|
101
|
-
"sourceIssueId": "uuid-or-null",
|
|
102
|
-
"sourceIssueIds": ["uuid-1", "uuid-2"]
|
|
103
|
-
}
|
|
104
|
-
```
|
|
105
|
-
|
|
106
|
-
`role` is validated as a fixed enum: `ceo`, `cto`, `cmo`, `cfo`, `engineer`, `designer`, `pm`, `qa`, `devops`, `researcher`, `general`.
|
|
107
|
-
Use `title`, `capabilities`, and `agentRuntimeConfig.promptTemplate` for narrower job titles. For example, a Founding Engineer should be submitted as `"role": "engineer"` and `"title": "Founding Engineer"`.
|
|
108
|
-
|
|
109
|
-
Response when approval is required:
|
|
110
|
-
|
|
111
|
-
```json
|
|
112
|
-
{
|
|
113
|
-
"agent": {
|
|
114
|
-
"id": "uuid",
|
|
115
|
-
"status": "pending_approval"
|
|
116
|
-
},
|
|
117
|
-
"approval": {
|
|
118
|
-
"id": "uuid",
|
|
119
|
-
"type": "hire_agent",
|
|
120
|
-
"status": "pending",
|
|
121
|
-
"payload": {
|
|
122
|
-
"desiredSkills": ["vercel-labs/agent-browser/agent-browser"]
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
Response when approval is not required:
|
|
129
|
-
|
|
130
|
-
```json
|
|
131
|
-
{
|
|
132
|
-
"agent": {
|
|
133
|
-
"id": "uuid",
|
|
134
|
-
"status": "idle"
|
|
135
|
-
},
|
|
136
|
-
"approval": null
|
|
137
|
-
}
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
Important notes:
|
|
141
|
-
|
|
142
|
-
- `name` is optional; if omitted or blank, Rudder assigns a distinct first name automatically
|
|
143
|
-
- `icon` is optional; omit it for normal hires so Rudder generates a DiceBear Notionists avatar automatically
|
|
144
|
-
- only pass `icon` when the board/UI supplied an explicit DiceBear Notionists reference or uploaded `asset:<uuid>` image avatar reference
|
|
145
|
-
- `desiredSkills` accepts organization skill ids, canonical keys, or a unique slug; the server resolves and stores canonical organization skill keys
|
|
146
|
-
- `agentRuntimeConfig.promptTemplate`, when present for local runtimes during hire, is role/persona content that Rudder materializes as managed `SOUL.md`
|
|
147
|
-
- write hire-time `promptTemplate` as a durable SOUL document with mission, responsibilities, boundaries, decision principles, voice, and continuity when the role has ongoing authority
|
|
148
|
-
- do not put Rudder's shared operating contract in `promptTemplate`; supported local runtimes inject that contract from code
|
|
149
|
-
- `sourceIssueId` and `sourceIssueIds` are the canonical way to link the hire back to originating issues
|
|
150
|
-
- this route is preferred over creating `hire_agent` approvals manually because it preserves the organization's approval policy
|
|
151
|
-
|
|
152
|
-
## Approval Lifecycle
|
|
153
|
-
|
|
154
|
-
Relevant routes:
|
|
155
|
-
|
|
156
|
-
- `GET /api/approvals/:approvalId`
|
|
157
|
-
- `POST /api/approvals/:approvalId/comments`
|
|
158
|
-
- `POST /api/approvals/:approvalId/resubmit`
|
|
159
|
-
- `GET /api/approvals/:approvalId/issues`
|
|
160
|
-
|
|
161
|
-
Statuses:
|
|
162
|
-
|
|
163
|
-
- `pending`
|
|
164
|
-
- `revision_requested`
|
|
165
|
-
- `approved`
|
|
166
|
-
- `rejected`
|
|
167
|
-
- `cancelled`
|
|
168
|
-
|
|
169
|
-
For hire approvals:
|
|
170
|
-
|
|
171
|
-
- approved: linked agent transitions `pending_approval -> idle`
|
|
172
|
-
- rejected: linked agent is terminated
|
|
173
|
-
|
|
174
|
-
## Safety Notes
|
|
175
|
-
|
|
176
|
-
- Config read APIs redact obvious secrets.
|
|
177
|
-
- `pending_approval` agents cannot run heartbeats, receive assignments, or create keys.
|
|
178
|
-
- All hire and approval actions are logged in activity for auditability.
|
|
179
|
-
- Use markdown in issue and approval comments and include links to the approval, agent, and source issue.
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
# Rudder Create Agent CLI Reference
|
|
2
|
-
|
|
3
|
-
Canonical CLI contract for the bundled `rudder-create-agent` skill. Prefer these commands over direct `/api` calls.
|
|
4
|
-
|
|
5
|
-
## Defaults
|
|
6
|
-
|
|
7
|
-
- All commands support `--json`.
|
|
8
|
-
- `--org-id` defaults to `RUDDER_ORG_ID` when relevant.
|
|
9
|
-
- Mutating commands attach `RUDDER_RUN_ID` automatically when available.
|
|
10
|
-
- `agent config index` and `agent config doc` print plain text by default. With `--json`, they emit that text as a JSON string.
|
|
11
|
-
|
|
12
|
-
## Core CLI Surface
|
|
13
|
-
|
|
14
|
-
### Identity and discovery
|
|
15
|
-
|
|
16
|
-
```sh
|
|
17
|
-
rudder agent me --json
|
|
18
|
-
rudder agent list --org-id "$RUDDER_ORG_ID" --json
|
|
19
|
-
rudder agent get "<agent-id-or-shortname>" --org-id "$RUDDER_ORG_ID" --json
|
|
20
|
-
rudder agent config index
|
|
21
|
-
rudder agent config doc "<agent-runtime-type>"
|
|
22
|
-
rudder agent config list --org-id "$RUDDER_ORG_ID" --json
|
|
23
|
-
rudder agent config get "<agent-id-or-shortname>" --org-id "$RUDDER_ORG_ID" --json
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
Use these in order:
|
|
27
|
-
|
|
28
|
-
1. `agent me` to verify auth and org context
|
|
29
|
-
2. `agent config index` to discover installed runtimes
|
|
30
|
-
3. `agent config doc` to read one runtime's required fields and examples
|
|
31
|
-
4. `agent list` plus `agent config list/get` to reuse proven patterns from related agents
|
|
32
|
-
|
|
33
|
-
### Organization skills
|
|
34
|
-
|
|
35
|
-
```sh
|
|
36
|
-
rudder skill list --org-id "$RUDDER_ORG_ID" --json
|
|
37
|
-
rudder skill get "<skill-id>" --org-id "$RUDDER_ORG_ID" --json
|
|
38
|
-
rudder skill file "<skill-id>" --org-id "$RUDDER_ORG_ID" --path SKILL.md --json
|
|
39
|
-
rudder skill import --org-id "$RUDDER_ORG_ID" --source "<source>" --json
|
|
40
|
-
rudder skill scan-local --org-id "$RUDDER_ORG_ID" --roots "<csv>" --json
|
|
41
|
-
rudder skill scan-projects --org-id "$RUDDER_ORG_ID" --project-ids "<csv>" --workspace-ids "<csv>" --json
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
Use these before hiring when the new role needs `desiredSkills`.
|
|
45
|
-
|
|
46
|
-
`desiredSkills` accepts:
|
|
47
|
-
|
|
48
|
-
- exact organization skill key
|
|
49
|
-
- exact organization skill id
|
|
50
|
-
- exact slug when it is unique in the organization
|
|
51
|
-
|
|
52
|
-
### Canonical hire flow
|
|
53
|
-
|
|
54
|
-
```sh
|
|
55
|
-
rudder agent hire --org-id "$RUDDER_ORG_ID" --payload '{
|
|
56
|
-
"role": "cto",
|
|
57
|
-
"title": "Chief Technology Officer",
|
|
58
|
-
"reportsTo": "<ceo-agent-id>",
|
|
59
|
-
"capabilities": "Owns technical roadmap, architecture, staffing, execution",
|
|
60
|
-
"desiredSkills": ["vercel-labs/agent-browser/agent-browser"],
|
|
61
|
-
"agentRuntimeType": "codex_local",
|
|
62
|
-
"agentRuntimeConfig": {
|
|
63
|
-
"cwd": "/abs/path/to/repo",
|
|
64
|
-
"model": "o4-mini",
|
|
65
|
-
"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."
|
|
66
|
-
},
|
|
67
|
-
"runtimeConfig": {"heartbeat": {"enabled": true, "intervalSec": 300, "wakeOnDemand": true, "maxConcurrentRuns": 3}},
|
|
68
|
-
"sourceIssueId": "<issue-id>"
|
|
69
|
-
}' --json
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
Canonical semantics:
|
|
73
|
-
|
|
74
|
-
- this wraps `POST /api/orgs/:orgId/agent-hires`
|
|
75
|
-
- if the organization does not require board approval, the response contains `approval: null` and the agent is created directly
|
|
76
|
-
- if the organization requires board approval, the response contains both `agent` and `approval`, and the new agent stays `pending_approval`
|
|
77
|
-
|
|
78
|
-
Do not use `rudder approval create --type hire_agent` as a replacement for `agent hire` during normal skill execution. That is a lower-level compatibility surface and does not preserve the canonical direct-create behavior.
|
|
79
|
-
|
|
80
|
-
`agentRuntimeConfig.promptTemplate`, when used during hire, is for role/persona content. Rudder materializes it as the managed instruction bundle's `SOUL.md`. Write it as a durable SOUL document with mission, responsibilities, boundaries, decision principles, voice, and continuity when the role has ongoing authority. Do not include Rudder's shared operating contract in this field; supported local runtimes inject that contract from code.
|
|
81
|
-
|
|
82
|
-
### Approval follow-up
|
|
83
|
-
|
|
84
|
-
```sh
|
|
85
|
-
rudder approval get "<approval-id>" --json
|
|
86
|
-
rudder approval comment "<approval-id>" --body-file "<path>" --json
|
|
87
|
-
rudder approval resubmit "<approval-id>" --payload '{"...":"..."}' --json
|
|
88
|
-
rudder approval issues "<approval-id>" --json
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
Notes:
|
|
92
|
-
|
|
93
|
-
- `approval comment` should use markdown and link the approval, pending agent, and source issue when available
|
|
94
|
-
- `approval resubmit` is only for a revision-requested approval; update the payload instead of creating a second hire
|
|
95
|
-
- if the run wakes with `RUDDER_APPROVAL_ID`, treat that approval as the first task
|
|
96
|
-
|
|
97
|
-
## Payload Notes
|
|
98
|
-
|
|
99
|
-
The `agent hire` payload accepts the same shape as the hire API, including:
|
|
100
|
-
|
|
101
|
-
- `name` optional; blank or omitted means Rudder assigns a distinct first name
|
|
102
|
-
- `role`: one of `ceo`, `cto`, `cmo`, `cfo`, `engineer`, `designer`, `pm`, `qa`, `devops`, `researcher`, `general`
|
|
103
|
-
- `title`
|
|
104
|
-
- `icon` optional; omit it for normal hires so Rudder generates a DiceBear Notionists avatar automatically. Only provide an explicit DiceBear reference or uploaded `asset:<uuid>` image avatar reference when the board/UI supplied one.
|
|
105
|
-
- `reportsTo`
|
|
106
|
-
- `capabilities`
|
|
107
|
-
- `desiredSkills`
|
|
108
|
-
- `agentRuntimeType`
|
|
109
|
-
- `agentRuntimeConfig`
|
|
110
|
-
- `runtimeConfig`
|
|
111
|
-
- `budgetMonthlyCents`
|
|
112
|
-
- `metadata`
|
|
113
|
-
- `sourceIssueId`
|
|
114
|
-
- `sourceIssueIds`
|
|
115
|
-
|
|
116
|
-
`role` is a fixed enum. Do not invent role keys such as `founding_engineer`, `frontend_engineer`, or `reviewer`. Use the closest enum value, then put the specialization in `title`, `capabilities`, and `agentRuntimeConfig.promptTemplate`; for example use `"role": "engineer"` with `"title": "Founding Engineer"`.
|
|
117
|
-
|
|
118
|
-
Issue linkage rule:
|
|
119
|
-
|
|
120
|
-
- prefer `sourceIssueId` or `sourceIssueIds` inside the hire payload
|
|
121
|
-
- use `approval issues` to inspect the resulting approval links after the server creates them
|
|
122
|
-
|
|
123
|
-
## Related Commands
|
|
124
|
-
|
|
125
|
-
Post-hire adjustments use the normal agent and skill surfaces:
|
|
126
|
-
|
|
127
|
-
```sh
|
|
128
|
-
rudder agent get "<agent-id-or-shortname>" --org-id "$RUDDER_ORG_ID" --json
|
|
129
|
-
rudder agent skills enable "<agent-id>" "<selection-ref>" --json
|
|
130
|
-
rudder agent skills sync "<agent-id>" --desired-skills "<csv>" --json
|
|
131
|
-
rudder agent local-cli "<agent-id-or-shortname>" --org-id "$RUDDER_ORG_ID" --json
|
|
132
|
-
```
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: rudder-create-plugin
|
|
3
|
-
description: Create new Rudder plugins with the current alpha SDK/runtime. Use when scaffolding a plugin package, adding a new example plugin, or updating plugin authoring docs. Covers the supported worker/UI surface, route conventions, scaffold flow, and verification steps.
|
|
4
|
-
Create new Rudder plugins with the current alpha SDK/runtime. Use when
|
|
5
|
-
scaffolding a plugin package, adding a new example plugin, or updating plugin
|
|
6
|
-
authoring docs. Covers the supported worker/UI surface, route conventions,
|
|
7
|
-
scaffold flow, and verification steps.
|
|
8
|
-
allowed-tools:
|
|
9
|
-
disable: true
|
|
10
|
-
---
|
|
11
|
-
|
|
12
|
-
# Create a Rudder Plugin
|
|
13
|
-
|
|
14
|
-
Use this skill when the task is to create, scaffold, or document a Rudder plugin.
|
|
15
|
-
|
|
16
|
-
## 1. Ground rules
|
|
17
|
-
|
|
18
|
-
Read these first when needed:
|
|
19
|
-
|
|
20
|
-
1. `doc/engineering/PLUGIN_AUTHORING_GUIDE.md`
|
|
21
|
-
2. `packages/plugins/sdk/README.md`
|
|
22
|
-
3. `doc/engineering/PLUGIN_RUNTIME_CONTRACT.md` only for future-looking context
|
|
23
|
-
|
|
24
|
-
Current runtime assumptions:
|
|
25
|
-
|
|
26
|
-
- plugin workers are trusted code
|
|
27
|
-
- plugin UI is trusted same-origin host code
|
|
28
|
-
- worker APIs are capability-gated
|
|
29
|
-
- plugin UI is not sandboxed by manifest capabilities
|
|
30
|
-
- no host-provided shared plugin UI component kit yet
|
|
31
|
-
- `ctx.assets` is not supported in the current runtime
|
|
32
|
-
|
|
33
|
-
## 2. Preferred workflow
|
|
34
|
-
|
|
35
|
-
Use the scaffold package instead of hand-writing the boilerplate:
|
|
36
|
-
|
|
37
|
-
```bash
|
|
38
|
-
pnpm --filter @rudderhq/create-rudder-plugin build
|
|
39
|
-
node packages/plugins/create-rudder-plugin/dist/index.js <npm-package-name> --output <target-dir>
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
For a plugin that lives outside the Rudder repo, pass `--sdk-path` and let the scaffold snapshot the local SDK/shared packages into `.rudder-sdk/`:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
pnpm --filter @rudderhq/create-rudder-plugin build
|
|
46
|
-
node packages/plugins/create-rudder-plugin/dist/index.js @acme/plugin-name \
|
|
47
|
-
--output /absolute/path/to/plugin-repos \
|
|
48
|
-
--sdk-path /absolute/path/to/rudder/packages/plugins/sdk
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
Recommended target inside this repo:
|
|
52
|
-
|
|
53
|
-
- `packages/plugins/examples/` for example plugins
|
|
54
|
-
- another `packages/plugins/<name>/` folder if it is becoming a real package
|
|
55
|
-
|
|
56
|
-
## 3. After scaffolding
|
|
57
|
-
|
|
58
|
-
Check and adjust:
|
|
59
|
-
|
|
60
|
-
- `src/manifest.ts`
|
|
61
|
-
- `src/worker.ts`
|
|
62
|
-
- `src/ui/index.tsx`
|
|
63
|
-
- `tests/plugin.spec.ts`
|
|
64
|
-
- `package.json`
|
|
65
|
-
|
|
66
|
-
Make sure the plugin:
|
|
67
|
-
|
|
68
|
-
- declares only supported capabilities
|
|
69
|
-
- does not use `ctx.assets`
|
|
70
|
-
- does not import host UI component stubs
|
|
71
|
-
- keeps UI self-contained
|
|
72
|
-
- uses `routePath` only on `page` slots
|
|
73
|
-
- is installed into Rudder from an absolute local path during development
|
|
74
|
-
|
|
75
|
-
## 4. If the plugin should appear in the app
|
|
76
|
-
|
|
77
|
-
For bundled example/discoverable behavior, update the relevant host wiring:
|
|
78
|
-
|
|
79
|
-
- bundled example list in `server/src/routes/plugins.ts`
|
|
80
|
-
- any docs that list in-repo examples
|
|
81
|
-
|
|
82
|
-
Only do this if the user wants the plugin surfaced as a bundled example.
|
|
83
|
-
|
|
84
|
-
## 5. Verification
|
|
85
|
-
|
|
86
|
-
Always run:
|
|
87
|
-
|
|
88
|
-
```bash
|
|
89
|
-
pnpm --filter <plugin-package> typecheck
|
|
90
|
-
pnpm --filter <plugin-package> test
|
|
91
|
-
pnpm --filter <plugin-package> build
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
If you changed SDK/host/plugin runtime code too, also run broader repo checks as appropriate.
|
|
95
|
-
|
|
96
|
-
## 6. Documentation expectations
|
|
97
|
-
|
|
98
|
-
When authoring or updating plugin docs:
|
|
99
|
-
|
|
100
|
-
- distinguish current implementation from future spec ideas
|
|
101
|
-
- be explicit about the trusted-code model
|
|
102
|
-
- do not promise host UI components or asset APIs
|
|
103
|
-
- prefer npm-package deployment guidance over repo-local workflows for production
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## v4.3 framing evidence hardening
|
|
4
|
-
|
|
5
|
-
- Added sequencing guidance for requests that ask to optimize a skill after another live task: complete and verify the primary task first, then optimize from evidence.
|
|
6
|
-
- Added explicit treatment of strong user corrections as high-signal evidence, especially framing corrections and wrong-abstraction-level failures.
|
|
7
|
-
- Added framing checks for user outcome vs UI surface, scenario spine vs fixture rows, source of truth vs derivative signal, and product intent vs local convenience.
|
|
8
|
-
- Relaxed the final response contract for larger workflows so the primary task result can be reported before concise skill changes.
|
|
9
|
-
|
|
10
|
-
## v4.2 open-source package
|
|
11
|
-
|
|
12
|
-
- Added package mode and open-source project structure guidance.
|
|
13
|
-
- Added explicit adapter file lookup under `references/adapters/`.
|
|
14
|
-
- Added packaging expectations for README, examples, evals, changelog, and distributable skill zip.
|
|
15
|
-
- Preserved the generic analysis framework: core optimizer plus modular domain adapters.
|
|
16
|
-
|
|
17
|
-
## v4.1 adapter hardening
|
|
18
|
-
|
|
19
|
-
- Added explicit domain adapter use rule: source of truth, required inputs, review owner, authority gates, privacy, output template, validation cases, and must-not behaviors.
|
|
20
|
-
- Added benchmark reporting split for trigger accuracy, patch-quality coverage, and downstream transfer.
|
|
21
|
-
- Added warning that synthetic verifier scores are regression signals, not official leaderboard results.
|
|
22
|
-
|
|
23
|
-
## v4.0 generic
|
|
24
|
-
|
|
25
|
-
- Reframed Skill Optimizer from a software-focused hardening checklist into a domain-general analysis framework.
|
|
26
|
-
- Added universal optimization lens covering purpose, triggers, inputs, workflow, tools, outputs, quality, safety, failure, and maintainability.
|
|
27
|
-
- Moved domain-specific checks into modular adapter patterns.
|
|
28
|
-
- Added trigger optimization guidance and benchmark mode.
|
|
29
|
-
- Preserved strict patch safety around high-impact actions.
|
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: skill-optimizer
|
|
3
|
-
description: Improve, debug, benchmark, or refactor an existing Agent Skill from conversation evidence, execution traces, user corrections, eval failures, or target skill files. Use this skill whenever the user asks to optimize, harden, generalize, validate, benchmark, package, or turn observed behavior into durable skill changes. Produces evidence-based diagnosis, reviewable patches, trigger evals, validation cases, and safe next-run behavior; do not use it to perform the target skill's normal task.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Skill Optimizer
|
|
7
|
-
|
|
8
|
-
## Mission
|
|
9
|
-
|
|
10
|
-
Turn real usage evidence into safer, more reliable, easier-to-trigger, and easier-to-evaluate Agent Skills.
|
|
11
|
-
|
|
12
|
-
This is a meta-skill. It does not merely rewrite prose. It analyzes the fit between a skill's purpose, trigger description, inputs, procedure, tools, outputs, risks, examples, and evaluations, then proposes small reviewable changes.
|
|
13
|
-
|
|
14
|
-
## Use when
|
|
15
|
-
|
|
16
|
-
Use this skill when the user asks to improve, optimize, debug, refactor, benchmark, validate, generalize, harden, package, or document another skill. Also use it when the user says the current conversation should be captured into a skill, or that a previous skill run exposed something that should happen differently next time.
|
|
17
|
-
|
|
18
|
-
Do not use this skill for ordinary task execution. If the user asks to run the release skill, do not optimize the release skill unless they ask to improve it.
|
|
19
|
-
|
|
20
|
-
## Modes
|
|
21
|
-
|
|
22
|
-
- Diagnose: identify what should change without writing a patch.
|
|
23
|
-
- Patch: produce a reviewable diff, replacement section, or revised `SKILL.md`.
|
|
24
|
-
- Validate: create validation cases and failure-mode checks.
|
|
25
|
-
- Benchmark: compare the old and new skill using task cases, trigger cases, and deterministic rubrics.
|
|
26
|
-
- Package: organize the skill folder, references, scripts, examples, changelog, and README.
|
|
27
|
-
|
|
28
|
-
## Required inputs
|
|
29
|
-
|
|
30
|
-
Infer these from the conversation before asking follow-up questions:
|
|
31
|
-
|
|
32
|
-
- target skill name and purpose
|
|
33
|
-
- current `SKILL.md` and supporting files, if available
|
|
34
|
-
- execution evidence: user request, tool use, output, corrections, mistakes, delays, or surprises
|
|
35
|
-
- environment: chat, code agent, workspace agent, API, or another harness
|
|
36
|
-
- intended optimization mode
|
|
37
|
-
- risk level and write-action authority
|
|
38
|
-
- sequencing constraints when optimization is requested after another live task
|
|
39
|
-
|
|
40
|
-
If the target skill file is unavailable, do not fabricate an exact diff. Produce an inferred improvement plan, draft replacement sections, validation cases, and assumptions.
|
|
41
|
-
|
|
42
|
-
If the user asks to optimize a skill after completing another concrete task, finish and verify the concrete task first unless they explicitly ask to pause it. Then optimize from the observed evidence. Do not interrupt the user's primary workflow just because this skill is mentioned.
|
|
43
|
-
|
|
44
|
-
## Universal optimization lens
|
|
45
|
-
|
|
46
|
-
Analyze every target skill through these lenses:
|
|
47
|
-
|
|
48
|
-
1. Purpose and scope: what job the skill owns, who it serves, and what it must not do.
|
|
49
|
-
2. Triggering and boundaries: description quality, should-trigger cases, near-negative cases, competing skills, and under/over-triggering risks.
|
|
50
|
-
3. Inputs and assumptions: required inputs, source of truth, missing-data behavior, units, locale, time horizon, and user preferences.
|
|
51
|
-
4. Workflow and decision rules: ordered steps, branch conditions, heuristics, stop conditions, escalation paths, and exception handling.
|
|
52
|
-
5. Tools and authority: required tools, permissions, external writes, approvals, dry runs, and exact operations.
|
|
53
|
-
6. Outputs and interfaces: templates, file formats, citations, links, machine-readable fields, handoff artifacts, and user-facing summaries.
|
|
54
|
-
7. Quality bar and evaluation: success criteria, deterministic verifiers, examples, regression tests, trigger evals, and human review points.
|
|
55
|
-
8. Safety, privacy, and policy: sensitive data, regulated advice, consent, audit trail, access control, retention, and harmful misuse.
|
|
56
|
-
9. Failure and recovery: blocked states, retries, rollback, partial completion, cleanup, and user-visible status.
|
|
57
|
-
10. Maintainability: concise instructions, bundled resources, changelog, version notes, known limitations, and portability across harnesses.
|
|
58
|
-
|
|
59
|
-
Use `references/universal-optimization-lens.md` when a deeper diagnosis is needed.
|
|
60
|
-
|
|
61
|
-
## Evidence rules
|
|
62
|
-
|
|
63
|
-
Treat the current conversation as evidence, not as a script to memorize.
|
|
64
|
-
|
|
65
|
-
For each important observation, capture:
|
|
66
|
-
|
|
67
|
-
- Evidence: what happened or what the user corrected.
|
|
68
|
-
- Root cause: why the current skill allowed it.
|
|
69
|
-
- Durable change: what should be added, removed, or clarified.
|
|
70
|
-
- Classification: one-off instruction, reusable workflow rule, user/team preference, conflicting instruction, or open question.
|
|
71
|
-
|
|
72
|
-
Do not overfit one unusual task into a permanent rule. Convert it into a reusable rule only when it improves future behavior.
|
|
73
|
-
|
|
74
|
-
Treat strong user corrections as high-signal evidence. Phrases like "no", "not this", "wrong direction", "first principles", or a correction from a component-level answer to a user-scenario answer usually indicate a framing failure, not just a missing detail. Capture:
|
|
75
|
-
|
|
76
|
-
- the wrong abstraction level the previous run optimized for
|
|
77
|
-
- the user's intended source of truth
|
|
78
|
-
- what should have been downstream evidence rather than the starting point
|
|
79
|
-
- how the target skill should avoid the same drift next time
|
|
80
|
-
|
|
81
|
-
When the evidence comes from a multi-step execution, include the verification results, not only the final prose. A durable skill change should be grounded in what was requested, what was attempted, what was corrected, and what was ultimately validated.
|
|
82
|
-
|
|
83
|
-
## Framing and abstraction checks
|
|
84
|
-
|
|
85
|
-
Before proposing a patch, ask whether the target skill optimized the right object:
|
|
86
|
-
|
|
87
|
-
- User outcome vs. UI surface: a feature or component may be only a view over a deeper workflow.
|
|
88
|
-
- Scenario spine vs. fixture rows: realistic data should come from causal user activity, not isolated screen states.
|
|
89
|
-
- Source of truth vs. derivative signal: logs, runs, issues, costs, or decisions may be primary; dashboards, calendars, and summaries may be downstream.
|
|
90
|
-
- Product intent vs. local convenience: read available product, requirement, or reference docs before encoding a domain rule from one conversation.
|
|
91
|
-
|
|
92
|
-
If the observed failure is "the answer satisfied the visible surface but missed the user's real scenario", make that explicit in the diagnosis and add a workflow guard to the target skill rather than only adding more examples.
|
|
93
|
-
|
|
94
|
-
## Patch rules
|
|
95
|
-
|
|
96
|
-
Prefer small, auditable patches over broad rewrites. Preserve the target skill's identity, useful examples, and safety constraints.
|
|
97
|
-
|
|
98
|
-
A patch may change:
|
|
99
|
-
|
|
100
|
-
- frontmatter description and trigger boundaries
|
|
101
|
-
- required inputs and assumptions
|
|
102
|
-
- workflow steps and decision rules
|
|
103
|
-
- output templates
|
|
104
|
-
- safety and approval requirements
|
|
105
|
-
- failure handling
|
|
106
|
-
- examples and references
|
|
107
|
-
- validation cases and benchmark tasks
|
|
108
|
-
|
|
109
|
-
Never silently weaken safety requirements. For write actions, publishing, financial actions, medical or legal consequences, hiring decisions, external communication, deletion, deployment, migration, or permissions changes, require explicit authority unless the target skill already has a clear safe policy.
|
|
110
|
-
|
|
111
|
-
## Trigger optimization
|
|
112
|
-
|
|
113
|
-
The frontmatter description is the primary discovery signal. After improving a skill, evaluate whether the description should change.
|
|
114
|
-
|
|
115
|
-
Create trigger evals with:
|
|
116
|
-
|
|
117
|
-
- realistic should-trigger queries
|
|
118
|
-
- realistic should-not-trigger near misses
|
|
119
|
-
- ambiguous cases where another skill might be more appropriate
|
|
120
|
-
- casual phrasing, typos, file paths, role context, and domain language
|
|
121
|
-
|
|
122
|
-
Optimize for accurate triggering, not maximum triggering.
|
|
123
|
-
|
|
124
|
-
## Domain adaptation
|
|
125
|
-
|
|
126
|
-
This skill is domain-general. Do not bake one domain's checklist into the core instructions.
|
|
127
|
-
|
|
128
|
-
When the domain matters, attach or consult a short domain adapter. A good adapter names:
|
|
129
|
-
|
|
130
|
-
- source of truth
|
|
131
|
-
- required inputs
|
|
132
|
-
- review owner
|
|
133
|
-
- consequential actions and approval gates
|
|
134
|
-
- privacy, confidentiality, or consent constraints
|
|
135
|
-
- output template
|
|
136
|
-
- validation cases and deterministic checks
|
|
137
|
-
- must-not behaviors
|
|
138
|
-
|
|
139
|
-
Use the transcript to extract observed domain markers, but do not encode hidden rubric terms or unrelated best practices as mandatory rules. Keep adapters modular so the optimizer can handle software, healthcare operations, law, finance, education, research, HR, customer support, operations, creative work, personal productivity, and other workflows.
|
|
140
|
-
|
|
141
|
-
Use `references/domain-adapter-patterns.md` when building or selecting an adapter. If a matching file exists under `references/adapters/`, consult it as a compact checklist rather than copying it wholesale into the target skill.
|
|
142
|
-
|
|
143
|
-
## Validation format
|
|
144
|
-
|
|
145
|
-
Every meaningful behavior change needs at least one validation case.
|
|
146
|
-
|
|
147
|
-
Use this format:
|
|
148
|
-
|
|
149
|
-
```md
|
|
150
|
-
### Case: <name>
|
|
151
|
-
|
|
152
|
-
Input:
|
|
153
|
-
...
|
|
154
|
-
|
|
155
|
-
Expected behavior:
|
|
156
|
-
...
|
|
157
|
-
|
|
158
|
-
Must not:
|
|
159
|
-
...
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
Include at least one normal case, one edge case, and one regression case when the change could break prior behavior.
|
|
163
|
-
|
|
164
|
-
## Benchmark reporting
|
|
165
|
-
|
|
166
|
-
When running evals, separate three scores:
|
|
167
|
-
|
|
168
|
-
1. Trigger accuracy: whether Skill Optimizer should activate.
|
|
169
|
-
2. Patch-quality coverage: whether the proposed change includes evidence, scope classification, patch, safety, outputs, and validation.
|
|
170
|
-
3. Downstream transfer: whether the optimized target skill actually improves on its own task suite.
|
|
171
|
-
|
|
172
|
-
Label synthetic verifier scores as synthetic. Do not report them as official benchmark or leaderboard results.
|
|
173
|
-
|
|
174
|
-
## Packaging expectations
|
|
175
|
-
|
|
176
|
-
When packaging a skill or skill optimizer project, include:
|
|
177
|
-
|
|
178
|
-
- `SKILL.md` and supporting references
|
|
179
|
-
- README with purpose, installation, usage, eval, limitations, and license
|
|
180
|
-
- changelog and version note
|
|
181
|
-
- examples of target skills and optimization outputs
|
|
182
|
-
- eval cases or a lightweight benchmark harness when available
|
|
183
|
-
- a distributable zip that contains exactly one skill folder for installation
|
|
184
|
-
|
|
185
|
-
## Final response contract
|
|
186
|
-
|
|
187
|
-
Return these sections unless the user asks for a narrower result:
|
|
188
|
-
|
|
189
|
-
1. Target skill and optimization mode
|
|
190
|
-
2. Diagnosis summary
|
|
191
|
-
3. Evidence ledger
|
|
192
|
-
4. Improvement categories
|
|
193
|
-
5. Proposed patch or revised skill draft
|
|
194
|
-
6. Trigger eval suggestions when discovery may change
|
|
195
|
-
7. Validation cases
|
|
196
|
-
8. Benchmark or eval result, if run
|
|
197
|
-
9. Assumptions, conflicts, and unresolved questions
|
|
198
|
-
|
|
199
|
-
When direct file editing is available and the user explicitly requested edits, apply the patch. Otherwise present a reviewable patch.
|
|
200
|
-
|
|
201
|
-
When optimization is part of a larger completed workflow, keep the final response proportional: report the primary task result first, then the skill changes and validation. Do not force the full nine-section contract if it would obscure the work the user was actually trying to finish.
|
|
202
|
-
|
|
203
|
-
## Quality bar
|
|
204
|
-
|
|
205
|
-
A successful optimization makes the next run of the target skill more predictable, easier to trigger correctly, safer around irreversible actions, clearer in output, and easier to verify.
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
# Creative, Brand, and Content Skill Optimization Adapter
|
|
2
|
-
|
|
3
|
-
## Sources of truth
|
|
4
|
-
- Brand guide, campaign brief, rights/licensing records, channel specs, localization glossary.
|
|
5
|
-
|
|
6
|
-
## Required inputs
|
|
7
|
-
- audience
|
|
8
|
-
- channel
|
|
9
|
-
- brand voice
|
|
10
|
-
- claims that need substantiation
|
|
11
|
-
- rights and review owner
|
|
12
|
-
|
|
13
|
-
## Risk gates
|
|
14
|
-
- legal/brand review for external content
|
|
15
|
-
- rights/licensing check
|
|
16
|
-
- accessibility and localization review
|
|
17
|
-
|
|
18
|
-
## Output expectations
|
|
19
|
-
- creative brief, draft, claims table, review checklist, channel variants
|
|
20
|
-
|
|
21
|
-
## Must not
|
|
22
|
-
- must not make unsupported claims
|
|
23
|
-
- must not use unlicensed content
|
|
24
|
-
- must not ignore accessibility/localization constraints
|
|
25
|
-
|
|
26
|
-
## Validation prompts
|
|
27
|
-
|
|
28
|
-
- What normal case proves the improvement works?
|
|
29
|
-
- What edge case catches missing context or low confidence?
|
|
30
|
-
- What regression case prevents the old failure from returning?
|