qualia-framework 2.4.3 → 2.4.5

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.
@@ -19,10 +19,11 @@ else
19
19
  COMMAND=""
20
20
  fi
21
21
 
22
- # Only gate production deploys
23
- if ! echo "$COMMAND" | grep -qE '(npx\s+|bunx\s+)?vercel\s+.*--prod|(npx\s+|bunx\s+)?vercel\s+--prod'; then
24
- exit 0
25
- fi
22
+ # Only gate actual production deploy commands (not commit messages containing the word)
23
+ case "$COMMAND" in
24
+ vercel\ *--prod*|npx\ vercel\ *--prod*|bunx\ vercel\ *--prod*) ;;
25
+ *) exit 0 ;;
26
+ esac
26
27
 
27
28
 
28
29
  # Skip if gate was passed recently (within 5 minutes)
@@ -1 +1 @@
1
- 2.4.3
1
+ 2.4.5
@@ -98,15 +98,26 @@ If no test infrastructure: skip silently.
98
98
 
99
99
  ### 2b. Review Gate
100
100
 
101
- Check for review results:
102
-
103
- 1. Read `.planning/REVIEW.md` or `.review/REVIEW.md`
104
- 2. If `status: has_blockers`:
105
- - List unresolved CRITICAL/HIGH findings
106
- - Ask: "Fix these first, or deploy anyway?"
107
- - If user says fix → stop
108
- - If user says deploy anyway → continue with warning logged
109
- 3. If `status: clean` or file not found → continue (advisory note if not found)
101
+ **IMPORTANT: The pre-deploy-gate hook will BLOCK `vercel --prod` if REVIEW.md is missing or stale. This gate must pass BEFORE attempting deploy.**
102
+
103
+ Check and auto-fix review freshness:
104
+
105
+ 1. Find REVIEW.md: `.planning/REVIEW.md` or `.review/REVIEW.md`
106
+ 2. **If missing:** Run `/qualia-review` to generate it. Then continue.
107
+ 3. **If exists, check freshness:**
108
+ ```bash
109
+ REVIEW_MTIME=$(stat -c %Y "$REVIEW_FILE" 2>/dev/null || echo 0)
110
+ LATEST_CODE_MTIME=0
111
+ for DIR in src app pages lib components; do
112
+ [ -d "$DIR" ] && DIR_LATEST=$(find "$DIR" -type f \( -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" \) -printf '%T@\n' 2>/dev/null | sort -rn | head -1 | cut -d. -f1)
113
+ [ -n "$DIR_LATEST" ] && [ "$DIR_LATEST" -gt "$LATEST_CODE_MTIME" ] && LATEST_CODE_MTIME=$DIR_LATEST
114
+ done
115
+ ```
116
+ - If `LATEST_CODE_MTIME > REVIEW_MTIME`: REVIEW.md is stale. Run `/qualia-review` to refresh it, then continue.
117
+ - If fresh: continue.
118
+ 4. Read the review content:
119
+ - If `status: has_blockers`: list unresolved CRITICAL/HIGH findings, ask "Fix these first, or deploy anyway?"
120
+ - If `status: clean` → continue
110
121
 
111
122
  ### 3. Type-Specific Checks
112
123
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qualia-framework",
3
- "version": "2.4.3",
3
+ "version": "2.4.5",
4
4
  "description": "Qualia Solutions — Claude Code Framework",
5
5
  "bin": {
6
6
  "qualia-framework": "./bin/cli.js"