@seanyao/roll 3.611.3 → 3.613.1

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/package.json CHANGED
@@ -1,10 +1,11 @@
1
1
  {
2
2
  "name": "@seanyao/roll",
3
- "version": "3.611.3",
3
+ "version": "3.613.1",
4
4
  "description": "Roll — Roll out features with AI agents",
5
5
  "packageManager": "pnpm@11.1.3",
6
6
  "scripts": {
7
7
  "test": "bash scripts/test-ts.sh",
8
+ "test:e2e": "pnpm -r build && pnpm --filter @roll/cli exec vitest run test/critical-flows.e2e.test.ts",
8
9
  "test:cov": "pnpm -r exec vitest run --coverage.enabled --coverage.provider=v8 --coverage.include='src/**' --coverage.reporter=text-summary --coverage.reporter=text",
9
10
  "bundle": "node scripts/bundle.mjs",
10
11
  "prepack": "pnpm -r build && pnpm bundle"
@@ -42,6 +42,10 @@ Every hub must include `## Gotchas` or `## Known Failure Modes`.
42
42
  - If a gotcha comes from a missed load, add a positive route case.
43
43
  - If a gotcha comes from an off-target load, add a negative route case.
44
44
  - Treat the section as append-mostly unless an entry is proven obsolete.
45
+ - Never instruct agents to `source "$(command -v roll)"`: the TS-native `roll`
46
+ is a bundled CLI, not a bash library, and sourcing it executes JS as shell
47
+ (FIX-274). Skill steps call `roll <command>` directly — e.g. self-score notes
48
+ go through `roll self-score <skill> <story> <score> <verdict> "<rationale>"`.
45
49
 
46
50
  ## Maintenance Workflow
47
51
 
@@ -797,15 +797,27 @@ Before creating any file or directory:
797
797
 
798
798
  ### Self-score (US-SKILL-012)
799
799
 
800
- Before reporting completion to the user, write one self-score note. The
801
- helper lands the note under `.roll/features/<epic>/<US-id>/notes/<date>-roll-build-<US-id>-<epoch>.md` (the card folder is the note home, US-META-008; resolve <epic> via .roll/index.json)
800
+ Before reporting completion to the user, ensure one score note lands.
801
+ **Pair-first (US-PAIR-009/010): when `.roll/pairing.yaml` enables the `score`
802
+ stage, the paired heterogeneous agent produces the score — self-score is the
803
+ fallback, not the default.** Run from the main project root (the directory
804
+ holding `.roll/`); the note lands under `.roll/features/<epic>/<US-id>/notes/<date>-roll-build-<US-id>-<epoch>.md` (the card folder is the note home, US-META-008; epic resolution and the `.roll/notes/` fallback are built in)
802
805
  with YAML frontmatter so trend analysis (US-SKILL-014) can aggregate later:
803
806
 
804
807
  ```bash
805
- bash -c 'source "$(command -v roll)"; \
806
- _skill_write_self_score roll-build US-XXX-NNN <score 1..10> <good|ok|regression> "<rationale>"'
808
+ # 1. pair-first: ask the paired heterogeneous agent to score the cycle
809
+ roll pair score US-XXX-NNN --summary "<one-paragraph delivery summary>"
810
+ # 2. ONLY when the command prints a fallback hint (pairing off / no candidate /
811
+ # timeout), write the self-score with the printed reason:
812
+ roll self-score roll-build US-XXX-NNN <score 1..10> <good|ok|regression> "<rationale>" --fallback-reason "<reason>"
807
813
  ```
808
814
 
815
+ Both commands are idempotent — retrying after a transient failure is safe.
816
+
817
+ > FIX-274: the TS-native `roll` is a bundled CLI and MUST NOT be sourced as a
818
+ > bash library — the old `source`-based `_skill_write_self_score`
819
+ > path is dead. Retrying after a transient failure is safe (idempotent).
820
+
809
821
  Score guidance (integer 1..10):
810
822
  - **9..10** — story shipped cleanly: AC fully met, TCR rhythm tight, no
811
823
  re-tries from `verdict: too_big`, peer review concerns addressed inline.
@@ -793,13 +793,22 @@ landed and the user has either confirmed or chosen `No` (story still
793
793
  queued) — write a single self-score note covering the design session:
794
794
 
795
795
  ```bash
796
- bash -c 'source "$(command -v roll)"; \
797
- _skill_write_self_score roll-design US-XXX-NNN <score 1..10> <good|ok|regression> "<rationale>"'
796
+ # 1. pair-first (US-PAIR-009/010): when .roll/pairing.yaml enables the `score`
797
+ # stage, the paired heterogeneous agent scores the design session
798
+ roll pair score US-XXX-NNN --skill roll-design --summary "<one-paragraph design-session summary>"
799
+ # 2. ONLY when the command prints a fallback hint (pairing off / no candidate /
800
+ # timeout), write the self-score with the printed reason:
801
+ roll self-score roll-design US-XXX-NNN <score 1..10> <good|ok|regression> "<rationale>" --fallback-reason "<reason>"
798
802
  ```
799
803
 
804
+ > FIX-274: the TS-native `roll` is a bundled CLI and MUST NOT be sourced as a
805
+ > bash library — the old `source`-based `_skill_write_self_score`
806
+ > path is dead. Retrying after a transient failure is safe (idempotent).
807
+
800
808
  Use the **first** US-id of the batch as the story handle (or the
801
- representative story when splitting). The note lands under
802
- `.roll/notes/<date>-roll-design-<id>-<epoch>.md` so US-SKILL-014 can
809
+ representative story when splitting). Run from the main project root; when the
810
+ story already has a card folder the note lands there, otherwise it falls back
811
+ to `.roll/notes/<date>-roll-design-<id>-<epoch>.md` so US-SKILL-014 can
803
812
  read trend data.
804
813
 
805
814
  Score guidance for design quality (integer 1..10):
@@ -508,20 +508,32 @@ A minor change is only "done" when all are true:
508
508
  - [ ] Online verification performed
509
509
  - [ ] **Verification Gate passed** (fresh evidence for tests, build, fix confirmation, no regression)
510
510
  - [ ] **Self-score note written (US-SKILL-010 / 011)** — before exit, the agent
511
- writes a structured score note via `_skill_write_self_score` so trend
511
+ writes a structured score note via `roll self-score` so trend
512
512
  analysis (US-SKILL-014) and skill-self-scoring docs (US-SKILL-015) have
513
513
  data to read.
514
514
 
515
515
  ### Self-score (US-SKILL-011)
516
516
 
517
- Before exiting the cycle, write one self-score note. The helper validates
518
- inputs and lands the note under `.roll/features/<epic>/<FIX-id>/notes/<date>-roll-fix-<FIX-id>-<epoch>.md` (the card folder is the note home, US-META-008; resolve <epic> via .roll/index.json):
517
+ Before exiting the cycle, ensure one score note lands. **Pair-first
518
+ (US-PAIR-009/010): when `.roll/pairing.yaml` enables the `score` stage, the
519
+ paired heterogeneous agent produces the score — self-score is the fallback,
520
+ not the default.** Run from the main project root (the directory holding
521
+ `.roll/`); the note lands under `.roll/features/<epic>/<FIX-id>/notes/<date>-roll-fix-<FIX-id>-<epoch>.md` (the card folder is the note home, US-META-008; epic resolution and the `.roll/notes/` fallback are built in):
519
522
 
520
523
  ```bash
521
- bash -c 'source "$(command -v roll)"; \
522
- _skill_write_self_score roll-fix FIX-XXX-NNN <score 1..10> <good|ok|regression> "<rationale>"'
524
+ # 1. pair-first: ask the paired heterogeneous agent to score the cycle
525
+ roll pair score FIX-XXX-NNN --summary "<one-paragraph delivery summary>"
526
+ # 2. ONLY when the command prints a fallback hint (pairing off / no candidate /
527
+ # timeout), write the self-score with the printed reason:
528
+ roll self-score roll-fix FIX-XXX-NNN <score 1..10> <good|ok|regression> "<rationale>" --fallback-reason "<reason>"
523
529
  ```
524
530
 
531
+ Both commands are idempotent — retrying after a transient failure is safe.
532
+
533
+ > FIX-274: the TS-native `roll` is a bundled CLI and MUST NOT be sourced as a
534
+ > bash library — the old `source`-based `_skill_write_self_score`
535
+ > path is dead. Retrying after a transient failure is safe (idempotent).
536
+
525
537
  Score guidance (integer 1..10):
526
538
  - **9..10** — clean root-cause fix; regression test added; TCR cycle smooth.
527
539
  - **6..8** — fix shipped but with caveats (e.g. workaround, partial coverage,