@klaudworks/rmr 0.4.5 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +147 -18
- package/dist/index.js +1905 -1229
- package/examples/workflows/feature-dev/planner-agent.md +4 -0
- package/examples/workflows/feature-dev/review-agent.md +8 -0
- package/examples/workflows/feature-dev/tackle-agent.md +6 -0
- package/examples/workflows/feature-dev/workflow.yaml +14 -52
- package/npm-shrinkwrap.json +2 -2
- package/package.json +2 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Klaudworks
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,24 +1,149 @@
|
|
|
1
|
-
# Ralph Meets Rex
|
|
2
|
-
|
|
3
1
|

|
|
4
2
|
|
|
5
|
-
|
|
3
|
+
**rmr** (Ralph meets Rex) is a CLI tool that orchestrates multi-step AI coding workflows. It spawns coding agents (Claude Code, Codex, OpenCode) in sequence, passing each step's structured output into the next as context. Define your steps in a single YAML file, and rmr handles execution, data flow, routing (including loops), and run persistence so you can pause and resume at any point.
|
|
4
|
+
|
|
5
|
+
> The name? Ralph tends to repeat the same instructions until someone takes his
|
|
6
|
+
> crayons away. Rex is the sheriff that brings order to the chaos. Together they
|
|
7
|
+
> keep your agents on track.
|
|
8
|
+
|
|
9
|
+
Inspired by [snarktank/antfarm](https://github.com/snarktank/antfarm).
|
|
6
10
|
|
|
7
11
|
## Quick Start
|
|
8
12
|
|
|
13
|
+
**Instructions for humans**
|
|
14
|
+
|
|
9
15
|
```bash
|
|
10
16
|
npm install -g @klaudworks/rmr
|
|
11
17
|
|
|
12
18
|
# run from the root of your project
|
|
13
19
|
rmr install feature-dev
|
|
14
|
-
rmr run .rmr/workflows/feature-dev/workflow.yaml
|
|
20
|
+
rmr run .rmr/workflows/feature-dev/workflow.yaml
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
<details>
|
|
26
|
+
<summary>Instructions to copy into your coding agent</summary>
|
|
27
|
+
|
|
15
28
|
```
|
|
29
|
+
## Installing and using rmr (Ralph Meets Rex)
|
|
30
|
+
|
|
31
|
+
rmr is a CLI tool that orchestrates multi-step AI coding workflows. It spawns
|
|
32
|
+
coding agents (Claude Code, OpenCode, Codex) in sequence, passing structured
|
|
33
|
+
outputs between steps.
|
|
34
|
+
|
|
35
|
+
### Installation
|
|
36
|
+
|
|
37
|
+
Install rmr globally:
|
|
38
|
+
|
|
39
|
+
npm install -g @klaudworks/rmr
|
|
40
|
+
|
|
41
|
+
Then install a bundled workflow into the current project. This copies the
|
|
42
|
+
workflow definition and agent prompts into .rmr/workflows/:
|
|
43
|
+
|
|
44
|
+
rmr install feature-dev
|
|
45
|
+
|
|
46
|
+
### IMPORTANT: Never run workflows yourself
|
|
47
|
+
|
|
48
|
+
Do NOT attempt to run `rmr run` or `rmr continue` yourself. rmr spawns
|
|
49
|
+
nested agent sessions (e.g. Claude Code inside Claude Code) which does not work
|
|
50
|
+
from within an agent context. Only the human user should execute workflow runs
|
|
51
|
+
from their terminal.
|
|
52
|
+
|
|
53
|
+
After installing a workflow, tell the user how to run it and print the
|
|
54
|
+
following workflow diagram:
|
|
55
|
+
|
|
56
|
+
The feature-dev workflow runs a plan-implement-review cycle:
|
|
57
|
+
|
|
58
|
+
plan --> implement --> verify --> done
|
|
59
|
+
^ |
|
|
60
|
+
| | (loops back if reviewer requests changes)
|
|
61
|
+
+------------+
|
|
62
|
+
|
|
63
|
+
Three agents collaborate:
|
|
64
|
+
- Planner - researches the codebase and produces an implementation plan
|
|
65
|
+
- Developer - implements the plan, runs tests, creates a commit
|
|
66
|
+
- Reviewer - reviews the diff; can approve, request changes, or escalate
|
|
67
|
+
|
|
68
|
+
To start the workflow, run this in your terminal:
|
|
69
|
+
|
|
70
|
+
rmr run .rmr/workflows/feature-dev/workflow.yaml --task "your task description"
|
|
71
|
+
|
|
72
|
+
### Creating custom workflows
|
|
16
73
|
|
|
17
|
-
|
|
74
|
+
The installed workflow files live in .rmr/workflows/feature-dev/ and can be
|
|
75
|
+
edited freely. A workflow consists of:
|
|
76
|
+
|
|
77
|
+
- workflow.yaml - defines steps, routing, and input/output contracts
|
|
78
|
+
- Prompt files (.md) - markdown prompts for each step (with {{variable}} templates)
|
|
79
|
+
|
|
80
|
+
If the user wants a different workflow, help them by:
|
|
81
|
+
1. Describing what workflow.yaml expects (top-level harness/model, steps with prompt_file, routing, requires)
|
|
82
|
+
2. Writing the workflow YAML and prompt .md files
|
|
83
|
+
3. Placing them in .rmr/workflows/<workflow-name>/
|
|
84
|
+
|
|
85
|
+
Suggest the user describe the workflow they need so you can create a customized
|
|
86
|
+
one, or adjust the existing feature-dev workflow to fit their process.
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
</details>
|
|
90
|
+
|
|
91
|
+
## How It Works
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
id: feature-dev
|
|
95
|
+
name: Feature Development
|
|
96
|
+
harness: claude # default harness for all steps
|
|
97
|
+
|
|
98
|
+
steps:
|
|
99
|
+
- id: plan
|
|
100
|
+
prompt_file: planner-agent.md # markdown prompt, relative to this YAML
|
|
101
|
+
next_step: implement # go here unless agent overrides via <rmr:next_state>
|
|
102
|
+
requires:
|
|
103
|
+
inputs: [task] # fail early if these context keys are missing
|
|
104
|
+
|
|
105
|
+
- id: implement
|
|
106
|
+
prompt_file: tackle-agent.md
|
|
107
|
+
harness: codex # override harness per step
|
|
108
|
+
next_step: verify
|
|
109
|
+
requires:
|
|
110
|
+
inputs: [task, plan.plan]
|
|
111
|
+
outputs: [summary] # agent must emit <rmr:summary>...</rmr:summary>
|
|
112
|
+
|
|
113
|
+
- id: verify
|
|
114
|
+
prompt_file: review-agent.md
|
|
115
|
+
harness: opencode
|
|
116
|
+
model: anthropic/claude-opus-4-6 # override model per step
|
|
117
|
+
next_step: done # overridden to "implement" on issues, see review-agent.md
|
|
118
|
+
requires:
|
|
119
|
+
inputs: [implement.summary]
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Each prompt file contains the full instructions for that step, including `{{variable}}` placeholders that rmr resolves before passing the prompt to the harness:
|
|
123
|
+
|
|
124
|
+
```markdown
|
|
125
|
+
# Review
|
|
126
|
+
|
|
127
|
+
You are reviewing a change. Verify correctness and code quality.
|
|
128
|
+
|
|
129
|
+
...
|
|
130
|
+
|
|
131
|
+
## Context
|
|
132
|
+
|
|
133
|
+
Task: {{task}}
|
|
134
|
+
Plan: {{plan.plan}}
|
|
135
|
+
Developer summary: {{implement.summary}}
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Agents emit structured output using `<rmr:key>value</rmr:key>` tags in their response. The special keys `next_state` and `status` control routing and are not stored in the run context.
|
|
139
|
+
|
|
140
|
+
Run state is persisted after every step to `.rmr/runs/`, so `rmr continue <run-id>` picks up where you left off. If an agent outputs `HUMAN_INTERVENTION_REQUIRED` or a step fails, the run pauses automatically.
|
|
141
|
+
|
|
142
|
+
## Provided Workflows
|
|
18
143
|
|
|
19
144
|
### [feature-dev](docs/workflows/feature-dev/)
|
|
20
145
|
|
|
21
|
-
Plan, implement, and review a single feature end-to-end
|
|
146
|
+
Plan, implement, and review a single feature end-to-end with an automatic revision loop.
|
|
22
147
|
|
|
23
148
|
<p align="center">
|
|
24
149
|
<img src="docs/workflows/feature-dev/flow.svg" width="720" />
|
|
@@ -26,22 +151,26 @@ Plan, implement, and review a single feature end-to-end — with an automatic re
|
|
|
26
151
|
|
|
27
152
|
```bash
|
|
28
153
|
rmr install feature-dev
|
|
29
|
-
rmr run .rmr/workflows/feature-dev/workflow.yaml
|
|
154
|
+
rmr run .rmr/workflows/feature-dev/workflow.yaml
|
|
30
155
|
```
|
|
31
156
|
|
|
32
157
|
## Supported Harnesses
|
|
33
158
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
|
37
|
-
|
|
|
38
|
-
|
|
|
159
|
+
Specify a default harness (and optionally model) at the top level of your workflow file. Individual steps can override both, so you can mix providers within a single workflow.
|
|
160
|
+
|
|
161
|
+
| Harness | Supported |
|
|
162
|
+
| ----------- | :----------------: |
|
|
163
|
+
| Claude Code | :white_check_mark: |
|
|
164
|
+
| Codex | :white_check_mark: |
|
|
165
|
+
| OpenCode | :white_check_mark: |
|
|
166
|
+
| Copilot CLI | :x: |
|
|
167
|
+
| Gemini CLI | :x: |
|
|
39
168
|
|
|
40
169
|
## Commands
|
|
41
170
|
|
|
42
|
-
| Command
|
|
43
|
-
|
|
|
44
|
-
| `rmr install <workflow>`
|
|
45
|
-
| `rmr run <path
|
|
46
|
-
| `rmr continue <run-id>`
|
|
47
|
-
| `rmr completion <shell>`
|
|
171
|
+
| Command | Description |
|
|
172
|
+
| ------------------------ | ---------------------------------------------- |
|
|
173
|
+
| `rmr install <workflow>` | Copy a bundled workflow into `.rmr/workflows/` |
|
|
174
|
+
| `rmr run <path>` | Start a new workflow run |
|
|
175
|
+
| `rmr continue <run-id>` | Resume a paused or interrupted run |
|
|
176
|
+
| `rmr completion <shell>` | Print shell completion script |
|