crysk 0.3.1 → 0.3.2
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 +9 -5
- package/dist/SKILL-6j27707y.md +140 -0
- package/dist/SKILL-816621e5.md +74 -0
- package/dist/SKILL-bnh7nrjz.md +74 -0
- package/dist/SKILL-fv8x6hhx.md +140 -0
- package/dist/SKILL-nv32jpc5.md +74 -0
- package/dist/SKILL-qnfc8yp3.md +539 -0
- package/dist/SKILL-xr56f0b6.md +140 -0
- package/dist/SKILL-yz6wk92g.md +542 -0
- package/dist/ci-admission-09k2ba89.md +126 -0
- package/dist/ci-admission-f19qh39t.md +128 -0
- package/dist/ci-admission-tcqsj7b2.md +126 -0
- package/dist/cli.js +1831 -1150
- package/dist/index.js +1464 -911
- package/dist/materiality-f1qwnvg1.md +27 -0
- package/package.json +3 -2
- package/prompts/materiality.md +27 -0
- package/skills/crysk/SKILL.md +2 -2
- package/skills/crysk-ci-setup/SKILL.md +13 -7
- package/skills/crysk-ci-setup/references/ci-admission.md +4 -0
- package/skills/crysk-loop/SKILL.md +32 -5
- package/src/asset-manifest.ts +2 -0
- package/src/assets.ts +4 -1
- package/src/brand.ts +11 -9
- package/src/ci/cli-record.ts +1 -1
- package/src/ci/gates.ts +31 -0
- package/src/ci/outcome.ts +2 -1
- package/src/ci/override.ts +11 -10
- package/src/ci/publish.ts +44 -103
- package/src/ci/reporter.ts +34 -5
- package/src/ci/review-levels.ts +21 -0
- package/src/ci/setup.ts +1 -2
- package/src/commands/post.ts +17 -0
- package/src/compare/loop.ts +356 -0
- package/src/compare/materiality.ts +266 -0
- package/src/compare/noise.ts +166 -0
- package/src/diversity/projection.ts +3 -0
- package/src/index.ts +1 -1
- package/src/model/routing.ts +62 -0
- package/src/pr/admission.ts +13 -1
- package/src/pr/discovery.ts +17 -5
- package/src/pr/inline.ts +15 -1
- package/src/pr/plan.ts +5 -0
- package/src/pr/post-floor.ts +30 -0
- package/src/pr/posting.ts +4 -0
- package/src/pr/pr-status.ts +14 -0
- package/src/pr/pr.ts +50 -34
- package/src/pr/preflight.ts +2 -2
- package/src/pr/publish-outcome.ts +4 -0
- package/src/pr/review-pr.ts +65 -26
- package/src/pr/teardown.ts +1 -1
- package/src/rereview/prepare.ts +16 -0
- package/src/rereview/state.ts +206 -25
- package/src/review/boundary.ts +4 -1
- package/src/review/dedupe.ts +48 -4
- package/src/review/findings.ts +47 -1
- package/src/review/materiality-gate.ts +134 -0
- package/src/review/pipeline.ts +521 -41
- package/src/review/preflight.ts +69 -0
- package/src/review/report.ts +73 -10
- package/src/review/review.ts +16 -0
- package/src/review/route-preflight.ts +29 -1
- package/src/review/run.ts +2 -0
- package/src/ui/config.ts +8 -0
- package/src/updater.ts +1 -1
|
@@ -0,0 +1,542 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: crysk-loop
|
|
3
|
+
description: "Run the autonomous Crysk PR review loop end-to-end (review -> judge -> fix/reply -> wait -> recheck until done): triage Crysk findings posted as PR comments in their own thread with applied, dismissed, deferred, or misclassified plus reasoning, push verified fixes, and subscribe to re-reviews with `crysk status --pr <n> --wait --json` without stopping to ask the user. Trigger: Crysk (formerly pr-hero) finding comments on a PR you authored, crysk-loop, pr-hero-loop, closing the PR review loop, responding to automated code review, `<!-- crysk-finding` or legacy `<!-- pr-hero-finding` markers in a PR."
|
|
4
|
+
license: Apache-2.0
|
|
5
|
+
metadata:
|
|
6
|
+
author: juanmaagd
|
|
7
|
+
version: "1.8"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## When to Use
|
|
11
|
+
|
|
12
|
+
Load this skill after Crysk has posted findings on a PR you (the coding agent) authored, and
|
|
13
|
+
you need to answer each one so the review loop closes without a human in it by default.
|
|
14
|
+
|
|
15
|
+
Use it when you see comments whose FIRST line matches:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
<!-- crysk-finding path=<url-encoded-path> line=<n> head=<40-hex-sha> c=<12-hex> -->
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Comments posted before the rename to Crysk start with `<!-- pr-hero-` instead of
|
|
22
|
+
`<!-- crysk-` (`<!-- pr-hero-finding`, `<!-- pr-hero-report`, `<!-- pr-hero-triage`, ...).
|
|
23
|
+
Treat them exactly the same; the CLI reads both.
|
|
24
|
+
|
|
25
|
+
Do not use it for ordinary human review comments, or for Crysk's own summary comment
|
|
26
|
+
(`<!-- crysk-report head=<sha> -->`). That comment is a status roll-up plus, since W2
|
|
27
|
+
(issues #16/#17), a `### Comments Outside Diff` bucket for findings GitHub would not
|
|
28
|
+
anchor. Those bucket findings have **no** `<!-- crysk-finding` marker and **no**
|
|
29
|
+
review thread. Do not reply on the summary. Do not invent a `gh` comment for them.
|
|
30
|
+
This skill only answers findings that already have their own `<!-- crysk-finding`
|
|
31
|
+
comment — almost always an inline review comment on Files changed.
|
|
32
|
+
|
|
33
|
+
## Running the CLI (no install needed)
|
|
34
|
+
|
|
35
|
+
Every command below runs through `npx`, so nothing has to be installed on the machine first:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
npx -y crysk <command> ...
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
`npx` needs only Node. Crysk's package brings its own Bun runtime, and when that is
|
|
42
|
+
unavailable it uses a `bun` already on PATH. `-y` skips npx's install prompt, which an agent
|
|
43
|
+
cannot answer. If `crysk` is already on PATH (a global install), `crysk <command>` is the
|
|
44
|
+
same command. Do not install Crysk just to triage a PR. To put these skills into another coding
|
|
45
|
+
agent on the machine, run `npx -y crysk skills install` (non-interactive; `--force` overwrites local edits).
|
|
46
|
+
|
|
47
|
+
You also need `gh`, authenticated as a user with write access to the repository: the driver posts
|
|
48
|
+
through it, and you comment `/crysk recheck` and `/crysk review` through it.
|
|
49
|
+
|
|
50
|
+
## The strategic why
|
|
51
|
+
|
|
52
|
+
The bottleneck of coding with AI is the review. If an agent writes the code and only a human can
|
|
53
|
+
answer a review, the human is the queue. This skill exists so the default actor answering a
|
|
54
|
+
finding is an agent — **the human is the objector, never the gate**: free to weigh in with a
|
|
55
|
+
reaction or a reply whenever they have context or an opinion, never required for the loop to
|
|
56
|
+
close. That only works if the agent actually judges. Closing the loop means answering with a
|
|
57
|
+
tag, not applying the review as a todo list.
|
|
58
|
+
|
|
59
|
+
## You own the judgment
|
|
60
|
+
|
|
61
|
+
Every Crysk comment is a **claim to verify**, not an order. An advisory report never blocks anything. A CI
|
|
62
|
+
report in gate mode can turn the `crysk` status red on blocking findings. Your reply is argument and evidence,
|
|
63
|
+
and it never clears that status on its own while a review can still run. A blocking finding stops counting in
|
|
64
|
+
exactly two ways:
|
|
65
|
+
|
|
66
|
+
- **A fix**, pushed to the head and verified gone by the next review.
|
|
67
|
+
- **A dismissal the CI adjudicator upholds.** You reply `dismissed`, comment `/crysk recheck`, an
|
|
68
|
+
adjudicator running in CI rules on your argument, and only its `upheld` (posted by
|
|
69
|
+
`github-actions[bot]` on that head) lets the next review stop counting the finding. See
|
|
70
|
+
"Closing a dismissal" below.
|
|
71
|
+
|
|
72
|
+
**When no review is left, answers unlock the gate.** Every review rule that skips a push (the
|
|
73
|
+
attempt budget used up, `/crysk stop`, `once_per_pr`, a low-risk or below-threshold delta,
|
|
74
|
+
`manual_only`) carries the last verdict. A carried red turns green, marked
|
|
75
|
+
`fixes unverified`, on the next push when every blocking finding's newest reply, from your
|
|
76
|
+
write-access account, is `applied` at the head it was posted on or a `dismissed` the adjudicator
|
|
77
|
+
upheld. Nobody verifies those fixes, so `applied` must mean you fixed it and ran the tests. The
|
|
78
|
+
gate reads the replies when the push arrives: **reply first, then push.**
|
|
79
|
+
|
|
80
|
+
**`/crysk override` is a maintainer's, and only for what answers cannot unlock.** Never post it,
|
|
81
|
+
and never ask for it because the review budget ran out. Ask a maintainer for it only when:
|
|
82
|
+
- the CI review itself is broken (every hunter failing, credit or credentials, `PRH-HUNTERS-FAILED`):
|
|
83
|
+
stop the loop and report what is failing, never route around it;
|
|
84
|
+
- a `deferred` or `misclassified` finding should merge unfixed: it names a real defect, so
|
|
85
|
+
accepting it is the maintainer's call;
|
|
86
|
+
- a partial review keeps failing on the same hunters and their route cannot be fixed.
|
|
87
|
+
|
|
88
|
+
`deferred` and `misclassified` never leave the gate count, whatever any adjudicator says: they are
|
|
89
|
+
for findings that are real (or real at another severity), so the gate stays red until a fix or a
|
|
90
|
+
human `/crysk override`. You — the
|
|
91
|
+
coding agent running this skill — have the authority and the duty to accept it **or reject
|
|
92
|
+
it**. The four tags are peers. None is the default.
|
|
93
|
+
|
|
94
|
+
- Read the cited code yourself before you pick a tag. The repository is the evidence; the
|
|
95
|
+
review is not.
|
|
96
|
+
- Applying every finding is a failure of this skill, not compliance with it.
|
|
97
|
+
- Do not pick `applied` because it skips the adjudicator and closes the thread faster. Pick
|
|
98
|
+
`applied` only after you independently confirmed the defect and fixed it in this PR.
|
|
99
|
+
- "It is marked CRITICAL" / "the review said so" is not a reason to change code. Severity is
|
|
100
|
+
the hunter's claim, not a command.
|
|
101
|
+
- If you cannot confirm the defect from the code, `dismissed` (with cited disproof) or
|
|
102
|
+
`deferred` (with a real scope argument) is the honest move. Rubber-stamping a fix you did
|
|
103
|
+
not verify is the failure this section exists to prevent.
|
|
104
|
+
|
|
105
|
+
## Review judgment: when to stop vs. when to request another pass
|
|
106
|
+
|
|
107
|
+
You also own the judgment of whether the PR needs **zero more reviews** (stop and merge) or **one more forced review** (when workflow rules suppressed an automatic run on a risky change). Always compare `report.head` against `head` in `crysk status --pr <n> --json` and inspect `git diff <report.head>..<head>`:
|
|
108
|
+
|
|
109
|
+
### A. Stopping diminishing returns (when to stop reviewing and merge)
|
|
110
|
+
|
|
111
|
+
Later review passes hunt only the push delta. Once the real defects from pass 1 are fixed, hunters scanning a small fix-up commit can surface increasingly contrived, speculative, or nitpicky claims. **Fixing a contrived finding just to turn the gate green is worse than a wasted edit:** it creates a new push, triggers another review pass on an even smaller delta, and feeds an endless spiral of defensive code and absurd findings.
|
|
112
|
+
|
|
113
|
+
1. **Never patch code to appease a contrived or over-severitied finding.**
|
|
114
|
+
- If the claimed bug requires an impossible precondition, contradicts an intentional invariant, or is already guarded: tag it `dismissed` with cited code and use `/crysk recheck` so the CI adjudicator clears it **without** a code change or a new push.
|
|
115
|
+
- If the observation is technically true but trivial, stylistic, pre-existing, or inflated to blocking: tag it `misclassified` or `deferred`. Never rewrite working code just to avoid asking for `/crysk override`.
|
|
116
|
+
2. **Do not auto-force past `ci_max_attempts` on routine fix-ups.** The repository's `ci_max_attempts` (default `2`) exists specifically to stop diminishing-returns re-reviews, and the PR gets an "automatic reviews are done" comment when it runs out. The gate then carries the last verdict: answer every blocking finding (`applied` with the fix in the tree, or `dismissed` + `/crysk recheck`) **before** you push, and that push turns a carried red green, marked `fixes unverified`. If the commits since `report.head` only applied straightforward fixes for already-triaged findings, do not post `/crysk review`: stop the loop and tell the user the PR finished its review passes and is ready to merge, with the fixes unverified by a review. No override is needed.
|
|
117
|
+
3. **Stop and recommend merge when only diminishing-returns items remain.** On `override-or-fix` (or pass 2+ when every real bug is fixed and the only remaining red-gate items are `deferred`, `misclassified`, or a contrived finding whose dismissal the adjudicator did not uphold), **do not cave in and edit the code**. Exit the loop, list the remaining finding(s) with a one-line explanation of why they are contrived/out-of-scope, and tell the user the PR is ready to `/crysk override` and merge.
|
|
118
|
+
4. **Stop automatic reviews BEFORE the push that should not be reviewed.** When you decide no further review pass is needed but you still have fixes to push, post `gh pr comment <n> --body "/crysk stop"` **first**, then `git push`. CI admission reads the stop on that push and skips the review, carrying the last verdict (a carried red turns green, marked `fixes unverified`, when every blocking finding was answered before that push; otherwise it stays red). The stop stays in force for every later push until someone comments `/crysk review` or `/crysk recheck`. It counts only from a user with write access, starts no workflow run, and costs $0. Never push first and try to stop the review afterwards: nothing cancels a review that already started.
|
|
119
|
+
|
|
120
|
+
### B. Requesting or suggesting another review when workflow rules skipped it
|
|
121
|
+
|
|
122
|
+
The opposite happens when a repository's workflow policy (`once_per_pr`, `thresholded`, `risk_aware` below the score floor, `ci_max_attempts` exhausted, or the size gate) suppresses an automatic review on a push that **genuinely changed load-bearing code**:
|
|
123
|
+
- Under `once_per_pr`, `thresholded`, or `risk_aware`, a skipped push can inherit a carried `success` status from `report.head`, so `next_action` reads `"done"` even though `report.head !== head` (the commits `report.head..head` were never reviewed).
|
|
124
|
+
- Under `ci_max_attempts` or `manual_only`, the push carries the last verdict the same way, or a `fixes unverified` green once every blocking finding is answered. Under the size or spend-ceiling gate, the automatic run is blocked and the head is red. Either way `report.head !== head`.
|
|
125
|
+
|
|
126
|
+
Whenever `report.head !== head`, inspect `git diff <report.head>..<head>`:
|
|
127
|
+
- If that unreviewed delta introduced **new business logic, state-machine or concurrency changes, auth/security/isolation edits, or a non-trivial refactor** (for example, fixing a finding required redesigning a function rather than adding a guard), an extra review **is** justified:
|
|
128
|
+
- When `next_action` is `"review"` or `"override-or-fix"` (and within the forced-run bound below), trigger `gh pr comment <n> --body "/crysk review"` and subscribe with `npx -y crysk status --pr <n> --wait --json` — or, if `next_action` is `"done"` on a carried green status (or the forced-run bound is reached), explicitly **recommend running `/crysk review`** to the user and name the exact files/changes in `report.head..head` that warrant a fresh pass before merging.
|
|
129
|
+
|
|
130
|
+
### C. Suspecting a flawed integration or design (stop patching, rethink the root cause)
|
|
131
|
+
|
|
132
|
+
Reaching zero findings after several rounds of band-aid fixes is a failure if the underlying design was wrong from the start. Contrast this with `### A` (where later rounds only surface contrived nits): here the findings are **real**, and the volume or churn is telling you the approach itself is broken.
|
|
133
|
+
|
|
134
|
+
Suspect a flawed integration or architecture when **either** of these signals appears. The number of findings alone is not a signal: a first round with many real findings on one new feature is normal polish.
|
|
135
|
+
|
|
136
|
+
1. **Whack-a-mole loops (fixes spawning new real findings):** By Round 2+, fixing the previous round's findings introduces *new*, legitimate blocking findings in the next review pass, on the same seam — a sign that patches are fighting the architecture rather than closing isolated defects (or a finding returns at higher severity in the summary report).
|
|
137
|
+
2. **Broken foundational assumption:** Two or more findings show that the code's mental model of an external API, lifecycle, concurrency guarantee, or module ownership does not hold (for example, the code infers from outside a system what that system already knows).
|
|
138
|
+
|
|
139
|
+
**Action when triggered:**
|
|
140
|
+
- **Halt the incremental fix-and-push loop before replying or patching.** Do **not** post `applied` replies for fixes that will not be pushed, and do not stack another round of tactical band-aids just to force the gate green. If unpushed local fix attempts exist, do not push them.
|
|
141
|
+
- If `/crysk stop` was posted to pause automatic reviews while refactoring, remember that `/crysk stop` is persistent. Once the clean redesign is implemented and pushed, comment `/crysk review` on the PR to lift the stop and ensure CI reviews the new architecture.
|
|
142
|
+
- Step back, identify the single root architectural or integration decision that caused the cluster of findings, and stop to report the diagnosis to the user (with the concrete alternative design or clean refactor plan) before continuing.
|
|
143
|
+
|
|
144
|
+
## Which command spelling to post
|
|
145
|
+
|
|
146
|
+
This skill names the commands as `/crysk review`, `/crysk recheck` and `/crysk override`. A
|
|
147
|
+
workflow set up before the rename to Crysk listens only for `/pr-hero review`, `/pr-hero recheck`
|
|
148
|
+
and `/pr-hero override`, and ignores `/crysk` comments. Comment triggers run the workflow on the
|
|
149
|
+
default branch, so check that file once per PR before posting any command. The workflow file is
|
|
150
|
+
`crysk.yml`, or `pr-hero.yml` in a repository set up before the rename (never both), so try either:
|
|
151
|
+
|
|
152
|
+
```bash
|
|
153
|
+
for f in crysk.yml pr-hero.yml; do
|
|
154
|
+
gh api "repos/{owner}/{repo}/contents/.github/workflows/$f" --jq .content 2>/dev/null | base64 -d | grep -q "'/crysk review'" && exit 0
|
|
155
|
+
done; exit 1
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Exit 0 means the workflow accepts `/crysk`: post the `/crysk` form. Otherwise post the same
|
|
159
|
+
command with `/pr-hero` in place of `/crysk`. If the workflow lives under another file name,
|
|
160
|
+
read that file instead.
|
|
161
|
+
|
|
162
|
+
## The loop, end to end
|
|
163
|
+
|
|
164
|
+
**Run this as a continuous autonomous loop (`while next_action !== "done"`).** Never end your turn or stop to ask the human for permission between `triage`, fixing code, `git push`, `recheck`, `review`, and waiting for CI to finish. Stop only when `next_action === "done"` or one of the hard escalation stops below triggers (repeated gate/runner failure, 6 forced runs on one head, 2 consecutive `inconclusive` heads, a suspected flawed design (### C), or `override-or-fix` with nothing left you can fix).
|
|
165
|
+
|
|
166
|
+
0. **Subscribe to and read the PR's settled state.** Run:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
npx -y crysk status --pr <n> --wait --json
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
It is read-only (reads GitHub through `gh`, writes nothing) and **deterministic**:
|
|
173
|
+
- When the head is already settled, it returns immediately on the first poll without sleeping.
|
|
174
|
+
- When a review is in flight (`next_action === "wait"`) **or** booting in the 3-minute startup grace window right after a `git push`, `/crysk review`, or `/crysk recheck`, `--wait` polls every 15s until the review finishes and emits the settled JSON in one call. Never invent your own `sleep` loop.
|
|
175
|
+
|
|
176
|
+
Act on its `next_action` and immediately loop back to step 0 until `done`:
|
|
177
|
+
- `wait`: if `--wait` was omitted, re-run with `--wait` and let it block until the review finishes.
|
|
178
|
+
- `review`: no review has run on this head, the last one did not finish, or the CI adjudicator
|
|
179
|
+
upheld every dismissal and the next review will stop counting them. (A head statused before
|
|
180
|
+
2026-10-30 may also read "the automatic review budget for this PR is used up"; push the answered
|
|
181
|
+
fixes instead, and the gate carries the verdict.) Check the forced-run bound below, comment
|
|
182
|
+
`gh pr comment <n> --body "/crysk review"`, and immediately run step 0 with `--wait`.
|
|
183
|
+
- `triage`: a live blocking finding on this head has no triage reply at the head it was posted
|
|
184
|
+
on, or the gate is green and a finding posted on this head has no reply yet (advisory findings
|
|
185
|
+
need one too). Run the triage batch below (steps 1–6), which judges every finding, applies real fixes in the tree, posts all replies, and either pushes the fixes or triggers `recheck` before looping back to step 0 with `--wait`.
|
|
186
|
+
- `fix`: a blocking finding is tagged `applied`, or a blocking finding has no comment thread
|
|
187
|
+
(`comment_id` is null: a summary-only row, or one never posted inline). Commit and `git push` the fix, then immediately run step 0 with `--wait` so the next review verifies it. A thread-less finding cannot be answered with `triage reply`, so fix it or ask a maintainer for `/crysk override`.
|
|
188
|
+
- `recheck`: blocking findings are answered `dismissed` (with no pending code fixes to push) and the CI adjudicator has not ruled on
|
|
189
|
+
them on this head (or ruled `inconclusive`). Comment `gh pr comment <n> --body "/crysk recheck"`, then immediately run step 0 with `--wait` and follow "Closing a dismissal" below.
|
|
190
|
+
- `override-or-fix`: the gate is red and nothing is left for `triage` or `recheck`. Read the
|
|
191
|
+
`reason` and act on the case it names; never override it yourself:
|
|
192
|
+
- the head was size- or budget-skipped (the gate description starts "crysk skipped the
|
|
193
|
+
review", or "pr-hero skipped the review" on a status an older action wrote): comment `/crysk review`, then run step 0 with `--wait`;
|
|
194
|
+
- the review is "partial again" with the same hunters failing: fix the failing hunter's route
|
|
195
|
+
(model or credential), or ask a maintainer to override;
|
|
196
|
+
- every blocking finding is already answered but none can clear without a fix (a dismissal the
|
|
197
|
+
CI adjudicator rejected, a `deferred` / `misclassified` tag, or a `dismissed` finding with no
|
|
198
|
+
review thread, which no adjudicator can rule on): if the adjudicator's rejection exposed a real defect you missed, fix, commit, and `git push` (then step 0 `--wait`); if the finding is `deferred`, `misclassified`, or still contrived/absurd ("Stopping diminishing returns" above), **do not edit code to appease it** — exit the loop and tell the maintainer the PR is ready for `/crysk override` and merge (a `deferred` or `misclassified` finding names a real defect, so accepting it unfixed is the maintainer's call);
|
|
199
|
+
- the red gate names no live blocking finding on this head (the `reason` quotes the gate
|
|
200
|
+
description): read that description and act on what it says; when it names nothing you can
|
|
201
|
+
fix, ask a maintainer.
|
|
202
|
+
- `done`: nothing is owed on this head. The gate passed (or an override unlocked it) and every
|
|
203
|
+
finding posted on this head has a reply. A `fixes unverified` green (the `reason` says no review
|
|
204
|
+
verified it) is done too: report the PR ready to merge and say the fixes were not verified by a review. Before exiting, check whether `report.head && report.head !== head` (a green status carried over an unreviewed push under `once_per_pr`, `thresholded`, or `risk_aware`): if `git diff <report.head>..<head>` contains non-trivial logic or risky changes ("Requesting or suggesting another review" above), recommend `/crysk review` naming those changes; otherwise exit the loop and report that the PR is ready to merge.
|
|
205
|
+
|
|
206
|
+
**Bound the forced runs.** `/crysk review` and `/crysk recheck` each run a full paid review
|
|
207
|
+
that bypasses the size, budget and admission gates (`ci_max_attempts` included), and a gate
|
|
208
|
+
`error` (expired token, missing credential, crash) makes step 0 say `review` again forever.
|
|
209
|
+
Before posting either, count the ones already on this head, never from memory: the comments in
|
|
210
|
+
`gh pr view <n> --json comments` whose body is exactly `/crysk review`, `/crysk recheck`,
|
|
211
|
+
or their legacy spellings `/pr-hero review` and `/pr-hero recheck` (both still start a run), and whose `createdAt` is at or after the oldest `crysk` or `pr-hero` status on the head
|
|
212
|
+
(`gh api "repos/{owner}/{repo}/commits/<head>/statuses?per_page=100" --jq '[.[] | select(.context == "crysk" or .context == "pr-hero")] | last.created_at'`;
|
|
213
|
+
no status yet means none counted). Each reason step 0 gives gets its command once per head:
|
|
214
|
+
one `/crysk review` each for a skipped head, a partial review, a used-up budget, a gate
|
|
215
|
+
`error`, and an `upheld` dismissal; one `/crysk recheck` per pending dismissal, plus one retry
|
|
216
|
+
when that run leaves no ruling or an `inconclusive` one. When the same reason comes back after
|
|
217
|
+
its command already ran (a second `error` with the same description, a second partial, a second
|
|
218
|
+
recheck with no ruling or `inconclusive` again), stop and hand it to a human. The hard ceiling
|
|
219
|
+
is six per head; reaching it goes to a human too.
|
|
220
|
+
|
|
221
|
+
`findings[]` lists each posted finding with its `id`, `path`, `line`, `head`, `live_on_head`, and
|
|
222
|
+
its newest `triage` (`null` when none), and `ci_verdict`. `comment_id` can be null: a live row of
|
|
223
|
+
the summary's state block that no comment carries (summary-only, or never posted inline). Its
|
|
224
|
+
`head` is null too, and it has no thread to reply in: the CI adjudicator's ruling on that newest
|
|
225
|
+
reply on this head (`upheld`, `rejected`, `inconclusive`, or `null`). `triage` is only the newest reply, so a finding can be
|
|
226
|
+
answered at its own head and then re-answered at a later head. The thread (step 2 below) settles
|
|
227
|
+
the per-head question, and the escalation count still reads the thread's prior markers.
|
|
228
|
+
|
|
229
|
+
For EVERY `<!-- crysk-finding ` comment on this PR that has not already been triaged for the
|
|
230
|
+
current head:
|
|
231
|
+
|
|
232
|
+
1. **Read the finding.** Fetch the comment body (the marker plus Crysk's claim/severity/tier
|
|
233
|
+
text) and its GitHub comment id. New posts put that marker on an **inline review
|
|
234
|
+
comment**. A leftover top-level issue comment with the same marker may still exist on
|
|
235
|
+
an old PR (pre-W2); the driver still binds those by marker. A finding that appears
|
|
236
|
+
only under `Comments Outside Diff` in the summary is not in this list — skip it.
|
|
237
|
+
2. **Read the marker's `head=`.** This IS the budget unit — see "One adjudication per finding per
|
|
238
|
+
HEAD" below. If a triage reply already exists in this thread carrying the SAME head, skip it:
|
|
239
|
+
it is already answered for this code.
|
|
240
|
+
3. **Judge the finding against the repository, then pick exactly one tag**: `applied`,
|
|
241
|
+
`dismissed`, `deferred`, or `misclassified` (table below). The comment is a claim, not a
|
|
242
|
+
task. You may reject it. Before touching code, replying, or applying fixes, evaluate whether the cluster of findings indicates a flawed integration or broken design (### C) rather than isolated defects — if so, halt the loop and report the diagnosis without posting replies or patching. When you confirm the defect is real, isolated, and in scope (`applied`), make the fix in the working tree now, sweep its class across the PR ("Fix the class, not the site" under `applied`), and run the relevant tests, before posting the `applied` reply; **do not `git push` until you have replied to every finding on this head** (step 6).
|
|
243
|
+
4. **For `dismissed`, `deferred`, and `misclassified`**: spawn the isolated adjudicator (see
|
|
244
|
+
"The adjudicator spawn" below) and include its verdict in your reply. `applied` never spawns
|
|
245
|
+
one.
|
|
246
|
+
5. **Reply through the driver**, not with `gh`. Write reasoning prose to a
|
|
247
|
+
file and run:
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
npx -y crysk triage reply --pr <n> --from <run-dir> --finding F00N \
|
|
251
|
+
--tag <tag> --body-file <reasoning.md> [--verdict <v>] [--issue <n>]
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
The driver resolves the parent from the posted `<!-- crysk-finding`
|
|
255
|
+
marker (never a comment id, never the nearest line), prepends the triage
|
|
256
|
+
marker and the visible badge, posts the reply, records the triage event
|
|
257
|
+
transactionally in the canonical product store (`finding_triage` table in
|
|
258
|
+
`~/.crysk/prhero.db`), and — when the parent is an inline review
|
|
259
|
+
comment — resolves that review thread. If the driver says no posted marker
|
|
260
|
+
matches this `F00N`, the finding lives in the summary bucket (or was
|
|
261
|
+
never posted): stop. Do not fall back to `gh`. `applied` takes no
|
|
262
|
+
`--verdict`. `dismissed` / `deferred` / `misclassified` require
|
|
263
|
+
`--verdict` from the adjudicator. `--issue` is optional and only valid
|
|
264
|
+
with `--tag deferred`.
|
|
265
|
+
6. **Advance the loop in one batch once all findings on this head are answered:**
|
|
266
|
+
- **If you made clean code fixes (`applied` or unthreaded blocking fixes):** if you decided this push needs no further review ("Stopping diminishing returns", rule 4), post `/crysk stop` before pushing, and after the push do **not** wait for a re-review: none will run. Report that the fixes are pushed and the PR is ready to merge: the gate carries the last verdict, and every blocking finding you answered before the push turns a carried red green, marked `fixes unverified`. Only a finding left `deferred` or `misclassified` still needs a maintainer's `/crysk override`. Otherwise, commit and `git push` all fixes in a single push, then immediately run `npx -y crysk status --pr <n> --wait --json` to subscribe to the re-review on the new head. Do **not** run `/crysk recheck` before pushing: a new push invalidates prior-head recheck rulings and wastes a CI run.
|
|
267
|
+
- **If no code changes were needed:** run `npx -y crysk status --pr <n> --wait --json` and execute its `next_action` (`recheck` when blocking findings were `dismissed`, or `done` when the gate is already green).
|
|
268
|
+
|
|
269
|
+
*(Note: The MCP server is strictly read-only for querying runs, findings, and
|
|
270
|
+
past triage records via `crysk_get_triage` and `crysk_get_findings`. All
|
|
271
|
+
mutations — posting comments, resolving threads, and updating the database —
|
|
272
|
+
must be performed via `npx -y crysk triage reply`.)*
|
|
273
|
+
|
|
274
|
+
**Greptile re-review:** Greptile updates its existing PR comment in place —
|
|
275
|
+
it does not post a second one. Do not wait for a new Greptile comment to
|
|
276
|
+
appear; poll for a body change on the existing one.
|
|
277
|
+
|
|
278
|
+
## Closing a dismissal: `/crysk recheck`
|
|
279
|
+
|
|
280
|
+
Your local adjudicator (step 4) is a check on yourself before you post: its verdict goes in your
|
|
281
|
+
reply's marker, and the gate ignores it, because you ran it. The gate trusts only the CI
|
|
282
|
+
adjudicator. When step 0 says `recheck`:
|
|
283
|
+
|
|
284
|
+
1. Comment `gh pr comment <n> --body "/crysk recheck"`. It runs a review of the head and, for each
|
|
285
|
+
blocking finding whose newest reply is `dismissed` (at most 5 per run), an adjudicator in CI that
|
|
286
|
+
reads your argument and the repository at that head. You may comment it yourself: you only supply
|
|
287
|
+
the argument, the CI adjudicator rules. (`/crysk override` is the opposite: never yours to post.)
|
|
288
|
+
2. Wait with `npx -y crysk status --pr <n> --wait --json` until the run settles. Each ruling is a reply on the finding's thread,
|
|
289
|
+
from `github-actions[bot]`, whose first line is
|
|
290
|
+
`<!-- crysk-adjudication verdict=<v> reply=<your reply's id> head=<sha> -->`. Step 0's
|
|
291
|
+
`ci_verdict` reads it for you.
|
|
292
|
+
3. Act on the verdict:
|
|
293
|
+
- `upheld`: the dismissal stands. The recheck run itself does not change its own count; step 0
|
|
294
|
+
now says `review`. Comment `/crysk review`, then run `npx -y crysk status --pr <n> --wait --json`, and that review no longer counts the finding.
|
|
295
|
+
- `rejected`: the finding stands. Re-read the adjudicator's evidence. Fix it, or, if you still hold
|
|
296
|
+
it is wrong, ask a human (they may override). Do not re-post the same argument.
|
|
297
|
+
- `inconclusive`: the repository did not settle it either way. On the same head you cannot post
|
|
298
|
+
a stronger argument: the driver skips any second triage reply at a head that already has one
|
|
299
|
+
(`skip post: … already triaged at this head`), and the next recheck re-adjudicates your
|
|
300
|
+
original reply. Recheck once more; a second `inconclusive` on this head goes to a human. A
|
|
301
|
+
stronger argument needs a new head: after a push, reply `dismissed` again with the new
|
|
302
|
+
evidence, then recheck.
|
|
303
|
+
- No ruling at all after the run: the adjudicator step failed. Nothing was posted and the
|
|
304
|
+
dismissal is still pending; recheck once more. A second recheck with no ruling goes to a
|
|
305
|
+
human (see "Bound the forced runs" in step 0).
|
|
306
|
+
4. A ruling counts only on the head it was given. After any push, step 0 asks for a recheck again.
|
|
307
|
+
|
|
308
|
+
Only an inline finding can be rechecked: the CI adjudicator answers on the finding's own review
|
|
309
|
+
thread. A legacy top-level finding (no review thread) cannot be cleared by a dismissal; step 0 says
|
|
310
|
+
`override-or-fix` for it.
|
|
311
|
+
|
|
312
|
+
## The four tags
|
|
313
|
+
|
|
314
|
+
| tag | what it claims | what it must supply |
|
|
315
|
+
|---|---|---|
|
|
316
|
+
| `applied` | Fixed in this PR, with every instance of its class this PR introduced. | The class and the sites you swept. No adjudicator: the re-review verifies the fix. |
|
|
317
|
+
| `dismissed` | The finding is wrong. | POSITIVE DISPROOF WITH CITED CODE. "I did it on purpose" is not evidence; "this line already covers it, here" is. |
|
|
318
|
+
| `deferred` | The finding is right, but fixing it is out of this PR's scope. | Reasoning that says why, and what you are doing instead. A GitHub issue number is optional (`--issue`) — do not invent a tracking issue just to satisfy the tag. |
|
|
319
|
+
| `misclassified` | The finding is real, but Crysk typed it wrong (severity, tier, or `causal_disposition`). | Name which field is wrong and why. This is the highest-value signal the loop produces — it points at a hunter/refuter defect, not a repository one. |
|
|
320
|
+
|
|
321
|
+
Pick exactly one. There is no preferred tag. If you are tempted to pick two, the finding is
|
|
322
|
+
`misclassified` (the label is wrong) rather than `dismissed` (the claim is wrong) — do not
|
|
323
|
+
split the difference.
|
|
324
|
+
|
|
325
|
+
### `applied`
|
|
326
|
+
|
|
327
|
+
Only after you independently confirmed the defect in the repository, fixed it in this PR, and
|
|
328
|
+
swept its class (below). Then reply. Do not restate the diff: a one-line pointer (commit sha or
|
|
329
|
+
file) plus the class and the sites you swept is enough. No adjudicator. If you have not confirmed
|
|
330
|
+
it, this is the wrong tag.
|
|
331
|
+
|
|
332
|
+
#### Fix the class, not the site
|
|
333
|
+
|
|
334
|
+
Most findings after the first review are bugs written by the previous round's fix, and more than
|
|
335
|
+
half repeat the defect class of a finding already fixed, at another site. Each one costs another
|
|
336
|
+
review round, or ships unverified once the review budget is used up. So before you reply `applied`:
|
|
337
|
+
|
|
338
|
+
1. **Name the class in one sentence.** Name the rule the finding showed broken, not the line:
|
|
339
|
+
"a caller reads the cache before the refresh settles", not "line 42 lacks a guard".
|
|
340
|
+
2. **Sweep the PR for it.** Check every hunk in `gh pr diff <n>` (GitHub's own diff of the PR, so
|
|
341
|
+
no local base ref can be stale or missing) plus everything you changed since the reviewed head:
|
|
342
|
+
`git diff <head>`, with `head` from `crysk status`, covers unpushed commits and the working tree.
|
|
343
|
+
If you cannot get the PR diff, say so in the reply and do not claim a sweep.
|
|
344
|
+
Search by shape (the same call, field, guard, state change or fallback), not only by the
|
|
345
|
+
identifier the finding named. Fix every instance this PR introduced in the same push, each with
|
|
346
|
+
a test that fails without its fix.
|
|
347
|
+
3. **Re-read your own fix as the next reviewer will.** The next round hunts the code you just wrote:
|
|
348
|
+
new branches, early returns, fallbacks, and every caller that now sees a different value. Check
|
|
349
|
+
each against the same class before you push.
|
|
350
|
+
4. **Leave instances the PR did not introduce alone.** Instances outside the diff are pre-existing:
|
|
351
|
+
fixing them here grows the delta the next round reviews. Name them in the reply instead.
|
|
352
|
+
5. **Say what you swept.** End the reply with one line: the class, then how many sites you checked
|
|
353
|
+
and how many you fixed.
|
|
354
|
+
|
|
355
|
+
Several findings on one head that share a class are one sweep, not several.
|
|
356
|
+
|
|
357
|
+
### `dismissed`
|
|
358
|
+
|
|
359
|
+
You are claiming Crysk is wrong. Cite the exact line(s) that already handle the case, or the
|
|
360
|
+
exact reason the claimed defect cannot occur. Then spawn the adjudicator — its burden of proof
|
|
361
|
+
rule is the same one you must meet, and it is the disinterested check on your own claim.
|
|
362
|
+
|
|
363
|
+
### `deferred`
|
|
364
|
+
|
|
365
|
+
Reply with why this is out of scope and what you are doing instead. If you
|
|
366
|
+
already have a tracking issue, pass `--issue <n>`; if you do not, omit it.
|
|
367
|
+
Do not create a GitHub issue just to fill the marker — some agents run on
|
|
368
|
+
providers that are not GitHub, and the coding agent decides whether an issue
|
|
369
|
+
belongs anywhere.
|
|
370
|
+
|
|
371
|
+
### `misclassified`
|
|
372
|
+
|
|
373
|
+
Name the exact field (`severity`, `tier`, or `causal_disposition`) and what it should be instead,
|
|
374
|
+
with the evidence. The finding itself is not wrong — only its classification is.
|
|
375
|
+
|
|
376
|
+
## The adjudicator spawn — isolation is load-bearing
|
|
377
|
+
|
|
378
|
+
For `dismissed`, `deferred`, and `misclassified`, spawn a FRESH, ISOLATED sub-agent using the
|
|
379
|
+
system prompt in `adjudicator.md` (same directory as this file).
|
|
380
|
+
|
|
381
|
+
**The isolation requirement, stated plainly: the adjudicator receives ONLY**
|
|
382
|
+
|
|
383
|
+
- the finding (claim, path, line, severity/tier as Crysk posted it),
|
|
384
|
+
- your argument (the case you are about to reply with), and
|
|
385
|
+
- read-only access to the repository at this PR's head.
|
|
386
|
+
|
|
387
|
+
**It must NEVER receive your own reasoning context** — not your conversation history, not your
|
|
388
|
+
scratch notes, not "why I believe this". Its entire value is having nothing to defend. An
|
|
389
|
+
adjudicator that inherited your context would simply agree with itself.
|
|
390
|
+
|
|
391
|
+
The adjudicator returns exactly one of `upheld`, `rejected`, or `inconclusive` — see
|
|
392
|
+
`adjudicator.md` for what each means and the burden-of-proof rule behind them. Pass that
|
|
393
|
+
exact word as `--verdict` on `npx -y crysk triage reply` (and mention it in the reasoning
|
|
394
|
+
prose). The driver writes it on the marker; the escalation rule reads it back from there.
|
|
395
|
+
|
|
396
|
+
## One adjudication per finding per HEAD
|
|
397
|
+
|
|
398
|
+
This needs no new state. The finding's own marker already carries `head=<sha>`, so the bound is
|
|
399
|
+
read directly off the posted comments — do not invent a separate tracking file or counter.
|
|
400
|
+
|
|
401
|
+
- Same head, already triaged → skip. Nothing changed, nothing to re-judge.
|
|
402
|
+
- Head changed AND the new commits touched this finding's lines → re-triage is legitimate; this is
|
|
403
|
+
the one case that pays for another adjudicator run.
|
|
404
|
+
- Head changed but did NOT touch those lines → the prior verdict stands; do not re-triage.
|
|
405
|
+
|
|
406
|
+
## The escalation stops
|
|
407
|
+
|
|
408
|
+
Escalate to a human and stop the loop only when one of these hard triggers fires:
|
|
409
|
+
- **Flawed integration or design (### C):** Whack-a-mole findings on the same seam across review rounds, or broken foundational assumptions. Stop patching, do not push tactical band-aids, and report the architectural diagnosis and refactor plan to the human. If a `/crysk stop` was posted to pause reviews during refactoring, comment `/crysk review` once the clean redesign lands to lift the stop; otherwise let CI review the pushed redesign normally.
|
|
410
|
+
- **Inconclusive adjudication after 2 consecutive heads:** After **2 consecutive heads** land at `inconclusive` for the same finding, STOP triaging it and
|
|
411
|
+
say so in the reply: it escalates to a human. Do not spawn a third adjudicator round hoping for a
|
|
412
|
+
different answer — if two different heads with real code changes between them did not settle it,
|
|
413
|
+
a third will not, and by then the thread carries enough material for a person to rule in a minute.
|
|
414
|
+
|
|
415
|
+
**The count is read off the finding's PRIOR triage markers, not remembered or estimated.** Fetch
|
|
416
|
+
this finding's own reply thread, parse every `<!-- crysk-triage ` marker already posted in it in
|
|
417
|
+
order, and read their `verdict=` fields — the same field this round's reply will also carry. If
|
|
418
|
+
the most recent one is `verdict=inconclusive` AND the one before it is also `verdict=inconclusive`
|
|
419
|
+
(two markers, both `inconclusive`, both belonging to a head change that legitimately re-triaged —
|
|
420
|
+
see "One adjudication per finding per HEAD" above), this round is the escalation, not a third
|
|
421
|
+
adjudicator spawn. This is what makes the rule checkable: the markers ARE the state, there is
|
|
422
|
+
nothing else to consult.
|
|
423
|
+
|
|
424
|
+
## What you write vs what the driver posts
|
|
425
|
+
|
|
426
|
+
`--body-file` is **reasoning prose only**. Do not put a `<!-- crysk-triage` marker or a
|
|
427
|
+
badge line in that file — the driver prepends both, picks the parent comment from the posted
|
|
428
|
+
`<!-- crysk-finding` marker, records the decision to the canonical store (`finding_triage`
|
|
429
|
+
table), and resolves the inline review thread when there is one.
|
|
430
|
+
Passing a GitHub comment id, or posting with `gh api … in_reply_to`, is how replies landed
|
|
431
|
+
under Greptile on Musive #1724. Do not do that. Do not reply on
|
|
432
|
+
`<!-- crysk-report -->` either: that is the summary, including Outside Diff.
|
|
433
|
+
|
|
434
|
+
`--from` is the Crysk run directory that produced these findings (`findings.json`). `--finding`
|
|
435
|
+
is the finding id (`F001`, …) from that file — never a comment id.
|
|
436
|
+
|
|
437
|
+
**When the review ran in CI, that directory is not on your machine.** A GitHub Actions review
|
|
438
|
+
writes it to `~/.crysk/repos/<host>/<owner>/<repo>/runs/pr-<n>-<sha>-1` on an ephemeral runner
|
|
439
|
+
that is destroyed when the job ends. The workflow uploads it as an artifact; download it before
|
|
440
|
+
you triage:
|
|
441
|
+
|
|
442
|
+
```bash
|
|
443
|
+
# The artifact is crysk-run-<pr>-<head-sha>; a run of an action release from before the rename
|
|
444
|
+
# uploaded pr-hero-run-<pr>-<head-sha>. Try the new name first, then the old one.
|
|
445
|
+
# Each line printed is "<run-id> <artifact-name>": download with the name on the same line.
|
|
446
|
+
for NAME in crysk-run-<pr>-<head-sha> pr-hero-run-<pr>-<head-sha>; do
|
|
447
|
+
gh api "repos/{owner}/{repo}/actions/artifacts?name=$NAME" \
|
|
448
|
+
--jq '[.artifacts[] | select(.expired | not)] | sort_by(.created_at) | reverse | .[] | "\(.workflow_run.id) \(.name)"'
|
|
449
|
+
done
|
|
450
|
+
gh run download <run-id> -n <artifact-name> -D "crysk-run-<run-id>"
|
|
451
|
+
```
|
|
452
|
+
|
|
453
|
+
Look the run up by artifact name, not with `gh run list --branch`: a `/crysk review` or
|
|
454
|
+
`/crysk recheck` run is an `issue_comment` event, which GitHub files under the default branch, so
|
|
455
|
+
a branch listing never shows it, and that run usually holds the findings. Several runs can upload
|
|
456
|
+
the same name for one head (the automatic review, then a forced review or recheck; `overwrite: true`
|
|
457
|
+
in `action.yml` only dedupes within one run). Try the candidates newest first and keep the first one
|
|
458
|
+
`npx -y crysk triage reply ... --dry-run` binds (its success line starts with `plan: reply to`; do not match on "marker match", which the "no posted … marker matches" error also contains). Download each candidate
|
|
459
|
+
into its own fresh directory, as above: reusing one directory mixes `findings.json` from one run
|
|
460
|
+
with the patches of another, and the bind then judges files no single run wrote.
|
|
461
|
+
|
|
462
|
+
Then pass `--from crysk-run-<run-id>` for the candidate that bound. `gh run download` unpacks the run directory's *contents*, so the
|
|
463
|
+
`--from` target is the directory you downloaded into — not a `pr-<n>-<sha>-1` path inside it. If
|
|
464
|
+
the artifact is missing (a size- or budget-gated review writes no run directory, and so does a
|
|
465
|
+
run where every hunter died), you have no `--from` input: say so and stop rather than inventing
|
|
466
|
+
one. Full detail: `docs/github-actions.md` → "Triaging a CI review".
|
|
467
|
+
|
|
468
|
+
The posted body looks like this (driver-owned; shown so you know what a human will see):
|
|
469
|
+
|
|
470
|
+
### `applied`
|
|
471
|
+
|
|
472
|
+
```
|
|
473
|
+
<!-- crysk-triage tag=applied head=e3ab386a63020c6f5c21d814d176ff33849eef8d actor=agent -->
|
|
474
|
+
|
|
475
|
+
✅ **APPLIED** · agent
|
|
476
|
+
|
|
477
|
+
Fixed in this PR — see 3f9a2c1: `parseConfig` now validates `retries` before use.
|
|
478
|
+
Class: a config value used before validation. Swept 4 reads of parsed config in this PR, fixed 2 (`retries`, `timeout_ms`).
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
`--body-file` for that reply is only the last paragraph.
|
|
482
|
+
|
|
483
|
+
### `dismissed` (needs `--verdict`)
|
|
484
|
+
|
|
485
|
+
```
|
|
486
|
+
<!-- crysk-triage tag=dismissed head=e3ab386a63020c6f5c21d814d176ff33849eef8d actor=agent verdict=upheld -->
|
|
487
|
+
|
|
488
|
+
❌ **DISMISSED** · agent · adjudicator: upheld
|
|
489
|
+
|
|
490
|
+
The finding claims `parseConfig` can throw when `raw.retries` is undefined. It cannot:
|
|
491
|
+
`config.ts:42` already guards it — `const retries = raw.retries ?? 3;` — and that line predates
|
|
492
|
+
this PR. The isolated adjudicator confirmed the citation independently and returned `upheld`.
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
### `deferred` (needs `--verdict`; `--issue` optional)
|
|
496
|
+
|
|
497
|
+
```
|
|
498
|
+
<!-- crysk-triage tag=deferred head=e3ab386a63020c6f5c21d814d176ff33849eef8d actor=agent verdict=upheld -->
|
|
499
|
+
|
|
500
|
+
📋 **DEFERRED** · agent · adjudicator: upheld
|
|
501
|
+
|
|
502
|
+
The finding is correct — `retryQueue.ts` has no backoff cap — but fixing it means redesigning the
|
|
503
|
+
retry policy, which is out of scope for this PR.
|
|
504
|
+
```
|
|
505
|
+
|
|
506
|
+
### `misclassified` (needs `--verdict`)
|
|
507
|
+
|
|
508
|
+
```
|
|
509
|
+
<!-- crysk-triage tag=misclassified head=e3ab386a63020c6f5c21d814d176ff33849eef8d actor=agent verdict=upheld -->
|
|
510
|
+
|
|
511
|
+
🏷️ **MISCLASSIFIED** · agent · adjudicator: upheld
|
|
512
|
+
|
|
513
|
+
The defect is real, but `causal_disposition` is wrong: this is filed `introduced` and it is
|
|
514
|
+
pre-existing — `ghPrList` (watch.ts:243) has carried this exact unbounded `gh` hang since before
|
|
515
|
+
this PR. The engine typed it wrong, not the code.
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
## Rules
|
|
519
|
+
|
|
520
|
+
- You own the judgment. A Crysk finding is a claim to verify, never an order. `applied` is
|
|
521
|
+
not the default tag.
|
|
522
|
+
- One tag per finding, no exceptions.
|
|
523
|
+
- `dismissed`, `deferred`, `misclassified` all require a spawned, isolated adjudicator; `applied`
|
|
524
|
+
never does.
|
|
525
|
+
- The adjudicator never sees your reasoning context — only the finding, your argument, and the
|
|
526
|
+
repo.
|
|
527
|
+
- Never call `gh` to post or resolve a triage reply. Run `npx -y crysk triage reply`. (Commenting
|
|
528
|
+
`/crysk recheck` or `/crysk review` with `gh pr comment` is not a triage reply, and is how you ask for them.)
|
|
529
|
+
If that command posted the reply and then failed to resolve, re-run the
|
|
530
|
+
**same** command — same-head skip retries resolve only. Do not `gh`.
|
|
531
|
+
- Never triage a finding that only exists under `### Comments Outside Diff` in the
|
|
532
|
+
summary. It has no thread this slice (W2). If `npx -y crysk triage reply` reports no
|
|
533
|
+
matching marker, stop.
|
|
534
|
+
- `dismissed`, `deferred`, and `misclassified` without `--verdict` are malformed. `applied` WITH
|
|
535
|
+
`--verdict` is equally malformed.
|
|
536
|
+
- Never re-triage a finding whose head is unchanged since its last triage on this PR (the driver
|
|
537
|
+
skips a same-head re-post).
|
|
538
|
+
- Never post `/crysk review` or `/crysk recheck` past the bound in step 0: count the ones already
|
|
539
|
+
on the head (never from memory), six at most, and hand a repeated failure to a human sooner.
|
|
540
|
+
- After 2 consecutive `inconclusive` heads — read off the finding's own prior triage markers, not
|
|
541
|
+
memory — stop and hand the finding to a human.
|
|
542
|
+
- If whack-a-mole findings or broken foundational assumptions indicate a flawed integration or architecture (### C), stop patching and report to the user instead of stacking band-aids.
|