crysk 0.7.0 → 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 (133) hide show
  1. package/README.md +27 -23
  2. package/dist/SKILL-1q3658n0.md +74 -0
  3. package/dist/SKILL-25j4q9b8.md +143 -0
  4. package/dist/SKILL-4747bhne.md +143 -0
  5. package/dist/SKILL-4jc3sv23.md +74 -0
  6. package/dist/SKILL-c0492rch.md +540 -0
  7. package/dist/SKILL-d1nzkhhr.md +74 -0
  8. package/dist/SKILL-f8p7kvx0.md +143 -0
  9. package/dist/SKILL-gxd45g38.md +553 -0
  10. package/dist/SKILL-rec41991.md +66 -0
  11. package/dist/SKILL-zze8zj5g.md +536 -0
  12. package/dist/cli.js +24658 -24654
  13. package/dist/index.js +492 -463
  14. package/dist/opencode-ci-qrcv7a99.md +106 -0
  15. package/dist/opencode-ci-rdpcc7xc.md +106 -0
  16. package/dist/opencode-ci-yt0k74t0.md +106 -0
  17. package/dist/workflow-andv2dvm.yml +158 -0
  18. package/package.json +1 -1
  19. package/prompts/default/PROVENANCE.md +1 -0
  20. package/skills/crysk/SKILL.md +6 -6
  21. package/skills/crysk-ci-setup/SKILL.md +32 -33
  22. package/skills/crysk-ci-setup/assets/workflow.yml +5 -10
  23. package/skills/crysk-ci-setup/references/ci-admission.md +5 -5
  24. package/skills/crysk-ci-setup/references/opencode-ci.md +6 -6
  25. package/skills/crysk-loop/SKILL.md +37 -54
  26. package/skills/crysk-pr/SKILL.md +1 -1
  27. package/src/asset-manifest.ts +0 -6
  28. package/src/assets.ts +1 -4
  29. package/src/brand.ts +20 -30
  30. package/src/ci/gates.ts +155 -201
  31. package/src/ci/outcome.ts +4 -31
  32. package/src/ci/platform-limits.ts +135 -0
  33. package/src/ci/platform-report.ts +212 -126
  34. package/src/ci/platform.ts +28 -26
  35. package/src/ci/reporter.ts +25 -26
  36. package/src/ci/review-admission.ts +1 -2
  37. package/src/ci/review-levels.ts +12 -53
  38. package/src/ci/setup.ts +96 -66
  39. package/src/ci/trace-bundle.ts +11 -27
  40. package/src/ci/trace-transcripts.ts +4 -6
  41. package/src/ci/trigger.ts +3 -5
  42. package/src/cli.ts +6 -5
  43. package/src/commands/ci-setup-questions.ts +2 -55
  44. package/src/commands/ci-setup.ts +2 -26
  45. package/src/commands/triage.ts +131 -38
  46. package/src/commands/usage.ts +0 -1
  47. package/src/compare/compare.ts +3 -3
  48. package/src/compare/floor-test.ts +30 -201
  49. package/src/config/config.ts +6 -30
  50. package/src/diversity/accounting.ts +0 -26
  51. package/src/diversity/benchmark.ts +1 -17
  52. package/src/diversity/identity.ts +0 -14
  53. package/src/diversity/pipeline-integration.ts +0 -29
  54. package/src/doctor.ts +3 -6
  55. package/src/execution/claude-session-trace.ts +7 -2
  56. package/src/execution/contracts.ts +15 -9
  57. package/src/execution/harness.ts +165 -187
  58. package/src/execution/spend-limiter.ts +39 -131
  59. package/src/execution/usage-facts.ts +397 -0
  60. package/src/execution/usage-normalized.ts +33 -86
  61. package/src/harness/materiality-judge.ts +0 -5
  62. package/src/harness/pipeline-plan.ts +0 -3
  63. package/src/harness/replay-rows.ts +0 -5
  64. package/src/harness/route-runner.ts +2 -2
  65. package/src/harness/single-step.ts +3 -9
  66. package/src/index.ts +1 -1
  67. package/src/mcp/preflight.ts +2 -2
  68. package/src/model/catalog.ts +1 -3
  69. package/src/model/free-discovery.ts +11 -78
  70. package/src/model/model-name.ts +14 -4
  71. package/src/model/profiles/claude.ts +1 -2
  72. package/src/model/profiles/openai.ts +1 -2
  73. package/src/model/profiles.ts +1 -2
  74. package/src/model/provider-capabilities.ts +16 -55
  75. package/src/model/routing.ts +39 -36
  76. package/src/pr/admission.ts +6 -6
  77. package/src/pr/answered-findings.ts +8 -4
  78. package/src/pr/ci-publish.ts +0 -2
  79. package/src/pr/discovery.ts +4 -25
  80. package/src/pr/plan.ts +40 -121
  81. package/src/pr/pr-status.ts +14 -2
  82. package/src/pr/preflight.ts +15 -12
  83. package/src/pr/publish-outcome.ts +1 -19
  84. package/src/pr/review-pr.ts +10 -47
  85. package/src/pr/target.ts +76 -82
  86. package/src/production-runtime.ts +52 -114
  87. package/src/progress.ts +0 -54
  88. package/src/rereview/prepare.ts +4 -1
  89. package/src/rereview/state.ts +1 -1
  90. package/src/review/boundary.ts +4 -8
  91. package/src/review/drafts.ts +3 -3
  92. package/src/review/findings-conformance.ts +1 -1
  93. package/src/review/findings.ts +0 -4
  94. package/src/review/pipeline.ts +57 -395
  95. package/src/review/preflight.ts +162 -201
  96. package/src/review/prompt-set.ts +0 -2
  97. package/src/review/report.ts +2 -162
  98. package/src/review/review.ts +16 -65
  99. package/src/review/route-preflight.ts +3 -35
  100. package/src/review/run.ts +37 -73
  101. package/src/review/size-gate.ts +3 -3
  102. package/src/review/spec.ts +6 -11
  103. package/src/review/step-runner.ts +4 -4
  104. package/src/runner-authority.ts +10 -9
  105. package/src/security/credential-broker.ts +5 -6
  106. package/src/server/preflight.ts +0 -1
  107. package/src/server/server.ts +17 -6
  108. package/src/store/activity.ts +1 -2
  109. package/src/store/backfill-preflight.ts +0 -3
  110. package/src/store/backfill.ts +0 -1
  111. package/src/store/metrics-preflight.ts +4 -14
  112. package/src/store/metrics.ts +5 -5
  113. package/src/store/preflight.ts +0 -13
  114. package/src/store/store.ts +11 -12
  115. package/src/transport-registry.ts +6 -30
  116. package/src/transports/claude-code-cli.ts +149 -215
  117. package/src/transports/opencode-client.ts +4 -24
  118. package/src/transports/opencode-sdk.ts +17 -112
  119. package/src/triage/plain-reply.ts +37 -0
  120. package/src/ui/activity.ts +1 -6
  121. package/src/ui/config-edit.ts +14 -67
  122. package/src/ui/config.ts +3 -8
  123. package/src/ui/plan.ts +11 -198
  124. package/src/ui/progress.ts +3 -49
  125. package/src/ui/result.ts +18 -77
  126. package/src/ui/review-menu.ts +3 -12
  127. package/src/ui/select.ts +9 -79
  128. package/src/updater.ts +1 -1
  129. package/src/usage.ts +1 -7
  130. package/prompts/default/deep-review-parity.md +0 -152
  131. package/prompts/scout.md +0 -140
  132. package/src/ci/platform-estimate.ts +0 -111
  133. package/src/review/scout.ts +0 -323
