strikethroo 3.17.1 → 3.17.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.
Files changed (56) hide show
  1. package/dist-web/assets/{arc-bFI_bykL.js → arc-C3L1jkFY.js} +1 -1
  2. package/dist-web/assets/{architectureDiagram-3BPJPVTR-eduQ3NL0.js → architectureDiagram-3BPJPVTR-Dc5wdWPF.js} +1 -1
  3. package/dist-web/assets/{blockDiagram-GPEHLZMM-Cdc4VCdU.js → blockDiagram-GPEHLZMM-BCqaESV7.js} +1 -1
  4. package/dist-web/assets/{c4Diagram-AAUBKEIU-DK5FM3c1.js → c4Diagram-AAUBKEIU-DNecSAwM.js} +1 -1
  5. package/dist-web/assets/channel-DmY2Krrw.js +1 -0
  6. package/dist-web/assets/{chunk-2J33WTMH-7biHL6be.js → chunk-2J33WTMH-3QS28848.js} +1 -1
  7. package/dist-web/assets/{chunk-4BX2VUAB-9gARU0Ar.js → chunk-4BX2VUAB-B6R-x-SN.js} +1 -1
  8. package/dist-web/assets/{chunk-55IACEB6-C9jTAQT8.js → chunk-55IACEB6-BYY5vsbu.js} +1 -1
  9. package/dist-web/assets/{chunk-727SXJPM-Bqe00t7X.js → chunk-727SXJPM-BZxIJIkN.js} +1 -1
  10. package/dist-web/assets/{chunk-AQP2D5EJ-DZ3Zz5Bq.js → chunk-AQP2D5EJ-Dwpt8x10.js} +1 -1
  11. package/dist-web/assets/{chunk-FMBD7UC4-FHFhRSUs.js → chunk-FMBD7UC4-BkIlqLqc.js} +1 -1
  12. package/dist-web/assets/{chunk-ND2GUHAM-603eoTKu.js → chunk-ND2GUHAM-BZAfIvWk.js} +1 -1
  13. package/dist-web/assets/{chunk-QZHKN3VN-Cv5n9Aq_.js → chunk-QZHKN3VN-wAp9ruCQ.js} +1 -1
  14. package/dist-web/assets/classDiagram-4FO5ZUOK-C91aiCZF.js +1 -0
  15. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-C91aiCZF.js +1 -0
  16. package/dist-web/assets/{cose-bilkent-S5V4N54A-D65G_bqC.js → cose-bilkent-S5V4N54A-BWhls-Li.js} +1 -1
  17. package/dist-web/assets/{dagre-BM42HDAG-p8to9lbM.js → dagre-BM42HDAG-D_rm5H8p.js} +1 -1
  18. package/dist-web/assets/{diagram-2AECGRRQ-BX87SeKm.js → diagram-2AECGRRQ-CgrRz62Y.js} +1 -1
  19. package/dist-web/assets/{diagram-5GNKFQAL-BrOUDHCI.js → diagram-5GNKFQAL-BRdPFx5y.js} +1 -1
  20. package/dist-web/assets/{diagram-KO2AKTUF-xu_psi3A.js → diagram-KO2AKTUF-CRkShN2W.js} +1 -1
  21. package/dist-web/assets/{diagram-LMA3HP47-DaZ4RA3L.js → diagram-LMA3HP47-Bxah1b5X.js} +1 -1
  22. package/dist-web/assets/{diagram-OG6HWLK6-Cau5YU2v.js → diagram-OG6HWLK6-D9gsqeVI.js} +1 -1
  23. package/dist-web/assets/{erDiagram-TEJ5UH35-DzipiTQg.js → erDiagram-TEJ5UH35-BxuqpCGH.js} +1 -1
  24. package/dist-web/assets/{flowDiagram-I6XJVG4X-Dtv_2Tvk.js → flowDiagram-I6XJVG4X-CVc346ab.js} +1 -1
  25. package/dist-web/assets/{ganttDiagram-6RSMTGT7-EEtWY2A7.js → ganttDiagram-6RSMTGT7-CoV2q8mu.js} +1 -1
  26. package/dist-web/assets/{gitGraphDiagram-PVQCEYII-DaHmpGdB.js → gitGraphDiagram-PVQCEYII-DpBtbvUQ.js} +1 -1
  27. package/dist-web/assets/{index-QGKq5NNb.js → index-B5AkN942.js} +4 -4
  28. package/dist-web/assets/{index-DToSQu_H.js → index-DXAUzXLU.js} +1 -1
  29. package/dist-web/assets/{index-MkSYPUmR.js → index-qiGGVGhU.js} +1 -1
  30. package/dist-web/assets/{infoDiagram-5YYISTIA-Du5rxJD7.js → infoDiagram-5YYISTIA-Cs1LaltR.js} +1 -1
  31. package/dist-web/assets/{ishikawaDiagram-YF4QCWOH-I_k-NwEa.js → ishikawaDiagram-YF4QCWOH-2dwQITAJ.js} +1 -1
  32. package/dist-web/assets/{journeyDiagram-JHISSGLW-JvRwnn5D.js → journeyDiagram-JHISSGLW-C5NXwRcO.js} +1 -1
  33. package/dist-web/assets/{kanban-definition-UN3LZRKU-B5E49Jo8.js → kanban-definition-UN3LZRKU-D8L4UiFp.js} +1 -1
  34. package/dist-web/assets/{linear-DzGLUPw9.js → linear-BmwJXk2t.js} +1 -1
  35. package/dist-web/assets/{mermaid.core-CYkrjFmg.js → mermaid.core-CxfmFJso.js} +4 -4
  36. package/dist-web/assets/{mindmap-definition-RKZ34NQL-CDKHMTiZ.js → mindmap-definition-RKZ34NQL-CCk10yMr.js} +1 -1
  37. package/dist-web/assets/{pieDiagram-4H26LBE5-jYQa4N-h.js → pieDiagram-4H26LBE5-CNaROrHh.js} +1 -1
  38. package/dist-web/assets/{quadrantDiagram-W4KKPZXB-h3o6CS5Z.js → quadrantDiagram-W4KKPZXB-C9eBwT_4.js} +1 -1
  39. package/dist-web/assets/{requirementDiagram-4Y6WPE33-DuQXVvtG.js → requirementDiagram-4Y6WPE33-CuWFUe-Z.js} +1 -1
  40. package/dist-web/assets/{sankeyDiagram-5OEKKPKP-DdllUSJD.js → sankeyDiagram-5OEKKPKP-xGYYGBDj.js} +1 -1
  41. package/dist-web/assets/{sequenceDiagram-3UESZ5HK-B4S3zZhB.js → sequenceDiagram-3UESZ5HK-Corn4mP3.js} +1 -1
  42. package/dist-web/assets/{stateDiagram-AJRCARHV-ChScLWsf.js → stateDiagram-AJRCARHV-DP1EwgDv.js} +1 -1
  43. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-DQIao4rH.js +1 -0
  44. package/dist-web/assets/{timeline-definition-PNZ67QCA-CFlA4lVE.js → timeline-definition-PNZ67QCA-DgVY9v5q.js} +1 -1
  45. package/dist-web/assets/{vennDiagram-CIIHVFJN-DnolTal7.js → vennDiagram-CIIHVFJN-B47n0Ab2.js} +1 -1
  46. package/dist-web/assets/{wardley-L42UT6IY-DqKa7n4S.js → wardley-L42UT6IY-ubK4o7Fl.js} +1 -1
  47. package/dist-web/assets/{wardleyDiagram-YWT4CUSO-DsvDFtn8.js → wardleyDiagram-YWT4CUSO-ChirN_61.js} +1 -1
  48. package/dist-web/assets/{xychartDiagram-2RQKCTM6-CEJa0Ikx.js → xychartDiagram-2RQKCTM6-Cf8q2_P7.js} +1 -1
  49. package/dist-web/index.html +1 -1
  50. package/package.json +1 -1
  51. package/templates/harness/skills/st-code-review/SKILL.md +16 -17
  52. package/templates/harness/skills/st-code-review/scripts/code-review.cjs +69 -56
  53. package/dist-web/assets/channel-DMrO6cG1.js +0 -1
  54. package/dist-web/assets/classDiagram-4FO5ZUOK-BU-3r6Z2.js +0 -1
  55. package/dist-web/assets/classDiagram-v2-Q7XG4LA2-BU-3r6Z2.js +0 -1
  56. package/dist-web/assets/stateDiagram-v2-BHNVJYJU-YsYUZlN9.js +0 -1
