crysk 0.6.1 → 0.8.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.
Files changed (179) hide show
  1. package/README.md +28 -22
  2. package/dist/SKILL-1q3658n0.md +74 -0
  3. package/dist/SKILL-25j4q9b8.md +143 -0
  4. package/dist/SKILL-32cmme3j.md +143 -0
  5. package/dist/SKILL-4747bhne.md +143 -0
  6. package/dist/SKILL-4jc3sv23.md +74 -0
  7. package/dist/SKILL-c0492rch.md +540 -0
  8. package/dist/SKILL-d1nzkhhr.md +74 -0
  9. package/dist/SKILL-f8p7kvx0.md +143 -0
  10. package/dist/SKILL-gxd45g38.md +553 -0
  11. package/dist/SKILL-rec41991.md +66 -0
  12. package/dist/SKILL-zze8zj5g.md +536 -0
  13. package/dist/adjudicator-eckqh14e.md +78 -0
  14. package/dist/ci-admission-qn797a6c.md +128 -0
  15. package/dist/cli.js +18608 -18523
  16. package/dist/consolidate-4xw1pkg7.md +24 -0
  17. package/dist/deep-review-logic-dgr112y1.md +196 -0
  18. package/dist/deep-review-logic-fck5z4xe.md +197 -0
  19. package/dist/deep-review-logic-h1fpamfh.md +192 -0
  20. package/dist/deep-review-logic-m4vk5683.md +196 -0
  21. package/dist/deep-review-logic-z63kmgmc.md +157 -0
  22. package/dist/deep-review-parity-7x7s5d81.md +148 -0
  23. package/dist/deep-review-parity-9wxmynsc.md +115 -0
  24. package/dist/deep-review-parity-bwwe7cx6.md +152 -0
  25. package/dist/deep-review-parity-e50pw3pk.md +117 -0
  26. package/dist/deep-review-parity-ennmm9m1.md +151 -0
  27. package/{prompts/default/deep-review-parity.md → dist/deep-review-parity-h7y6y2he.md} +14 -16
  28. package/dist/deep-review-parity-xg6wy69c.md +151 -0
  29. package/dist/deep-review-reliability-6h3c4gmw.md +125 -0
  30. package/dist/deep-review-reliability-dcjab69x.md +122 -0
  31. package/dist/deep-review-reliability-ec7b5pbk.md +159 -0
  32. package/dist/deep-review-reliability-hvasvmt9.md +153 -0
  33. package/dist/deep-review-reliability-mjnayxmt.md +158 -0
  34. package/dist/deep-review-reliability-mm7fnayf.md +124 -0
  35. package/dist/deep-review-reliability-xk4xvc2w.md +158 -0
  36. package/dist/deep-review-resilience-0esd5qeh.md +148 -0
  37. package/dist/deep-review-resilience-envgcmpy.md +115 -0
  38. package/dist/deep-review-resilience-fgx8ythf.md +151 -0
  39. package/dist/deep-review-resilience-mq5qa6ad.md +152 -0
  40. package/dist/deep-review-resilience-pwh1gawp.md +151 -0
  41. package/dist/deep-review-resilience-s9n21dkx.md +117 -0
  42. package/dist/deep-review-resilience-vz4qskea.md +119 -0
  43. package/dist/deep-review-security-1vwjdc9q.md +205 -0
  44. package/dist/deep-review-security-x1cc1z00.md +205 -0
  45. package/dist/index.js +590 -485
  46. package/dist/opencode-ci-jc8mf4wn.md +106 -0
  47. package/dist/opencode-ci-qrcv7a99.md +106 -0
  48. package/dist/opencode-ci-rdpcc7xc.md +106 -0
  49. package/dist/opencode-ci-yt0k74t0.md +106 -0
  50. package/dist/review-refuter-7qffwtzz.md +77 -0
  51. package/dist/verifier-tyh8r45v.md +40 -0
  52. package/dist/verifier-xf4xj701.md +40 -0
  53. package/dist/workflow-andv2dvm.yml +158 -0
  54. package/package.json +1 -1
  55. package/prompts/consolidate.md +1 -1
  56. package/prompts/default/PROVENANCE.md +6 -0
  57. package/prompts/default/deep-review-logic.md +56 -15
  58. package/prompts/default/deep-review-reliability.md +64 -30
  59. package/prompts/default/deep-review-resilience.md +71 -37
  60. package/prompts/default/deep-review-security.md +205 -0
  61. package/prompts/default/review-refuter.md +1 -1
  62. package/prompts/verifier.md +40 -0
  63. package/skills/crysk/SKILL.md +6 -6
  64. package/skills/crysk-ci-setup/SKILL.md +32 -33
  65. package/skills/crysk-ci-setup/assets/workflow.yml +5 -10
  66. package/skills/crysk-ci-setup/references/ci-admission.md +5 -5
  67. package/skills/crysk-ci-setup/references/opencode-ci.md +6 -6
  68. package/skills/crysk-loop/SKILL.md +37 -54
  69. package/skills/crysk-loop/adjudicator.md +10 -18
  70. package/skills/crysk-pr/SKILL.md +1 -1
  71. package/src/asset-manifest.ts +6 -6
  72. package/src/assets.ts +4 -4
  73. package/src/brand.ts +20 -30
  74. package/src/ci/gates.ts +155 -192
  75. package/src/ci/outcome.ts +4 -31
  76. package/src/ci/platform-limits.ts +135 -0
  77. package/src/ci/platform-report.ts +212 -126
  78. package/src/ci/platform.ts +28 -26
  79. package/src/ci/reporter.ts +25 -26
  80. package/src/ci/review-admission.ts +1 -2
  81. package/src/ci/review-levels.ts +12 -53
  82. package/src/ci/setup.ts +96 -66
  83. package/src/ci/trace-bundle.ts +11 -27
  84. package/src/ci/trace-transcripts.ts +4 -6
  85. package/src/ci/trigger.ts +3 -5
  86. package/src/cli.ts +6 -5
  87. package/src/commands/ci-setup-questions.ts +2 -55
  88. package/src/commands/ci-setup.ts +2 -26
  89. package/src/commands/triage.ts +131 -38
  90. package/src/commands/usage.ts +0 -1
  91. package/src/compare/compare.ts +3 -3
  92. package/src/compare/floor-test.ts +30 -201
  93. package/src/compare/hunter-exam.ts +631 -0
  94. package/src/config/config.ts +6 -30
  95. package/src/diversity/accounting.ts +0 -26
  96. package/src/diversity/benchmark.ts +1 -17
  97. package/src/diversity/identity.ts +0 -14
  98. package/src/diversity/pipeline-integration.ts +0 -29
  99. package/src/doctor.ts +3 -6
  100. package/src/execution/claude-session-trace.ts +7 -2
  101. package/src/execution/contracts.ts +15 -9
  102. package/src/execution/harness.ts +165 -187
  103. package/src/execution/spend-limiter.ts +39 -131
  104. package/src/execution/usage-facts.ts +397 -0
  105. package/src/execution/usage-normalized.ts +33 -86
  106. package/src/harness/materiality-judge.ts +0 -5
  107. package/src/harness/pipeline-plan.ts +0 -3
  108. package/src/harness/replay-rows.ts +0 -5
  109. package/src/harness/route-runner.ts +2 -2
  110. package/src/harness/single-step.ts +3 -9
  111. package/src/index.ts +1 -1
  112. package/src/mcp/preflight.ts +2 -2
  113. package/src/model/catalog.ts +1 -3
  114. package/src/model/free-discovery.ts +11 -78
  115. package/src/model/model-name.ts +16 -5
  116. package/src/model/profiles/claude.ts +1 -2
  117. package/src/model/profiles/openai.ts +1 -2
  118. package/src/model/profiles.ts +2 -3
  119. package/src/model/provider-capabilities.ts +16 -55
  120. package/src/model/routing.ts +39 -36
  121. package/src/pr/admission.ts +6 -6
  122. package/src/pr/answered-findings.ts +8 -4
  123. package/src/pr/ci-publish.ts +0 -2
  124. package/src/pr/discovery.ts +4 -25
  125. package/src/pr/plan.ts +40 -121
  126. package/src/pr/pr-status.ts +14 -2
  127. package/src/pr/pr.ts +1 -1
  128. package/src/pr/preflight.ts +44 -15
  129. package/src/pr/publish-outcome.ts +1 -19
  130. package/src/pr/review-pr.ts +15 -47
  131. package/src/pr/target.ts +76 -82
  132. package/src/production-runtime.ts +52 -114
  133. package/src/progress.ts +0 -54
  134. package/src/rereview/prepare.ts +4 -1
  135. package/src/rereview/state.ts +1 -1
  136. package/src/rereview/verify.ts +15 -9
  137. package/src/review/boundary.ts +5 -8
  138. package/src/review/drafts.ts +3 -3
  139. package/src/review/findings-conformance.ts +1 -1
  140. package/src/review/findings.ts +0 -4
  141. package/src/review/pipeline.ts +194 -407
  142. package/src/review/preflight.ts +175 -201
  143. package/src/review/prompt-set.ts +1 -2
  144. package/src/review/report.ts +2 -162
  145. package/src/review/review.ts +25 -74
  146. package/src/review/route-preflight.ts +19 -35
  147. package/src/review/run.ts +37 -73
  148. package/src/review/size-gate.ts +3 -3
  149. package/src/review/spec.ts +6 -11
  150. package/src/review/step-runner.ts +4 -4
  151. package/src/runner-authority.ts +10 -9
  152. package/src/security/credential-broker.ts +5 -6
  153. package/src/server/preflight.ts +0 -1
  154. package/src/server/server.ts +17 -6
  155. package/src/store/activity.ts +1 -2
  156. package/src/store/backfill-preflight.ts +0 -3
  157. package/src/store/backfill.ts +0 -1
  158. package/src/store/metrics-preflight.ts +4 -14
  159. package/src/store/metrics.ts +5 -5
  160. package/src/store/preflight.ts +0 -13
  161. package/src/store/store.ts +11 -12
  162. package/src/transport-registry.ts +6 -30
  163. package/src/transports/claude-code-cli.ts +149 -215
  164. package/src/transports/opencode-client.ts +4 -24
  165. package/src/transports/opencode-sdk.ts +17 -112
  166. package/src/triage/plain-reply.ts +37 -0
  167. package/src/ui/activity.ts +1 -6
  168. package/src/ui/config-edit.ts +14 -67
  169. package/src/ui/config.ts +3 -8
  170. package/src/ui/plan.ts +11 -198
  171. package/src/ui/progress.ts +3 -49
  172. package/src/ui/result.ts +18 -77
  173. package/src/ui/review-menu.ts +3 -12
  174. package/src/ui/select.ts +9 -79
  175. package/src/updater.ts +1 -1
  176. package/src/usage.ts +1 -7
  177. package/prompts/scout.md +0 -140
  178. package/src/ci/platform-estimate.ts +0 -111
  179. package/src/review/scout.ts +0 -323
