@rudderhq/agent-runtime-codex-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.
- package/dist/server/app-server-chat.d.ts +34 -0
- package/dist/server/app-server-chat.d.ts.map +1 -0
- package/dist/server/app-server-chat.js +584 -0
- package/dist/server/app-server-chat.js.map +1 -0
- package/dist/server/app-server-chat.test.d.ts +2 -0
- package/dist/server/app-server-chat.test.d.ts.map +1 -0
- package/dist/server/app-server-chat.test.js +431 -0
- package/dist/server/app-server-chat.test.js.map +1 -0
- package/dist/server/app-server-client.d.ts +126 -0
- package/dist/server/app-server-client.d.ts.map +1 -0
- package/dist/server/app-server-client.js +603 -0
- package/dist/server/app-server-client.js.map +1 -0
- package/dist/server/app-server-client.test.d.ts +2 -0
- package/dist/server/app-server-client.test.d.ts.map +1 -0
- package/dist/server/app-server-client.test.js +656 -0
- package/dist/server/app-server-client.test.js.map +1 -0
- package/dist/server/codex-home.d.ts +2 -2
- package/dist/server/codex-home.d.ts.map +1 -1
- package/dist/server/codex-home.js +10 -6
- package/dist/server/codex-home.js.map +1 -1
- package/dist/server/execute.d.ts.map +1 -1
- package/dist/server/execute.js +187 -20
- package/dist/server/execute.js.map +1 -1
- package/dist/server/index.d.ts +1 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +1 -0
- package/dist/server/index.js.map +1 -1
- package/dist/server/inline-visuals.d.ts +24 -0
- package/dist/server/inline-visuals.d.ts.map +1 -0
- package/dist/server/inline-visuals.js +174 -0
- package/dist/server/inline-visuals.js.map +1 -0
- package/dist/server/inline-visuals.test.d.ts +2 -0
- package/dist/server/inline-visuals.test.d.ts.map +1 -0
- package/dist/server/inline-visuals.test.js +202 -0
- package/dist/server/inline-visuals.test.js.map +1 -0
- package/dist/ui/parse-stdout.js +2 -2
- package/dist/ui/parse-stdout.js.map +1 -1
- package/package.json +3 -2
- package/skills/rudder-docs/SKILL.md +161 -0
- package/skills/rudder-docs/evals/trigger-evals.json +82 -0
- package/skills/{rudder → rudder-docs}/references/api-reference.md +17 -1
- package/skills/{rudder → rudder-docs}/references/cli-reference.md +52 -97
- package/skills/rudder-docs/references/control-plane-practices.md +231 -0
- package/skills/{rudder → rudder-docs}/references/organization-skills.md +15 -1
- package/skills/rudder-docs/references/source-map.md +138 -0
- package/skills/visualize/SKILL.md +132 -0
- package/skills/visualize/agents/openai.yaml +7 -0
- package/skills/visualize/assets/example-chart.html +89 -0
- package/skills/visualize/references/runtime-contract.md +114 -0
- package/skills/rudder/SKILL.md +0 -314
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
# Rudder Control-Plane Practices
|
|
2
|
+
|
|
3
|
+
Consult this reference only for questions about exact Rudder operating
|
|
4
|
+
behavior. It is conditional documentation, not a trigger and not an always-run
|
|
5
|
+
workflow. For exact tool and CLI syntax, pair the relevant rule with
|
|
6
|
+
`cli-reference.md` instead of recreating its command table here.
|
|
7
|
+
|
|
8
|
+
## Section Map
|
|
9
|
+
|
|
10
|
+
- [Interface and scope](#interface-and-scope)
|
|
11
|
+
- [Ownership, checkout, and wake scope](#ownership-checkout-and-wake-scope)
|
|
12
|
+
- [Comments, mentions, and evidence](#comments-mentions-and-evidence)
|
|
13
|
+
- [Review and close-out](#review-and-close-out)
|
|
14
|
+
- [Approvals](#approvals)
|
|
15
|
+
- [Delegation, escalation, and budget](#delegation-escalation-and-budget)
|
|
16
|
+
- [Git identity and attribution](#git-identity-and-attribution)
|
|
17
|
+
- [Workspaces, projects, and resources](#workspaces-projects-and-resources)
|
|
18
|
+
- [Durable Library artifacts](#durable-library-artifacts)
|
|
19
|
+
- [Organization and agent skills](#organization-and-agent-skills)
|
|
20
|
+
- [Authentication and runtime environment](#authentication-and-runtime-environment)
|
|
21
|
+
- [User activity context](#user-activity-context)
|
|
22
|
+
|
|
23
|
+
## Interface And Scope
|
|
24
|
+
|
|
25
|
+
- Prefer exposed first-party Rudder typed tools for normal control-plane work.
|
|
26
|
+
Use the installed `rudder ... --json` CLI as the compatibility fallback when
|
|
27
|
+
MCP is unavailable or a Rudder tool has a transport or configuration error.
|
|
28
|
+
- Use `rudder agent capabilities --json` to discover the current capability
|
|
29
|
+
set. Treat direct API use as an internal, debugging, or compatibility path,
|
|
30
|
+
not the normal interface.
|
|
31
|
+
- Direct API fallback for required close-out is acceptable only when the CLI
|
|
32
|
+
exits nonzero with a diagnostic error or incorrectly exits zero with empty
|
|
33
|
+
stdout. Record the failed command and fallback reason in the issue comment or
|
|
34
|
+
run notes.
|
|
35
|
+
- If wake text explicitly declares HTTP compatibility mode, follow that
|
|
36
|
+
bounded mode for the run.
|
|
37
|
+
|
|
38
|
+
Chat and issues are parallel work surfaces. Continue chat-scoped work in Chat
|
|
39
|
+
unless the operator asks for issue structure or team policy requires explicit
|
|
40
|
+
ownership, status, dependencies, or review. Do not create an issue merely
|
|
41
|
+
because work is executable, durable, long-running, or reviewable.
|
|
42
|
+
|
|
43
|
+
## Ownership, Checkout, And Wake Scope
|
|
44
|
+
|
|
45
|
+
- Before issue-scoped execution, checkout the assigned issue. Never retry a
|
|
46
|
+
checkout that returns `409`; stop and report the ownership conflict.
|
|
47
|
+
- Never look for unassigned work. Work the authenticated agent's assignee or
|
|
48
|
+
reviewer inbox and the explicit wake context.
|
|
49
|
+
- Self-assign only when a wake comment explicitly transfers ownership.
|
|
50
|
+
- A wake on an issue not assigned to the agent, including a user-owned or
|
|
51
|
+
unassigned issue, is scoped to that comment unless it explicitly requests
|
|
52
|
+
implementation, file changes, close-out, or ownership transfer. Answer a
|
|
53
|
+
question as a question; do not silently take over the whole issue.
|
|
54
|
+
- Treat `issue_passive_followup` as follow-up on the same issue, not a fresh
|
|
55
|
+
assignment. Treat `issue_review_closeout_missing` as review follow-up.
|
|
56
|
+
|
|
57
|
+
## Comments, Mentions, And Evidence
|
|
58
|
+
|
|
59
|
+
- Keep issue comments concise: a short status line, the material change or
|
|
60
|
+
blocker, validation evidence, and links to related entities, Library files,
|
|
61
|
+
or external pages.
|
|
62
|
+
- Use normal Markdown links with Rudder's canonical renderable entity schemes:
|
|
63
|
+
`issue://`, `agent://`, `automation://`, `project://`, `chat://`, and
|
|
64
|
+
`skill://`. Add `?c=<comment-id>` to an issue URI for a specific comment.
|
|
65
|
+
- Add `?intent=wake` to an agent URI only when intentionally waking that agent;
|
|
66
|
+
omit it for a reference-only link. Plain text names are not wake requests.
|
|
67
|
+
- For Library files, copy the returned `markdownLink` instead of constructing a
|
|
68
|
+
URI. Link external pages with a descriptive Markdown `https` link.
|
|
69
|
+
- Multiline comments, code spans, test summaries, and Markdown should be passed
|
|
70
|
+
from a file or stdin according to the CLI reference. Do not depend on fragile
|
|
71
|
+
shell interpolation.
|
|
72
|
+
- Attach each screenshot or image with `--image` when it is evidence in an
|
|
73
|
+
issue comment or close-out. A local filesystem path alone is not inspectable
|
|
74
|
+
by board users.
|
|
75
|
+
- Always communicate before exiting active issue work, except when a blocked
|
|
76
|
+
issue has no new context to report.
|
|
77
|
+
|
|
78
|
+
## Review And Close-Out
|
|
79
|
+
|
|
80
|
+
Use the close-out signal matching the outcome: a progress comment when work
|
|
81
|
+
remains, done with completion evidence, blocked with a blocker comment, or an
|
|
82
|
+
explicit handoff comment with an ownership change.
|
|
83
|
+
|
|
84
|
+
If blocked, set the issue to `blocked`, identify the blocker, name the next
|
|
85
|
+
actor or action, and leave the blocker comment before exit. Do not present
|
|
86
|
+
partial work as complete.
|
|
87
|
+
|
|
88
|
+
A reviewer does not take over implementation unless explicitly asked.
|
|
89
|
+
Reviewer work may cover `in_review` or `blocked`; the latter is blocker triage,
|
|
90
|
+
not implementation ownership. Record one structured durable decision:
|
|
91
|
+
|
|
92
|
+
- `--decision approve` for accepted work;
|
|
93
|
+
- `--decision request_changes` for required changes;
|
|
94
|
+
- `--decision needs_followup` when review remains open; or
|
|
95
|
+
- `--decision blocked` only for a confirmed human or external blocker, with
|
|
96
|
+
the next human action named.
|
|
97
|
+
|
|
98
|
+
Do not rely on free-form accept, reject, or change-request text as the review
|
|
99
|
+
outcome. The structured decision is the durable close-out signal.
|
|
100
|
+
|
|
101
|
+
## Approvals
|
|
102
|
+
|
|
103
|
+
When `RUDDER_APPROVAL_ID` is present, read the approval and its linked issues
|
|
104
|
+
before acting. Preserve the approval boundary: comment, request revision,
|
|
105
|
+
resubmit, approve, or reject only through the governed approval surface and
|
|
106
|
+
only when the current actor is authorized. An approval question does not grant
|
|
107
|
+
permission for the underlying mutation. When an approval remains unresolved,
|
|
108
|
+
report the status and required follow-up rather than bypassing it.
|
|
109
|
+
|
|
110
|
+
## Delegation, Escalation, And Budget
|
|
111
|
+
|
|
112
|
+
- Agent-created issues default to the creating agent when no assignee is
|
|
113
|
+
supplied. Set an explicit assignee when delegating to someone else.
|
|
114
|
+
- Always set `parentId` for delegated work. Set `goalId` unless intentionally
|
|
115
|
+
creating top-level management work. When the organization has a mature label
|
|
116
|
+
taxonomy, choose at least one suitable label after inspecting the available
|
|
117
|
+
labels.
|
|
118
|
+
- Never cancel cross-team work. Reassign upward with an explanation, and use
|
|
119
|
+
`chainOfCommand` for escalation.
|
|
120
|
+
- Above 80% spend, focus on critical work only and avoid expanding scope.
|
|
121
|
+
- Use the canonical `rudder-create-agent` workflow for hiring or agent creation
|
|
122
|
+
rather than assembling a raw control-plane payload.
|
|
123
|
+
|
|
124
|
+
## Git Identity And Attribution
|
|
125
|
+
|
|
126
|
+
Every agent-created commit must include this trailer at the end of the commit
|
|
127
|
+
message:
|
|
128
|
+
|
|
129
|
+
`Co-Authored-By: Rudder <285064165+Rudderhq@users.noreply.github.com>`
|
|
130
|
+
|
|
131
|
+
Use an explicit safe Git identity. Rudder prepares isolated runtime worktrees
|
|
132
|
+
with `user.useConfigOnly=true`; if Git reports a missing identity, configure
|
|
133
|
+
repository-local `user.name` and `user.email`. Do not bypass the guard and
|
|
134
|
+
never accept `*@*.local` author or committer metadata.
|
|
135
|
+
|
|
136
|
+
## Workspaces, Projects, And Resources
|
|
137
|
+
|
|
138
|
+
Each organization has one managed shared workspace under its Rudder instance.
|
|
139
|
+
The organization storage key is filesystem-safe; for UUID-backed organizations
|
|
140
|
+
it is the first 12 lowercase hexadecimal characters with dashes removed. APIs
|
|
141
|
+
continue to use the full organization ID.
|
|
142
|
+
|
|
143
|
+
- The organization Resources catalog is reusable shared context, but it is not
|
|
144
|
+
injected wholesale into every run.
|
|
145
|
+
- A project-linked run or chat receives only that project's attached
|
|
146
|
+
resources. Project Context is the curated starting set, not a knowledge
|
|
147
|
+
boundary; inspect broader Library or organization workspace knowledge when
|
|
148
|
+
the attached set is insufficient.
|
|
149
|
+
- Library resources use `sourceType: "library"` and safe locators below
|
|
150
|
+
`library:projects/<project-key>/`. External resources retain their original
|
|
151
|
+
URL, local path, repository path, or connector locator.
|
|
152
|
+
- Use Workspaces for disk-backed shared files and skill packages. Agent-private
|
|
153
|
+
files live below the agent's workspace key. New projects do not create
|
|
154
|
+
independent workspace roots.
|
|
155
|
+
- Preserve organization and workspace boundaries. Do not query or copy another
|
|
156
|
+
organization's private resources to fill a context gap.
|
|
157
|
+
- Use the typed project or stable CLI surface for project records; do not
|
|
158
|
+
substitute ad hoc API mutations.
|
|
159
|
+
|
|
160
|
+
## Durable Library Artifacts
|
|
161
|
+
|
|
162
|
+
With project context in a local trusted run, write durable project work under
|
|
163
|
+
`$RUDDER_PROJECT_LIBRARY_ROOT`. Use
|
|
164
|
+
`$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` only when requesting a
|
|
165
|
+
renderable Rudder reference.
|
|
166
|
+
|
|
167
|
+
Without project context, write durable generated chat or work artifacts under
|
|
168
|
+
`$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`
|
|
169
|
+
and use the product locator
|
|
170
|
+
`library:artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. Do not choose an existing project, such as Getting Started, merely to obtain a project
|
|
171
|
+
Library path. Reserve temporary directories for scratch and verification
|
|
172
|
+
artifacts.
|
|
173
|
+
|
|
174
|
+
After creating or changing a durable Library file, request its stable
|
|
175
|
+
`markdownLink` using `rudder library file ref` with the Library-relative path.
|
|
176
|
+
Use that returned link in the final chat reply, issue comment, review, blocker,
|
|
177
|
+
or done comment. Direct filesystem writes are not complete Rudder-visible
|
|
178
|
+
handoff evidence until the returned link is posted.
|
|
179
|
+
|
|
180
|
+
Do not hand-write `library-entry://` URLs or their query parameters. Copy the
|
|
181
|
+
returned `mentionHref` or `markdownLink`; the entry ID is stable identity and a
|
|
182
|
+
Rudder-generated `p` value is only a synchronous path hint. Treat
|
|
183
|
+
`library-file://` and `library-doc://` as legacy references for existing
|
|
184
|
+
content, not new links.
|
|
185
|
+
|
|
186
|
+
Use `rudder library file get/put` only when the local Library filesystem is
|
|
187
|
+
unavailable, such as a remote or restricted runtime. With project context the
|
|
188
|
+
fallback path is `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>`; without it,
|
|
189
|
+
use `artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. These are
|
|
190
|
+
Library-relative paths, never absolute workspace paths.
|
|
191
|
+
|
|
192
|
+
Do not mark an issue done when the request was only to create or revise a plan.
|
|
193
|
+
Reassign the plan for review when that is the expected workflow, and include
|
|
194
|
+
the returned `markdownLink` in the handoff. The retired `rudder issue
|
|
195
|
+
documents` surface is not a durable-plan path.
|
|
196
|
+
|
|
197
|
+
## Organization And Agent Skills
|
|
198
|
+
|
|
199
|
+
For private skills used only by the running agent, prefer agent-private skill
|
|
200
|
+
creation under `AGENT_HOME/skills`, then confirm the skill is enabled in the
|
|
201
|
+
agent snapshot. Installed but disabled skills do not load on future runs.
|
|
202
|
+
|
|
203
|
+
For organization discovery, import, inspection, and assignment, consult
|
|
204
|
+
`organization-skills.md`. `skills enable` is additive and preserves existing
|
|
205
|
+
optional selections; `skills sync` replaces the full optional enabled-skill
|
|
206
|
+
set and should be used only when replacement is intentional. Do not fall back
|
|
207
|
+
to raw HTTP for this workflow in local adapters or packaged Desktop.
|
|
208
|
+
|
|
209
|
+
## Authentication And Runtime Environment
|
|
210
|
+
|
|
211
|
+
Rudder normally injects the runtime context, including `RUDDER_AGENT_ID`,
|
|
212
|
+
`RUDDER_ORG_ID`, `RUDDER_API_URL`, `RUDDER_API_KEY`, and `RUDDER_RUN_ID`.
|
|
213
|
+
Issue, wake, or approval contexts may also provide `RUDDER_TASK_ID`,
|
|
214
|
+
`RUDDER_WAKE_REASON`, `RUDDER_WAKE_COMMENT_ID`, `RUDDER_APPROVAL_ID`,
|
|
215
|
+
`RUDDER_APPROVAL_STATUS`, and `RUDDER_LINKED_ISSUE_IDS`.
|
|
216
|
+
|
|
217
|
+
Never ask for `RUDDER_API_KEY`; never print it. Do not hard-code the API URL.
|
|
218
|
+
For local adapters and packaged Desktop, the installed `rudder` binary should
|
|
219
|
+
already be on `PATH`. Manual local CLI setup outside a managed run may use the
|
|
220
|
+
documented local-cli authentication flow, but it must preserve organization
|
|
221
|
+
scope and should not expose the minted key in durable output.
|
|
222
|
+
|
|
223
|
+
## User Activity Context
|
|
224
|
+
|
|
225
|
+
Use the user activity ledger when a question depends on recent user-authored
|
|
226
|
+
Rudder activity, such as today's conversations, feedback, or handoff context.
|
|
227
|
+
The ledger's excerpts are pointers with provenance, not ground truth when exact
|
|
228
|
+
wording matters. Inspect the cited source before writing durable memory,
|
|
229
|
+
profile changes, or stable preference conclusions. Do not use the ledger to
|
|
230
|
+
bypass permissions or promote private content into long-term memory without a
|
|
231
|
+
clear durable operating lesson.
|
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Use this reference when a board user or authorized agent asks you to discover, import, inspect, or enable organization skills.
|
|
4
4
|
|
|
5
|
-
This
|
|
5
|
+
This is the organization and agent-skill administration reference for the
|
|
6
|
+
bundled `rudder-docs` package. Use the typed Rudder tool when exposed and the
|
|
7
|
+
documented CLI as its compatibility fallback. General control-plane ownership,
|
|
8
|
+
authentication, and workspace rules remain in `control-plane-practices.md`.
|
|
6
9
|
|
|
7
10
|
For a skill that belongs only to the running agent, do not use organization import or scan commands. Use:
|
|
8
11
|
|
|
@@ -12,6 +15,17 @@ rudder agent skills create "$RUDDER_AGENT_ID" --name "<name>" --description "<de
|
|
|
12
15
|
|
|
13
16
|
Agent-private skill creation writes under `AGENT_HOME/skills` and does not require organization skill mutation permission.
|
|
14
17
|
|
|
18
|
+
## Section Map
|
|
19
|
+
|
|
20
|
+
- [Canonical model](#canonical-model)
|
|
21
|
+
- [Core CLI surface](#core-cli-surface)
|
|
22
|
+
- [Source types](#source-types)
|
|
23
|
+
- [Import examples](#import-examples)
|
|
24
|
+
- [Inspect imported skills](#inspect-imported-skills)
|
|
25
|
+
- [Enable skills on an existing agent](#enable-skills-on-an-existing-agent)
|
|
26
|
+
- [Permission model](#permission-model)
|
|
27
|
+
- [Notes](#notes)
|
|
28
|
+
|
|
15
29
|
## Canonical Model
|
|
16
30
|
|
|
17
31
|
1. import or scan the skill into the organization library
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Rudder Documentation And Source Map
|
|
2
|
+
|
|
3
|
+
Use this map to choose a narrow evidence route. It describes stable domains and
|
|
4
|
+
directories rather than an exhaustive page list. Follow the current checkout's
|
|
5
|
+
`AGENTS.md` before repository inspection.
|
|
6
|
+
|
|
7
|
+
## Section Map
|
|
8
|
+
|
|
9
|
+
- [Official public documentation](#official-public-documentation)
|
|
10
|
+
- [Product Logic Registry](#product-logic-registry)
|
|
11
|
+
- [Contributor and engineering documentation](#contributor-and-engineering-documentation)
|
|
12
|
+
- [Implementation and tests](#implementation-and-tests)
|
|
13
|
+
- [Official remote source and version history](#official-remote-source-and-version-history)
|
|
14
|
+
- [Bundled offline references](#bundled-offline-references)
|
|
15
|
+
- [Targeted search patterns](#targeted-search-patterns)
|
|
16
|
+
|
|
17
|
+
## Official Public Documentation
|
|
18
|
+
|
|
19
|
+
- Index: `https://docs.rudderhq.dev/llms.txt`
|
|
20
|
+
- Site: `https://docs.rudderhq.dev/`
|
|
21
|
+
- Local public-docs checkout: `docs/`
|
|
22
|
+
|
|
23
|
+
Start with the index, choose the page matching the user's job, and open one or
|
|
24
|
+
two pages. Prefer the user's language when equivalent official pages exist.
|
|
25
|
+
Public docs own published user guidance; a local `docs/` checkout is useful
|
|
26
|
+
when the live site is unavailable or the task is editing the public site.
|
|
27
|
+
|
|
28
|
+
## Product Logic Registry
|
|
29
|
+
|
|
30
|
+
- Entry point: `doc/product/README.md`
|
|
31
|
+
- Registry map: `doc/product/registry.yml`
|
|
32
|
+
- Domain contracts: `doc/product/domains/`
|
|
33
|
+
- Composed workflows: `doc/product/workflows/`
|
|
34
|
+
- Surface-to-contract maps: `doc/product/surfaces/`
|
|
35
|
+
|
|
36
|
+
Use Product Logic for intended product semantics and invariants. Start at the
|
|
37
|
+
registry entry point and select the owning domain rather than scanning all
|
|
38
|
+
contracts. Reading these guarded files does not authorize editing them.
|
|
39
|
+
|
|
40
|
+
Common domain routes include:
|
|
41
|
+
|
|
42
|
+
- agents, skills, and inbox: `doc/product/domains/agents/`
|
|
43
|
+
- issues and issue-visible state: `doc/product/domains/issues/`
|
|
44
|
+
- assignment, checkout, review routing: `doc/product/domains/work-routing/`
|
|
45
|
+
- runs, execution, transcripts, workspaces: `doc/product/domains/execution/`
|
|
46
|
+
- organizations, goals, and projects:
|
|
47
|
+
`doc/product/domains/organizations-and-goals/`
|
|
48
|
+
- Library, resources, and runtime context:
|
|
49
|
+
`doc/product/domains/library-and-context/`
|
|
50
|
+
- Chat, Messenger, comments, and integrations:
|
|
51
|
+
`doc/product/domains/collaboration/`
|
|
52
|
+
- approvals, budgets, costs, and activity:
|
|
53
|
+
`doc/product/domains/control-plane/`
|
|
54
|
+
- reviews, feedback, and learning:
|
|
55
|
+
`doc/product/domains/review-feedback-learning/`
|
|
56
|
+
- automations: `doc/product/domains/automations/`
|
|
57
|
+
- plugins: `doc/product/domains/plugins/`
|
|
58
|
+
|
|
59
|
+
## Contributor And Engineering Documentation
|
|
60
|
+
|
|
61
|
+
- Route selector: `doc/README.md`
|
|
62
|
+
- Development: `doc/engineering/DEVELOPING.md`
|
|
63
|
+
- CLI: `doc/engineering/CLI.md`
|
|
64
|
+
- Database: `doc/engineering/DATABASE.md`
|
|
65
|
+
- Deployment modes: `doc/engineering/DEPLOYMENT-MODES.md`
|
|
66
|
+
- Desktop and packaging: `doc/engineering/DESKTOP.md`
|
|
67
|
+
- Design: `doc/engineering/DESIGN.md`
|
|
68
|
+
- Releases and publishing: `doc/engineering/RELEASING.md` and
|
|
69
|
+
`doc/engineering/PUBLISHING.md`
|
|
70
|
+
- Plugin contracts: `doc/engineering/PLUGIN_AUTHORING_GUIDE.md` and
|
|
71
|
+
`doc/engineering/PLUGIN_RUNTIME_CONTRACT.md`
|
|
72
|
+
- Dated decisions and proposals: `doc/plans/`
|
|
73
|
+
- Historical archaeology only: `doc/archive/`
|
|
74
|
+
|
|
75
|
+
Contributor docs own build, operation, packaging, and architecture guidance.
|
|
76
|
+
Plans explain decisions in time; archived documents are not current behavior
|
|
77
|
+
contracts.
|
|
78
|
+
|
|
79
|
+
## Implementation And Tests
|
|
80
|
+
|
|
81
|
+
Use source and tests for exact implementation evidence:
|
|
82
|
+
|
|
83
|
+
| Area | Owning source | Tests |
|
|
84
|
+
| --- | --- | --- |
|
|
85
|
+
| REST routes and orchestration services | `server/src/routes/`, `server/src/services/` | `server/src/__tests__/` |
|
|
86
|
+
| Shared API types, validators, and constants | `packages/shared/src/` | colocated `*.test.ts` plus server/UI consumers |
|
|
87
|
+
| Database schema and migrations | `packages/db/src/schema/`, `packages/db/src/migrations/` | package tests and server integration tests |
|
|
88
|
+
| CLI commands and capability registry | `cli/src/` | `cli/src/__tests__/` |
|
|
89
|
+
| Runtime adapters and prompt construction | `packages/agent-runtimes/`, `packages/agent-runtime-utils/` | package adapter tests plus server integration tests |
|
|
90
|
+
| Board UI and clients | `ui/src/` | colocated UI tests and `tests/e2e/` |
|
|
91
|
+
| Desktop shell and packaging | `desktop/`, `scripts/prod-desktop.mjs` | Desktop smoke scripts and packaged verification |
|
|
92
|
+
| Bundled skills | `server/resources/bundled-skills/` | bundled-skill, runtime adapter, public route, and E2E tests |
|
|
93
|
+
|
|
94
|
+
The owning module establishes what code does; tests establish protected and
|
|
95
|
+
edge-case behavior. Cite both when the claim depends on a guarded branch,
|
|
96
|
+
permission boundary, failure status, persistence rule, or adapter-specific
|
|
97
|
+
path.
|
|
98
|
+
|
|
99
|
+
## Official Remote Source And Version History
|
|
100
|
+
|
|
101
|
+
- Repository: `https://github.com/Undertone0809/rudder`
|
|
102
|
+
- Releases: `https://github.com/Undertone0809/rudder/releases`
|
|
103
|
+
- Tags: `https://github.com/Undertone0809/rudder/tags`
|
|
104
|
+
|
|
105
|
+
This is the only default remote source repository. For installed behavior,
|
|
106
|
+
first identify the installed Rudder version and use a matching official tag or
|
|
107
|
+
release when one exists. The default branch represents latest development and
|
|
108
|
+
must not be presented as the behavior of an older installed build. Link the
|
|
109
|
+
exact file, test, commit, tag, or release used.
|
|
110
|
+
|
|
111
|
+
## Bundled Offline References
|
|
112
|
+
|
|
113
|
+
Within this package:
|
|
114
|
+
|
|
115
|
+
- `cli-reference.md` preserves the typed capability and CLI fallback catalog;
|
|
116
|
+
- `api-reference.md` preserves internal/debug compatibility endpoints;
|
|
117
|
+
- `control-plane-practices.md` preserves conditional operating semantics; and
|
|
118
|
+
- `organization-skills.md` preserves organization skill workflows.
|
|
119
|
+
|
|
120
|
+
Use only the relevant section. These references are version-adjacent fallback
|
|
121
|
+
evidence, not a substitute for live installed help when the two disagree.
|
|
122
|
+
|
|
123
|
+
## Targeted Search Patterns
|
|
124
|
+
|
|
125
|
+
Prefer `rg -n` in the smallest owning directory. Useful query shapes include:
|
|
126
|
+
|
|
127
|
+
- contract or registry ID: `rg -n "CONTRACT.ID|domain term" doc/product`
|
|
128
|
+
- route or status: `rg -n "route-fragment|409|422" server/src packages/shared/src`
|
|
129
|
+
- CLI command or capability: `rg -n "capability.id|command-name" cli/src server/src`
|
|
130
|
+
- environment or configuration key: `rg -n "RUDDER_[A-Z_]+|configKey" server packages cli desktop`
|
|
131
|
+
- schema field or table: `rg -n "fieldName|table_name" packages/db/src server/src`
|
|
132
|
+
- UI label or test id: `rg -n "visible copy|data-testid" ui/src tests/e2e`
|
|
133
|
+
- a bundled-skill fact: `rg -n "phrase|command" server/resources/bundled-skills`
|
|
134
|
+
- related regression coverage: `rg -n "identifier|error text|behavior phrase" --glob '*test*' --glob '*.spec.ts'`
|
|
135
|
+
|
|
136
|
+
Search exact identifiers first, then widen to a stable concept. Avoid broad
|
|
137
|
+
repository scans when an owning domain, route, command, or component is already
|
|
138
|
+
known.
|
|
@@ -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>
|