@open-tomato/rafa 0.20.0 → 0.22.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 CHANGED
@@ -171,6 +171,44 @@ the next one, so you rarely have to remember it.
171
171
 
172
172
  Then step 2 again, or `rafa plan create --next`.
173
173
 
174
+ ### Tracking effort and learning from skills
175
+
176
+ Each run records what it cost in time, tokens and work, and which skills
177
+ were offered, invoked and worked. Two commands read that record:
178
+
179
+ ```bash
180
+ rafa effort collect # gather and store session logs
181
+ rafa effort report # per-plan summary: sessions, tasks, costs
182
+ ```
183
+
184
+ `rafa effort report` shows the per-plan tables (sessions by status and
185
+ outcome), the task report tallies, and any runs whose preflight halted. To
186
+ see which skills earned their place and which are ignored:
187
+
188
+ ```bash
189
+ rafa effort report --skills
190
+ rafa effort report --skills --plan=rafa-24-know-which-skills-earn
191
+ ```
192
+
193
+ With `--skills`, the report shows per plan and per resolver (the method
194
+ that picked which skills to offer: `planner` by task declaration, `tag`
195
+ by ranking, or `none`):
196
+
197
+ - Each **skill**: offered count, invoked count, reported in the outcome,
198
+ recurrence count, and its **signal**: `earning` (worked with no failure
199
+ recurrence), `recurring` (invoked but a failure recurred), `unmeasured`
200
+ (invoked with no failure strings declared), or `ignored` (offered but
201
+ never invoked).
202
+ - Each **lesson**: injected count, recurrence count, and whether it
203
+ recurred.
204
+ - **M1** and **M2**: how many task lines used skills you offered, and how
205
+ many of the skills you offered were actually invoked.
206
+ - **Plan CI**: the settled result of the pull request's checks when it landed.
207
+
208
+ The report opens with a fixed line explaining that it shows co-occurrence,
209
+ not causation: a skill can be invoked and its failure recur for reasons the
210
+ skill does not cover.
211
+
174
212
  ### Which agents and skills are involved
175
213
 
176
214
  A task line may end with a declaration, for example
@@ -289,24 +327,34 @@ from GitHub Issues:
289
327
  `rafa plan create --next` takes the first line that is neither done
290
328
  nor already being worked on, and stops rather than skipping ahead when
291
329
  that issue is not ready. `rafa plan create --issue=<n>` plans from one
292
- issue directly.
330
+ issue directly. Epic lines on the roadmap are descended into when they
331
+ are open, `horizon:now` and not done, making their specs the walk's
332
+ focus; `rafa epics` shows one epic's specs as a table.
333
+ - **Epics group specs into features.** An epic is a bigger issue with an
334
+ acceptance criteria, an estimate and an ordered checklist of its specs.
335
+ Specs carry the epic's label to join it, and rafa never plans across
336
+ two epics. Projects with no epics work exactly as before; an epic is
337
+ purely optional.
293
338
  - **A few labels carry the state**: `type:spec`, `spec:ready` (a person
294
339
  says a plan may be made from it), `spec:needs-work` (details pending,
295
- or the planner's review found gaps and listed them), and `type:bug`
296
- with `needs-triage` for what a run files on its own.
340
+ or the planner's review found gaps and listed them), `type:bug`
341
+ with `needs-triage` for what a run files on its own, `type:epic` and
342
+ `epic:<slug>` (the epic and its member specs).
297
343
  - **Safety, in short.** An issue's text ends up in an agent's prompt, so
298
344
  rafa plans only from an issue whose author can write to the
299
345
  repository, that a maintainer has labelled `spec:ready`, that is
300
346
  complete, and that holds no local path or token. Comments are never
301
347
  read into a plan, rafa never applies `spec:ready` by itself, and
302
348
  machine-specific failures a run meets stay off your public tracker.
349
+ Specs in an epic may not carry two `epic:` labels; `rafa issue ready`
350
+ refuses the second one.
303
351
  - **Other trackers.** GitHub Issues is what works today. Linear support
304
352
  is being ported from the project rafa grew out of, as an optional
305
353
  add-on in a later version. For anything else, open or upvote a request
306
354
  in [the issues](https://github.com/open-tomato/rafa/issues).
307
355
 
308
356
  The full guide, with the spec template explained, a prompt for drafting
309
- a spec and every gate in order, is
357
+ a spec, epics and every gate in order, is
310
358
  [docs/specs-and-roadmap.md](docs/specs-and-roadmap.md).
311
359
 
312
360
  ## From a checkout
@@ -429,7 +477,7 @@ and a line here is ticked by the change that finishes the feature.
429
477
  changed since you last looked
430
478
  - ✅ The right skills reach the right task, chosen when the plan is
431
479
  written
432
- - ⬜ Know which skills earn their place and which are ignored
480
+ - ✅ Know which skills earn their place and which are ignored
433
481
  - ✅ rafa learns from its own runs: what one task works out is handed
434
482
  to the tasks that need it later
435
483
  - ⬜ Skills and lessons shared across projects and machines
@@ -205,6 +205,26 @@ Prose that the loop injects into the context of **only the tasks of one stage**:
205
205
 
206
206
  One `rafa:stage-context` block per stage (optional). The block binds to the nearest `# Stage:` heading above it whether it sits before that stage's tasks or after them, so place it straight after the heading, where a reader looks for it. When one stage holds two, the first is read and each later one is reported as `duplicate-block`. A block above every `# Stage:` heading belongs to no stage: the parser reports it as `orphan-stage-context` and does not read it.
207
207
 
208
+ #### The documentation writer's section
209
+
210
+ A spec may end with `## For the documentation writer`: the use cases,
211
+ edge cases, config examples, analogies and rejected alternatives from its
212
+ design session. Carry it into the plan as context for documentation tasks
213
+ only, so it shapes the examples those tasks write: which situations they
214
+ show and in what order, which config examples they give, lightest first,
215
+ and which analogies they keep.
216
+
217
+ * Put it in the `rafa:stage-context` of the stage holding the plan's
218
+ documentation tasks, the ones declared `{agent=doc-updater}`, trimmed
219
+ to what those tasks document. Never put it in `rafa:context`, which
220
+ reaches every task.
221
+ * It never becomes tasks of its own. The plan's tasks come from the
222
+ spec's "Tasks the plan must carry"; a use case or example listed in the
223
+ section is material for a documentation task, not a deliverable.
224
+ * When no stage holds such a task, because every documentation edit
225
+ folds into the task whose change it documents, the section stays out
226
+ of the plan. The spec keeps it for whoever documents the change later.
227
+
208
228
  ### `rafa:report` (agent output only)
209
229
 
210
230
  Agents return a structured report block at the end of their output. The loop parses this to record findings, blockers, and other metadata.