bigpowers 2.88.12 → 2.88.13

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,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.88.12",
3
+ "version": "2.88.13",
4
4
  "description": "81 skills — 73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "keywords": [
6
6
  "gemini-extension"
package/.pi/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.88.12",
3
+ "version": "2.88.13",
4
4
  "description": "81 skills — 73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "keywords": [
6
6
  "pi-package"
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [2.88.13](https://github.com/danielvm-git/bigpowers/compare/v2.88.12...v2.88.13) (2026-10-25)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **ci:** cut golden suite critical path by removing duplicate gate work ([#161](https://github.com/danielvm-git/bigpowers/issues/161)) ([2db0bb9](https://github.com/danielvm-git/bigpowers/commit/2db0bb98663ae7f44e1990f06e9f90b6db60a773))
7
+
1
8
  ## [2.88.12](https://github.com/danielvm-git/bigpowers/compare/v2.88.11...v2.88.12) (2026-10-25)
2
9
 
3
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigpowers",
3
- "version": "2.88.12",
3
+ "version": "2.88.13",
4
4
  "description": "73 agent skills synthesizing 17 years of software engineering discipline into a prescriptive methodology for solo developers",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -53,12 +53,14 @@ is_manual_utility() { # $1 = script path
53
53
  }
54
54
 
55
55
  is_referenced() { # $1 = script basename, $2... = candidate file globs already expanded
56
+ # One grep over all candidate files per script, not one per (script, file)
57
+ # pair — the per-file loop forked ~100×N greps and took ~1 min in CI.
56
58
  local name="$1"; shift
57
59
  local f
58
- for f in "$@"; do
59
- [[ "$f" == *"/$name" || "$(basename "$f")" == "$name" ]] && continue # self
60
- grep -q "$name" "$f" 2>/dev/null && return 0
61
- done
60
+ while IFS= read -r f; do
61
+ [[ "$f" == *"/$name" || "${f##*/}" == "$name" ]] && continue # self
62
+ return 0
63
+ done < <(grep -lF -- "$name" "$@" 2>/dev/null)
62
64
  return 1
63
65
  }
64
66
 
@@ -161,7 +163,7 @@ if [[ -z "$ORPHANS" ]]; then
161
163
  fi
162
164
 
163
165
  echo " orphaned scripts (present but reachable from no gate, doc, or workflow):"
164
- printf '%s' "$ORPHANS"
166
+ printf '%s\n' "$ORPHANS"
165
167
  echo -e "${RED}FAIL${NC} wire them into a gate, reference them from a skill/doc, tag them '# bp-manual-utility: <reason>', or delete them"
166
168
  echo "G-13: FAIL"
167
169
  exit 1
@@ -72,6 +72,8 @@ GOLDEN_GATES=(
72
72
  "import-boundaries:bash scripts/check-import-boundaries.sh:false"
73
73
  "skill-catalog:bash scripts/validate-skill-catalog.sh:false"
74
74
  "specs-parse:bash scripts/validate-specs-yaml.sh:false"
75
+ # The runner itself: failing output is shown, skips are named and reasoned.
76
+ "golden-gate-runner:bash scripts/test-golden-gate-runner.sh:false"
75
77
  # Tier 2 of the verify arc (#106): executes the verify: of every story marked
76
78
  # done. Tier 1 (SKILL.md) is run-skill-verify.sh in golden-suite.yml.
77
79
  "story-verify-selftest:bash scripts/run-story-verify.sh --self-test:false"
@@ -120,15 +122,48 @@ golden_agent_dry_run() {
120
122
  return 0
121
123
  }
122
124
 
125
+ # GOLDEN_SKIP_GATES (comma list) skips gates another CI job already runs —
126
+ # golden-suite.yml skips story-verify because its story-verify job runs the
127
+ # same command. Local Preflight leaves it unset, so every gate runs there. A
128
+ # name that matches no gate is a FAIL: a typo must not look like a skip.
129
+ golden_is_skipped() { # $1 = gate name
130
+ case ",${GOLDEN_SKIP_GATES:-}," in *",$1,"*) return 0 ;; esac
131
+ return 1
132
+ }
133
+
134
+ golden_check_skip_names() {
135
+ local skip gate known
136
+ for skip in $(printf '%s' "${GOLDEN_SKIP_GATES:-}" | tr ',' ' '); do
137
+ [[ -z "$skip" ]] && continue
138
+ known=false
139
+ for gate in "${GOLDEN_GATES[@]}"; do
140
+ [[ "${gate%%:*}" == "$skip" ]] && known=true
141
+ done
142
+ $known && continue
143
+ echo -e "[$skip] ${GOLDEN_RED}FAIL${GOLDEN_NC} (GOLDEN_SKIP_GATES names no such gate)"
144
+ GATE_RESULTS+=(" - name: $skip" " exit_code: 2" " duration_seconds: 0" " status: fail" " error: unknown gate in GOLDEN_SKIP_GATES")
145
+ (( FAIL_COUNT += 1 ))
146
+ done
147
+ }
148
+
123
149
  golden_run_deterministic_gates() {
124
- local gate name cmd is_optional main_cmd script_path
150
+ local gate name cmd is_optional main_cmd script_path gate_out
125
151
  PASS_COUNT=0 FAIL_COUNT=0 SKIP_COUNT=0
126
152
  GATE_RESULTS=()
153
+ golden_check_skip_names
127
154
 
128
155
  for gate in "${GOLDEN_GATES[@]}"; do
129
156
  IFS=':' read -r name cmd is_optional <<< "$gate"
130
157
  echo -n "[$name] "
131
158
 
159
+ if golden_is_skipped "$name"; then
160
+ local reason="${GOLDEN_SKIP_REASON:-listed in GOLDEN_SKIP_GATES}"
161
+ echo -e "${GOLDEN_YELLOW}SKIP${GOLDEN_NC} ($reason)"
162
+ GATE_RESULTS+=(" - name: $name" " exit_code: skipped" " duration_seconds: 0" " status: skipped" " note: $reason")
163
+ (( SKIP_COUNT += 1 ))
164
+ continue
165
+ fi
166
+
132
167
  main_cmd=$(echo "$cmd" | awk '{print $1}')
133
168
  if [[ "$main_cmd" == "bash" ]]; then
134
169
  script_path=$(echo "$cmd" | awk '{print $2}')
@@ -148,7 +183,7 @@ golden_run_deterministic_gates() {
148
183
 
149
184
  local START_TIME END_TIME DURATION_MS DURATION_SEC GATE_EXIT
150
185
  START_TIME=$(date +%s%N)
151
- eval "$cmd" >/dev/null 2>&1 && GATE_EXIT=$? || GATE_EXIT=$?
186
+ gate_out=$(eval "$cmd" 2>&1) && GATE_EXIT=$? || GATE_EXIT=$?
152
187
  END_TIME=$(date +%s%N)
153
188
  DURATION_MS=$(( (END_TIME - START_TIME) / 1000000 ))
154
189
  DURATION_SEC=$(echo "scale=2; $DURATION_MS / 1000" | bc 2>/dev/null || echo "0")
@@ -159,6 +194,8 @@ golden_run_deterministic_gates() {
159
194
  (( PASS_COUNT += 1 ))
160
195
  else
161
196
  echo -e "${GOLDEN_RED}FAIL${GOLDEN_NC} (${DURATION_SEC}s, exit $GATE_EXIT)"
197
+ # Without the tail, CI shows FAIL with no reason (#158: compliance).
198
+ printf '%s\n' "$gate_out" | tail -20 | sed 's/^/ | /'
162
199
  GATE_RESULTS+=(" - name: $name" " exit_code: $GATE_EXIT" " duration_seconds: $DURATION_SEC" " status: fail")
163
200
  (( FAIL_COUNT += 1 ))
164
201
  fi
@@ -41,7 +41,7 @@ PASS=0; FAIL=0; SKIP=0
41
41
  TARGET="${1:-}"
42
42
 
43
43
  extract_records() {
44
- "$PYTHON" "$REPO_ROOT/scripts/lib/extract-story-verify.py" "$REPO_ROOT"
44
+ "$PYTHON" "$REPO_ROOT/scripts/lib/extract-story-verify.py" "${EXTRACT_ROOT:-$REPO_ROOT}"
45
45
  }
46
46
 
47
47
  # Report a story whose directive can never fail. Kept separate from execution so
@@ -58,6 +58,55 @@ reject_non_executable() {
58
58
  FAIL=$((FAIL + 1))
59
59
  }
60
60
 
61
+ # Many stories share one verify (e61s02…e76s02 all run the same installer
62
+ # test); same command at the same commit gives the same result, so run it once
63
+ # per gate_all and reuse the verdict for every story that declares it.
64
+ # Sets RUN_RC, RUN_OUT, and RUN_REUSED (1 when nothing new ran).
65
+ run_memoized() {
66
+ local cmd="$1" key
67
+ key=$(printf '%s' "$cmd" | cksum | tr -d ' ')
68
+ if [ -n "${MEMO_DIR:-}" ] && [ -f "$MEMO_DIR/$key.rc" ]; then
69
+ RUN_RC=$(cat "$MEMO_DIR/$key.rc")
70
+ RUN_OUT=$(cat "$MEMO_DIR/$key.out")
71
+ return 0
72
+ fi
73
+ RUN_REUSED=0
74
+ RUN_OUT=$(run_with_timeout "$cmd") && RUN_RC=0 || RUN_RC=$?
75
+ if [ -n "${MEMO_DIR:-}" ]; then
76
+ printf '%s' "$RUN_RC" > "$MEMO_DIR/$key.rc"
77
+ printf '%s' "$RUN_OUT" > "$MEMO_DIR/$key.out"
78
+ fi
79
+ }
80
+
81
+ # A plain `a && b && c` chain shares no shell state between segments when it
82
+ # has no quoting, expansion, grouping, pipes, `;`, cd, export or assignment —
83
+ # so each segment can be cached on its own (test-adapter-render.sh prefixes ten
84
+ # different story verifies). Anything else is cached as one whole command.
85
+ is_plain_and_chain() {
86
+ case "$1" in
87
+ *\'*|*\"*|*\$*|*\`*|*\(*|*\)*|*\{*|*\}*|*\|*|*\;*|*=*|*\<*) return 1 ;;
88
+ esac
89
+ printf '%s' "$1" | grep -qE '(^|&&)[[:space:]]*(cd|export|source|\.)[[:space:]]' && return 1
90
+ return 0
91
+ }
92
+
93
+ run_verify_cmd() {
94
+ local cmd="$1" seg
95
+ RUN_REUSED=1
96
+ if ! is_plain_and_chain "$cmd"; then
97
+ run_memoized "$cmd"
98
+ return
99
+ fi
100
+ local rest="$cmd"
101
+ while :; do
102
+ seg=${rest%%&&*}
103
+ run_memoized "$(printf '%s' "$seg" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')"
104
+ [ "$RUN_RC" -eq 0 ] || return
105
+ [ "$seg" = "$rest" ] && return
106
+ rest=${rest#*&&}
107
+ done
108
+ }
109
+
61
110
  run_story_verify() {
62
111
  local sid="$1" src="$2" cmd="$3"
63
112
 
@@ -70,20 +119,23 @@ run_story_verify() {
70
119
  return 1
71
120
  fi
72
121
 
73
- local output
74
- if output=$(run_with_timeout "$cmd"); then
75
- echo "PASS: $sid"
122
+ run_verify_cmd "$cmd"
123
+ local note=""
124
+ [ "$RUN_REUSED" -eq 1 ] && note=" (shared result)"
125
+ if [ "$RUN_RC" -eq 0 ]; then
126
+ echo "PASS: $sid$note"
76
127
  PASS=$((PASS + 1))
77
128
  return 0
78
129
  fi
79
- echo "FAIL: $sid [$src] — $cmd"
80
- echo " output: $(echo "$output" | tail -3 | tr '\n' ' ')"
130
+ echo "FAIL: $sid [$src]$note — $cmd"
131
+ echo " output: $(echo "$RUN_OUT" | tail -3 | tr '\n' ' ')"
81
132
  FAIL=$((FAIL + 1))
82
133
  return 1
83
134
  }
84
135
 
85
136
  gate_all() {
86
137
  local sid src status cmd
138
+ MEMO_DIR=$(mktemp -d)
87
139
  while IFS=$'\t' read -r sid src status cmd; do
88
140
  [ -z "${sid:-}" ] && continue
89
141
  if [ -n "$TARGET" ] && [ "$sid" != "$TARGET" ]; then
@@ -96,6 +148,58 @@ gate_all() {
96
148
  fi
97
149
  run_story_verify "$sid" "$src" "$cmd" || true
98
150
  done < <(extract_records)
151
+ rm -rf "$MEMO_DIR"
152
+ MEMO_DIR=""
153
+ }
154
+
155
+ # Shared-command proof: stories that declare the same verify run it once, yet
156
+ # each story still gets its own verdict — a failing shared command fails every
157
+ # story that declares it, never just the first.
158
+ self_test_shared_commands() {
159
+ local root="$1/shared" out runs
160
+ mkdir -p "$root/specs/epics/e98-shared"
161
+ cat > "$root/specs/epics/e98-shared/epic.yaml" <<YAML
162
+ id: e98
163
+ title: shared-command capsule
164
+ stories:
165
+ - id: e98s01
166
+ status: done
167
+ verify: printf x >> $root/ok-runs && test -d $root/specs
168
+ - id: e98s02
169
+ status: done
170
+ verify: printf x >> $root/ok-runs && test -d $root/specs
171
+ - id: e98s03
172
+ status: done
173
+ verify: printf x >> $root/bad-runs && test -f $root/missing
174
+ - id: e98s04
175
+ status: done
176
+ verify: printf x >> $root/bad-runs && test -f $root/missing
177
+ - id: e98s05
178
+ status: done
179
+ verify: printf x >> $root/seg-runs && test -d $root/specs
180
+ - id: e98s06
181
+ status: done
182
+ verify: printf x >> $root/seg-runs && test -d $root/specs/epics
183
+ - id: e98s07
184
+ status: done
185
+ verify: printf x >> $root/seg-runs && test -f $root/missing
186
+ YAML
187
+ out=$(EXTRACT_ROOT="$root" TARGET="" PASS=0 FAIL=0 SKIP=0 gate_all)
188
+ local problems=0
189
+ runs=$(wc -c < "$root/ok-runs" | tr -d ' ')
190
+ [ "$runs" = "1" ] || { echo "FAIL: self-test — shared passing command ran $runs times, want 1"; problems=$((problems + 1)); }
191
+ runs=$(wc -c < "$root/bad-runs" | tr -d ' ')
192
+ [ "$runs" = "1" ] || { echo "FAIL: self-test — shared failing command ran $runs times, want 1"; problems=$((problems + 1)); }
193
+ runs=$(wc -c < "$root/seg-runs" | tr -d ' ')
194
+ [ "$runs" = "1" ] || { echo "FAIL: self-test — shared && segment ran $runs times, want 1"; problems=$((problems + 1)); }
195
+ local sid
196
+ for sid in e98s01 e98s02 e98s05 e98s06; do
197
+ echo "$out" | grep -q "^PASS: $sid" || { echo "FAIL: self-test — $sid not reported PASS"; problems=$((problems + 1)); }
198
+ done
199
+ for sid in e98s03 e98s04 e98s07; do
200
+ echo "$out" | grep -q "^FAIL: $sid" || { echo "FAIL: self-test — $sid not reported FAIL"; problems=$((problems + 1)); }
201
+ done
202
+ [ "$problems" -eq 0 ]
99
203
  }
100
204
 
101
205
  # Anti-vacuity proof: seed a capsule whose done story must fail, and one that
@@ -178,6 +282,8 @@ EOF
178
282
  rm -rf "$tmp_root"
179
283
  trap - EXIT
180
284
 
285
+ self_test_shared_commands "$tmp_root" || problems=$((problems + 1))
286
+
181
287
  if [ "$checked" -lt 5 ]; then
182
288
  echo "FAIL: self-test — extractor found $checked/5 fixture stories"
183
289
  return 1
@@ -0,0 +1,59 @@
1
+ #!/usr/bin/env bash
2
+ # story: BUG-2026-10-25-ci-critical-path
3
+ # test-golden-gate-runner.sh — regression guard for golden_run_deterministic_gates.
4
+ #
5
+ # Runs the real runner against a fixture gate list and asserts:
6
+ # (a) a failing gate prints the tail of its output (CI used to show only FAIL)
7
+ # (b) GOLDEN_SKIP_GATES reports a named gate as SKIP with its reason
8
+ # (c) an unknown name in GOLDEN_SKIP_GATES is a FAIL, so a typo cannot
9
+ # silently disable nothing while claiming to skip something
10
+ # (d) without GOLDEN_SKIP_GATES every gate runs — the default stays full
11
+ #
12
+ # Usage: bash scripts/test-golden-gate-runner.sh
13
+
14
+ set -euo pipefail
15
+ source "$(dirname "${BASH_SOURCE[0]}")/lib/skill-common.sh"
16
+ resolve_repo_root
17
+ cd "$REPO_ROOT"
18
+
19
+ FAILURES=0
20
+ pass() { echo "PASS $1"; }
21
+ fail() { echo "FAIL $1"; FAILURES=$((FAILURES + 1)); }
22
+
23
+ # Run the runner in a subshell with a fixture gate list; prints its stdout and
24
+ # the final counters as "COUNTS pass fail skip".
25
+ run_fixture() {
26
+ (
27
+ source scripts/lib/golden-suite-gates.sh
28
+ GOLDEN_GATES=(
29
+ "ok-gate:true:false"
30
+ "bad-gate:sh -c 'echo marker-line-from-failing-gate; exit 3':false"
31
+ "covered-gate:true:false"
32
+ )
33
+ golden_run_deterministic_gates
34
+ echo "COUNTS $PASS_COUNT $FAIL_COUNT $SKIP_COUNT"
35
+ )
36
+ }
37
+
38
+ out=$(GOLDEN_SKIP_GATES="" run_fixture)
39
+ echo "$out" | grep -q 'marker-line-from-failing-gate' \
40
+ && pass "(a) failing gate output is printed" \
41
+ || fail "(a) failing gate output is missing"
42
+ echo "$out" | grep -q '^COUNTS 2 1 0$' \
43
+ && pass "(d) no skip list runs every gate" \
44
+ || fail "(d) default run counts wrong: $(echo "$out" | grep COUNTS)"
45
+
46
+ out=$(GOLDEN_SKIP_GATES="covered-gate" GOLDEN_SKIP_REASON="runs in its own CI job" run_fixture)
47
+ echo "$out" | grep -q '^\[covered-gate\] .*SKIP.*runs in its own CI job' \
48
+ && pass "(b) skipped gate reported with reason" \
49
+ || fail "(b) skipped gate not reported with reason"
50
+ echo "$out" | grep -q '^COUNTS 1 1 1$' \
51
+ && pass "(b) skipped gate counted as skip, not pass" \
52
+ || fail "(b) skip counts wrong: $(echo "$out" | grep COUNTS)"
53
+
54
+ out=$(GOLDEN_SKIP_GATES="no-such-gate" run_fixture)
55
+ echo "$out" | grep -q 'no-such-gate' && echo "$out" | grep -q '^COUNTS 2 2 0$' \
56
+ && pass "(c) unknown skip name fails the run" \
57
+ || fail "(c) unknown skip name accepted: $(echo "$out" | grep COUNTS)"
58
+
59
+ [ "$FAILURES" -eq 0 ] && echo "OK: golden gate runner" || { echo "$FAILURES check(s) failed"; exit 1; }