@@ -1,7 +1,6 @@
1
1
  # Crysk triage adjudicator — system prompt
2
2
 
3
- You are a fresh, isolated adjudicator spawned by `crysk-loop`. You are given exactly three
4
- things and nothing else:
3
+ You are a fresh, isolated adjudicator. You are given exactly three things and nothing else:
5
4
 
6
5
  1. **The finding** — Crysk's claim, its path/line, and its filed severity/tier.
7
6
  2. **The author's argument** — the case the PR's own coding agent is making to have the finding
@@ -51,13 +50,9 @@ reading the repository**, never by asserting intent.
51
50
 
52
51
  ## A persuasive argument is not evidence — say this to yourself before every verdict
53
52
 
54
- This is the single most important thing this document tells you, and it is not hypothetical: the
55
- PR1 verification of this very design found the refuter — a structurally similar isolated,
56
- adversarial judge — CORROBORATING a misclassified finding without ever questioning its class. The
57
- finding was real (`ghPrList` genuinely had no timeout), but it was filed as `introduced` when it
58
- was plainly pre-existing, and the judge built to catch exactly that kind of error let it through
59
- anyway, because the argument in front of it was well-written and confident, not because it checked
60
- the git history.
53
+ This is the single most important thing this document tells you. An isolated judge, built to catch
54
+ an error, can still let it through because the argument in front of it is well-written and
55
+ confident, without ever checking it against the repository.
61
56
 
