@rudderhq/agent-runtime-cursor-local 0.4.6-canary.9 → 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.
@@ -0,0 +1,132 @@
1
+ ---
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 artifact path only when thread-scoped output is available. 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 inline visual capture. HTML artifacts require a thread-scoped visualization directory exposed by the current runtime."
5
+ ---
6
+
7
+ # Visualize
8
+
9
+ Create a visual only when it materially improves what the user can understand,
10
+ compare, or decide. The Rudder inline runtime is scriptless and has no network
11
+ access, so design for a useful first render with declarative HTML, SVG, and CSS.
12
+
13
+ ## Choose The Output
14
+
15
+ 1. Use a normal fenced Mermaid block when labeled nodes and edges fully explain
16
+ a static structure or flow. Do not create an HTML artifact for that case.
17
+ 2. Use an inline visual for charts, timelines, comparisons, spatial layouts,
18
+ static scenario views, or compact reports that benefit from custom geometry.
19
+ 3. Create an HTML artifact only when the current run exposes a writable,
20
+ thread-scoped visualization directory ending in
21
+ `visualizations/YYYY/MM/DD/<thread-id>`. Use the exact directory from the
22
+ runtime's writable roots. Never infer, scan for, or create another thread's
23
+ directory.
24
+ 4. If that directory is unavailable, fall back to Mermaid, Markdown tables, or
25
+ concise prose. Do not emit a directive that Rudder cannot resolve.
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.
31
+ - Write only an HTML fragment. Do not include a doctype or `html`, `head`, or
32
+ `body` elements.
33
+ - Keep every fragment under 2 MiB and emit at most three visuals in one
34
+ assistant message.
35
+ - Give the fragment one top-level markup root, `<div id="widget">`. Bounded
36
+ `<style>` blocks may precede that root.
37
+ - Put any custom CSS in bounded `<style>` elements. Inline `style` attributes
38
+ are removed.
39
+ - Read the file back before replying. Fix escaped markup such as literal `\"`
40
+ or `\n`, missing labels, clipped content, and malformed SVG.
41
+ - Add this exact directive on its own line where the visual should render:
42
+
43
+ ```text
44
+ ::codex-inline-vis{file="<title>.html"}
45
+ ```
46
+
47
+ Use only the `file` attribute. The value must be a basename ending in `.html`;
48
+ paths, separators, traversal, extra attributes, and alternate quoting are
49
+ rejected. Keep any necessary explanation outside the fragment and do not add a
50
+ second Markdown link to the file.
51
+
52
+ ## Rudder Safety Boundary
53
+
54
+ Rudder sanitizes the fragment before rendering, but generate valid input rather
55
+ than relying on sanitization:
56
+
57
+ - Do not write scripts, event handlers, JavaScript URLs, forms, links, images,
58
+ media, nested frames, embedded objects, canvas, or external resources.
59
+ - Do not use `fetch`, XHR, WebSocket, module imports, CDN libraries, web fonts,
60
+ or URL-bearing CSS. The artifact has no network access.
61
+ - Do not use active controls such as buttons, inputs, selects, or textareas.
62
+ They are removed because the scriptless runtime cannot preserve their state
63
+ or behavior safely.
64
+ - Do not implement a parent bridge, follow-up prompt action, filesystem access,
65
+ or access to Rudder state, credentials, cookies, storage, or APIs.
66
+ - Use `<details>` and `<summary>` for the only stateful native disclosure.
67
+ Use `data-tooltip` on `<summary>` for short supplementary hover/focus text.
68
+ A tooltip on any other preserved element is hover-only and must not contain
69
+ essential information.
70
+ - Keep all data needed for the visual inside the fragment. Use inline SVG for
71
+ charts and supplied geometry; never fetch a basemap or invent geography.
72
+
73
+ Read [references/runtime-contract.md](references/runtime-contract.md) before
74
+ writing custom markup or CSS. Use
75
+ [assets/example-chart.html](assets/example-chart.html) as a structure example,
76
+ not as data or copy to repeat.
77
+
78
+ ## Composition
79
+
80
+ - Start with the visual itself. Do not add decorative KPI rows, repeated
81
+ legends, permanent toolbars, or explanatory paragraphs inside the fragment.
82
+ - Use one dominant chart, diagram, or comparison. Add up to three compact
83
+ summary cards only when their values are central to reading the visual.
84
+ - For a requested simulator or adjustable explorer, show representative static
85
+ scenarios or a disclosure-based comparison and state the limitation in the
86
+ surrounding response. Do not pretend controls survived when they cannot.
87
+ - For maps, use only user-supplied or locally available geometry that can be
88
+ embedded as safe SVG. Otherwise choose a table, ranked plot, or schematic.
89
+ - Keep the outer surface transparent and unframed. Use `.card` only for a real
90
+ bounded summary or detail; never nest cards.
91
+
92
+ ## Layout And Accessibility
93
+
94
+ - Design for the full Chat width around 736px and reflow cleanly down to 320px.
95
+ - Avoid fixed outer widths, viewport-height layouts, horizontal scrolling,
96
+ fixed positioning, and clipped labels.
97
+ - Use semantic headings sparingly. Do not restate the user prompt or render a
98
+ title inside the fragment when the surrounding Markdown already names it.
99
+ - Give each meaningful SVG `role="img"` plus an accessible name or description.
100
+ Include `<title>` and `<desc>` when they improve screen-reader output.
101
+ - Label important values directly. Add a legend only when multiple series
102
+ cannot be labeled on the marks.
103
+ - Pair color with text, shape, or line style so meaning never depends on color
104
+ alone.
105
+
106
+ ## Theme And Utilities
107
+
108
+ - Use Rudder theme variables for every color. Start with `--foreground`,
109
+ `--muted-foreground`, `--border`, and `--viz-series-1`; use
110
+ `--viz-series-2` through `--viz-series-6` only for stable categories.
111
+ - Use host utilities such as `.viz-grid`, `.viz-row`, `.viz-stat`,
112
+ `.viz-stat-value`, `.viz-badge`, `.card`, `.text-small`, `.text-muted`,
113
+ `.text-destructive`, and `.sr-only` before adding custom CSS.
114
+ - Keep custom selectors scoped below `#widget`. Use only theme variables already
115
+ provided by Rudder; custom CSS variables are removed.
116
+ - Use normal text by default and weights 400 or 500. Reserve compact secondary
117
+ text for annotations, never essential labels.
118
+
119
+ ## Verification
120
+
121
+ Before replying:
122
+
123
+ 1. Confirm the file is in the exact current-thread visualization directory,
124
+ uses an allowed basename, is below 2 MiB, and the message has no more than
125
+ three directives.
126
+ 2. Confirm the fragment contains no scripts, handlers, URLs, external assets,
127
+ active controls, document-level elements, or unsupported embeds.
128
+ 3. Confirm SVG view boxes, labels, referenced IDs, table semantics, and CSS
129
+ selectors are valid.
130
+ 4. Check both narrow and wide layout when a preview path is available. If not,
131
+ keep the geometry responsive and the composition conservative.
132
+ 5. Emit the directive only after the file is complete and readable.
@@ -0,0 +1,7 @@
1
+ interface:
2
+ display_name: "Visualize"
3
+ short_description: "Create safe inline visuals in Rudder Chat"
4
+ default_prompt: "Use $visualize to create a clear Rudder-native chart, diagram, comparison, or other inline visual when it improves understanding."
5
+
6
+ policy:
7
+ allow_implicit_invocation: true
@@ -0,0 +1,89 @@
1
+ <style>
2
+ #widget .example-chart {
3
+ display: grid;
4
+ gap: 12px;
5
+ }
6
+
7
+ #widget .example-chart-bars {
8
+ display: grid;
9
+ grid-template-columns: repeat(4, minmax(0, 1fr));
10
+ align-items: end;
11
+ gap: 10px;
12
+ min-height: 180px;
13
+ padding-block: 8px;
14
+ border-bottom: 1px solid var(--border);
15
+ }
16
+
17
+ #widget .example-chart-bar {
18
+ display: grid;
19
+ grid-template-rows: 1fr auto;
20
+ align-items: end;
21
+ gap: 6px;
22
+ min-width: 0;
23
+ color: var(--foreground);
24
+ text-align: center;
25
+ }
26
+
27
+ #widget .example-chart-bar-mark {
28
+ width: 100%;
29
+ min-height: 12px;
30
+ border-radius: var(--radius) var(--radius) 0 0;
31
+ background: var(--viz-series-1);
32
+ }
33
+
34
+ #widget .example-chart-bar:nth-child(1) .example-chart-bar-mark {
35
+ height: 52px;
36
+ }
37
+
38
+ #widget .example-chart-bar:nth-child(2) .example-chart-bar-mark {
39
+ height: 72px;
40
+ }
41
+
42
+ #widget .example-chart-bar:nth-child(3) .example-chart-bar-mark {
43
+ height: 98px;
44
+ }
45
+
46
+ #widget .example-chart-bar:nth-child(4) .example-chart-bar-mark {
47
+ height: 118px;
48
+ }
49
+
50
+ @media (max-width: 420px) {
51
+ #widget .example-chart-bars {
52
+ gap: 5px;
53
+ }
54
+ }
55
+ </style>
56
+ <div id="widget">
57
+ <figure class="example-chart" aria-labelledby="example-chart-caption">
58
+ <figcaption id="example-chart-caption">
59
+ Completed loops by week
60
+ </figcaption>
61
+ <div class="example-chart-bars" role="img" aria-label="Completed loops rose from 8 to 18 over four weeks">
62
+ <div class="example-chart-bar">
63
+ <div class="example-chart-bar-mark"></div>
64
+ <span class="text-small">8</span>
65
+ </div>
66
+ <div class="example-chart-bar">
67
+ <div class="example-chart-bar-mark"></div>
68
+ <span class="text-small">11</span>
69
+ </div>
70
+ <div class="example-chart-bar">
71
+ <div class="example-chart-bar-mark"></div>
72
+ <span class="text-small">15</span>
73
+ </div>
74
+ <div class="example-chart-bar">
75
+ <div class="example-chart-bar-mark"></div>
76
+ <span class="text-small">18</span>
77
+ </div>
78
+ </div>
79
+ </figure>
80
+ <details class="card">
81
+ <summary data-tooltip="Show how the sample values are defined">Method</summary>
82
+ <p class="text-small text-muted">Illustrative weekly counts for validating the Rudder fragment contract.</p>
83
+ </details>
84
+ <svg role="img" aria-label="Upward trend marker" viewBox="0 0 120 24">
85
+ <title>Upward trend</title>
86
+ <desc>A line rises from left to right across four points.</desc>
87
+ <polyline points="4,20 40,16 78,9 116,4" fill="none" stroke="var(--viz-series-1)" stroke-width="2" vector-effect="non-scaling-stroke" />
88
+ </svg>
89
+ </div>
@@ -0,0 +1,114 @@
1
+ # Rudder Inline Visual Runtime Contract
2
+
3
+ Read this reference when producing a Rudder inline visual. The runtime is
4
+ scriptless, sanitized, isolated from Rudder state, and has no network access.
5
+ Every fragment must be under 2 MiB, and one assistant message may reference at
6
+ most three fragments.
7
+
8
+ ## Output Envelope
9
+
10
+ Write a fragment with one top-level markup root, `<div id="widget">`. Bounded
11
+ `<style>` elements may precede that root. Do not write a doctype or `html`,
12
+ `head`, or `body`; Rudder extracts and sanitizes the CSS before it sanitizes the
13
+ markup.
14
+
15
+ The assistant message must place this exact directive on its own line:
16
+
17
+ ```text
18
+ ::codex-inline-vis{file="<title>.html"}
19
+ ```
20
+
21
+ Only a current-run file from the exact thread-scoped visualization directory is
22
+ eligible for capture. Rudder rejects absolute paths, separators, traversal,
23
+ symlink escapes, missing files, stale files, oversized files, malformed
24
+ directives, unknown attributes, and duplicate attributes.
25
+
26
+ ## Preserved Markup
27
+
28
+ Use these common HTML elements:
29
+
30
+ - Structure: `article`, `aside`, `div`, `section`, `main`, `header`, `footer`,
31
+ `figure`, `figcaption`, `blockquote`, `hr`, `br`.
32
+ - Text: `h1` through `h6`, `p`, `span`, `small`, `strong`, `em`, `b`, `i`,
33
+ `mark`, `s`, `u`, `code`, `pre`.
34
+ - Lists and data: `ul`, `ol`, `li`, `dl`, `dt`, `dd`, `table`, `caption`,
35
+ `colgroup`, `col`, `thead`, `tbody`, `tfoot`, `tr`, `th`, `td`, `meter`,
36
+ `progress`.
37
+ - Native disclosure: `<details>` and `<summary>`. This is the only supported
38
+ stateful interaction.
39
+
40
+ Use inline `<svg>` for charts and diagrams. Supported primitives include
41
+ `svg`, `g`, `defs`, `title`, `desc`, `path`, `line`, `rect`, `circle`, `ellipse`,
42
+ `polygon`, `polyline`, `text`, `tspan`, `linearGradient`, `radialGradient`, and
43
+ `stop`. Do not use clipping paths; the runtime does not preserve a safe
44
+ `clip-path` reference.
45
+
46
+ Common preserved attributes include:
47
+
48
+ - Accessibility and structure: `role`, `aria-label`, `aria-labelledby`,
49
+ `aria-describedby`, `aria-hidden`, `id`, `class`, `scope`, `colspan`,
50
+ `rowspan`, `open`, `value`, `min`, and `max`.
51
+ - Tooltip: `data-tooltip`, limited to concise plain text.
52
+ - SVG geometry and paint: `viewBox`, `preserveAspectRatio`, `x`, `y`, `x1`,
53
+ `x2`, `y1`, `y2`, `cx`, `cy`, `r`, `rx`, `ry`, `width`, `height`, `d`,
54
+ `points`, `transform`, `fill`, `stroke`, opacity, line, gradient, text-anchor,
55
+ and vector-effect attributes.
56
+
57
+ IDs and class tokens must start with a letter and contain only letters, digits,
58
+ underscores, and hyphens. Keep each token at most 64 characters. A class list is
59
+ limited to 24 safe tokens. Use `url(#safe-id)` only for an inline SVG paint
60
+ reference such as a gradient; all external URL values are removed.
61
+
62
+ ## Removed Markup
63
+
64
+ Do not generate `<script>`, `a`, `button`, `input`, `select`, `textarea`,
65
+ `form`, `img`, `image`, `audio`, `video`, `canvas`, `iframe`, `object`, `embed`,
66
+ `foreignObject`, `use`, SVG animation, document metadata, or external resource
67
+ elements. The runtime removes those elements and every URL-bearing or event
68
+ handler attribute.
69
+
70
+ There is no JavaScript, Lucide runtime, CDN library, parent bridge,
71
+ `window.openai`, API access, storage, cookies, or authenticated context. A
72
+ visual that depends on any of them is not a Rudder inline visual.
73
+
74
+ ## CSS
75
+
76
+ Use host classes first:
77
+
78
+ - Layout: `.viz-grid` and `.viz-row`. `.viz-controls` is also available as a
79
+ wrapping layout class, but it does not make removed buttons, inputs, selects,
80
+ or other active controls usable.
81
+ - Summaries: `.card`, `.viz-stat`, `.viz-stat-value`, `.viz-badge`.
82
+ - Text: `.text-small`, `.text-muted`, `.text-destructive`, `.sr-only`.
83
+ - Tooltip: add `data-tooltip="Concise detail"` to `<summary>` for hover and
84
+ keyboard-focus behavior. On another preserved element it is hover-only, so
85
+ keep essential information visible elsewhere.
86
+
87
+ The host provides theme variables including `--background`, `--foreground`,
88
+ `--card`, `--card-foreground`, `--popover`, `--popover-foreground`, `--primary`,
89
+ `--primary-foreground`, `--secondary`, `--secondary-foreground`, `--muted`,
90
+ `--muted-foreground`, `--accent`, `--accent-foreground`, `--destructive`,
91
+ `--border`, `--input`, `--ring`, `--font-size-base`, `--radius`, and
92
+ `--viz-series-1` through `--viz-series-6`.
93
+
94
+ Custom `<style>` content is bounded to eight style blocks and 32 KiB total.
95
+ Use ordinary rules and responsive `@media` rules only. The sanitizer removes
96
+ custom properties, URL values, imports, fonts, namespaces, keyframes, property
97
+ registrations, malformed CSS, unknown functions, and unsupported declarations.
98
+ Inline `style` attributes are always removed.
99
+
100
+ Safe custom CSS commonly uses grid or flex layout, spacing, borders, text,
101
+ theme colors, dimensions, responsive media queries, and static transforms. Keep
102
+ selectors scoped beneath `#widget` and keep the result useful without animation.
103
+
104
+ ## Responsive And Accessible Output
105
+
106
+ - Support widths from 736px down to 320px without horizontal overflow.
107
+ - Use responsive SVG view boxes and `max-width: 100%` behavior.
108
+ - Reserve enough space for the longest labels and values.
109
+ - Give charts and diagrams a screen-reader name and, when useful, description.
110
+ - Use tables when exact values matter more than spatial comparison.
111
+ - Pair every color encoding with text, shape, or another non-color cue.
112
+
113
+ See `../assets/example-chart.html` for a minimal contract-valid fragment. Its
114
+ data is illustrative; reuse the structure, not the values.
@@ -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`.