@rudderhq/agent-runtime-opencode-local 0.4.6-canary.9 → 0.5.1-canary.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.
Files changed (50) hide show
  1. package/dist/index.d.ts +1 -1
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1 -1
  4. package/dist/server/execute.d.ts +2 -2
  5. package/dist/server/execute.d.ts.map +1 -1
  6. package/dist/server/execute.js +56 -20
  7. package/dist/server/execute.js.map +1 -1
  8. package/dist/server/parse.test.js +1 -1
  9. package/dist/server/parse.test.js.map +1 -1
  10. package/dist/server/skills.d.ts.map +1 -1
  11. package/dist/server/skills.js +8 -6
  12. package/dist/server/skills.js.map +1 -1
  13. package/package.json +2 -2
  14. package/skills/browser/references/tool-contract.md +2 -2
  15. package/skills/rudder-docs/SKILL.md +177 -0
  16. package/skills/rudder-docs/evals/retrieval-authority-evals.json +262 -0
  17. package/skills/rudder-docs/evals/trigger-evals.json +82 -0
  18. package/skills/rudder-docs/references/agent-creation.md +153 -0
  19. package/skills/{rudder → rudder-docs}/references/api-reference.md +25 -2
  20. package/skills/{rudder → rudder-docs}/references/cli-reference.md +51 -96
  21. package/skills/rudder-docs/references/operating-practices.md +231 -0
  22. package/skills/{rudder → rudder-docs}/references/organization-skills.md +16 -2
  23. package/skills/rudder-docs/references/plugin-authoring.md +116 -0
  24. package/skills/rudder-docs/references/source-map.md +162 -0
  25. package/skills/visualize/SKILL.md +134 -0
  26. package/skills/visualize/agents/openai.yaml +7 -0
  27. package/skills/visualize/assets/example-chart.html +89 -0
  28. package/skills/visualize/references/runtime-contract.md +124 -0
  29. package/skills/rudder/SKILL.md +0 -314
  30. package/skills/rudder-create-agent/SKILL.md +0 -185
  31. package/skills/rudder-create-agent/references/api-reference.md +0 -179
  32. package/skills/rudder-create-agent/references/cli-reference.md +0 -132
  33. package/skills/rudder-create-plugin/SKILL.md +0 -103
  34. package/skills/skill-optimizer/CHANGELOG.md +0 -29
  35. package/skills/skill-optimizer/SKILL.md +0 -205
  36. package/skills/skill-optimizer/references/adapters/creative-brand-content.md +0 -30
  37. package/skills/skill-optimizer/references/adapters/customer-support-sales.md +0 -30
  38. package/skills/skill-optimizer/references/adapters/document-data-processing.md +0 -31
  39. package/skills/skill-optimizer/references/adapters/education-training.md +0 -31
  40. package/skills/skill-optimizer/references/adapters/finance-accounting.md +0 -31
  41. package/skills/skill-optimizer/references/adapters/healthcare-operations.md +0 -30
  42. package/skills/skill-optimizer/references/adapters/hr-people-ops.md +0 -31
  43. package/skills/skill-optimizer/references/adapters/legal-compliance.md +0 -31
  44. package/skills/skill-optimizer/references/adapters/operations-supply-chain.md +0 -31
  45. package/skills/skill-optimizer/references/adapters/personal-productivity.md +0 -29
  46. package/skills/skill-optimizer/references/adapters/research-knowledge.md +0 -31
  47. package/skills/skill-optimizer/references/adapters/software-ai.md +0 -31
  48. package/skills/skill-optimizer/references/domain-adapter-patterns.md +0 -66
  49. package/skills/skill-optimizer/references/eval-method.md +0 -17
  50. package/skills/skill-optimizer/references/universal-optimization-lens.md +0 -73
