@open-tomato/rafa 0.52.1 → 0.54.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 (40) hide show
  1. package/dist/PROMPT.md +7 -0
  2. package/dist/bundled/agents/loop-implementer.md +7 -1
  3. package/dist/bundled/operators/skills/rafa-stretch-gap-log/SKILL.md +16 -0
  4. package/dist/bundled/operators/skills/rafa-stretch-pit-stop/SKILL.md +14 -8
  5. package/dist/bundled/operators/skills/rafa-stretch-sweep/SKILL.md +4 -2
  6. package/dist/cli.js +4401 -2084
  7. package/dist/config/index.js +2 -2
  8. package/dist/config/shape.d.ts +7 -5
  9. package/dist/config-registry.d.ts +5 -5
  10. package/dist/config-schema-collaborate.d.ts +85 -0
  11. package/dist/config-schema-features.d.ts +2 -2
  12. package/dist/config-schema-hints.d.ts +53 -0
  13. package/dist/config-schema-hub.d.ts +5 -4
  14. package/dist/core/command/shared-flags.d.ts +1 -1
  15. package/dist/core/config/config-schema.d.ts +1 -1
  16. package/dist/core/config/config.d.ts +1 -1
  17. package/dist/core/git/index.d.ts +12 -5
  18. package/dist/core/git/placed-line.d.ts +86 -0
  19. package/dist/effort/session-log-path.d.ts +34 -0
  20. package/dist/effort/store/answered-rows.d.ts +38 -0
  21. package/dist/effort/store/index.js +5 -3
  22. package/dist/effort/store/merge-conflicts.d.ts +8 -4
  23. package/dist/effort/store/merge-rules.d.ts +16 -5
  24. package/dist/effort/store/merge-store.d.ts +14 -3
  25. package/dist/effort/store/origins.d.ts +5 -4
  26. package/dist/effort/store/repository-facts.d.ts +147 -0
  27. package/dist/effort/store/session-row-types.d.ts +6 -1
  28. package/dist/effort/store/sqlite.d.ts +11 -6
  29. package/dist/{index-4dwaxd5r.js → index-8rr1etrx.js} +10 -3
  30. package/dist/{index-nqaqh4zz.js → index-d772zq3m.js} +44 -4
  31. package/dist/{index-m672ptpg.js → index-dj8en7fg.js} +1 -1
  32. package/dist/{index-1tdzcheq.js → index-mkhbaye7.js} +306 -43
  33. package/dist/{index-4wy2nmyt.js → index-waawdjq2.js} +140 -119
  34. package/dist/index.js +1622 -564
  35. package/dist/learning/index.js +112 -53
  36. package/dist/ports/index.d.ts +5 -5
  37. package/dist/ports/learning.d.ts +28 -2
  38. package/dist/{ready-kac4ty0p.js → ready-9e1pyxdh.js} +3 -3
  39. package/dist/utils/shell.d.ts +17 -0
  40. package/package.json +12 -5
package/dist/PROMPT.md CHANGED
@@ -15,6 +15,13 @@ An `out_of_scope_bugs` entry's `kind` is one of six, a different list from a fin
15
15
  - `docs` applies when the leftover is a documentation fault larger than one stale line, since a single stale doc line goes into `stale_docs` instead.
16
16
  - `machine` applies when the fault lies in this machine or its setup, such as a missing tool or an unreachable service, rather than in the code.
17
17
 
18
+ An out-of-scope entry that is a failing test carries its evidence in `artifact`: bun's `(fail) <describe> > <case>` line as printed, with the test file's header line (`<path>.test.ts:`) above it, and every path in full from the checkout root with its real extension. The file never goes inside the `(fail)` line. For example:
19
+
20
+ ```text
21
+ packages/rafa-pr/src/triage/own-check.test.ts:
22
+ (fail) checkKind > reads a red case as fallout [3.00ms]
23
+ ```
24
+
18
25
  ```rafa:report
19
26
  status: done
20
27
  feedback: |
@@ -46,7 +46,13 @@ with no `packages/` directory and no workspace boundaries to navigate.
46
46
  - **Reproduce of each out-of-scope entry.** Give `reproduce` as one command
47
47
  run from the checkout root whose output or exit code shows the bug, such
48
48
  as `bun test src/x.test.ts` or `grep -n pattern src/y.ts`. Prose only when
49
- no command can show it, and then it names the condition.
49
+ no command can show it, and then it names the condition. A failing test's
50
+ `artifact` quotes bun's `(fail) <describe> > <case>` line as printed, with
51
+ the test file's header line (`<path>.test.ts:`) above it, and every path in
52
+ full from the checkout root with its real extension:
53
+
54
+ packages/rafa-pr/src/triage/own-check.test.ts:
55
+ (fail) checkKind > reads a red case as fallout [3.00ms]
50
56
 
51
57
  ## Verification
52
58
 
@@ -57,6 +57,22 @@ When one matches, add the stretch's case to it:
57
57
  rafa issue comment <n> --body="Seen again in stretch <n>: <the raw line>."
58
58
  ```
59
59
 
