bigpowers 2.46.0 → 2.47.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/.pi/package.json +1 -1
- package/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/scripts/golden-g04-selftest.sh +130 -0
package/.pi/package.json
CHANGED
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
# [2.47.0](https://github.com/danielvm-git/bigpowers/compare/v2.46.0...v2.47.0) (2026-07-03)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **e31:** G-04 sync-pipeline self-test script ([#43](https://github.com/danielvm-git/bigpowers/issues/43)) ([9bde7ab](https://github.com/danielvm-git/bigpowers/commit/9bde7abb3c21ada6ba3e789caee710f24d65f516))
|
|
7
|
+
|
|
1
8
|
# [2.46.0](https://github.com/danielvm-git/bigpowers/compare/v2.45.6...v2.46.0) (2026-07-03)
|
|
2
9
|
|
|
3
10
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# golden-g04-selftest.sh — Sync-pipeline self-test (G-04)
|
|
3
|
+
#
|
|
4
|
+
# Asserts:
|
|
5
|
+
# 1. All target directories exist (.cursor/rules, .gemini/extensions/bigpowers, .pi)
|
|
6
|
+
# 2. Each target directory contains exactly 72 .md artifact files
|
|
7
|
+
# 3. skills-lock.json skill count matches SKILL-INDEX.md skill count
|
|
8
|
+
#
|
|
9
|
+
# Exit 0 on all assertions passing; exit 1 on first failure.
|
|
10
|
+
#
|
|
11
|
+
# Usage: bash scripts/golden-g04-selftest.sh
|
|
12
|
+
|
|
13
|
+
set -euo pipefail
|
|
14
|
+
|
|
15
|
+
RED='\033[0;31m'
|
|
16
|
+
GREEN='\033[0;32m'
|
|
17
|
+
NC='\033[0m' # No Color
|
|
18
|
+
|
|
19
|
+
PASS=0
|
|
20
|
+
FAIL=0
|
|
21
|
+
|
|
22
|
+
pass() { echo -e "${GREEN}PASS${NC} $*"; PASS=$((PASS + 1)); }
|
|
23
|
+
fail() { echo -e "${RED}FAIL${NC} $*"; FAIL=$((FAIL + 1)); }
|
|
24
|
+
|
|
25
|
+
# ── Task 1: Target directory existence ────────────────────────────────
|
|
26
|
+
|
|
27
|
+
TARGETS=(
|
|
28
|
+
".cursor/rules"
|
|
29
|
+
".gemini/extensions/bigpowers"
|
|
30
|
+
".pi/skills"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
for dir in "${TARGETS[@]}"; do
|
|
34
|
+
if [[ -d "$dir" ]]; then
|
|
35
|
+
pass "directory exists: $dir"
|
|
36
|
+
else
|
|
37
|
+
fail "directory not found: $dir"
|
|
38
|
+
fi
|
|
39
|
+
done
|
|
40
|
+
|
|
41
|
+
# ── Task 2: Artifact count assertion (72 per target) ──────────────────
|
|
42
|
+
|
|
43
|
+
EXPECTED=$(jq '.skills | keys | length' skills-lock.json 2>/dev/null) || {
|
|
44
|
+
echo "FAIL cannot read skills-lock.json"
|
|
45
|
+
exit 1
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
check_count() {
|
|
49
|
+
local dir="$1"
|
|
50
|
+
local label="$2"
|
|
51
|
+
local pattern="${3:-*.md}"
|
|
52
|
+
|
|
53
|
+
if [[ ! -d "$dir" ]]; then
|
|
54
|
+
fail "$label: directory not found (skipping count)"
|
|
55
|
+
return
|
|
56
|
+
fi
|
|
57
|
+
|
|
58
|
+
# Count files matching pattern (non-recursive for .cursor and .gemini,
|
|
59
|
+
# recursive for .pi which has subdirectories)
|
|
60
|
+
local count
|
|
61
|
+
if [[ "$dir" == ".pi/skills" || "$dir" == *"/skills" ]]; then
|
|
62
|
+
count=$(find "$dir" -maxdepth 2 -name "$pattern" -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
63
|
+
else
|
|
64
|
+
count=$(find "$dir" -maxdepth 1 -name "$pattern" -type f 2>/dev/null | wc -l | tr -d ' ')
|
|
65
|
+
fi
|
|
66
|
+
|
|
67
|
+
if [[ "$count" -eq "$EXPECTED" ]]; then
|
|
68
|
+
pass "$label: $count artifacts (expected $EXPECTED)"
|
|
69
|
+
else
|
|
70
|
+
fail "$label: expected $EXPECTED artifacts, got $count"
|
|
71
|
+
fi
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
check_count ".cursor/rules" ".cursor/rules" "*.mdc"
|
|
75
|
+
check_count ".gemini/extensions/bigpowers/skills" ".gemini/extensions/bigpowers" "SKILL.md"
|
|
76
|
+
check_count ".pi/skills" ".pi/skills" "SKILL.md"
|
|
77
|
+
|
|
78
|
+
# ── Task 3: Lockfile vs SKILL-INDEX count assertion ───────────────────
|
|
79
|
+
|
|
80
|
+
LOCKFILE="skills-lock.json"
|
|
81
|
+
INDEXFILE="SKILL-INDEX.md"
|
|
82
|
+
|
|
83
|
+
if [[ ! -f "$LOCKFILE" ]]; then
|
|
84
|
+
fail "lockfile not found: $LOCKFILE"
|
|
85
|
+
else
|
|
86
|
+
# Parse lockfile: count top-level keys (skill names)
|
|
87
|
+
if command -v jq &>/dev/null; then
|
|
88
|
+
lock_count=$(jq '.skills | keys | length' "$LOCKFILE" 2>/dev/null) || {
|
|
89
|
+
fail "lockfile parse error: $LOCKFILE (invalid JSON)"
|
|
90
|
+
lock_count=""
|
|
91
|
+
}
|
|
92
|
+
else
|
|
93
|
+
# Fallback: count lines with skill name pattern
|
|
94
|
+
lock_count=$(grep -cE '^\s*"[^"]+"\s*:' "$LOCKFILE" 2>/dev/null) || {
|
|
95
|
+
fail "lockfile parse error: $LOCKFILE"
|
|
96
|
+
lock_count=""
|
|
97
|
+
}
|
|
98
|
+
fi
|
|
99
|
+
fi
|
|
100
|
+
|
|
101
|
+
if [[ ! -f "$INDEXFILE" ]]; then
|
|
102
|
+
fail "index not found: $INDEXFILE"
|
|
103
|
+
else
|
|
104
|
+
# Count skill entries from SKILL-INDEX.md header (e.g., "**Skills:** 72")
|
|
105
|
+
index_count=$(grep '\*\*Skills:\*\*' "$INDEXFILE" 2>/dev/null | sed 's/.*\*\*Skills:\*\*[[:space:]]*//' | grep -oE '[0-9]+') || {
|
|
106
|
+
fail "index parse error: $INDEXFILE"
|
|
107
|
+
index_count=""
|
|
108
|
+
}
|
|
109
|
+
fi
|
|
110
|
+
|
|
111
|
+
if [[ -n "${lock_count:-}" && -n "${index_count:-}" ]]; then
|
|
112
|
+
if [[ "$lock_count" -eq "$index_count" ]]; then
|
|
113
|
+
pass "lockfile ($lock_count) matches SKILL-INDEX ($index_count)"
|
|
114
|
+
else
|
|
115
|
+
fail "lockfile ($lock_count) != SKILL-INDEX ($index_count)"
|
|
116
|
+
fi
|
|
117
|
+
fi
|
|
118
|
+
|
|
119
|
+
# ── Summary ───────────────────────────────────────────────────────────
|
|
120
|
+
|
|
121
|
+
echo ""
|
|
122
|
+
echo "──────────────────────────────────────────"
|
|
123
|
+
echo -e "Results: ${GREEN}${PASS} passed${NC}, ${RED}${FAIL} failed${NC}"
|
|
124
|
+
echo "──────────────────────────────────────────"
|
|
125
|
+
|
|
126
|
+
if [[ "$FAIL" -gt 0 ]]; then
|
|
127
|
+
exit 1
|
|
128
|
+
fi
|
|
129
|
+
|
|
130
|
+
exit 0
|