@@ -37,8 +37,8 @@ __export(code_review_exports, {
37
37
  MAX_REVIEW_ROUNDS: () => MAX_REVIEW_ROUNDS,
38
38
  _decideRound: () => _decideRound,
39
39
  _exitCodeFor: () => _exitCodeFor,
40
- _extractFallbackXml: () => _extractFallbackXml,
41
- _makeFallbackToken: () => _makeFallbackToken,
40
+ _extractReviewDocument: () => _extractReviewDocument,
41
+ _makeDeliveryToken: () => _makeDeliveryToken,
42
42
  _readBaseCommit: () => _readBaseCommit,
43
43
  _readCumulativeDiff: () => _readCumulativeDiff,
44
44
  _readPriorAdjudicated: () => _readPriorAdjudicated,
@@ -1023,6 +1023,7 @@ var REVIEW_DIR_NAME = "review";
1023
1023
  var BASE_COMMIT_FILE_NAME = "base-commit.json";
1024
1024
  var REVIEW_FILE_NAME = "review.xml";
1025
1025
  var FINDINGS_FILE_NAME = "findings.json";
1026
+ var TRANSCRIPT_FILE_NAME = "reviewer-output.txt";
1026
1027
  var SHA_RE = /^[0-9a-f]{40}$/i;
1027
1028
  var errorMessage2 = (error) => error instanceof Error ? error.message : String(error);
1028
1029
  var readFileOrNull = (filePath) => {
@@ -1032,6 +1033,14 @@ var readFileOrNull = (filePath) => {
1032
1033
  return null;
1033
1034
  }
1034
1035
  };
1036
+ var writeTranscript = (roundDir, transcript) => {
1037
+ if (transcript === void 0 || transcript === "") return;
1038
+ try {
1039
+ fs6.mkdirSync(roundDir, { recursive: true });
1040
+ fs6.writeFileSync(path6.join(roundDir, TRANSCRIPT_FILE_NAME), transcript, "utf8");
1041
+ } catch {
1042
+ }
1043
+ };
1035
1044
  var createFindingsGate = (mandate) => async (context) => {
1036
1045
  const roundDir = path6.dirname(context.reviewFile);
1037
1046
  const findingsFile = path6.join(roundDir, FINDINGS_FILE_NAME);
@@ -1053,26 +1062,24 @@ var createFindingsGate = (mandate) => async (context) => {
1053
1062
  severityFloor: mandate.severityFloor,
1054
1063
  confidenceFloor: mandate.confidenceFloor
1055
1064
  };
1056
- if (!fs6.existsSync(context.reviewFile)) {
1057
- const recovered = context.reviewerStdout === void 0 || context.fallbackToken === void 0 ? null : _extractFallbackXml(context.reviewerStdout, context.fallbackToken);
1058
- if (recovered === null) {
1059
- const detail = `The reviewer did not write ${context.reviewFile}, and its output carried no complete findings document between this dispatch's fallback delimiters. A round with no findings document cannot be read as a round with no findings.`;
1060
- record({ ...base, status: "findings-absent", detail, actionable: [], recorded: [] });
1061
- return { kind: "findings-absent", detail };
1062
- }
1063
- try {
1064
- fs6.mkdirSync(roundDir, { recursive: true });
1065
- fs6.writeFileSync(
1066
- context.reviewFile,
1067
- recovered.endsWith("\n") ? recovered : `${recovered}
1065
+ const delivered = _extractReviewDocument(context.reviewerStdout, context.deliveryToken);
1066
+ if (delivered === null) {
1067
+ const detail = "The reviewer printed no complete findings document between this dispatch's delimiters. A round with no findings document cannot be read as a round with no findings.";
1068
+ record({ ...base, status: "findings-absent", detail, actionable: [], recorded: [] });
1069
+ return { kind: "findings-absent", detail };
1070
+ }
1071
+ try {
1072
+ fs6.mkdirSync(roundDir, { recursive: true });
1073
+ fs6.writeFileSync(
1074
+ context.reviewFile,
1075
+ delivered.endsWith("\n") ? delivered : `${delivered}
1068
1076
  `,
1069
- "utf8"
1070
- );
1071
- } catch (error) {
1072
- throw new Error(
1073
- `A findings document recovered from reviewer output could not be written to ${context.reviewFile}: ${errorMessage2(error)}`
1074
- );
1075
- }
1077
+ "utf8"
1078
+ );
1079
+ } catch (error) {
1080
+ throw new Error(
1081
+ `The delivered findings document could not be written to ${context.reviewFile}: ` + errorMessage2(error)
1082
+ );
1076
1083
  }
1077
1084
  const validation = await validateAgainstSchema(context.xsdFile, context.reviewFile);
1078
1085
  if (validation.kind === "validator-unavailable") {
@@ -1204,14 +1211,14 @@ var renderAdjudicated = (findings) => {
1204
1211
  return `- [${finding.disposition}] ${where}${attributes ? ` (${attributes})` : ""} \u2014 ${finding.summary}`;
1205
1212
  }).join("\n");
1206
1213
  };
1207
- var _makeFallbackToken = () => crypto.randomBytes(6).toString("hex");
1208
- var fallbackBeginMarker = (token) => `<<<BEGIN REVIEW XML ${token}>>>`;
1209
- var fallbackEndMarker = (token) => `<<<END REVIEW XML ${token}>>>`;
1214
+ var _makeDeliveryToken = () => crypto.randomBytes(6).toString("hex");
1215
+ var beginMarker = (token) => `<<<BEGIN REVIEW XML ${token}>>>`;
1216
+ var endMarker = (token) => `<<<END REVIEW XML ${token}>>>`;
1210
1217
  var ANSI_PATTERN = /\u001b\[[0-9;?]*[ -/]*[@-~]/g;
1211
- var _extractFallbackXml = (stdout, token) => {
1218
+ var _extractReviewDocument = (stdout, token) => {
1212
1219
  const clean = stdout.replace(ANSI_PATTERN, "");
1213
- const begin = fallbackBeginMarker(token);
1214
- const end = fallbackEndMarker(token);
1220
+ const begin = beginMarker(token);
1221
+ const end = endMarker(token);
1215
1222
  let searchFrom = clean.length;
1216
1223
  while (searchFrom >= 0) {
1217
1224
  const endIndex = clean.lastIndexOf(end, searchFrom);
@@ -1230,7 +1237,7 @@ var buildReviewerPrompt = (input) => [
1230
1237
  "You are the independent reviewer, running on a different harness than the one",
1231
1238
  "that wrote this code. You detect; you never fix. Do not edit, create, or delete",
1232
1239
  "source files. Do not run formatters. Do not commit. Your entire output is one",
1233
- "review.xml at the path named below, plus a short report of the counts.",
1240
+ "findings document, printed as described below, plus a short report of the counts.",
1234
1241
  "",
1235
1242
  `Repository / workspace root: ${input.workspace}`,
1236
1243
  `Strikethroo workspace root: ${input.strikethrooRoot}`,
@@ -1239,28 +1246,28 @@ var buildReviewerPrompt = (input) => [
1239
1246
  `Findings schema to validate against: ${input.xsdFile}`,
1240
1247
  `Base commit anchoring this plan's scope: ${input.baseCommit}`,
1241
1248
  `Round: ${input.round}`,
1242
- `Write your findings to: ${input.reviewFile}`,
1243
1249
  "",
1244
- "## If the file write fails",
1250
+ "## How to deliver your findings",
1245
1251
  "",
1246
- "Writing that file is the primary channel. If \u2014 and only if \u2014 you completed every",
1247
- "step of the review mandate below and the file write itself failed, emit the complete",
1248
- "findings document as the final thing you print, between these exact lines:",
1252
+ "Print the complete findings document as the final thing you print, between these",
1253
+ "exact lines:",
1249
1254
  "",
1250
- fallbackBeginMarker(input.fallbackToken),
1255
+ beginMarker(input.deliveryToken),
1251
1256
  // The placeholder deliberately does not begin with `<?xml` or `<review`.
1252
- // `_extractFallbackXml` rejects a region on exactly that test, which is what
1257
+ // `_extractReviewDocument` rejects a region on exactly that test, which is what
1253
1258
  // stops a reviewer that echoes these instructions back from being read as a
1254
- // recovered document. A placeholder shaped like a real document would defeat
1259
+ // delivered document. A placeholder shaped like a real document would defeat
1255
1260
  // it — keep this line prose, here and in any mirror of it.
1256
1261
  "... the complete findings document, beginning with its XML declaration ...",
1257
- fallbackEndMarker(input.fallbackToken),
1262
+ endMarker(input.deliveryToken),
1258
1263
  "",
1259
- "Print nothing after the closing line. The document is validated against the same",
1260
- "schema either way, so an incomplete or invented document fails the round.",
1261
- "Being unable to read the repository is not a reason to emit this block: a review",
1262
- "you could not perform is a failed round, and emitting well-formed XML instead of",
1263
- "reporting that failure is a worse outcome than the failure.",
1264
+ "Copy those two lines from this dispatch; never invent a token. Print nothing after",
1265
+ "the closing line. Do not write the document to a file \u2014 this channel is the only",
1266
+ "one that is read. The document is validated against the schema named above, so an",
1267
+ "incomplete or invented document fails the round. Being unable to read the",
1268
+ "repository is not a reason to emit this block: a review you could not perform is a",
1269
+ "failed round, and emitting well-formed XML instead of reporting that failure is a",
1270
+ "worse outcome than the failure.",
1264
1271
  "",
1265
1272
  "## Review mandate (authoritative \u2014 it overrides the reviewer instructions below)",
1266
1273
  "",
@@ -1451,15 +1458,18 @@ var runReviewRound = async (request, overrides = {}) => {
1451
1458
  detail: `Could not create the review round directory ${roundDir}: ${errorMessage2(error)}`
1452
1459
  };
1453
1460
  }
1454
- try {
1455
- fs6.rmSync(reviewFile, { force: true });
1456
- } catch (error) {
1457
- return {
1458
- kind: "infrastructure-failure",
1459
- detail: `Could not remove the stale findings document ${reviewFile}: ${errorMessage2(error)}`
1460
- };
1461
+ const staleArtifacts = [reviewFile, path6.join(roundDir, TRANSCRIPT_FILE_NAME)];
1462
+ for (const stale of staleArtifacts) {
1463
+ try {
1464
+ fs6.rmSync(stale, { force: true });
1465
+ } catch (error) {
1466
+ return {
1467
+ kind: "infrastructure-failure",
1468
+ detail: `Could not remove the stale round artifact ${stale}: ${errorMessage2(error)}`
1469
+ };
1470
+ }
1461
1471
  }
1462
- const fallbackToken = _makeFallbackToken();
1472
+ const deliveryToken = _makeDeliveryToken();
1463
1473
  const prompt = buildReviewerPrompt({
1464
1474
  planId,
1465
1475
  planFile,
@@ -1470,11 +1480,10 @@ var runReviewRound = async (request, overrides = {}) => {
1470
1480
  xsdFile,
1471
1481
  baseCommit,
1472
1482
  round: request.round,
1473
- reviewFile,
1474
1483
  diff,
1475
1484
  adjudicatedFindings: request.adjudicatedFindings ?? _readPriorAdjudicated(planDir, request.round),
1476
1485
  skillInstructions: readReviewerSkill(),
1477
- fallbackToken
1486
+ deliveryToken
1478
1487
  });
1479
1488
  const dispatched = await dependencies2.dispatch({ harness, workspace, prompt });
1480
1489
  if (dispatched.kind === "infrastructure-failure") {
@@ -1490,6 +1499,7 @@ var runReviewRound = async (request, overrides = {}) => {
1490
1499
  };
1491
1500
  }
1492
1501
  if (dispatched.kind === "launched-failure") {
1502
+ writeTranscript(roundDir, dispatched.stdout);
1493
1503
  return {
1494
1504
  kind: "launched-failure",
1495
1505
  harness,
@@ -1505,9 +1515,12 @@ var runReviewRound = async (request, overrides = {}) => {
1505
1515
  xsdFile,
1506
1516
  planDir,
1507
1517
  round: request.round,
1508
- ...dispatched.stdout === void 0 ? {} : { reviewerStdout: dispatched.stdout },
1509
- fallbackToken
1518
+ reviewerStdout: dispatched.stdout ?? "",
1519
+ deliveryToken
1510
1520
  });
1521
+ if (findingsGate.kind !== "evaluated") {
1522
+ writeTranscript(roundDir, dispatched.stdout);
1523
+ }
1511
1524
  return {
1512
1525
  kind: "reviewed",
1513
1526
  harness,
@@ -1627,8 +1640,8 @@ if (require.main === module) {
1627
1640
  MAX_REVIEW_ROUNDS,
1628
1641
  _decideRound,
1629
1642
  _exitCodeFor,
1630
- _extractFallbackXml,
1631
- _makeFallbackToken,
1643
+ _extractReviewDocument,
1644
+ _makeDeliveryToken,
1632
1645
  _readBaseCommit,
1633
1646
  _readCumulativeDiff,
1634
1647
  _readPriorAdjudicated,
@@ -1 +0,0 @@
1
- import{U as a,C as n}from"./mermaid.core-CYkrjFmg.js";const t=(r,o)=>a.lang.round(n.parse(r)[o]);export{t as c};
@@ -1 +0,0 @@
1
- import{s as a,a as s,c as e,C as t}from"./chunk-727SXJPM-Bqe00t7X.js";import{b as i}from"./mermaid.core-CYkrjFmg.js";import"./chunk-FMBD7UC4-FHFhRSUs.js";import"./chunk-ND2GUHAM-603eoTKu.js";import"./chunk-55IACEB6-C9jTAQT8.js";import"./chunk-2J33WTMH-7biHL6be.js";import"./index-QGKq5NNb.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{s as a,a as s,c as e,C as t}from"./chunk-727SXJPM-Bqe00t7X.js";import{b as i}from"./mermaid.core-CYkrjFmg.js";import"./chunk-FMBD7UC4-FHFhRSUs.js";import"./chunk-ND2GUHAM-603eoTKu.js";import"./chunk-55IACEB6-C9jTAQT8.js";import"./chunk-2J33WTMH-7biHL6be.js";import"./index-QGKq5NNb.js";var n={parser:e,get db(){return new t},renderer:s,styles:a,init:i(r=>{r.class||(r.class={}),r.class.arrowMarkerAbsolute=r.arrowMarkerAbsolute},"init")};export{n as diagram};
@@ -1 +0,0 @@
1
- import{b as e,a as r,s as a,S as s}from"./chunk-AQP2D5EJ-DZ3Zz5Bq.js";import{b as i}from"./mermaid.core-CYkrjFmg.js";import"./chunk-55IACEB6-C9jTAQT8.js";import"./chunk-2J33WTMH-7biHL6be.js";import"./index-QGKq5NNb.js";var u={parser:a,get db(){return new s(2)},renderer:r,styles:e,init:i(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};export{u as diagram};