@boyingliu01/xp-gate 0.22.0 → 0.23.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.
package/hooks/pre-push CHANGED
@@ -49,7 +49,7 @@ report = {
49
49
  'verdict': '$verdict',
50
50
  },
51
51
  'gates': [
52
- {'id': 'MP', 'name': 'Gate-Script Mirror Parity', 'status': '${GATE_MP_STATUS:-SKIP}', 'details': {}},
52
+ {'id': 'MP', 'name': 'Gate-Script Mirror Parity', 'status': '${GATE_MP_STATUS:-SKIP}', 'details': {'duration_ms': '${MP_DURATION_MS:-0}'}},
53
53
  {'id': '10', 'name': 'Build Integrity', 'status': '${GATE_10_STATUS:-SKIP}', 'details': {}},
54
54
  {'id': 'M', 'name': 'Mutation Testing', 'status': '${GATE_M_STATUS:-SKIP}', 'details': {}},
55
55
  {'id': 'M-Python', 'name': 'Mutation Testing (Python)', 'status': '${GATE_M_PYTHON_STATUS:-SKIP}', 'details': {}},
@@ -179,12 +179,29 @@ fi
179
179
  # guard runs here (fail-closed) and in CI's mirror-parity job. Read-only:
180
180
  # compares bytes and git index modes; heals nothing.
181
181
  GATE_MP_STATUS="SKIP"
182
+ # Duration is audited in MILLISECONDS end-to-end (#521 AC-2; the #524 lesson:
183
+ # never mix a seconds timestamp into a ms budget). The output is validated as
184
+ # bare digits before use: BSD/macOS date does not support %3N and prints the
185
+ # literal '...%3N' with exit 0, which would blow up the arithmetic and kill
186
+ # pre-push — a non-numeric read degrades to 0 (walkthrough MJ-01).
187
+ _mp_now_ms() {
188
+ local _t
189
+ _t="$(date +%s%3N 2>/dev/null || true)"
190
+ case "$_t" in
191
+ ''|*[!0-9]*) echo 0 ;;
192
+ *) echo "$_t" ;;
193
+ esac
194
+ }
195
+ MP_START_MS="$(_mp_now_ms)"
182
196
  MP_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || echo .)"
183
197
  if [ -f "$MP_ROOT/scripts/check-hook-mirror.sh" ]; then
184
198
  if (cd "$MP_ROOT" && bash scripts/check-hook-mirror.sh); then
185
199
  GATE_MP_STATUS="PASS"
186
- echo "✅ Gate MP: gate-script mirror parity OK"
200
+ MP_DURATION_MS=$(( $(_mp_now_ms) - MP_START_MS ))
201
+ [ "$MP_DURATION_MS" -lt 0 ] 2>/dev/null && MP_DURATION_MS=0
202
+ echo "✅ Gate MP: gate-script mirror parity OK (${MP_DURATION_MS}ms)"
187
203
  else
204
+ MP_DURATION_MS=0
188
205
  echo ""
189
206
  echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
190
207
  echo " ❌ GATE MP FAILED — PUSH BLOCKED"
@@ -196,6 +213,7 @@ if [ -f "$MP_ROOT/scripts/check-hook-mirror.sh" ]; then
196
213
  fi
197
214
  else
198
215
  echo "⚠️ Gate MP: check-hook-mirror.sh not found. SKIP — Gate MP."
216
+ MP_DURATION_MS=0
199
217
  fi
200
218
  echo ""
201
219
 
@@ -2,6 +2,6 @@
2
2
  "verdict": "PASS",
3
3
  "license_type": "MIT",
4
4
  "sha256": "0e7ac423bf2c6e223b7c5b156f8cf72da49d748e56a1641402c31f22ad07dbb5",
5
- "checked_at": "2026-10-14T01:56:49.591Z",
5
+ "checked_at": "2026-10-14T05:31:48.350Z",
6
6
  "source": "network"
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@boyingliu01/xp-gate",
3
- "version": "0.22.0",
3
+ "version": "0.23.0",
4
4
  "description": "AI-driven development workflow: 6 quality gates + Delphi review + Sprint Flow",
5
5
  "bin": {
6
6
  "xp-gate": "./bin/xp-gate.js"
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: admin-template-guidelines
3
+ version: 1.0.0
3
4
  description: "6 maintainability rules for AI-generated admin interfaces (Fastify + Nunjucks + HTMX + Alpine.js). Prevents route bloat, test inconsistency, Nunjucks traps, repeated data logic, auth blind spots, and HTMX/Alpine confusion."
4
5
  maturity: alpha
5
6
  ---
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: batch-grill-me
3
+ version: 1.0.0
3
4
  description: A relentless interview that asks every frontier question at once, round by round.
4
5
  disable-model-invocation: true
5
6
  ---
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: clipboard-vision
3
+ version: 1.0.0
3
4
  description: Use when the user explicitly asks to analyze, describe, OCR, or inspect a single image currently stored in the system clipboard.
4
5
  ---
5
6
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: domain-modeling
3
+ version: 1.0.0
3
4
  description: Build and sharpen a project's domain model. Use when the user wants to pin down domain terminology or a ubiquitous language, record an architectural decision, or when another skill needs to maintain the domain model.
4
5
  ---
5
6
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: grill-with-docs
3
+ version: 1.0.0
3
4
  description: A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
4
5
  disable-model-invocation: true
5
6
  ---
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: grilling
3
+ version: 1.0.0
3
4
  description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
4
5
  ---
5
6
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: improve-codebase-architecture
3
+ version: 1.0.0
3
4
  description: Find deepening opportunities in a codebase, informed by domain language in CONTEXT.md and decisions in ADRs. Use when user wants to improve architecture, find refactoring opportunities, consolidate tightly-coupled modules, or make a codebase more AI-navigable. Run periodically (weekly or after surges of development).
4
5
  ---
5
6
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: ralph-loop
3
+ version: 1.0.0
3
4
  description: Use when executing Sprint-Flow Phase 2 BUILD, processing one REQ, building the next requirement, iterating with clean context, or requiring full regression per requirement.
4
5
  maturity: stable
5
6
  ---
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: test-driven-development
3
+ version: 1.0.0
3
4
  description: Use when implementing any feature or bugfix, before writing implementation code
4
5
  ---
5
6
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: test-specification-alignment
3
+ version: 1.0.0
3
4
  description: "Use when asked to run tests, verify tests, align tests with specification.yaml, before BUILD verification, or before release/ship."
4
5
  ---
5
6
 
@@ -1,5 +1,6 @@
1
1
  ---
2
2
  name: to-issues
3
+ version: 1.0.0
3
4
  description: Break a plan, spec, or PRD into independently-grabbable issues using tracer-bullet vertical slices. Use when user wants to convert a plan into issues, create implementation tickets, or break down work into vertical slices. Integrates with XP-Gate sprint-flow Phase 1.
4
5
  ---
5
6