@@ -0,0 +1,153 @@
1
+ # Agent Creation
2
+
3
+ Use this workflow for an explicit request to create, hire, or configure a
4
+ Rudder Agent. A question about Agent behavior or configuration is read-only.
5
+ Only an explicit user request to perform the action authorizes mutation, and
6
+ normal organization, permission, approval, and safety boundaries still apply.
7
+
8
+ For exact installed command syntax, use [CLI reference](cli-reference.md) after
9
+ checking live capabilities and `--help`. Use [API reference](api-reference.md)
10
+ only for internal debugging or compatibility work.
11
+
12
+ ## Section Map
13
+
14
+ - [Verify authority and context](#verify-authority-and-context)
15
+ - [Discover a current runtime configuration](#discover-a-current-runtime-configuration)
16
+ - [Design the durable Agent identity](#design-the-durable-agent-identity)
17
+ - [Submit the governed hire](#submit-the-governed-hire)
18
+ - [Handle direct creation or approval](#handle-direct-creation-or-approval)
19
+ - [Report evidence](#report-evidence)
20
+
21
+ ## Verify Authority And Context
22
+
23
+ Before designing or creating an Agent:
24
+
25
+ 1. Verify the actor, organization, and authentication with
26
+ `rudder agent me --json` or an equivalent exposed typed identity
27
+ capability.
28
+ 2. Board access may create an Agent. An Agent actor needs
29
+ `canCreateAgents=true` in the same organization.
30
+ 3. If identity or authorization is unavailable, stop and report the missing
31
+ authority. Do not ask for or print `RUDDER_API_KEY`, create files as a
32
+ substitute, or cross an organization boundary.
33
+ 4. If the request is advisory rather than an explicit request to create or
34
+ change an Agent, remain read-only and return the verified guidance.
35
+
36
+ For a source issue, preserve its identity for the hire payload rather than
37
+ creating an unlinked Agent and repairing the relationship later.
38
+
39
+ ## Discover A Current Runtime Configuration
40
+
41
+ Inspect exposed typed capabilities first. If a governed typed Agent-hire
42
+ capability is exposed by the current runtime, prefer it. The standard Rudder
43
+ Rudder tool set currently has no Agent-hire mutation tool, so verify and
44
+ use `rudder agent hire` as the canonical installed fallback.
45
+
46
+ Discover before drafting:
47
+
48
+ 1. Read `rudder agent config index` to learn which runtime configuration
49
+ documents this instance exposes.
50
+ 2. Read one relevant `rudder agent config doc <agent-runtime-type>` document.
51
+ 3. Compare related Agents with `rudder agent list`,
52
+ `rudder agent config list`, and, where necessary,
53
+ `rudder agent config get`.
54
+ 4. Reuse a proven pattern only after checking that its working directory,
55
+ model, runtime options, and responsibilities fit the new role.
56
+ 5. If the role needs `desiredSkills` on day one, inspect the organization skill
57
+ inventory and import or validate required skills before hiring. Follow
58
+ [Organization skills](organization-skills.md) for that workflow.
59
+
60
+ Installed help and live capability evidence win over this reference when a
61
+ version differs. Do not hand-create Agent directories, configuration records,
62
+ or instruction files as a fallback.
63
+
64
+ ## Design The Durable Agent Identity
65
+
66
+ An Agent is a durable team member. Draft the smallest complete payload that
67
+ defines its organizational responsibility and runnable configuration:
68
+
69
+ - `name` is optional; when omitted, Rudder assigns a distinct personal name.
70
+ - `role` is one fixed enum value: `ceo`, `cto`, `cmo`, `cfo`, `engineer`,
71
+ `designer`, `pm`, `qa`, `devops`, `researcher`, or `general`.
72
+ - `title` carries the specific job title. For example, use role `engineer` and
73
+ title `Founding Engineer`, never a new `founding_engineer` role.
74
+ - `reportsTo` identifies an in-organization manager and must preserve the
75
+ intended reporting line.
76
+ - `capabilities` states the work this Agent owns and the boundaries it should
77
+ not silently cross.
78
+ - `agentRuntimeType`, `agentRuntimeConfig`, and `runtimeConfig` must follow the
79
+ current adapter documentation and a valid local environment.
80
+ - `desiredSkills` contains only skills already available to the organization
81
+ and actually needed for the role.
82
+ - `sourceIssueId` or `sourceIssueIds` links the hire to the originating work.
83
+ - Omit `icon` for a normal hire so Rudder generates and persists its default
84
+ Oreo avatar. Supply an icon only when the operator provided an explicit
85
+ supported `oreo:<shape>:<palette>:<uuid>`, DiceBear Notionists, or uploaded
86
+ `asset:<uuid>` reference.
87
+
88
+ For supported local runtimes, `agentRuntimeConfig.promptTemplate` becomes the
89
+ managed `SOUL.md`. Write durable role/persona guidance rather than a one-line
90
+ command. A substantial role should define:
91
+
92
+ - an opening identity statement;
93
+ - mission and owned outcome;
94
+ - durable responsibilities;
95
+ - boundaries and escalation points;
96
+ - decision principles;
97
+ - communication voice; and
98
+ - continuity rules for what should become memory or instruction updates.
99
+
100
+ Do not copy Rudder's shared filesystem, memory, safety, or operating contract
101
+ into `promptTemplate`; the runtime injects that shared contract separately.
102
+ Keep secrets out of the payload unless the verified adapter contract requires a
103
+ supported secret mechanism.
104
+
105
+ ## Submit The Governed Hire
106
+
107
+ After the payload and authority are verified, use the exposed governed typed
108
+ capability if one exists. Otherwise invoke the installed canonical command:
109
+
110
+ `rudder agent hire --org-id <org-id> --payload <json> --json`
111
+
112
+ Verify its exact syntax in [CLI reference](cli-reference.md) or installed
113
+ `rudder agent hire --help` immediately before execution. Do not replace it with
114
+ manual filesystem changes or `rudder approval create --type hire_agent`.
115
+ The canonical hire surface owns both permission checks and the organization's
116
+ direct-create versus approval-required policy.
117
+
118
+ ## Handle Direct Creation Or Approval
119
+
120
+ The canonical response has two governed branches:
121
+
122
+ - Direct creation: `approval: null`; the returned Agent is created in its
123
+ ordinary post-hire state.
124
+ - Approval required: the returned Agent is `pending_approval`, and the response
125
+ includes an approval record.
126
+
127
+ For `pending_approval`:
128
+
129
+ 1. Inspect it with `rudder approval get` and keep the source issue visible.
130
+ 2. Use a markdown approval comment when review context or revision evidence is
131
+ needed.
132
+ 3. If the board requests changes, revise the existing payload and use
133
+ `rudder approval resubmit`; do not create a duplicate hire.
134
+ 4. Use `rudder approval issues` to inspect linked issues after the server has
135
+ created the canonical linkage.
136
+ 5. After approval, close a linked issue only when the approved hire resolves
137
+ it; otherwise leave a linked next-action comment.
138
+
139
+ Never treat a `pending_approval` Agent as runnable, assignable, or fully hired.
140
+ Approval, rejection, and revision semantics remain server-owned.
141
+
142
+ ## Report Evidence
143
+
144
+ Do not report success merely because a payload was drafted or files were
145
+ written. Success requires the canonical hire operation to return:
146
+
147
+ - `agent.id` for the created or pending Agent; and
148
+ - `approval.id` when approval is required.
149
+
150
+ Report the organization, Agent identity, role/title, reporting line, runtime,
151
+ source issue, and direct versus approval branch without exposing secrets.
152
+ If execution was not explicitly requested, report only the verified proposed
153
+ configuration and the current command or capability that would govern it.
@@ -1,11 +1,27 @@
1
1
  # Rudder API Reference
2
2
 
3
- Internal/debug reference for the Rudder control plane API.
3
+ Internal/debug reference for the Rudder API.
4
4
 
5
- - Normal heartbeats should use the CLI-first workflow in `../SKILL.md`.
5
+ - The `rudder-docs` router treats this as a compatibility and source-debugging
6
+ reference, not the normal first interface for agent operations.
6
7
  - The stable agent command catalog lives in `cli-reference.md`.
8
+ - Conditional ownership, review, workspace, and authentication guidance lives
9
+ in `operating-practices.md`.
7
10
  - Keep this document for compatibility, low-level debugging, and route-level implementation work.
8
11
 
12
+ ## Section Map
13
+
14
+ - [Canonical terms](#canonical-terms)
15
+ - [Core agent context](#core-agent-context)
16
+ - [Issue workflows](#issue-workflows)
17
+ - [Organization surfaces](#organization-surfaces)
18
+ - [Approval workflows](#approval-workflows)
19
+ - [Agent configuration and instructions](#agent-configuration-and-instructions)
20
+ - [Organization skills](#organization-skills)
21
+ - [OpenClaw invite](#openclaw-invite)
22
+ - [Organization portability](#organization-portability)
23
+ - [Worked example](#worked-example-ic-heartbeat)
24
+
9
25
  ## Canonical Terms
10
26
 
11
27
  - Use `orgId` and `/api/orgs/...` routes.
@@ -130,6 +146,7 @@ Use the incremental `after` form when you already know the thread.
130
146
  - `GET /api/orgs/:orgId/issues`
131
147
  - `POST /api/orgs/:orgId/issues`
132
148
  - `GET /api/orgs/:orgId/agents`
149
+ - `POST /api/orgs/:orgId/agent-hires`
133
150
  - `GET /api/orgs/:orgId/org`
134
151
  - `GET /api/orgs/:orgId/dashboard`
135
152
  - `GET /api/orgs/:orgId/projects`
@@ -144,6 +161,12 @@ Use the incremental `after` form when you already know the thread.
144
161
  - `GET /api/orgs/:orgId/costs/by-agent`
145
162
  - `GET /api/orgs/:orgId/costs/by-project`
146
163
 
164
+ `POST /api/orgs/:orgId/agent-hires` is the governed Agent creation route behind
165
+ `rudder agent hire`. It returns `approval: null` for direct creation or an Agent
166
+ in `pending_approval` plus the approval record when organization policy requires
167
+ review. Normal runtime work should follow [Agent creation](agent-creation.md)
168
+ and the installed CLI instead of calling this route directly.
169
+
147
170
  ### Resources
148
171
 
149
172
  - `GET /api/orgs/:orgId/resources`
@@ -1,15 +1,32 @@
1
1
  # Rudder Agent CLI Reference
2
2
 
3
- Stable compatibility contract for agents using the bundled `rudder` skill. Prefer first-party Rudder MCP tools when the runtime exposes them; use these CLI commands as fallback when MCP is unavailable or a Rudder MCP tool returns a transport/configuration error.
4
-
5
- ## Chat And Issue Surface Boundary
6
-
7
- Chat and issues are parallel ways to advance real tasks. Chat supports
8
- conversation-driven execution; issues add explicit ownership, status, priority,
9
- dependencies, and review structure. Do not create or require an issue merely
10
- because Chat work is executable, long-running, reviewable, or durable. Use the
11
- issue checkout and close-out commands below only for issue-scoped work, or when
12
- operator intent or team governance requires that structure.
3
+ Stable typed-tool and CLI fallback catalog for the bundled `rudder-docs`
4
+ package. Prefer first-party Rudder MCP tools when the runtime exposes them; use
5
+ these CLI commands as fallback when MCP is unavailable or a Rudder MCP tool
6
+ returns a transport or configuration error.
7
+
8
+ ## Section Map
9
+
10
+ - [Operating policy owners](#operating-policy-owners)
11
+ - [Defaults](#defaults)
12
+ - [JSON output contract](#json-output-contract)
13
+ - [Agent V1 commands](#agent-v1-commands)
14
+ - [Issue command I/O and shapes](#issue-command-io-and-shapes)
15
+ - [Renderable Library CLI output](#renderable-library-cli-output)
16
+ - [Reviewer decision command shapes](#reviewer-decision-command-shapes)
17
+ - [Compatibility commands](#compatibility-commands)
18
+
19
+ ## Operating Policy Owners
20
+
21
+ Keep this file focused on commands and CLI-specific I/O. Consult the exact
22
+ operating-practices guide for operating behavior:
23
+
24
+ - [Interface and Chat/issue scope](operating-practices.md#interface-and-scope)
25
+ - [Ownership, checkout, and wake scope](operating-practices.md#ownership-checkout-and-wake-scope)
26
+ - [Comments, mentions, and evidence](operating-practices.md#comments-mentions-and-evidence)
27
+ - [Review and close-out](operating-practices.md#review-and-close-out)
28
+ - [Durable Library artifacts](operating-practices.md#durable-library-artifacts)
29
+ - [Git identity and attribution](operating-practices.md#git-identity-and-attribution)
13
30
 
14
31
  ## Defaults
15
32
 
@@ -24,8 +41,6 @@ operator intent or team governance requires that structure.
24
41
 
25
42
  `rudder ... --json` commands must write valid JSON to stdout on success. ID fields in CLI JSON use short display IDs by default; pass `--full-ids` to preserve raw UUIDs. Short run IDs returned by CLI output can be passed back into `rudder runs get`, `events`, `log`, `transcript`, `errors`, `cancel`, and `retry`. If a command cannot produce the requested JSON, it must exit nonzero and write a diagnostic error to stderr. An exit-0 command with empty stdout is a CLI/runtime defect, not a valid empty result.
26
43
 
27
- Direct API fallback is allowed for heartbeat close-out only when a required CLI command fails diagnostically or returns exit 0 with empty stdout. When using fallback, note the affected command and reason in the issue comment or run notes so the CLI path can be fixed.
28
-
29
44
  ## Agent V1 Commands
30
45
 
31
46
  | MCP Tool | CLI Fallback | Description | Mutating | Org | Agent | Run ID |
@@ -33,7 +48,7 @@ Direct API fallback is allowed for heartbeat close-out only when a required CLI
33
48
  | `rudder_agent_me` | `rudder agent me` | Show the authenticated agent identity, budget, and chain of command. | no | no | no | no |
34
49
  | `rudder_agent_inbox` | `rudder agent inbox` | List the compact assignee and reviewer work inbox for the authenticated agent. | no | no | no | no |
35
50
  | `rudder_agent_capabilities` | `rudder agent capabilities` | List the stable Rudder agent command contract. | no | no | no | no |
36
- | `rudder_agent_update` | `rudder agent update [agent-id] [--title <title>] [--description <text>]` | Update an agent's control-plane identity fields; defaults to the authenticated agent. | yes | no | no | attached when available |
51
+ | `rudder_agent_update` | `rudder agent update [agent-id] [--title <title>] [--description <text>]` | Update an agent's identity fields; defaults to the authenticated agent. | yes | no | no | attached when available |
37
52
  | `rudder_agent_skills_create` | `rudder agent skills create [agent-id] --name <name> [--enable]` | Create an agent-private skill package under AGENT_HOME/skills. | yes | no | no | attached when available |
38
53
  | `rudder_agent_skills_enable` | `rudder agent skills enable <agent-id> <selection-ref...>` | Add skill selections to an agent without replacing existing enabled skills. | yes | no | no | attached when available |
39
54
  | `rudder_agent_skills_sync` | `rudder agent skills sync <agent-id>` | Sync the desired enabled skill set for an agent. | yes | no | no | attached when available |
@@ -95,113 +110,53 @@ Direct API fallback is allowed for heartbeat close-out only when a required CLI
95
110
  | `rudder_chat_messages` | `rudder chat messages <chat-id> [--limit <n>] [--cursor <cursor>] [--include-transcript]` | Read bounded chat messages with page cursors; transcript output is omitted unless requested. | no | no | no | no |
96
111
  | `rudder_chat_transcript` | `rudder chat transcript <chat-id> [--limit <n>] [--cursor <cursor>] [--max-output-chars <n>]` | Read paginated chat messages with assistant transcript entries clipped in human output. | no | no | no | no |
97
112
  | `rudder_chat_read` | `rudder chat read <chat-id> [--turn-limit <n>] [--cursor <cursor>] [--include-output]` | Read a bounded recent-message snapshot for one chat with page cursors. | no | no | no | no |
98
- | `rudder_chat_create` | `rudder chat create --org-id <id>` | Create a chat conversation. | yes | required | no | attached when available |
113
+ | `rudder_chat_create` | `rudder chat create --org-id <id> --body <text>` | Create a chat conversation with its first message. | yes | required | no | attached when available |
99
114
  | `rudder_chat_send` | `rudder chat send <chat-id> --body <text>` | Send an agent-authored message directly to the operator in a chat. | yes | no | required | attached when available |
100
115
  | `rudder_chat_archive` | `rudder chat archive <chat-id>` | Archive a chat conversation without deleting it. | yes | no | no | attached when available |
101
116
  | `rudder_runs_list` | `rudder runs list --org-id <id> [--used-skill <skill>] [--loaded-skill <skill>] [--cursor <cursor>] [--full]` | List lightweight run summaries with stable pagination and filters; use --full only for legacy full-row compatibility. | no | required | no | no |
102
117
  | `rudder_runs_by_skill` | `rudder runs by-skill <skill> --org-id <id> [--evidence <used-or-loaded>] [--cursor <cursor>] [--full]` | Build a paginated skill evidence packet from lightweight run summaries; use --full only for legacy full-row compatibility. | no | required | no | no |
103
- | `rudder_runs_get` | `rudder runs get <run-id>` | Read one observed run detail. | no | no | no | no |
104
- | `rudder_runs_events` | `rudder runs events <run-id> [--after-seq <n>] [--limit <n>]` | List a bounded page of persisted run events with a sequence cursor. | no | no | no | no |
118
+ | `rudder_runs_get` | `rudder runs get <run-id> [--full]` | Read one bounded run summary; use --full only from a direct trusted CLI for raw detail. | no | no | no | no |
119
+ | `rudder_runs_events` | `rudder runs events <run-id> [--cursor <cursor>] [--after-seq <n>] [--limit <n>] [--full]` | List a bounded page of persisted run events with a lossless opaque cursor and clipped payload previews. | no | no | no | no |
105
120
  | `rudder_runs_log` | `rudder runs log <run-id> [--offset <bytes>] [--limit-bytes <n>]` | Read a bounded byte range of stored run log content. | no | no | no | no |
106
- | `rudder_runs_transcript` | `rudder runs transcript <run-id> [--turn-limit <n>] [--cursor <cursor>] [--include-output]` | Read the server-normalized run transcript; human output is compact and JSON includes full entries. | no | no | no | no |
121
+ | `rudder_runs_transcript` | `rudder runs transcript <run-id> [--turn-limit <n>] [--cursor <cursor>] [--include-output] [--full]` | Read a compact server-normalized transcript; --json changes encoding only and --full is direct-CLI-only raw access. | no | no | no | no |
107
122
  | `rudder_runs_errors` | `rudder runs errors <run-id>` | List failed tool calls, stderr, runtime failures, and jump-to-context commands. | no | no | no | no |
108
123
  | `rudder_runs_cancel` | `rudder runs cancel <run-id>` | Cancel a heartbeat run through the governed server route. | yes | no | no | attached when available |
109
124
  | `rudder_runs_retry` | `rudder runs retry <run-id>` | Retry a failed, timed out, or cancelled run through the governed server route. | yes | no | no | attached when available |
110
125
 
111
- ## Issue Close-Out Signals
112
-
113
- Before a successful `todo` or `in_progress` issue run exits, leave one close-out signal with the command that matches the outcome:
114
-
115
- - progress remains: `rudder issue comment <issue> --body-file <path> [--image <path>]`
116
- - work is complete: `rudder issue done <issue> --comment-file <path> [--image <path>]`
117
- - work is blocked: `rudder issue block <issue> --comment-file <path> [--image <path>]`
118
- - ownership changes: add an explicit handoff comment before or with the assignee update
126
+ ## Issue Command I/O And Shapes
119
127
 
120
- If a comment wakes you on an issue not assigned to you, including user-owned or
121
- unassigned issues, treat that comment as the scope of the wake unless it
122
- explicitly asks you to implement, modify files, close the issue, or take
123
- ownership. Questions should get answers, corrections should get acknowledgment
124
- or explanation, and narrow requests should not become permission to finish the
125
- whole issue.
128
+ Operating rules live in [ownership, checkout, and wake scope](operating-practices.md#ownership-checkout-and-wake-scope), [comments and evidence](operating-practices.md#comments-mentions-and-evidence), and [review and close-out](operating-practices.md#review-and-close-out). The CLI close-out shapes are:
126
129
 
127
- If an issue has a reviewer, moving it to `blocked` also routes reviewer work: the reviewer should confirm the blocker, request changes, approve, or keep explicit follow-up open with `rudder issue review`.
130
+ - progress: `rudder issue comment <issue> --body-file <path> [--image <path>]`
131
+ - done: `rudder issue done <issue> --comment-file <path> [--image <path>]`
132
+ - blocked: `rudder issue block <issue> --comment-file <path> [--image <path>]`
128
133
 
129
- Issue comment and close-out commands accept comment bodies only from files or stdin. For any multiline Markdown, command names, code spans, code blocks, test summaries, or screenshot evidence, write the comment to a temporary Markdown file and pass `--body-file <path>` or `--comment-file <path>`, or pass `-` to read the body from stdin.
134
+ Issue comment and close-out commands accept comment bodies only from files or stdin. For multiline Markdown, command names, code spans, code blocks, test summaries, or screenshot evidence, pass `--body-file <path>` or `--comment-file <path>`, or pass `-` to read the body from stdin.
130
135
 
131
136
  Issue comment responses include `shortRef` when available. `rudder issue comments get <issue> <comment-id-or-cmt-ref>` accepts a full comment UUID or `cmt_<uuid-prefix>`, and `rudder issue comments list <issue> --after <comment-id-or-cmt-ref>` accepts the same forms for the pagination anchor. Use the full UUID when a short ref is ambiguous within the issue.
132
137
 
133
138
  `--image` may be repeated. The CLI uploads each local PNG/JPEG/WebP/GIF as an issue attachment and appends Markdown image links to the comment text before sending it.
134
139
 
135
- If your issue comment cites a screenshot path or visual validation artifact, attach that file with `--image <path>` instead of leaving only the local path in the text.
140
+ ## Renderable Library CLI Output
136
141
 
137
- If `RUDDER_WAKE_REASON=issue_passive_followup`, the run is issue follow-up for the same issue. Inspect current issue state first, then leave a progress comment, completion, blocker, or explicit handoff.
142
+ File placement and handoff policy lives in [Durable Library artifacts](operating-practices.md#durable-library-artifacts). Request a renderable reference with `rudder library file ref <library-relative-path> --json`.
138
143
 
139
- ## Renderable Library References
144
+ The relevant JSON fields are:
140
145
 
141
- Agents should not hand-write `library-entry://...` URLs. Local trusted agents
142
- should create and update durable project files directly under
143
- `$RUDDER_PROJECT_LIBRARY_ROOT` with normal filesystem tools when the run has
144
- project context. When there is no project context, write durable generated
145
- chat/work artifacts under
146
- `$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`
147
- and reference the Library-relative product path
148
- `artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>`. After creating,
149
- updating, or reading a durable Library file, use `rudder library file ref` to
150
- get the CLI-returned `markdownLink` for issue comments, review comments,
151
- blocker notes, done comments, and chat replies.
146
+ - `libraryEntryId`: stable identity for the Library file.
147
+ - `mentionHref`: raw renderable target, optionally with a Rudder-generated path hint.
148
+ - `markdownLink`: complete Markdown link for the renderer.
152
149
 
153
- ```bash
154
- printf '%s\n' "<markdown body>" > "$RUDDER_PROJECT_LIBRARY_ROOT/<issue>.md"
155
- result="$(rudder library file ref "$RUDDER_PROJECT_LIBRARY_PATH/<issue>.md" --json)"
156
- printf '%s\n' "$result" | jq -r .markdownLink
150
+ The `ref` argument is Library-relative, not an absolute filesystem path. CLI fallback shapes are `rudder library file get <library-relative-path> --json` and `rudder library file put <library-relative-path> --body-file <path> --json`. `rudder library file link <library-relative-path> --json` remains a compatibility alias for `ref`.
157
151
 
158
- mkdir -p "$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>"
159
- printf '%s\n' "<markdown body>" > "$RUDDER_ORG_WORKSPACE_ROOT/artifacts/YYYY-MM-DD/<conversation-title>/<artifact>.md"
160
- result="$(rudder library file ref "artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>" --json)"
161
- printf '%s\n' "$result" | jq -r .markdownLink
162
- ```
152
+ ## Reviewer Decision Command Shapes
163
153
 
164
- The relevant JSON fields are:
154
+ Reviewer policy lives in [Review and close-out](operating-practices.md#review-and-close-out). Supported decision command shapes are:
165
155
 
166
- - `libraryEntryId`: stable identity for the Library file.
167
- - `mentionHref`: raw `library-entry://<id>` target, optionally with a
168
- Rudder-generated `p` query parameter as a path hint for the current Library
169
- path.
170
- - `markdownLink`: complete Markdown link that the renderer turns into a Library
171
- chip. Its identity remains the entry id; any `p` query value is only a
172
- synchronous navigation hint and agents should not hand-write it.
173
-
174
- Use `rudder library file get/put` only when local filesystem access to the
175
- Library is unavailable, such as remote or restricted runtimes. `rudder library
176
- file link <path> --json` remains as a compatibility alias for `ref`. The
177
- `ref` path is Library-relative, for example
178
- `$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>` with project context or
179
- `artifacts/YYYY-MM-DD/<conversation-title>/<relative-file>` without project
180
- context; do not pass absolute filesystem paths such as
181
- `$RUDDER_PROJECT_LIBRARY_ROOT/...` or `$RUDDER_ORG_WORKSPACE_ROOT/...`. Posting
182
- the returned `markdownLink` is the Rudder-visible handoff checkpoint for direct
183
- filesystem writes. If `$RUDDER_PROJECT_LIBRARY_ROOT` is unset or inaccessible
184
- but `$RUDDER_PROJECT_LIBRARY_PATH` exists, use
185
- `rudder library file get/put "$RUDDER_PROJECT_LIBRARY_PATH/<relative-file>"` as
186
- the remote or restricted runtime fallback. If there is no project context, use
187
- the organization artifacts fallback path instead. Treat `library-file://...` as
188
- legacy weak path syntax and use it only when preserving old content that has no
189
- `libraryEntryId`.
190
-
191
- ## Git Identity Policy
192
-
193
- Codex local runs preserve the operator `HOME` for host CLI auth while using managed `CODEX_HOME` and Git sidecars for runtime isolation. Codex local runs and runtime-created git worktrees are prepared with `user.useConfigOnly=true` so missing identity fails fast instead of producing `*@*.local` commits. If Git reports missing author or committer identity, configure the repository explicitly with `git config user.name <name>` and `git config user.email <safe-email>`; do not unset the guard or accept auto-detected local-host metadata.
194
-
195
- ## Reviewer Close-Out Signals
196
-
197
- When the inbox row or wake context says `relationship: "reviewer"`, `role: "reviewer"`, or `wakeSource: "review"`, finish the review with one structured reviewer decision. Reviewer work can be either `in_review` or `blocked`; blocked reviewer work means blocker triage, not implementation takeover.
198
-
199
- - approve: `rudder issue review <issue> --decision approve --comment-file <path>`
200
- - request changes: `rudder issue review <issue> --decision request_changes --comment-file <path>`
201
- - needs follow-up: `rudder issue review <issue> --decision needs_followup --comment-file <path>`
202
- - blocked or blocker confirmed: `rudder issue review <issue> --decision blocked --comment-file <path>`; use this only for a confirmed human/external blocker and name the next human action.
203
-
204
- Do not rely on a free-form reject or accept comment as the review outcome. The structured decision is the durable close-out signal. If a blocked reviewer decision needs human input, name the next human action in the review comment; Rudder records only the reviewer decision and removes the issue from repeated reviewer pickup until the board changes the issue.
156
+ - `rudder issue review <issue> --decision approve --comment-file <path>`
157
+ - `rudder issue review <issue> --decision request_changes --comment-file <path>`
158
+ - `rudder issue review <issue> --decision needs_followup --comment-file <path>`
159
+ - `rudder issue review <issue> --decision blocked --comment-file <path>`
205
160
 
206
161
  ## Compatibility Commands
207
162
 
@@ -0,0 +1,231 @@
1
+ # Rudder Work 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 Rudder 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 [Agent creation](agent-creation.md) for the canonical governed hiring
122
+ workflow rather than assembling a raw Rudder API 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.