cclaw-cli 0.51.16 → 0.51.17

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.
@@ -654,18 +654,38 @@ function validateApproachesTaxonomy(sectionBody) {
654
654
  };
655
655
  }
656
656
  function validateCalibratedSelfReview(sectionBody) {
657
- const hasStatus = /^\s*-\s*Status:\s*(?:Approved|Issues Found)\s*$/imu.test(sectionBody);
658
- const hasPatches = /^\s*-\s*Patches applied:\s*$/imu.test(sectionBody);
659
- const hasConcerns = /^\s*-\s*Remaining concerns:\s*$/imu.test(sectionBody);
660
- if (!hasStatus || !hasPatches || !hasConcerns) {
657
+ const statusLineMatch = /^\s*-\s*Status:\s*(.*)$/imu.exec(sectionBody);
658
+ const statusValue = statusLineMatch ? statusLineMatch[1].trim() : "";
659
+ const mentionsApproved = /\bApproved\b/iu.test(statusValue);
660
+ const mentionsIssuesFound = /\bIssues Found\b/iu.test(statusValue);
661
+ const statusPickedExactlyOne = statusLineMatch !== null && (mentionsApproved !== mentionsIssuesFound);
662
+ const hasPatchesHeader = /^\s*-\s*Patches applied:/imu.test(sectionBody);
663
+ const hasConcernsHeader = /^\s*-\s*Remaining concerns:/imu.test(sectionBody);
664
+ if (statusPickedExactlyOne && hasPatchesHeader && hasConcernsHeader) {
661
665
  return {
662
- ok: false,
663
- details: "Self-Review Notes must use the calibrated review prompt format: `- Status: Approved | Issues Found`, `- Patches applied:`, and `- Remaining concerns:`."
666
+ ok: true,
667
+ details: "Self-Review Notes use the calibrated review prompt format."
664
668
  };
665
669
  }
670
+ const problems = [];
671
+ if (!statusLineMatch) {
672
+ problems.push("missing `- Status:` line");
673
+ }
674
+ else if (!mentionsApproved && !mentionsIssuesFound) {
675
+ problems.push("`- Status:` must include `Approved` or `Issues Found`");
676
+ }
677
+ else if (mentionsApproved && mentionsIssuesFound) {
678
+ problems.push("`- Status:` must pick exactly one of `Approved` or `Issues Found` (the placeholder `Approved | Issues Found` is not a decision)");
679
+ }
680
+ if (!hasPatchesHeader)
681
+ problems.push("missing `- Patches applied:` line");
682
+ if (!hasConcernsHeader)
683
+ problems.push("missing `- Remaining concerns:` line");
666
684
  return {
667
- ok: true,
668
- details: "Self-Review Notes use the calibrated review prompt format."
685
+ ok: false,
686
+ details: "Self-Review Notes must use the calibrated review prompt format: `- Status: Approved` (or `Issues Found`), `- Patches applied:` (inline note or sub-bullets), and `- Remaining concerns:` (inline note or sub-bullets). Issues: " +
687
+ problems.join("; ") +
688
+ "."
669
689
  };
670
690
  }
671
691
  function validateRequirementsTaxonomy(sectionBody) {
@@ -96,7 +96,7 @@ ${SEED_SHELF_SECTION}
96
96
  - (compact ASCII/Mermaid diagram for medium+ complexity, or one-line justification for omission.)
97
97
 
98
98
  ## Self-Review Notes
99
- - Status: Approved | Issues Found
99
+ - Status: Approved
100
100
  - Patches applied:
101
101
  - None
102
102
  - Remaining concerns:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cclaw-cli",
3
- "version": "0.51.16",
3
+ "version": "0.51.17",
4
4
  "description": "Installer-first flow toolkit for coding agents",
5
5
  "type": "module",
6
6
  "bin": {