@klaudworks/rmr 1.1.2 → 1.2.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/README.md +19 -0
- package/dist/index.js +3 -3
- package/examples/workflows/beads/implement-agent.md +79 -0
- package/examples/workflows/beads/planner-agent.md +69 -0
- package/examples/workflows/beads/review-agent.md +91 -0
- package/examples/workflows/beads/workflow.yaml +27 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -162,6 +162,25 @@ rmr install feature-dev
|
|
|
162
162
|
rmr run .rmr/workflows/feature-dev/workflow.yaml
|
|
163
163
|
```
|
|
164
164
|
|
|
165
|
+
<details>
|
|
166
|
+
<summary><strong>beads</strong> (requires beads + toon)</summary>
|
|
167
|
+
|
|
168
|
+
Autonomous issue loop powered by Beads: pick the next issue, plan, implement,
|
|
169
|
+
review, then continue with the next issue.
|
|
170
|
+
|
|
171
|
+
See docs: [docs/workflows/beads/](docs/workflows/beads/)
|
|
172
|
+
|
|
173
|
+
Prerequisites:
|
|
174
|
+
- [beads](https://github.com/steveyegge/beads)
|
|
175
|
+
- [toon](https://github.com/toon-format/toon?tab=readme-ov-file)
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
rmr install beads
|
|
179
|
+
rmr run .rmr/workflows/beads/workflow.yaml
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
</details>
|
|
183
|
+
|
|
165
184
|
## Supported Harnesses
|
|
166
185
|
|
|
167
186
|
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.
|
package/dist/index.js
CHANGED
|
@@ -10838,7 +10838,7 @@ function bashScript() {
|
|
|
10838
10838
|
" fi",
|
|
10839
10839
|
"",
|
|
10840
10840
|
' if [[ "${prev}" == "install" ]]; then',
|
|
10841
|
-
' COMPREPLY=( $(compgen -W "feature-dev" -- "${cur}") )',
|
|
10841
|
+
' COMPREPLY=( $(compgen -W "feature-dev beads" -- "${cur}") )',
|
|
10842
10842
|
" return 0",
|
|
10843
10843
|
" fi",
|
|
10844
10844
|
"}",
|
|
@@ -10869,7 +10869,7 @@ function zshScript() {
|
|
|
10869
10869
|
" fi",
|
|
10870
10870
|
"",
|
|
10871
10871
|
" if [[ ${words[2]} == install && $CURRENT -eq 3 ]]; then",
|
|
10872
|
-
" compadd -- feature-dev",
|
|
10872
|
+
" compadd -- feature-dev beads",
|
|
10873
10873
|
" return",
|
|
10874
10874
|
" fi",
|
|
10875
10875
|
"}",
|
|
@@ -10891,7 +10891,7 @@ function fishScript() {
|
|
|
10891
10891
|
`complete -c ${binaryName} -n '__fish_use_subcommand' -a 'install run continue complete completion'`,
|
|
10892
10892
|
`complete -c ${binaryName} -n '__fish_seen_subcommand_from continue' -a '(__rex_complete_run_id)'`,
|
|
10893
10893
|
`complete -c ${binaryName} -n '__fish_seen_subcommand_from run' -a '(__rex_complete_workflow)'`,
|
|
10894
|
-
`complete -c ${binaryName} -n '__fish_seen_subcommand_from install' -a 'feature-dev'`
|
|
10894
|
+
`complete -c ${binaryName} -n '__fish_seen_subcommand_from install' -a 'feature-dev beads'`
|
|
10895
10895
|
].join(`
|
|
10896
10896
|
`);
|
|
10897
10897
|
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# Implement
|
|
2
|
+
|
|
3
|
+
You are implementing one beads issue selected by the planner.
|
|
4
|
+
Use issue comments as the source of truth for research context and plan.
|
|
5
|
+
|
|
6
|
+
## Subagent Use
|
|
7
|
+
|
|
8
|
+
- Do not use subagents for basic code exploration.
|
|
9
|
+
- Read files and grep directly for general repo understanding.
|
|
10
|
+
- Use subagents sparingly, only when a focused deep lookup is needed.
|
|
11
|
+
|
|
12
|
+
## Workflow
|
|
13
|
+
|
|
14
|
+
1. Determine issue id:
|
|
15
|
+
- Use `{{verify.issue_id}}` if present (loop-back from review).
|
|
16
|
+
- Otherwise use `{{plan.issue_id}}`.
|
|
17
|
+
2. If needed, claim issue:
|
|
18
|
+
`bd update <issue-id> --status in_progress --json | toon`
|
|
19
|
+
3. Read issue comments once:
|
|
20
|
+
`bd comments <issue-id> --json -q | toon`
|
|
21
|
+
- Find latest planning comment and any review feedback.
|
|
22
|
+
4. Read relevant source files broadly.
|
|
23
|
+
5. Confirm project checks pass before changes:
|
|
24
|
+
- `go build ./...`
|
|
25
|
+
- `go vet ./...`
|
|
26
|
+
6. Implement the planned change.
|
|
27
|
+
7. Verify:
|
|
28
|
+
- Build passes
|
|
29
|
+
- All tests pass -- not just the ones related to your change.
|
|
30
|
+
If a pre-existing test fails, investigate and fix it.
|
|
31
|
+
Do not skip, disable, or weaken tests to work around breakage.
|
|
32
|
+
- Any additional verification from the issue plan comment.
|
|
33
|
+
8. Commit with a clear message describing what changed and why.
|
|
34
|
+
9. Add implementation handoff comment with:
|
|
35
|
+
- commit hash
|
|
36
|
+
- what changed
|
|
37
|
+
- verification results
|
|
38
|
+
Example:
|
|
39
|
+
`bd comments add <issue-id> "Review target commit: <hash>\n\nImplementation summary: ...\n\nVerification: ..." --json | toon`
|
|
40
|
+
10. Keep the issue open and `in_progress` for review:
|
|
41
|
+
- `bd update <issue-id> --status in_progress --json | toon`
|
|
42
|
+
|
|
43
|
+
## Principles
|
|
44
|
+
|
|
45
|
+
- One atomic commit per task. The review agent expects a single coherent
|
|
46
|
+
change to evaluate.
|
|
47
|
+
- Do NOT fix unrelated issues you happen to notice -- note them in your
|
|
48
|
+
output so they can be filed separately.
|
|
49
|
+
- Do NOT gold-plate. Implement what the plan asks for, elegantly, then stop.
|
|
50
|
+
- Do NOT skip verification. Every change must leave the project in a
|
|
51
|
+
working state.
|
|
52
|
+
|
|
53
|
+
## Output
|
|
54
|
+
|
|
55
|
+
Emit `<rmr:*>` tags at the end of your response. rmr parses these automatically.
|
|
56
|
+
|
|
57
|
+
On success:
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
<rmr:status>done</rmr:status>
|
|
61
|
+
<rmr:issue_id><issue-id></rmr:issue_id>
|
|
62
|
+
<rmr:summary>What was implemented and why</rmr:summary>
|
|
63
|
+
<rmr:commit>The commit hash</rmr:commit>
|
|
64
|
+
<rmr:tests>Test results summary</rmr:tests>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
If blocked after 3 attempts:
|
|
68
|
+
|
|
69
|
+
```
|
|
70
|
+
<rmr:status>human_intervention_required</rmr:status>
|
|
71
|
+
<rmr:issue_id><issue-id></rmr:issue_id>
|
|
72
|
+
<rmr:reason>What is blocking and what was tried</rmr:reason>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Context
|
|
76
|
+
|
|
77
|
+
Reviewer feedback: {{verify.issues}}
|
|
78
|
+
Planned issue: {{plan.issue_id}}
|
|
79
|
+
Loop issue: {{verify.issue_id}}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# Planner
|
|
2
|
+
|
|
3
|
+
You are the combined research + planning step for a beads issue loop.
|
|
4
|
+
Pick one issue, validate it, research it, write the implementation plan to
|
|
5
|
+
issue comments, and hand off by issue id.
|
|
6
|
+
|
|
7
|
+
## Command Rules
|
|
8
|
+
|
|
9
|
+
- Use `--json | toon` for beads commands.
|
|
10
|
+
- Prefer narrow issue-scoped reads after selection.
|
|
11
|
+
- Do not run `bd prime` in this loop.
|
|
12
|
+
|
|
13
|
+
## Subagent Use
|
|
14
|
+
|
|
15
|
+
- Do not use subagents for basic code exploration.
|
|
16
|
+
- Read files and grep directly for general repo understanding.
|
|
17
|
+
- Use subagents sparingly, only when a focused deep lookup is needed.
|
|
18
|
+
|
|
19
|
+
## Workflow
|
|
20
|
+
|
|
21
|
+
1. Select next work (highest priority):
|
|
22
|
+
- `bd list --status in_progress --sort priority --limit 1 --json -q | toon`
|
|
23
|
+
- If an in-progress issue exists, use it.
|
|
24
|
+
- Otherwise: `bd ready --sort priority --limit 1 --json -q | toon`
|
|
25
|
+
2. If no issue is available, stop the loop for this run:
|
|
26
|
+
```
|
|
27
|
+
<rmr:status>done</rmr:status>
|
|
28
|
+
<rmr:next_state>done</rmr:next_state>
|
|
29
|
+
<rmr:summary>No ready beads issues.</rmr:summary>
|
|
30
|
+
<rmr:issue_id>N/A</rmr:issue_id>
|
|
31
|
+
```
|
|
32
|
+
3. If selected issue is not `in_progress`, claim it:
|
|
33
|
+
`bd update <issue-id> --status in_progress --json | toon`
|
|
34
|
+
4. Read issue comments once:
|
|
35
|
+
`bd comments <issue-id> --json -q | toon`
|
|
36
|
+
5. Validate problem and value. If invalid/low-value:
|
|
37
|
+
- Add concise evidence comment.
|
|
38
|
+
- Close the issue with reason.
|
|
39
|
+
- Emit `<rmr:next_state>plan</rmr:next_state>` to continue loop.
|
|
40
|
+
6. For valid issues, research and plan in one pass:
|
|
41
|
+
- Local code touchpoints (paths + symbols)
|
|
42
|
+
- Relevant spec anchors under `spec/`
|
|
43
|
+
- `.cache/repos/` references when useful
|
|
44
|
+
- Risks, edge cases, and test guidance
|
|
45
|
+
7. Write one structured comment that contains both research and plan.
|
|
46
|
+
8. Keep the issue `in_progress` and hand off by `<rmr:issue_id>`.
|
|
47
|
+
|
|
48
|
+
## Output
|
|
49
|
+
|
|
50
|
+
Valid issue handoff:
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
<rmr:status>done</rmr:status>
|
|
54
|
+
<rmr:issue_id><issue-id></rmr:issue_id>
|
|
55
|
+
<rmr:summary>Planned issue <issue-id></rmr:summary>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Invalid/low-value issue (continue loop):
|
|
59
|
+
|
|
60
|
+
```
|
|
61
|
+
<rmr:status>done</rmr:status>
|
|
62
|
+
<rmr:next_state>plan</rmr:next_state>
|
|
63
|
+
<rmr:summary>Closed issue <issue-id>: <reason></rmr:summary>
|
|
64
|
+
<rmr:issue_id><issue-id></rmr:issue_id>
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Context
|
|
68
|
+
|
|
69
|
+
No external task input is required. Select work from beads only.
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
# Review
|
|
2
|
+
|
|
3
|
+
You are reviewing a change made by the implement agent.
|
|
4
|
+
Use the beads issue comments as the source of truth for plan, implementation
|
|
5
|
+
notes, and review history.
|
|
6
|
+
|
|
7
|
+
## Subagent Use
|
|
8
|
+
|
|
9
|
+
- Do not use subagents for basic code exploration.
|
|
10
|
+
- Read files and grep directly for general repo understanding.
|
|
11
|
+
- Use subagents sparingly, only when a focused deep lookup is needed.
|
|
12
|
+
|
|
13
|
+
## Workflow
|
|
14
|
+
|
|
15
|
+
1. Use `{{implement.issue_id}}` as the active issue id.
|
|
16
|
+
2. Read issue comments once:
|
|
17
|
+
`bd comments <issue-id> --json -q | toon`
|
|
18
|
+
- Find latest `Review target commit: <hash>` marker.
|
|
19
|
+
3. Read the commit diff to see the actual changes.
|
|
20
|
+
4. If the diff is not enough to understand the change (large refactors,
|
|
21
|
+
structural moves), read the affected files in their final state.
|
|
22
|
+
5. Evaluate:
|
|
23
|
+
- **Correctness**: Does the change achieve what the plan intended?
|
|
24
|
+
- **No regressions**: Could it break existing behavior?
|
|
25
|
+
- **Code quality**: Clean, idiomatic code? Is the result elegant?
|
|
26
|
+
- **Behavioral preservation**: For refactors, does the code still do
|
|
27
|
+
exactly the same thing?
|
|
28
|
+
- **Net improvement**: Is the codebase clearly better after this change?
|
|
29
|
+
6. Verify the build passes and all tests are green.
|
|
30
|
+
7. Make your decision.
|
|
31
|
+
|
|
32
|
+
## Routing Actions
|
|
33
|
+
|
|
34
|
+
- **Approve**:
|
|
35
|
+
- `bd comments add <issue-id> "Review: approved" --json | toon`
|
|
36
|
+
- `bd close <issue-id> --reason "Approved" --json | toon`
|
|
37
|
+
- **Request changes**:
|
|
38
|
+
- `bd comments add <issue-id> "Review issues: <what to fix and why>" --json | toon`
|
|
39
|
+
- `bd update <issue-id> --status in_progress --json | toon`
|
|
40
|
+
- **Escalate**:
|
|
41
|
+
- `bd comments add <issue-id> "Review blocked: <reason>" --json | toon`
|
|
42
|
+
|
|
43
|
+
## What to Look For
|
|
44
|
+
|
|
45
|
+
- Semantic changes: refactors that subtly change behavior
|
|
46
|
+
- Missing error handling
|
|
47
|
+
- Test validity: new tests that do not actually test what they claim
|
|
48
|
+
- Unrelated changes sneaking in (but touching many files for a consistent
|
|
49
|
+
refactor is fine)
|
|
50
|
+
|
|
51
|
+
## Decisions
|
|
52
|
+
|
|
53
|
+
Use `<rmr:next_state>` to route the workflow.
|
|
54
|
+
|
|
55
|
+
**Approve** -- the change is correct and improves the codebase:
|
|
56
|
+
|
|
57
|
+
```
|
|
58
|
+
<rmr:status>done</rmr:status>
|
|
59
|
+
<rmr:issue_id><issue-id></rmr:issue_id>
|
|
60
|
+
<rmr:next_state>plan</rmr:next_state>
|
|
61
|
+
<rmr:summary>Why this change is good</rmr:summary>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Request changes** -- issues that need fixing (sends back to implement):
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
<rmr:status>done</rmr:status>
|
|
68
|
+
<rmr:issue_id><issue-id></rmr:issue_id>
|
|
69
|
+
<rmr:next_state>implement</rmr:next_state>
|
|
70
|
+
<rmr:issues>What needs to be fixed and why</rmr:issues>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Escalate** -- needs human judgment:
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
<rmr:status>human_intervention_required</rmr:status>
|
|
77
|
+
<rmr:issue_id><issue-id></rmr:issue_id>
|
|
78
|
+
<rmr:reason>Why human input is needed</rmr:reason>
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Do NOT
|
|
82
|
+
|
|
83
|
+
- Make improvements -- review only
|
|
84
|
+
- Refactor code touched by the commit
|
|
85
|
+
- Add unrelated tests
|
|
86
|
+
- Approve changes that fail build or tests
|
|
87
|
+
- Skip or weaken tests to make the suite pass
|
|
88
|
+
|
|
89
|
+
## Context
|
|
90
|
+
|
|
91
|
+
Issue: {{implement.issue_id}}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Beads autonomous loop for rmr.
|
|
2
|
+
# Three steps: plan (select + research + plan), implement, verify (review).
|
|
3
|
+
# verify routes back to plan after approval to continue processing issues.
|
|
4
|
+
|
|
5
|
+
id: beads
|
|
6
|
+
name: Beads Development Workflow
|
|
7
|
+
harness: claude
|
|
8
|
+
|
|
9
|
+
steps:
|
|
10
|
+
- id: plan
|
|
11
|
+
prompt_file: planner-agent.md
|
|
12
|
+
next_step: implement
|
|
13
|
+
requires:
|
|
14
|
+
outputs: [issue_id]
|
|
15
|
+
|
|
16
|
+
- id: implement
|
|
17
|
+
prompt_file: implement-agent.md
|
|
18
|
+
next_step: verify
|
|
19
|
+
requires:
|
|
20
|
+
inputs: [plan.issue_id]
|
|
21
|
+
outputs: [issue_id]
|
|
22
|
+
|
|
23
|
+
- id: verify
|
|
24
|
+
prompt_file: review-agent.md
|
|
25
|
+
next_step: plan
|
|
26
|
+
requires:
|
|
27
|
+
inputs: [implement.issue_id]
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klaudworks/rex",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@klaudworks/rex",
|
|
9
|
-
"version": "1.
|
|
9
|
+
"version": "1.2.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"clipanion": "^4.0.0-rc.4",
|
|
12
12
|
"yaml": "^2.8.2"
|