60
+ When the config sets `collaborate.rafa` (a project that reports to rafa's
61
+ own board), the gap is filed on that board, not this one. Search and file
62
+ with `--upstream=rafa`, and comment the same way:
63
+
64
+ ```bash
65
+ rafa issue list --upstream=rafa --module=cli-gap --search="<the step in a few words>"
66
+ rafa issue create --upstream=rafa --type=bug --module=cli-gap --action="<the rafa action that came closest, or unknown>" --summary="<the step rafa cannot do yet>" --cause=cli:new-context --reproduce="<the raw line>" --body="<the rafa line that came closest, what it lacks>"
67
+ rafa issue comment <n> --upstream=rafa --body="Seen again in stretch <n>: <the raw line>."
68
+ ```
69
+
70
+ Only a bug is filed upstream: `--type=bug` is the only type it takes. The
71
+ upstream check refuses a run when the config does not set
72
+ `collaborate.rafa`, or when this board's owner differs from the upstream's,
73
+ and a refused line files nothing. A private sibling is named "a private
74
+ sibling repository" in the title and the body, never by its name.
75
+
60
76
  The board is public: no local path, host name, user name or secret in the
61
77
  title or the body.
62
78
 
@@ -32,7 +32,7 @@ step left for you. Read them there; do not run the checks again.
32
32
  | Check | Line | What is wrong |
33
33
  |---|---|---|
34
34
  | Effort | the `Effort:` line of the item's closing output | cost per task drifting up against the baseline, not explained by the item's size |
35
- | Bugs | the `Bugs:`, `Filed since` and `Recheck` lines of the item's closing output | the open count rising, a bug filed during this loop that repeats an open one (a `Recheck` line that says `reproduces`) |
35
+ | Bugs | the `Bugs:`, `Filed since`, `Filed by` and `Recheck` lines of the item's closing output | the open count rising, a bug the item's loop filed (the `Filed by this item's loop` group) that repeats an open one (its `Recheck` line says `reproduces`) |
36
36
  | Delivery | `rafa loop status`, `rafa pr list` | the run is done with no pull request, or its pull request did not merge |
37
37
  | Conflicts | `rafa pr show <pr>` | the pull request conflicts with the integration branch |
38
38
  | CI | the `CI:` line of the item's closing output (`rafa ci status --branch=stretch/<n>` gives the same verdict) | the run failed (use `gh run view <id> --log-failed` to see why), or is still running |
@@ -48,11 +48,17 @@ The readings in the closing output decide nothing; you do. The shapes:
48
48
  it reads `against no baseline`. `Effort: <stub>: no task sessions stored.`
49
49
  is a plan with no task sessions in the store. `Effort: not read (<reason>).`
50
50
  is a reading that failed.
51
- - `Bugs: <n> open.`, then `Filed since <time>: <n>.` with one indented line
52
- per bug filed after the last item, `#<n> <title>: <first line>`. `none` is
53
- a reading, not a failure. `Filed since the last item: not read: <reason>`
54
- is one that failed.
55
- - One `Recheck #<n>: <verdict>` line per bug in that list, judged as
51
+ - `Bugs: <n> open.`, then `Filed since <time>: <n>.` and the bugs filed
52
+ after the last item in two groups, each a count line and one indented
53
+ line per bug, `#<n> <title>: <first line>`.
54
+ `Filed by this item's loop (<stub>): <n>.` comes first: the bugs whose
55
+ `## Plan` section names the item's plan, the only ones you read as the
56
+ item's filings. `Filed by other sessions: <n>.` comes second: bugs that
57
+ name another plan or none, filed by other sessions on the same account.
58
+ They are board weather and say nothing about the item. `none` is a reading,
59
+ not a failure. `Filed since the last item: not read: <reason>` is one
60
+ that failed.
61
+ - One `Recheck #<n>: <verdict>` line per bug in both groups, judged as
56
62
  `rafa bug recheck` judges it, with no comment posted. The verdict is
57
63
  `reproduces`, `gone`, `flaky` (with its failed runs), `stale` or `skipped`
58
64
  (each with its reason), or `manual`. A `manual` line is followed by the
@@ -62,8 +68,8 @@ The readings in the closing output decide nothing; you do. The shapes:
62
68
 
63
69
  A line that says `not read` is the only time you type a command by hand:
64
70
  `rafa effort dashboard` for an `Effort: not read` line, and
65
- `rafa bug recheck <n>` for each bug in the `Filed since` list when the
66
- `Recheck` lines say `not read`. Read the bugs with
71
+ `rafa bug recheck <n>` for each bug in the `Filed by this item's loop`
72
+ group when the `Recheck` lines say `not read`. Read the bugs with
67
73
  `rafa issue list --type=bug --limit=200` when a bug reading is not read
68
74
  and no recheck can be run.
69
75
 
@@ -34,8 +34,10 @@ rafa effort report --trend
34
34
  ```
35
35
 
36
36
  `rafa bug recheck --all` reruns each open bug's test and prints one
37
- verdict per bug. A `gone` bug is closed by the sweep as fixed; a `flaky`
38
- one is grouped as a bug of its own, never read as fixed.
37
+ verdict per bug. A `gone` bug is closed by the sweep as fixed; a
38
+ `gone (trigger removed?)` bug stays open, since its rerun passes only
39
+ because what set it off was removed; a `flaky` one is grouped as a bug
40
+ of its own, never read as fixed.
39
41
 
40
42
  Read the roadmap's "now" epics first: their members are where the
41
43
  project already said the work is.