scsh 1.41.13

Scoped Skills Helper — preflight a git repo and run its scoped skills in ephemeral containers.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
# The scsh-native gorgeous pipeline: run the CURRENT branch through the standard 15-route
# review loop until it meets the approval bar — the workflow twin of the agent-driven
# kickoff-gorgeous-pipeline skill (dkorolev/beautiful-skills), with the loop rendered as
# cycles on the job page instead of living in a chat session. No scaffolding: the branch
# already carries the work. `prepare` writes or updates PR-DESCRIPTION.md from the branch's
# own history, the first 15-route batch reviews it ONCE, and only then the loop runs:
# decide -> fix -> journal -> 15 reviewers -> collect. `decide`, the first loop step, can
# break before any fix when the previous batch passed; otherwise it requests changes and
# another batch runs. Opus 4.8 owns orchestration (prepare, decide, collect), the fix step,
# and journaling; Opus 4.8, Codex Terra, and Cursor Auto independently run each of
# the conventions, justification, reviewability, sanity, and testing profiles — the bundled
# route standard. The bar: 15/15 routes succeed, every grade is excellent or good,
# excellent outnumbers good, and the mean is at least 4.5. Nothing is pushed: fixes come
# back as commits on the caller's branch, exactly like every commits-enabled workflow step.
#
# `journal` is the loop's memory: whatever `fix` deliberately DECLINED becomes a
# `PR-DECISION-<topic>.md` file, committed under the notes identity, that the next cycle's
# reviewers read before grading. A settled question is then argued once instead of
# re-litigated every round, and packdiff lifts those files off the review page into their
# own commentable panels rather than leaving them as clutter in the tree.
#
# Every reviewer step executes the corresponding canonical reviewer skill, embedded in scsh's
# install bundle byte-for-byte from this repository's .skills/. scsh appends only the compact
# grade/comments workflow-output adapter that the shared skill contract explicitly supports.
# Both batches therefore receive the same full static-review prompt with no YAML copy to drift.
description: "Loop the current branch through the 15-route Opus + Codex + Cursor review fleet until it meets the approval bar."
steps:
  prepare:
    agent:
      harness: claude
      model: claude-opus-4-8
    prompt: |
      Read this repository's code and the current branch's git history: the commits since
      the branch diverged from the repository's default branch (main or master). Write or
      update `PR-DESCRIPTION.md` at the repository root describing that change set as if
      opening a pull request. Use exactly these level-two headings, in this order, with no
      other headings: `## Summary`, `## What This Changes`, and `## Implementation Details`.
      Put the big picture and concise bullets first, then explanatory prose, then notable
      implementation details. Commit only that file with the message
      `Prepare PR description.` Never create any additional PR-description section for
      verification commands, expected results, or checklists; that evidence belongs in
      committed tests, README, or another committed verification document. Put a one-line
      summary in the `summary` result field.
    output:
      summary:
        type: string
    commits: true

  initial_conventions_opus:
    needs: prepare
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: conventions-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_conventions_terra:
    needs: prepare
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: conventions-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_conventions_cursor:
    needs: prepare
    agent:
      harness: cursor
      model: auto
    skill: conventions-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_justification_opus:
    needs: prepare
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: justification-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_justification_terra:
    needs: prepare
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: justification-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_justification_cursor:
    needs: prepare
    agent:
      harness: cursor
      model: auto
    skill: justification-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_reviewability_opus:
    needs: prepare
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: reviewability-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_reviewability_terra:
    needs: prepare
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: reviewability-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_reviewability_cursor:
    needs: prepare
    agent:
      harness: cursor
      model: auto
    skill: reviewability-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_sanity_opus:
    needs: prepare
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: sanity-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_sanity_terra:
    needs: prepare
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: sanity-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_sanity_cursor:
    needs: prepare
    agent:
      harness: cursor
      model: auto
    skill: sanity-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_testing_opus:
    needs: prepare
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: testing-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_testing_terra:
    needs: prepare
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: testing-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  initial_testing_cursor:
    needs: prepare
    agent:
      harness: cursor
      model: auto
    skill: testing-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list

  decide:
    needs: |-
      initial_conventions_opus, initial_conventions_terra, initial_conventions_cursor,
      initial_justification_opus, initial_justification_terra, initial_justification_cursor,
      initial_reviewability_opus, initial_reviewability_terra, initial_reviewability_cursor,
      initial_sanity_opus, initial_sanity_terra, initial_sanity_cursor,
      initial_testing_opus, initial_testing_terra, initial_testing_cursor
    inputs:
      PREVIOUS_APPROVED: collect.approved
      PREVIOUS_FEEDBACK: collect.feedback
      INITIAL_CONVENTIONS_OPUS: initial_conventions_opus.grade
      INITIAL_CONVENTIONS_OPUS_COMMENTS: initial_conventions_opus.comments
      INITIAL_CONVENTIONS_TERRA: initial_conventions_terra.grade
      INITIAL_CONVENTIONS_TERRA_COMMENTS: initial_conventions_terra.comments
      INITIAL_CONVENTIONS_CURSOR: initial_conventions_cursor.grade
      INITIAL_CONVENTIONS_CURSOR_COMMENTS: initial_conventions_cursor.comments
      INITIAL_JUSTIFICATION_OPUS: initial_justification_opus.grade
      INITIAL_JUSTIFICATION_OPUS_COMMENTS: initial_justification_opus.comments
      INITIAL_JUSTIFICATION_TERRA: initial_justification_terra.grade
      INITIAL_JUSTIFICATION_TERRA_COMMENTS: initial_justification_terra.comments
      INITIAL_JUSTIFICATION_CURSOR: initial_justification_cursor.grade
      INITIAL_JUSTIFICATION_CURSOR_COMMENTS: initial_justification_cursor.comments
      INITIAL_REVIEWABILITY_OPUS: initial_reviewability_opus.grade
      INITIAL_REVIEWABILITY_OPUS_COMMENTS: initial_reviewability_opus.comments
      INITIAL_REVIEWABILITY_TERRA: initial_reviewability_terra.grade
      INITIAL_REVIEWABILITY_TERRA_COMMENTS: initial_reviewability_terra.comments
      INITIAL_REVIEWABILITY_CURSOR: initial_reviewability_cursor.grade
      INITIAL_REVIEWABILITY_CURSOR_COMMENTS: initial_reviewability_cursor.comments
      INITIAL_SANITY_OPUS: initial_sanity_opus.grade
      INITIAL_SANITY_OPUS_COMMENTS: initial_sanity_opus.comments
      INITIAL_SANITY_TERRA: initial_sanity_terra.grade
      INITIAL_SANITY_TERRA_COMMENTS: initial_sanity_terra.comments
      INITIAL_SANITY_CURSOR: initial_sanity_cursor.grade
      INITIAL_SANITY_CURSOR_COMMENTS: initial_sanity_cursor.comments
      INITIAL_TESTING_OPUS: initial_testing_opus.grade
      INITIAL_TESTING_OPUS_COMMENTS: initial_testing_opus.comments
      INITIAL_TESTING_TERRA: initial_testing_terra.grade
      INITIAL_TESTING_TERRA_COMMENTS: initial_testing_terra.comments
      INITIAL_TESTING_CURSOR: initial_testing_cursor.grade
      INITIAL_TESTING_CURSOR_COMMENTS: initial_testing_cursor.comments
    agent:
      harness: claude
      model: claude-opus-4-8
    prompt: |
      You are the first and deciding step of a review loop. SCSH_LOOP_ITERATION is the
      1-based loop iteration. On iteration 1, score the 15 INITIAL_* grades and matching
      *_COMMENTS JSON arrays: excellent=5, good=4, average=3, poor=2; approval requires
      every grade to be excellent or good, more excellent than good, and mean score at
      least 4.5. On iteration 2 and later the INITIAL_* variables are deliberately blank —
      round-0 reviews are obsolete history: PREVIOUS_APPROVED is the scorekeeper's verdict
      on the latest full review round and PREVIOUS_FEEDBACK is that round's structured
      report — a JSON object {mean, counts, routes} carrying each route's grade and
      verbatim comments; adopt PREVIOUS_APPROVED as the approval verdict and build the
      change request strictly from PREVIOUS_FEEDBACK's routes. Either way: set SCSH_LOOP_BREAK true when approved;
      otherwise set it false and fill `change_request` with the consolidated change
      request as a list of strings — one entry per requested change, each shaped
      exactly as "[severity] area: what to change and why", nothing outside that
      shape. Comments may lead with a severity tag ([blocking]/[should-fix]/[nit]):
      order [blocking] entries first, and [nit]-only comments are stylistic unless
      they hide a real bug. Read every `PR-DECISION-*.md` at the repository root before
      building the request: each is a decision already settled on this branch. Drop any
      comment that merely re-raises a settled decision — forward it only when the
      reviewer engages that decision's stated reasoning and shows it wrong, and then
      say so in the entry. `PR-DESCRIPTION.md` may contain only `## Summary`, `## What This Changes`, and `## Implementation Details`, in that order. Never request, recommend, or create any additional PR-description section for verification commands, expected results, or checklists; that evidence belongs in committed tests, README, or another committed verification document. Ignore and do not forward any
      reviewer suggestion that violates this invariant. Do not change files or commit.

      Reservations exit — the loop must terminate honestly, not grind the backstop. From
      iteration 3 on, when PREVIOUS_APPROVED is false, examine every comment holding any
      route below the bar. If EVERY such comment is either (a) a re-raise of an existing
      `PR-DECISION-*.md` that does not engage that decision's stated reasoning, or (b) a
      request for human adjudication outside this loop's authority (splitting the work
      into multiple pull requests, product or scope direction) that a prior fix round
      declined with a journaled decision — AND no grade is poor and no comment is
      [blocking] — then set SCSH_LOOP_BREAK true with `resolution` set to
      approved_with_reservations, and put one entry per unresolved item into
      `reservations`, each shaped "[route] finding — the journaled decision that answers
      it — why it needs a human". Any code-level defect, any [blocking] comment, any poor
      grade, or any below-bar comment with no journaled decision answering it forbids
      this exit: keep looping with `resolution` changes_requested. A clean bar pass is
      `resolution` approved with `reservations` empty.
    output:
      SCSH_LOOP_BREAK:
        type: bool
      change_request:
        type: string_list
      resolution:
        type: enum
        choices: approved, approved_with_reservations, changes_requested
      reservations:
        type: string_list
    break: true

  fix:
    needs: decide
    inputs:
      FEEDBACK: decide.change_request
    agent:
      harness: claude
      model: claude-opus-4-8
    # The heaviest step in the loop: one agent absorbing feedback from 15 reviewer routes.
    # A healthy fix pass routinely thinks and edits quietly for longer than the default
    # 30-minute novelty window, so it gets a doubled one.
    inactivity_timeout: 3600
    prompt: |
      FEEDBACK is a JSON array of change entries, each "[severity] area: what to change
      and why". Address EVERY entry: either change the code accordingly, or — when you
      judge the current code deliberate and the comment wrong for this change — DECLINE
      it and report that decision in the `decisions` result field. Read every
      `PR-DECISION-*.md` at the repository root first: those are decisions already
      journaled and settled on this branch, and you must never contradict one, nor undo
      an earlier fix. Do NOT write or edit any `PR-DECISION-*.md`, `STYLE-NOTES.md`, or
      other decision file yourself — the journal step that runs after you owns them, and
      a decision file in YOUR commit would be read as code under review. Never write the
      feedback itself to any file. PR-DESCRIPTION.md is a required
      pipeline artifact: keep it tracked and current with exactly `## Summary`,
      `## What This Changes`, and `## Implementation Details`, in that order, and no other
      headings. Commit your changes with the message `Address review feedback.` Never
      create any additional PR-description section for verification commands, expected
      results, or checklists; that evidence belongs in committed tests, README, or another
      committed verification document. Narrate your progress in the terminal as you work:
      print one short line when you take up each reviewer profile's feedback and after
      each meaningful change (a file edited, a request declined). A run whose
      screen shows nothing new for too long is treated as stalled and killed — never work
      silently for more than a few minutes at a stretch. Put a one-line summary of the
      whole change set — what changed, how many files, the commit — in the `message`
      result field. Write `actions` as several short paragraphs, separated by blank
      lines: one paragraph for each reviewer profile and route whose feedback you acted
      on, and a final paragraph for test results and the commit. Do not collapse distinct
      review areas into one paragraph. Fill `decisions` with one entry per request you
      DECLINED — and nothing else; an empty list is the right answer when you acted on
      everything. Shape each entry exactly as
      "[topic] decision — why it stands — what was considered and rejected", where topic
      is two or three lowercase words that name the subject (`commit history`,
      `error handling`). Argue the code, never the process: "these commits stay separate
      because each is independently revertable" is a decision; "no time to re-slice" is
      not.
    output:
      message:
        type: string
      actions:
        type: string
      decisions:
        type: string_list
    commits: true
    commit-identity: runner

  # The loop's memory. Every cycle's declined requests become journaled decisions that
  # the NEXT cycle's reviewers read before grading, so a settled question is argued once
  # instead of re-litigated every round. Committed under the notes identity and confined
  # to `PR-DECISION-*.md`, which is exactly what packdiff lifts off the review page: the
  # reasoning arrives as its own commentable panel rather than as clutter in the tree.
  journal:
    needs: decide, fix
    inputs:
      CHANGE_REQUEST: decide.change_request
      DECLINED: fix.decisions
      FIX_SUMMARY: fix.message
    agent:
      harness: claude
      model: claude-opus-4-8
    prompt: |
      You keep this change's decision journal. DECLINED is a JSON array of the review
      requests the fix step deliberately did not act on, each
      "[topic] decision — why it stands — what was considered and rejected".
      CHANGE_REQUEST is the full request list that round, for context only.

      For EVERY entry in DECLINED, write or update `PR-DECISION-<topic>.md` at the
      repository root, where `<topic>` is the entry's topic in lowercase with spaces
      replaced by dashes (`commit history` -> `PR-DECISION-commit-history.md`). One file
      per topic: when a later cycle revisits a topic you already journaled, REWRITE that
      file so it reads as one settled decision — never append a second opinion, never
      keep a dated log of how the thinking evolved. Each file is exactly:

      ```
      # <Topic, capitalized>

      **Decision.** One sentence, in the present tense, stating what stands.

      **Why.** Two to four sentences of reasoning that will still make sense to someone
      reading this in a year with no memory of the review.

      **Considered and rejected.** What the alternative was and the concrete cost that
      ruled it out. Omit this section only when there was genuinely no alternative.

      **Raised by.** Which reviewer profiles asked for the change.
      ```

      Bottom line up front, always: a reader who stops after **Decision.** must already
      know what was decided. Be exhaustive about the reasoning and ruthless about
      length — no preamble, no restating the request, no hedging, nothing about the
      pipeline or the review process itself. A decision is about the CODE.

      When DECLINED is empty, change nothing and commit nothing.

      Touch ONLY `PR-DECISION-*.md` files at the repository root. Never edit code, tests,
      `PR-DESCRIPTION.md`, or any other file in this step, and never delete a decision
      file that a previous cycle wrote — a commit that touches anything else stops being
      notes and lands in the review as code. Commit with the message
      `Journal review decisions.` Put a one-line summary — how many decisions, which
      topics — in the `message` field.
    output:
      message:
        type: string
    commits: true
    commit-identity: notes

  review_conventions_opus:
    needs: journal
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: conventions-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_conventions_terra:
    needs: journal
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: conventions-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_conventions_cursor:
    needs: journal
    agent:
      harness: cursor
      model: auto
    skill: conventions-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_justification_opus:
    needs: journal
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: justification-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_justification_terra:
    needs: journal
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: justification-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_justification_cursor:
    needs: journal
    agent:
      harness: cursor
      model: auto
    skill: justification-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_reviewability_opus:
    needs: journal
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: reviewability-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_reviewability_terra:
    needs: journal
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: reviewability-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_reviewability_cursor:
    needs: journal
    agent:
      harness: cursor
      model: auto
    skill: reviewability-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_sanity_opus:
    needs: journal
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: sanity-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_sanity_terra:
    needs: journal
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: sanity-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_sanity_cursor:
    needs: journal
    agent:
      harness: cursor
      model: auto
    skill: sanity-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_testing_opus:
    needs: journal
    agent:
      harness: claude
      model: claude-opus-4-8
    skill: testing-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_testing_terra:
    needs: journal
    agent:
      harness: codex
      model: gpt-5.6-terra
      effort: high
    skill: testing-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  review_testing_cursor:
    needs: journal
    agent:
      harness: cursor
      model: auto
    skill: testing-reviewer
    output:
      grade:
        type: enum
        choices: excellent, good, average, poor
      comments:
        type: string_list
    commits: false

  collect:
    needs: |-
      review_conventions_opus, review_conventions_terra, review_conventions_cursor,
      review_justification_opus, review_justification_terra, review_justification_cursor,
      review_reviewability_opus, review_reviewability_terra, review_reviewability_cursor,
      review_sanity_opus, review_sanity_terra, review_sanity_cursor,
      review_testing_opus, review_testing_terra, review_testing_cursor
    do-while: decide
    agent:
      harness: claude
      model: claude-opus-4-8
    inputs:
      GRADE_CONVENTIONS_OPUS: review_conventions_opus.grade
      COMMENTS_CONVENTIONS_OPUS: review_conventions_opus.comments
      GRADE_CONVENTIONS_TERRA: review_conventions_terra.grade
      COMMENTS_CONVENTIONS_TERRA: review_conventions_terra.comments
      GRADE_CONVENTIONS_CURSOR: review_conventions_cursor.grade
      COMMENTS_CONVENTIONS_CURSOR: review_conventions_cursor.comments
      GRADE_JUSTIFICATION_OPUS: review_justification_opus.grade
      COMMENTS_JUSTIFICATION_OPUS: review_justification_opus.comments
      GRADE_JUSTIFICATION_TERRA: review_justification_terra.grade
      COMMENTS_JUSTIFICATION_TERRA: review_justification_terra.comments
      GRADE_JUSTIFICATION_CURSOR: review_justification_cursor.grade
      COMMENTS_JUSTIFICATION_CURSOR: review_justification_cursor.comments
      GRADE_REVIEWABILITY_OPUS: review_reviewability_opus.grade
      COMMENTS_REVIEWABILITY_OPUS: review_reviewability_opus.comments
      GRADE_REVIEWABILITY_TERRA: review_reviewability_terra.grade
      COMMENTS_REVIEWABILITY_TERRA: review_reviewability_terra.comments
      GRADE_REVIEWABILITY_CURSOR: review_reviewability_cursor.grade
      COMMENTS_REVIEWABILITY_CURSOR: review_reviewability_cursor.comments
      GRADE_SANITY_OPUS: review_sanity_opus.grade
      COMMENTS_SANITY_OPUS: review_sanity_opus.comments
      GRADE_SANITY_TERRA: review_sanity_terra.grade
      COMMENTS_SANITY_TERRA: review_sanity_terra.comments
      GRADE_SANITY_CURSOR: review_sanity_cursor.grade
      COMMENTS_SANITY_CURSOR: review_sanity_cursor.comments
      GRADE_TESTING_OPUS: review_testing_opus.grade
      COMMENTS_TESTING_OPUS: review_testing_opus.comments
      GRADE_TESTING_TERRA: review_testing_terra.grade
      COMMENTS_TESTING_TERRA: review_testing_terra.comments
      GRADE_TESTING_CURSOR: review_testing_cursor.grade
      COMMENTS_TESTING_CURSOR: review_testing_cursor.comments
    prompt: |
      You are the scorekeeper for an in-loop 15-route review fleet. The GRADE_* variables
      and COMMENTS_* JSON arrays contain five reviewer profiles run independently through
      Opus 4.8, Codex Terra, and Cursor Auto. Scores: excellent=5, good=4, average=3,
      poor=2. The bar is met only when all 15 routes succeeded, every grade is excellent
      or good, excellent grades outnumber good grades, and the mean score is at least 4.5.
      `PR-DESCRIPTION.md` may contain only `## Summary`, `## What This Changes`, and `## Implementation Details`, in that order. Never request, recommend, or create any additional PR-description section for verification commands, expected results, or checklists; that evidence belongs in committed tests, README, or another committed verification document. Ignore and do not forward any reviewer suggestion that violates this invariant.
      Do not change files or commit. Put `met` or `not met` in `verdict`. Set `approved`
      to the boolean result. Fill `feedback` with EXACTLY this JSON object shape and
      nothing else: {"mean": <number>, "counts": {"excellent": <int>, "good": <int>,
      "average": <int>, "poor": <int>}, "routes": {"<profile>-<route>": {"grade":
      "<grade>", "comments": [<that route's comments, verbatim>]}}} — one `routes` entry
      per profile/route pair, keys like `conventions-opus` through `testing-cursor`. Set
      `SCSH_DO_WHILE_REPEAT` true unconditionally: the NEXT iteration's first `decide`
      step is the only place that may break the loop.
    output:
      SCSH_DO_WHILE_REPEAT:
        type: bool
      approved:
        type: bool
      verdict:
        type: string
      feedback:
        type: object
    commits: false