@open-tomato/rafa 0.37.0 → 0.39.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 +23 -6
- package/dist/PROMPT.md +3 -1
- package/dist/bundled/agents/loop-implementer.md +5 -0
- package/dist/bundled/agents/qa-bug-reporter.md +2 -2
- package/dist/bundled/operators/.claude-plugin/plugin.json +1 -1
- package/dist/bundled/operators/agents/rafa-stretch-analyst.md +7 -0
- package/dist/bundled/operators/agents/rafa-stretch-engineer.md +21 -45
- package/dist/bundled/operators/agents/rafa-stretch-watchtower.md +7 -0
- package/dist/bundled/operators/skills/rafa-stretch-pit-stop/SKILL.md +1 -1
- package/dist/bundled/operators/skills/rafa-stretch-sweep/SKILL.md +1 -1
- package/dist/bundled/skills/dev-planner/SKILL.md +2 -2
- package/dist/bundled/stretch/engineer-prompt-default.md +5 -0
- package/dist/cli.js +28586 -22631
- package/dist/{describe-5hqfwbjc.js → describe-pwhh0vws.js} +3 -3
- package/dist/effort/store/index.js +4 -4
- package/dist/{index-1mxv55ec.js → index-1r2b1052.js} +8 -7
- package/dist/{index-k6sd4ym5.js → index-eyjq63mx.js} +2 -2
- package/dist/{index-7bb0fdb7.js → index-g4116t9m.js} +2 -2
- package/dist/{index-jfas157k.js → index-m0wt4nr1.js} +11 -2
- package/dist/{index-fzhd3d4y.js → index-m2ahxjw8.js} +5 -1
- package/dist/{index-35ze56rz.js → index-nwgwxfkt.js} +9886 -7920
- package/dist/{index-b16va6he.js → index-psv1sxkv.js} +5721 -1968
- package/dist/{index-3mzw3kzh.js → index-sr3kc4mf.js} +1 -1
- package/dist/index.js +10 -8
- package/dist/plan/index.js +3 -3
- package/dist/plan-prompt.md +27 -0
- package/dist/plans/resolve-conflict-lockfile.md +2 -2
- package/dist/plans/resolve-conflict-manifest.md +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -58,6 +58,8 @@ your accounts.
|
|
|
58
58
|
| `rafa agent search` | 🪙 the same as `rafa skill search`, over agent definitions |
|
|
59
59
|
| `rafa next` | 🪙 when the step it runs is one of the above; it asks before each step |
|
|
60
60
|
| `rafa epic close` | 🪙 one verification planning session and one session per check; nothing while a member is open |
|
|
61
|
+
| `rafa stretch start` | 🪙 one session per operator it starts: the engineer, watchtower and analyst, or the one `--role` names; with `--dry-run`, nothing |
|
|
62
|
+
| `rafa stretch item` | 🪙 one planning session, unless a plan of the issue is there already, and the loop it starts; with `--dry-run`, nothing |
|
|
61
63
|
|
|
62
64
|
The same 🪙 marks appear in `rafa --help` at all levels and in `rafa describe` output.
|
|
63
65
|
|
|
@@ -132,12 +134,14 @@ the next one, so you rarely have to remember it.
|
|
|
132
134
|
rafa doctor --deep
|
|
133
135
|
```
|
|
134
136
|
|
|
135
|
-
`init` writes
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
the
|
|
137
|
+
`init` writes what is missing of `.rafa/` and `~/.rafa/`, their
|
|
138
|
+
`config.yaml` files, and directories `specs/`, `plans/`, `runs/`,
|
|
139
|
+
`effort/`, `instincts/` under `.rafa/`. On a GitHub repository it also
|
|
140
|
+
offers to set up the board (labels, the spec issue template, a pinned
|
|
141
|
+
Roadmap issue). `doctor` runs every check `loop start` runs before its
|
|
142
|
+
first session, and starts nothing: the prerequisites your config and the
|
|
143
|
+
plan name, `gh` and its login when the repository is on GitHub, and the
|
|
144
|
+
install itself.
|
|
141
145
|
|
|
142
146
|
2. **Write a spec.** A spec says what you get, where things stand, the
|
|
143
147
|
design, what can go wrong, the tasks the plan must carry, and how you
|
|
@@ -751,6 +755,19 @@ from GitHub Issues:
|
|
|
751
755
|
from one mode to the other and remove the old marks. Read
|
|
752
756
|
[docs/specs-and-roadmap.md](docs/specs-and-roadmap.md) under "Board
|
|
753
757
|
relationships" for the full choice and upgrade path.
|
|
758
|
+
- **GitHub project as a board mirror.** `rafa init --board --project` creates
|
|
759
|
+
a GitHub project in your repository, kept in step with your issues by rafa.
|
|
760
|
+
The project mirrors the issues' labels, pull requests, close state, and the
|
|
761
|
+
roadmap checklists: one column per issue (Backlog, Triage, Needs work, Ready,
|
|
762
|
+
Blocked, Claimed, In development, Waiting for approval, In review, Done,
|
|
763
|
+
Cancelled), a row per open issue and closed issue with a plan or in review.
|
|
764
|
+
Five fields track Status, Horizon, Rank, Blocked by and Progress; every
|
|
765
|
+
command that changes an issue's state refreshes its project row, and
|
|
766
|
+
`rafa board sync` repairs any drift made outside rafa. Optional per
|
|
767
|
+
repository: run `rafa init --board` without `--project` to skip the project,
|
|
768
|
+
or `rafa board sync` adds missing issues and refreshes every item on an
|
|
769
|
+
existing project. Read [context/board-project.md](context/board-project.md)
|
|
770
|
+
for the full design and the warnings.
|
|
754
771
|
- **Other trackers.** GitHub Issues is what works today. Linear support
|
|
755
772
|
is being ported from the project rafa grew out of, as an optional
|
|
756
773
|
add-on in a later version. For anything else, open or upvote a request
|
package/dist/PROMPT.md
CHANGED
|
@@ -2,7 +2,9 @@ We shared as much of the plan as this run is configured to share — the whole p
|
|
|
2
2
|
|
|
3
3
|
Do not stage or commit anything: the loop owns staging and committing, and once this session exits cleanly it runs `git add -A` and commits your work under a subject derived from the task text. Leave your changes in the working tree, and leave them in a state the pre-commit hooks accept — a refused hook blocks the task and stops the loop.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Run every command in the foreground, the full test suite included: never start a background command and never wait on a notification. This session is a single `claude -p` turn, so ending it to wait for something leaves no report and no commit; end the session only after your `rafa:report` block.
|
|
6
|
+
|
|
7
|
+
End your final message with exactly one `rafa:report` block shaped like the example below, and write nothing after it: the loop stores what it reads there, and a message without the block stores none of your findings. Write all seven fields, `status`, `feedback`, `findings`, `skills_used`, `blockers`, `out_of_scope_bugs` and `changes`, and write a list with nothing in it as `[]` rather than leaving its field out. `status` is `done` or `blocked`. `feedback` says what was done and how it went. `findings` is a list with one entry per distinct observation, never several merged into one; a finding's `kind` is one of `gotcha`, `pattern`, `location` or `skill-suggestion`, its `signal` is `loud` when it surfaced as a failure or `silent` when something passed while wrong, and its `artifact`, when there is one, is the exact string a recurrence would match on, such as an error message. A finding may also carry a `domain`, the area of work its lesson belongs to, one of `code-style`, `testing`, `git`, `debugging`, `workflow`, `security` or `general-best-practices`; leave it out when none fits. `skills_used` names each skill you invoked. `blockers` lists what stopped the task, each entry a `what` and, when there is one, an `artifact`, `out_of_scope_bugs` the bugs you saw outside it, each bug with `security` set to `true` or `false` — a test type error that the task's base already held is part of the measured backlog and is not reported as a bug, and the type step's line names how many errors the base held — and `changes` is the changelog for your diff, each entry holding the required fields `level` (one of patch, minor, major, none) and `summary` (a quoted line the user would understand), plus optional `area` (the changelog section). Write those closed-set words and `security` bare, as the example does, and double-quote every other value on one line: an unquoted value that opens with a backtick, `@`, `%` or `[` makes the whole block unreadable, and a `#` after a space silently cuts a value short.
|
|
6
8
|
|
|
7
9
|
```rafa:report
|
|
8
10
|
status: done
|
|
@@ -46,6 +46,11 @@ before it. Never pipe to `| tail` alone, and never poll with
|
|
|
46
46
|
tool's own summary line (`N pass, N fail` for the suite); never grep the
|
|
47
47
|
capture for `failed`, which appears in deliberate log fixtures.
|
|
48
48
|
|
|
49
|
+
Run every command in the foreground, the full test suite included: no
|
|
50
|
+
background command, and no waiting on a notification. The session is a
|
|
51
|
+
single `claude -p` turn, so ending it to wait leaves no report and no
|
|
52
|
+
commit; end it only after its `rafa:report` block.
|
|
53
|
+
|
|
49
54
|
The full suite runs only after your task completes (at the task step,
|
|
50
55
|
stage end, and before wrap-up), not in your session. If a diff touches
|
|
51
56
|
`bunfig.toml`, `tsconfig*.json`, `package.json`, `bun.lock`, `bun.lockb`,
|
|
@@ -134,8 +134,8 @@ confirmation — it only adds evidence to a record that already exists.
|
|
|
134
134
|
**7. File it.**
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
|
-
|
|
138
|
-
--label
|
|
137
|
+
rafa issue create --type=bug --body-file /tmp/bug.md \
|
|
138
|
+
--label "<area>" --label "<priority>"
|
|
139
139
|
```
|
|
140
140
|
|
|
141
141
|
Drop the priority label entirely if step 4 produced none, and the area label if
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rafa-operators",
|
|
3
|
-
"description": "Alpha: rafa's stretch operators, loaded per session with --plugin-dir by
|
|
3
|
+
"description": "Alpha: rafa's stretch operators, loaded per session with --plugin-dir by rafa stretch start. Never a loop task executor.",
|
|
4
4
|
"author": { "name": "open-tomato" }
|
|
5
5
|
}
|
|
@@ -9,6 +9,13 @@ stage: alpha
|
|
|
9
9
|
|
|
10
10
|
Alpha: tested on rafa's own development, may become a feature.
|
|
11
11
|
|
|
12
|
+
## Run every rafa line as one command
|
|
13
|
+
|
|
14
|
+
Run every `rafa` line as one command: no `cd … &&`, no `;`, no pipe, no redirect. The allow
|
|
15
|
+
rules match a single command, and a compound one goes to the auto-mode classifier, which
|
|
16
|
+
reads `--skip-checks` as a CI bypass. The tool returns the output; to keep a record, write
|
|
17
|
+
it with the file tools afterwards.
|
|
18
|
+
|
|
12
19
|
## Mission
|
|
13
20
|
|
|
14
21
|
The person works on hunches and curiosity. Your job is to say which hunch the
|
|
@@ -10,6 +10,13 @@ stage: alpha
|
|
|
10
10
|
|
|
11
11
|
Alpha: tested on rafa's own development, may become a feature.
|
|
12
12
|
|
|
13
|
+
## Run every rafa line as one command
|
|
14
|
+
|
|
15
|
+
Run every `rafa` line as one command: no `cd … &&`, no `;`, no pipe, no redirect. The allow
|
|
16
|
+
rules match a single command, and a compound one goes to the auto-mode classifier, which
|
|
17
|
+
reads `--skip-checks` as a CI bypass. The tool returns the output; to keep a record, write
|
|
18
|
+
it with the file tools afterwards.
|
|
19
|
+
|
|
13
20
|
You are a staff engineer on a team that uses rafa as its main tool for
|
|
14
21
|
agentic development. One session of yours is a *stretch*: you take the
|
|
15
22
|
board as it is, pick the work that makes the next release most stable,
|
|
@@ -91,18 +98,10 @@ rafa status
|
|
|
91
98
|
rafa release status
|
|
92
99
|
```
|
|
93
100
|
|
|
94
|
-
Then
|
|
101
|
+
Then, after `rafa stretch start` has set up the integration branch and set `pr.base`:
|
|
95
102
|
|
|
96
103
|
1. Write `agent.json` with your session id.
|
|
97
|
-
2.
|
|
98
|
-
`pr.base` in `.rafa/config.yaml` at it. Both are gap entries.
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
git fetch origin
|
|
102
|
-
git push origin origin/main:refs/heads/stretch/<n>
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
3. **The hook rule.** If any loaded settings file names
|
|
104
|
+
2. **The hook rule.** If any loaded settings file names
|
|
106
105
|
`rafa-tooling-hook`, if a skill named `rafa-hookify` is installed, or if
|
|
107
106
|
any command is denied by a hook, stop and alert the person. Never read
|
|
108
107
|
a permission denial as a hook denial, and never install a hook.
|
|
@@ -120,26 +119,10 @@ approval, close the duplicate groups as the skill says.
|
|
|
120
119
|
|
|
121
120
|
One loop at a time; never two at once inside a stretch.
|
|
122
121
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
setsid nohup env RAFA_OUTPUT=events rafa loop start --plan=<plan> --as-worktree --no-ci-wait > .rafa/stretch/<n>/loop-<issue>.log 2>&1 &
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
`setsid` is Linux's; on macOS start it with `nohup` alone and log the
|
|
132
|
-
difference as a gap. Detached loops are a gap of their own.
|
|
133
|
-
3. Watch it: `rafa loop wait --until=pr,no-pr,halt,error,exit` reads the
|
|
134
|
-
`.rafa/runs/<session-id>.events.ndjson` file your loop wrote, not the
|
|
135
|
-
log. No foreground command waits longer than 60 seconds; longer waits
|
|
136
|
-
run in the background.
|
|
137
|
-
4. Merge its pull request:
|
|
138
|
-
- Into `stretch/<n>`: `rafa pr merge <pr> --skip-checks`. The merge push
|
|
139
|
-
runs `verify` asynchronously; read the result at the pit stop.
|
|
140
|
-
- Into `main`: `rafa pr wait <pr>` then `rafa pr merge <pr>` once
|
|
141
|
-
the checks pass.
|
|
142
|
-
5. Clean up: `rafa cleanup`.
|
|
122
|
+
Run `rafa stretch item <issue> --wait`. It starts the loop as a detached child, logs
|
|
123
|
+
its output to `.rafa/stretch/<n>/loop-<issue>.log`, waits on it, merges its pull
|
|
124
|
+
request into `stretch/<n>` with checks skipped, and polls the run until it ends. Then
|
|
125
|
+
move to the pit stop.
|
|
143
126
|
|
|
144
127
|
### 3. Pit stop
|
|
145
128
|
|
|
@@ -149,20 +132,12 @@ to the bucket; it is never a change of course.
|
|
|
149
132
|
|
|
150
133
|
### 4. Wrap-up
|
|
151
134
|
|
|
152
|
-
1.
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
2. Merge the stretch's pull request into `main` once `verify` is green on
|
|
160
|
-
it: `rafa pr wait <pr>` then `rafa pr merge <pr>`.
|
|
161
|
-
3. After it, point `pr.base` back at `main`, then
|
|
162
|
-
`rafa release settle --dry-run`, check the base it names, and
|
|
163
|
-
`rafa release settle`. Tagging and publishing stay with the person.
|
|
164
|
-
4. Finish `report.md`.
|
|
165
|
-
5. Write the next stretch's opening message to
|
|
135
|
+
1. Run `rafa stretch end`. It opens the pull request from `stretch/<n>` into `main`,
|
|
136
|
+
waits for it to merge, and puts back the `pr.base` recorded when the stretch started.
|
|
137
|
+
2. Once the merge is done, run `rafa release settle --dry-run`, check the base it names,
|
|
138
|
+
and `rafa release settle`. Tagging and publishing stay with the person.
|
|
139
|
+
3. Finish `report.md`.
|
|
140
|
+
4. Write the next stretch's opening message to
|
|
166
141
|
`.rafa/stretch/engineer-prompt.md`, which the launcher reads before any
|
|
167
142
|
other prompt. Write `{{STRETCH}}` and `{{PREVIOUS}}` where the numbers
|
|
168
143
|
go, and keep it to what the next engineer needs on top of this report:
|
|
@@ -175,7 +150,8 @@ to the bucket; it is never a change of course.
|
|
|
175
150
|
weigh;
|
|
176
151
|
- a line saying the self-improvement proposals wait for the person's
|
|
177
152
|
yes, so the person adds the ones they approve before the next start.
|
|
178
|
-
|
|
153
|
+
|
|
154
|
+
5. Add reviewing the engineer prompt to "Steps for the person" in the report.
|
|
179
155
|
|
|
180
156
|
## Halts
|
|
181
157
|
|
|
@@ -9,6 +9,13 @@ stage: alpha
|
|
|
9
9
|
|
|
10
10
|
Alpha: tested on rafa's own development, may become a feature.
|
|
11
11
|
|
|
12
|
+
## Run every rafa line as one command
|
|
13
|
+
|
|
14
|
+
Run every `rafa` line as one command: no `cd … &&`, no `;`, no pipe, no redirect. The allow
|
|
15
|
+
rules match a single command, and a compound one goes to the auto-mode classifier, which
|
|
16
|
+
reads `--skip-checks` as a CI bypass. The tool returns the output; to keep a record, write
|
|
17
|
+
it with the file tools afterwards.
|
|
18
|
+
|
|
12
19
|
You watch one stretch: the `rafa-stretch-engineer` session and the loops
|
|
13
20
|
it starts, on this machine. An agent cannot notice its own crash or its
|
|
14
21
|
own hang, so you are the second session that does. You never fix
|
|
@@ -31,7 +31,7 @@ of course, and never a reason to chase one issue down a rabbit hole.
|
|
|
31
31
|
| Bugs | `rafa issue list --type=bug --limit=200` | the open count rising, or bugs filed during this loop that repeat an open one |
|
|
32
32
|
| Delivery | `rafa loop status`, `rafa pr list` | the run is done with no pull request, or its pull request did not merge |
|
|
33
33
|
| Conflicts | `rafa pr show <pr>` | the pull request conflicts with the integration branch |
|
|
34
|
-
| CI | `
|
|
34
|
+
| CI | `rafa ci status --branch=stretch/<n>` | the run failed (use `gh run view <id> --log-failed` to see why), or is still running |
|
|
35
35
|
|
|
36
36
|
A CI failure already red in the local runs is inherited and noted in the pit-stop entry.
|
|
37
37
|
A new failure is filed as one bug after a search for an existing one. A run still in progress
|
|
@@ -72,7 +72,7 @@ to 20%.
|
|
|
72
72
|
`rafa plan create --issue` plans from a `type:spec` issue only. So the
|
|
73
73
|
bucket's bugs go into one sweep spec that lists them, as the project's
|
|
74
74
|
bug sweeps already do, and six bug slots can run as one or two loops.
|
|
75
|
-
|
|
75
|
+
File that spec with `rafa issue create --type=spec --body-file <path>`.
|
|
76
76
|
|
|
77
77
|
## The bucket report
|
|
78
78
|
|
|
@@ -434,14 +434,14 @@ The second example above has no `skills=` and is still a valid task declaration.
|
|
|
434
434
|
* The RUNNER owns the push, the pull request, the merge with the base,
|
|
435
435
|
the wait for CI, and the release fragment creation. After the last
|
|
436
436
|
task it runs a wrap-up session that promotes findings, compacts
|
|
437
|
-
`progress.txt`, merges `origin
|
|
437
|
+
`progress.txt`, merges `origin/<base>`, commits, pushes and opens (or
|
|
438
438
|
updates) the PR — and then polls that PR's checks, spending repair sessions
|
|
439
439
|
on a red or conflicting result. So a plan must NOT carry a task that opens
|
|
440
440
|
a PR, resolves a merge conflict, waits on CI, compacts `progress.txt`,
|
|
441
441
|
or writes a release fragment. Two openers race: measured,
|
|
442
442
|
one run cut a second branch and opened a second PR for a single plan. A
|
|
443
443
|
close-out task SHOULD still take the mergeability reading (`git merge-tree
|
|
444
|
-
--write-tree origin
|
|
444
|
+
--write-tree origin/<base> HEAD`) and assemble the body material — the gate
|
|
445
445
|
captures, the test plan, the recorded debt — into the plan's close-out
|
|
446
446
|
notes for that wrap-up session to use.
|
|
447
447
|
|