@@ -8,9 +8,6 @@ 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
  };
@@ -24,7 +21,6 @@ import refuterPrompt from "../prompts/default/review-refuter.md" with {
24
21
  type: "file",
25
22
  };
26
23
  import materialityPrompt from "../prompts/materiality.md" with { type: "file" };
27
- import scoutPrompt from "../prompts/scout.md" with { type: "file" };
28
24
  import summarizerPrompt from "../prompts/summarizer.md" with { type: "file" };
29
25
  import verifierPrompt from "../prompts/verifier.md" with { type: "file" };
30
26
  import generalSkill from "../skills/crysk/SKILL.md" with { type: "file" };
@@ -51,7 +47,6 @@ import prSkill from "../skills/crysk-pr/SKILL.md" with { type: "file" };
51
47
 
52
48
  export const BUNDLED_AGENT_FILES: Record<string, string> = {
53
49
  "deep-review-logic.md": logicPrompt,
54
- "deep-review-parity.md": parityPrompt,
55
50
  "deep-review-reliability.md": reliabilityPrompt,
56
51
  "deep-review-resilience.md": resiliencePrompt,
57
52
  "deep-review-security.md": securityPrompt,
@@ -71,7 +66,6 @@ export const PROFILE_PROMPT_FILES: Readonly<
71
66
 
72
67
  export const CONSOLIDATE_PROMPT_PATH = consolidatePrompt;
73
68
  export const MATERIALITY_PROMPT_PATH = materialityPrompt;
74
- export const SCOUT_PROMPT_PATH = scoutPrompt;
75
69
  export const SUMMARIZER_PROMPT_PATH = summarizerPrompt;
76
70
  export const VERIFIER_PROMPT_PATH = verifierPrompt;
77
71
 
package/src/assets.ts CHANGED
@@ -10,7 +10,6 @@ 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,
16
15
  VERIFIER_PROMPT_PATH,
@@ -24,7 +23,6 @@ export interface EngineAssets {
24
23
  defaultAgentsDir: string; // the prompts/default dir in dev/npm, or embedded asset directory when compiled
25
24
  consolidatePromptPath: string;
26
25
  materialityPromptPath: string;
27
- scoutPromptPath: string;
28
26
  summarizerPromptPath: string;
29
27
  verifierPromptPath: string;
30
28
  triageSkillFiles: Record<string, string>; // logical filename → path, from the manifest
@@ -76,7 +74,7 @@ function resolveVersion(): string {
76
74
  // Ignore read errors
77
75
  }
78
76
 
79
- return "0.7.0";
77
+ return "0.8.0";
80
78
  }
81
79
 
82
80
  // Bun file imports can emit "./name-hash.ext" in bundled npm builds.
@@ -120,7 +118,6 @@ export function resolveEngineAssets(): EngineAssets {
120
118
  defaultAgentsDir,
121
119
  consolidatePromptPath: resolveBundledFilePath(CONSOLIDATE_PROMPT_PATH),
122
120
  materialityPromptPath: resolveBundledFilePath(MATERIALITY_PROMPT_PATH),
123
- scoutPromptPath: resolveBundledFilePath(SCOUT_PROMPT_PATH),
124
121
  summarizerPromptPath: resolveBundledFilePath(SUMMARIZER_PROMPT_PATH),
125
122
  verifierPromptPath: resolveBundledFilePath(VERIFIER_PROMPT_PATH),
126
123
  triageSkillFiles: resolveBundledFileMap(TRIAGE_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