@open-tomato/rafa 0.46.0 → 0.47.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 +65 -35
- package/dist/adapters/logger/settings.d.ts +2 -2
- package/dist/bugs/record.d.ts +1 -1
- package/dist/bundled/skills/dev-planner/SKILL.md +1 -1
- package/dist/cli.js +74711 -74226
- package/dist/config/index.d.ts +5 -0
- package/dist/config/index.js +6 -3
- package/dist/config/shape.d.ts +8 -5
- package/dist/config/templates.d.ts +64 -0
- package/dist/config-registry.d.ts +21 -12
- package/dist/config-schema-bugs.d.ts +3 -3
- package/dist/config-schema-checks.d.ts +114 -0
- package/dist/config-schema-errors.d.ts +3 -3
- package/dist/config-schema-features.d.ts +4 -4
- package/dist/config-schema-hub.d.ts +3 -1
- package/dist/config-schema-issues.d.ts +2 -2
- package/dist/config-schema-logger.d.ts +3 -3
- package/dist/config-schema-release.d.ts +11 -12
- package/dist/config-schema-tests.d.ts +32 -24
- package/dist/core/command/command.d.ts +1 -1
- package/dist/core/command/confirm.d.ts +11 -5
- package/dist/core/command/index.d.ts +27 -9
- package/dist/core/command/shared-flags.d.ts +40 -0
- package/dist/core/config/config-load-module.d.ts +43 -0
- package/dist/core/config/config-load.d.ts +43 -12
- package/dist/core/config/config-origins.d.ts +31 -30
- package/dist/core/config/config-schema.d.ts +5 -0
- package/dist/core/config/config.d.ts +90 -25
- package/dist/core/config/core-section.d.ts +1 -1
- package/dist/core/config/index.d.ts +10 -6
- package/dist/core/config/merge-method.d.ts +40 -0
- package/dist/core/config/scope.d.ts +2 -2
- package/dist/core/config/section.d.ts +81 -1
- package/dist/core/config/sections.d.ts +13 -5
- package/dist/core/loop/hop-record.d.ts +6 -6
- package/dist/core/loop/index.d.ts +6 -6
- package/dist/core/loop/session-record-parse.d.ts +9 -2
- package/dist/core/loop/sessions.d.ts +22 -10
- package/dist/core/plan/block-reader.d.ts +1 -1
- package/dist/effort/store/index.js +5 -5
- package/dist/errors/rafa-codes.d.ts +1 -1
- package/dist/{index-77ajfffn.js → index-38ktnyvz.js} +1 -1
- package/dist/{index-jh1r4kcn.js → index-3mwsr6wg.js} +333 -330
- package/dist/{index-gqz4jn6j.js → index-7dgc5g1t.js} +4755 -4722
- package/dist/{index-gvek4r8m.js → index-cbqvgda6.js} +82 -26
- package/dist/{index-cy98y87p.js → index-eay1bd2w.js} +143 -108
- package/dist/{index-2a7nb3an.js → index-f1y86zbb.js} +31 -31
- package/dist/{index-j4k2vdz3.js → index-n3e31fmw.js} +205 -289
- package/dist/{index-39kbcw68.js → index-nwzx41g1.js} +4 -4
- package/dist/index-pzpb1rf7.js +153 -0
- package/dist/{index-ykggr043.js → index-r5q2pdky.js} +10 -5
- package/dist/index.js +14602 -14328
- package/dist/learning/index.js +1 -1
- package/dist/plan/index.js +3 -3
- package/dist/ports/index.d.ts +1 -1
- package/dist/{ready-4f8edezt.js → ready-6p40c3gw.js} +260 -269
- package/package.json +22 -1
- package/dist/pr/checks.d.ts +0 -133
- package/dist/pr/types.d.ts +0 -422
package/README.md
CHANGED
|
@@ -594,21 +594,52 @@ rafa· no pr no open pull request for feat/rafa-485
|
|
|
594
594
|
|
|
595
595
|
## Configuration
|
|
596
596
|
|
|
597
|
-
rafa reads its settings from
|
|
597
|
+
rafa reads its settings from two files per scope. The project scope is
|
|
598
598
|
the repository's root; the user scope is `~/.rafa/`, read under every
|
|
599
|
-
project on the machine.
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
1. `rafa.config.ts`, a TypeScript module
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
599
|
+
project on the machine. Each scope reads both of its files, when they
|
|
600
|
+
are there:
|
|
601
|
+
|
|
602
|
+
1. Its module file: `rafa.config.ts`, a TypeScript module, or else
|
|
603
|
+
`rafa.config.mjs`, a JavaScript module. This is your file, which rafa
|
|
604
|
+
never writes.
|
|
605
|
+
2. Its YAML file, `.rafa/config.yaml` in the project and
|
|
606
|
+
`~/.rafa/config.yaml` for the user: the local layer, read over the
|
|
607
|
+
module file key by key. It is the file rafa writes, with `config set`,
|
|
608
|
+
`stretch start` and `stretch end`.
|
|
609
|
+
|
|
610
|
+
The layers stack: rafa's defaults, under the user scope's two files,
|
|
611
|
+
under the project's two. A setting the project's files name outranks the
|
|
612
|
+
same one in the user's, key by key, and within a scope the YAML file's
|
|
613
|
+
value outranks the module file's; a setting no file names takes its
|
|
614
|
+
default.
|
|
609
615
|
`rafa init` writes both YAML files with every setting commented out at
|
|
610
616
|
its default, so uncomment a line, with its section line, to change it.
|
|
611
617
|
|
|
618
|
+
Two keys choose the tests a check point runs: `checks`, one list per
|
|
619
|
+
check point, and `templates`, which adopts a named set of values. A
|
|
620
|
+
project with no entries runs no check at any check point:
|
|
621
|
+
|
|
622
|
+
```yaml
|
|
623
|
+
# .rafa/config.yaml
|
|
624
|
+
checks:
|
|
625
|
+
task: []
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
`templates: [escalation]` adopts the `escalation` template, which sets
|
|
629
|
+
`checks.task: [affected]`, `checks.stage: [related, integration]` and
|
|
630
|
+
`checks.loop: [full]`, and restores the steps rafa ran before these keys
|
|
631
|
+
existed:
|
|
632
|
+
|
|
633
|
+
```yaml
|
|
634
|
+
# .rafa/config.yaml
|
|
635
|
+
templates: [escalation]
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
This repository's own `rafa.config.ts` is its person's file: it carries
|
|
639
|
+
the `templates` key and decision 0009's `checks` table, which
|
|
640
|
+
`context/verification.md` records. The `.rafa/config.yaml` of a checkout
|
|
641
|
+
keeps only what rafa writes there.
|
|
642
|
+
|
|
612
643
|
Tab indentation in `.rafa/config.yaml` is refused with rafa's own error
|
|
613
644
|
on every Bun version, before the parser sees the file. The error names
|
|
614
645
|
the line that carries a tab; use spaces only.
|
|
@@ -629,10 +660,10 @@ Pick the lightest form your situation needs:
|
|
|
629
660
|
- **A JS or TS project that installs rafa as a dev dependency.** Write
|
|
630
661
|
`satisfies Config` or `defineConfig`, both from
|
|
631
662
|
`@open-tomato/rafa/config`, and your editor checks the entries.
|
|
632
|
-
- **A project moving from YAML to TypeScript.**
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
663
|
+
- **A project moving from YAML to TypeScript.** Both files can sit side
|
|
664
|
+
by side for as long as you like. Both are read, the YAML file's keys
|
|
665
|
+
over the TypeScript file's, so a key moves to the TypeScript file once
|
|
666
|
+
it is removed from the YAML file.
|
|
636
667
|
|
|
637
668
|
The same setting in each form:
|
|
638
669
|
|
|
@@ -666,37 +697,36 @@ package installed where the file runs. For this iteration it can be
|
|
|
666
697
|
solved with something simple attacking the type project specifically,
|
|
667
698
|
but the bigger issue remains.
|
|
668
699
|
|
|
669
|
-
Some routes were set aside, each for one reason.
|
|
670
|
-
one scope is not done: a scope reads one file, so one answer per key.
|
|
671
|
-
A Bun plugin redirecting the import does not resolve, as measured.
|
|
700
|
+
Some routes were set aside, each for one reason. A Bun plugin redirecting the import does not resolve, as measured.
|
|
672
701
|
Setting `NODE_PATH` and starting rafa again is not done: it would start
|
|
673
702
|
a second process to load one file. Requiring a local install, as ESLint
|
|
674
703
|
and Vite do, is not done: it would refuse the global Python case above.
|
|
675
704
|
|
|
676
|
-
###
|
|
677
|
-
|
|
678
|
-
When a scope holds a module file and a YAML file, the YAML file is not
|
|
679
|
-
read, and every load says so:
|
|
705
|
+
### Both files of a scope and `rafa config show`
|
|
680
706
|
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
707
|
+
When a scope holds a module file and a YAML file, both are read and
|
|
708
|
+
neither is warned about: the YAML file is the local layer over the
|
|
709
|
+
module file, the interim form of #893's local layer until a file rafa
|
|
710
|
+
generates under `.rafa/` replaces it.
|
|
684
711
|
|
|
685
712
|
`rafa config show` prints every setting with its merged value, nested
|
|
686
713
|
as a config file spells it. `rafa config show --sources` prints one line
|
|
687
|
-
per setting instead
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
714
|
+
per setting instead, with the layer that answered it and the file each
|
|
715
|
+
key came from. The layer is `local` for the project's YAML file,
|
|
716
|
+
`project` for its module file, `user` for either of the user scope's two
|
|
717
|
+
files, `default` for a setting no file names, and `template:<name>` for a
|
|
718
|
+
setting a config template answered. For a file, the line names the file
|
|
719
|
+
and the zero-based entry that last set the setting; a YAML file is
|
|
720
|
+
entry 0. `--output=json` carries the same data for a script. The two
|
|
721
|
+
views are refused together.
|
|
691
722
|
|
|
692
723
|
### Changing a key with `config set`
|
|
693
724
|
|
|
694
|
-
`rafa config set <key>=<value>` edits the project's
|
|
695
|
-
in place and keeps its comments.
|
|
696
|
-
`rafa.config.ts` or `rafa.config.mjs
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
to write.
|
|
725
|
+
`rafa config set <key>=<value>` edits the local layer, the project's
|
|
726
|
+
`.rafa/config.yaml`, in place and keeps its comments. Beside a
|
|
727
|
+
`rafa.config.ts` or `rafa.config.mjs` it still edits that YAML file, and
|
|
728
|
+
the key it sets wins over the module file's value, key by key. rafa never
|
|
729
|
+
writes the module file.
|
|
700
730
|
|
|
701
731
|
### `dangerous.*` settings
|
|
702
732
|
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
* - **The module-level value.** Outside every scope the reader answers
|
|
31
31
|
* one module-level value and the setter replaces it, the defaults
|
|
32
32
|
* until something sets another. A config loaded outside every
|
|
33
|
-
* command sets it, as the module loader (`src/modules/load.ts`) and
|
|
33
|
+
* command sets it, as the module loader (`packages/rafa/src/modules/load.ts`) and
|
|
34
34
|
* the command hook (`src/status/hook.ts`) load one around an
|
|
35
35
|
* invocation; no command reads it.
|
|
36
36
|
*
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
* module state, so a case that sets settings outside a scope sets `null`
|
|
83
83
|
* after it.
|
|
84
84
|
*/
|
|
85
|
-
import type { LogLevel } from '
|
|
85
|
+
import type { LogLevel } from '../../ports/log-level.js';
|
|
86
86
|
/** How a logger colours its lines. */
|
|
87
87
|
export type LoggerTheme = 'default' | 'plain';
|
|
88
88
|
/** The ordered levels, quietest first. `api` is not one of them. */
|
package/dist/bugs/record.d.ts
CHANGED
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
* Nothing here redacts: a caller takes local paths and secrets out of
|
|
57
57
|
* the values before it builds the record.
|
|
58
58
|
*/
|
|
59
|
-
import type { ErrorCodeEntry } from '
|
|
59
|
+
import type { ErrorCodeEntry } from '../errors/codes.js';
|
|
60
60
|
/** A bug's fields, each null until something fills it. */
|
|
61
61
|
export interface BugRecord {
|
|
62
62
|
/** One line saying what is wrong; the title's last part. */
|
|
@@ -354,7 +354,7 @@ The block strip rule means:
|
|
|
354
354
|
- A block in a stage description does not appear in the operator log line
|
|
355
355
|
- A block anywhere in the plan does not appear in a commit subject or commit body
|
|
356
356
|
|
|
357
|
-
The strip happens where the loop reads the next task, `findNextTask` in `src/utils/tracker.ts`, and it follows fences the way a renderer shows them (`packages/rafa/src/core/plan/blocks.ts`):
|
|
357
|
+
The strip happens where the loop reads the next task, `findNextTask` in `packages/rafa/src/utils/tracker.ts`, and it follows fences the way a renderer shows them (`packages/rafa/src/core/plan/blocks.ts`):
|
|
358
358
|
|
|
359
359
|
- Only a closed, top-level `rafa:*` block hides its lines. Every other fence is transparent, so a `- [ ] ` line at column 0 inside a `markdown` or `text` illustration, or inside a `rafa:` fence nested in one, is dispatched as a task. A plan that illustrates the format indents its example lines.
|
|
360
360
|
- A `rafa:` fence that is never closed hides nothing, because taking the rest of the document as its body would end the plan with its tasks unrun. `parsePlan` reports it as `unclosed-block`, and each open task line after it as `task-in-block`.
|