@paths.design/caws-cli 3.4.0 → 3.5.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.
@@ -1 +1 @@
1
- {"version":3,"file":"git-hooks.d.ts","sourceRoot":"","sources":["../../src/scaffold/git-hooks.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH,6CAHW,MAAM;;;GAuGhB;AAgND;;;GAGG;AACH,2CAFW,MAAM,iBAkChB;AAED;;;GAGG;AACH,gDAFW,MAAM,iBAgDhB"}
1
+ {"version":3,"file":"git-hooks.d.ts","sourceRoot":"","sources":["../../src/scaffold/git-hooks.js"],"names":[],"mappings":"AASA;;;;GAIG;AACH,6CAHW,MAAM;;;GAwGhB;AAoOD;;;GAGG;AACH,2CAFW,MAAM,iBAkChB;AAED;;;GAGG;AACH,gDAFW,MAAM,iBAgDhB"}
@@ -108,7 +108,8 @@ async function scaffoldGitHooks(projectDir, options = {}) {
108
108
  if (addedCount > 0) {
109
109
  console.log(`\nšŸ”— Git hooks configured: ${addedCount} hooks active`);
110
110
  console.log('šŸ’” Hooks will run automatically on git operations');
111
- console.log('šŸ’” Use --no-verify to skip hooks: git commit --no-verify');
111
+ console.log('šŸ’” Use --no-verify to skip commit hooks: git commit --no-verify');
112
+ console.log('āš ļø Note: --no-verify is BLOCKED on git push for safety');
112
113
  }
113
114
 
114
115
  return { added: addedCount, skipped: skippedCount };
@@ -142,7 +143,7 @@ if command -v caws >/dev/null 2>&1; then
142
143
  echo "āœ… CAWS validation passed"
143
144
  else
144
145
  echo "āŒ CAWS validation failed"
145
- echo "šŸ’” Fix issues or use: git commit --no-verify"
146
+ echo "šŸ’” Fix issues or skip with: git commit --no-verify (allowed)"
146
147
  exit 1
147
148
  fi
148
149
  else
@@ -161,7 +162,8 @@ if [ -f "package.json" ]; then
161
162
  if npx eslint . --quiet; then
162
163
  echo "āœ… ESLint passed"
163
164
  else
164
- echo "āŒ ESLint failed - fix issues or use --no-verify"
165
+ echo "āŒ ESLint failed"
166
+ echo "šŸ’” Fix issues or skip with: git commit --no-verify (allowed)"
165
167
  exit 1
166
168
  fi
167
169
  fi
@@ -172,7 +174,8 @@ if [ -f "package.json" ]; then
172
174
  if npm test; then
173
175
  echo "āœ… Tests passed"
174
176
  else
175
- echo "āŒ Tests failed - fix issues or use --no-verify"
177
+ echo "āŒ Tests failed"
178
+ echo "šŸ’” Fix issues or skip with: git commit --no-verify (allowed)"
176
179
  exit 1
177
180
  fi
178
181
  fi
@@ -227,14 +230,32 @@ function generatePostCommitHook() {
227
230
 
228
231
  /**
229
232
  * Generate pre-push hook content
233
+ * Blocks --no-verify to enforce quality gates before pushing
230
234
  */
231
235
  function generatePrePushHook() {
232
236
  return `#!/bin/bash
233
237
  # CAWS Pre-push Hook
234
238
  # Runs comprehensive checks before pushing
239
+ # BLOCKS --no-verify for safety
235
240
 
236
241
  set -e
237
242
 
243
+ # Block --no-verify on push operations
244
+ for arg in "$@"; do
245
+ if [[ "$arg" == "--no-verify" ]] || [[ "$arg" == "-n" ]]; then
246
+ echo "āŒ Error: --no-verify is BLOCKED on git push"
247
+ echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
248
+ echo "Push operations must pass all quality gates."
249
+ echo ""
250
+ echo "šŸ’” To fix issues locally:"
251
+ echo " 1. Run: caws validate"
252
+ echo " 2. Fix reported issues"
253
+ echo " 3. Commit fixes: git commit --no-verify (allowed)"
254
+ echo " 4. Push again: git push (no --no-verify)"
255
+ exit 1
256
+ fi
257
+ done
258
+
238
259
  echo "šŸš€ CAWS Pre-push Validation"
239
260
  echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
240
261
 
@@ -251,7 +272,8 @@ if command -v caws >/dev/null 2>&1; then
251
272
  echo "āœ… CAWS validation passed"
252
273
  else
253
274
  echo "āŒ CAWS validation failed"
254
- echo "šŸ’” Fix issues or use: git push --no-verify"
275
+ echo "šŸ’” Fix issues locally, then push again"
276
+ echo "šŸ’” You can commit fixes with: git commit --no-verify"
255
277
  exit 1
256
278
  fi
257
279
  fi
@@ -267,7 +289,6 @@ if [ -f "package.json" ]; then
267
289
  else
268
290
  echo "āš ļø Security vulnerabilities found"
269
291
  echo "šŸ’” Review with: npm audit"
270
- echo "šŸ’” Use --no-verify to push anyway"
271
292
  # Don't fail on warnings, just warn
272
293
  fi
273
294
  fi
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paths.design/caws-cli",
3
- "version": "3.4.0",
3
+ "version": "3.5.0",
4
4
  "description": "CAWS CLI - Coding Agent Workflow System command line tools",
5
5
  "main": "dist/index.js",
6
6
  "bin": {
@@ -776,11 +776,11 @@ Real-time quality enforcement:
776
776
  ### Disabling Temporarily
777
777
 
778
778
  ```bash
779
- # If you need to bypass hooks temporarily
780
- # Cursor Settings → Hooks → Disable
779
+ # If you need to bypass commit hooks temporarily
780
+ git commit --no-verify # Allowed for commits
781
781
 
782
- # Note: --no-verify is BANNED for git commits
783
- # Fix the issue instead of bypassing hooks
782
+ # Note: --no-verify is BLOCKED for git push
783
+ # Push operations must pass all quality gates
784
784
  ```
785
785
 
786
786
  ---
@@ -972,11 +972,12 @@ Only increase budget with human approval and strong justification.
972
972
 
973
973
  ### Q: What if lints fail but I think they're wrong?
974
974
 
975
- **A: Fix the lints.** Never use `--no-verify`. If the lint rule is incorrect:
975
+ **A: Fix the lints.** You can use `git commit --no-verify` to commit temporarily, but you cannot push without fixing. If the lint rule is incorrect:
976
976
 
977
977
  1. Fix the code to satisfy the lint
978
978
  2. Or request human discussion of the lint rule
979
979
  3. Human can update lint config if appropriate
980
+ 4. Note: `git push --no-verify` is BLOCKED
980
981
 
981
982
  ### Q: Can I commit without updating provenance?
982
983