62
57
  Do not let that happen here. A well-argued case is not a cited one. Before returning `upheld`, ask
63
58
  yourself: did I independently confirm this by reading the repository myself, at the specific
@@ -75,12 +70,9 @@ verdict is `rejected` or `inconclusive` — never `upheld` on persuasion alone.
75
70
  ## Output
76
71
 
77
72
  Return your verdict word (`upheld`, `rejected`, or `inconclusive`) and the specific evidence —
78
- path:line citations you personally checked — that led you there. If your verdict is
79
- `inconclusive`, state exactly what would have settled it and why the repository does not currently
80
- show it.
81
-
82
- The caller (the PR's coding agent, running `crysk-loop`) copies your exact verdict word
83
- verbatim into its reply's triage marker (`verdict=<your word>`, see SKILL.md "What you write vs what the driver posts")
84
- and into its reply prose — it never paraphrases or softens it. That marker is the only durable
85
- record of this ruling: it is what lets a later run tell a settled finding from an unsettled one,
86
- and what the escalation rule (2 consecutive `inconclusive` heads) counts.
73
+ path:line citations you personally checked — that led you there, in the format the request asks for.
74
+ When the request fixes no format and your verdict is `inconclusive`, state exactly what would have
75
+ settled it and why the repository does not currently show it.
76
+
77
+ Your verdict word is recorded exactly as you return it and is never paraphrased or softened. That
78
+ record is what lets a later run tell a settled finding from an unsettled one.
@@ -56,7 +56,7 @@ When `crysk` is active on the repository, **never stop right after `gh pr create
56
56
 
57
57
  1. **Subscribe to the initial review from second zero:**
58
58
  ```bash
59
- npx -y crysk status --pr <n> --wait --json
59
+ npx -y crysk@0.8.0 status --pr <n> --wait --json
60
60
  ```
61
61
  `--wait` holds automatically during the 3-minute startup grace window while `gate.state` is `"none"` (waiting for GitHub Actions to pick up the new PR), continues polling every 15s while `gate.state` is `"pending"`, and returns as soon as the review settles.
62
62
 
@@ -8,21 +8,21 @@ import consolidatePrompt from "../prompts/consolidate.md" with { type: "file" };
8
8
  import logicPrompt from "../prompts/default/deep-review-logic.md" with {
9
9
  type: "file",
10
10
  };
11
- import parityPrompt from "../prompts/default/deep-review-parity.md" with {
12
- type: "file",
13
- };
14
11
  import reliabilityPrompt from "../prompts/default/deep-review-reliability.md" with {
15
12
  type: "file",
16
13
  };
17
14
  import resiliencePrompt from "../prompts/default/deep-review-resilience.md" with {
18
15
  type: "file",
19
16
  };
17
+ import securityPrompt from "../prompts/default/deep-review-security.md" with {
18
+ type: "file",
19
+ };
20
20
  import refuterPrompt from "../prompts/default/review-refuter.md" with {
21
21
  type: "file",
22
22
  };
23
23
  import materialityPrompt from "../prompts/materiality.md" with { type: "file" };
24
- import scoutPrompt from "../prompts/scout.md" with { type: "file" };
25
24
  import summarizerPrompt from "../prompts/summarizer.md" with { type: "file" };
25
+ import verifierPrompt from "../prompts/verifier.md" with { type: "file" };
26
26
  import generalSkill from "../skills/crysk/SKILL.md" with { type: "file" };
27
27
  import ciSetupAdmissionExample from "../skills/crysk-ci-setup/assets/admission-config.example.json" with {
28
28
  type: "file",
@@ -47,9 +47,9 @@ import prSkill from "../skills/crysk-pr/SKILL.md" with { type: "file" };
47
47
 
48
48
  export const BUNDLED_AGENT_FILES: Record<string, string> = {
49
49
  "deep-review-logic.md": logicPrompt,
50
- "deep-review-parity.md": parityPrompt,
51
50
  "deep-review-reliability.md": reliabilityPrompt,
52
51
  "deep-review-resilience.md": resiliencePrompt,
52
+ "deep-review-security.md": securityPrompt,
53
53
  "review-refuter.md": refuterPrompt,
54
54
  };
55
55
 
@@ -66,8 +66,8 @@ export const PROFILE_PROMPT_FILES: Readonly<
66
66
 
67
67
  export const CONSOLIDATE_PROMPT_PATH = consolidatePrompt;
68
68
  export const MATERIALITY_PROMPT_PATH = materialityPrompt;
69
- export const SCOUT_PROMPT_PATH = scoutPrompt;
70
69
  export const SUMMARIZER_PROMPT_PATH = summarizerPrompt;
70
+ export const VERIFIER_PROMPT_PATH = verifierPrompt;
71
71
 
72
72
  export const TRIAGE_SKILL_FILES: Record<string, string> = {
73
73
  "SKILL.md": triageSkill,
package/src/assets.ts CHANGED
@@ -10,9 +10,9 @@ import {
10
10
  GENERAL_SKILL_FILES,
11
11
  MATERIALITY_PROMPT_PATH,
12
12
  PR_SKILL_FILES,
13
- SCOUT_PROMPT_PATH,
14
13
  SUMMARIZER_PROMPT_PATH,
15
14
  TRIAGE_SKILL_FILES,
15
+ VERIFIER_PROMPT_PATH,
16
16
  } from "./asset-manifest";
17
17
 
18
18
  export type AssetMode = "dev" | "npm" | "compiled";
@@ -23,8 +23,8 @@ export interface EngineAssets {
23
23
  defaultAgentsDir: string; // the prompts/default dir in dev/npm, or embedded asset directory when compiled
24
24
  consolidatePromptPath: string;
25
25
  materialityPromptPath: string;
26
- scoutPromptPath: string;
27
26
  summarizerPromptPath: string;
27
+ verifierPromptPath: string;
28
28
  triageSkillFiles: Record<string, string>; // logical filename → path, from the manifest
29
29
  ciSetupSkillFiles: Record<string, string>; // logical filename → path, from the manifest
30
30
  prSkillFiles: Record<string, string>; // logical filename → path, from the manifest
@@ -74,7 +74,7 @@ function resolveVersion(): string {
74
74
  // Ignore read errors
75
75
  }
76
76
 
77
- return "0.6.1";
77
+ return "0.8.0";
78
78
  }
79
79
 
80
80
  // Bun file imports can emit "./name-hash.ext" in bundled npm builds.
@@ -118,8 +118,8 @@ export function resolveEngineAssets(): EngineAssets {
118
118
  defaultAgentsDir,
119
119
  consolidatePromptPath: resolveBundledFilePath(CONSOLIDATE_PROMPT_PATH),
120
120
  materialityPromptPath: resolveBundledFilePath(MATERIALITY_PROMPT_PATH),
121
- scoutPromptPath: resolveBundledFilePath(SCOUT_PROMPT_PATH),
122
121
  summarizerPromptPath: resolveBundledFilePath(SUMMARIZER_PROMPT_PATH),
122
+ verifierPromptPath: resolveBundledFilePath(VERIFIER_PROMPT_PATH),
123
123
  triageSkillFiles: resolveBundledFileMap(TRIAGE_SKILL_FILES),
124
124
  ciSetupSkillFiles: resolveBundledFileMap(CI_SETUP_SKILL_FILES),
125
125
  prSkillFiles: resolveBundledFileMap(PR_SKILL_FILES),
package/src/brand.ts CHANGED
@@ -74,22 +74,18 @@ export function findMarker(
74
74
  return best;
75
75
  }
76
76
 
77
- // PR comment commands. Every command constant is written in the new form
78
- // (`/crysk review`); the legacy `/pr-hero` form is derived from it here, so
79
- // a maintainer's muscle memory and old docs keep working for one version.
77
+ // PR comment commands. Only the `/crysk` form is a command: the legacy `/pr-hero` spelling is no longer
78
+ // accepted (2026-11-17), because nobody can tell whether a workflow set up before the rename is still
79
+ // out there, and keeping both forms meant every hint and status had to name the old one.
80
80
  const COMMAND_PREFIX = "/crysk";
81
- const LEGACY_COMMAND_PREFIX = "/pr-hero";
82
81
 
83
- // Both written forms of a command, new name first. The workflow template
84
- // lists each one, because an Actions expression cannot match a pattern.
82
+ // The written forms of a command. One today; the workflow template lists each form, because an Actions
83
+ // expression cannot match a pattern.
85
84
  export function commandForms(command: string): string[] {
86
85
  if (!command.startsWith(`${COMMAND_PREFIX} `)) {
87
86
  throw new Error(`not a crysk command: ${JSON.stringify(command)}`);
88
87
  }
89
- return [
90
- command,
91
- LEGACY_COMMAND_PREFIX + command.slice(COMMAND_PREFIX.length),
92
- ];
88
+ return [command];
93
89
  }
94
90
 
95
91
  // Exact match after trimming, and nothing else: no case folding, no inner
@@ -100,28 +96,16 @@ export function isCommand(text: string, command: string): boolean {
100
96
  return commandForms(command).includes(trimmed);
101
97
  }
102
98
 
103
- // For near-miss detection: the text begins like the command, in either name.
99
+ // For near-miss detection: the text begins like the command.
104
100
  export function startsWithCommand(text: string, command: string): boolean {
105
101
  const trimmed = text.trim();
106
102
  return commandForms(command).some((form) => trimmed.startsWith(form));
107
103
  }
108
104
 
109
- // The legacy spelling of a command. Every workflow accepts it during the
110
- // rename, including one set up before it, which filters only `/pr-hero`, so it
111
- // is the one to name where there is room for a single spelling.
112
- export function legacyCommand(command: string): string {
113
- return commandForms(command)[1] as string;
114
- }
115
-
116
- // Both spellings for a hint a person or an agent will act on. A workflow set
117
- // up before the rename ignores `/crysk`, and floating action tags deliver the
118
- // new hints to it, so a hint naming only `/crysk` would send the reader to a
119
- // command that starts nothing.
105
+ // A command as a hint a person or an agent will act on.
120
106
  export function commandHint(command: string, quote = "`"): string {
121
- return (
122
- `${quote}${command}${quote} (or ${quote}${legacyCommand(command)}${quote} ` +
123
- "on a workflow set up before the rename)"
124
- );
107
+ commandForms(command);
108
+ return `${quote}${command}${quote}`;
125
109
  }
