@open-tomato/rafa 0.9.2 → 0.11.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
@@ -31,7 +31,9 @@ What guides it:
31
31
 
32
32
  ## Before you run it
33
33
 
34
- Read this once; rafa also says it the first time you start a run.
34
+ Read this once; rafa also says it the first time you start a run. Use
35
+ `rafa plan risk` to see what the plan may do on this machine and under
36
+ your accounts.
35
37
 
36
38
  - **Every Claude Code session rafa starts runs with
37
39
  `--dangerously-skip-permissions`.** That is what lets a plan run
@@ -54,6 +56,8 @@ Read this once; rafa also says it the first time you start a run.
54
56
  | `rafa skill backfill --propose` | 🪙 one session per batch of skills; without `--propose`, nothing |
55
57
  | `rafa next` | 🪙 when the step it runs is one of the above; it asks before each step |
56
58
 
59
+ The same 🪙 marks appear in `rafa --help` at all levels and in `rafa describe` output.
60
+
57
61
  Everything else reads files, git and GitHub and spends nothing,
58
62
  `rafa usage` included (it reads `CLAUDE_USAGE_PERCENT` and asks
59
63
  nobody). `rafa loop resume` starts no session itself, but it lets a
@@ -330,6 +334,8 @@ built. A box is ticked by the change that finishes the feature.
330
334
  - [x] Start a plan from the main branch and rafa makes the branch for you
331
335
  - [x] One command takes you to the next step: merge, clean up, plan,
332
336
  branch, start
337
+ - [x] Every command that spends Claude usage says so in its help
338
+ - [x] Before a run, see what it can do on this machine and under your accounts
333
339
  - [ ] The right skills reach the right task, chosen when the plan is
334
340
  written
335
341
  - [ ] Know which skills earn their place and which are ignored
package/dist/SKILL.md CHANGED
@@ -471,6 +471,27 @@ The report rules in this skill restate `src/report/parse.ts`, which is the autho
471
471
 
472
472
  ---
473
473
 
474
+ ## Command-development rule: Claude session declaration
475
+
476
+ When planning work on rafa commands: every command that can start a Claude
477
+ Code session must declare its `spends` field on its `RafaCommand` definition.
478
+ The field tells the help system, `describe` output, and the spawn guard in
479
+ `src/utils/claude.ts` what Claude usage the command declares. It is optional,
480
+ and takes one of four shapes:
481
+
482
+ - `{ when: 'always'; what: string }` — the command always starts a session
483
+ - `{ when: 'with'; flag: string; what: string }` — starts a session only when
484
+ the named flag is passed (flag written as `--resolve`, matched by name)
485
+ - `{ when: 'unless'; flag: string; what: string }` — starts a session unless
486
+ the named flag is passed
487
+ - `{ when: 'through'; what: string }` — may start a session through a
488
+ sub-command it calls
489
+
490
+ The `what` field is a short phrase describing the session (e.g., "one planning
491
+ session"). See `context/cli.md` for the command architecture and examples.
492
+
493
+ ---
494
+
474
495
  ## Examples
475
496
 
476
497
  Each module task below carries its own unit tests, and each stage closes on a test task over what its modules do together.