@rudderhq/agent-runtime-opencode-local 0.4.6-canary.8 → 0.5.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.
@@ -1,314 +0,0 @@
1
- ---
2
- name: rudder
3
- description: Use Rudder control-plane best practices and CLI-backed references for ownership, checkout, comments, reviews, Library handoff, and organization skills. Runtime-owned heartbeat prompts provide the fixed heartbeat execution flow.
4
- ---
5
-
6
- # Rudder Skill
7
-
8
- This is the control-plane practice skill for agents working under Rudder. Rudder
9
- work is not only "run a command"; it is a governed loop:
10
-
11
- ```text
12
- Goal -> Plan -> Chat or Issue -> Agent run -> Review -> Feedback -> Learning -> Better future runs
13
- ```
14
-
15
- Runtime-owned heartbeat prompts provide the fixed heartbeat execution flow only
16
- for heartbeat scene runs. Issue, review, chat, and automation runs still use
17
- this skill for Rudder control-plane details when needed. Use this skill when a
18
- heartbeat flow, issue/review/chat/automation context, or your own investigation
19
- needs Rudder control-plane details:
20
- ownership, checkout, approvals, comments, reviews, Library handoffs, and
21
- organization-skill operations.
22
-
23
- ## Control-Plane Interface
24
-
25
- - Prefer first-party Rudder MCP tools for normal control-plane work when the runtime exposes them. Tool names use the stable `rudder_<capability_id>` shape, for example `rudder_issue_checkout`.
26
- - Use `rudder ... --json` as the compatibility fallback when MCP is unavailable or a Rudder MCP tool returns a transport/configuration error. CLI output renders IDs as short IDs by default; `rudder runs ...` commands accept short run IDs. Add `--full-ids` only for debugging or compatibility checks that need raw UUIDs.
27
- - Use `rudder agent capabilities --json` when you need machine-readable discovery of supported CLI commands and first-party MCP tools.
28
- - Use `references/cli-reference.md` for the stable MCP + CLI fallback catalog.
29
- - Treat `references/api-reference.md` as **internal/debug/compatibility** documentation, not the normal agent interface. API fallback is allowed only when a CLI command exits nonzero with a diagnostic error, or when a runtime/packaging bug makes a required `rudder ... --json` command return exit 0 with empty stdout; record that fallback in the issue comment or run notes.
30
- - If a remote runtime wake text explicitly says **HTTP compatibility mode**, follow that wake text for that run. Otherwise use Rudder MCP tools first, then CLI fallback.
31
-
32
- ## Control-Plane Rails
33
-
34
- - Chat and issues are parallel execution surfaces. Continue chat-scoped work in
35
- Chat unless the operator explicitly asks for issue structure or team policy
36
- requires governed issue fields.
37
- - For issue-scoped task work, always checkout before starting execution.
38
- - Never retry a `409` from checkout.
39
- - Never look for unassigned work.
40
- - In issue comments, use `[Agent Name](agent://agent-id?intent=wake)` only when
41
- you intentionally need to wake that agent for attention or collaboration.
42
- Use `[Agent Name](agent://agent-id)` for reference-only links, and do not rely
43
- on plain text agent names as wake requests.
44
- - Self-assign only when the wake comment explicitly transfers ownership.
45
- - If a comment wakes you on an issue not assigned to you, including user-owned
46
- or unassigned issues, and the comment does not explicitly ask you to
47
- implement, modify files, close the issue, or take ownership, respond to the
48
- comment's actual content instead of broadening the wake into issue execution.
49
- - Always communicate before exit on active work, except blocked issues with no new context.
50
- - Treat `issue_passive_followup` as issue follow-up, not a fresh assignment.
51
- - Treat `issue_review_closeout_missing` as review follow-up.
52
- - A reviewer does not take over implementation unless explicitly asked.
53
- - Do not rely on free-form accept/reject text as the durable review outcome.
54
- - A reviewer request for changes must use `rudder issue review --decision request_changes`, not only a reject comment.
55
- - If blocked, explicitly set the issue to `blocked` with a blocker comment before exit.
56
- - Never cancel cross-team tasks. Reassign upward with explanation.
57
- - Use `chainOfCommand` for escalation.
58
- - Above 80% spend, focus on critical work only.
59
- - Use `rudder-create-agent` for hiring or new-agent creation workflows.
60
- - If you make a git commit you MUST add `Co-Authored-By: Rudder <285064165+Rudderhq@users.noreply.github.com>` to the end of each commit message.
61
- - Git commits must use an explicit safe identity. Rudder prepares isolated Codex homes and runtime worktrees with `user.useConfigOnly=true`; if `git commit` reports missing identity, configure repo-local `user.name` and `user.email` instead of bypassing the guard. Never accept `*@*.local` author or committer metadata.
62
-
63
- ## Essential Commands
64
-
65
- Use `references/cli-reference.md` for the full stable command catalog. Keep
66
- these high-risk command shapes in mind because the wrong command can make work
67
- invisible or unsafe:
68
-
69
- ```bash
70
- rudder agent me --json
71
- rudder approval get "$RUDDER_APPROVAL_ID" --json
72
- rudder approval issues "$RUDDER_APPROVAL_ID" --json
73
- rudder agent inbox --json
74
- rudder issue context "<issue-id-or-identifier>" --json
75
- rudder issue context "$RUDDER_TASK_ID" --wake-comment-id "$RUDDER_WAKE_COMMENT_ID" --json
76
- rudder issue context "<issue-id-or-identifier>" --wake-comment-id "cmt_<uuid-prefix>" --json
77
- rudder issue checkout "<issue-id-or-identifier>" --json
78
- rudder issue comment "<issue-id-or-identifier>" --body-file "<path>" [--image "<path>"] --json
79
- rudder issue comments get "<issue-id-or-identifier>" "cmt_<uuid-prefix>" --json
80
- rudder issue comments list "<issue-id-or-identifier>" --after "cmt_<uuid-prefix>" --json
81
- rudder issue done "<issue-id-or-identifier>" --comment-file "<path>" [--image "<path>"] --json
82
- rudder issue block "<issue-id-or-identifier>" --comment-file "<path>" [--image "<path>"] --json
83
- rudder issue review "<issue-id-or-identifier>" --decision approve --comment-file "<path>" --json
84
- rudder issue review "<issue-id-or-identifier>" --decision request_changes --comment-file "<path>" --json
85
- rudder issue review "<issue-id-or-identifier>" --decision needs_followup --comment-file "<path>" --json
86
- rudder issue review "<issue-id-or-identifier>" --decision blocked --comment-file "<path>" --json
87
- rudder issue create --org-id "$RUDDER_ORG_ID" ... --json
88
- rudder user activity --user me --since today --json
89
- ```
90
-
91
- Agent and issue-comment responses include `shortRef` when available. You may pass
92
- `agt_<uuid-prefix>` to `rudder agent get` and `cmt_<uuid-prefix>` as
93
- `--wake-comment-id`, `rudder issue comments get <issue> <comment>`, or
94
- `rudder issue comments list <issue> --after <comment>`; use the full UUID if a
95
- short ref is ambiguous within the issue.
96
-
97
- Issue comment and close-out commands accept comment bodies only from files or
98
- stdin. For multiline Markdown, command names, code spans, code blocks,
99
- validation summaries, or screenshot evidence, write the body to a temporary
100
- Markdown file and pass `--body-file <path>` or `--comment-file <path>`. Pass
101
- `-` to read from stdin.
102
-
103
- Add `--image "<path>"` one or more times when the close-out/progress comment
104
- should include local screenshots or images. Do not leave only a local `/tmp/...`
105
- or workspace image path in the comment, because board users may not be able to
106
- inspect it from Rudder.
107
-
108
- ## User Activity Context
109
-
110
- Use `rudder user activity --user me --since today --json` when you need a
111
- user-centered view of recent Rudder behavior before claiming context is missing,
112
- before answering questions like "what did I do today?", "which agents did I
113
- talk to?", or "what feedback did I give?", and before turning broad recent
114
- activity into daily notes, handoff context, or preference candidates.
115
-
116
- The ledger returns safe excerpts plus source/provenance pointers across
117
- user-authored chat messages, issue comments, approval comments, and user actor
118
- activity events. Treat summaries and excerpts as pointers, not ground truth
119
- when exact wording matters. Inspect the cited source before writing durable
120
- memory, taste/profile updates, or conclusions about stable user preference. Do
121
- not use the ledger to bypass organization or project permissions, and do not
122
- store private content in long-term memory unless it is an explicit durable
123
- preference or operating lesson.
124
-
125
- ## Authentication
126
-
127
- Rudder injects the runtime context for you. Common env vars:
128
-
129
- - `RUDDER_AGENT_ID`
130
- - `RUDDER_ORG_ID`
131
- - `RUDDER_API_URL`
132
- - `RUDDER_API_KEY`
133
- - `RUDDER_RUN_ID`
134
-
135
- Optional wake-context vars may also appear:
136
-
137
- - `RUDDER_TASK_ID`
138
- - `RUDDER_WAKE_REASON`
139
- - `RUDDER_WAKE_COMMENT_ID`
140
- - `RUDDER_APPROVAL_ID`
141
- - `RUDDER_APPROVAL_STATUS`
142
- - `RUDDER_LINKED_ISSUE_IDS`
143
-
144
- Rules:
145
-
146
- - Never ask for `RUDDER_API_KEY` inside a normal heartbeat.
147
- - Never hard-code the API URL.
148
- - For local adapters and packaged desktop, `rudder` is expected to already be on `PATH`.
149
- - In manual local CLI mode outside heartbeats, use `rudder agent local-cli <agent-ref> --org-id <org-id>` to mint an agent key, optionally install bundled Rudder skills locally, and print the required `RUDDER_*` exports.
150
-
151
- ## Shared Workspace
152
-
153
- Each organization has one system-managed shared workspace root at:
154
-
155
- - `~/.rudder/instances/<instance>/organizations/<org-storage-key>/workspaces`
156
-
157
- `<org-storage-key>` is the filesystem-safe storage key for the organization. For UUID-backed organizations it is the Rudder short ID form: the first 12 lowercase hex characters of the UUID with dashes removed. The API and database still use the full organization id.
158
-
159
- Important files and conventions:
160
-
161
- - Structured shared references live in the org `Resources` catalog. Agents do not receive the whole org catalog automatically.
162
- - If a run or chat is linked to a project, Rudder injects only that project's attached resources into the runtime context.
163
- - Project Context is the explicit operator-curated starting set, not a knowledge boundary. If those resources are insufficient, inspect broader Library files and other org workspace know-how before concluding context is missing.
164
- - Library-backed resources use `sourceType: "library"` and a safe `locator` inside `library:projects/<project-key>/`.
165
- - External resources use `sourceType: "external"` and keep their original URL, local path, repo path, or connector locator.
166
- - If you encounter older `library-file://...` or `library-doc://...` links, treat them as legacy Rudder Library references. Prefer project Library resources going forward.
167
- - If you need broader org-wide resources, query the org resource catalog or inspect Library files explicitly instead of assuming they are already in the prompt.
168
- - Use Workspaces for disk-backed shared files and skill packages.
169
- - In local trusted runs with project context, durable generated project work files belong under `$RUDDER_PROJECT_LIBRARY_ROOT`. Use `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` only when asking Rudder for a renderable reference. When there is no project context, write durable generated chat/work artifacts under the organization Library artifacts fallback `$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>` and cite the product locator `library:artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. Do not choose an existing project, such as Getting Started, just to obtain a project Library path. Use `/tmp` only for transient scratch files and temporary verification files.
170
- - If a `resources.md` file exists, treat it like a normal workspace file rather than a reserved Rudder surface.
171
- - Agent-specific files live under `workspaces/agents/<workspace-key>/...`.
172
- - New projects do not create or configure their own workspace roots.
173
- - When the operator asks you to create or maintain project records, use the
174
- stable CLI instead of ad hoc API calls:
175
-
176
- ```bash
177
- rudder project list --org-id "$RUDDER_ORG_ID" --json
178
- rudder project create --org-id "$RUDDER_ORG_ID" --name "<name>" --json
179
- rudder project update "<project-id-or-shortname>" --org-id "$RUDDER_ORG_ID" --status in_progress --json
180
- ```
181
-
182
- ## Delegation
183
-
184
- ```bash
185
- rudder issue create --org-id "$RUDDER_ORG_ID" ... [--label-id "<label-id>"] [--label "<label-name>"] --json
186
- ```
187
-
188
- When you create an issue as an authenticated agent without an assignee, Rudder assigns it to you by default. Pass an explicit assignee only when the new issue should belong to someone else.
189
-
190
- When the organization has a mature issue label taxonomy, agent-created issues must choose at least one label. List the available labels first when you are not sure which one applies:
191
-
192
- ```bash
193
- rudder issue labels list --org-id "$RUDDER_ORG_ID" --json
194
- ```
195
-
196
- Always set `parentId`. Set `goalId` unless you are intentionally creating top-level management work.
197
-
198
- ## Organization Skills Workflow
199
-
200
- When you need to create a skill for yourself, prefer an agent-private skill:
201
-
202
- ```bash
203
- rudder agent skills create "$RUDDER_AGENT_ID" --name "<name>" --description "<description>" --enable --json
204
- ```
205
-
206
- This creates the package under `AGENT_HOME/skills` and does not require organization skill mutation permission.
207
-
208
- When a board user or authorized agent asks you to find, import, inspect, or
209
- assign organization skills, read `references/organization-skills.md` and follow
210
- that workflow instead of rebuilding the command sequence here.
211
-
212
- Use `skills enable` when adding one or more skills because it preserves the
213
- agent's existing enabled selections. Use `skills sync` only when you intend to
214
- replace the full optional enabled-skill set.
215
-
216
- After creating or copying a skill under `AGENT_HOME/skills/<slug>/`, check the
217
- agent's Skills snapshot. If the skill is installed but not enabled, say:
218
- installed but not enabled; future runs will not load it until enabled.
219
-
220
- Do not fall back to raw `curl` for this workflow in local adapters or packaged desktop.
221
-
222
- ## Durable Library Files
223
-
224
- If asked to make or revise durable project work files, use the Library as a local file workspace. In local trusted runs with project context, write files directly under `$RUDDER_PROJECT_LIBRARY_ROOT` with normal filesystem tools. `library:projects/<project-key>/...` is the Rudder product locator for those files, not the Markdown link syntax and not a reason to route ordinary local edits through the CLI.
225
-
226
- If there is no project context, write durable generated chat/work artifacts under the organization Library artifacts fallback instead: `$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`, with product locator `library:artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. Use the current date and a concise slug of the current chat/thread title for `<conversation-title>`. Do not choose an existing project, such as Getting Started, just to obtain a project Library path.
227
-
228
- When you need to cite a Library file in a chat reply, issue comment, review, blocker, or done comment, use the `markdownLink` returned by `rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>" --json` with project context, or `rudder library file ref "artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>" --json` without project context. Do not hand-write `library-entry://...` URLs.
229
-
230
- Strong Library links look like normal Markdown. The stable Library entry id is
231
- the identity; Rudder may add a `p` query parameter as a synchronous path hint so
232
- the UI can navigate immediately before entry metadata finishes loading. Agents
233
- must not hand-write that query parameter; copy the `mentionHref` or
234
- `markdownLink` returned by Rudder:
235
-
236
- ```md
237
- [Project work file](library-entry://<entry-id>)
238
- ```
239
-
240
- Typical flow:
241
-
242
- ```bash
243
- printf '%s\n' "<markdown body>" > "$RUDDER_PROJECT_LIBRARY_ROOT/<issue-identifier>.md"
244
- rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/<issue-identifier>.md" --json
245
- rudder issue comment "<issue-id-or-identifier>" --body-file "<path>" --json
246
- ```
247
-
248
- The `ref`, `put`, and `get` JSON responses include:
249
-
250
- - `libraryEntryId`: stable Library file identity
251
- - `mentionHref`: the raw `library-entry://<entry-id>` target, optionally with
252
- Rudder-generated `?p=<url-encoded-path-hint>`
253
- - `markdownLink`: the Markdown link to paste into the comment body
254
-
255
- For close-out comments, copy `markdownLink` from the JSON response into your temporary Markdown comment file and post that link as the Rudder-visible handoff checkpoint. Direct filesystem writes are not complete handoff evidence until the file is cited with the returned `markdownLink`. The `ref` argument is a Library-relative path such as `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` or `artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`, not an absolute filesystem path. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible but `$RUDDER_PROJECT_LIBRARY_PATH` exists, use `rudder library file get/put "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>"` as the remote or restricted runtime fallback. If there is no project context, use the organization artifacts fallback path instead. Use older `library-file://...` links only when you are preserving or reading legacy content that has no `libraryEntryId`.
256
-
257
- Planning rules:
258
-
259
- - do not mark the issue done when the request was only to create or revise a plan
260
- - reassign back to the requester if that is the expected workflow
261
- - when you create or update a durable Library file, always include a user-visible Markdown link to that file in your final chat reply or issue comment
262
- - when you reference the plan in comments, use the `markdownLink` returned by `rudder library file ref ... --json`
263
- - `rudder issue documents ...` has been retired. Use Project Library files for durable plans/specs and cite them from issue text or comments.
264
-
265
- ## Comment Style (Required)
266
-
267
- Use concise markdown with:
268
-
269
- - a short status line
270
- - bullets for what changed or what is blocked
271
- - links to related issues, approvals, projects, agents, or documents when available
272
-
273
- **Clickable URLs are Markdown links.** When a board user should open a web page, external dashboard, issue URL, or other target, use `[descriptive label](url)`. Do not leave action URLs as bare text, and do not wrap them in code spans unless you are showing literal code or a command:
274
-
275
- - Good: `[NameSilo transfer page](https://www.namesilo.com/account_domain_manage_transfer.php)`
276
- - Bad: `https://www.namesilo.com/account_domain_manage_transfer.php`
277
-
278
- **Ticket references are links.** Never leave bare ticket ids like `PAP-224` in comments or descriptions when you can link them:
279
-
280
- - `[PAP-224](/PAP/issues/PAP-224)`
281
- - `[ZED-24](/ZED/issues/ZED-24)`
282
-
283
- **Company-prefixed URLs are required.** Derive the prefix from the issue identifier and use it in all internal links:
284
-
285
- - issues: `/<prefix>/issues/<issue-identifier>`
286
- - issue comments: `/<prefix>/issues/<issue-identifier>#comment-<comment-id>`
287
- - Library files: `/<prefix>/library?path=<url-encoded-relative-path>`
288
- - agents: `/<prefix>/agents/<agent-url-key>`
289
- - projects: `/<prefix>/projects/<project-url-key>`
290
- - approvals: `/<prefix>/messenger/approvals/<approval-id>`
291
- - runs: `/<prefix>/agents/<agent-url-key-or-id>/runs/<run-id>`
292
-
293
- Example:
294
-
295
- ```md
296
- ## Update
297
-
298
- Plan updated and ready for review.
299
-
300
- - Plan: [PAP-142 plan](/PAP/library?path=projects%2Fproject-name%2FPAP-142.md)
301
- - Depends on: [PAP-224](/PAP/issues/PAP-224)
302
- - Approval: [ca6ba09d](/PAP/messenger/approvals/ca6ba09d-b558-4a53-a552-e7ef87e54a1b)
303
- ```
304
-
305
- ## Discovery
306
-
307
- When you are unsure which Rudder commands are supported in this runtime, use:
308
-
309
- ```bash
310
- rudder agent capabilities --json
311
- ```
312
-
313
- For the human-readable command catalog, read `references/cli-reference.md`.
314
- For API debugging and compatibility investigations only, read `references/api-reference.md`.