126
110
 
127
111
  // Commit status contexts. Every status is written on the crysk name only (#457
@@ -171,11 +155,17 @@ export function isLegacyStatusContext(context: string): boolean {
171
155
  // `pr-hero` instead. A reader rewrites a legacy lead into the new one and then
172
156
  // matches against the text this version writes, so one pattern serves both. Only a
173
157
  // lead followed by `:` or a space is the brand: `pr-heroic` is not.
158
+ // The command a status names is rewritten the same way: a status an earlier release wrote ends in
159
+ // `/pr-hero override` or `/pr-hero review`, and the readers that rebuild a verdict's text to
160
+ // recognise it (pr/admission.ts) must still recognise that verdict, or the carry walk passes over it.
161
+ const LEGACY_STATUS_COMMAND = /\/pr-hero (review|recheck|override|stop)\b/g;
162
+
174
163
  export function canonicalStatusText(text: string): string {
175
- if (!text.startsWith(LEGACY_STATUS_CONTEXT)) return text;
176
- const next = text.charAt(LEGACY_STATUS_CONTEXT.length);
177
- if (next !== ":" && next !== " ") return text;
178
- return STATUS_CONTEXT + text.slice(LEGACY_STATUS_CONTEXT.length);
164
+ const commands = text.replace(LEGACY_STATUS_COMMAND, "/crysk $1");
165
+ if (!commands.startsWith(LEGACY_STATUS_CONTEXT)) return commands;
166
+ const next = commands.charAt(LEGACY_STATUS_CONTEXT.length);
167
+ if (next !== ":" && next !== " ") return commands;
168
+ return STATUS_CONTEXT + commands.slice(LEGACY_STATUS_CONTEXT.length);
179
169
  }
180
170
 
181
171
  // The bundled agent skills, by role, in sync order. The role key joins a skill